dynamic-mui 1.1.4 → 2.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.
Files changed (108) hide show
  1. package/README.md +20 -5
  2. package/dist/components/DynamicComponent.d.ts +13 -0
  3. package/dist/components/FormGenerator.d.ts +38 -0
  4. package/dist/components/charts/Bar/bar.d.ts +3 -0
  5. package/dist/components/charts/Line/line.d.ts +3 -0
  6. package/dist/components/charts/Mixchart/mixChart.d.ts +3 -0
  7. package/dist/components/charts/Pie/pie.d.ts +3 -0
  8. package/dist/components/controls/Accordion/accordion.d.ts +3 -0
  9. package/dist/components/controls/Autocomplete/autocomplete.d.ts +3 -0
  10. package/dist/components/controls/CheckBox/checkbox.d.ts +4 -0
  11. package/dist/components/controls/Chip/chip.d.ts +3 -0
  12. package/dist/components/controls/DataTable/datatable.d.ts +3 -0
  13. package/dist/components/controls/DateTime/datetime.d.ts +3 -0
  14. package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +3 -0
  15. package/dist/components/controls/Divider/divider.d.ts +3 -0
  16. package/dist/components/controls/Group/group.d.ts +3 -0
  17. package/dist/components/controls/ImageList/imagelist.d.ts +3 -0
  18. package/dist/components/controls/List/list.d.ts +3 -0
  19. package/dist/components/controls/MultiTextbox/multitextbox.d.ts +3 -0
  20. package/dist/components/controls/NumberField/numberfield.d.ts +3 -0
  21. package/dist/components/controls/Radio/radio.d.ts +4 -0
  22. package/dist/components/controls/Select/select.d.ts +3 -0
  23. package/dist/components/controls/Signature/signature.d.ts +3 -0
  24. package/dist/components/controls/Stepper/stepper.d.ts +9 -0
  25. package/dist/components/controls/Switch/switch.d.ts +4 -0
  26. package/dist/components/controls/Tabs/tabs.d.ts +3 -0
  27. package/dist/components/controls/TextField/textfield.d.ts +3 -0
  28. package/dist/components/controls/TimePicker/timepicker.d.ts +3 -0
  29. package/dist/components/controls/Typography/typography.d.ts +4 -0
  30. package/dist/components/controls/index.d.ts +56 -0
  31. package/dist/config/mui.d.ts +8 -0
  32. package/dist/dynamic-mui.cjs.js +496 -0
  33. package/dist/dynamic-mui.es.js +82175 -0
  34. package/dist/index.d.ts +5 -0
  35. package/dist/main.d.ts +1 -0
  36. package/dist/playground/Builder.d.ts +1 -0
  37. package/dist/playground/Canvas.d.ts +10 -0
  38. package/dist/playground/PropertiesEditor.d.ts +11 -0
  39. package/dist/playground/Sidebar.d.ts +1 -0
  40. package/dist/playground/documentation.d.ts +6 -0
  41. package/dist/playground/templates.d.ts +8 -0
  42. package/dist/playground/testData.d.ts +3 -0
  43. package/dist/test/setup.d.ts +1 -0
  44. package/dist/theme/theme.d.ts +1 -0
  45. package/dist/types.d.ts +19 -0
  46. package/dist/util/helper.d.ts +61 -0
  47. package/dist/util/stepperComponents.d.ts +6 -0
  48. package/dist/util/useIsFirstRender.d.ts +1 -0
  49. package/dist/util/useUpdateEffect.d.ts +3 -0
  50. package/dist/util/validation.d.ts +6 -0
  51. package/package.json +68 -54
  52. package/build/asset-manifest.json +0 -10
  53. package/build/favicon.ico +0 -0
  54. package/build/index.html +0 -1
  55. package/build/logo192.png +0 -0
  56. package/build/logo512.png +0 -0
  57. package/build/manifest.json +0 -25
  58. package/build/robots.txt +0 -3
  59. package/build/static/js/main.11a67c51.js +0 -3
  60. package/build/static/js/main.11a67c51.js.LICENSE.txt +0 -85
  61. package/build/static/js/main.11a67c51.js.map +0 -1
  62. package/craco.config.js +0 -34
  63. package/dist-modules/components/DynamicComponent.js +0 -22
  64. package/dist-modules/components/FormGenerator.js +0 -200
  65. package/dist-modules/components/charts/Bar/bar.js +0 -31
  66. package/dist-modules/components/charts/Line/line.js +0 -31
  67. package/dist-modules/components/charts/Mixchart/mixChart.js +0 -59
  68. package/dist-modules/components/charts/Pie/pie.js +0 -31
  69. package/dist-modules/components/controls/CheckBox/checkbox.js +0 -56
  70. package/dist-modules/components/controls/DataTable/datatable.js +0 -28
  71. package/dist-modules/components/controls/DateTime/datetime.js +0 -53
  72. package/dist-modules/components/controls/DateTimePicker/datetimepicker.js +0 -53
  73. package/dist-modules/components/controls/Radio/radio.js +0 -88
  74. package/dist-modules/components/controls/Select/select.js +0 -173
  75. package/dist-modules/components/controls/Stepper/stepper.js +0 -192
  76. package/dist-modules/components/controls/Switch/switch.js +0 -85
  77. package/dist-modules/components/controls/TextField/textfield.js +0 -148
  78. package/dist-modules/components/controls/TimePicker/timepicker.js +0 -53
  79. package/dist-modules/components/controls/Typography/typography.js +0 -43
  80. package/dist-modules/components/controls/index.js +0 -42
  81. package/dist-modules/config/mui.js +0 -73
  82. package/dist-modules/data/checkbox.js +0 -143
  83. package/dist-modules/data/dataTable.js +0 -90
  84. package/dist-modules/data/dateTime.js +0 -136
  85. package/dist-modules/data/radio.js +0 -36
  86. package/dist-modules/data/select.js +0 -126
  87. package/dist-modules/data/stepper.js +0 -237
  88. package/dist-modules/data/switch.js +0 -123
  89. package/dist-modules/data/textfield.js +0 -240
  90. package/dist-modules/index.js +0 -16
  91. package/dist-modules/util/helper.js +0 -226
  92. package/dist-modules/util/stepperComponents.js +0 -40
  93. package/dist-modules/util/useIsFirstRender.js +0 -15
  94. package/dist-modules/util/useUpdateEffect.js +0 -19
  95. package/dist-modules/util/validation.js +0 -102
  96. package/docs/asset-manifest.json +0 -9
  97. package/docs/build/bundle.1eab2706.js +0 -2
  98. package/docs/build/bundle.1eab2706.js.LICENSE.txt +0 -153
  99. package/docs/index.html +0 -16
  100. package/public/favicon.ico +0 -0
  101. package/public/index.html +0 -43
  102. package/public/logo192.png +0 -0
  103. package/public/logo512.png +0 -0
  104. package/public/manifest.json +0 -25
  105. package/public/robots.txt +0 -3
  106. package/styleguide.config.js +0 -108
  107. package/themes/default.js +0 -114
  108. package/themes/index.js +0 -29
