@maif/react-forms 1.0.31 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/esm/index.js +30260 -0
- package/lib/index.js +30281 -39
- package/package.json +28 -35
- package/rollup.config.js +53 -0
- package/dist/react-form.js +0 -2
- package/dist/react-form.js.LICENSE.txt +0 -103
- package/lib/Option.d.ts +0 -39
- package/lib/Option.js +0 -66
- package/lib/constraints.d.ts +0 -90
- package/lib/constraints.js +0 -371
- package/lib/form.d.ts +0 -2
- package/lib/form.js +0 -1359
- package/lib/format.d.ts +0 -13
- package/lib/format.js +0 -20
- package/lib/index.d.ts +0 -4
- package/lib/inputs/ArrayInput.d.ts +0 -1
- package/lib/inputs/ArrayInput.js +0 -141
- package/lib/inputs/BooleanInput.d.ts +0 -5
- package/lib/inputs/BooleanInput.js +0 -49
- package/lib/inputs/CodeInput.d.ts +0 -9
- package/lib/inputs/CodeInput.js +0 -89
- package/lib/inputs/Collapse.d.ts +0 -1
- package/lib/inputs/Collapse.js +0 -73
- package/lib/inputs/MarkdownInput.d.ts +0 -1
- package/lib/inputs/MarkdownInput.js +0 -433
- package/lib/inputs/SelectInput.d.ts +0 -1
- package/lib/inputs/SelectInput.js +0 -238
- package/lib/inputs/SingleLineCode.d.ts +0 -9
- package/lib/inputs/SingleLineCode.js +0 -88
- package/lib/inputs/index.d.ts +0 -8
- package/lib/inputs/index.js +0 -109
- package/lib/inputs/objectInput.d.ts +0 -1
- package/lib/inputs/objectInput.js +0 -115
- package/lib/resolvers/index.d.ts +0 -2
- package/lib/resolvers/index.js +0 -19
- package/lib/resolvers/utils.d.ts +0 -5
- package/lib/resolvers/utils.js +0 -133
- package/lib/style.d.ts +0 -234
- package/lib/style.js +0 -181
- package/lib/styleContext.d.ts +0 -1
- package/lib/styleContext.js +0 -29
- package/lib/type.d.ts +0 -8
- package/lib/type.js +0 -15
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +0 -37
package/lib/style.d.ts
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
export namespace style {
|
|
2
|
-
const input: {
|
|
3
|
-
display: string;
|
|
4
|
-
width: string;
|
|
5
|
-
padding: string;
|
|
6
|
-
fontSize: string;
|
|
7
|
-
color: string;
|
|
8
|
-
border: string;
|
|
9
|
-
borderRadius: number;
|
|
10
|
-
"&[readonly]": {
|
|
11
|
-
backgroundColor: string;
|
|
12
|
-
opacity: number;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
const btn: {
|
|
16
|
-
borderRadius: number;
|
|
17
|
-
padding: number;
|
|
18
|
-
fontSize: string;
|
|
19
|
-
cursor: string;
|
|
20
|
-
borderWidth: string;
|
|
21
|
-
backgroundColor: string;
|
|
22
|
-
'&:disabled': {
|
|
23
|
-
opacity: number;
|
|
24
|
-
cursor: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
namespace btn_sm {
|
|
28
|
-
const fontSize: string;
|
|
29
|
-
const padding: string;
|
|
30
|
-
const lineHeight: string;
|
|
31
|
-
const borderRadius: string;
|
|
32
|
-
}
|
|
33
|
-
const btn_group: {
|
|
34
|
-
"& > button:not(:last-child)": {
|
|
35
|
-
borderTopRightRadius: number;
|
|
36
|
-
borderBottomRightRadius: number;
|
|
37
|
-
};
|
|
38
|
-
"& > button:not(:first-child)": {
|
|
39
|
-
borderTopLeftRadius: number;
|
|
40
|
-
borderBottomLeftRadius: number;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
const btn_red: {
|
|
44
|
-
color: any;
|
|
45
|
-
borderColor: any;
|
|
46
|
-
"&:hover": {
|
|
47
|
-
color: string;
|
|
48
|
-
backgroundColor: any;
|
|
49
|
-
borderColor: any;
|
|
50
|
-
};
|
|
51
|
-
"&.active": {
|
|
52
|
-
color: string;
|
|
53
|
-
backgroundColor: any;
|
|
54
|
-
borderColor: any;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
const btn_green: {
|
|
58
|
-
color: any;
|
|
59
|
-
borderColor: any;
|
|
60
|
-
"&:hover": {
|
|
61
|
-
color: string;
|
|
62
|
-
backgroundColor: any;
|
|
63
|
-
borderColor: any;
|
|
64
|
-
};
|
|
65
|
-
"&.active": {
|
|
66
|
-
color: string;
|
|
67
|
-
backgroundColor: any;
|
|
68
|
-
borderColor: any;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
const btn_blue: {
|
|
72
|
-
color: any;
|
|
73
|
-
borderColor: any;
|
|
74
|
-
"&:hover": {
|
|
75
|
-
color: string;
|
|
76
|
-
backgroundColor: any;
|
|
77
|
-
borderColor: any;
|
|
78
|
-
};
|
|
79
|
-
"&.active": {
|
|
80
|
-
color: string;
|
|
81
|
-
backgroundColor: any;
|
|
82
|
-
borderColor: any;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const btn_grey: {
|
|
86
|
-
color: any;
|
|
87
|
-
borderColor: any;
|
|
88
|
-
"&:hover": {
|
|
89
|
-
color: string;
|
|
90
|
-
backgroundColor: any;
|
|
91
|
-
borderColor: any;
|
|
92
|
-
};
|
|
93
|
-
"&.active": {
|
|
94
|
-
color: string;
|
|
95
|
-
backgroundColor: any;
|
|
96
|
-
borderColor: any;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
namespace txt_red {
|
|
100
|
-
const color: string;
|
|
101
|
-
}
|
|
102
|
-
namespace ml_5 {
|
|
103
|
-
const marginLeft: number;
|
|
104
|
-
}
|
|
105
|
-
namespace ml_10 {
|
|
106
|
-
const marginLeft_1: number;
|
|
107
|
-
export { marginLeft_1 as marginLeft };
|
|
108
|
-
}
|
|
109
|
-
namespace mr_5 {
|
|
110
|
-
const marginRight: number;
|
|
111
|
-
}
|
|
112
|
-
namespace mr_10 {
|
|
113
|
-
const marginRight_1: number;
|
|
114
|
-
export { marginRight_1 as marginRight };
|
|
115
|
-
}
|
|
116
|
-
namespace mt_5 {
|
|
117
|
-
const marginTop: number;
|
|
118
|
-
}
|
|
119
|
-
namespace mt_10 {
|
|
120
|
-
const marginTop_1: number;
|
|
121
|
-
export { marginTop_1 as marginTop };
|
|
122
|
-
}
|
|
123
|
-
namespace mt_20 {
|
|
124
|
-
const marginTop_2: number;
|
|
125
|
-
export { marginTop_2 as marginTop };
|
|
126
|
-
}
|
|
127
|
-
namespace mb_5 {
|
|
128
|
-
const marginBottom: number;
|
|
129
|
-
}
|
|
130
|
-
namespace p_15 {
|
|
131
|
-
const padding_1: number;
|
|
132
|
-
export { padding_1 as padding };
|
|
133
|
-
}
|
|
134
|
-
namespace pr_15 {
|
|
135
|
-
const paddingRight: number;
|
|
136
|
-
}
|
|
137
|
-
namespace full_width {
|
|
138
|
-
const width: string;
|
|
139
|
-
}
|
|
140
|
-
namespace d_none {
|
|
141
|
-
const display: string;
|
|
142
|
-
}
|
|
143
|
-
namespace flex {
|
|
144
|
-
const display_1: string;
|
|
145
|
-
export { display_1 as display };
|
|
146
|
-
}
|
|
147
|
-
namespace flexColumn {
|
|
148
|
-
const flexDirection: string;
|
|
149
|
-
}
|
|
150
|
-
namespace justifyContentBetween {
|
|
151
|
-
const justifyContent: string;
|
|
152
|
-
}
|
|
153
|
-
namespace jc_end {
|
|
154
|
-
const justifyContent_1: string;
|
|
155
|
-
export { justifyContent_1 as justifyContent };
|
|
156
|
-
}
|
|
157
|
-
namespace ac_center {
|
|
158
|
-
const alignContent: string;
|
|
159
|
-
}
|
|
160
|
-
namespace ai_center {
|
|
161
|
-
const alignItems: string;
|
|
162
|
-
}
|
|
163
|
-
namespace cursor_pointer {
|
|
164
|
-
const cursor: string;
|
|
165
|
-
}
|
|
166
|
-
namespace cursor_not_allowed {
|
|
167
|
-
const cursor_1: string;
|
|
168
|
-
export { cursor_1 as cursor };
|
|
169
|
-
}
|
|
170
|
-
namespace collapse {
|
|
171
|
-
const display_2: string;
|
|
172
|
-
export { display_2 as display };
|
|
173
|
-
const justifyContent_2: string;
|
|
174
|
-
export { justifyContent_2 as justifyContent };
|
|
175
|
-
const cursor_2: string;
|
|
176
|
-
export { cursor_2 as cursor };
|
|
177
|
-
}
|
|
178
|
-
namespace collapse_label {
|
|
179
|
-
export const fontWeight: string;
|
|
180
|
-
const marginTop_3: number;
|
|
181
|
-
export { marginTop_3 as marginTop };
|
|
182
|
-
}
|
|
183
|
-
namespace collapse_error {
|
|
184
|
-
const color_1: string;
|
|
185
|
-
export { color_1 as color };
|
|
186
|
-
}
|
|
187
|
-
const datepicker: {
|
|
188
|
-
"& input": {
|
|
189
|
-
borderRadius: string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
const code: {};
|
|
193
|
-
namespace input__boolean__on {
|
|
194
|
-
const color_2: string;
|
|
195
|
-
export { color_2 as color };
|
|
196
|
-
}
|
|
197
|
-
namespace input__boolean__off {
|
|
198
|
-
const color_3: string;
|
|
199
|
-
export { color_3 as color };
|
|
200
|
-
}
|
|
201
|
-
namespace input__invalid {
|
|
202
|
-
const borderColor: string;
|
|
203
|
-
}
|
|
204
|
-
namespace invalid_feedback {
|
|
205
|
-
const width_1: string;
|
|
206
|
-
export { width_1 as width };
|
|
207
|
-
const marginTop_4: string;
|
|
208
|
-
export { marginTop_4 as marginTop };
|
|
209
|
-
const fontSize_1: string;
|
|
210
|
-
export { fontSize_1 as fontSize };
|
|
211
|
-
const color_4: string;
|
|
212
|
-
export { color_4 as color };
|
|
213
|
-
}
|
|
214
|
-
namespace display__none {
|
|
215
|
-
const display_3: string;
|
|
216
|
-
export { display_3 as display };
|
|
217
|
-
}
|
|
218
|
-
const collapse__inline: {
|
|
219
|
-
"& .form-group+.form-group": {
|
|
220
|
-
marginLeft: string;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
namespace nestedform__border {
|
|
224
|
-
export const borderLeft: string;
|
|
225
|
-
export const paddingLeft: string;
|
|
226
|
-
const marginBottom_1: string;
|
|
227
|
-
export { marginBottom_1 as marginBottom };
|
|
228
|
-
export const position: string;
|
|
229
|
-
}
|
|
230
|
-
namespace border__error {
|
|
231
|
-
const borderColor_1: string;
|
|
232
|
-
export { borderColor_1 as borderColor };
|
|
233
|
-
}
|
|
234
|
-
}
|
package/lib/style.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.style = void 0;
|
|
7
|
-
|
|
8
|
-
var _style;
|
|
9
|
-
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
|
-
var buttonOutline = function buttonOutline(color, darker) {
|
|
13
|
-
return {
|
|
14
|
-
color: color,
|
|
15
|
-
borderColor: color,
|
|
16
|
-
"&:hover": {
|
|
17
|
-
color: '#fff',
|
|
18
|
-
backgroundColor: color,
|
|
19
|
-
borderColor: darker
|
|
20
|
-
},
|
|
21
|
-
"&.active": {
|
|
22
|
-
color: '#fff',
|
|
23
|
-
backgroundColor: color,
|
|
24
|
-
borderColor: darker
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var style = (_style = {
|
|
30
|
-
input: {
|
|
31
|
-
display: "block",
|
|
32
|
-
width: "100%",
|
|
33
|
-
padding: "8px 12px",
|
|
34
|
-
fontSize: "1rem",
|
|
35
|
-
color: "#495057",
|
|
36
|
-
border: "1px solid #ced4da",
|
|
37
|
-
borderRadius: 4,
|
|
38
|
-
"&[readonly]": {
|
|
39
|
-
backgroundColor: "#e9ecef",
|
|
40
|
-
opacity: 1
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
btn: {
|
|
44
|
-
borderRadius: 5,
|
|
45
|
-
padding: 10,
|
|
46
|
-
fontSize: "1rem",
|
|
47
|
-
cursor: "pointer",
|
|
48
|
-
borderWidth: '1px',
|
|
49
|
-
backgroundColor: '#fff',
|
|
50
|
-
'&:disabled': {
|
|
51
|
-
opacity: .6,
|
|
52
|
-
cursor: 'not-allowed'
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
btn_sm: {
|
|
56
|
-
fontSize: "0.875rem",
|
|
57
|
-
padding: ".25rem .5rem",
|
|
58
|
-
lineHeight: "1.5",
|
|
59
|
-
borderRadius: ".2rem"
|
|
60
|
-
},
|
|
61
|
-
btn_group: {
|
|
62
|
-
"& > button:not(:last-child)": {
|
|
63
|
-
borderTopRightRadius: 0,
|
|
64
|
-
borderBottomRightRadius: 0
|
|
65
|
-
},
|
|
66
|
-
"& > button:not(:first-child)": {
|
|
67
|
-
borderTopLeftRadius: 0,
|
|
68
|
-
borderBottomLeftRadius: 0
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
btn_red: buttonOutline("#dc3545", "#bd2130"),
|
|
72
|
-
btn_green: buttonOutline("#28a745", "#1e7e34"),
|
|
73
|
-
btn_blue: buttonOutline("#007bff", "#0069d9"),
|
|
74
|
-
btn_grey: buttonOutline("#6c757d", "#5c636a"),
|
|
75
|
-
txt_red: {
|
|
76
|
-
color: "#dc3545"
|
|
77
|
-
},
|
|
78
|
-
ml_5: {
|
|
79
|
-
marginLeft: 5
|
|
80
|
-
},
|
|
81
|
-
ml_10: {
|
|
82
|
-
marginLeft: 10
|
|
83
|
-
},
|
|
84
|
-
mr_5: {
|
|
85
|
-
marginRight: 5
|
|
86
|
-
},
|
|
87
|
-
mr_10: {
|
|
88
|
-
marginRight: 10
|
|
89
|
-
},
|
|
90
|
-
mt_5: {
|
|
91
|
-
marginTop: 5
|
|
92
|
-
},
|
|
93
|
-
mt_10: {
|
|
94
|
-
marginTop: 10
|
|
95
|
-
},
|
|
96
|
-
mt_20: {
|
|
97
|
-
marginTop: 20
|
|
98
|
-
},
|
|
99
|
-
mb_5: {
|
|
100
|
-
marginBottom: 5
|
|
101
|
-
},
|
|
102
|
-
p_15: {
|
|
103
|
-
padding: 15
|
|
104
|
-
},
|
|
105
|
-
pr_15: {
|
|
106
|
-
paddingRight: 15
|
|
107
|
-
},
|
|
108
|
-
full_width: {
|
|
109
|
-
width: '100%'
|
|
110
|
-
},
|
|
111
|
-
d_none: {
|
|
112
|
-
display: "none"
|
|
113
|
-
},
|
|
114
|
-
flex: {
|
|
115
|
-
display: "flex"
|
|
116
|
-
},
|
|
117
|
-
flexColumn: {
|
|
118
|
-
flexDirection: "column"
|
|
119
|
-
},
|
|
120
|
-
justifyContentBetween: {
|
|
121
|
-
justifyContent: "space-between"
|
|
122
|
-
},
|
|
123
|
-
jc_end: {
|
|
124
|
-
justifyContent: "end"
|
|
125
|
-
},
|
|
126
|
-
ac_center: {
|
|
127
|
-
alignContent: "center"
|
|
128
|
-
},
|
|
129
|
-
ai_center: {
|
|
130
|
-
alignItems: "center"
|
|
131
|
-
},
|
|
132
|
-
cursor_pointer: {
|
|
133
|
-
cursor: "pointer"
|
|
134
|
-
},
|
|
135
|
-
cursor_not_allowed: {
|
|
136
|
-
cursor: "not-allowed"
|
|
137
|
-
},
|
|
138
|
-
collapse: {
|
|
139
|
-
display: "flex",
|
|
140
|
-
justifyContent: "space-between",
|
|
141
|
-
cursor: "pointer"
|
|
142
|
-
},
|
|
143
|
-
collapse_label: {
|
|
144
|
-
fontWeight: "bold",
|
|
145
|
-
marginTop: 7
|
|
146
|
-
}
|
|
147
|
-
}, _defineProperty(_style, "collapse_label", {
|
|
148
|
-
fontWeight: "bold",
|
|
149
|
-
marginTop: 7
|
|
150
|
-
}), _defineProperty(_style, "collapse_error", {
|
|
151
|
-
color: '#dc3545'
|
|
152
|
-
}), _defineProperty(_style, "datepicker", {
|
|
153
|
-
"& input": {
|
|
154
|
-
borderRadius: "4px"
|
|
155
|
-
}
|
|
156
|
-
}), _defineProperty(_style, "code", {}), _defineProperty(_style, "input__boolean__on", {
|
|
157
|
-
color: "MediumSeaGreen"
|
|
158
|
-
}), _defineProperty(_style, "input__boolean__off", {
|
|
159
|
-
color: "tomato"
|
|
160
|
-
}), _defineProperty(_style, "input__invalid", {
|
|
161
|
-
borderColor: '#dc3545 !important'
|
|
162
|
-
}), _defineProperty(_style, "invalid_feedback", {
|
|
163
|
-
width: "100%",
|
|
164
|
-
marginTop: ".25rem",
|
|
165
|
-
fontSize: "80%",
|
|
166
|
-
color: "#dc3545"
|
|
167
|
-
}), _defineProperty(_style, "display__none", {
|
|
168
|
-
display: "none"
|
|
169
|
-
}), _defineProperty(_style, "collapse__inline", {
|
|
170
|
-
"& .form-group+.form-group": {
|
|
171
|
-
marginLeft: '20px'
|
|
172
|
-
}
|
|
173
|
-
}), _defineProperty(_style, "nestedform__border", {
|
|
174
|
-
borderLeft: '2px solid lightGray',
|
|
175
|
-
paddingLeft: '1rem',
|
|
176
|
-
marginBottom: '.5rem',
|
|
177
|
-
position: 'relative'
|
|
178
|
-
}), _defineProperty(_style, "border__error", {
|
|
179
|
-
borderColor: "#dc3545"
|
|
180
|
-
}), _style);
|
|
181
|
-
exports.style = style;
|
package/lib/styleContext.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function useCustomStyle(overrideStyle?: {}): import("jss").Classes<"code" | "flex" | "input" | "btn" | "btn_sm" | "btn_group" | "btn_red" | "btn_green" | "btn_blue" | "btn_grey" | "txt_red" | "ml_5" | "ml_10" | "mr_5" | "mr_10" | "mt_5" | "mt_10" | "mt_20" | "mb_5" | "p_15" | "pr_15" | "full_width" | "d_none" | "flexColumn" | "justifyContentBetween" | "jc_end" | "ac_center" | "ai_center" | "cursor_pointer" | "cursor_not_allowed" | "collapse" | "collapse_label" | "collapse_error" | "datepicker" | "input__boolean__on" | "input__boolean__off" | "input__invalid" | "invalid_feedback" | "display__none" | "collapse__inline" | "nestedform__border" | "border__error">;
|
package/lib/styleContext.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useCustomStyle = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactJss = require("react-jss");
|
|
11
|
-
|
|
12
|
-
var _style = require("./style");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
|
-
var useCustomStyle = function useCustomStyle() {
|
|
23
|
-
var overrideStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
24
|
-
var useStyle = (0, _reactJss.createUseStyles)(_objectSpread(_objectSpread({}, _style.style), overrideStyle));
|
|
25
|
-
var classes = useStyle();
|
|
26
|
-
return classes;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.useCustomStyle = useCustomStyle;
|
package/lib/type.d.ts
DELETED
package/lib/type.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.type = void 0;
|
|
7
|
-
var type = {
|
|
8
|
-
string: 'string',
|
|
9
|
-
number: 'number',
|
|
10
|
-
bool: 'bool',
|
|
11
|
-
date: 'date',
|
|
12
|
-
object: 'object',
|
|
13
|
-
file: 'file'
|
|
14
|
-
};
|
|
15
|
-
exports.type = type;
|
package/lib/utils.d.ts
DELETED
package/lib/utils.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isPromise = exports.deepEqual = void 0;
|
|
7
|
-
|
|
8
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
9
|
-
|
|
10
|
-
var deepEqual = function deepEqual(a, b) {
|
|
11
|
-
if (a === b) return true;
|
|
12
|
-
if (_typeof(a) !== 'object' || _typeof(b) !== 'object' || a === null || b === null) return false;
|
|
13
|
-
var keysA = Object.keys(a),
|
|
14
|
-
keysB = Object.keys(b);
|
|
15
|
-
if (keysA.length !== keysB.length) return false;
|
|
16
|
-
|
|
17
|
-
for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
|
|
18
|
-
var key = _keysA[_i];
|
|
19
|
-
if (!keysB.includes(key)) return false;
|
|
20
|
-
|
|
21
|
-
if (typeof a[key] === 'function' || typeof b[key] === 'function') {
|
|
22
|
-
if (a[key].toString() !== b[key].toString()) return false;
|
|
23
|
-
} else {
|
|
24
|
-
if (!deepEqual(a[key], b[key])) return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return true;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.deepEqual = deepEqual;
|
|
32
|
-
|
|
33
|
-
var isPromise = function isPromise(value) {
|
|
34
|
-
return Boolean(value && typeof value.then === 'function');
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
exports.isPromise = isPromise;
|