dynamic-mui 0.1.8 → 1.0.2

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 (41) hide show
  1. package/README.md +24 -17
  2. package/dist-modules/components/DynamicComponent.js +1 -10
  3. package/dist-modules/components/FormGenerator.js +96 -51
  4. package/dist-modules/components/controls/CheckBox/checkbox.js +25 -32
  5. package/dist-modules/components/controls/DataTable/datatable.js +6 -15
  6. package/dist-modules/components/controls/DateTime/datetime.js +27 -35
  7. package/dist-modules/components/controls/DateTimePicker/datetimepicker.js +27 -35
  8. package/dist-modules/components/controls/Radio/radio.js +76 -0
  9. package/dist-modules/components/controls/Select/select.js +43 -57
  10. package/dist-modules/components/controls/Switch/switch.js +31 -41
  11. package/dist-modules/components/controls/TextField/textfield.js +36 -52
  12. package/dist-modules/components/controls/TimePicker/timepicker.js +27 -35
  13. package/dist-modules/components/controls/Typography/typography.js +4 -10
  14. package/dist-modules/components/controls/index.js +4 -17
  15. package/dist-modules/config/mui.js +5 -2
  16. package/dist-modules/data/checkbox.js +11 -5
  17. package/dist-modules/data/dataTable.js +3 -4
  18. package/dist-modules/data/dateTime.js +14 -12
  19. package/dist-modules/data/radio.js +28 -0
  20. package/dist-modules/data/select.js +6 -6
  21. package/dist-modules/data/switch.js +11 -6
  22. package/dist-modules/data/textfield.js +6 -10
  23. package/dist-modules/util/helper.js +43 -66
  24. package/dist-modules/util/validation.js +1 -6
  25. package/docs/asset-manifest.json +7 -7
  26. package/docs/build/2.ae947fc9.js +2 -0
  27. package/docs/build/{2.22a7a8d1.js.LICENSE.txt → 2.ae947fc9.js.LICENSE.txt} +32 -46
  28. package/docs/build/main.728d1f56.js +1 -0
  29. package/docs/index.html +5 -4
  30. package/package.json +35 -34
  31. package/styleguide.config.js +49 -1
  32. package/themes/index.js +1 -1
  33. package/dist-modules/App.js +0 -32
  34. package/dist-modules/App.test.js +0 -15
  35. package/dist-modules/components/controls/DateRangePicker/daterangepicker.js +0 -74
  36. package/dist-modules/index.js +0 -20
  37. package/dist-modules/reportWebVitals.js +0 -34
  38. package/dist-modules/setupTests.js +0 -3
  39. package/docs/build/2.22a7a8d1.js +0 -2
  40. package/docs/build/main.0638d2dd.js +0 -1
  41. /package/docs/build/{bundle.483fa668.js → bundle.039d7aef.js} +0 -0
@@ -32,21 +32,6 @@ object-assign
32
32
  * Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/master/LICENSE-MIT.txt>
33
33
  */
34
34
 
35
- /*! *****************************************************************************
36
- Copyright (c) Microsoft Corporation.
37
-
38
- Permission to use, copy, modify, and/or distribute this software for any
39
- purpose with or without fee is hereby granted.
40
-
41
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
42
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
43
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
44
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
45
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
46
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
47
- PERFORMANCE OF THIS SOFTWARE.
48
- ***************************************************************************** */
49
-
50
35
  /*! @preserve
51
36
  * numeral.js
52
37
  * version : 2.0.6
@@ -61,6 +46,8 @@ PERFORMANCE OF THIS SOFTWARE.
61
46
 
62
47
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
63
48
 
49
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
50
+
64
51
  /**
65
52
  * @license
66
53
  * Lodash <https://lodash.com/>
@@ -71,30 +58,18 @@ PERFORMANCE OF THIS SOFTWARE.
71
58
  */
72
59
 
73
60
  /**
74
- * A better abstraction over CSS.
75
- *
76
- * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
77
- * @website https://github.com/cssinjs/jss
78
- * @license MIT
79
- */
80
-
81
- /**
82
- * Prism: Lightweight, robust, elegant syntax highlighting
61
+ * @license React
62
+ * react-dom.production.min.js
83
63
  *
84
- * @license MIT <https://opensource.org/licenses/MIT>
85
- * @author Lea Verou <https://lea.verou.me>
86
- * @namespace
87
- * @public
88
- */
89
-
90
- /** @license Material-UI v5.0.0-alpha.34
64
+ * Copyright (c) Facebook, Inc. and its affiliates.
91
65
  *
92
66
  * This source code is licensed under the MIT license found in the
93
67
  * LICENSE file in the root directory of this source tree.
94
68
  */
95
69
 
96
- /** @license React v0.20.2
97
- * scheduler.production.min.js
70
+ /**
71
+ * @license React
72
+ * react-is.production.min.js
98
73
  *
99
74
  * Copyright (c) Facebook, Inc. and its affiliates.
100
75
  *
@@ -102,8 +77,9 @@ PERFORMANCE OF THIS SOFTWARE.
102
77
  * LICENSE file in the root directory of this source tree.
103
78
  */
104
79
 
105
- /** @license React v16.13.1
106
- * react-is.production.min.js
80
+ /**
81
+ * @license React
82
+ * react-jsx-runtime.production.min.js
107
83
  *
108
84
  * Copyright (c) Facebook, Inc. and its affiliates.
109
85
  *
@@ -111,8 +87,9 @@ PERFORMANCE OF THIS SOFTWARE.
111
87
  * LICENSE file in the root directory of this source tree.
112
88
  */
113
89
 
114
- /** @license React v17.0.2
115
- * react-dom.production.min.js
90
+ /**
91
+ * @license React
92
+ * react.production.min.js
116
93
  *
117
94
  * Copyright (c) Facebook, Inc. and its affiliates.
118
95
  *
@@ -120,8 +97,9 @@ PERFORMANCE OF THIS SOFTWARE.
120
97
  * LICENSE file in the root directory of this source tree.
121
98
  */
122
99
 
123
- /** @license React v17.0.2
124
- * react-is.production.min.js
100
+ /**
101
+ * @license React
102
+ * scheduler.production.min.js
125
103
  *
126
104
  * Copyright (c) Facebook, Inc. and its affiliates.
127
105
  *
@@ -129,17 +107,25 @@ PERFORMANCE OF THIS SOFTWARE.
129
107
  * LICENSE file in the root directory of this source tree.
130
108
  */
131
109
 
132
- /** @license React v17.0.2
133
- * react-jsx-runtime.production.min.js
110
+ /**
111
+ * A better abstraction over CSS.
134
112
  *
135
- * Copyright (c) Facebook, Inc. and its affiliates.
113
+ * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
114
+ * @website https://github.com/cssinjs/jss
115
+ * @license MIT
116
+ */
117
+
118
+ /**
119
+ * Prism: Lightweight, robust, elegant syntax highlighting
136
120
  *
137
- * This source code is licensed under the MIT license found in the
138
- * LICENSE file in the root directory of this source tree.
121
+ * @license MIT <https://opensource.org/licenses/MIT>
122
+ * @author Lea Verou <https://lea.verou.me>
123
+ * @namespace
124
+ * @public
139
125
  */
140
126
 