@@ -1,136 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.timePicker = exports.responsiveness = exports.mui = exports.dateTimePicker = exports.dateRange = void 0;
7
- const mui = exports.mui = [{
8
- type: 'datetime',
9
- props: {
10
- id: 'datetime',
11
- MuiAttributes: {
12
- placeholder: 'Standard',
13
- variant: 'standard',
14
- fullWidth: true,
15
- sx: {
16
- width: '100%'
17
- }
18
- },
19
- value: '12/09/2023'
20
- },
21
- layout: {
22
- row: 1,
23
- xs: 4,
24
- sm: 4
25
- }
26
- }];
27
- const responsiveness = exports.responsiveness = [{
28
- type: 'datetime',
29
- props: {
30
- id: 'datetimemobile',
31
- MuiAttributes: {
32
- label: 'For mobile',
33
- fullWidth: true,
34
- variant: 'standard'
35
- },
36
- name: 'MobileDatePicker'
37
- },
38
- layout: {
39
- row: 1,
40
- xs: 4,
41
- sm: 4
42
- }
43
- }, {
44
- type: 'datetime',
45
- props: {
46
- id: 'datetimestandard',
47
- MuiAttributes: {
48
- label: 'For desktop',
49
- fullWidth: true,
50
- variant: 'standard'
51
- },
52
- name: 'DesktopDatePicker'
53
- },
54
- layout: {
55
- row: 1,
56
- xs: 4,
57
- sm: 4
58
- }
59
- }, {
60
- type: 'datetime',
61
- props: {
62
- id: 'datetimeresponsive',
63
- MuiAttributes: {
64
- label: 'Responsive',
65
- fullWidth: true,
66
- variant: 'standard',
67
- disableFuture: true,
68
- openTo: 'year',
69
- views: ['year', 'month', 'day']
70
- }
71
- },
72
- layout: {
73
- row: 1,
74
- xs: 4,
75
- sm: 4
76
- }
77
- }];
78
- const dateRange = exports.dateRange = [{
79
- type: 'daterangepicker',
80
- props: {
81
- id: 'daterangepicker',
82
- MuiAttributes: {
83
- fullWidth: true,
84
- variant: 'standard',
85
- startText: 'Check-in',
86
- endText: 'Check-out'
87
- }
88
- },
89
- layout: {
90
- row: 1,
91
- xs: 12,
92
- sm: 12
93
- }
94
- }];
95
- const dateTimePicker = exports.dateTimePicker = [{
96
- type: 'datetimepicker',
97
- props: {
98
- id: 'datetimepicker',
99
- MuiAttributes: {
100
- label: 'Standard',
101
- fullWidth: true,
102
- variant: 'standard'
103
- }
104
- },
105
- layout: {
106
- row: 1,
107
- xs: 12,
108
- sm: 12
109
- }
110
- }];
111
- const timePicker = exports.timePicker = [{
112
- type: 'timepicker',
113
- props: {
114
- id: 'timepicker',
115
- MuiAttributes: {
116
- label: 'Standard',
117
- fullWidth: true,
118
- variant: 'standard',
119
- disableUnderline: true
120
- // sx: {
121
- // width: '100%',
122
- // '& .MuiInputLabel-root.Mui-focused': { color: '#979797' }, // styles the label
123
- // '& .MuiOutlinedInput-root': {
124
- // '&:hover > fieldset': { borderColor: 'red' },
125
- // height: '48px',
126
- // borderRadius: '8px',
127
- // },
128
- // },
129
- }
130
- },
131
- layout: {
132
- row: 1,
133
- xs: 12,
134
- sm: 12
135
- }
136
- }];
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.radioData = exports.customRadioData = void 0;
7
- const radioData = exports.radioData = [{
8
- id: 'staggerpenaltytype',
9
- type: 'radio',
10
- props: {
11
- id: 'staggerpenaltytype',
12
- value: 'Apply penalty now',
13
- MuiAttributes: {},
14
- MuiFLabelIcon: {
15
- icon: 'person',
16
- MuiFLabelIconAttributes: {
17
- sx: {
18
- mr: 1,
19
- color: 'rgba(0, 0, 0, 0.6)'
20
- }
21
- }
22
- },
23
- MuiFLabel: 'Account',
24
- MuiFCLAttributes: {},
25
- MuiFCLabels: ['Apply penalty now', 'Apply penalty after due date'],
26
- MuiRGAttributes: {
27
- row: true
28
- }
29
- },
30
- layout: {
31
- row: 4,
32
- xs: 9,
33
- sm: 9
34
- }
35
- }];
36
- const customRadioData = exports.customRadioData = [];
@@ -1,126 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.select = exports.multiSelect = void 0;
7
- const options = [{
8
- value: 'ocean',
9
- label: 'Ocean',
10
- color: '#00B8D9'
11
- }, {
12
- value: 'blue',
13
- label: 'Blue',
14
- color: '#0052CC',
15
- disabled: true
16
- }, {
17
- value: 'purple',
18
- label: 'Purple',
19
- color: '#5243AA'
20
- }, {
21
- value: 'red',
22
- label: 'Red',
23
- color: '#FF5630'
24
- }, {
25
- value: 'orange',
26
- label: 'Orange',
27
- color: '#FF8B00'
28
- }, {
29
- value: 'yellow',
30
- label: 'Yellow',
31
- color: '#FFC400'
32
- }, {
33
- value: 'green',
34
- label: 'Green',
35
- color: '#36B37E'
36
- }, {
37
- value: 'forest',
38
- label: 'Forest',
39
- color: '#00875A'
40
- }, {
41
- value: 'slate',
42
- label: 'Slate',
43
- color: '#253858'
44
- }, {
45
- value: 'silver',
46
- label: 'Silver',
47
- color: '#666666'
48
- }];
49
- const select = exports.select = [{
50
- type: 'select',
51
- props: {
52
- id: 'simpleselect',
53
- MuiAttributes: {},
54
- options,
55
- MuiBoxAttributes: {
56
- label: 'Colors'
57
- },
58
- InputProps: {
59
- MuiInputAdornment: {},
60
- position: 'start',
61
- icon: 'account_circle'
62
- }
63
- },
64
- layout: {
65
- row: 1,
66
- xs: 12,
67
- sm: 12
68
- }
69
- }];
70
- const multiSelect = exports.multiSelect = [{
71
- type: 'select',
72
- props: {
73
- id: 'multiselect',
74
- value: 'ocean,purple',
75
- MuiAttributes: {
76
- multiple: true,
77
- disableCloseOnSelect: true
78
- },
79
- options,
80
- MuiBoxAttributes: {
81
- label: 'Colors'
82
- }
83
- },
84
- layout: {
85
- row: 1,
86
- xs: 12,
87
- sm: 12
88
- }
89
- }, {
90
- type: 'select',
91
- props: {
92
- id: 'billingmode',
93
- MuiAttributes: {
94
- multiple: true,
95
- disableCloseOnSelect: true
96
- },
97
- options: [{
98
- value: 'SMS',
99
- label: 'SMS'
100
- }, {
101
- value: 'E-mail',
102
- label: 'E-mail'
103
- }, {
104
- value: 'Printed Statement of Account',
105
- label: 'Printed Statement of Account'
106
- }],
107
- MuiBoxAttributes: {
108
- label: 'Received Billing thru *'
109
- },
110
- InputProps: {
111
- position: 'start',
112
- icon: 'class'
113
- }
114
- },
115
- layout: {
116
- row: 90,
117
- xs: 12,
118
- sm: 6
119
- },
120
- rules: {
121
- validation: [{
122
- rule: 'mandatory',
123
- message: 'Please select Billing Mode!'
124
- }]
125
- }
126
- }];
@@ -1,237 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mui = exports.customMui = void 0;
7
- const mui = exports.mui = [{
8
- type: 'stepper',
9
- props: {
10
- id: 'stepper',
11
- MuiBoxAttributes: {},
12
- MuiStepLabelOptionalLabel: 'Last Step',
13
- MuiStepperAttributes: {},
14
- orientation: 'horizontal',
15
- MuiSteps: [{
16
- label: 'Select Service Request',
17
- mandatoryIds: ['servicetype'],
18
- components: [{
19
- id: 'servicetypeselect',
20
- type: 'radio',
21
- props: {
22
- id: 'servicetypeselect',
23
- value: 'Existing',
24
- MuiAttributes: {},
25
- MuiFLabelIcon: {},
26
- MuiFLabel: '',
27
- MuiFCLAttributes: {},
28
- MuiFCLabels: ['Existing', 'New'],
29
- MuiRGAttributes: {
30
- row: true
31
- }
32
- }
33
- }, {
34
- type: 'select',
35
- props: {
36
- id: 'servicetype',
37
- MuiAttributes: {
38
- required: true,
39
- fullWidth: true
40
- },
41
- options: [{
42
- value: 'New Installation',
43
- label: 'New Installation'
44
- }, {
45
- value: 'Change Classification',
46
- label: 'Change Classification'
47
- }, {
48
- value: 'Change Meter',
49
- label: 'Change Meter'
50
- }, {
51
- value: 'Change Name',
52
- label: 'Change Name'
53
- }, {
54
- value: 'Transfer Location',
55
- label: 'Transfer Location'
56
- }, {
57
- value: 'Recheck Read',
58
- label: 'Recheck Read'
59
- }, {
60
- value: 'Disconnection - Voluntary',
61
- label: 'Disconnection - Voluntary'
62
- }],
63
- MuiBoxAttributes: {}
64
- }
65
- }]
66
- }, {
67
- label: 'Assign Priority',
68
- isScreenChange: true,
69
- mandatoryIds: ['priority'],
70
- components: [{
71
- type: 'select',
72
- props: {
73
- id: 'priority',
74
- MuiAttributes: {
75
- required: true
76
- },
77
- options: [{
78
- value: 'Emergency',
79
- label: 'Emergency'
80
- }, {
81
- value: 'High',
82
- label: 'High'
83
- }, {
84
- value: 'Medium',
85
- label: 'Medium'
86
- }, {
87
- value: 'Low',
88
- label: 'Low'
89
- }],
90
- MuiBoxAttributes: {}
91
- }
92
- }]
93
- }, {
94
- label: 'Choose Schedule In Calendar',
95
- mandatoryIds: ['start', 'end'],
96
- components: [{
97
- id: 'start',
98
- type: 'datetime',
99
- props: {
100
- id: 'start',
101
- MuiAttributes: {
102
- label: 'Start',
103
- fullWidth: true,
104
- disabled: true,
105
- sx: {
106
- width: '100%'
107
- }
108
- }
109
- }
110
- }, {
111
- id: 'end',
112
- type: 'datetime',
113
- props: {
114
- id: 'end',
115
- MuiAttributes: {
116
- label: 'End',
117
- fullWidth: true,
118
- disabled: true,
119
- sx: {
120
- width: '100%',
121
- mt: 1.5
122
- }
123
- }
124
- }
125
- }]
126
- }, {
127
- label: 'Assign User',
128
- mandatoryIds: ['assigntouser'],
129
- components: [{
130
- type: 'select',
131
- props: {
132
- id: 'assigntouser',
133
- MuiAttributes: {},
134
- options: [{
135
- value: 'Dinakaran',
136
- label: 'Dinakaran'
137
- }, {
138
- value: 'Thiyagarajan',
139
- label: 'Thiyagarajan'
140
- }],
141
- MuiBoxAttributes: {}
142
- }
143
- }]
144
- }, {
145
- label: 'Determine Cost',
146
- optionalMandatoryIds: [{
147
- key: 'determinecost',
148
- value: 'Assign',
149
- mandatoryIds: ['cost']
150
- }],
151
- enableDisableIds: [{
152
- key: 'determinecost',
153
- disableIds: ['cost'],
154
- compareValues: {
155
- Skip: true,
156
- Assign: false
157
- }
158
- }],
159
- components: [{
160
- id: 'determinecost',
161
- type: 'radio',
162
- props: {
163
- id: 'determinecost',
164
- value: 'Skip',
165
- MuiAttributes: {},
166
- MuiFLabelIcon: {},
167
- MuiFLabel: '',
168
- MuiFCLAttributes: {},
169
- MuiFCLabels: ['Skip', 'Assign'],
170
- MuiRGAttributes: {
171
- row: true
172
- }
173
- }
174
- }, {
175
- id: 'cost',
176
- type: 'textfield',
177
- props: {
178
- id: 'cost',
179
- MuiAttributes: {
180
- fullWidth: true
181
- }
182
- }
183
- }]
184
- }, {
185
- label: 'Description',
186
- components: [{
187
- id: 'description',
188
- type: 'textfield',
189
- props: {
190
- id: 'description',
191
- MuiAttributes: {
192
- fullWidth: true,
193
- multiline: true,
194
- rows: 3
195
- }
196
- }
197
- }]
198
- }, {
199
- label: 'Review'
200
- }],
201
- MuiStepAttributes: {},
202
- MuiStepLabelAttributes: {},
203
- MuiStepContentAttributes: {},
204
- MuiButtonAttributes: {
205
- back: {},
206
- next: {
207
- sx: {
208
- bgcolor: 'primary.dark'
209
- }
210
- },
211
- final: {
212
- sx: {
213
- bgcolor: 'success.light'
214
- }
215
- },
216
- backLabel: '',
217
- nextLabel: '',
218
- finalLabel: ''
219
- }
220
- },
221
- layout: {
222
- row: 1,
223
- xs: 12,
224
- sm: 12
225
- }
226
- }];
227
- const customMui = exports.customMui = [{
228
- type: 'stepper',
229
- props: {
230
- MuiAttributes: {}
231
- },
232
- layout: {
233
- row: 1,
234
- xs: 12,
235
- sm: 12
236
- }
237
- }];
@@ -1,123 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.switchData = exports.switchCustom = void 0;
7
- const switchData = exports.switchData = [{
8
- type: 'switch',
9
- props: {
10
- id: 'switchdefault',
11
- value: true,
12
- MuiAttributes: {},
13
- MuiFCLAttributes: {
14
- label: ''
15
- }
16
- },
17
- layout: {
18
- row: 1,
19
- xs: 3,
20
- sm: 3
21
- }
22
- }, {
23
- type: 'switch',
24
- props: {
25
- id: 'switch',
26
- value: true,
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
- value: true,
42
- MuiAttributes: {
43
- disabled: true
44
- },
45
- MuiFCLAttributes: {
46
- label: ''
47
- }
48
- },
49
- layout: {
50
- row: 1,
51
- xs: 3,
52
- sm: 3
53
- }
54
- }, {
55
- type: 'switch',
56
- props: {
57
- id: 'switchdisabledchecked',
58
- MuiAttributes: {
59
- disabled: true,
60
- checked: true
61
- },
62
- MuiFCLAttributes: {
63
- label: ''
64
- }
65
- },
66
- layout: {
67
- row: 1,
68
- xs: 3,
69
- sm: 3
70
- }
71
- }];
72
- const switchCustom = exports.switchCustom = [{
73
- type: 'switch',
74
- props: {
75
- id: 'switchlabel',
76
- MuiAttributes: {
77
- defaultChecked: true
78
- },
79
- MuiFCLAttributes: {
80
- label: 'Label'
81
- }
82
- },
83
- layout: {
84
- row: 1,
85
- xs: 4,
86
- sm: 4
87
- }
88
- }, {
89
- type: 'switch',
90
- props: {
91
- id: 'switchlabelsmall',
92
- MuiAttributes: {
93
- size: 'small',
94
- defaultChecked: true,
95
- color: 'secondary'
96
- },
97
- MuiFCLAttributes: {
98
- label: 'Label'
99
- }
100
- },
101
- layout: {
102
- row: 1,
103
- xs: 4,
104
- sm: 4
105
- }
106
- }, {
107
- type: 'switch',
108
- props: {
109
- id: 'switchlabelcolor',
110
- value: true,
111
- MuiAttributes: {
112
- color: 'default'
113
- },
114
- MuiFCLAttributes: {
115
- label: 'Label'
116
- }
117
- },
118
- layout: {
119
- row: 1,
120
- xs: 4,
121
- sm: 4
122
- }
123
- }];