@lowentry/mui 1.2.2 → 1.2.4
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/DatePicker/index.js +1 -1
- package/DatePicker/index.js.map +1 -1
- package/Dialog/index.js.map +1 -1
- package/InitiallyInvisible/index.js.map +1 -1
- package/LoadingSpinner/index.js +1 -1
- package/{LoadingSpinner-8d84b138.js → LoadingSpinner-9881bf40.js} +1 -1
- package/LoadingSpinner-9881bf40.js.map +1 -0
- package/LoadingSpinnerWidget/index.js +1 -1
- package/MenuButton/index.js.map +1 -1
- package/MuiRoot/index.js +1 -1
- package/MuiRoot/index.js.map +1 -1
- package/NumericTextField/index.js.map +1 -1
- package/RemovableNumericTextField/index.js.map +1 -1
- package/RemovableTextField/index.js.map +1 -1
- package/Submittable/index.js.map +1 -1
- package/TextField/index.js.map +1 -1
- package/index.js +1 -1
- package/package.json +4 -3
- package/src/index.js +12 -12
- package/warning-4f66c7b7.js +15 -0
- package/warning-4f66c7b7.js.map +1 -0
- package/LoadingSpinner-8d84b138.js.map +0 -1
- /package/src/{widgets → components}/DatePicker.jsx +0 -0
- /package/src/{widgets → components}/DatePicker.less +0 -0
- /package/src/{widgets → components}/Dialog.jsx +0 -0
- /package/src/{widgets → components}/InitiallyInvisible.jsx +0 -0
- /package/src/{widgets → components}/LoadingSpinner/LoadingSpinner.jsx +0 -0
- /package/src/{widgets → components}/LoadingSpinner/LoadingSpinner.less +0 -0
- /package/src/{widgets → components}/LoadingSpinner.jsx +0 -0
- /package/src/{widgets → components}/LoadingSpinnerWidget.jsx +0 -0
- /package/src/{widgets → components}/MenuButton.jsx +0 -0
- /package/src/{widgets → components}/MuiRoot.jsx +0 -0
- /package/src/{widgets → components}/MuiRoot.less +0 -0
- /package/src/{widgets → components}/NumericTextField.jsx +0 -0
- /package/src/{widgets → components}/RemovableNumericTextField.jsx +0 -0
- /package/src/{widgets → components}/RemovableTextField.jsx +0 -0
- /package/src/{widgets → components}/Submittable.jsx +0 -0
- /package/src/{widgets → components}/TextField.jsx +0 -0
- /package/src/{widgets → components}/TextField.less +0 -0
package/Dialog/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Dialog.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {STRING} from '@lowentry/utils';\nimport {Dialog as MuiDialog} from '@mui/material';\n\n\nconst Dialog = LeRed.memo(({onClose, children, ...props}) =>\n{\n\tconst onClosed = LeRed.useCallback((event, reason) =>\n\t{\n\t\tif(!STRING(reason).toLowerCase().includes('escape'))\n\t\t{\n\t\t\t// prevent closing when clicking on the backdrop, only allow escape-key closing\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(onClose)\n\t\t{\n\t\t\tonClose(event, reason);\n\t\t}\n\t}, [onClose]);\n\t\n\t\n\treturn (<>\n\t\t<MuiDialog onClose={onClosed} {...props}>\n\t\t\t{children}\n\t\t</MuiDialog>\n\t</>);\n});\nexport default Dialog;\n"],"names":["Dialog","LeRed","memo","_ref","onClose","children","props","_objectWithoutProperties","_excluded","onClosed","useCallback","event","reason","STRING","toLowerCase","includes","React","createElement","Fragment","MuiDialog","_extends"],"mappings":"wZAMMA,EAASC,EAAKA,MAACC,MAAK,SAAAC,GAC1B,IAD4BC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAaC,EAAKC,EAAA,QAAAJ,EAAAK,GAEhDC,EAAWR,EAAKA,MAACS,aAAY,SAACC,EAAOC,GAEtCC,EAAMA,OAACD,GAAQE,cAAcC,SAAS,WAMvCX,GAEFA,EAAQO,EAAOC,EAEjB,GAAG,CAACR,IAGJ,OAAQY,EAAA,QAAAC,cAAAD,EAAAA,QAAAE,SACPF,KAAAA,UAAAC,cAACE,EAASnB,OAAAoB,UAAA,CAAChB,QAASK,GAAcH,GAChCD,GAGJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/InitiallyInvisible.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {LeUtils, INT_LAX} from '@lowentry/utils';\n\n\nconst InitiallyInvisible = LeRed.memo(({frames, transition, style, children, opacityKey, ...other}) =>\n{\n\tconst [opacity, setOpacity] = LeRed.useState(0);\n\t\n\t\n\tLeRed.useEffect(() =>\n\t{\n\t\tsetOpacity(0);\n\t\treturn LeUtils.setAnimationFrameTimeout(() => setOpacity(1), Math.max((opacityKey ? 2 : 0), INT_LAX(frames))).remove;\n\t}, [opacityKey]);\n\t\n\t\n\treturn (<div style={{width:'100%', height:'100%', opacity, transition:(((opacity > 0) && transition) ? ('opacity ' + transition) : 'none'), ...(style ?? {})}} {...other}>{children}</div>);\n});\nexport default InitiallyInvisible;\n"],"names":["InitiallyInvisible","LeRed","memo","_ref","frames","transition","style","children","opacityKey","other","_objectWithoutProperties","_excluded","_LeRed$useState","useState","_LeRed$useState2","_slicedToArray","opacity","setOpacity","useEffect","LeUtils","setAnimationFrameTimeout","Math","max","INT_LAX","remove","React","createElement","_extends","_objectSpread","width","height"],"mappings":"wlCAKMA,IAAAA,EAAqBC,EAAKA,MAACC,MAAK,SAAAC,GACtC,IADwCC,EAAMD,EAANC,OAAQC,EAAUF,EAAVE,WAAYC,EAAKH,EAALG,MAAOC,EAAQJ,EAARI,SAAUC,EAAUL,EAAVK,WAAeC,EAAKC,EAAA,QAAAP,EAAAQ,GAEhGC,EAA8BX,EAAAA,MAAMY,SAAS,GAAEC,EAAAC,EAAAA,QAAAH,EAAA,GAAxCI,EAAOF,EAAA,GAAEG,EAAUH,EAAA,GAU1B,OAPAb,EAAKA,MAACiB,WAAU,WAGf,OADAD,EAAW,GACJE,EAAAA,QAAQC,0BAAyB,WAAA,OAAMH,EAAW,EAAE,GAAEI,KAAKC,IAAKd,EAAa,EAAI,EAAIe,EAAAA,QAAQnB,KAAUoB,MAC/G,GAAG,CAAChB,IAGIiB,UAAAC,cAAA,MAAAC,UAAA,CAAKrB,MAAKsB,EAAA,CAAGC,MAAM,OAAQC,OAAO,OAAQd,QAAAA,EAASX,WAAcW,EAAU,GAAMX,EAAe,WAAaA,EAAc,QAAaC,QAAAA,EAAS,KAAUG,GAAQF,EAC5K"}
|
package/LoadingSpinner/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../LoadingSpinner-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../LoadingSpinner-9881bf40.js");require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react"),require("@lowentry/react-redux"),require("@mui/material"),require("../style-inject.es-dcee06b6.js"),exports.default=e.LoadingSpinner;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("@babel/runtime/helpers/extends"),r=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("react"),i=require("@lowentry/react-redux"),o=require("@mui/material"),l=require("./style-inject.es-dcee06b6.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),c=u(r),s=u(t),p=u(n);l.styleInject(".lowentry-mui--loading-spinner{color:hsla(0,0%,100%,.04)}.lowentry-mui--loading-spinner.lowentry-mui--loading-spinner--transparent{background:transparent}");var d=["type","className","sx","children"];function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){c.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var m={},g=i.LeRed.memo((function(e){var r=e.type;return i.LeRed.useEffect((function(){return function(e){var r=e.type;m[r]=(m[r]||0)+1,1===m[r]&&i.LeRed.trigger("lowentry-mui--loading-spinner--"+r)}({type:r}),function(){return function(e){var r=e.type;m[r]=(m[r]||1)-1,0===m[r]&&i.LeRed.trigger("lowentry-mui--loading-spinner--"+r)}({type:r})}}),[]),null})),b=i.LeRed.memo((function(e){var r=e.type,t=e.className,n=e.sx;e.children;var l=s.default(e,d);return i.LeRed.useTriggerable("lowentry-mui--loading-spinner--"+r),p.default.createElement(p.default.Fragment,null,p.default.createElement(o.Backdrop,a.default({className:"lowentry-mui--loading-spinner lowentry-mui--loading-spinner--"+r+" "+(null!=t?t:""),sx:y({zIndex:function(e){return e.zIndex.drawer+1}},null!=n?n:{}),open:(m[r]||0)>0},l),p.default.createElement(o.CircularProgress,{color:"inherit",size:"min(120px,30vw)"})))}));exports.LoadingSpinner=g,exports.LoadingSpinnerWidget=b;
|
|
2
|
-
//# sourceMappingURL=LoadingSpinner-
|
|
2
|
+
//# sourceMappingURL=LoadingSpinner-9881bf40.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner-9881bf40.js","sources":["src/components/LoadingSpinner/LoadingSpinner.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {Backdrop, CircularProgress} from '@mui/material';\nimport './LoadingSpinner.less';\n\n\nlet loadingSpinnerCount = {};\nlet loadingSpinnerCountNonTransparent = 0;\n\nconst LoadingSpinnerGrab = ({type}) =>\n{\n\tloadingSpinnerCount[type] = (loadingSpinnerCount[type] || 0) + 1;\n\tif(loadingSpinnerCount[type] === 1)\n\t{\n\t\tLeRed.trigger('lowentry-mui--loading-spinner--' + type);\n\t}\n};\n\nconst LoadingSpinnerRelease = ({type}) =>\n{\n\tloadingSpinnerCount[type] = (loadingSpinnerCount[type] || 1) - 1;\n\tif(loadingSpinnerCount[type] === 0)\n\t{\n\t\tLeRed.trigger('lowentry-mui--loading-spinner--' + type);\n\t}\n};\n\n\nexport const LoadingSpinner = LeRed.memo(({type}) =>\n{\n\tLeRed.useEffect(() =>\n\t{\n\t\tLoadingSpinnerGrab({type});\n\t\treturn () => LoadingSpinnerRelease({type});\n\t}, []);\n\t\n\treturn null;\n});\n\n\nexport const LoadingSpinnerWidget = LeRed.memo(({type, className, sx, children, ...props}) =>\n{\n\tLeRed.useTriggerable('lowentry-mui--loading-spinner--' + type);\n\t\n\treturn (<>\n\t\t<Backdrop className={'lowentry-mui--loading-spinner lowentry-mui--loading-spinner--' + type + ' ' + (className ?? '')} sx={{zIndex:(theme) => theme.zIndex.drawer + 1, ...(sx ?? {})}} open={(loadingSpinnerCount[type] || 0) > 0} {...props}>\n\t\t\t<CircularProgress color=\"inherit\" size=\"min(120px,30vw)\"/>\n\t\t</Backdrop>\n\t</>);\n});\n"],"names":["loadingSpinnerCount","LoadingSpinner","LeRed","memo","_ref3","type","useEffect","_ref","trigger","LoadingSpinnerGrab","_ref2","LoadingSpinnerRelease","LoadingSpinnerWidget","_ref4","className","sx","children","props","_objectWithoutProperties","_excluded","useTriggerable","React","createElement","Fragment","Backdrop","_extends","_objectSpread","zIndex","theme","drawer","open","CircularProgress","color","size"],"mappings":"8qCAMA,IAAIA,EAAsB,CAAA,EAsBbC,EAAiBC,EAAKA,MAACC,MAAK,SAAAC,GACzC,IAD2CC,EAAID,EAAJC,KAQ1C,OANAH,EAAKA,MAACI,WAAU,WAGf,OAxByB,SAAHC,GACxB,IAD6BF,EAAIE,EAAJF,KAE5BL,EAAoBK,IAASL,EAAoBK,IAAS,GAAK,EAC9B,IAA9BL,EAAoBK,IAEtBH,EAAAA,MAAMM,QAAQ,kCAAoCH,EAEpD,CAgBEI,CAAmB,CAACJ,KAAAA,IACb,WAAA,OAfqB,SAAHK,GAC3B,IADgCL,EAAIK,EAAJL,KAE/BL,EAAoBK,IAASL,EAAoBK,IAAS,GAAK,EAC9B,IAA9BL,EAAoBK,IAEtBH,EAAAA,MAAMM,QAAQ,kCAAoCH,EAEpD,CAQeM,CAAsB,CAACN,KAAAA,GAAM,CAC1C,GAAE,IAEI,IACR,IAGaO,EAAuBV,EAAKA,MAACC,MAAK,SAAAU,GAC/C,IADiDR,EAAIQ,EAAJR,KAAMS,EAASD,EAATC,UAAWC,EAAEF,EAAFE,GAAYF,EAARG,SAAaC,IAAAA,EAAKC,EAAAA,QAAAL,EAAAM,GAIvF,OAFAjB,EAAAA,MAAMkB,eAAe,kCAAoCf,GAEjDgB,EAAA,QAAAC,cAAAD,EAAAA,QAAAE,SACPF,KAAAA,UAAAC,cAACE,EAAQA,SAAAC,UAAA,CAACX,UAAW,gEAAkET,EAAO,KAAOS,QAAAA,EAAa,IAAKC,GAAEW,EAAA,CAAGC,OAAO,SAACC,GAAK,OAAKA,EAAMD,OAAOE,OAAS,CAAC,GAAMd,QAAAA,EAAM,IAAMe,MAAO9B,EAAoBK,IAAS,GAAK,GAAOY,GACtOI,UAAAC,cAACS,EAAAA,iBAAgB,CAACC,MAAM,UAAUC,KAAK,qBAG1C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../LoadingSpinner-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../LoadingSpinner-9881bf40.js");require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react"),require("@lowentry/react-redux"),require("@mui/material"),require("../style-inject.es-dcee06b6.js"),exports.default=e.LoadingSpinnerWidget;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/MenuButton/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/MenuButton.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {LeUtils, ARRAY} from '@lowentry/utils';\nimport {Button, Menu} from '@mui/material';\n\n\nconst MenuButton = LeRed.memo(({icon, className, ref, onClick, onClose, children, ...props}) =>\n{\n\tconst buttonRef = LeRed.useRef();\n\tconst [open, setOpen] = LeRed.useState(false);\n\t\n\t\n\tconst onClicked = LeRed.useCallback((event) =>\n\t{\n\t\tsetOpen(true);\n\t\t\n\t\tif(onClick)\n\t\t{\n\t\t\tonClick(event);\n\t\t}\n\t}, [onClick]);\n\t\n\t\n\tconst onClosed = LeRed.useCallback((event) =>\n\t{\n\t\tsetOpen(false);\n\t\t\n\t\tif(onClose)\n\t\t{\n\t\t\tonClose(event);\n\t\t}\n\t}, [onClose]);\n\t\n\t\n\treturn (<>\n\t\t<Button ref={LeRed.mergeRefs(buttonRef, ref)} className={'lowentry-mui--menu-button allow-mobile-hover ' + (className ?? '')} variant=\"text\" color=\"primary\" onClick={onClicked} {...props}>{icon}</Button>\n\t\t<Menu anchorEl={buttonRef.current} open={open} onClose={onClosed}>\n\t\t\t{LeUtils.mapToArray(ARRAY(children), (child, index) => !!child && LeRed.cloneElement(child, {\n\t\t\t\tkey: index,\n\t\t\t\tonClick: () =>\n\t\t\t\t {\n\t\t\t\t\t setOpen(false);\n\t\t\t\t\t if(child?.props?.onClick)\n\t\t\t\t\t {\n\t\t\t\t\t\t child.props.onClick();\n\t\t\t\t\t }\n\t\t\t\t },\n\t\t\t\tdisabled:(typeof child?.props?.disabled !== 'undefined') ? child.props.disabled : !child?.props?.onClick,\n\t\t\t}))}\n\t\t</Menu>\n\t</>);\n});\nexport default MenuButton;\n"],"names":["MenuButton","LeRed","memo","_ref","icon","className","ref","onClick","onClose","children","props","_objectWithoutProperties","_excluded","buttonRef","useRef","_LeRed$useState","useState","_LeRed$useState2","_slicedToArray","open","setOpen","onClicked","useCallback","event","onClosed","React","createElement","Fragment","Button","_extends","mergeRefs","variant","color","Menu","anchorEl","current","LeUtils","mapToArray","ARRAY","child","index","_child$props2","_child$props3","cloneElement","key","_child$props","disabled"],"mappings":"ofAMMA,EAAaC,EAAKA,MAACC,MAAK,SAAAC,GAC9B,IADgCC,EAAID,EAAJC,KAAMC,EAASF,EAATE,UAAWC,EAAGH,EAAHG,IAAKC,EAAOJ,EAAPI,QAASC,EAAOL,EAAPK,QAASC,EAAQN,EAARM,SAAaC,EAAKC,EAAA,QAAAR,EAAAS,GAEnFC,EAAYZ,QAAMa,SACxBC,EAAwBd,EAAAA,MAAMe,UAAS,GAAMC,EAAAC,EAAAA,QAAAH,EAAA,GAAtCI,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAGdI,EAAYpB,EAAAA,MAAMqB,aAAY,SAACC,GAEpCH,GAAQ,GAELb,GAEFA,EAAQgB,EAEV,GAAG,CAAChB,IAGEiB,EAAWvB,EAAAA,MAAMqB,aAAY,SAACC,GAEnCH,GAAQ,GAELZ,GAEFA,EAAQe,EAEV,GAAG,CAACf,IAGJ,OAAQiB,EAAA,QAAAC,cAAAD,EAAAA,QAAAE,SACPF,KAAAA,UAAAC,cAACE,EAAMA,OAAAC,UAAA,CAACvB,IAAKL,EAAKA,MAAC6B,UAAUjB,EAAWP,GAAMD,UAAW,iDAAmDA,QAAAA,EAAa,IAAK0B,QAAQ,OAAOC,MAAM,UAAUzB,QAASc,GAAeX,GAAQN,GAC7LqB,EAAAA,QAAAC,cAACO,EAAAA,KAAI,CAACC,SAAUrB,EAAUsB,QAAShB,KAAMA,EAAMX,QAASgB,GACtDY,EAAAA,QAAQC,WAAWC,EAAKA,MAAC7B,IAAW,SAAC8B,EAAOC,GAAK,IAAAC,EAAAC,EAAA,QAAOH,GAAStC,QAAM0C,aAAaJ,EAAO,CAC3FK,IAASJ,EACTjC,QAAS,WACA,IAAAsC,EACCzB,GAAQ,GACLmB,iBAAKM,EAALN,EAAO7B,aAAK,IAAAmC,GAAZA,EAActC,SAEhBgC,EAAM7B,MAAMH,SAEb,EACVuC,cAA4C,KAA3BP,iBAAKE,EAALF,EAAO7B,aAAK,IAAA+B,OAAA,EAAZA,EAAcK,UAA4BP,EAAM7B,MAAMoC,WAAYP,SAAY,QAAPG,EAALH,EAAO7B,aAAPgC,IAAYA,GAAZA,EAAcnC,UAChG,KAGL"}
|
package/MuiRoot/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/objectWithoutProperties"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/objectWithoutProperties"),s=require("react"),i=require("@lowentry/react-redux"),a=require("@mui/material"),r=require("../style-inject.es-dcee06b6.js"),n=require("../warning-4f66c7b7.js"),o=require("@babel/runtime/helpers/esm/extends"),h=require("dayjs"),d=require("dayjs/plugin/weekOfYear"),u=require("dayjs/plugin/customParseFormat"),l=require("dayjs/plugin/localizedFormat"),f=require("dayjs/plugin/isBetween"),m=require("dayjs/plugin/advancedFormat");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"),require("@mui/material/styles"),require("react/jsx-runtime");var y=c(e),T=c(t),g=c(s),p=c(o),M=c(h),b=c(d),O=c(u),j=c(l),D=c(f),Y=c(m);M.default.extend(j.default),M.default.extend(b.default),M.default.extend(D.default),M.default.extend(Y.default);const z=n.buildWarning(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),w={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},k={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},C=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),L=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class v{constructor({locale:e,formats:t}={}){var s,i;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=w,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>void 0!==M.default.utc,this.hasTimezonePlugin=()=>void 0!==M.default.tz,this.isSame=(e,t,s)=>{const i=this.setTimezone(t,this.getTimezone(e));return e.format(s)===i.format(s)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return M.default.tz.guess();default:return e}},this.createSystemDate=e=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=M.default.tz.guess();return"UTC"!==t?M.default.tz(e,t):M.default(e)}return M.default(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(C);return M.default.utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(C);if(!this.hasTimezonePlugin())throw new Error(L);const s=void 0!==e&&!e.endsWith("Z");return M.default(e).tz(this.cleanTimezone(t),s)},this.getLocaleFormats=()=>{const e=M.default.Ls;let t=e[this.locale||"en"];return void 0===t&&(z(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){const s=e.tz(this.cleanTimezone(t),!0);if((s.$offset??0)===(e.$offset??0))return e;e.$offset=s.$offset}return e},this.date=(e,t="default")=>{if(null===e)return null;let s;return s="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?s:s.locale(this.locale)},this.getInvalidDate=()=>M.default(new Date("Invalid date")),this.getTimezone=e=>{if(this.hasTimezonePlugin()){const t=e.$x?.$timezone;if(t)return t}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(C);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(L)}return M.default.tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,s,i)=>{const a=i&&i.toUpperCase();return s||t[i]||t[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,s)=>t||s.slice(1)))}))},this.isValid=e=>null!=e&&e.isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&e.toDate().getTime()===t.toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,[t,s])=>e>=t&&e<=s,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getWeekArray=e=>{const t=this.setLocaleToValue(e),s=this.startOfWeek(this.startOfMonth(t)),i=this.endOfWeek(this.endOfMonth(t));let a=0,r=s;const n=[];for(;r<i;){const e=Math.floor(a/7);n[e]=n[e]||[],n[e].push(r),r=this.addDays(r,1),a+=1}return n},this.getWeekNumber=e=>e.week(),this.getYearRange=([e,t])=>{const s=this.startOfYear(e),i=this.endOfYear(t),a=[];let r=s;for(;this.isBefore(r,i);)a.push(r),r=this.addYears(r,1);return a},this.dayjs=(s=M.default,(i=e)?(...e)=>s(...e).locale(i):s),this.locale=e,this.formats=p.default({},k,t),M.default.extend(O.default)}getDayOfWeek(e){return e.day()+1}}r.styleInject(".lowentry-mui--mui-root{height:100%;width:100%}@media not (hover:hover),not (pointer:fine){.lowentry-mui--mui-root .MuiButtonBase-root:not(.allow-mobile-hover):hover{background-color:hsla(0,0%,100%,0)!important}}");var x=["theme","className","children"],P=i.LeRed.memo((function(e){var t=e.theme,s=e.className,i=e.children,r=T.default(e,x);return g.default.createElement(g.default.Fragment,null,g.default.createElement(a.CssBaseline,null),g.default.createElement(a.ThemeProvider,{theme:t},g.default.createElement(n.LocalizationProvider,{dateAdapter:v},g.default.createElement("div",y.default({className:"lowentry-mui--mui-root "+(null!=s?s:"")},r),i))))}));exports.default=P;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/MuiRoot/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/widgets/MuiRoot.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {CssBaseline, ThemeProvider} from '@mui/material';\nimport {LocalizationProvider} from '@mui/x-date-pickers';\nimport {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';\nimport './MuiRoot.less';\n\n\nconst MuiRoot = LeRed.memo(({theme, className, children, ...props}) =>\n{\n\treturn (<>\n\t\t<CssBaseline/>\n\t\t<ThemeProvider theme={theme}>\n\t\t\t<LocalizationProvider dateAdapter={AdapterDayjs}>\n\t\t\t\t<div className={'lowentry-mui--mui-root ' + (className ?? '')} {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</LocalizationProvider>\n\t\t</ThemeProvider>\n\t</>);\n});\nexport default MuiRoot;\n"],"names":["MuiRoot","LeRed","memo","_ref","theme","className","children","props","_objectWithoutProperties","_excluded","React","createElement","Fragment","CssBaseline","ThemeProvider","LocalizationProvider","dateAdapter","AdapterDayjs","_extends"],"mappings":"0uBAQMA,EAAUC,EAAKA,MAACC,MAAK,SAAAC,GAC3B,IAD6BC,EAAKD,EAALC,MAAOC,EAASF,EAATE,UAAWC,EAAQH,EAARG,SAAaC,EAAKC,EAAA,QAAAL,EAAAM,GAEhE,OAAQC,EAAA,QAAAC,cAAAD,UAAAE,cACPF,EAAAA,QAAAC,cAACE,EAAWA,kBACZH,EAAAA,QAAAC,cAACG,EAAAA,cAAa,CAACV,MAAOA,GACrBM,EAAA,QAAAC,cAACI,uBAAoB,CAACC,YAAaC,EAAAA,cAClCP,UAAAC,cAAA,MAAAO,UAAA,CAAKb,UAAW,2BAA6BA,QAAAA,EAAa,KAASE,GACjED,KAKN"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js","../src/components/MuiRoot.jsx"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* eslint-disable class-methods-use-this */\nimport defaultDayjs from 'dayjs';\nimport weekOfYearPlugin from 'dayjs/plugin/weekOfYear';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween';\nimport advancedFormatPlugin from 'dayjs/plugin/advancedFormat';\nimport { buildWarning } from '../internals/utils/warning';\ndefaultDayjs.extend(localizedFormatPlugin);\ndefaultDayjs.extend(weekOfYearPlugin);\ndefaultDayjs.extend(isBetweenPlugin);\ndefaultDayjs.extend(advancedFormatPlugin);\nconst localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', \"Or you forget to import the locale from 'dayjs/locale/{localeUsed}'\", 'fallback on English locale']);\nconst formatTokenMap = {\n // Year\n YY: 'year',\n YYYY: {\n sectionType: 'year',\n contentType: 'digit',\n maxLength: 4\n },\n // Month\n M: {\n sectionType: 'month',\n contentType: 'digit',\n maxLength: 2\n },\n MM: 'month',\n MMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n MMMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n // Day of the month\n D: {\n sectionType: 'day',\n contentType: 'digit',\n maxLength: 2\n },\n DD: 'day',\n Do: {\n sectionType: 'day',\n contentType: 'digit-with-letter'\n },\n // Day of the week\n d: {\n sectionType: 'weekDay',\n contentType: 'digit',\n maxLength: 2\n },\n dd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n ddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n dddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n // Meridiem\n A: 'meridiem',\n a: 'meridiem',\n // Hours\n H: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n HH: 'hours',\n h: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n hh: 'hours',\n // Minutes\n m: {\n sectionType: 'minutes',\n contentType: 'digit',\n maxLength: 2\n },\n mm: 'minutes',\n // Seconds\n s: {\n sectionType: 'seconds',\n contentType: 'digit',\n maxLength: 2\n },\n ss: 'seconds'\n};\nconst defaultFormats = {\n year: 'YYYY',\n month: 'MMMM',\n monthShort: 'MMM',\n dayOfMonth: 'D',\n dayOfMonthFull: 'Do',\n weekday: 'dddd',\n weekdayShort: 'dd',\n hours24h: 'HH',\n hours12h: 'hh',\n meridiem: 'A',\n minutes: 'mm',\n seconds: 'ss',\n fullDate: 'll',\n keyboardDate: 'L',\n shortDate: 'MMM D',\n normalDate: 'D MMMM',\n normalDateWithWeekday: 'ddd, MMM D',\n fullTime: 'LT',\n fullTime12h: 'hh:mm A',\n fullTime24h: 'HH:mm',\n keyboardDateTime: 'L LT',\n keyboardDateTime12h: 'L hh:mm A',\n keyboardDateTime24h: 'L HH:mm'\n};\nconst MISSING_UTC_PLUGIN = ['Missing UTC plugin', 'To be able to use UTC or timezones, you have to enable the `utc` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc'].join('\\n');\nconst MISSING_TIMEZONE_PLUGIN = ['Missing timezone plugin', 'To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone'].join('\\n');\nconst withLocale = (dayjs, locale) => !locale ? dayjs : (...args) => dayjs(...args).locale(locale);\n/**\n * Based on `@date-io/dayjs`\n *\n * MIT License\n *\n * Copyright (c) 2017 Dmitriy Kovalenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class AdapterDayjs {\n constructor({\n locale: _locale,\n formats\n } = {}) {\n this.isMUIAdapter = true;\n this.isTimezoneCompatible = true;\n this.lib = 'dayjs';\n this.dayjs = void 0;\n this.locale = void 0;\n this.formats = void 0;\n this.escapedCharacters = {\n start: '[',\n end: ']'\n };\n this.formatTokenMap = formatTokenMap;\n this.setLocaleToValue = value => {\n const expectedLocale = this.getCurrentLocaleCode();\n if (expectedLocale === value.locale()) {\n return value;\n }\n return value.locale(expectedLocale);\n };\n this.hasUTCPlugin = () => typeof defaultDayjs.utc !== 'undefined';\n this.hasTimezonePlugin = () => typeof defaultDayjs.tz !== 'undefined';\n this.isSame = (value, comparing, comparisonTemplate) => {\n const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));\n return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);\n };\n /**\n * Replaces \"default\" by undefined and \"system\" by the system timezone before passing it to `dayjs`.\n */\n this.cleanTimezone = timezone => {\n switch (timezone) {\n case 'default':\n {\n return undefined;\n }\n case 'system':\n {\n return defaultDayjs.tz.guess();\n }\n default:\n {\n return timezone;\n }\n }\n };\n this.createSystemDate = value => {\n if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {\n const timezone = defaultDayjs.tz.guess();\n\n // We can't change the system timezone in the tests\n /* istanbul ignore next */\n if (timezone !== 'UTC') {\n return defaultDayjs.tz(value, timezone);\n }\n return defaultDayjs(value);\n }\n return defaultDayjs(value);\n };\n this.createUTCDate = value => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return defaultDayjs.utc(value);\n };\n this.createTZDate = (value, timezone) => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n\n /* istanbul ignore next */\n if (!this.hasTimezonePlugin()) {\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n const keepLocalTime = value !== undefined && !value.endsWith('Z');\n return defaultDayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime);\n };\n this.getLocaleFormats = () => {\n const locales = defaultDayjs.Ls;\n const locale = this.locale || 'en';\n let localeObject = locales[locale];\n if (localeObject === undefined) {\n localeNotFoundWarning();\n localeObject = locales.en;\n }\n return localeObject.formats;\n };\n /**\n * If the new day does not have the same offset as the old one (when switching to summer day time for example),\n * Then dayjs will not automatically adjust the offset (moment does).\n * We have to parse again the value to make sure the `fixOffset` method is applied.\n * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72\n */\n this.adjustOffset = value => {\n if (!this.hasTimezonePlugin()) {\n return value;\n }\n const timezone = this.getTimezone(value);\n if (timezone !== 'UTC') {\n const fixedValue = value.tz(this.cleanTimezone(timezone), true);\n // @ts-ignore\n if ((fixedValue.$offset ?? 0) === (value.$offset ?? 0)) {\n return value;\n }\n // Change only what is needed to avoid creating a new object with unwanted data\n // Especially important when used in an environment where utc or timezone dates are used only in some places\n // Reference: https://github.com/mui/mui-x/issues/13290\n // @ts-ignore\n value.$offset = fixedValue.$offset;\n }\n return value;\n };\n this.date = (value, timezone = 'default') => {\n if (value === null) {\n return null;\n }\n let parsedValue;\n if (timezone === 'UTC') {\n parsedValue = this.createUTCDate(value);\n } else if (timezone === 'system' || timezone === 'default' && !this.hasTimezonePlugin()) {\n parsedValue = this.createSystemDate(value);\n } else {\n parsedValue = this.createTZDate(value, timezone);\n }\n if (this.locale === undefined) {\n return parsedValue;\n }\n return parsedValue.locale(this.locale);\n };\n this.getInvalidDate = () => defaultDayjs(new Date('Invalid date'));\n this.getTimezone = value => {\n if (this.hasTimezonePlugin()) {\n // @ts-ignore\n const zone = value.$x?.$timezone;\n if (zone) {\n return zone;\n }\n }\n if (this.hasUTCPlugin() && value.isUTC()) {\n return 'UTC';\n }\n return 'system';\n };\n this.setTimezone = (value, timezone) => {\n if (this.getTimezone(value) === timezone) {\n return value;\n }\n if (timezone === 'UTC') {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return value.utc();\n }\n\n // We know that we have the UTC plugin.\n // Otherwise, the value timezone would always equal \"system\".\n // And it would be caught by the first \"if\" of this method.\n if (timezone === 'system') {\n return value.local();\n }\n if (!this.hasTimezonePlugin()) {\n if (timezone === 'default') {\n return value;\n }\n\n /* istanbul ignore next */\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n return defaultDayjs.tz(value, this.cleanTimezone(timezone));\n };\n this.toJsDate = value => {\n return value.toDate();\n };\n this.parse = (value, format) => {\n if (value === '') {\n return null;\n }\n return this.dayjs(value, format, this.locale, true);\n };\n this.getCurrentLocaleCode = () => {\n return this.locale || 'en';\n };\n this.is12HourCycleInCurrentLocale = () => {\n /* istanbul ignore next */\n return /A|a/.test(this.getLocaleFormats().LT || '');\n };\n this.expandFormat = format => {\n const localeFormats = this.getLocaleFormats();\n\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n const t = formatBis => formatBis.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));\n return format.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || localeFormats[b] || t(localeFormats[B]);\n });\n };\n this.isValid = value => {\n if (value == null) {\n return false;\n }\n return value.isValid();\n };\n this.format = (value, formatKey) => {\n return this.formatByString(value, this.formats[formatKey]);\n };\n this.formatByString = (value, formatString) => {\n return this.dayjs(value).format(formatString);\n };\n this.formatNumber = numberToFormat => {\n return numberToFormat;\n };\n this.isEqual = (value, comparing) => {\n if (value === null && comparing === null) {\n return true;\n }\n if (value === null || comparing === null) {\n return false;\n }\n return value.toDate().getTime() === comparing.toDate().getTime();\n };\n this.isSameYear = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY');\n };\n this.isSameMonth = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM');\n };\n this.isSameDay = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM-DD');\n };\n this.isSameHour = (value, comparing) => {\n return value.isSame(comparing, 'hour');\n };\n this.isAfter = (value, comparing) => {\n return value > comparing;\n };\n this.isAfterYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();\n };\n this.isAfterDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();\n };\n this.isBefore = (value, comparing) => {\n return value < comparing;\n };\n this.isBeforeYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();\n };\n this.isBeforeDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();\n };\n this.isWithinRange = (value, [start, end]) => {\n return value >= start && value <= end;\n };\n this.startOfYear = value => {\n return this.adjustOffset(value.startOf('year'));\n };\n this.startOfMonth = value => {\n return this.adjustOffset(value.startOf('month'));\n };\n this.startOfWeek = value => {\n return this.adjustOffset(value.startOf('week'));\n };\n this.startOfDay = value => {\n return this.adjustOffset(value.startOf('day'));\n };\n this.endOfYear = value => {\n return this.adjustOffset(value.endOf('year'));\n };\n this.endOfMonth = value => {\n return this.adjustOffset(value.endOf('month'));\n };\n this.endOfWeek = value => {\n return this.adjustOffset(value.endOf('week'));\n };\n this.endOfDay = value => {\n return this.adjustOffset(value.endOf('day'));\n };\n this.addYears = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'year') : value.add(amount, 'year'));\n };\n this.addMonths = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'month') : value.add(amount, 'month'));\n };\n this.addWeeks = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'week') : value.add(amount, 'week'));\n };\n this.addDays = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'day') : value.add(amount, 'day'));\n };\n this.addHours = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'hour') : value.add(amount, 'hour'));\n };\n this.addMinutes = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'minute') : value.add(amount, 'minute'));\n };\n this.addSeconds = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'second') : value.add(amount, 'second'));\n };\n this.getYear = value => {\n return value.year();\n };\n this.getMonth = value => {\n return value.month();\n };\n this.getDate = value => {\n return value.date();\n };\n this.getHours = value => {\n return value.hour();\n };\n this.getMinutes = value => {\n return value.minute();\n };\n this.getSeconds = value => {\n return value.second();\n };\n this.getMilliseconds = value => {\n return value.millisecond();\n };\n this.setYear = (value, year) => {\n return this.adjustOffset(value.set('year', year));\n };\n this.setMonth = (value, month) => {\n return this.adjustOffset(value.set('month', month));\n };\n this.setDate = (value, date) => {\n return this.adjustOffset(value.set('date', date));\n };\n this.setHours = (value, hours) => {\n return this.adjustOffset(value.set('hour', hours));\n };\n this.setMinutes = (value, minutes) => {\n return this.adjustOffset(value.set('minute', minutes));\n };\n this.setSeconds = (value, seconds) => {\n return this.adjustOffset(value.set('second', seconds));\n };\n this.setMilliseconds = (value, milliseconds) => {\n return this.adjustOffset(value.set('millisecond', milliseconds));\n };\n this.getDaysInMonth = value => {\n return value.daysInMonth();\n };\n this.getWeekArray = value => {\n const cleanValue = this.setLocaleToValue(value);\n const start = this.startOfWeek(this.startOfMonth(cleanValue));\n const end = this.endOfWeek(this.endOfMonth(cleanValue));\n let count = 0;\n let current = start;\n const nestedWeeks = [];\n while (current < end) {\n const weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = this.addDays(current, 1);\n count += 1;\n }\n return nestedWeeks;\n };\n this.getWeekNumber = value => {\n return value.week();\n };\n this.getYearRange = ([start, end]) => {\n const startDate = this.startOfYear(start);\n const endDate = this.endOfYear(end);\n const years = [];\n let current = startDate;\n while (this.isBefore(current, endDate)) {\n years.push(current);\n current = this.addYears(current, 1);\n }\n return years;\n };\n this.dayjs = withLocale(defaultDayjs, _locale);\n this.locale = _locale;\n this.formats = _extends({}, defaultFormats, formats);\n\n // Moved plugins to the constructor to allow for users to use options on the library\n // for reference: https://github.com/mui/mui-x/pull/11151\n defaultDayjs.extend(customParseFormatPlugin);\n }\n getDayOfWeek(value) {\n return value.day() + 1;\n }\n}","import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {CssBaseline, ThemeProvider} from '@mui/material';\nimport {LocalizationProvider} from '@mui/x-date-pickers';\nimport {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';\nimport './MuiRoot.less';\n\n\nconst MuiRoot = LeRed.memo(({theme, className, children, ...props}) =>\n{\n\treturn (<>\n\t\t<CssBaseline/>\n\t\t<ThemeProvider theme={theme}>\n\t\t\t<LocalizationProvider dateAdapter={AdapterDayjs}>\n\t\t\t\t<div className={'lowentry-mui--mui-root ' + (className ?? '')} {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</LocalizationProvider>\n\t\t</ThemeProvider>\n\t</>);\n});\nexport default MuiRoot;\n"],"names":["defaultDayjs","extend","localizedFormatPlugin","weekOfYearPlugin","isBetweenPlugin","advancedFormatPlugin","localeNotFoundWarning","buildWarning","formatTokenMap","YY","YYYY","sectionType","contentType","maxLength","M","MM","MMM","MMMM","D","DD","Do","d","dd","ddd","dddd","A","a","H","HH","h","hh","m","mm","s","ss","defaultFormats","year","month","monthShort","dayOfMonth","dayOfMonthFull","weekday","weekdayShort","hours24h","hours12h","meridiem","minutes","seconds","fullDate","keyboardDate","shortDate","normalDate","normalDateWithWeekday","fullTime","fullTime12h","fullTime24h","keyboardDateTime","keyboardDateTime12h","keyboardDateTime24h","MISSING_UTC_PLUGIN","join","MISSING_TIMEZONE_PLUGIN","AdapterDayjs","constructor","locale","_locale","formats","dayjs","this","isMUIAdapter","isTimezoneCompatible","lib","escapedCharacters","start","end","setLocaleToValue","value","expectedLocale","getCurrentLocaleCode","hasUTCPlugin","utc","hasTimezonePlugin","tz","isSame","comparing","comparisonTemplate","comparingInValueTimezone","setTimezone","getTimezone","format","cleanTimezone","timezone","guess","createSystemDate","createUTCDate","Error","createTZDate","keepLocalTime","undefined","endsWith","getLocaleFormats","locales","Ls","localeObject","en","adjustOffset","fixedValue","$offset","date","parsedValue","getInvalidDate","Date","zone","$x","$timezone","isUTC","local","toJsDate","toDate","parse","is12HourCycleInCurrentLocale","test","LT","expandFormat","localeFormats","replace","_","b","B","toUpperCase","slice","isValid","formatKey","formatByString","formatString","formatNumber","numberToFormat","isEqual","getTime","isSameYear","isSameMonth","isSameDay","isSameHour","isAfter","isAfterYear","isAfterDay","isBefore","isBeforeYear","isBeforeDay","isWithinRange","startOfYear","startOf","startOfMonth","startOfWeek","startOfDay","endOfYear","endOf","endOfMonth","endOfWeek","endOfDay","addYears","amount","subtract","Math","abs","add","addMonths","addWeeks","addDays","addHours","addMinutes","addSeconds","getYear","getMonth","getDate","getHours","hour","getMinutes","minute","getSeconds","second","getMilliseconds","millisecond","setYear","set","setMonth","setDate","setHours","hours","setMinutes","setSeconds","setMilliseconds","milliseconds","getDaysInMonth","daysInMonth","getWeekArray","cleanValue","count","current","nestedWeeks","weekNumber","floor","push","getWeekNumber","week","getYearRange","startDate","endDate","years","args","_extends","customParseFormatPlugin","getDayOfWeek","day","MuiRoot","LeRed","memo","_ref","theme","className","children","props","_objectWithoutProperties","_excluded","React","createElement","Fragment","CssBaseline","ThemeProvider","LocalizationProvider","dateAdapter"],"mappings":"82BASAA,EAAAA,QAAaC,OAAOC,EAAAA,SACpBF,EAAAA,QAAaC,OAAOE,EAAAA,SACpBH,EAAAA,QAAaC,OAAOG,EAAAA,SACpBJ,EAAAA,QAAaC,OAAOI,EAAAA,SACpB,MAAMC,EAAwBC,EAAYA,aAAC,CAAC,kCAAmC,mJAAoJ,sEAAuE,+BACpSC,EAAiB,CAErBC,GAAI,OACJC,KAAM,CACJC,YAAa,OACbC,YAAa,QACbC,UAAW,GAGbC,EAAG,CACDH,YAAa,QACbC,YAAa,QACbC,UAAW,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|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/NumericTextField.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {LeUtils, FLOAT_LAX, INT_LAX_ANY} from '@lowentry/utils';\nimport {LeMuiUtils} from '../LeMuiUtils.js';\nimport TextField from './TextField.jsx';\n\n\nconst NumericTextField = LeRed.memo(({decimals, allowZero, allowNegative, value, onChange, onRenderValue, className, inputProps, children, ...props}) =>\n{\n\tif(typeof allowZero === 'undefined')\n\t{\n\t\tallowZero = true;\n\t}\n\tif(typeof allowNegative === 'undefined')\n\t{\n\t\tallowNegative = true;\n\t}\n\tdecimals = INT_LAX_ANY(decimals, 2);\n\t\n\t\n\tconst getVisualValue = (value) =>\n\t{\n\t\tlet text = FLOAT_LAX(LeMuiUtils.purgePrependedHiddenChar(value));\n\t\tif(!allowNegative)\n\t\t{\n\t\t\ttext = Math.abs(text);\n\t\t}\n\t\t\n\t\ttext = text.toFixed(decimals); // rounds it\n\t\ttext = LeUtils.trimEnd(LeUtils.trimEnd(text, '0'), '.');\n\t\tif(!allowZero && (text === '0'))\n\t\t{\n\t\t\ttext = '';\n\t\t}\n\t\treturn text;\n\t};\n\t\n\t\n\tconst [visualValue, setVisualValue] = LeRed.useState(getVisualValue(value));\n\t\n\tLeRed.useEffect(() =>\n\t{\n\t\tsetVisualValue(getVisualValue(value));\n\t}, [value]);\n\t\n\t\n\tconst onChanged = LeRed.useCallback((event) =>\n\t{\n\t\tconst originalTargetValue = event.target.value;\n\t\tconst targetValue = LeMuiUtils.purgePrependedHiddenChar(originalTargetValue);\n\t\t\n\t\tlet text = targetValue;\n\t\tlet val = 0;\n\t\t\n\t\t{// visual >>\n\t\t\tconst minus = text.includes('-');\n\t\t\ttext = text.replace(',', '.').replace(/[^0-9.]/g, '');\n\t\t\tif(text !== '')\n\t\t\t{\n\t\t\t\tval = Math.abs(FLOAT_LAX(text));\n\t\t\t\tif(allowNegative && minus)\n\t\t\t\t{\n\t\t\t\t\tval = -val;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlet stringVal = val.toFixed(decimals + 1); // prevents rounding (by adding an extra digit and then cutting it off)\n\t\t\t\tstringVal = stringVal.substring(0, stringVal.length - 1);\n\t\t\t\t\n\t\t\t\tif(!text.includes('.') || (decimals <= 0))\n\t\t\t\t{\n\t\t\t\t\ttext = stringVal.split('.')[0];\n\t\t\t\t}\n\t\t\t\telse if(text.endsWith('.'))\n\t\t\t\t{\n\t\t\t\t\ttext = stringVal.split('.')[0] + '.';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttext = stringVal.substring(0, stringVal.length - Math.max(0, decimals - text.split('.')[1].length));\n\t\t\t\t}\n\t\t\t\tsetVisualValue(text);\n\t\t\t}\n\t\t}// visual <<\n\t\t\n\t\tif(onChange)\n\t\t{\n\t\t\tif(val !== 0)\n\t\t\t{\n\t\t\t\tif(decimals > 0)\n\t\t\t\t{\n\t\t\t\t\tval = Math.round(val * Math.pow(10, decimals)) / Math.pow(10, decimals);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tval = Math.round(val);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tconst newEvent = {\n\t\t\t\t...event,\n\t\t\t\ttarget:{\n\t\t\t\t\t...event.target,\n\t\t\t\t\tvalue: val,\n\t\t\t\t\tvalueText:text,\n\t\t\t\t\tvalueRaw: originalTargetValue,\n\t\t\t\t},\n\t\t\t};\n\t\t\tonChange(newEvent);\n\t\t}\n\t}, [onChange]);\n\t\n\t\n\treturn (<>\n\t\t<TextField className={'lowentry-mui--numeric-textfield ' + (className ?? '')} type=\"text\" inputProps={{inputMode:'decimal', ...(inputProps ?? {})}} value={!!onRenderValue ? onRenderValue(visualValue) : visualValue} onChange={onChanged} {...props}>{children}</TextField>\n\t</>);\n});\nexport default NumericTextField;\n"],"names":["NumericTextField","LeRed","memo","_ref","decimals","allowZero","allowNegative","value","onChange","onRenderValue","className","inputProps","children","props","_objectWithoutProperties","_excluded","INT_LAX_ANY","getVisualValue","text","FLOAT_LAX","LeMuiUtils","purgePrependedHiddenChar","Math","abs","toFixed","LeUtils","trimEnd","_LeRed$useState","useState","_LeRed$useState2","_slicedToArray","visualValue","setVisualValue","useEffect","onChanged","useCallback","event","originalTargetValue","target","val","minus","includes","replace","stringVal","substring","length","split","endsWith","max","round","pow","newEvent","_objectSpread","valueText","valueRaw","React","createElement","Fragment","TextField","_extends","type","inputMode"],"mappings":"6xCAOMA,IAAAA,EAAmBC,EAAKA,MAACC,MAAK,SAAAC,GACpC,IADsCC,EAAQD,EAARC,SAAUC,EAASF,EAATE,UAAWC,EAAaH,EAAbG,cAAeC,EAAKJ,EAALI,MAAOC,EAAQL,EAARK,SAAUC,EAAaN,EAAbM,cAAeC,EAASP,EAATO,UAAWC,EAAUR,EAAVQ,WAAYC,EAAQT,EAARS,SAAaC,EAAKC,EAAA,QAAAX,EAAAY,QAE1H,IAAdV,IAETA,GAAY,QAEe,IAAlBC,IAETA,GAAgB,GAEjBF,EAAWY,EAAWA,YAACZ,EAAU,GAGjC,IAAMa,EAAiB,SAACV,GAEvB,IAAIW,EAAOC,EAAAA,UAAUC,EAAAA,WAAWC,yBAAyBd,IAYzD,OAXID,IAEHY,EAAOI,KAAKC,IAAIL,IAGjBA,EAAOA,EAAKM,QAAQpB,GACpBc,EAAOO,EAAAA,QAAQC,QAAQD,EAAOA,QAACC,QAAQR,EAAM,KAAM,KAC/Cb,GAAuB,MAATa,IAEjBA,EAAO,IAEDA,GAIRS,EAAsC1B,EAAKA,MAAC2B,SAASX,EAAeV,IAAOsB,EAAAC,EAAAA,QAAAH,EAAA,GAApEI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAElC5B,EAAKA,MAACgC,WAAU,WAEfD,EAAef,EAAeV,GAC/B,GAAG,CAACA,IAGJ,IAAM2B,EAAYjC,EAAAA,MAAMkC,a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A,EAAavB,SAAU0B,GAAerB,GAAQD,GAE1P"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/RemovableNumericTextField.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {LeMuiUtils} from '../LeMuiUtils';\nimport NumericTextField from './NumericTextField.jsx';\n\n\nconst RemovableNumericTextField = LeRed.memo(({onRemove, onChange, onSelect, className, children, ...props}) =>\n{\n\tconst onChanged = LeRed.useCallback((event) =>\n\t{\n\t\tif(event.target.valueRaw === '')\n\t\t{\n\t\t\tif(onRemove)\n\t\t\t{\n\t\t\t\tonRemove(event);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(onChange)\n\t\t{\n\t\t\tonChange(event);\n\t\t}\n\t}, [onRemove, onChange]);\n\t\n\t\n\tconst onSelected = LeRed.useCallback((event) =>\n\t{\n\t\tLeMuiUtils.onSelectEnsureMinimumOffset(1)(event);\n\t\tif(onSelect)\n\t\t{\n\t\t\tonSelect(event);\n\t\t}\n\t}, [onSelect]);\n\t\n\t\n\treturn (<>\n\t\t<NumericTextField className={'lowentry-mui--removable-textfield lowentry-mui--removable-numeric-textfield ' + (className ?? '')} onRenderValue={LeMuiUtils.prependHiddenChar} onChange={onChanged} onSelect={onSelected}>{children}</NumericTextField>\n\t</>);\n});\nexport default RemovableNumericTextField;\n"],"names":["RemovableNumericTextField","LeRed","memo","_ref","onRemove","onChange","onSelect","className","children","_objectWithoutProperties","_excluded","onChanged","useCallback","event","target","valueRaw","onSelected","LeMuiUtils","onSelectEnsureMinimumOffset","React","createElement","Fragment","NumericTextField","onRenderValue","prependHiddenChar"],"mappings":"2qBAMMA,EAA4BC,EAAKA,MAACC,MAAK,SAAAC,GAC7C,IAD+CC,EAAQD,EAARC,SAAUC,EAAQF,EAARE,SAAUC,EAAQH,EAARG,SAAUC,EAASJ,EAATI,UAAWC,EAAQL,EAARK,SAAkBC,EAAA,QAAAN,EAAAO,GAEzG,IAAMC,EAAYV,EAAAA,MAAMW,aAAY,SAACC,GAEP,KAA1BA,EAAMC,OAAOC,SASbV,GAEFA,EAASQ,GATNT,GAEFA,EAASS,EASZ,GAAG,CAACT,EAAUC,IAGRW,EAAaf,EAAAA,MAAMW,aAAY,SAACC,GAErCI,EAAAA,WAAWC,4BAA4B,EAAvCD,CAA0CJ,GACvCP,GAEFA,EAASO,EAEX,GAAG,CAACP,IAGJ,OAAQa,EAAA,QAAAC,cAAAD,UAAAE,SAAA,KACPF,EAAA,QAAAC,cAACE,UAAgB,CAACf,UAAW,gFAAkFA,QAAAA,EAAa,IAAKgB,cAAeN,EAAUA,WAACO,kBAAmBnB,SAAUM,EAAWL,SAAUU,GAAaR,GAE5N"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/RemovableTextField.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {LeMuiUtils} from '../LeMuiUtils';\nimport TextField from './TextField.jsx';\n\n\nconst RemovableTextField = LeRed.memo(({className, value, onRemove, onChange, onSelect, children, ...props}) =>\n{\n\tconst onChanged = LeRed.useCallback((event) =>\n\t{\n\t\tif(event.target.value === '')\n\t\t{\n\t\t\tif(onRemove)\n\t\t\t{\n\t\t\t\tonRemove(event);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(onChange)\n\t\t{\n\t\t\tconst newEvent = {\n\t\t\t\t...event,\n\t\t\t\ttarget:{\n\t\t\t\t\t...event.target,\n\t\t\t\t\tvalue:LeMuiUtils.purgePrependedHiddenChar(event.target.value),\n\t\t\t\t},\n\t\t\t};\n\t\t\tonChange(newEvent);\n\t\t}\n\t}, [onRemove, onChange]);\n\t\n\t\n\tconst onSelected = LeRed.useCallback((event) =>\n\t{\n\t\tLeMuiUtils.onSelectEnsureMinimumOffset(1)(event);\n\t\tif(onSelect)\n\t\t{\n\t\t\tonSelect(event);\n\t\t}\n\t}, [onSelect]);\n\t\n\t\n\treturn (<>\n\t\t<TextField className={'lowentry-mui--removable-textfield ' + (className ?? '')} value={LeMuiUtils.prependHiddenChar(value)} onChange={onChanged} onSelect={onSelected} {...props}>{children}</TextField>\n\t</>);\n});\nexport default RemovableTextField;\n"],"names":["RemovableTextField","LeRed","memo","_ref","className","value","onRemove","onChange","onSelect","children","props","_objectWithoutProperties","_excluded","onChanged","useCallback","event","target","newEvent","_objectSpread","LeMuiUtils","purgePrependedHiddenChar","onSelected","onSelectEnsureMinimumOffset","React","createElement","Fragment","TextField","_extends","prependHiddenChar"],"mappings":"orCAMMA,IAAAA,EAAqBC,EAAKA,MAACC,MAAK,SAAAC,GACtC,IADwCC,EAASD,EAATC,UAAWC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAUC,EAAQL,EAARK,SAAUC,EAAQN,EAARM,SAAaC,EAAKC,EAAA,QAAAR,EAAAS,GAEnGC,EAAYZ,EAAAA,MAAMa,aAAY,SAACC,GAEpC,GAA0B,KAAvBA,EAAMC,OAAOX,OAShB,GAAGE,EACH,CACC,IAAMU,EAAQC,EAAAA,KACVH,GAAK,GAAA,CACRC,OAAME,EAAAA,EACFH,CAAAA,EAAAA,EAAMC,QAAM,GAAA,CACfX,MAAMc,EAAAA,WAAWC,yBAAyBL,EAAMC,OAAOX,WAGzDE,EAASU,EACV,OAjBIX,GAEFA,EAASS,EAgBZ,GAAG,CAACT,EAAUC,IAGRc,EAAapB,EAAAA,MAAMa,aAAY,SAACC,GAErCI,EAAAA,WAAWG,4BAA4B,EAAvCH,CAA0CJ,GACvCP,GAEFA,EAASO,EAEX,GAAG,CAACP,IAGJ,OAAQe,EAAA,QAAAC,cAAAD,EAAAA,QAAAE,SACPF,KAAAA,UAAAC,cAACE,EAAS,QAAAC,UAAA,CAACvB,UAAW,sCAAwCA,QAAAA,EAAa,IAAKC,MAAOc,EAAAA,WAAWS,kBAAkBvB,GAAQE,SAAUM,EAAWL,SAAUa,GAAgBX,GAAQD,GAErL"}
|
package/Submittable/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Submittable.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {Stack} from '@mui/material';\n\n\nconst Submittable = LeRed.memo(({onSubmit, disabled, sx, children, ...props}) =>\n{\n\tconst handleSubmit = LeRed.useCallback((event) =>\n\t{\n\t\ttry\n\t\t{\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t}\n\t\t\n\t\tif(disabled)\n\t\t{\n\t\t\tif(!(typeof disabled === 'function') || disabled())\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(onSubmit)\n\t\t{\n\t\t\tonSubmit(event);\n\t\t}\n\t}, [onSubmit, disabled]);\n\t\n\t\n\treturn (<>\n\t\t<form style={sx ?? {}} onSubmit={handleSubmit}>\n\t\t\t<Stack {...props}>\n\t\t\t\t{children}\n\t\t\t</Stack>\n\t\t</form>\n\t</>);\n});\nexport default Submittable;\n"],"names":["Submittable","LeRed","memo","_ref","onSubmit","disabled","sx","children","props","_objectWithoutProperties","_excluded","handleSubmit","useCallback","event","preventDefault","e","React","createElement","Fragment","style","Stack"],"mappings":"yVAKMA,EAAcC,EAAKA,MAACC,MAAK,SAAAC,GAC/B,IADiCC,EAAQD,EAARC,SAAUC,EAAQF,EAARE,SAAUC,EAAEH,EAAFG,GAAIC,EAAQJ,EAARI,SAAaC,EAAKC,EAAA,QAAAN,EAAAO,GAEpEC,EAAeV,EAAAA,MAAMW,aAAY,SAACC,GAEvC,IAECA,EAAMC,gBACP,CACA,MAAMC,GAEN,CAEGV,IAEuB,mBAAbA,GAA4BA,MAMtCD,GAEFA,EAASS,EAEX,GAAG,CAACT,EAAUC,IAGd,OAAQW,EAAA,QAAAC,cAAAD,UAAAE,SAAA,KACPF,EAAA,QAAAC,cAAA,OAAA,CAAME,MAAOb,QAAAA,EAAM,CAAG,EAACF,SAAUO,GAChCK,EAAAA,QAAAC,cAACG,EAAAA,MAAUZ,EACTD,IAIL"}
|
package/TextField/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/TextField.jsx"],"sourcesContent":["import React from 'react';\nimport {LeRed} from '@lowentry/react-redux';\nimport {TextField as MuiTextField} from '@mui/material';\nimport './TextField.less';\n\n\nconst TextField = LeRed.memo(({className, onClick, children, ...props}) =>\n{\n\tconst onClicked = LeRed.useCallback((event) =>\n\t{\n\t\ttry\n\t\t{\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t}\n\t\t\n\t\tif(onClick)\n\t\t{\n\t\t\tonClick(event);\n\t\t}\n\t}, [onClick]);\n\t\n\t\n\treturn (<>\n\t\t<MuiTextField className={'lowentry-mui--textfield ' + (className ?? '')} autoComplete=\"off\" onClick={onClicked} {...props}>{children}</MuiTextField>\n\t</>);\n});\nexport default TextField;\n"],"names":["TextField","LeRed","memo","_ref","className","onClick","children","props","_objectWithoutProperties","_excluded","onClicked","useCallback","event","stopPropagation","e","React","createElement","Fragment","MuiTextField","_extends","autoComplete"],"mappings":"8eAMMA,EAAYC,EAAKA,MAACC,MAAK,SAAAC,GAC7B,IAD+BC,EAASD,EAATC,UAAWC,EAAOF,EAAPE,QAASC,EAAQH,EAARG,SAAaC,EAAKC,EAAA,QAAAL,EAAAM,GAE9DC,EAAYT,EAAAA,MAAMU,aAAY,SAACC,GAEpC,IAECA,EAAMC,iBACP,CACA,MAAMC,GAEN,CAEGT,GAEFA,EAAQO,EAEV,GAAG,CAACP,IAGJ,OAAQU,EAAA,QAAAC,cAAAD,EAAAA,QAAAE,SACPF,KAAAA,UAAAC,cAACE,EAAYlB,UAAAmB,UAAA,CAACf,UAAW,4BAA8BA,QAAAA,EAAa,IAAKgB,aAAa,MAAMf,QAASK,GAAeH,GAAQD,GAE9H"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./DatePicker/index.js"),r=require("./Dialog/index.js"),i=require("./InitiallyInvisible/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./DatePicker/index.js"),r=require("./Dialog/index.js"),i=require("./InitiallyInvisible/index.js"),u=require("./LoadingSpinner-9881bf40.js"),t=require("./MenuButton/index.js"),a=require("./MuiRoot/index.js"),l=require("./NumericTextField/index.js"),m=require("./RemovableNumericTextField/index.js"),s=require("./RemovableTextField/index.js"),o=require("./Submittable/index.js"),n=require("./TextField/index.js");require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react"),require("@lowentry/react-redux"),require("@lowentry/utils"),require("dayjs"),require("@mui/material"),require("@mui/icons-material/ArrowBackIosNew"),require("@mui/icons-material/ArrowForwardIos"),require("./style-inject.es-dcee06b6.js"),require("@babel/runtime/helpers/esm/extends"),require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"),require("./warning-4f66c7b7.js"),require("@mui/material/styles"),require("react/jsx-runtime"),require("@mui/material/useMediaQuery"),require("@mui/material/Typography"),require("@mui/material/utils"),require("@mui/material/Fade"),require("@babel/runtime/helpers/esm/assertThisInitialized"),require("@babel/runtime/helpers/esm/inheritsLoose"),require("@mui/material/ButtonBase"),require("react-dom"),require("@mui/material/IconButton"),require("@mui/material/TextField"),require("@mui/material/InputLabel"),require("@mui/material/FormHelperText"),require("@mui/material/FormControl"),require("@mui/material/InputAdornment"),require("@mui/material/Grow"),require("@mui/material/Paper"),require("@mui/material/Popper"),require("@mui/material/Unstable_TrapFocus"),require("@mui/material/Button"),require("@mui/material/DialogActions"),require("@mui/material/List"),require("@mui/material/ListItem"),require("@mui/material/Chip"),require("@mui/material/DialogContent"),require("@mui/material/Dialog"),require("dayjs/plugin/weekOfYear"),require("dayjs/plugin/customParseFormat"),require("dayjs/plugin/localizedFormat"),require("dayjs/plugin/isBetween"),require("dayjs/plugin/advancedFormat"),require("./LeMuiUtils-9aff3a32.js"),exports.DatePicker=e.default,exports.Dialog=r.default,exports.InitiallyInvisible=i.default,exports.LoadingSpinner=u.LoadingSpinner,exports.LoadingSpinnerWidget=u.LoadingSpinnerWidget,exports.MenuButton=t.default,exports.MuiRoot=a.default,exports.NumericTextField=l.default,exports.RemovableNumericTextField=m.default,exports.RemovableTextField=s.default,exports.Submittable=o.default,exports.TextField=n.default;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowentry/mui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides utilities for Material UI.",
|
|
6
6
|
"author": "Low Entry",
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"prepublishOnly": "rm -r src && mv dist/* ./ && rm -r dist",
|
|
23
23
|
"test": ""
|
|
24
24
|
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@mui/x-date-pickers": "^7"
|
|
27
|
+
},
|
|
25
28
|
"peerDependencies": {
|
|
26
29
|
"@babel/runtime": "*",
|
|
27
30
|
"@emotion/react": "*",
|
|
@@ -29,9 +32,7 @@
|
|
|
29
32
|
"@lowentry/react-redux": "^1",
|
|
30
33
|
"@lowentry/utils": "*",
|
|
31
34
|
"@mui/icons-material": "*",
|
|
32
|
-
"@mui/lab": "*",
|
|
33
35
|
"@mui/material": "^5",
|
|
34
|
-
"@mui/x-date-pickers": "^7",
|
|
35
36
|
"dayjs": "^1",
|
|
36
37
|
"react": "*",
|
|
37
38
|
"react-dom": "*"
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export {default as DatePicker} from './
|
|
2
|
-
export {default as Dialog} from './
|
|
3
|
-
export {default as InitiallyInvisible} from './
|
|
4
|
-
export {default as LoadingSpinner} from './
|
|
5
|
-
export {default as LoadingSpinnerWidget} from './
|
|
6
|
-
export {default as MenuButton} from './
|
|
7
|
-
export {default as MuiRoot} from './
|
|
8
|
-
export {default as NumericTextField} from './
|
|
9
|
-
export {default as RemovableNumericTextField} from './
|
|
10
|
-
export {default as RemovableTextField} from './
|
|
11
|
-
export {default as Submittable} from './
|
|
12
|
-
export {default as TextField} from './
|
|
1
|
+
export {default as DatePicker} from './components/DatePicker';
|
|
2
|
+
export {default as Dialog} from './components/Dialog';
|
|
3
|
+
export {default as InitiallyInvisible} from './components/InitiallyInvisible';
|
|
4
|
+
export {default as LoadingSpinner} from './components/LoadingSpinner';
|
|
5
|
+
export {default as LoadingSpinnerWidget} from './components/LoadingSpinnerWidget';
|
|
6
|
+
export {default as MenuButton} from './components/MenuButton';
|
|
7
|
+
export {default as MuiRoot} from './components/MuiRoot';
|
|
8
|
+
export {default as NumericTextField} from './components/NumericTextField';
|
|
9
|
+
export {default as RemovableNumericTextField} from './components/RemovableNumericTextField';
|
|
10
|
+
export {default as RemovableTextField} from './components/RemovableTextField';
|
|
11
|
+
export {default as Submittable} from './components/Submittable';
|
|
12
|
+
export {default as TextField} from './components/TextField';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/esm/extends"),r=require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"),t=require("react"),n=require("@mui/material/styles"),o=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var c=a(e),u=a(r),s=i(t);function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,p={exports:{}},y={exports:{}},d={};var m,b,v,h,g,O,x,S,w,j,E,T,P,$,k={};
|
|
2
|
+
/** @license React v16.13.1
|
|
3
|
+
* react-is.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/function _(){return b||(b=1,"production"===process.env.NODE_ENV?y.exports=function(){if(l)return d;l=1;var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var l=e.$$typeof;switch(l){case r:switch(e=e.type){case u:case s:case n:case a:case o:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case b:case m:case i:return e;default:return l}}case t:return l}}}function S(e){return x(e)===s}return d.AsyncMode=u,d.ConcurrentMode=s,d.ContextConsumer=c,d.ContextProvider=i,d.Element=r,d.ForwardRef=f,d.Fragment=n,d.Lazy=b,d.Memo=m,d.Portal=t,d.Profiler=a,d.StrictMode=o,d.Suspense=p,d.isAsyncMode=function(e){return S(e)||x(e)===u},d.isConcurrentMode=S,d.isContextConsumer=function(e){return x(e)===c},d.isContextProvider=function(e){return x(e)===i},d.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},d.isForwardRef=function(e){return x(e)===f},d.isFragment=function(e){return x(e)===n},d.isLazy=function(e){return x(e)===b},d.isMemo=function(e){return x(e)===m},d.isPortal=function(e){return x(e)===t},d.isProfiler=function(e){return x(e)===a},d.isStrictMode=function(e){return x(e)===o},d.isSuspense=function(e){return x(e)===p},d.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===s||e===a||e===o||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===m||e.$$typeof===i||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===g||e.$$typeof===O||e.$$typeof===v)},d.typeOf=x,d}():y.exports=(m||(m=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case r:var m=e.type;switch(m){case u:case s:case n:case a:case o:case l:return m;default:var b=m&&m.$$typeof;switch(b){case c:case f:case d:case y:case i:return b;default:return p}}case t:return p}}}var O=u,x=s,S=c,w=i,j=r,E=f,T=n,P=d,$=y,_=t,N=a,M=o,C=l,D=!1;function I(e){return g(e)===s}k.AsyncMode=O,k.ConcurrentMode=x,k.ContextConsumer=S,k.ContextProvider=w,k.Element=j,k.ForwardRef=E,k.Fragment=T,k.Lazy=P,k.Memo=$,k.Portal=_,k.Profiler=N,k.StrictMode=M,k.Suspense=C,k.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(e)||g(e)===u},k.isConcurrentMode=I,k.isContextConsumer=function(e){return g(e)===c},k.isContextProvider=function(e){return g(e)===i},k.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},k.isForwardRef=function(e){return g(e)===f},k.isFragment=function(e){return g(e)===n},k.isLazy=function(e){return g(e)===d},k.isMemo=function(e){return g(e)===y},k.isPortal=function(e){return g(e)===t},k.isProfiler=function(e){return g(e)===a},k.isStrictMode=function(e){return g(e)===o},k.isSuspense=function(e){return g(e)===l},k.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===s||e===a||e===o||e===l||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===y||e.$$typeof===i||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===h||e.$$typeof===m)},k.typeOf=g}()),k)),y.exports}
|
|
10
|
+
/*
|
|
11
|
+
object-assign
|
|
12
|
+
(c) Sindre Sorhus
|
|
13
|
+
@license MIT
|
|
14
|
+
*/function N(){if(h)return v;h=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;return v=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,o){for(var a,i,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),u=1;u<arguments.length;u++){for(var s in a=Object(arguments[u]))r.call(a,s)&&(c[s]=a[s]);if(e){i=e(a);for(var f=0;f<i.length;f++)t.call(a,i[f])&&(c[i[f]]=a[i[f]])}}return c},v}function M(){if(O)return g;O=1;return g="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function C(){return S?x:(S=1,x=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var D=_();p.exports=function(){if(T)return E;T=1;var e=_(),r=N(),t=M(),n=C(),o=function(){if(j)return w;j=1;var e=function(){};if("production"!==process.env.NODE_ENV){var r=M(),t={},n=C();e=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}function o(o,a,i,c,u){if("production"!==process.env.NODE_ENV)for(var s in o)if(n(o,s)){var f;try{if("function"!=typeof o[s]){var l=Error((c||"React class")+": "+i+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}f=o[s](a,s,c,i,null,r)}catch(e){f=e}if(!f||f instanceof Error||e((c||"React class")+": type specification of "+i+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var p=u?u():"";e("Failed "+i+" type: "+f.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(t={})},w=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}),E=function(c,u){var s="function"==typeof Symbol&&Symbol.iterator,f="@@iterator",l="<<anonymous>>",p={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:m(i),arrayOf:function(e){return m((function(r,n,o,a,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var c=r[n];if(!Array.isArray(c))return new d("Invalid "+a+" `"+i+"` of type `"+g(c)+"` supplied to `"+o+"`, expected an array.");for(var u=0;u<c.length;u++){var s=e(c,u,o,a,i+"["+u+"]",t);if(s instanceof Error)return s}return null}))},element:m((function(e,r,t,n,o){var a=e[r];return c(a)?null:new d("Invalid "+n+" `"+o+"` of type `"+g(a)+"` supplied to `"+t+"`, expected a single ReactElement.")})),elementType:m((function(r,t,n,o,a){var i=r[t];return e.isValidElementType(i)?null:new d("Invalid "+o+" `"+a+"` of type `"+g(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return m((function(r,t,n,o,a){if(!(r[t]instanceof e)){var i=e.name||l;return new d("Invalid "+o+" `"+a+"` of type `"+((c=r[t]).constructor&&c.constructor.name?c.constructor.name:l)+"` supplied to `"+n+"`, expected instance of `"+i+"`.")}var c;return null}))},node:m((function(e,r,t,n,o){return h(e[r])?null:new d("Invalid "+n+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return m((function(r,o,a,i,c){if("function"!=typeof e)return new d("Property `"+c+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var u=r[o],s=g(u);if("object"!==s)return new d("Invalid "+i+" `"+c+"` of type `"+s+"` supplied to `"+a+"`, expected an object.");for(var f in u)if(n(u,f)){var l=e(u,f,a,i,c+"."+f,t);if(l instanceof Error)return l}return null}))},oneOf:function(e){return Array.isArray(e)?m((function(r,t,n,o,a){for(var i=r[t],c=0;c<e.length;c++)if(y(i,e[c]))return null;var u=JSON.stringify(e,(function(e,r){return"symbol"===O(r)?String(r):r}));return new d("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+n+"`, expected one of "+u+".")})):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var r=0;r<e.length;r++){var o=e[r];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+r+"."),i}return m((function(r,o,a,i,c){for(var u=[],s=0;s<e.length;s++){var f=(0,e[s])(r,o,a,i,c,t);if(null==f)return null;f.data&&n(f.data,"expectedType")&&u.push(f.data.expectedType)}return new d("Invalid "+i+" `"+c+"` supplied to `"+a+"`"+(u.length>0?", expected one of type ["+u.join(", ")+"]":"")+".")}))},shape:function(e){return m((function(r,n,o,a,i){var c=r[n],u=g(c);if("object"!==u)return new d("Invalid "+a+" `"+i+"` of type `"+u+"` supplied to `"+o+"`, expected `object`.");for(var s in e){var f=e[s];if("function"!=typeof f)return v(o,a,i,s,O(f));var l=f(c,s,o,a,i+"."+s,t);if(l)return l}return null}))},exact:function(e){return m((function(o,a,i,c,u){var s=o[a],f=g(s);if("object"!==f)return new d("Invalid "+c+" `"+u+"` of type `"+f+"` supplied to `"+i+"`, expected `object`.");var l=r({},o[a],e);for(var p in l){var y=e[p];if(n(e,p)&&"function"!=typeof y)return v(i,c,u,p,O(y));if(!y)return new d("Invalid "+c+" `"+u+"` key `"+p+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=y(s,p,i,c,u+"."+p,t);if(m)return m}return null}))}};function y(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function d(e,r){this.message=e,this.data=r&&"object"==typeof r?r:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var r={},n=0;function o(o,i,c,s,f,p,y){if(s=s||l,p=p||c,y!==t){if(u){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=s+":"+c;!r[b]&&n<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[b]=!0,n++)}}return null==i[c]?o?null===i[c]?new d("The "+f+" `"+p+"` is marked as required in `"+s+"`, but its value is `null`."):new d("The "+f+" `"+p+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(i,c,s,f,p)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function b(e){return m((function(r,t,n,o,a,i){var c=r[t];return g(c)!==e?new d("Invalid "+o+" `"+a+"` of type `"+O(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,r,t,n,o){return new d((e||"React class")+": "+r+" type `"+t+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||c(e))return!0;var r=function(e){var r=e&&(s&&e[s]||e[f]);if("function"==typeof r)return r}(e);if(!r)return!1;var t,n=r.call(e);if(r!==e.entries){for(;!(t=n.next()).done;)if(!h(t.value))return!1}else for(;!(t=n.next()).done;){var o=t.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function g(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||!!r&&("Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol)}(r,e)?"symbol":r}function O(e){if(null==e)return""+e;var r=g(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function x(e){var r=O(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return d.prototype=Error.prototype,p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},E}()(D.isElement,!0)}else p.exports=function(){if($)return P;$=1;var e=M();function r(){}function t(){}return t.resetWarningCache=r,P=function(){function n(r,t,n,o,a,i){if(i!==e){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function o(){return n}n.isRequired=n;var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:r};return a.PropTypes=a,a}}()();var I=f(p.exports);const A=["localeText"],R=s.createContext(null);"production"!==process.env.NODE_ENV&&(R.displayName="MuiPickersAdapterContext");const V=function(e){const{localeText:r}=e,t=u.default(e,A),{utils:a,localeText:i}=s.useContext(R)??{utils:void 0,localeText:void 0},f=n.useThemeProps({props:t,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:p,dateFormats:y,dateLibInstance:d,adapterLocale:m,localeText:b}=f,v=s.useMemo((()=>c.default({},b,i,r)),[b,i,r]),h=s.useMemo((()=>{if(!p)return a||null;const e=new p({locale:m,formats:y,instance:d});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[p,m,y,d,a]),g=s.useMemo((()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null),[h]),O=s.useMemo((()=>({utils:h,defaultDates:g,localeText:v})),[g,h,v]);return o.jsx(R.Provider,{value:O,children:l})};"production"!==process.env.NODE_ENV&&(V.propTypes={adapterLocale:I.any,children:I.node,dateAdapter:I.func,dateFormats:I.shape({dayOfMonth:I.string,dayOfMonthFull:I.string,fullDate:I.string,fullTime:I.string,fullTime12h:I.string,fullTime24h:I.string,hours12h:I.string,hours24h:I.string,keyboardDate:I.string,keyboardDateTime:I.string,keyboardDateTime12h:I.string,keyboardDateTime24h:I.string,meridiem:I.string,minutes:I.string,month:I.string,monthShort:I.string,normalDate:I.string,normalDateWithWeekday:I.string,seconds:I.string,shortDate:I.string,weekday:I.string,weekdayShort:I.string,year:I.string}),dateLibInstance:I.any,localeText:I.object});exports.LocalizationProvider=V,exports.MuiPickersAdapterContext=R,exports.PropTypes=I,exports.buildWarning=(e,r="warning")=>{let t=!1;const n=Array.isArray(e)?e.join("\n"):e;return()=>{t||(t=!0,"error"===r?console.error(n):console.warn(n))}};
|
|
15
|
+
//# sourceMappingURL=warning-4f66c7b7.js.map
|