141
- /** @license React v17.0.2
142
- * react.production.min.js
127
+ /** @license React v16.13.1
128
+ * react-is.production.min.js
143
129
  *
144
130
  * Copyright (c) Facebook, Inc. and its affiliates.
145
131
  *
@@ -0,0 +1 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1138:function(e,t,r){var a={react:r(0)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);",i);e.exports=[{type:"markdown",content:"Build dynamic forms using Material UI\n\n## Installation\n\n`npm install @mui/material @emotion/react @emotion/styled`\n`npm install dynamic-mui --save`\n\n\\##Usage"},{type:"code",content:"`import { FormGenerator } from 'dynamic-mui/dist-modules/components/FormGenerator'`;\n\nexport default function DynamicForm() {\n return (\n <FormGenerator\n data={[\n {\n type: 'textfield',\n props: {\n MuiAttributes: { placeholder: 'Standard', fullWidth: true, variant: 'standard' },\n },\n layout: {\n row: 1,\n xs: 4,\n sm: 4,\n },\n },\n ]}\n guid=\"Testing\"\n library={MUI}\n />\n );\n} ",settings:{},evalInContext:n}]},1144:function(e,t,r){e.exports={doclets:{},displayName:"CheckBox",description:"CheckBox Component\n",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for Typography",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],tags:{},examples:r(1145)}},1145:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/checkbox":r(1234),react:r(0),"./checkbox.js":r(244)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst CheckBox$0 = require('./checkbox.js');\nconst CheckBox = CheckBox$0.default || (CheckBox$0['CheckBox'] || CheckBox$0);",i);e.exports=[{type:"markdown",content:"Checkboxes can be used to turn an option on or off.\n\nIf you have multiple options appearing in a list, you can preserve space by using checkboxes instead of on/off switches. If you have a single option, avoid using a checkbox and use an on/off switch instead.\n\nBasic checkboxes"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {checkBox} from \'../../../data/checkbox\';\n\n<FormGenerator data={checkBox} guid="checkbox"/>',settings:{},evalInContext:n},{type:"markdown",content:"Label, Color & Size"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {checkBoxCustom} from \'../../../data/checkbox\';\n\n<FormGenerator data={checkBoxCustom} guid="checkbox"/>',settings:{},evalInContext:n}]},123:function(e,t,r){"use strict";r.r(t),r.d(t,"FormGenerator",(function(){return FormGenerator}));var a=r(22),i=(r(0),r(1410)),n=r(99),o=r.n(n),s={textfield:{type:"TextField",map:"TextField"},typography:{type:"Typography",map:"Typography"},datatable:{type:"Table",map:"Table"},datetime:{type:"DateTime",map:"DateTime"},daterangepicker:{type:"DateRangePicker",map:"DateRangePicker"},datetimepicker:{type:"DateTimePicker",map:"DateTimePicker"},timepicker:{type:"TimePicker",map:"TimePicker"},select:{type:"Select",map:"Select"},checkbox:{type:"CheckBox",map:"CheckBox"},switch:{type:"Switch",map:"Switch"}},c=r(245),u=r(252),l=r(246),p=r(247),d=r(248),m=r(249),j=r(250),y=r(244),f=r(251),b={Typography:c.default,TextField:u.default,Table:l.default,DateTime:p.default,DateTimePicker:d.default,TimePicker:m.default,Select:j.default,CheckBox:y.default,Switch:f.default},h=r(1);function DynamicComponent(e){var t=e.map,r=b[t];return Object(h.jsx)(r,Object(a.a)({},e))}var S=r(59),_={MUI:{map:s}},x={},g=function handleSubmit(e,t){"function"==typeof e&&e(x,null,t)};function FormGenerator(e){try{var t=e.data,r=void 0===t?[]:t,n=e.patch,s=void 0===n?{}:n,c=e.guid,u=e.formRef,l=e.onSubmit,p=e.onChange,d=_.MUI,m=JSON.parse(JSON.stringify(r)),j=Object(S.d)(Object(S.f)(JSON.parse(JSON.stringify(m)),s,c)),y=function onUpdate(e){var t=e.id,r=e.value;try{o()(x[c])&&(x[c]=s),x[c][t]=r,"function"==typeof p&&p({id:t,value:r})}catch(e){console.log(e)}};return Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(i.a,{container:!0,spacing:2,children:j.wrows.map((function(e){return Object(h.jsx)(h.Fragment,{children:e.map((function(e,t){var r=e.type,n=void 0===r?"":r,o=e.style,s=void 0===o?{}:o,c=e.className,u=void 0===c?"":c,l=e.visible,p=void 0!==l&&l,m=e.rules,j=void 0===m?{}:m,f=e.props||{},b=e.layout||{},_=d.map[n]||{},x=_.options,g=void 0===x?{}:x;return Object(h.jsx)(i.a,Object(a.a)(Object(a.a)({item:!0,style:s},b),{},{className:"".concat(u," ").concat(!1===p?"hidden":"show"),children:Object(h.jsx)(DynamicComponent,{map:_.map,option:g.type||"",control:e,attributes:f,rules:j,onChange:y},Object(S.c)("dynamic-comp",t))}),Object(S.c)("layout-comp",t))}))})}))},Object(S.c)("layout-grid")),j.worows.map((function(e,t){var r=e.type,a=void 0===r?"":r,i=e.style,n=void 0===i?{}:i,o=e.className,s=void 0===o?"":o,c=e.visible,u=void 0!==c&&c,l=e.rules,p=void 0===l?{}:l,m=d.map[a]||{},j=e.props,f=m.options,b=void 0===f?{}:f;return Object(h.jsx)("div",{style:n,className:"".concat(s," ").concat(!1===u?"hidden":"show"),children:Object(h.jsx)(DynamicComponent,{map:m.map,option:b.type||"",control:e,attributes:j,rules:p,onChange:y},Object(S.c)("dynamic-comp",t))},Object(S.c)("layout-comp",t))})),Object(h.jsx)("button",{type:"button",ref:u,onClick:function onClick(){g(l,r,c)},style:{display:"none"}})]})}catch(e){return Object(h.jsx)("div",{children:"Error"})}}FormGenerator.defaultProps={patch:{}};t.default={FormGenerator:FormGenerator}},1234:function(e,t,r){"use strict";r.r(t),r.d(t,"checkBox",(function(){return a})),r.d(t,"checkBoxCustom",(function(){return i}));var a=[{type:"checkbox",props:{id:"defaultChecked",MuiAttributes:{defaultChecked:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"simple",MuiAttributes:{},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"disabled",MuiAttributes:{disabled:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"disabledchecked",MuiAttributes:{disabled:!0,checked:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}}],i=[{type:"checkbox",props:{id:"label",MuiAttributes:{defaultChecked:!0},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"labelsmall",MuiAttributes:{size:"small",defaultChecked:!0,color:"secondary"},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"labelcolordefault",MuiAttributes:{defaultChecked:!0,color:"default"},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:3,sm:3}},{type:"checkbox",props:{id:"labelcolorgreen",MuiAttributes:{defaultChecked:!0,sx:{color:"green","&.Mui-checked":{color:"green"}}},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:3,sm:3}}]},1235:function(e,t,r){e.exports={doclets:{},displayName:"DataTable",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for TextField",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"}],examples:r(1236)}},1236:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/dataTable":r(1237),react:r(0),"./datatable.js":r(246)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst DataTable$0 = require('./datatable.js');\nconst DataTable = DataTable$0.default || (DataTable$0['DataTable'] || DataTable$0);",i);e.exports=[{type:"markdown",content:"Basic component:"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {basicTable} from \'../../../data/dataTable\';\n\n<FormGenerator data={basicTable} guid="dataTable"/>',settings:{},evalInContext:n}]},1237:function(e,t,r){"use strict";r.r(t),r.d(t,"basicTable",(function(){return a})),r.d(t,"denseTable",(function(){return i}));var a=[{type:"datatable",props:{id:"datatable",container:{style:{height:400,width:"100%"}},MuiAttributes:{rows:[{id:1,lastName:"Snow",firstName:"Jon",age:35},{id:2,lastName:"Lannister",firstName:"Cersei",age:42},{id:3,lastName:"Lannister",firstName:"Jaime",age:45},{id:4,lastName:"Stark",firstName:"Arya",age:16},{id:5,lastName:"Targaryen",firstName:"Daenerys",age:null},{id:6,lastName:"Melisandre",firstName:"",age:150},{id:7,lastName:"Clifford",firstName:"Ferrara",age:44},{id:8,lastName:"Frances",firstName:"Rossini",age:36},{id:9,lastName:"Roxie",firstName:"Harvey",age:65}],columns:[{field:"id",headerName:"ID",width:70},{field:"firstName",headerName:"First name",width:130},{field:"lastName",headerName:"Last name",width:130},{field:"age",headerName:"Age",type:"number",width:90}]}},layout:{xs:12,sm:12,md:12}}],i=[]},1238:function(e,t,r){e.exports={doclets:{},displayName:"DateTime",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for DateTime",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],examples:r(1239)}},1239:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/dateTime":r(323),react:r(0),"./datetime.js":r(247)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst DateTime$0 = require('./datetime.js');\nconst DateTime = DateTime$0.default || (DateTime$0['DateTime'] || DateTime$0);",i);e.exports=[{type:"markdown",content:"Date pickers let the user select a date\n\nBasic usage"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {mui} from \'../../../data/dateTime\';\n\n<FormGenerator data={mui} guid="datetime"/>',settings:{},evalInContext:n},{type:"markdown",content:"Responsiveness"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {responsiveness} from \'../../../data/dateTime\';\n\n<FormGenerator data={responsiveness} guid="datetimeResponsiveness"/>',settings:{},evalInContext:n}]},1240:function(e,t,r){e.exports={doclets:{},displayName:"DateTimePicker",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for DateTimePicker",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],examples:r(1241)}},1241:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/dateTime":r(323),react:r(0),"./datetimepicker.js":r(248)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst DateTimePicker$0 = require('./datetimepicker.js');\nconst DateTimePicker = DateTimePicker$0.default || (DateTimePicker$0['DateTimePicker'] || DateTimePicker$0);",i);e.exports=[{type:"markdown",content:"Date pickers let the user select a date\n\nBasic usage"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {dateTimePicker} from \'../../../data/dateTime\';\n\n<FormGenerator data={dateTimePicker} guid="datetimePicker"/>',settings:{},evalInContext:n}]},1242:function(e,t,r){e.exports={doclets:{},displayName:"Select",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for Select",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],examples:r(1243)}},1243:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/select":r(1244),react:r(0),"./select.js":r(250)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst Select$0 = require('./select.js');\nconst Select = Select$0.default || (Select$0['Select'] || Select$0);",i);e.exports=[{type:"markdown",content:"Date pickers let the user select a date\n\nBasic usage"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {select} from \'../../../data/select\';\n\n<FormGenerator data={select} guid="selectbasic"/>',settings:{},evalInContext:n},{type:"markdown",content:"MultiSelect usage"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {multiSelect} from \'../../../data/select\';\n\n<FormGenerator data={multiSelect} guid="multiselect"/>',settings:{},evalInContext:n}]},1244:function(e,t,r){"use strict";r.r(t),r.d(t,"select",(function(){return i})),r.d(t,"multiSelect",(function(){return n}));var a=[{value:"ocean",label:"Ocean",color:"#00B8D9"},{value:"blue",label:"Blue",color:"#0052CC",disabled:!0},{value:"purple",label:"Purple",color:"#5243AA"},{value:"red",label:"Red",color:"#FF5630"},{value:"orange",label:"Orange",color:"#FF8B00"},{value:"yellow",label:"Yellow",color:"#FFC400"},{value:"green",label:"Green",color:"#36B37E"},{value:"forest",label:"Forest",color:"#00875A"},{value:"slate",label:"Slate",color:"#253858"},{value:"silver",label:"Silver",color:"#666666"}],i=[{type:"select",props:{id:"simpleselect",MuiAttributes:{},options:a,MuiBoxAttributes:{label:"Colors"}},layout:{row:1,xs:12,sm:12}}],n=[{type:"select",props:{id:"multiselect",MuiAttributes:{multiple:!0,disableCloseOnSelect:!0},options:a,MuiBoxAttributes:{label:"Colors"}},layout:{row:1,xs:12,sm:12}}]},1245:function(e,t,r){e.exports={doclets:{},displayName:"Switch",description:"CheckBox Component\n",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for Typography",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],tags:{},examples:r(1246)}},1246:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/switch":r(1247),react:r(0),"./switch.js":r(251)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst Switch$0 = require('./switch.js');\nconst Switch = Switch$0.default || (Switch$0['Switch'] || Switch$0);",i);e.exports=[{type:"markdown",content:"Switches toggle the state of a single setting on or off.\n\nBasic switches"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {switchData} from \'../../../data/switch\';\n\n<FormGenerator data={switchData} guid="switch"/>',settings:{},evalInContext:n},{type:"markdown",content:"Label, Color & Size"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {switchCustom} from \'../../../data/switch\';\n\n<FormGenerator data={switchCustom} guid="switchcolor"/>',settings:{},evalInContext:n}]},1247:function(e,t,r){"use strict";r.r(t),r.d(t,"switchData",(function(){return a})),r.d(t,"switchCustom",(function(){return i}));var a=[{type:"switch",props:{id:"switchdefault",MuiAttributes:{defaultChecked:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"switch",props:{id:"switch",MuiAttributes:{},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"switch",props:{id:"switchdisabled",MuiAttributes:{disabled:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}},{type:"switch",props:{id:"switchdisabledchecked",MuiAttributes:{disabled:!0,checked:!0},MuiFCLAttributes:{label:""}},layout:{row:1,xs:3,sm:3}}],i=[{type:"switch",props:{id:"switchlabel",MuiAttributes:{defaultChecked:!0},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:4,sm:4}},{type:"switch",props:{id:"switchlabelsmall",MuiAttributes:{size:"small",defaultChecked:!0,color:"secondary"},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:4,sm:4}},{type:"switch",props:{id:"switchlabelcolor",MuiAttributes:{defaultChecked:!0,color:"default"},MuiFCLAttributes:{label:"Label"}},layout:{row:1,xs:4,sm:4}}]},1248:function(e,t,r){e.exports={doclets:{},displayName:"TextField",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for TextField",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"},{type:{name:"objectOf",value:{name:"array"}},required:!1,description:"Rules to be used",defaultValue:{value:"{}",computed:!1},tags:{},name:"rules"}],examples:r(1249)}},1249:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/textfield":r(1250),"react-json-tree":r(1305),react:r(0),"./textfield.js":r(252)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst TextField$0 = require('./textfield.js');\nconst TextField = TextField$0.default || (TextField$0['TextField'] || TextField$0);",i);e.exports=[{type:"markdown",content:"The TextField wrapper component is a complete form control including a label, input and help text.\n\nIt supports standard, outlined and filled styling"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {mui} from \'../../../data/textfield\';\n\n<FormGenerator data={mui} guid="textfield"/>',settings:{},evalInContext:n},{type:"code",content:"import {mui} from '../../../data/textfield';\nimport JSONTree from 'react-json-tree';\n\n<JSONTree data={mui} />",settings:{},evalInContext:n},{type:"markdown",content:"Validation:"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {validation} from \'../../../data/textfield\';\n\n<FormGenerator data={validation} guid="textfield"/>',settings:{},evalInContext:n},{type:"code",content:"import {validation} from '../../../data/textfield';\nimport JSONTree from 'react-json-tree';\n\n<JSONTree data={validation} />",settings:{},evalInContext:n},{type:"markdown",content:"InputAdornment:"},{type:"code",content:"import {FormGenerator} from \"../../FormGenerator\";\nimport {inputAdornment} from '../../../data/textfield';\n\n<FormGenerator data={inputAdornment} patch={{firstname:'dinakaran'}} guid=\"textfieldinput\"/>",settings:{},evalInContext:n},{type:"code",content:"import {sizesAndLayout} from '../../../data/textfield';\nimport JSONTree from 'react-json-tree';\n\n<JSONTree data={sizesAndLayout} />",settings:{},evalInContext:n},{type:"markdown",content:"Sizes & Layout:"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {sizesAndLayout} from \'../../../data/textfield\';\n\n<FormGenerator data={sizesAndLayout} guid="textfieldsize"/>',settings:{},evalInContext:n}]},1250:function(e,t,r){"use strict";r.r(t),r.d(t,"mui",(function(){return a})),r.d(t,"validation",(function(){return i})),r.d(t,"inputAdornment",(function(){return n})),r.d(t,"sizesAndLayout",(function(){return o}));var a=[{type:"textfield",props:{MuiAttributes:{placeholder:"Standard",fullWidth:!0,variant:"standard"}},layout:{row:1,xs:4,sm:4}},{type:"textfield",props:{MuiAttributes:{placeholder:"Filled",fullWidth:!0,variant:"filled"}},layout:{row:1,xs:4,sm:4}},{type:"textfield",props:{MuiAttributes:{placeholder:"Outlined",fullWidth:!0,variant:"outlined"}},layout:{row:1,xs:4,sm:4}}],i=[{type:"textfield",props:{MuiAttributes:{label:"Mandatory",fullWidth:!0,variant:"outlined"}},layout:{row:1,xs:3,sm:3},rules:{validation:[{rule:"mandatory",message:"Please enter your first name."}]}},{id:"password",type:"textfield",layout:{row:1,xs:3,sm:3},props:{id:"password",MuiAttributes:{type:"password",fullWidth:!0,label:"Password"}}},{id:"number",type:"textfield",layout:{row:1,xs:3,sm:3},props:{id:"number",MuiAttributes:{type:"number",fullWidth:!0,label:"Number"}}},{id:"currency",type:"textfield",layout:{row:1,xs:3,sm:3},props:{id:"currency",MuiAttributes:{fullWidth:!0,label:"Currency",name:"Currency"},format:"$0,0.00"}}],n=[{id:"firstname",type:"textfield",props:{id:"firstname",MuiAttributes:{fullWidth:!0,InputLabelProps:{shrink:!0},margin:"normal",label:"First Name"},InputProps:{MuiInputAdornment:{},position:"start",icon:"account_circle"}},rules:{validation:[{rule:"mandatory",message:"Please enter your first name."}]},layout:{row:1,xs:6,sm:6}},{id:"textfieldoutlined",type:"textfield",props:{id:"textfieldoutlined",MuiAttributes:{fullWidth:!0,InputLabelProps:{shrink:!0},margin:"normal",helperText:"Weight",label:"First Name"},InputProps:{MuiInputAdornment:{position:"end"},position:"end",text:"KG"}},layout:{row:1,xs:6,sm:6}}],o=[{id:"textfieldoutlined",type:"textfield",props:{id:"textfieldoutlined",MuiAttributes:{fullWidth:!0,size:"small",label:"Small"}},layout:{row:1,xs:4,sm:4}},{id:"textfieldoutlined",type:"textfield",props:{id:"textfieldoutlined",MuiAttributes:{fullWidth:!0,label:"Normal"}},layout:{row:1,xs:4,sm:4}},{id:"textfieldoutlined",type:"textfield",props:{id:"textfieldoutlined",MuiAttributes:{fullWidth:!0,label:"Disabled",disabled:!0}},layout:{row:1,xs:4,sm:4}},{id:"textfieldoutlined",type:"textfield",props:{id:"textfieldoutlined",MuiAttributes:{fullWidth:!0,label:"Fullwidth"}},layout:{row:1,xs:12,sm:12}}]},1300:function(e,t,r){e.exports={doclets:{},displayName:"TimePicker",description:"",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for TimePicker",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"},{type:{name:"func"},required:!1,description:"Function",defaultValue:{value:"null",computed:!1},tags:{},name:"onChange"}],examples:r(1301)}},1301:function(e,t,r){var a={"../../FormGenerator":r(123),"../../../data/dateTime":r(323),react:r(0),"./timepicker.js":r(249)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst TimePicker$0 = require('./timepicker.js');\nconst TimePicker = TimePicker$0.default || (TimePicker$0['TimePicker'] || TimePicker$0);",i);e.exports=[{type:"markdown",content:"Date pickers let the user select a date\n\nBasic usage"},{type:"code",content:'import {FormGenerator} from "../../FormGenerator";\nimport {timePicker} from \'../../../data/dateTime\';\n\n<FormGenerator data={timePicker} guid="timepicker"/>',settings:{},evalInContext:n}]},1302:function(e,t,r){e.exports={doclets:{},displayName:"Typography",description:"Typography Component\n",methods:[],props:[{type:{name:"objectOf",value:{name:"object"}},required:!1,description:"Attributes for Typography",defaultValue:{value:"{}",computed:!1},tags:{},name:"attributes"}],tags:{},examples:r(1303)}},1303:function(e,t,r){var a={"../../FormGenerator":r(123),react:r(0),"./typography.js":r(245)},i=r(106).default.bind(null,a),n=r(107).default.bind(null,"const React$0 = require('react');\nconst React = React$0.default || (React$0['React'] || React$0);\nconst Typography$0 = require('./typography.js');\nconst Typography = Typography$0.default || (Typography$0['Typography'] || Typography$0);",i);e.exports=[{type:"markdown",content:"Basic component:"},{type:"code",content:"import {FormGenerator} from \"../../FormGenerator\";\n\n<FormGenerator data={[{\n type: 'typography',\n props: {\n text: 'Hi'\n },\n layout: {\n xs:12, sm:6, md:12\n }\n}]} guid=\"typography\"/>",settings:{},evalInContext:n},{type:"markdown",content:"Component styled:"},{type:"code",content:"import {FormGenerator} from \"../../FormGenerator\";\n\n<FormGenerator data={[{\n type: 'typography',\n props: {\n text: 'Styled with color',\n MuiAttributes: {\n color: 'secondary',\n variant: 'h6',\n component: \"h2\", gutterBottom: true\n }\n },\n layout: {\n xs:12, sm:6, md:12\n }\n}]} guid=\"typography\"/>",settings:{},evalInContext:n}]},244:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return CheckBox}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(484),c=r(483),u=r(1);function CheckBox(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,l=void 0===n?{}:n,p=t.MuiFCLAttributes,d=void 0===p?{}:p,m=t.id,j=void 0===m?"":m,y=o.a.useState(l.defaultChecked||!1),f=Object(i.a)(y,2),b=f[0],h=f[1];return Object(u.jsx)(c.a,Object(a.a)(Object(a.a)({},d),{},{control:Object(u.jsx)(s.a,Object(a.a)(Object(a.a)({checked:b,onChange:function handleChange(e){h(e.target.checked),r({id:j,value:e.target.checked})}},l),{},{inputProps:{"aria-label":"controlled"}}))}))}CheckBox.defaultProps={attributes:{},onChange:null}},245:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Typography}));var a=r(22),i=(r(0),r(489)),n=r(1);function Typography(e){var t=e.attributes,r=t.MuiAttributes,o=void 0===r?{}:r,s=t.text,c=void 0===s?"":s;return Object(n.jsx)(i.a,Object(a.a)(Object(a.a)({},o),{},{children:c}))}Typography.defaultProps={attributes:{}}},246:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return DataTable}));var a=r(22),i=(r(0),r(1315)),n=r(1);function DataTable(e){var t=e.attributes,r=t.MuiAttributes,o=void 0===r?{}:r,s=t.container,c=void 0===s?{}:s;return Object(n.jsx)("div",Object(a.a)(Object(a.a)({},c),{},{children:Object(n.jsx)(i.a,Object(a.a)({},o))}))}DataTable.defaultProps={attributes:{}}},247:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return DateTime}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(275),c=r(339),u=r(202),l=r(59),p=r(1);function DateTime(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,d=void 0===n?{}:n,m=t.name,j=void 0===m?"DatePicker":m,y=t.id,f=void 0===y?"":y,b=o.a.useState(new Date),h=Object(i.a)(b,2),S=h[0],_=h[1],x=Object(l.a)(j);return Object(p.jsx)(u.a,{dateAdapter:c.a,children:Object(p.jsx)(x,Object(a.a)(Object(a.a)({value:S,onChange:function onChange(e){_(e),r({id:f,value:e})}},d),{},{renderInput:function renderInput(e){return Object(p.jsx)(s.a,Object(a.a)({},e))}}))})}DateTime.defaultProps={attributes:{},onChange:null}},248:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return DateTimePicker}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(275),c=r(339),u=r(202),l=r(59),p=r(1);function DateTimePicker(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,d=void 0===n?{}:n,m=t.name,j=void 0===m?"DateTimePicker":m,y=t.id,f=void 0===y?"":y,b=o.a.useState(new Date),h=Object(i.a)(b,2),S=h[0],_=h[1],x=Object(l.a)(j);return Object(p.jsx)(u.a,{dateAdapter:c.a,children:Object(p.jsx)(x,Object(a.a)(Object(a.a)({value:S,onChange:function onChange(e){_(e),r({id:f,value:e})}},d),{},{renderInput:function renderInput(e){return Object(p.jsx)(s.a,Object(a.a)({},e))}}))})}DateTimePicker.defaultProps={attributes:{},onChange:null}},249:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return TimePicker}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(275),c=r(339),u=r(202),l=r(59),p=r(1);function TimePicker(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,d=void 0===n?{}:n,m=t.name,j=void 0===m?"TimePicker":m,y=t.id,f=void 0===y?"":y,b=o.a.useState(new Date),h=Object(i.a)(b,2),S=h[0],_=h[1],x=Object(l.a)(j);return Object(p.jsx)(u.a,{dateAdapter:c.a,children:Object(p.jsx)(x,Object(a.a)(Object(a.a)({value:S,onChange:function onChange(e){_(e),r({id:f,value:e})}},d),{},{renderInput:function renderInput(e){return Object(p.jsx)(s.a,Object(a.a)({},e))}}))})}TimePicker.defaultProps={attributes:{},onChange:null}},250:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Select}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(484),c=r(275),u=r(1317),l=r(473),p=r.n(l),d=r(474),m=r.n(d),j=r(59),y=r(1),f=Object(y.jsx)(p.a,{fontSize:"small"}),b=Object(y.jsx)(m.a,{fontSize:"small"});function Select(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,l=void 0===n?{}:n,p=t.options,d=void 0===p?[]:p,m=t.MuiBoxAttributes,h=void 0===m?{}:m,S=t.id,_=void 0===S?"":S,x=o.a.useState(),g=Object(i.a)(x,2),v=g[0],C=g[1],k=o.a.useState(""),w=Object(i.a)(k,2),E=w[0],O=w[1];return o.a.useEffect((function(){r({id:_,value:v,inputValue:E})}),[v,E]),Object(y.jsx)(u.a,Object(a.a)(Object(a.a)({},function getMuiAttributes(){return l.multiple&&(l.renderOption=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(arguments.length>2?arguments[2]:void 0).selected;return Object(y.jsxs)("li",Object(a.a)(Object(a.a)({},e),{},{children:[Object(y.jsx)(s.a,{icon:f,checkedIcon:b,style:{marginRight:8},checked:r,sx:Object(j.b)(t.color||"")}),t.title||t.label||t.value]}))}),l}()),{},{disablePortal:!0,options:d,value:v,onChange:function onChange(e,t){C(t)},inputValue:E,onInputChange:function onInputChange(e,t){O(t)},renderInput:function renderInput(e){return Object(y.jsx)(c.a,Object(a.a)(Object(a.a)(Object(a.a)({},e),h),{},{inputProps:Object(a.a)(Object(a.a)({},e.inputProps),{},{autoComplete:"new-password"})}))}}))}Select.defaultProps={attributes:{},onChange:null}},251:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Switch}));var a=r(9),i=r(22),n=r(144),o=r(0),s=r.n(o),c=r(482),u=r(483),l=r(11),p=r(179),d=r(1),m=["color"],j=Object(l.a)((function(e){e.color;var t=Object(n.a)(e,m);return Object(d.jsx)(c.a,Object(i.a)({},t))}))((function(e){var t=e.theme;return{"& .MuiSwitch-switchBase.Mui-checked":{color:function color(e){return e.color||"green"},"&:hover":{backgroundColor:function backgroundColor(e){return Object(p.a)(e.color||"green",t.palette.action.hoverOpacity)}}},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:function backgroundColor(e){return e.color||"green"}}}}));function Switch(e){var t=e.attributes,r=e.onChange,n=t.MuiAttributes,o=void 0===n?{}:n,l=t.MuiFCLAttributes,p=void 0===l?{}:l,m=t.color,y=void 0===m?"":m,f=t.id,b=void 0===f?"":f,h=s.a.useState(o.defaultChecked||!1),S=Object(a.a)(h,2),_=S[0],x=S[1],g=y?j:c.a;return Object(d.jsx)(u.a,Object(i.a)(Object(i.a)({},p),{},{control:Object(d.jsx)(g,Object(i.a)(Object(i.a)({checked:_,onChange:function handleChange(e){x(e.target.checked),r({id:b,value:e.target.checked})}},o),{},{inputProps:{"aria-label":"controlled"}}))}))}Switch.defaultProps={attributes:{},onChange:null}},252:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return textfield_TextField}));var a=r(22),i=r(9),n=r(0),o=r.n(n),s=r(256),c=r.n(s),u=r(275),l=r(59),p=r(37),d=r.n(p),m={email:function email(e,t){return d.a.isEmail(e,t)},equals:function equals(e,t){return d.a.equals(e,t)},mandatory:function mandatory(e){return!d.a.isEmpty(e)},mandatoryselect:function mandatoryselect(e){return e.length>0},mobile:function mobile(e,t){return d.a.isMobilePhone(e,t)},lowercase:function lowercase(e){return d.a.isLowercase(e)},uppercase:function uppercase(e){return d.a.isUppercase(e)},length:function length(e,t){return d.a.isLength(e,t)},url:function url(e,t){return d.a.isURL(e,t)},creditcard:function creditcard(e){return d.a.isCreditCard(e)},currency:function currency(e,t){return d.a.isCurrency(e,t)},date:function date(e){return d.a.isDate(e)},boolean:function boolean(e){return d.a.isBoolean(e)},alphanumeric:function alphanumeric(e,t){d.a.isAlphanumeric(e,t)},contains:function contains(e,t){return d.a.contains(e,t)},FQDN:function FQDN(e,t){return d.a.isFQDN(e,t)},float:function float(e,t){return d.a.isFloat(e,t)},ip:function ip(e,t){return d.a.isIP(e,t)},ISBN:function ISBN(e,t){return d.a.isISBN(e,t)},MACAddress:function MACAddress(e){return d.a.isMACAddress(e)},MD5:function MD5(e){return d.a.isMD5(e)},numeric:function numeric(e){return d.a.isNumeric(e)},UUID:function UUID(e,t){return d.a.isUUID(e,t)},matches:function matches(e,t){return d.a.matches(e,t)},int:function int(e,t){return d.a.isInt(e,t)},hexcolor:function hexcolor(e){return d.a.isHexColor(e)},dataURI:function dataURI(e){return d.a.isDataURI(e)},decimal:function decimal(e){return d.a.isDecimal(e)},alpha:function alpha(e,t){return d.a.isAlpha(e,t)},negative:function negative(e){return c()(e).value()>-1}},j=r(1);function textfield_TextField(e){var t=e.attributes,r=e.rules,n=void 0===r?{}:r,s=e.onChange,p=t.MuiAttributes,d=void 0===p?{}:p,y=t.InputProps,f=void 0===y?{}:y,b=t.format,h=void 0===b?"":b,S=t.id,_=void 0===S?"":S,x=o.a.useState({value:t.value||"",helperText:d.helperText||"",error:!1}),g=Object(i.a)(x,2),v=g[0],C=g[1],k=function getValue(e){return h?c()(e).format(h):e},w=function validate(e){var t=n.validation;if(t)for(var r=0;r<t.length;r+=1){var a=t[r];if(!m[a.rule](e,a.value))return{isValid:!1,message:a.message}}return{isValid:!0,message:""}};return o.a.useEffect((function(){s({id:_,value:v.value})}),[v.value,v.helperText]),Object(j.jsx)(u.a,Object(a.a)(Object(a.a)({fullWidth:!0},d),{},{InputProps:Object(l.e)(f),onChange:function handleOnChange(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=t[0].target.value,i=w(a);C({value:a,helperText:i.message,error:!i.isValid})},onBlur:function handleOnBlur(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=t[0].target.value,i=k(a),n=w(i);C({value:i,helperText:n.message,error:!n.isValid})},onFocus:function handleOnFocus(){},value:v.value,error:v.error,helperText:v.helperText}))}textfield_TextField.defaultProps={attributes:{},rules:{},onChange:null}},323:function(e,t,r){"use strict";r.r(t),r.d(t,"mui",(function(){return a})),r.d(t,"responsiveness",(function(){return i})),r.d(t,"dateRange",(function(){return n})),r.d(t,"dateTimePicker",(function(){return o})),r.d(t,"timePicker",(function(){return s}));var a=[{type:"datetime",props:{id:"datetime",MuiAttributes:{placeholder:"Standard",fullWidth:!0,variant:"standard"}},layout:{row:1,xs:4,sm:4}}],i=[{type:"datetime",props:{id:"datetimemobile",MuiAttributes:{label:"For mobile",fullWidth:!0,variant:"standard"},name:"MobileDatePicker"},layout:{row:1,xs:4,sm:4}},{type:"datetime",props:{id:"datetimestandard",MuiAttributes:{label:"For desktop",fullWidth:!0,variant:"standard"},name:"DesktopDatePicker"},layout:{row:1,xs:4,sm:4}},{type:"datetime",props:{id:"datetimeresponsive",MuiAttributes:{label:"Responsive",fullWidth:!0,variant:"standard",disableFuture:!0,openTo:"year",views:["year","month","day"]}},layout:{row:1,xs:4,sm:4}}],n=[{type:"daterangepicker",props:{id:"daterangepicker",MuiAttributes:{fullWidth:!0,variant:"standard",startText:"Check-in",endText:"Check-out"}},layout:{row:1,xs:12,sm:12}}],o=[{type:"datetimepicker",props:{id:"datetimepicker",MuiAttributes:{label:"Standard",fullWidth:!0,variant:"standard"}},layout:{row:1,xs:12,sm:12}}],s=[{type:"timepicker",props:{id:"timepicker",MuiAttributes:{label:"Standard",fullWidth:!0,variant:"standard"}},layout:{row:1,xs:12,sm:12}}]},526:function(e,t,r){e.exports=r(1304)},59:function(e,t,r){"use strict";r.d(t,"d",(function(){return generateLayout})),r.d(t,"e",(function(){return getInputProps})),r.d(t,"c",(function(){return x})),r.d(t,"f",(function(){return g})),r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return C}));var a=r(3),i=r(22),n=r(129),o=r(99),s=r.n(o),c=r(492),u=r(1321),l=r(476),p=r(478),d=r(1311),m=r(479),j=r(486),y=r(1312),f=r(481),b=r(480),h=r(1313),S=r(1),_={};function generateLayout(e){var t={wrows:[],worows:[]},r=Object(n.clone)(e);t.worows=Object(n.remove)(r,(function(e){return void 0===(e.layout?e.layout.row:e.layout)}));var a=Object(n.map)(r,"layout.row"),i=Object(n.uniq)(a),o=Object(n.sortBy)(i);return Object(n.each)(o,(function(e){var a=[];Object(n.each)(r,(function(t){t.layout&&t.layout.row===e&&a.push(t)})),t.wrows.push(a)})),t}function getInputProps(e){if(!s()(e)){var t=e.MuiInputAdornment,r=void 0===t?{}:t,n=e.position,o=void 0===n?"start":n,l=e.icon,p=e.text,d=e.textstyle,m=void 0===d?{}:d;return Object(a.a)({},"".concat(o,"Adornment"),Object(S.jsxs)(c.a,Object(i.a)(Object(i.a)({},r),{},{children:[l&&Object(S.jsx)(u.a,{children:l}),s()(m)?p||"":Object(S.jsx)("div",{style:m,children:p||""})]})))}return{}}var x=function generateKey(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=Math.random().toString(36).substr(2,9),a=(new Date).toLocaleTimeString("en").trim();return"".concat(e,"_").concat(t,"_").concat(r,"_").concat(a)},g=function updatePatchData(e,t,r){_[r]=t;var a=Object.assign([],e);return Object(n.map)(a,(function(e){var t=Object(i.a)({},e);return t.id&&_[r][e.id]&&(t.props.value=_[r][e.id]||""),t}))},v=function DateComponent(e){return"MobileDatePicker"===e?l.a:"DesktopDatePicker"===e?p.a:"DateTimePicker"===e?d.a:"MobileDateTimePicker"===e?m.a:"DesktopDateTimePicker"===e?j.a:"TimePicker"===e?y.a:"MobileTimePicker"===e?f.a:"DesktopTimePicker"===e?b.a:h.a},C=function checkboxSX(e){return e?{color:e,"&.Mui-checked":{color:e}}:{}}},719:function(e,t,r){var a={"./Binary_Property/ASCII.js":720,"./Binary_Property/ASCII_Hex_Digit.js":721,"./Binary_Property/Alphabetic.js":722,"./Binary_Property/Any.js":723,"./Binary_Property/Assigned.js":724,"./Binary_Property/Bidi_Control.js":725,"./Binary_Property/Bidi_Mirrored.js":726,"./Binary_Property/Case_Ignorable.js":727,"./Binary_Property/Cased.js":728,"./Binary_Property/Changes_When_Casefolded.js":729,"./Binary_Property/Changes_When_Casemapped.js":730,"./Binary_Property/Changes_When_Lowercased.js":731,"./Binary_Property/Changes_When_NFKC_Casefolded.js":732,"./Binary_Property/Changes_When_Titlecased.js":733,"./Binary_Property/Changes_When_Uppercased.js":734,"./Binary_Property/Dash.js":735,"./Binary_Property/Default_Ignorable_Code_Point.js":736,"./Binary_Property/Deprecated.js":737,"./Binary_Property/Diacritic.js":738,"./Binary_Property/Emoji.js":739,"./Binary_Property/Emoji_Component.js":740,"./Binary_Property/Emoji_Modifier.js":741,"./Binary_Property/Emoji_Modifier_Base.js":742,"./Binary_Property/Emoji_Presentation.js":743,"./Binary_Property/Extended_Pictographic.js":744,"./Binary_Property/Extender.js":745,"./Binary_Property/Grapheme_Base.js":746,"./Binary_Property/Grapheme_Extend.js":747,"./Binary_Property/Hex_Digit.js":748,"./Binary_Property/IDS_Binary_Operator.js":749,"./Binary_Property/IDS_Trinary_Operator.js":750,"./Binary_Property/ID_Continue.js":751,"./Binary_Property/ID_Start.js":752,"./Binary_Property/Ideographic.js":753,"./Binary_Property/Join_Control.js":754,"./Binary_Property/Logical_Order_Exception.js":755,"./Binary_Property/Lowercase.js":756,"./Binary_Property/Math.js":757,"./Binary_Property/Noncharacter_Code_Point.js":758,"./Binary_Property/Pattern_Syntax.js":759,"./Binary_Property/Pattern_White_Space.js":760,"./Binary_Property/Quotation_Mark.js":761,"./Binary_Property/Radical.js":762,"./Binary_Property/Regional_Indicator.js":763,"./Binary_Property/Sentence_Terminal.js":764,"./Binary_Property/Soft_Dotted.js":765,"./Binary_Property/Terminal_Punctuation.js":766,"./Binary_Property/Unified_Ideograph.js":767,"./Binary_Property/Uppercase.js":768,"./Binary_Property/Variation_Selector.js":769,"./Binary_Property/White_Space.js":770,"./Binary_Property/XID_Continue.js":771,"./Binary_Property/XID_Start.js":772,"./General_Category/Cased_Letter.js":773,"./General_Category/Close_Punctuation.js":774,"./General_Category/Connector_Punctuation.js":775,"./General_Category/Control.js":776,"./General_Category/Currency_Symbol.js":777,"./General_Category/Dash_Punctuation.js":778,"./General_Category/Decimal_Number.js":779,"./General_Category/Enclosing_Mark.js":780,"./General_Category/Final_Punctuation.js":781,"./General_Category/Format.js":782,"./General_Category/Initial_Punctuation.js":783,"./General_Category/Letter.js":784,"./General_Category/Letter_Number.js":785,"./General_Category/Line_Separator.js":786,"./General_Category/Lowercase_Letter.js":787,"./General_Category/Mark.js":788,"./General_Category/Math_Symbol.js":789,"./General_Category/Modifier_Letter.js":790,"./General_Category/Modifier_Symbol.js":791,"./General_Category/Nonspacing_Mark.js":792,"./General_Category/Number.js":793,"./General_Category/Open_Punctuation.js":794,"./General_Category/Other.js":795,"./General_Category/Other_Letter.js":796,"./General_Category/Other_Number.js":797,"./General_Category/Other_Punctuation.js":798,"./General_Category/Other_Symbol.js":799,"./General_Category/Paragraph_Separator.js":800,"./General_Category/Private_Use.js":801,"./General_Category/Punctuation.js":802,"./General_Category/Separator.js":803,"./General_Category/Space_Separator.js":804,"./General_Category/Spacing_Mark.js":805,"./General_Category/Surrogate.js":806,"./General_Category/Symbol.js":807,"./General_Category/Titlecase_Letter.js":808,"./General_Category/Unassigned.js":809,"./General_Category/Uppercase_Letter.js":810,"./Script/Adlam.js":811,"./Script/Ahom.js":812,"./Script/Anatolian_Hieroglyphs.js":813,"./Script/Arabic.js":814,"./Script/Armenian.js":815,"./Script/Avestan.js":816,"./Script/Balinese.js":817,"./Script/Bamum.js":818,"./Script/Bassa_Vah.js":819,"./Script/Batak.js":820,"./Script/Bengali.js":821,"./Script/Bhaiksuki.js":822,"./Script/Bopomofo.js":823,"./Script/Brahmi.js":824,"./Script/Braille.js":825,"./Script/Buginese.js":826,"./Script/Buhid.js":827,"./Script/Canadian_Aboriginal.js":828,"./Script/Carian.js":829,"./Script/Caucasian_Albanian.js":830,"./Script/Chakma.js":831,"./Script/Cham.js":832,"./Script/Cherokee.js":833,"./Script/Chorasmian.js":834,"./Script/Common.js":835,"./Script/Coptic.js":836,"./Script/Cuneiform.js":837,"./Script/Cypriot.js":838,"./Script/Cyrillic.js":839,"./Script/Deseret.js":840,"./Script/Devanagari.js":841,"./Script/Dives_Akuru.js":842,"./Script/Dogra.js":843,"./Script/Duployan.js":844,"./Script/Egyptian_Hieroglyphs.js":845,"./Script/Elbasan.js":846,"./Script/Elymaic.js":847,"./Script/Ethiopic.js":848,"./Script/Georgian.js":849,"./Script/Glagolitic.js":850,"./Script/Gothic.js":851,"./Script/Grantha.js":852,"./Script/Greek.js":853,"./Script/Gujarati.js":854,"./Script/Gunjala_Gondi.js":855,"./Script/Gurmukhi.js":856,"./Script/Han.js":857,"./Script/Hangul.js":858,"./Script/Hanifi_Rohingya.js":859,"./Script/Hanunoo.js":860,"./Script/Hatran.js":861,"./Script/Hebrew.js":862,"./Script/Hiragana.js":863,"./Script/Imperial_Aramaic.js":864,"./Script/Inherited.js":865,"./Script/Inscriptional_Pahlavi.js":866,"./Script/Inscriptional_Parthian.js":867,"./Script/Javanese.js":868,"./Script/Kaithi.js":869,"./Script/Kannada.js":870,"./Script/Katakana.js":871,"./Script/Kayah_Li.js":872,"./Script/Kharoshthi.js":873,"./Script/Khitan_Small_Script.js":874,"./Script/Khmer.js":875,"./Script/Khojki.js":876,"./Script/Khudawadi.js":877,"./Script/Lao.js":878,"./Script/Latin.js":879,"./Script/Lepcha.js":880,"./Script/Limbu.js":881,"./Script/Linear_A.js":882,"./Script/Linear_B.js":883,"./Script/Lisu.js":884,"./Script/Lycian.js":885,"./Script/Lydian.js":886,"./Script/Mahajani.js":887,"./Script/Makasar.js":888,"./Script/Malayalam.js":889,"./Script/Mandaic.js":890,"./Script/Manichaean.js":891,"./Script/Marchen.js":892,"./Script/Masaram_Gondi.js":893,"./Script/Medefaidrin.js":894,"./Script/Meetei_Mayek.js":895,"./Script/Mende_Kikakui.js":896,"./Script/Meroitic_Cursive.js":897,"./Script/Meroitic_Hieroglyphs.js":898,"./Script/Miao.js":899,"./Script/Modi.js":900,"./Script/Mongolian.js":901,"./Script/Mro.js":902,"./Script/Multani.js":903,"./Script/Myanmar.js":904,"./Script/Nabataean.js":905,"./Script/Nandinagari.js":906,"./Script/New_Tai_Lue.js":907,"./Script/Newa.js":908,"./Script/Nko.js":909,"./Script/Nushu.js":910,"./Script/Nyiakeng_Puachue_Hmong.js":911,"./Script/Ogham.js":912,"./Script/Ol_Chiki.js":913,"./Script/Old_Hungarian.js":914,"./Script/Old_Italic.js":915,"./Script/Old_North_Arabian.js":916,"./Script/Old_Permic.js":917,"./Script/Old_Persian.js":918,"./Script/Old_Sogdian.js":919,"./Script/Old_South_Arabian.js":920,"./Script/Old_Turkic.js":921,"./Script/Oriya.js":922,"./Script/Osage.js":923,"./Script/Osmanya.js":924,"./Script/Pahawh_Hmong.js":925,"./Script/Palmyrene.js":926,"./Script/Pau_Cin_Hau.js":927,"./Script/Phags_Pa.js":928,"./Script/Phoenician.js":929,"./Script/Psalter_Pahlavi.js":930,"./Script/Rejang.js":931,"./Script/Runic.js":932,"./Script/Samaritan.js":933,"./Script/Saurashtra.js":934,"./Script/Sharada.js":935,"./Script/Shavian.js":936,"./Script/Siddham.js":937,"./Script/SignWriting.js":938,"./Script/Sinhala.js":939,"./Script/Sogdian.js":940,"./Script/Sora_Sompeng.js":941,"./Script/Soyombo.js":942,"./Script/Sundanese.js":943,"./Script/Syloti_Nagri.js":944,"./Script/Syriac.js":945,"./Script/Tagalog.js":946,"./Script/Tagbanwa.js":947,"./Script/Tai_Le.js":948,"./Script/Tai_Tham.js":949,"./Script/Tai_Viet.js":950,"./Script/Takri.js":951,"./Script/Tamil.js":952,"./Script/Tangut.js":953,"./Script/Telugu.js":954,"./Script/Thaana.js":955,"./Script/Thai.js":956,"./Script/Tibetan.js":957,"./Script/Tifinagh.js":958,"./Script/Tirhuta.js":959,"./Script/Ugaritic.js":960,"./Script/Vai.js":961,"./Script/Wancho.js":962,"./Script/Warang_Citi.js":963,"./Script/Yezidi.js":964,"./Script/Yi.js":965,"./Script/Zanabazar_Square.js":966,"./Script_Extensions/Adlam.js":967,"./Script_Extensions/Ahom.js":968,"./Script_Extensions/Anatolian_Hieroglyphs.js":969,"./Script_Extensions/Arabic.js":970,"./Script_Extensions/Armenian.js":971,"./Script_Extensions/Avestan.js":972,"./Script_Extensions/Balinese.js":973,"./Script_Extensions/Bamum.js":974,"./Script_Extensions/Bassa_Vah.js":975,"./Script_Extensions/Batak.js":976,"./Script_Extensions/Bengali.js":977,"./Script_Extensions/Bhaiksuki.js":978,"./Script_Extensions/Bopomofo.js":979,"./Script_Extensions/Brahmi.js":980,"./Script_Extensions/Braille.js":981,"./Script_Extensions/Buginese.js":982,"./Script_Extensions/Buhid.js":983,"./Script_Extensions/Canadian_Aboriginal.js":984,"./Script_Extensions/Carian.js":985,"./Script_Extensions/Caucasian_Albanian.js":986,"./Script_Extensions/Chakma.js":987,"./Script_Extensions/Cham.js":988,"./Script_Extensions/Cherokee.js":989,"./Script_Extensions/Chorasmian.js":990,"./Script_Extensions/Common.js":991,"./Script_Extensions/Coptic.js":992,"./Script_Extensions/Cuneiform.js":993,"./Script_Extensions/Cypriot.js":994,"./Script_Extensions/Cyrillic.js":995,"./Script_Extensions/Deseret.js":996,"./Script_Extensions/Devanagari.js":997,"./Script_Extensions/Dives_Akuru.js":998,"./Script_Extensions/Dogra.js":999,"./Script_Extensions/Duployan.js":1e3,"./Script_Extensions/Egyptian_Hieroglyphs.js":1001,"./Script_Extensions/Elbasan.js":1002,"./Script_Extensions/Elymaic.js":1003,"./Script_Extensions/Ethiopic.js":1004,"./Script_Extensions/Georgian.js":1005,"./Script_Extensions/Glagolitic.js":1006,"./Script_Extensions/Gothic.js":1007,"./Script_Extensions/Grantha.js":1008,"./Script_Extensions/Greek.js":1009,"./Script_Extensions/Gujarati.js":1010,"./Script_Extensions/Gunjala_Gondi.js":1011,"./Script_Extensions/Gurmukhi.js":1012,"./Script_Extensions/Han.js":1013,"./Script_Extensions/Hangul.js":1014,"./Script_Extensions/Hanifi_Rohingya.js":1015,"./Script_Extensions/Hanunoo.js":1016,"./Script_Extensions/Hatran.js":1017,"./Script_Extensions/Hebrew.js":1018,"./Script_Extensions/Hiragana.js":1019,"./Script_Extensions/Imperial_Aramaic.js":1020,"./Script_Extensions/Inherited.js":1021,"./Script_Extensions/Inscriptional_Pahlavi.js":1022,"./Script_Extensions/Inscriptional_Parthian.js":1023,"./Script_Extensions/Javanese.js":1024,"./Script_Extensions/Kaithi.js":1025,"./Script_Extensions/Kannada.js":1026,"./Script_Extensions/Katakana.js":1027,"./Script_Extensions/Kayah_Li.js":1028,"./Script_Extensions/Kharoshthi.js":1029,"./Script_Extensions/Khitan_Small_Script.js":1030,"./Script_Extensions/Khmer.js":1031,"./Script_Extensions/Khojki.js":1032,"./Script_Extensions/Khudawadi.js":1033,"./Script_Extensions/Lao.js":1034,"./Script_Extensions/Latin.js":1035,"./Script_Extensions/Lepcha.js":1036,"./Script_Extensions/Limbu.js":1037,"./Script_Extensions/Linear_A.js":1038,"./Script_Extensions/Linear_B.js":1039,"./Script_Extensions/Lisu.js":1040,"./Script_Extensions/Lycian.js":1041,"./Script_Extensions/Lydian.js":1042,"./Script_Extensions/Mahajani.js":1043,"./Script_Extensions/Makasar.js":1044,"./Script_Extensions/Malayalam.js":1045,"./Script_Extensions/Mandaic.js":1046,"./Script_Extensions/Manichaean.js":1047,"./Script_Extensions/Marchen.js":1048,"./Script_Extensions/Masaram_Gondi.js":1049,"./Script_Extensions/Medefaidrin.js":1050,"./Script_Extensions/Meetei_Mayek.js":1051,"./Script_Extensions/Mende_Kikakui.js":1052,"./Script_Extensions/Meroitic_Cursive.js":1053,"./Script_Extensions/Meroitic_Hieroglyphs.js":1054,"./Script_Extensions/Miao.js":1055,"./Script_Extensions/Modi.js":1056,"./Script_Extensions/Mongolian.js":1057,"./Script_Extensions/Mro.js":1058,"./Script_Extensions/Multani.js":1059,"./Script_Extensions/Myanmar.js":1060,"./Script_Extensions/Nabataean.js":1061,"./Script_Extensions/Nandinagari.js":1062,"./Script_Extensions/New_Tai_Lue.js":1063,"./Script_Extensions/Newa.js":1064,"./Script_Extensions/Nko.js":1065,"./Script_Extensions/Nushu.js":1066,"./Script_Extensions/Nyiakeng_Puachue_Hmong.js":1067,"./Script_Extensions/Ogham.js":1068,"./Script_Extensions/Ol_Chiki.js":1069,"./Script_Extensions/Old_Hungarian.js":1070,"./Script_Extensions/Old_Italic.js":1071,"./Script_Extensions/Old_North_Arabian.js":1072,"./Script_Extensions/Old_Permic.js":1073,"./Script_Extensions/Old_Persian.js":1074,"./Script_Extensions/Old_Sogdian.js":1075,"./Script_Extensions/Old_South_Arabian.js":1076,"./Script_Extensions/Old_Turkic.js":1077,"./Script_Extensions/Oriya.js":1078,"./Script_Extensions/Osage.js":1079,"./Script_Extensions/Osmanya.js":1080,"./Script_Extensions/Pahawh_Hmong.js":1081,"./Script_Extensions/Palmyrene.js":1082,"./Script_Extensions/Pau_Cin_Hau.js":1083,"./Script_Extensions/Phags_Pa.js":1084,"./Script_Extensions/Phoenician.js":1085,"./Script_Extensions/Psalter_Pahlavi.js":1086,"./Script_Extensions/Rejang.js":1087,"./Script_Extensions/Runic.js":1088,"./Script_Extensions/Samaritan.js":1089,"./Script_Extensions/Saurashtra.js":1090,"./Script_Extensions/Sharada.js":1091,"./Script_Extensions/Shavian.js":1092,"./Script_Extensions/Siddham.js":1093,"./Script_Extensions/SignWriting.js":1094,"./Script_Extensions/Sinhala.js":1095,"./Script_Extensions/Sogdian.js":1096,"./Script_Extensions/Sora_Sompeng.js":1097,"./Script_Extensions/Soyombo.js":1098,"./Script_Extensions/Sundanese.js":1099,"./Script_Extensions/Syloti_Nagri.js":1100,"./Script_Extensions/Syriac.js":1101,"./Script_Extensions/Tagalog.js":1102,"./Script_Extensions/Tagbanwa.js":1103,"./Script_Extensions/Tai_Le.js":1104,"./Script_Extensions/Tai_Tham.js":1105,"./Script_Extensions/Tai_Viet.js":1106,"./Script_Extensions/Takri.js":1107,"./Script_Extensions/Tamil.js":1108,"./Script_Extensions/Tangut.js":1109,"./Script_Extensions/Telugu.js":1110,"./Script_Extensions/Thaana.js":1111,"./Script_Extensions/Thai.js":1112,"./Script_Extensions/Tibetan.js":1113,"./Script_Extensions/Tifinagh.js":1114,"./Script_Extensions/Tirhuta.js":1115,"./Script_Extensions/Ugaritic.js":1116,"./Script_Extensions/Vai.js":1117,"./Script_Extensions/Wancho.js":1118,"./Script_Extensions/Warang_Citi.js":1119,"./Script_Extensions/Yezidi.js":1120,"./Script_Extensions/Yi.js":1121,"./Script_Extensions/Zanabazar_Square.js":1122,"./index.js":1123,"./unicode-version.js":1124};function webpackContext(e){var t=webpackContextResolve(e);return r(t)}function webpackContextResolve(e){if(!r.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(a)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=719}},[[526,1,2]]]);
package/docs/index.html CHANGED
@@ -4,14 +4,15 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
- <title>Dynamic Mui Style Guide</title>
7
+ <title>Dynamic MUI</title>
8
+ <link rel="icon" type="image/x-icon" href="https://geoviewer.io/img/favicon.ico">
8
9
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
9
10
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
10
11
  </head>
11
12
  <body>
12
13
  <div id="rsg-root"></div>
13
- <script src="build/bundle.483fa668.js"></script>
14
- <script src="build/2.22a7a8d1.js"></script>
15
- <script src="build/main.0638d2dd.js"></script>
14
+ <script src="build/bundle.039d7aef.js"></script>
15
+ <script src="build/2.ae947fc9.js"></script>
16
+ <script src="build/main.728d1f56.js"></script>
16
17
  </body>
17
18
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamic-mui",
3
- "version": "0.1.8",
3
+ "version": "1.0.2",
4
4
  "author": "Dinakaran S",
5
5
  "user": "dinakarans",
6
6
  "repository": {
@@ -14,30 +14,31 @@
14
14
  "main": "dist-modules",
15
15
  "module": "src",
16
16
  "dependencies": {
17
+ "@babel/eslint-parser": "^7.22.15",
17
18
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
18
- "@babel/plugin-transform-modules-commonjs": "^7.14.0",
19
- "@emotion/react": "^11.4.0",
20
- "@emotion/styled": "^11.3.0",
21
- "@material-ui/core": "^5.0.0-alpha.34",
22
- "@material-ui/data-grid": "^4.0.0-alpha.29",
23
- "@material-ui/icons": "^5.0.0-alpha.34",
24
- "@material-ui/lab": "^5.0.0-alpha.34",
25
- "@material-ui/styles": "^5.0.0-alpha.32",
26
- "@testing-library/jest-dom": "^5.12.0",
27
- "@testing-library/react": "^11.2.7",
28
- "@testing-library/user-event": "^13.1.9",
19
+ "@babel/plugin-transform-modules-commonjs": "^7.23.0",
20
+ "@emotion/react": "^11.11.1",
21
+ "@emotion/styled": "^11.11.0",
22
+ "@mui/icons-material": "^5.14.11",
23
+ "@mui/material": "^5.14.11",
24
+ "@mui/x-data-grid": "^6.16.0",
25
+ "@mui/x-date-pickers": "^6.16.0",
26
+ "@testing-library/jest-dom": "^6.1.3",
27
+ "@testing-library/react": "^14.0.0",
28
+ "@testing-library/user-event": "^14.5.1",
29
29
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
30
- "date-fns": "^2.21.3",
30
+ "date-fns": "^2.30.0",
31
+ "dayjs": "^1.11.10",
31
32
  "lodash": "^4.17.21",
32
33
  "numeral": "^2.0.6",
33
- "prop-types": "^15.7.2",
34
- "react": "^17.0.2",
35
- "react-dom": "^17.0.2",
36
- "react-json-tree": "^0.15.0",
37
- "react-number-format": "^4.6.0",
34
+ "prop-types": "^15.8.1",
35
+ "react": "^18.2.0",
36
+ "react-dom": "^18.2.0",
37
+ "react-json-tree": "^0.18.0",
38
+ "react-number-format": "^5.3.1",
38
39
  "react-scripts": "4.0.3",
39
- "validator": "^13.6.0",
40
- "web-vitals": "^1.1.2"
40
+ "validator": "^13.11.0",
41
+ "web-vitals": "^3.5.0"
41
42
  },
42
43
  "scripts": {
43
44
  "start": "react-scripts start",
@@ -70,19 +71,19 @@
70
71
  ]
71
72
  },
72
73
  "devDependencies": {
73
- "@babel/cli": "^7.14.3",
74
- "@babel/core": "^7.14.3",
75
- "@babel/preset-env": "^7.14.2",
76
- "eslint": "7.27.0",
77
- "eslint-config-airbnb": "^18.2.1",
78
- "eslint-config-prettier": "^8.3.0",
79
- "eslint-plugin-import": "^2.23.3",
80
- "eslint-plugin-jsx-a11y": "^6.4.1",
81
- "eslint-plugin-prettier": "^3.4.0",
82
- "eslint-plugin-react": "^7.23.2",
83
- "eslint-plugin-react-hooks": "^4.2.0",
84
- "prettier": "^2.3.0",
85
- "react-styleguidist": "^11.1.6",
86
- "tinycolor2": "^1.4.2"
74
+ "@babel/cli": "^7.23.0",
75
+ "@babel/core": "^7.23.0",
76
+ "@babel/preset-env": "^7.22.20",
77
+ "eslint": "8.50.0",
78
+ "eslint-config-airbnb": "^19.0.4",
79
+ "eslint-config-prettier": "^9.0.0",
80
+ "eslint-plugin-import": "^2.28.1",
81
+ "eslint-plugin-jsx-a11y": "^6.7.1",
82
+ "eslint-plugin-prettier": "^5.0.0",
83
+ "eslint-plugin-react": "^7.33.2",
84
+ "eslint-plugin-react-hooks": "^4.6.0",
85
+ "prettier": "^3.0.3",
86
+ "react-styleguidist": "^11.2.0",
87
+ "tinycolor2": "^1.6.0"
87
88
  }
88
89
  }
@@ -1,5 +1,11 @@
1
+ const path = require('path');
2
+ const { version } = require('./package.json');
3
+
1
4
  module.exports = {
5
+ version,
6
+ title: 'Dynamic MUI',
2
7
  template: {
8
+ favicon: 'https://geoviewer.io/img/favicon.ico',
3
9
  head: {
4
10
  links: [
5
11
  {
@@ -14,8 +20,48 @@ module.exports = {
14
20
  },
15
21
  },
16
22
  theme: {
23
+ color: {
24
+ // syntax highlighting styles
25
+ codeBackground: '#272C34',
26
+ codeString: '#a6e22e',
27
+ codeKeyword: '#66d9ef',
28
+ codeOperator: '#f8f8f2',
29
+ codePunctuation: '#f8f8f2',
30
+ codeBase: '#f8f8f2',
31
+ codeFunction: '#e6db74',
32
+ codeProperty: '',
33
+ // base: '#51B64B',
34
+ link: '#FFF',
35
+ linkHover: '#DDD',
36
+ sidebarBackground: 'rgb(102 153 0)',
37
+ },
17
38
  fontFamily: {
18
- base: '"Roboto", sans-serif',
39
+ base: '"Open Sans", Roboto, Helvetica, Arial, sans-serif',
40
+ monospace: 'Monaco, Menlo, Courier, monospace',
41
+ },
42
+ fontSize: {
43
+ base: 14,
44
+ text: 16,
45
+ small: 13,
46
+ h1: 48,
47
+ h2: 32,
48
+ h3: 24,
49
+ h4: 18,
50
+ h5: 16,
51
+ h6: 16,
52
+ },
53
+ },
54
+ styles: {
55
+ Logo: {
56
+ // We're changing the LogoRenderer component
57
+ logo: {
58
+ color: 'white',
59
+ // We're changing the rsg--logo-XX class name inside the component
60
+ // animation: '$blink ease-in-out 300ms infinite',
61
+ },
62
+ '@keyframes blink': {
63
+ to: { opacity: 0 },
64
+ },
19
65
  },
20
66
  },
21
67
  pagePerSection: true,
@@ -36,4 +82,6 @@ module.exports = {
36
82
  sectionDepth: 2,
37
83
  },
38
84
  ],
85
+ // Override Styleguidist components
86
+ styleguideComponents: {},
39
87
  };
package/themes/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createMuiTheme } from '@material-ui/core';
1
+ import { createMuiTheme } from '@mui/material';
2
2
  import defaultTheme from './default';
3
3
 
4
4
  const overrides = {
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _logo = _interopRequireDefault(require("./logo.svg"));
9
-
10
- require("./App.css");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function App() {
15
- return /*#__PURE__*/React.createElement("div", {
16
- className: "App"
17
- }, /*#__PURE__*/React.createElement("header", {
18
- className: "App-header"
19
- }, /*#__PURE__*/React.createElement("img", {
20
- src: _logo.default,
21
- className: "App-logo",
22
- alt: "logo"
23
- }), /*#__PURE__*/React.createElement("p", null, "Edit ", /*#__PURE__*/React.createElement("code", null, "src/App.js"), " and save to reload."), /*#__PURE__*/React.createElement("a", {
24
- className: "App-link",
25
- href: "https://reactjs.org",
26
- target: "_blank",
27
- rel: "noopener noreferrer"
28
- }, "Learn React")));
29
- }
30
-
31
- var _default = App;
32
- exports.default = _default;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- var _react = require("@testing-library/react");
4
-
5
- var _App = _interopRequireDefault(require("./App"));
6
-
7
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
-
9
- test('renders learn react link', function () {
10
- (0, _react.render)( /*#__PURE__*/React.createElement(_App.default, null));
11
-
12
- var linkElement = _react.screen.getByText(/learn react/i);
13
-
14
- expect(linkElement).toBeInTheDocument();
15
- });
@@ -1,74 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = DateRangePicker;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
11
-
12
- var _AdapterDateFns = _interopRequireDefault(require("@material-ui/lab/AdapterDateFns"));
13
-
14
- var _LocalizationProvider = _interopRequireDefault(require("@material-ui/lab/LocalizationProvider"));
15
-
16
- var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
17
-
18
- var _propTypes = _interopRequireDefault(require("prop-types"));
19
-
20
- var _helper = require("../../../util/helper");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
28
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
-
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
-
34
- function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- function DateRangePicker(_ref) {
39
- var attributes = _ref.attributes;
40
- var _attributes$MuiAttrib = attributes.MuiAttributes,
41
- MuiAttributes = _attributes$MuiAttrib === void 0 ? {} : _attributes$MuiAttrib,
42
- _attributes$name = attributes.name,
43
- name = _attributes$name === void 0 ? 'DateRangePicker' : _attributes$name;
44
-
45
- var _React$useState = _react.default.useState([null, null]),
46
- _React$useState2 = _slicedToArray(_React$useState, 2),
47
- value = _React$useState2[0],
48
- setValue = _React$useState2[1];
49
-
50
- var MuiDateRangePicker = (0, _helper.DateComponent)(name);
51
- return /*#__PURE__*/_react.default.createElement(_LocalizationProvider.default, {
52
- dateAdapter: _AdapterDateFns.default
53
- }, /*#__PURE__*/_react.default.createElement(MuiDateRangePicker, _extends({}, MuiAttributes, {
54
- value: value,
55
- onChange: function onChange(newValue) {
56
- setValue(newValue);
57
- },
58
- renderInput: function renderInput(startProps, endProps) {
59
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_TextField.default, startProps), /*#__PURE__*/_react.default.createElement(_Box.default, {
60
- sx: {
61
- mx: 2
62
- }
63
- }, " to "), /*#__PURE__*/_react.default.createElement(_TextField.default, endProps));
64
- }
65
- })));
66
- }
67
-
68
- DateRangePicker.propTypes = process.env.NODE_ENV !== "production" ? {
69
- /** Attributes for Date Range */
70
- attributes: _propTypes.default.objectOf(_propTypes.default.object)
71
- } : {};
72
- DateRangePicker.defaultProps = {
73
- attributes: {}
74
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _react = _interopRequireDefault(require("react"));
4
-
5
- var _reactDom = _interopRequireDefault(require("react-dom"));
6
-
7
- require("./index.css");
8
-
9
- var _App = _interopRequireDefault(require("./App"));
10
-
11
- var _reportWebVitals = _interopRequireDefault(require("./reportWebVitals"));
12
-
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
- _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_react.default.StrictMode, null, /*#__PURE__*/_react.default.createElement(_App.default, null)), document.getElementById('root')); // If you want to start measuring performance in your app, pass a function
16
- // to log results (for example: reportWebVitals(console.log))
17
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
18
-
19
-
20
- (0, _reportWebVitals.default)();