dynamic-mui 0.1.7 → 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 +60 -0
- 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 +92 -0
- 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 +7 -16
- package/dist-modules/components/controls/index.js +6 -15
- package/dist-modules/config/mui.js +9 -2
- package/dist-modules/data/checkbox.js +144 -0
- 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 +122 -0
- 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.c9f4fc23.js.LICENSE.txt → 2.7bd877b6.js.LICENSE.txt} +34 -42
- 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.c9f4fc23.js +0 -2
- package/docs/build/main.992274eb.js +0 -1
- /package/docs/build/{bundle.483fa668.js → bundle.039d7aef.js} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.checkBoxCustom = exports.checkBox = void 0;
|
|
7
|
+
var checkBox = exports.checkBox = [{
|
|
8
|
+
type: 'checkbox',
|
|
9
|
+
props: {
|
|
10
|
+
id: 'defaultChecked',
|
|
11
|
+
MuiAttributes: {
|
|
12
|
+
defaultChecked: true
|
|
13
|
+
},
|
|
14
|
+
MuiFCLAttributes: {
|
|
15
|
+
label: ''
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
layout: {
|
|
19
|
+
row: 1,
|
|
20
|
+
xs: 3,
|
|
21
|
+
sm: 3
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
type: 'checkbox',
|
|
25
|
+
props: {
|
|
26
|
+
id: 'simple',
|
|
27
|
+
MuiAttributes: {},
|
|
28
|
+
MuiFCLAttributes: {
|
|
29
|
+
label: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
layout: {
|
|
33
|
+
row: 1,
|
|
34
|
+
xs: 3,
|
|
35
|
+
sm: 3
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
type: 'checkbox',
|
|
39
|
+
props: {
|
|
40
|
+
id: 'disabled',
|
|
41
|
+
MuiAttributes: {
|
|
42
|
+
disabled: true
|
|
43
|
+
},
|
|
44
|
+
MuiFCLAttributes: {
|
|
45
|
+
label: ''
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
layout: {
|
|
49
|
+
row: 1,
|
|
50
|
+
xs: 3,
|
|
51
|
+
sm: 3
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
type: 'checkbox',
|
|
55
|
+
props: {
|
|
56
|
+
id: 'disabledchecked',
|
|
57
|
+
MuiAttributes: {
|
|
58
|
+
disabled: true,
|
|
59
|
+
checked: true
|
|
60
|
+
},
|
|
61
|
+
MuiFCLAttributes: {
|
|
62
|
+
label: ''
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
layout: {
|
|
66
|
+
row: 1,
|
|
67
|
+
xs: 3,
|
|
68
|
+
sm: 3
|
|
69
|
+
}
|
|
70
|
+
}];
|
|
71
|
+
var checkBoxCustom = exports.checkBoxCustom = [{
|
|
72
|
+
type: 'checkbox',
|
|
73
|
+
props: {
|
|
74
|
+
id: 'label',
|
|
75
|
+
MuiAttributes: {
|
|
76
|
+
defaultChecked: true
|
|
77
|
+
},
|
|
78
|
+
MuiFCLAttributes: {
|
|
79
|
+
label: 'Label'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
layout: {
|
|
83
|
+
row: 1,
|
|
84
|
+
xs: 3,
|
|
85
|
+
sm: 3
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
type: 'checkbox',
|
|
89
|
+
props: {
|
|
90
|
+
id: 'labelsmall',
|
|
91
|
+
MuiAttributes: {
|
|
92
|
+
size: 'small',
|
|
93
|
+
defaultChecked: true,
|
|
94
|
+
color: 'secondary'
|
|
95
|
+
},
|
|
96
|
+
MuiFCLAttributes: {
|
|
97
|
+
label: 'Label'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
layout: {
|
|
101
|
+
row: 1,
|
|
102
|
+
xs: 3,
|
|
103
|
+
sm: 3
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
type: 'checkbox',
|
|
107
|
+
props: {
|
|
108
|
+
id: 'labelcolordefault',
|
|
109
|
+
MuiAttributes: {
|
|
110
|
+
defaultChecked: true,
|
|
111
|
+
color: 'default'
|
|
112
|
+
},
|
|
113
|
+
MuiFCLAttributes: {
|
|
114
|
+
label: 'Label'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
layout: {
|
|
118
|
+
row: 1,
|
|
119
|
+
xs: 3,
|
|
120
|
+
sm: 3
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
type: 'checkbox',
|
|
124
|
+
props: {
|
|
125
|
+
id: 'labelcolorgreen',
|
|
126
|
+
MuiAttributes: {
|
|
127
|
+
defaultChecked: true,
|
|
128
|
+
sx: {
|
|
129
|
+
color: 'green',
|
|
130
|
+
'&.Mui-checked': {
|
|
131
|
+
color: 'green'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
MuiFCLAttributes: {
|
|
136
|
+
label: 'Label'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
layout: {
|
|
140
|
+
row: 1,
|
|
141
|
+
xs: 3,
|
|
142
|
+
sm: 3
|
|
143
|
+
}
|
|
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
|
+
}];
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.switchData = exports.switchCustom = void 0;
|
|
7
|
+
var switchData = exports.switchData = [{
|
|
8
|
+
type: 'switch',
|
|
9
|
+
props: {
|
|
10
|
+
id: 'switchdefault',
|
|
11
|
+
MuiAttributes: {
|
|
12
|
+
defaultChecked: true
|
|
13
|
+
},
|
|
14
|
+
MuiFCLAttributes: {
|
|
15
|
+
label: ''
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
layout: {
|
|
19
|
+
row: 1,
|
|
20
|
+
xs: 3,
|
|
21
|
+
sm: 3
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
type: 'switch',
|
|
25
|
+
props: {
|
|
26
|
+
id: 'switch',
|
|
27
|
+
MuiAttributes: {},
|
|
28
|
+
MuiFCLAttributes: {
|
|
29
|
+
label: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
layout: {
|
|
33
|
+
row: 1,
|
|
34
|
+
xs: 3,
|
|
35
|
+
sm: 3
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
type: 'switch',
|
|
39
|
+
props: {
|
|
40
|
+
id: 'switchdisabled',
|
|
41
|
+
MuiAttributes: {
|
|
42
|
+
disabled: true
|
|
43
|
+
},
|
|
44
|
+
MuiFCLAttributes: {
|
|
45
|
+
label: ''
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
layout: {
|
|
49
|
+
row: 1,
|
|
50
|
+
xs: 3,
|
|
51
|
+
sm: 3
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
type: 'switch',
|
|
55
|
+
props: {
|
|
56
|
+
id: 'switchdisabledchecked',
|
|
57
|
+
MuiAttributes: {
|
|
58
|
+
disabled: true,
|
|
59
|
+
checked: true
|
|
60
|
+
},
|
|
61
|
+
MuiFCLAttributes: {
|
|
62
|
+
label: ''
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
layout: {
|
|
66
|
+
row: 1,
|
|
67
|
+
xs: 3,
|
|
68
|
+
sm: 3
|
|
69
|
+
}
|
|
70
|
+
}];
|
|
71
|
+
var switchCustom = exports.switchCustom = [{
|
|
72
|
+
type: 'switch',
|
|
73
|
+
props: {
|
|
74
|
+
id: 'switchlabel',
|
|
75
|
+
MuiAttributes: {
|
|
76
|
+
defaultChecked: true
|
|
77
|
+
},
|
|
78
|
+
MuiFCLAttributes: {
|
|
79
|
+
label: 'Label'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
layout: {
|
|
83
|
+
row: 1,
|
|
84
|
+
xs: 4,
|
|
85
|
+
sm: 4
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
type: 'switch',
|
|
89
|
+
props: {
|
|
90
|
+
id: 'switchlabelsmall',
|
|
91
|
+
MuiAttributes: {
|
|
92
|
+
size: 'small',
|
|
93
|
+
defaultChecked: true,
|
|
94
|
+
color: 'secondary'
|
|
95
|
+
},
|
|
96
|
+
MuiFCLAttributes: {
|
|
97
|
+
label: 'Label'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
layout: {
|
|
101
|
+
row: 1,
|
|
102
|
+
xs: 4,
|
|
103
|
+
sm: 4
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
type: 'switch',
|
|
107
|
+
props: {
|
|
108
|
+
id: 'switchlabelcolor',
|
|
109
|
+
MuiAttributes: {
|
|
110
|
+
defaultChecked: true,
|
|
111
|
+
color: 'default'
|
|
112
|
+
},
|
|
113
|
+
MuiFCLAttributes: {
|
|
114
|
+
label: 'Label'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
layout: {
|
|
118
|
+
row: 1,
|
|
119
|
+
xs: 4,
|
|
120
|
+
sm: 4
|
|
121
|
+
}
|
|
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;
|