Skip to content

Commit 0dd4d78

Browse files
prop-types package added to simpmlr-forms-core.
1 parent 53938de commit 0dd4d78

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
"packages/*"
55
],
6-
"version": "4.0.0-pre-alpha.8",
6+
"version": "4.0.0-pre-alpha.10",
77
"command": {
88
"init": {
99
"exact": true

packages/simplr-forms-core/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplr-forms-core",
3-
"version": "4.0.0-pre-alpha.8",
3+
"version": "4.0.0-pre-alpha.10",
44
"description": "Shared simplr-forms logic.",
55
"repository": "SimplrJS/simplr-forms",
66
"homepage": "https://github.com/SimplrJS/simplr-forms",
@@ -28,6 +28,7 @@
2828
"devDependencies": {
2929
"@types/enzyme": "^2.7.9",
3030
"@types/jest": "^19.2.2",
31+
"@types/prop-types": "^15.5.1",
3132
"@types/sinon": "^2.1.2",
3233
"enzyme": "^2.8.2",
3334
"jest": "^19.0.2",
@@ -50,6 +51,7 @@
5051
"action-emitter": "^0.2.1",
5152
"fbemitter": "^2.1.1",
5253
"immutable": "^3.8.1",
54+
"prop-types": "^15.5.8",
5355
"react": "15.5.4",
5456
"react-dom": "^15.5.4",
5557
"typed-immutable-record": "^0.0.6"

packages/simplr-forms-core/src/abstractions/base-field.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from "react";
22
import * as actionEmitter from "action-emitter";
3+
import * as PropTypes from "prop-types";
34

45
import {
56
FieldProps,
@@ -37,10 +38,10 @@ export abstract class BaseField<TProps extends FieldProps, TState extends BaseFi
3738
public context: ParentContext;
3839

3940
static contextTypes: React.ValidationMap<ParentContext> = {
40-
FormId: React.PropTypes.string,
41-
FormProps: React.PropTypes.object,
42-
FieldsGroupId: React.PropTypes.string,
43-
// FieldsGroupProps: React.PropTypes.object
41+
FormId: PropTypes.string,
42+
FormProps: PropTypes.object,
43+
FieldsGroupId: PropTypes.string,
44+
// FieldsGroupProps: PropTypes.object
4445
};
4546

4647
static defaultProps: FieldProps = {

packages/simplr-forms-core/src/abstractions/base-form.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from "react";
2+
import * as PropTypes from "prop-types";
23

34
import * as FormContracts from "../contracts/form";
45
import { FSHContainer, FormStoresHandler } from "../stores/form-stores-handler";
@@ -7,7 +8,7 @@ export abstract class BaseForm<TProps extends FormContracts.FormProps, TState> e
78
protected FormId: string;
89

910
static childContextTypes = {
10-
FormId: React.PropTypes.string.isRequired
11+
FormId: PropTypes.string.isRequired
1112
};
1213

1314
getChildContext(): FormContracts.FormChildContext {

packages/simplr-forms-dom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplr-forms-dom",
3-
"version": "4.0.0-pre-alpha.8",
3+
"version": "4.0.0-pre-alpha.10",
44
"description": "DOM components for simplr-forms.",
55
"repository": "SimplrJS/simplr-forms",
66
"homepage": "https://github.com/SimplrJS/simplr-forms",
@@ -42,7 +42,7 @@
4242
"dependencies": {
4343
"@types/react": "^15.0.21",
4444
"react": "^15.5.4",
45-
"simplr-forms-core": "^4.0.0-pre-alpha.8"
45+
"simplr-forms-core": "^4.0.0-pre-alpha.10"
4646
},
4747
"jest": {
4848
"setupTestFrameworkScriptFile": "./node_modules/jest-enzyme/lib/index.js",

0 commit comments

Comments
 (0)