dynamic-mui 0.1.8 → 1.0.0
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 +24 -17
- package/dist-modules/App.js +1 -7
- package/dist-modules/App.test.js +0 -5
- package/dist-modules/components/DynamicComponent.js +1 -10
- package/dist-modules/components/FormGenerator.js +84 -50
- package/dist-modules/components/controls/CheckBox/checkbox.js +24 -31
- package/dist-modules/components/controls/DataTable/datatable.js +6 -15
- package/dist-modules/components/controls/DateTime/datetime.js +27 -35
- package/dist-modules/components/controls/DateTimePicker/datetimepicker.js +27 -35
- package/dist-modules/components/controls/Select/select.js +43 -57
- package/dist-modules/components/controls/Switch/switch.js +30 -40
- package/dist-modules/components/controls/TextField/textfield.js +36 -52
- package/dist-modules/components/controls/TimePicker/timepicker.js +27 -35
- package/dist-modules/components/controls/Typography/typography.js +4 -10
- package/dist-modules/components/controls/index.js +1 -16
- package/dist-modules/config/mui.js +1 -2
- package/dist-modules/data/checkbox.js +11 -5
- package/dist-modules/data/dataTable.js +3 -4
- package/dist-modules/data/dateTime.js +14 -12
- package/dist-modules/data/select.js +6 -6
- package/dist-modules/data/switch.js +11 -6
- package/dist-modules/data/textfield.js +6 -10
- package/dist-modules/index.js +2 -8
- package/dist-modules/reportWebVitals.js +6 -12
- package/dist-modules/util/helper.js +43 -66
- package/dist-modules/util/validation.js +1 -6
- package/docs/asset-manifest.json +7 -7
- package/docs/build/2.7bd877b6.js +2 -0
- package/docs/build/{2.22a7a8d1.js.LICENSE.txt → 2.7bd877b6.js.LICENSE.txt} +32 -46
- package/docs/build/main.728d1f56.js +1 -0
- package/docs/index.html +5 -4
- package/package.json +35 -34
- package/styleguide.config.js +49 -1
- package/themes/index.js +1 -1
- package/dist-modules/components/controls/DateRangePicker/daterangepicker.js +0 -74
- package/docs/build/2.22a7a8d1.js +0 -2
- package/docs/build/main.0638d2dd.js +0 -1
- /package/docs/build/{bundle.483fa668.js → bundle.039d7aef.js} +0 -0
|
@@ -4,25 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = Typography;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
13
|
-
|
|
9
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
/** Typography Component */
|
|
17
12
|
function Typography(_ref) {
|
|
18
13
|
var attributes = _ref.attributes;
|
|
19
14
|
var _attributes$MuiAttrib = attributes.MuiAttributes,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
MuiAttributes = _attributes$MuiAttrib === void 0 ? {} : _attributes$MuiAttrib,
|
|
16
|
+
_attributes$text = attributes.text,
|
|
17
|
+
text = _attributes$text === void 0 ? '' : _attributes$text;
|
|
23
18
|
return /*#__PURE__*/_react.default.createElement(_Typography.default, MuiAttributes, text);
|
|
24
19
|
}
|
|
25
|
-
|
|
26
20
|
Typography.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
27
21
|
/** Attributes for Typography */
|
|
28
22
|
attributes: _propTypes.default.objectOf(_propTypes.default.object)
|
|
@@ -4,40 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _typography = _interopRequireDefault(require("./Typography/typography"));
|
|
9
|
-
|
|
10
8
|
var _textfield = _interopRequireDefault(require("./TextField/textfield"));
|
|
11
|
-
|
|
12
9
|
var _datatable = _interopRequireDefault(require("./DataTable/datatable"));
|
|
13
|
-
|
|
14
10
|
var _datetime = _interopRequireDefault(require("./DateTime/datetime"));
|
|
15
|
-
|
|
16
|
-
var _daterangepicker = _interopRequireDefault(require("./DateRangePicker/daterangepicker"));
|
|
17
|
-
|
|
18
11
|
var _datetimepicker = _interopRequireDefault(require("./DateTimePicker/datetimepicker"));
|
|
19
|
-
|
|
20
12
|
var _timepicker = _interopRequireDefault(require("./TimePicker/timepicker"));
|
|
21
|
-
|
|
22
13
|
var _select = _interopRequireDefault(require("./Select/select"));
|
|
23
|
-
|
|
24
14
|
var _checkbox = _interopRequireDefault(require("./CheckBox/checkbox"));
|
|
25
|
-
|
|
26
15
|
var _switch = _interopRequireDefault(require("./Switch/switch"));
|
|
27
|
-
|
|
28
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
17
|
var Controls = {
|
|
31
18
|
Typography: _typography.default,
|
|
32
19
|
TextField: _textfield.default,
|
|
33
20
|
Table: _datatable.default,
|
|
34
21
|
DateTime: _datetime.default,
|
|
35
|
-
DateRangePicker: _daterangepicker.default,
|
|
36
22
|
DateTimePicker: _datetimepicker.default,
|
|
37
23
|
TimePicker: _timepicker.default,
|
|
38
24
|
Select: _select.default,
|
|
39
25
|
CheckBox: _checkbox.default,
|
|
40
26
|
Switch: _switch.default
|
|
41
27
|
};
|
|
42
|
-
var _default = Controls;
|
|
43
|
-
exports.default = _default;
|
|
28
|
+
var _default = exports.default = Controls;
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.checkBoxCustom = exports.checkBox = void 0;
|
|
7
|
-
var checkBox = [{
|
|
7
|
+
var checkBox = exports.checkBox = [{
|
|
8
8
|
type: 'checkbox',
|
|
9
9
|
props: {
|
|
10
|
+
id: 'defaultChecked',
|
|
10
11
|
MuiAttributes: {
|
|
11
12
|
defaultChecked: true
|
|
12
13
|
},
|
|
@@ -22,6 +23,7 @@ var checkBox = [{
|
|
|
22
23
|
}, {
|
|
23
24
|
type: 'checkbox',
|
|
24
25
|
props: {
|
|
26
|
+
id: 'simple',
|
|
25
27
|
MuiAttributes: {},
|
|
26
28
|
MuiFCLAttributes: {
|
|
27
29
|
label: ''
|
|
@@ -35,6 +37,7 @@ var checkBox = [{
|
|
|
35
37
|
}, {
|
|
36
38
|
type: 'checkbox',
|
|
37
39
|
props: {
|
|
40
|
+
id: 'disabled',
|
|
38
41
|
MuiAttributes: {
|
|
39
42
|
disabled: true
|
|
40
43
|
},
|
|
@@ -50,6 +53,7 @@ var checkBox = [{
|
|
|
50
53
|
}, {
|
|
51
54
|
type: 'checkbox',
|
|
52
55
|
props: {
|
|
56
|
+
id: 'disabledchecked',
|
|
53
57
|
MuiAttributes: {
|
|
54
58
|
disabled: true,
|
|
55
59
|
checked: true
|
|
@@ -64,10 +68,10 @@ var checkBox = [{
|
|
|
64
68
|
sm: 3
|
|
65
69
|
}
|
|
66
70
|
}];
|
|
67
|
-
exports.
|
|
68
|
-
var checkBoxCustom = [{
|
|
71
|
+
var checkBoxCustom = exports.checkBoxCustom = [{
|
|
69
72
|
type: 'checkbox',
|
|
70
73
|
props: {
|
|
74
|
+
id: 'label',
|
|
71
75
|
MuiAttributes: {
|
|
72
76
|
defaultChecked: true
|
|
73
77
|
},
|
|
@@ -83,6 +87,7 @@ var checkBoxCustom = [{
|
|
|
83
87
|
}, {
|
|
84
88
|
type: 'checkbox',
|
|
85
89
|
props: {
|
|
90
|
+
id: 'labelsmall',
|
|
86
91
|
MuiAttributes: {
|
|
87
92
|
size: 'small',
|
|
88
93
|
defaultChecked: true,
|
|
@@ -100,6 +105,7 @@ var checkBoxCustom = [{
|
|
|
100
105
|
}, {
|
|
101
106
|
type: 'checkbox',
|
|
102
107
|
props: {
|
|
108
|
+
id: 'labelcolordefault',
|
|
103
109
|
MuiAttributes: {
|
|
104
110
|
defaultChecked: true,
|
|
105
111
|
color: 'default'
|
|
@@ -116,6 +122,7 @@ var checkBoxCustom = [{
|
|
|
116
122
|
}, {
|
|
117
123
|
type: 'checkbox',
|
|
118
124
|
props: {
|
|
125
|
+
id: 'labelcolorgreen',
|
|
119
126
|
MuiAttributes: {
|
|
120
127
|
defaultChecked: true,
|
|
121
128
|
sx: {
|
|
@@ -134,5 +141,4 @@ var checkBoxCustom = [{
|
|
|
134
141
|
xs: 3,
|
|
135
142
|
sm: 3
|
|
136
143
|
}
|
|
137
|
-
}];
|
|
138
|
-
exports.checkBoxCustom = checkBoxCustom;
|
|
144
|
+
}];
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.denseTable = exports.basicTable = void 0;
|
|
7
|
-
var basicTable = [{
|
|
7
|
+
var basicTable = exports.basicTable = [{
|
|
8
8
|
type: 'datatable',
|
|
9
9
|
props: {
|
|
10
|
+
id: 'datatable',
|
|
10
11
|
container: {
|
|
11
12
|
style: {
|
|
12
13
|
height: 400,
|
|
@@ -86,6 +87,4 @@ var basicTable = [{
|
|
|
86
87
|
md: 12
|
|
87
88
|
}
|
|
88
89
|
}];
|
|
89
|
-
exports.
|
|
90
|
-
var denseTable = [];
|
|
91
|
-
exports.denseTable = denseTable;
|
|
90
|
+
var denseTable = exports.denseTable = [];
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.timePicker = exports.
|
|
7
|
-
var mui = [{
|
|
6
|
+
exports.timePicker = exports.responsiveness = exports.mui = exports.dateTimePicker = exports.dateRange = void 0;
|
|
7
|
+
var mui = exports.mui = [{
|
|
8
8
|
type: 'datetime',
|
|
9
9
|
props: {
|
|
10
|
+
id: 'datetime',
|
|
10
11
|
MuiAttributes: {
|
|
11
12
|
placeholder: 'Standard',
|
|
12
13
|
fullWidth: true,
|
|
@@ -19,10 +20,10 @@ var mui = [{
|
|
|
19
20
|
sm: 4
|
|
20
21
|
}
|
|
21
22
|
}];
|
|
22
|
-
exports.
|
|
23
|
-
var responsiveness = [{
|
|
23
|
+
var responsiveness = exports.responsiveness = [{
|
|
24
24
|
type: 'datetime',
|
|
25
25
|
props: {
|
|
26
|
+
id: 'datetimemobile',
|
|
26
27
|
MuiAttributes: {
|
|
27
28
|
label: 'For mobile',
|
|
28
29
|
fullWidth: true,
|
|
@@ -38,6 +39,7 @@ var responsiveness = [{
|
|
|
38
39
|
}, {
|
|
39
40
|
type: 'datetime',
|
|
40
41
|
props: {
|
|
42
|
+
id: 'datetimestandard',
|
|
41
43
|
MuiAttributes: {
|
|
42
44
|
label: 'For desktop',
|
|
43
45
|
fullWidth: true,
|
|
@@ -53,6 +55,7 @@ var responsiveness = [{
|
|
|
53
55
|
}, {
|
|
54
56
|
type: 'datetime',
|
|
55
57
|
props: {
|
|
58
|
+
id: 'datetimeresponsive',
|
|
56
59
|
MuiAttributes: {
|
|
57
60
|
label: 'Responsive',
|
|
58
61
|
fullWidth: true,
|
|
@@ -68,10 +71,10 @@ var responsiveness = [{
|
|
|
68
71
|
sm: 4
|
|
69
72
|
}
|
|
70
73
|
}];
|
|
71
|
-
exports.
|
|
72
|
-
var dateRange = [{
|
|
74
|
+
var dateRange = exports.dateRange = [{
|
|
73
75
|
type: 'daterangepicker',
|
|
74
76
|
props: {
|
|
77
|
+
id: 'daterangepicker',
|
|
75
78
|
MuiAttributes: {
|
|
76
79
|
fullWidth: true,
|
|
77
80
|
variant: 'standard',
|
|
@@ -85,10 +88,10 @@ var dateRange = [{
|
|
|
85
88
|
sm: 12
|
|
86
89
|
}
|
|
87
90
|
}];
|
|
88
|
-
exports.
|
|
89
|
-
var dateTimePicker = [{
|
|
91
|
+
var dateTimePicker = exports.dateTimePicker = [{
|
|
90
92
|
type: 'datetimepicker',
|
|
91
93
|
props: {
|
|
94
|
+
id: 'datetimepicker',
|
|
92
95
|
MuiAttributes: {
|
|
93
96
|
label: 'Standard',
|
|
94
97
|
fullWidth: true,
|
|
@@ -101,10 +104,10 @@ var dateTimePicker = [{
|
|
|
101
104
|
sm: 12
|
|
102
105
|
}
|
|
103
106
|
}];
|
|
104
|
-
exports.
|
|
105
|
-
var timePicker = [{
|
|
107
|
+
var timePicker = exports.timePicker = [{
|
|
106
108
|
type: 'timepicker',
|
|
107
109
|
props: {
|
|
110
|
+
id: 'timepicker',
|
|
108
111
|
MuiAttributes: {
|
|
109
112
|
label: 'Standard',
|
|
110
113
|
fullWidth: true,
|
|
@@ -116,5 +119,4 @@ var timePicker = [{
|
|
|
116
119
|
xs: 12,
|
|
117
120
|
sm: 12
|
|
118
121
|
}
|
|
119
|
-
}];
|
|
120
|
-
exports.timePicker = timePicker;
|
|
122
|
+
}];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.select = exports.multiSelect = void 0;
|
|
7
7
|
var options = [{
|
|
8
8
|
value: 'ocean',
|
|
9
9
|
label: 'Ocean',
|
|
@@ -46,9 +46,10 @@ var options = [{
|
|
|
46
46
|
label: 'Silver',
|
|
47
47
|
color: '#666666'
|
|
48
48
|
}];
|
|
49
|
-
var select = [{
|
|
49
|
+
var select = exports.select = [{
|
|
50
50
|
type: 'select',
|
|
51
51
|
props: {
|
|
52
|
+
id: 'simpleselect',
|
|
52
53
|
MuiAttributes: {},
|
|
53
54
|
options: options,
|
|
54
55
|
MuiBoxAttributes: {
|
|
@@ -61,10 +62,10 @@ var select = [{
|
|
|
61
62
|
sm: 12
|
|
62
63
|
}
|
|
63
64
|
}];
|
|
64
|
-
exports.
|
|
65
|
-
var multiSelect = [{
|
|
65
|
+
var multiSelect = exports.multiSelect = [{
|
|
66
66
|
type: 'select',
|
|
67
67
|
props: {
|
|
68
|
+
id: 'multiselect',
|
|
68
69
|
MuiAttributes: {
|
|
69
70
|
multiple: true,
|
|
70
71
|
disableCloseOnSelect: true
|
|
@@ -79,5 +80,4 @@ var multiSelect = [{
|
|
|
79
80
|
xs: 12,
|
|
80
81
|
sm: 12
|
|
81
82
|
}
|
|
82
|
-
}];
|
|
83
|
-
exports.multiSelect = multiSelect;
|
|
83
|
+
}];
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var switchData = [{
|
|
6
|
+
exports.switchData = exports.switchCustom = void 0;
|
|
7
|
+
var switchData = exports.switchData = [{
|
|
8
8
|
type: 'switch',
|
|
9
9
|
props: {
|
|
10
|
+
id: 'switchdefault',
|
|
10
11
|
MuiAttributes: {
|
|
11
12
|
defaultChecked: true
|
|
12
13
|
},
|
|
@@ -22,6 +23,7 @@ var switchData = [{
|
|
|
22
23
|
}, {
|
|
23
24
|
type: 'switch',
|
|
24
25
|
props: {
|
|
26
|
+
id: 'switch',
|
|
25
27
|
MuiAttributes: {},
|
|
26
28
|
MuiFCLAttributes: {
|
|
27
29
|
label: ''
|
|
@@ -35,6 +37,7 @@ var switchData = [{
|
|
|
35
37
|
}, {
|
|
36
38
|
type: 'switch',
|
|
37
39
|
props: {
|
|
40
|
+
id: 'switchdisabled',
|
|
38
41
|
MuiAttributes: {
|
|
39
42
|
disabled: true
|
|
40
43
|
},
|
|
@@ -50,6 +53,7 @@ var switchData = [{
|
|
|
50
53
|
}, {
|
|
51
54
|
type: 'switch',
|
|
52
55
|
props: {
|
|
56
|
+
id: 'switchdisabledchecked',
|
|
53
57
|
MuiAttributes: {
|
|
54
58
|
disabled: true,
|
|
55
59
|
checked: true
|
|
@@ -64,10 +68,10 @@ var switchData = [{
|
|
|
64
68
|
sm: 3
|
|
65
69
|
}
|
|
66
70
|
}];
|
|
67
|
-
exports.
|
|
68
|
-
var switchCustom = [{
|
|
71
|
+
var switchCustom = exports.switchCustom = [{
|
|
69
72
|
type: 'switch',
|
|
70
73
|
props: {
|
|
74
|
+
id: 'switchlabel',
|
|
71
75
|
MuiAttributes: {
|
|
72
76
|
defaultChecked: true
|
|
73
77
|
},
|
|
@@ -83,6 +87,7 @@ var switchCustom = [{
|
|
|
83
87
|
}, {
|
|
84
88
|
type: 'switch',
|
|
85
89
|
props: {
|
|
90
|
+
id: 'switchlabelsmall',
|
|
86
91
|
MuiAttributes: {
|
|
87
92
|
size: 'small',
|
|
88
93
|
defaultChecked: true,
|
|
@@ -100,6 +105,7 @@ var switchCustom = [{
|
|
|
100
105
|
}, {
|
|
101
106
|
type: 'switch',
|
|
102
107
|
props: {
|
|
108
|
+
id: 'switchlabelcolor',
|
|
103
109
|
MuiAttributes: {
|
|
104
110
|
defaultChecked: true,
|
|
105
111
|
color: 'default'
|
|
@@ -113,5 +119,4 @@ var switchCustom = [{
|
|
|
113
119
|
xs: 4,
|
|
114
120
|
sm: 4
|
|
115
121
|
}
|
|
116
|
-
}];
|
|
117
|
-
exports.switchCustom = switchCustom;
|
|
122
|
+
}];
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var mui = [{
|
|
6
|
+
exports.validation = exports.sizesAndLayout = exports.mui = exports.inputAdornment = void 0;
|
|
7
|
+
var mui = exports.mui = [{
|
|
8
8
|
type: 'textfield',
|
|
9
9
|
props: {
|
|
10
10
|
MuiAttributes: {
|
|
@@ -47,8 +47,7 @@ var mui = [{
|
|
|
47
47
|
sm: 4
|
|
48
48
|
}
|
|
49
49
|
}];
|
|
50
|
-
exports.
|
|
51
|
-
var validation = [{
|
|
50
|
+
var validation = exports.validation = [{
|
|
52
51
|
type: 'textfield',
|
|
53
52
|
props: {
|
|
54
53
|
MuiAttributes: {
|
|
@@ -118,8 +117,7 @@ var validation = [{
|
|
|
118
117
|
format: '$0,0.00'
|
|
119
118
|
}
|
|
120
119
|
}];
|
|
121
|
-
exports.
|
|
122
|
-
var inputAdornment = [{
|
|
120
|
+
var inputAdornment = exports.inputAdornment = [{
|
|
123
121
|
id: 'firstname',
|
|
124
122
|
type: 'textfield',
|
|
125
123
|
props: {
|
|
@@ -177,8 +175,7 @@ var inputAdornment = [{
|
|
|
177
175
|
sm: 6
|
|
178
176
|
}
|
|
179
177
|
}];
|
|
180
|
-
exports.
|
|
181
|
-
var sizesAndLayout = [{
|
|
178
|
+
var sizesAndLayout = exports.sizesAndLayout = [{
|
|
182
179
|
id: 'textfieldoutlined',
|
|
183
180
|
type: 'textfield',
|
|
184
181
|
props: {
|
|
@@ -240,5 +237,4 @@ var sizesAndLayout = [{
|
|
|
240
237
|
xs: 12,
|
|
241
238
|
sm: 12
|
|
242
239
|
}
|
|
243
|
-
}];
|
|
244
|
-
exports.sizesAndLayout = sizesAndLayout;
|
|
240
|
+
}];
|
package/dist-modules/index.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
|
-
|
|
5
4
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
6
|
-
|
|
7
5
|
require("./index.css");
|
|
8
|
-
|
|
9
6
|
var _App = _interopRequireDefault(require("./App"));
|
|
10
|
-
|
|
11
7
|
var _reportWebVitals = _interopRequireDefault(require("./reportWebVitals"));
|
|
12
|
-
|
|
13
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_react.default.StrictMode, null, /*#__PURE__*/_react.default.createElement(_App.default, null)), document.getElementById('root'));
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
// If you want to start measuring performance in your app, pass a function
|
|
16
12
|
// to log results (for example: reportWebVitals(console.log))
|
|
17
13
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
18
|
-
|
|
19
|
-
|
|
20
14
|
(0, _reportWebVitals.default)();
|
|
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = 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
|
-
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
8
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
|
|
12
9
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
14
10
|
var reportWebVitals = function reportWebVitals(onPerfEntry) {
|
|
15
11
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
16
12
|
Promise.resolve().then(function () {
|
|
17
13
|
return _interopRequireWildcard(require('web-vitals'));
|
|
18
14
|
}).then(function (_ref) {
|
|
19
15
|
var getCLS = _ref.getCLS,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
getFID = _ref.getFID,
|
|
17
|
+
getFCP = _ref.getFCP,
|
|
18
|
+
getLCP = _ref.getLCP,
|
|
19
|
+
getTTFB = _ref.getTTFB;
|
|
24
20
|
getCLS(onPerfEntry);
|
|
25
21
|
getFID(onPerfEntry);
|
|
26
22
|
getFCP(onPerfEntry);
|
|
@@ -29,6 +25,4 @@ var reportWebVitals = function reportWebVitals(onPerfEntry) {
|
|
|
29
25
|
});
|
|
30
26
|
}
|
|
31
27
|
};
|
|
32
|
-
|
|
33
|
-
var _default = reportWebVitals;
|
|
34
|
-
exports.default = _default;
|
|
28
|
+
var _default = exports.default = reportWebVitals;
|
|
@@ -3,42 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.generateKey = exports.default = exports.checkboxSX = exports.DateComponent = void 0;
|
|
6
7
|
exports.generateLayout = generateLayout;
|
|
7
8
|
exports.getInputProps = getInputProps;
|
|
8
|
-
exports.
|
|
9
|
-
|
|
9
|
+
exports.updatePatchData = void 0;
|
|
10
10
|
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
11
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _lab = require("@material-ui/lab");
|
|
17
|
-
|
|
12
|
+
var _material = require("@mui/material");
|
|
13
|
+
var _xDatePickers = require("@mui/x-date-pickers");
|
|
18
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
function ownKeys(
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
15
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
21
|
var response = {};
|
|
27
|
-
|
|
28
22
|
function generateLayout(data) {
|
|
29
23
|
var layout = {
|
|
30
24
|
wrows: [],
|
|
31
25
|
worows: []
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var wrows = (0, _lodash.clone)(data);
|
|
35
|
-
|
|
26
|
+
};
|
|
27
|
+
// All Items
|
|
28
|
+
var wrows = (0, _lodash.clone)(data);
|
|
29
|
+
// Remove Without Rows
|
|
36
30
|
layout.worows = (0, _lodash.remove)(wrows, function (item) {
|
|
37
31
|
var isLayout = item.layout ? item.layout.row : item.layout;
|
|
38
32
|
return isLayout === undefined;
|
|
39
33
|
}); // Concat all items without rows
|
|
40
|
-
// All row indices
|
|
41
34
|
|
|
35
|
+
// All row indices
|
|
42
36
|
var rowIndex = (0, _lodash.map)(wrows, 'layout.row');
|
|
43
37
|
var uniqIndex = (0, _lodash.uniq)(rowIndex);
|
|
44
38
|
var sortedIndex = (0, _lodash.sortBy)(uniqIndex);
|
|
@@ -55,70 +49,56 @@ function generateLayout(data) {
|
|
|
55
49
|
});
|
|
56
50
|
return layout;
|
|
57
51
|
}
|
|
58
|
-
|
|
59
52
|
function getInputProps(InputProps) {
|
|
60
53
|
if (!(0, _isEmpty.default)(InputProps)) {
|
|
61
54
|
var _InputProps$MuiInputA = InputProps.MuiInputAdornment,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return _defineProperty({}, "".concat(position, "Adornment"), /*#__PURE__*/React.createElement(
|
|
55
|
+
MuiInputAdornment = _InputProps$MuiInputA === void 0 ? {} : _InputProps$MuiInputA,
|
|
56
|
+
_InputProps$position = InputProps.position,
|
|
57
|
+
position = _InputProps$position === void 0 ? 'start' : _InputProps$position,
|
|
58
|
+
icon = InputProps.icon,
|
|
59
|
+
text = InputProps.text,
|
|
60
|
+
_InputProps$textstyle = InputProps.textstyle,
|
|
61
|
+
textstyle = _InputProps$textstyle === void 0 ? {} : _InputProps$textstyle;
|
|
62
|
+
return _defineProperty({}, "".concat(position, "Adornment"), /*#__PURE__*/React.createElement(_material.InputAdornment, MuiInputAdornment, icon && /*#__PURE__*/React.createElement(_material.Icon, null, icon), !(0, _isEmpty.default)(textstyle) ? /*#__PURE__*/React.createElement("div", {
|
|
70
63
|
style: textstyle
|
|
71
64
|
}, text || '') : text || ''));
|
|
72
65
|
}
|
|
73
|
-
|
|
74
66
|
return {};
|
|
75
67
|
}
|
|
76
|
-
|
|
77
|
-
var generateKey = function generateKey() {
|
|
68
|
+
var generateKey = exports.generateKey = function generateKey() {
|
|
78
69
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
79
70
|
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
80
71
|
var random = Math.random().toString(36).substr(2, 9);
|
|
81
72
|
var currentTime = new Date().toLocaleTimeString('en').trim();
|
|
82
73
|
return "".concat(prefix, "_").concat(index, "_").concat(random, "_").concat(currentTime);
|
|
83
74
|
};
|
|
84
|
-
|
|
85
|
-
exports.generateKey = generateKey;
|
|
86
|
-
|
|
87
|
-
var updatePatchData = function updatePatchData(fields, patch, guid) {
|
|
75
|
+
var updatePatchData = exports.updatePatchData = function updatePatchData(fields, patch, guid) {
|
|
88
76
|
response[guid] = patch;
|
|
89
|
-
var formData = Object.assign([], fields);
|
|
90
|
-
|
|
77
|
+
var formData = Object.assign([], fields);
|
|
78
|
+
// if (isEmpty(patch)) return fields;
|
|
91
79
|
return (0, _lodash.map)(formData, function (field) {
|
|
92
80
|
var newField = _objectSpread({}, field);
|
|
93
|
-
|
|
94
81
|
if (newField.id && response[guid][field.id]) {
|
|
95
82
|
newField.props.value = response[guid][field.id] || '';
|
|
96
83
|
}
|
|
97
|
-
|
|
98
84
|
return newField;
|
|
99
85
|
});
|
|
100
86
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (name === '
|
|
106
|
-
if (name === '
|
|
107
|
-
if (name === '
|
|
108
|
-
if (name === '
|
|
109
|
-
if (name === '
|
|
110
|
-
if (name === '
|
|
111
|
-
if (name === '
|
|
112
|
-
if (name === '
|
|
113
|
-
|
|
114
|
-
if (name === 'MobileTimePicker') return _lab.MobileTimePicker;
|
|
115
|
-
if (name === 'DesktopTimePicker') return _lab.DesktopTimePicker;
|
|
116
|
-
return _lab.DatePicker;
|
|
87
|
+
var DateComponent = exports.DateComponent = function DateComponent(name) {
|
|
88
|
+
if (name === 'MobileDatePicker') return _xDatePickers.MobileDatePicker;
|
|
89
|
+
if (name === 'DesktopDatePicker') return _xDatePickers.DesktopDatePicker;
|
|
90
|
+
// if (name === 'DateRangePicker') return DateRangePicker;
|
|
91
|
+
// if (name === 'MobileDateRangePicker') return MobileDateRangePicker;
|
|
92
|
+
// if (name === 'DesktopDateRangePicker') return DesktopDateRangePicker;
|
|
93
|
+
if (name === 'DateTimePicker') return _xDatePickers.DateTimePicker;
|
|
94
|
+
if (name === 'MobileDateTimePicker') return _xDatePickers.MobileDateTimePicker;
|
|
95
|
+
if (name === 'DesktopDateTimePicker') return _xDatePickers.DesktopDateTimePicker;
|
|
96
|
+
if (name === 'TimePicker') return _xDatePickers.TimePicker;
|
|
97
|
+
if (name === 'MobileTimePicker') return _xDatePickers.MobileTimePicker;
|
|
98
|
+
if (name === 'DesktopTimePicker') return _xDatePickers.DesktopTimePicker;
|
|
99
|
+
return _xDatePickers.DatePicker;
|
|
117
100
|
};
|
|
118
|
-
|
|
119
|
-
exports.DateComponent = DateComponent;
|
|
120
|
-
|
|
121
|
-
var checkboxSX = function checkboxSX(color) {
|
|
101
|
+
var checkboxSX = exports.checkboxSX = function checkboxSX(color) {
|
|
122
102
|
if (color) return {
|
|
123
103
|
color: color,
|
|
124
104
|
'&.Mui-checked': {
|
|
@@ -127,14 +107,11 @@ var checkboxSX = function checkboxSX(color) {
|
|
|
127
107
|
};
|
|
128
108
|
return {};
|
|
129
109
|
};
|
|
130
|
-
|
|
131
|
-
exports.checkboxSX = checkboxSX;
|
|
132
|
-
var _default = {
|
|
110
|
+
var _default = exports.default = {
|
|
133
111
|
generateLayout: generateLayout,
|
|
134
112
|
getInputProps: getInputProps,
|
|
135
113
|
generateKey: generateKey,
|
|
136
114
|
updatePatchData: updatePatchData,
|
|
137
115
|
DateComponent: DateComponent,
|
|
138
116
|
checkboxSX: checkboxSX
|
|
139
|
-
};
|
|
140
|
-
exports.default = _default;
|
|
117
|
+
};
|