@etsoo/materialui 1.4.67 → 1.4.69
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/__tests__/ComboBox.tsx +1 -7
- package/__tests__/tsconfig.json +1 -1
- package/lib/cjs/AddresSelector.js +141 -0
- package/lib/cjs/AuditDisplay.js +52 -0
- package/lib/cjs/AutocompleteExtendedProps.js +2 -0
- package/lib/cjs/BackButton.js +38 -0
- package/lib/cjs/BridgeCloseButton.js +35 -0
- package/lib/cjs/ButtonLink.js +22 -0
- package/lib/cjs/ButtonPopover.js +63 -0
- package/lib/cjs/ComboBox.js +134 -0
- package/lib/cjs/ComboBoxMultiple.js +132 -0
- package/lib/cjs/ComboBoxPro.js +71 -0
- package/lib/cjs/CountdownButton.js +91 -0
- package/lib/cjs/CountryList.js +29 -0
- package/lib/cjs/CultureDataTable.js +48 -0
- package/lib/cjs/CustomFabProps.js +2 -0
- package/lib/cjs/DataGridEx.js +333 -0
- package/lib/cjs/DataGridRenderers.js +105 -0
- package/lib/cjs/DataSteps.js +93 -0
- package/lib/cjs/DataTable.js +52 -0
- package/lib/cjs/DialogButton.js +43 -0
- package/lib/cjs/DnDList.js +222 -0
- package/lib/cjs/DraggablePaperComponent.js +19 -0
- package/lib/cjs/EmailInput.js +17 -0
- package/lib/cjs/FabBox.js +42 -0
- package/lib/cjs/FieldSetEx.js +32 -0
- package/lib/cjs/FileUploadButton.js +46 -0
- package/lib/cjs/FlexBox.js +22 -0
- package/lib/cjs/GridDataCacheType.js +2 -0
- package/lib/cjs/GridDataFormat.js +46 -0
- package/lib/cjs/GridUtils.js +90 -0
- package/lib/cjs/HiSelector.js +49 -0
- package/lib/cjs/HiSelectorTL.js +43 -0
- package/lib/cjs/IconButtonLink.js +19 -0
- package/lib/cjs/InputField.js +54 -0
- package/lib/cjs/InputTipField.js +50 -0
- package/lib/cjs/IntInputField.js +116 -0
- package/lib/cjs/ItemList.js +71 -0
- package/lib/{LineChart.d.ts → cjs/LineChart.d.ts} +1 -1
- package/lib/cjs/LineChart.js +59 -0
- package/lib/cjs/ListChooser.js +95 -0
- package/lib/cjs/ListItemRightIcon.js +11 -0
- package/lib/cjs/ListMoreDisplay.js +101 -0
- package/lib/cjs/LoadingButton.js +47 -0
- package/lib/cjs/MUGlobal.js +189 -0
- package/lib/cjs/MUUtils.js +58 -0
- package/lib/cjs/MaskInput.d.ts +40 -0
- package/lib/cjs/MaskInput.js +54 -0
- package/lib/cjs/MenuButton.js +68 -0
- package/lib/cjs/MobileListItemRenderer.js +33 -0
- package/lib/cjs/MoneyInputField.js +18 -0
- package/lib/cjs/MoreFab.js +100 -0
- package/lib/cjs/NotifierMU.js +368 -0
- package/lib/cjs/NotifierPopupProps.js +2 -0
- package/lib/cjs/NotifierPromptProps.js +2 -0
- package/lib/cjs/NumberInputField.js +32 -0
- package/lib/cjs/OptionBool.js +17 -0
- package/lib/cjs/OptionGroup.js +108 -0
- package/lib/cjs/OptionGroupFlag.js +92 -0
- package/lib/cjs/PList.js +19 -0
- package/lib/cjs/PercentCircularProgress.js +20 -0
- package/lib/cjs/PercentLinearProgress.js +11 -0
- package/lib/cjs/ProgressCount.js +79 -0
- package/lib/cjs/PullToRefreshUI.js +29 -0
- package/lib/cjs/QuickList.js +48 -0
- package/lib/cjs/RegionsRQ.js +2 -0
- package/lib/cjs/ResponsibleContainer.js +196 -0
- package/lib/cjs/ResponsiveStyleValue.js +2 -0
- package/lib/cjs/ScrollTopFab.js +30 -0
- package/lib/cjs/ScrollerListEx.js +168 -0
- package/lib/cjs/SearchBar.js +270 -0
- package/lib/cjs/SearchField.js +52 -0
- package/lib/cjs/SearchOptionGroup.js +17 -0
- package/lib/cjs/SelectBool.js +22 -0
- package/lib/cjs/SelectEx.js +180 -0
- package/lib/cjs/ShowDataComparison.js +63 -0
- package/lib/cjs/Switch.js +40 -0
- package/lib/cjs/SwitchAnt.js +48 -0
- package/lib/cjs/SwitchField.js +36 -0
- package/lib/cjs/TabBox.js +34 -0
- package/lib/{TableEx.d.ts → cjs/TableEx.d.ts} +1 -2
- package/lib/cjs/TableEx.js +294 -0
- package/lib/cjs/TagList.js +62 -0
- package/lib/cjs/TagListPro.js +66 -0
- package/lib/cjs/TextFieldEx.js +145 -0
- package/lib/cjs/Tiplist.js +211 -0
- package/lib/cjs/TiplistPro.js +206 -0
- package/lib/cjs/TooltipClick.js +46 -0
- package/lib/cjs/TwoFieldInput.js +69 -0
- package/lib/cjs/UserAvatar.js +26 -0
- package/lib/cjs/UserAvatarEditor.js +169 -0
- package/lib/cjs/app/CommonApp.js +32 -0
- package/lib/cjs/app/IServiceApp.js +11 -0
- package/lib/cjs/app/IServiceAppSettings.js +2 -0
- package/lib/cjs/app/IServicePage.js +2 -0
- package/lib/cjs/app/IServiceUser.js +2 -0
- package/lib/cjs/app/ISmartERPUser.js +2 -0
- package/lib/cjs/app/Labels.js +65 -0
- package/lib/cjs/app/ReactApp.js +387 -0
- package/lib/cjs/app/ServiceApp.js +232 -0
- package/lib/cjs/custom/CustomFieldUtils.js +152 -0
- package/lib/cjs/custom/CustomFieldViewer.js +57 -0
- package/lib/cjs/custom/CustomFieldWindow.js +95 -0
- package/lib/cjs/custom/FieldAmountLabel.js +47 -0
- package/lib/cjs/custom/FieldCheckbox.js +56 -0
- package/lib/cjs/custom/FieldCombobox.js +47 -0
- package/lib/cjs/custom/FieldDateInput.js +50 -0
- package/lib/cjs/custom/FieldDivider.js +19 -0
- package/lib/cjs/custom/FieldInput.js +34 -0
- package/lib/cjs/custom/FieldJson.js +57 -0
- package/lib/cjs/custom/FieldLabel.js +35 -0
- package/lib/cjs/custom/FieldNumberInput.js +44 -0
- package/lib/cjs/custom/FieldRadio.js +56 -0
- package/lib/cjs/custom/FieldSelect.js +55 -0
- package/lib/cjs/custom/FieldSwitch.js +49 -0
- package/lib/cjs/custom/FieldTexarea.js +35 -0
- package/lib/cjs/index.js +134 -0
- package/lib/cjs/messages/MessageUtils.js +76 -0
- package/lib/cjs/messages/OperationMessageContainer.js +49 -0
- package/lib/cjs/messages/OperationMessageDto.js +2 -0
- package/lib/cjs/messages/OperationMessageHandler.js +2 -0
- package/lib/cjs/messages/RefreshHandler.js +2 -0
- package/lib/cjs/messages/SignalRUser.js +2 -0
- package/lib/cjs/pages/CommonPage.js +64 -0
- package/lib/cjs/pages/DataGridPage.js +114 -0
- package/lib/cjs/pages/DataGridPageProps.js +2 -0
- package/lib/cjs/pages/DrawerHeader.js +16 -0
- package/lib/cjs/pages/EditPage.js +30 -0
- package/lib/cjs/pages/FixedListPage.js +104 -0
- package/lib/cjs/pages/LeftDrawer.js +37 -0
- package/lib/cjs/pages/ListPage.js +83 -0
- package/lib/cjs/pages/ResponsivePage.js +53 -0
- package/lib/cjs/pages/SearchPageProps.js +2 -0
- package/lib/cjs/pages/TablePage.js +72 -0
- package/lib/cjs/pages/UserMenu.js +91 -0
- package/lib/cjs/pages/ViewPage.js +160 -0
- package/lib/cjs/texts/DateText.js +28 -0
- package/lib/cjs/texts/MoneyText.js +19 -0
- package/lib/cjs/texts/NumberText.js +17 -0
- package/lib/mjs/AddresSelector.d.ts +107 -0
- package/lib/mjs/AuditDisplay.d.ts +31 -0
- package/lib/mjs/AutocompleteExtendedProps.d.ts +73 -0
- package/lib/mjs/BackButton.d.ts +12 -0
- package/lib/mjs/BridgeCloseButton.d.ts +22 -0
- package/lib/mjs/ButtonLink.d.ts +20 -0
- package/lib/mjs/ButtonPopover.d.ts +29 -0
- package/lib/mjs/ComboBox.d.ts +45 -0
- package/lib/mjs/ComboBoxMultiple.d.ts +41 -0
- package/lib/mjs/ComboBoxPro.d.ts +31 -0
- package/lib/mjs/CountdownButton.d.ts +27 -0
- package/lib/mjs/CountryList.d.ts +30 -0
- package/lib/mjs/CultureDataTable.d.ts +19 -0
- package/lib/mjs/CustomFabProps.d.ts +27 -0
- package/lib/mjs/DataGridEx.d.ts +101 -0
- package/lib/mjs/DataGridRenderers.d.ts +22 -0
- package/lib/mjs/DataSteps.d.ts +38 -0
- package/lib/mjs/DataTable.d.ts +27 -0
- package/lib/mjs/DialogButton.d.ts +54 -0
- package/lib/mjs/DnDList.d.ts +104 -0
- package/lib/mjs/DraggablePaperComponent.d.ts +7 -0
- package/lib/mjs/EmailInput.d.ts +10 -0
- package/lib/mjs/FabBox.d.ts +26 -0
- package/lib/mjs/FieldSetEx.d.ts +21 -0
- package/lib/mjs/FileUploadButton.d.ts +36 -0
- package/lib/mjs/FlexBox.d.ts +13 -0
- package/lib/mjs/GridDataCacheType.d.ts +9 -0
- package/lib/mjs/GridDataFormat.d.ts +10 -0
- package/lib/mjs/GridUtils.d.ts +44 -0
- package/lib/mjs/HiSelector.d.ts +79 -0
- package/lib/mjs/HiSelectorTL.d.ts +67 -0
- package/lib/mjs/IconButtonLink.d.ts +20 -0
- package/lib/mjs/InputField.d.ts +80 -0
- package/lib/mjs/InputTipField.d.ts +38 -0
- package/lib/mjs/IntInputField.d.ts +55 -0
- package/lib/mjs/ItemList.d.ts +68 -0
- package/lib/mjs/LineChart.d.ts +28 -0
- package/lib/{LineChart.js → mjs/LineChart.js} +2 -1
- package/lib/mjs/ListChooser.d.ts +64 -0
- package/lib/mjs/ListItemRightIcon.d.ts +5 -0
- package/lib/mjs/ListMoreDisplay.d.ts +38 -0
- package/lib/mjs/LoadingButton.d.ts +15 -0
- package/lib/mjs/MUGlobal.d.ts +101 -0
- package/lib/mjs/MUUtils.d.ts +22 -0
- package/lib/mjs/MaskInput.d.ts +40 -0
- package/lib/{MaskInput.js → mjs/MaskInput.js} +7 -1
- package/lib/mjs/MenuButton.d.ts +9 -0
- package/lib/mjs/MobileListItemRenderer.d.ts +17 -0
- package/lib/mjs/MoneyInputField.d.ts +10 -0
- package/lib/mjs/MoreFab.d.ts +45 -0
- package/lib/mjs/NotifierMU.d.ts +48 -0
- package/lib/mjs/NotifierPopupProps.d.ts +5 -0
- package/lib/mjs/NotifierPromptProps.d.ts +21 -0
- package/lib/mjs/NumberInputField.d.ts +42 -0
- package/lib/mjs/OptionBool.d.ts +12 -0
- package/lib/mjs/OptionGroup.d.ts +80 -0
- package/lib/mjs/OptionGroupFlag.d.ts +76 -0
- package/lib/mjs/PList.d.ts +14 -0
- package/lib/mjs/PercentCircularProgress.d.ts +7 -0
- package/lib/mjs/PercentLinearProgress.d.ts +7 -0
- package/lib/mjs/ProgressCount.d.ts +43 -0
- package/lib/mjs/PullToRefreshUI.d.ts +8 -0
- package/lib/mjs/QuickList.d.ts +56 -0
- package/lib/mjs/RegionsRQ.d.ts +22 -0
- package/lib/mjs/ResponsibleContainer.d.ts +98 -0
- package/lib/mjs/ResponsiveStyleValue.d.ts +7 -0
- package/lib/mjs/ScrollTopFab.d.ts +6 -0
- package/lib/mjs/ScrollerListEx.d.ts +75 -0
- package/lib/mjs/SearchBar.d.ts +32 -0
- package/lib/mjs/SearchField.d.ts +24 -0
- package/lib/mjs/SearchOptionGroup.d.ts +8 -0
- package/lib/mjs/SelectBool.d.ts +12 -0
- package/lib/mjs/SelectEx.d.ts +74 -0
- package/lib/mjs/ShowDataComparison.d.ts +15 -0
- package/lib/mjs/Switch.d.ts +28 -0
- package/lib/mjs/SwitchAnt.d.ts +24 -0
- package/lib/mjs/SwitchField.d.ts +45 -0
- package/lib/mjs/TabBox.d.ts +54 -0
- package/lib/mjs/TableEx.d.ts +64 -0
- package/lib/mjs/TagList.d.ts +21 -0
- package/lib/mjs/TagListPro.d.ts +22 -0
- package/lib/mjs/TextFieldEx.d.ts +157 -0
- package/lib/mjs/Tiplist.d.ts +29 -0
- package/lib/mjs/TiplistPro.d.ts +60 -0
- package/lib/mjs/TooltipClick.d.ts +15 -0
- package/lib/mjs/TwoFieldInput.d.ts +22 -0
- package/lib/mjs/UserAvatar.d.ts +23 -0
- package/lib/mjs/UserAvatarEditor.d.ts +60 -0
- package/lib/mjs/app/CommonApp.d.ts +21 -0
- package/lib/mjs/app/IServiceApp.d.ts +41 -0
- package/lib/mjs/app/IServiceAppSettings.d.ts +6 -0
- package/lib/mjs/app/IServicePage.d.ts +6 -0
- package/lib/mjs/app/IServiceUser.d.ts +42 -0
- package/lib/mjs/app/ISmartERPUser.d.ts +21 -0
- package/lib/mjs/app/Labels.d.ts +65 -0
- package/lib/mjs/app/ReactApp.d.ts +252 -0
- package/lib/mjs/app/ServiceApp.d.ts +76 -0
- package/lib/mjs/custom/CustomFieldUtils.d.ts +56 -0
- package/lib/mjs/custom/CustomFieldViewer.d.ts +50 -0
- package/lib/mjs/custom/CustomFieldWindow.d.ts +55 -0
- package/lib/mjs/custom/FieldAmountLabel.d.ts +7 -0
- package/lib/mjs/custom/FieldCheckbox.d.ts +8 -0
- package/lib/mjs/custom/FieldCombobox.d.ts +8 -0
- package/lib/mjs/custom/FieldDateInput.d.ts +7 -0
- package/lib/mjs/custom/FieldDivider.d.ts +7 -0
- package/lib/mjs/custom/FieldInput.d.ts +7 -0
- package/lib/mjs/custom/FieldJson.d.ts +7 -0
- package/lib/mjs/custom/FieldLabel.d.ts +7 -0
- package/lib/mjs/custom/FieldNumberInput.d.ts +7 -0
- package/lib/mjs/custom/FieldRadio.d.ts +8 -0
- package/lib/mjs/custom/FieldSelect.d.ts +8 -0
- package/lib/mjs/custom/FieldSwitch.d.ts +7 -0
- package/lib/mjs/custom/FieldTexarea.d.ts +7 -0
- package/lib/mjs/index.js +118 -0
- package/lib/mjs/messages/MessageUtils.d.ts +52 -0
- package/lib/mjs/messages/OperationMessageContainer.d.ts +24 -0
- package/lib/mjs/messages/OperationMessageDto.d.ts +26 -0
- package/lib/mjs/messages/OperationMessageHandler.d.ts +24 -0
- package/lib/mjs/messages/RefreshHandler.d.ts +5 -0
- package/lib/mjs/messages/SignalRUser.d.ts +31 -0
- package/lib/mjs/pages/CommonPage.d.ts +72 -0
- package/lib/mjs/pages/DataGridPage.d.ts +7 -0
- package/lib/mjs/pages/DataGridPageProps.d.ts +18 -0
- package/lib/mjs/pages/DrawerHeader.d.ts +4 -0
- package/lib/mjs/pages/EditPage.d.ts +46 -0
- package/lib/mjs/pages/FixedListPage.d.ts +14 -0
- package/lib/mjs/pages/LeftDrawer.d.ts +35 -0
- package/lib/mjs/pages/ListPage.d.ts +12 -0
- package/lib/mjs/pages/ResponsivePage.d.ts +56 -0
- package/lib/mjs/pages/SearchPageProps.d.ts +36 -0
- package/lib/mjs/pages/TablePage.d.ts +13 -0
- package/lib/mjs/pages/UserMenu.d.ts +40 -0
- package/lib/mjs/pages/ViewPage.d.ts +104 -0
- package/lib/{pages → mjs/pages}/ViewPage.js +1 -1
- package/lib/mjs/texts/DateText.d.ts +33 -0
- package/lib/mjs/texts/MoneyText.d.ts +20 -0
- package/lib/mjs/texts/NumberText.d.ts +24 -0
- package/package.json +17 -9
- package/src/LineChart.tsx +3 -3
- package/src/MaskInput.tsx +23 -10
- package/src/TableEx.tsx +1 -1
- package/src/pages/ViewPage.tsx +1 -1
- package/tsconfig.cjs.json +19 -0
- package/tsconfig.json +1 -1
- package/lib/MaskInput.d.ts +0 -34
- /package/lib/{AddresSelector.d.ts → cjs/AddresSelector.d.ts} +0 -0
- /package/lib/{AuditDisplay.d.ts → cjs/AuditDisplay.d.ts} +0 -0
- /package/lib/{AutocompleteExtendedProps.d.ts → cjs/AutocompleteExtendedProps.d.ts} +0 -0
- /package/lib/{BackButton.d.ts → cjs/BackButton.d.ts} +0 -0
- /package/lib/{BridgeCloseButton.d.ts → cjs/BridgeCloseButton.d.ts} +0 -0
- /package/lib/{ButtonLink.d.ts → cjs/ButtonLink.d.ts} +0 -0
- /package/lib/{ButtonPopover.d.ts → cjs/ButtonPopover.d.ts} +0 -0
- /package/lib/{ComboBox.d.ts → cjs/ComboBox.d.ts} +0 -0
- /package/lib/{ComboBoxMultiple.d.ts → cjs/ComboBoxMultiple.d.ts} +0 -0
- /package/lib/{ComboBoxPro.d.ts → cjs/ComboBoxPro.d.ts} +0 -0
- /package/lib/{CountdownButton.d.ts → cjs/CountdownButton.d.ts} +0 -0
- /package/lib/{CountryList.d.ts → cjs/CountryList.d.ts} +0 -0
- /package/lib/{CultureDataTable.d.ts → cjs/CultureDataTable.d.ts} +0 -0
- /package/lib/{CustomFabProps.d.ts → cjs/CustomFabProps.d.ts} +0 -0
- /package/lib/{DataGridEx.d.ts → cjs/DataGridEx.d.ts} +0 -0
- /package/lib/{DataGridRenderers.d.ts → cjs/DataGridRenderers.d.ts} +0 -0
- /package/lib/{DataSteps.d.ts → cjs/DataSteps.d.ts} +0 -0
- /package/lib/{DataTable.d.ts → cjs/DataTable.d.ts} +0 -0
- /package/lib/{DialogButton.d.ts → cjs/DialogButton.d.ts} +0 -0
- /package/lib/{DnDList.d.ts → cjs/DnDList.d.ts} +0 -0
- /package/lib/{DraggablePaperComponent.d.ts → cjs/DraggablePaperComponent.d.ts} +0 -0
- /package/lib/{EmailInput.d.ts → cjs/EmailInput.d.ts} +0 -0
- /package/lib/{FabBox.d.ts → cjs/FabBox.d.ts} +0 -0
- /package/lib/{FieldSetEx.d.ts → cjs/FieldSetEx.d.ts} +0 -0
- /package/lib/{FileUploadButton.d.ts → cjs/FileUploadButton.d.ts} +0 -0
- /package/lib/{FlexBox.d.ts → cjs/FlexBox.d.ts} +0 -0
- /package/lib/{GridDataCacheType.d.ts → cjs/GridDataCacheType.d.ts} +0 -0
- /package/lib/{GridDataFormat.d.ts → cjs/GridDataFormat.d.ts} +0 -0
- /package/lib/{GridUtils.d.ts → cjs/GridUtils.d.ts} +0 -0
- /package/lib/{HiSelector.d.ts → cjs/HiSelector.d.ts} +0 -0
- /package/lib/{HiSelectorTL.d.ts → cjs/HiSelectorTL.d.ts} +0 -0
- /package/lib/{IconButtonLink.d.ts → cjs/IconButtonLink.d.ts} +0 -0
- /package/lib/{InputField.d.ts → cjs/InputField.d.ts} +0 -0
- /package/lib/{InputTipField.d.ts → cjs/InputTipField.d.ts} +0 -0
- /package/lib/{IntInputField.d.ts → cjs/IntInputField.d.ts} +0 -0
- /package/lib/{ItemList.d.ts → cjs/ItemList.d.ts} +0 -0
- /package/lib/{ListChooser.d.ts → cjs/ListChooser.d.ts} +0 -0
- /package/lib/{ListItemRightIcon.d.ts → cjs/ListItemRightIcon.d.ts} +0 -0
- /package/lib/{ListMoreDisplay.d.ts → cjs/ListMoreDisplay.d.ts} +0 -0
- /package/lib/{LoadingButton.d.ts → cjs/LoadingButton.d.ts} +0 -0
- /package/lib/{MUGlobal.d.ts → cjs/MUGlobal.d.ts} +0 -0
- /package/lib/{MUUtils.d.ts → cjs/MUUtils.d.ts} +0 -0
- /package/lib/{MenuButton.d.ts → cjs/MenuButton.d.ts} +0 -0
- /package/lib/{MobileListItemRenderer.d.ts → cjs/MobileListItemRenderer.d.ts} +0 -0
- /package/lib/{MoneyInputField.d.ts → cjs/MoneyInputField.d.ts} +0 -0
- /package/lib/{MoreFab.d.ts → cjs/MoreFab.d.ts} +0 -0
- /package/lib/{NotifierMU.d.ts → cjs/NotifierMU.d.ts} +0 -0
- /package/lib/{NotifierPopupProps.d.ts → cjs/NotifierPopupProps.d.ts} +0 -0
- /package/lib/{NotifierPromptProps.d.ts → cjs/NotifierPromptProps.d.ts} +0 -0
- /package/lib/{NumberInputField.d.ts → cjs/NumberInputField.d.ts} +0 -0
- /package/lib/{OptionBool.d.ts → cjs/OptionBool.d.ts} +0 -0
- /package/lib/{OptionGroup.d.ts → cjs/OptionGroup.d.ts} +0 -0
- /package/lib/{OptionGroupFlag.d.ts → cjs/OptionGroupFlag.d.ts} +0 -0
- /package/lib/{PList.d.ts → cjs/PList.d.ts} +0 -0
- /package/lib/{PercentCircularProgress.d.ts → cjs/PercentCircularProgress.d.ts} +0 -0
- /package/lib/{PercentLinearProgress.d.ts → cjs/PercentLinearProgress.d.ts} +0 -0
- /package/lib/{ProgressCount.d.ts → cjs/ProgressCount.d.ts} +0 -0
- /package/lib/{PullToRefreshUI.d.ts → cjs/PullToRefreshUI.d.ts} +0 -0
- /package/lib/{QuickList.d.ts → cjs/QuickList.d.ts} +0 -0
- /package/lib/{RegionsRQ.d.ts → cjs/RegionsRQ.d.ts} +0 -0
- /package/lib/{ResponsibleContainer.d.ts → cjs/ResponsibleContainer.d.ts} +0 -0
- /package/lib/{ResponsiveStyleValue.d.ts → cjs/ResponsiveStyleValue.d.ts} +0 -0
- /package/lib/{ScrollTopFab.d.ts → cjs/ScrollTopFab.d.ts} +0 -0
- /package/lib/{ScrollerListEx.d.ts → cjs/ScrollerListEx.d.ts} +0 -0
- /package/lib/{SearchBar.d.ts → cjs/SearchBar.d.ts} +0 -0
- /package/lib/{SearchField.d.ts → cjs/SearchField.d.ts} +0 -0
- /package/lib/{SearchOptionGroup.d.ts → cjs/SearchOptionGroup.d.ts} +0 -0
- /package/lib/{SelectBool.d.ts → cjs/SelectBool.d.ts} +0 -0
- /package/lib/{SelectEx.d.ts → cjs/SelectEx.d.ts} +0 -0
- /package/lib/{ShowDataComparison.d.ts → cjs/ShowDataComparison.d.ts} +0 -0
- /package/lib/{Switch.d.ts → cjs/Switch.d.ts} +0 -0
- /package/lib/{SwitchAnt.d.ts → cjs/SwitchAnt.d.ts} +0 -0
- /package/lib/{SwitchField.d.ts → cjs/SwitchField.d.ts} +0 -0
- /package/lib/{TabBox.d.ts → cjs/TabBox.d.ts} +0 -0
- /package/lib/{TagList.d.ts → cjs/TagList.d.ts} +0 -0
- /package/lib/{TagListPro.d.ts → cjs/TagListPro.d.ts} +0 -0
- /package/lib/{TextFieldEx.d.ts → cjs/TextFieldEx.d.ts} +0 -0
- /package/lib/{Tiplist.d.ts → cjs/Tiplist.d.ts} +0 -0
- /package/lib/{TiplistPro.d.ts → cjs/TiplistPro.d.ts} +0 -0
- /package/lib/{TooltipClick.d.ts → cjs/TooltipClick.d.ts} +0 -0
- /package/lib/{TwoFieldInput.d.ts → cjs/TwoFieldInput.d.ts} +0 -0
- /package/lib/{UserAvatar.d.ts → cjs/UserAvatar.d.ts} +0 -0
- /package/lib/{UserAvatarEditor.d.ts → cjs/UserAvatarEditor.d.ts} +0 -0
- /package/lib/{app → cjs/app}/CommonApp.d.ts +0 -0
- /package/lib/{app → cjs/app}/IServiceApp.d.ts +0 -0
- /package/lib/{app → cjs/app}/IServiceAppSettings.d.ts +0 -0
- /package/lib/{app → cjs/app}/IServicePage.d.ts +0 -0
- /package/lib/{app → cjs/app}/IServiceUser.d.ts +0 -0
- /package/lib/{app → cjs/app}/ISmartERPUser.d.ts +0 -0
- /package/lib/{app → cjs/app}/Labels.d.ts +0 -0
- /package/lib/{app → cjs/app}/ReactApp.d.ts +0 -0
- /package/lib/{app → cjs/app}/ServiceApp.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/CustomFieldUtils.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/CustomFieldViewer.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/CustomFieldWindow.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldAmountLabel.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldCheckbox.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldCombobox.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldDateInput.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldDivider.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldInput.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldJson.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldLabel.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldNumberInput.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldRadio.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldSelect.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldSwitch.d.ts +0 -0
- /package/lib/{custom → cjs/custom}/FieldTexarea.d.ts +0 -0
- /package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/lib/{messages → cjs/messages}/MessageUtils.d.ts +0 -0
- /package/lib/{messages → cjs/messages}/OperationMessageContainer.d.ts +0 -0
- /package/lib/{messages → cjs/messages}/OperationMessageDto.d.ts +0 -0
- /package/lib/{messages → cjs/messages}/OperationMessageHandler.d.ts +0 -0
- /package/lib/{messages → cjs/messages}/RefreshHandler.d.ts +0 -0
- /package/lib/{messages → cjs/messages}/SignalRUser.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/CommonPage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/DataGridPage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/DataGridPageProps.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/DrawerHeader.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/EditPage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/FixedListPage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/LeftDrawer.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/ListPage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/ResponsivePage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/SearchPageProps.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/TablePage.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/UserMenu.d.ts +0 -0
- /package/lib/{pages → cjs/pages}/ViewPage.d.ts +0 -0
- /package/lib/{texts → cjs/texts}/DateText.d.ts +0 -0
- /package/lib/{texts → cjs/texts}/MoneyText.d.ts +0 -0
- /package/lib/{texts → cjs/texts}/NumberText.d.ts +0 -0
- /package/lib/{AddresSelector.js → mjs/AddresSelector.js} +0 -0
- /package/lib/{AuditDisplay.js → mjs/AuditDisplay.js} +0 -0
- /package/lib/{AutocompleteExtendedProps.js → mjs/AutocompleteExtendedProps.js} +0 -0
- /package/lib/{BackButton.js → mjs/BackButton.js} +0 -0
- /package/lib/{BridgeCloseButton.js → mjs/BridgeCloseButton.js} +0 -0
- /package/lib/{ButtonLink.js → mjs/ButtonLink.js} +0 -0
- /package/lib/{ButtonPopover.js → mjs/ButtonPopover.js} +0 -0
- /package/lib/{ComboBox.js → mjs/ComboBox.js} +0 -0
- /package/lib/{ComboBoxMultiple.js → mjs/ComboBoxMultiple.js} +0 -0
- /package/lib/{ComboBoxPro.js → mjs/ComboBoxPro.js} +0 -0
- /package/lib/{CountdownButton.js → mjs/CountdownButton.js} +0 -0
- /package/lib/{CountryList.js → mjs/CountryList.js} +0 -0
- /package/lib/{CultureDataTable.js → mjs/CultureDataTable.js} +0 -0
- /package/lib/{CustomFabProps.js → mjs/CustomFabProps.js} +0 -0
- /package/lib/{DataGridEx.js → mjs/DataGridEx.js} +0 -0
- /package/lib/{DataGridRenderers.js → mjs/DataGridRenderers.js} +0 -0
- /package/lib/{DataSteps.js → mjs/DataSteps.js} +0 -0
- /package/lib/{DataTable.js → mjs/DataTable.js} +0 -0
- /package/lib/{DialogButton.js → mjs/DialogButton.js} +0 -0
- /package/lib/{DnDList.js → mjs/DnDList.js} +0 -0
- /package/lib/{DraggablePaperComponent.js → mjs/DraggablePaperComponent.js} +0 -0
- /package/lib/{EmailInput.js → mjs/EmailInput.js} +0 -0
- /package/lib/{FabBox.js → mjs/FabBox.js} +0 -0
- /package/lib/{FieldSetEx.js → mjs/FieldSetEx.js} +0 -0
- /package/lib/{FileUploadButton.js → mjs/FileUploadButton.js} +0 -0
- /package/lib/{FlexBox.js → mjs/FlexBox.js} +0 -0
- /package/lib/{GridDataCacheType.js → mjs/GridDataCacheType.js} +0 -0
- /package/lib/{GridDataFormat.js → mjs/GridDataFormat.js} +0 -0
- /package/lib/{GridUtils.js → mjs/GridUtils.js} +0 -0
- /package/lib/{HiSelector.js → mjs/HiSelector.js} +0 -0
- /package/lib/{HiSelectorTL.js → mjs/HiSelectorTL.js} +0 -0
- /package/lib/{IconButtonLink.js → mjs/IconButtonLink.js} +0 -0
- /package/lib/{InputField.js → mjs/InputField.js} +0 -0
- /package/lib/{InputTipField.js → mjs/InputTipField.js} +0 -0
- /package/lib/{IntInputField.js → mjs/IntInputField.js} +0 -0
- /package/lib/{ItemList.js → mjs/ItemList.js} +0 -0
- /package/lib/{ListChooser.js → mjs/ListChooser.js} +0 -0
- /package/lib/{ListItemRightIcon.js → mjs/ListItemRightIcon.js} +0 -0
- /package/lib/{ListMoreDisplay.js → mjs/ListMoreDisplay.js} +0 -0
- /package/lib/{LoadingButton.js → mjs/LoadingButton.js} +0 -0
- /package/lib/{MUGlobal.js → mjs/MUGlobal.js} +0 -0
- /package/lib/{MUUtils.js → mjs/MUUtils.js} +0 -0
- /package/lib/{MenuButton.js → mjs/MenuButton.js} +0 -0
- /package/lib/{MobileListItemRenderer.js → mjs/MobileListItemRenderer.js} +0 -0
- /package/lib/{MoneyInputField.js → mjs/MoneyInputField.js} +0 -0
- /package/lib/{MoreFab.js → mjs/MoreFab.js} +0 -0
- /package/lib/{NotifierMU.js → mjs/NotifierMU.js} +0 -0
- /package/lib/{NotifierPopupProps.js → mjs/NotifierPopupProps.js} +0 -0
- /package/lib/{NotifierPromptProps.js → mjs/NotifierPromptProps.js} +0 -0
- /package/lib/{NumberInputField.js → mjs/NumberInputField.js} +0 -0
- /package/lib/{OptionBool.js → mjs/OptionBool.js} +0 -0
- /package/lib/{OptionGroup.js → mjs/OptionGroup.js} +0 -0
- /package/lib/{OptionGroupFlag.js → mjs/OptionGroupFlag.js} +0 -0
- /package/lib/{PList.js → mjs/PList.js} +0 -0
- /package/lib/{PercentCircularProgress.js → mjs/PercentCircularProgress.js} +0 -0
- /package/lib/{PercentLinearProgress.js → mjs/PercentLinearProgress.js} +0 -0
- /package/lib/{ProgressCount.js → mjs/ProgressCount.js} +0 -0
- /package/lib/{PullToRefreshUI.js → mjs/PullToRefreshUI.js} +0 -0
- /package/lib/{QuickList.js → mjs/QuickList.js} +0 -0
- /package/lib/{RegionsRQ.js → mjs/RegionsRQ.js} +0 -0
- /package/lib/{ResponsibleContainer.js → mjs/ResponsibleContainer.js} +0 -0
- /package/lib/{ResponsiveStyleValue.js → mjs/ResponsiveStyleValue.js} +0 -0
- /package/lib/{ScrollTopFab.js → mjs/ScrollTopFab.js} +0 -0
- /package/lib/{ScrollerListEx.js → mjs/ScrollerListEx.js} +0 -0
- /package/lib/{SearchBar.js → mjs/SearchBar.js} +0 -0
- /package/lib/{SearchField.js → mjs/SearchField.js} +0 -0
- /package/lib/{SearchOptionGroup.js → mjs/SearchOptionGroup.js} +0 -0
- /package/lib/{SelectBool.js → mjs/SelectBool.js} +0 -0
- /package/lib/{SelectEx.js → mjs/SelectEx.js} +0 -0
- /package/lib/{ShowDataComparison.js → mjs/ShowDataComparison.js} +0 -0
- /package/lib/{Switch.js → mjs/Switch.js} +0 -0
- /package/lib/{SwitchAnt.js → mjs/SwitchAnt.js} +0 -0
- /package/lib/{SwitchField.js → mjs/SwitchField.js} +0 -0
- /package/lib/{TabBox.js → mjs/TabBox.js} +0 -0
- /package/lib/{TableEx.js → mjs/TableEx.js} +0 -0
- /package/lib/{TagList.js → mjs/TagList.js} +0 -0
- /package/lib/{TagListPro.js → mjs/TagListPro.js} +0 -0
- /package/lib/{TextFieldEx.js → mjs/TextFieldEx.js} +0 -0
- /package/lib/{Tiplist.js → mjs/Tiplist.js} +0 -0
- /package/lib/{TiplistPro.js → mjs/TiplistPro.js} +0 -0
- /package/lib/{TooltipClick.js → mjs/TooltipClick.js} +0 -0
- /package/lib/{TwoFieldInput.js → mjs/TwoFieldInput.js} +0 -0
- /package/lib/{UserAvatar.js → mjs/UserAvatar.js} +0 -0
- /package/lib/{UserAvatarEditor.js → mjs/UserAvatarEditor.js} +0 -0
- /package/lib/{app → mjs/app}/CommonApp.js +0 -0
- /package/lib/{app → mjs/app}/IServiceApp.js +0 -0
- /package/lib/{app → mjs/app}/IServiceAppSettings.js +0 -0
- /package/lib/{app → mjs/app}/IServicePage.js +0 -0
- /package/lib/{app → mjs/app}/IServiceUser.js +0 -0
- /package/lib/{app → mjs/app}/ISmartERPUser.js +0 -0
- /package/lib/{app → mjs/app}/Labels.js +0 -0
- /package/lib/{app → mjs/app}/ReactApp.js +0 -0
- /package/lib/{app → mjs/app}/ServiceApp.js +0 -0
- /package/lib/{custom → mjs/custom}/CustomFieldUtils.js +0 -0
- /package/lib/{custom → mjs/custom}/CustomFieldViewer.js +0 -0
- /package/lib/{custom → mjs/custom}/CustomFieldWindow.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldAmountLabel.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldCheckbox.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldCombobox.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldDateInput.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldDivider.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldInput.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldJson.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldLabel.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldNumberInput.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldRadio.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldSelect.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldSwitch.js +0 -0
- /package/lib/{custom → mjs/custom}/FieldTexarea.js +0 -0
- /package/lib/{index.js → mjs/index.d.ts} +0 -0
- /package/lib/{messages → mjs/messages}/MessageUtils.js +0 -0
- /package/lib/{messages → mjs/messages}/OperationMessageContainer.js +0 -0
- /package/lib/{messages → mjs/messages}/OperationMessageDto.js +0 -0
- /package/lib/{messages → mjs/messages}/OperationMessageHandler.js +0 -0
- /package/lib/{messages → mjs/messages}/RefreshHandler.js +0 -0
- /package/lib/{messages → mjs/messages}/SignalRUser.js +0 -0
- /package/lib/{pages → mjs/pages}/CommonPage.js +0 -0
- /package/lib/{pages → mjs/pages}/DataGridPage.js +0 -0
- /package/lib/{pages → mjs/pages}/DataGridPageProps.js +0 -0
- /package/lib/{pages → mjs/pages}/DrawerHeader.js +0 -0
- /package/lib/{pages → mjs/pages}/EditPage.js +0 -0
- /package/lib/{pages → mjs/pages}/FixedListPage.js +0 -0
- /package/lib/{pages → mjs/pages}/LeftDrawer.js +0 -0
- /package/lib/{pages → mjs/pages}/ListPage.js +0 -0
- /package/lib/{pages → mjs/pages}/ResponsivePage.js +0 -0
- /package/lib/{pages → mjs/pages}/SearchPageProps.js +0 -0
- /package/lib/{pages → mjs/pages}/TablePage.js +0 -0
- /package/lib/{pages → mjs/pages}/UserMenu.js +0 -0
- /package/lib/{texts → mjs/texts}/DateText.js +0 -0
- /package/lib/{texts → mjs/texts}/MoneyText.js +0 -0
- /package/lib/{texts → mjs/texts}/NumberText.js +0 -0
- /package/{vite.config.ts → vite.config.mts} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DataSteps = DataSteps;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
10
|
+
const NavigateNext_1 = __importDefault(require("@mui/icons-material/NavigateNext"));
|
|
11
|
+
const NavigateBefore_1 = __importDefault(require("@mui/icons-material/NavigateBefore"));
|
|
12
|
+
const Check_1 = __importDefault(require("@mui/icons-material/Check"));
|
|
13
|
+
const Start_1 = __importDefault(require("@mui/icons-material/Start"));
|
|
14
|
+
const react_1 = __importDefault(require("react"));
|
|
15
|
+
const FlexBox_1 = require("./FlexBox");
|
|
16
|
+
const ReactApp_1 = require("./app/ReactApp");
|
|
17
|
+
const MUGlobal_1 = require("./MUGlobal");
|
|
18
|
+
/**
|
|
19
|
+
* Data collecting steps component
|
|
20
|
+
* @param props Props
|
|
21
|
+
* @returns Component
|
|
22
|
+
*/
|
|
23
|
+
function DataSteps(props) {
|
|
24
|
+
// App
|
|
25
|
+
const app = ReactApp_1.globalApp;
|
|
26
|
+
if (app == null) {
|
|
27
|
+
throw new Error("No globalApp");
|
|
28
|
+
}
|
|
29
|
+
// Labels
|
|
30
|
+
const labels = app.getLabels("close", "nextStep", "previousStep", "submit");
|
|
31
|
+
// Destruct
|
|
32
|
+
const { InputLabelProps = {}, jsonValue, valueFormatter = (_data) => "...", onValueChange, steps, value = "", ...rest } = props;
|
|
33
|
+
// Shrink
|
|
34
|
+
InputLabelProps.shrink ??= MUGlobal_1.MUGlobal.searchFieldShrink;
|
|
35
|
+
// Current index
|
|
36
|
+
const indexRef = react_1.default.useRef(-1);
|
|
37
|
+
// Current Json data
|
|
38
|
+
const jsonRef = react_1.default.useRef(jsonValue);
|
|
39
|
+
// Ignore empty value case
|
|
40
|
+
if (jsonValue !== jsonRef.current && valueFormatter(jsonValue))
|
|
41
|
+
jsonRef.current = jsonValue;
|
|
42
|
+
// Current value
|
|
43
|
+
const [localValue, setLocalValue] = react_1.default.useState(value);
|
|
44
|
+
// Get step
|
|
45
|
+
const showStep = (index) => {
|
|
46
|
+
indexRef.current = index;
|
|
47
|
+
const [{ callback, ...rest }, more] = steps(index, jsonRef.current);
|
|
48
|
+
app.showInputDialog({
|
|
49
|
+
...rest,
|
|
50
|
+
buttons: (n, callback) => ((0, jsx_runtime_1.jsxs)(FlexBox_1.HBox, { paddingLeft: 2, paddingRight: 2, paddingBottom: 2, gap: 2, justifyContent: "space-between", children: [index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(Close_1.default, {}), onClick: () => n.dismiss(), children: labels.close })) : ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", startIcon: (0, jsx_runtime_1.jsx)(NavigateBefore_1.default, {}), onClick: () => {
|
|
51
|
+
n.dismiss();
|
|
52
|
+
showStep(indexRef.current - 1);
|
|
53
|
+
}, children: labels.previousStep })), more ? ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", startIcon: (0, jsx_runtime_1.jsx)(NavigateNext_1.default, {}), onClick: async (event) => {
|
|
54
|
+
const result = await callback(event);
|
|
55
|
+
if (!result)
|
|
56
|
+
return;
|
|
57
|
+
showStep(indexRef.current + 1);
|
|
58
|
+
}, children: labels.nextStep })) : ((0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", startIcon: (0, jsx_runtime_1.jsx)(Check_1.default, {}), onClick: async (event) => {
|
|
59
|
+
const result = await callback(event);
|
|
60
|
+
if (!result)
|
|
61
|
+
return;
|
|
62
|
+
const value = jsonRef.current;
|
|
63
|
+
setLocalValue(valueFormatter(value));
|
|
64
|
+
if (onValueChange)
|
|
65
|
+
onValueChange(value);
|
|
66
|
+
}, children: labels.submit }))] })),
|
|
67
|
+
callback: (form) => {
|
|
68
|
+
if (form == null)
|
|
69
|
+
return;
|
|
70
|
+
const result = callback(form);
|
|
71
|
+
if (result !== true) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const cancelInput = (event) => {
|
|
78
|
+
event.stopPropagation();
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
};
|
|
81
|
+
react_1.default.useEffect(() => {
|
|
82
|
+
setLocalValue(valueFormatter(jsonRef.current));
|
|
83
|
+
}, [valueFormatter]);
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TextField, { autoComplete: "off", InputLabelProps: InputLabelProps, inputProps: { style: { cursor: "pointer" } }, InputProps: {
|
|
85
|
+
onKeyDown: (event) => {
|
|
86
|
+
if (event.key === "Tab")
|
|
87
|
+
return;
|
|
88
|
+
cancelInput(event);
|
|
89
|
+
},
|
|
90
|
+
onPaste: cancelInput,
|
|
91
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", size: "small", children: (0, jsx_runtime_1.jsx)(Start_1.default, {}) }) }))
|
|
92
|
+
}, onClick: () => showStep(0), value: localValue, ...rest }));
|
|
93
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DataTable = DataTable;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const ReactApp_1 = require("./app/ReactApp");
|
|
11
|
+
/**
|
|
12
|
+
* Data table
|
|
13
|
+
* @param props Props
|
|
14
|
+
* @returns Component
|
|
15
|
+
*/
|
|
16
|
+
function DataTable(props) {
|
|
17
|
+
// Destructor
|
|
18
|
+
const { localeText = {}, onCellSelection, onProcessRowUpdateError = (error) => console.log("onProcessRowUpdateError", error), slotProps, ...rest } = props;
|
|
19
|
+
// Labels
|
|
20
|
+
const { noRows } = ReactApp_1.globalApp?.getLabels("noRows") ?? {};
|
|
21
|
+
if (noRows && !localeText.noRowsLabel)
|
|
22
|
+
localeText.noRowsLabel = noRows;
|
|
23
|
+
const [cellModesModel, setCellModesModel] = react_1.default.useState({});
|
|
24
|
+
const handleCellFocus = react_1.default.useCallback((event) => {
|
|
25
|
+
// event.target is the element that triggered the event
|
|
26
|
+
// event.currentTarget is the element that the event listener is attached to
|
|
27
|
+
const cell = event.currentTarget;
|
|
28
|
+
const row = cell.parentElement;
|
|
29
|
+
if (row == null)
|
|
30
|
+
return;
|
|
31
|
+
const id = row.dataset.id;
|
|
32
|
+
const index = row.dataset.rowindex;
|
|
33
|
+
const field = cell.dataset.field;
|
|
34
|
+
if (id == null || index == null || field == null)
|
|
35
|
+
return;
|
|
36
|
+
const params = {
|
|
37
|
+
id,
|
|
38
|
+
field,
|
|
39
|
+
index: parseInt(index)
|
|
40
|
+
};
|
|
41
|
+
if (onCellSelection) {
|
|
42
|
+
if (onCellSelection(params) === false)
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}, []);
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { disableColumnMenu: true, hideFooter: true, localeText: localeText, cellModesModel: cellModesModel, onCellModesModelChange: (model) => setCellModesModel(model), onProcessRowUpdateError: onProcessRowUpdateError, slotProps: {
|
|
47
|
+
...slotProps,
|
|
48
|
+
cell: {
|
|
49
|
+
onFocus: handleCellFocus
|
|
50
|
+
}
|
|
51
|
+
}, ...rest }));
|
|
52
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DialogButton = DialogButton;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const Labels_1 = require("./app/Labels");
|
|
11
|
+
/**
|
|
12
|
+
* Dialog button
|
|
13
|
+
* @param props Props
|
|
14
|
+
* @returns Component
|
|
15
|
+
*/
|
|
16
|
+
function DialogButton(props) {
|
|
17
|
+
// Labels shared with NotificationMU
|
|
18
|
+
const labels = Labels_1.Labels.NotificationMU;
|
|
19
|
+
// Destruct
|
|
20
|
+
const { buttonLabel = labels.alertOK, children, content, contentPre, dialogTitle, disableScrollLock, fullScreen, fullWidth, icon, inputs, maxWidth, onClick, title, ...rest } = props;
|
|
21
|
+
// Open state
|
|
22
|
+
const [open, setOpen] = react_1.default.useState(false);
|
|
23
|
+
const handleClickOpen = () => {
|
|
24
|
+
setOpen(true);
|
|
25
|
+
};
|
|
26
|
+
// Onclick handler
|
|
27
|
+
const onClickLocal = (event) => {
|
|
28
|
+
// Stop propagation
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
// Show dialog
|
|
32
|
+
handleClickOpen();
|
|
33
|
+
// Additional callback
|
|
34
|
+
if (onClick)
|
|
35
|
+
onClick(event);
|
|
36
|
+
};
|
|
37
|
+
// Layout
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [icon == null ? ((0, jsx_runtime_1.jsx)(material_1.Button, { ...rest, title: title, onClick: onClickLocal, children: children })) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, { ...rest, onClick: onClickLocal, title: title ?? children?.toString(), children: icon })), (0, jsx_runtime_1.jsxs)(material_1.Dialog, { disableScrollLock: disableScrollLock, fullScreen: fullScreen, fullWidth: fullWidth, maxWidth: maxWidth, open: open, onClose: () => setOpen(false), onClick: (event) => {
|
|
39
|
+
// The dialog will be embeded and the click event will bubble up
|
|
40
|
+
// Stop propatation but will also cancel onClose and onBackdropClick event
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: dialogTitle ?? title ?? children }), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogContentText, { component: contentPre ? "pre" : "span", children: content }), inputs] }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => setOpen(false), children: buttonLabel }) })] })] }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DnDItemStyle = void 0;
|
|
7
|
+
exports.DnDList = DnDList;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
function SortableItem(props) {
|
|
12
|
+
// Destruct
|
|
13
|
+
const { id, useSortableType, CSSType, itemRenderer, style = {} } = props;
|
|
14
|
+
// Use sortable
|
|
15
|
+
const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef } = useSortableType({ id });
|
|
16
|
+
const allStyle = {
|
|
17
|
+
...style,
|
|
18
|
+
transform: CSSType.Transform.toString(transform),
|
|
19
|
+
transition
|
|
20
|
+
};
|
|
21
|
+
const nodeRef = {
|
|
22
|
+
style: allStyle,
|
|
23
|
+
ref: setNodeRef,
|
|
24
|
+
...attributes
|
|
25
|
+
};
|
|
26
|
+
const actionNodeRef = {
|
|
27
|
+
...listeners,
|
|
28
|
+
ref: setActivatorNodeRef
|
|
29
|
+
};
|
|
30
|
+
return itemRenderer(nodeRef, actionNodeRef);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* DnD item default style
|
|
34
|
+
* @param index Item index
|
|
35
|
+
* @param isDragging Is dragging
|
|
36
|
+
* @param theme Theme
|
|
37
|
+
* @returns Style
|
|
38
|
+
*/
|
|
39
|
+
const DnDItemStyle = (index, isDragging, theme) => ({
|
|
40
|
+
padding: theme.spacing(1),
|
|
41
|
+
zIndex: isDragging ? 1 : "auto",
|
|
42
|
+
background: isDragging
|
|
43
|
+
? theme.palette.primary.light
|
|
44
|
+
: index % 2 === 0
|
|
45
|
+
? theme.palette.grey[100]
|
|
46
|
+
: theme.palette.grey[50]
|
|
47
|
+
});
|
|
48
|
+
exports.DnDItemStyle = DnDItemStyle;
|
|
49
|
+
/**
|
|
50
|
+
* DnD (Drag and Drop) sortable list
|
|
51
|
+
* @param props Props
|
|
52
|
+
* @returns Component
|
|
53
|
+
*/
|
|
54
|
+
function DnDList(props) {
|
|
55
|
+
// Destruct
|
|
56
|
+
const { keyField, height = 360, itemRenderer, labelField, mRef, sortingStrategy, onChange, onFormChange, onDragEnd } = props;
|
|
57
|
+
// Theme
|
|
58
|
+
const theme = (0, material_1.useTheme)();
|
|
59
|
+
// States
|
|
60
|
+
const [items, setItems] = react_1.default.useState([]);
|
|
61
|
+
const [activeId, setActiveId] = react_1.default.useState();
|
|
62
|
+
react_1.default.useEffect(() => {
|
|
63
|
+
setItems(props.items);
|
|
64
|
+
}, [props.items]);
|
|
65
|
+
const doFormChange = react_1.default.useCallback((newItems) => {
|
|
66
|
+
if (onFormChange)
|
|
67
|
+
onFormChange(newItems ?? items);
|
|
68
|
+
}, [items, onFormChange]);
|
|
69
|
+
const changeItems = react_1.default.useCallback((newItems) => {
|
|
70
|
+
// Possible to alter items with the handler
|
|
71
|
+
if (onChange)
|
|
72
|
+
onChange(newItems);
|
|
73
|
+
doFormChange(newItems);
|
|
74
|
+
// Update state
|
|
75
|
+
setItems(newItems);
|
|
76
|
+
}, [onChange, doFormChange]);
|
|
77
|
+
// Methods
|
|
78
|
+
react_1.default.useImperativeHandle(mRef, () => {
|
|
79
|
+
return {
|
|
80
|
+
addItem(newItem) {
|
|
81
|
+
// Existence check
|
|
82
|
+
if (items.some((item) => item[labelField] === newItem[labelField])) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
// Clone
|
|
86
|
+
const newItems = [newItem, ...items];
|
|
87
|
+
// Update the state
|
|
88
|
+
changeItems(newItems);
|
|
89
|
+
return true;
|
|
90
|
+
},
|
|
91
|
+
addItems(inputItems) {
|
|
92
|
+
// Clone
|
|
93
|
+
const newItems = [...items];
|
|
94
|
+
// Insert items
|
|
95
|
+
inputItems.forEach((newItem) => {
|
|
96
|
+
// Existence check
|
|
97
|
+
if (newItems.some((item) => item[labelField] === newItem[labelField])) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
newItems.push(newItem);
|
|
101
|
+
});
|
|
102
|
+
// Update the state
|
|
103
|
+
changeItems(newItems);
|
|
104
|
+
return newItems.length - items.length;
|
|
105
|
+
},
|
|
106
|
+
editItem(newItem, index) {
|
|
107
|
+
// Existence check
|
|
108
|
+
const newIndex = items.findIndex((item) => item[labelField] === newItem[labelField]);
|
|
109
|
+
if (newIndex >= 0 && newIndex !== index) {
|
|
110
|
+
// Label field is the same with a different item
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
// Clone
|
|
114
|
+
const newItems = [...items];
|
|
115
|
+
// Remove the item
|
|
116
|
+
newItems.splice(index, 1, newItem);
|
|
117
|
+
// Update the state
|
|
118
|
+
changeItems(newItems);
|
|
119
|
+
return true;
|
|
120
|
+
},
|
|
121
|
+
deleteItem(index) {
|
|
122
|
+
// Clone
|
|
123
|
+
const newItems = [...items];
|
|
124
|
+
// Remove the item
|
|
125
|
+
newItems.splice(index, 1);
|
|
126
|
+
// Update the state
|
|
127
|
+
changeItems(newItems);
|
|
128
|
+
},
|
|
129
|
+
getItems() {
|
|
130
|
+
return items;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}, [items, labelField, changeItems]);
|
|
134
|
+
// Dynamic import library
|
|
135
|
+
const [dnd, setDnd] = react_1.default.useState();
|
|
136
|
+
react_1.default.useEffect(() => {
|
|
137
|
+
Promise.all([
|
|
138
|
+
import("@dnd-kit/core"),
|
|
139
|
+
import("@dnd-kit/sortable"),
|
|
140
|
+
import("@dnd-kit/utilities")
|
|
141
|
+
]).then(([{ DndContext }, { SortableContext, useSortable, rectSortingStrategy, rectSwappingStrategy, horizontalListSortingStrategy, verticalListSortingStrategy }, { CSS }]) => {
|
|
142
|
+
setDnd([
|
|
143
|
+
DndContext,
|
|
144
|
+
SortableContext,
|
|
145
|
+
useSortable,
|
|
146
|
+
rectSortingStrategy,
|
|
147
|
+
rectSwappingStrategy,
|
|
148
|
+
horizontalListSortingStrategy,
|
|
149
|
+
verticalListSortingStrategy,
|
|
150
|
+
CSS
|
|
151
|
+
]);
|
|
152
|
+
});
|
|
153
|
+
}, []);
|
|
154
|
+
if (dnd == null) {
|
|
155
|
+
return (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: height });
|
|
156
|
+
}
|
|
157
|
+
const [DndContextType, SortableContextType, useSortableType, rectSortingStrategyType, rectSwappingStrategyType, horizontalListSortingStrategyType, verticalListSortingStrategyType, CSSType] = dnd;
|
|
158
|
+
const strategy = typeof sortingStrategy === "function"
|
|
159
|
+
? sortingStrategy()
|
|
160
|
+
: sortingStrategy === "rect"
|
|
161
|
+
? rectSortingStrategyType
|
|
162
|
+
: sortingStrategy === "rectSwapping"
|
|
163
|
+
? rectSwappingStrategyType
|
|
164
|
+
: sortingStrategy === "horizontal"
|
|
165
|
+
? horizontalListSortingStrategyType
|
|
166
|
+
: sortingStrategy === "vertical"
|
|
167
|
+
? verticalListSortingStrategyType
|
|
168
|
+
: undefined;
|
|
169
|
+
let getItemStyle = props.getItemStyle;
|
|
170
|
+
if (getItemStyle == null) {
|
|
171
|
+
getItemStyle = (index, isDragging) => (0, exports.DnDItemStyle)(index, isDragging, theme);
|
|
172
|
+
}
|
|
173
|
+
// Drag event handlers
|
|
174
|
+
function handleDragStart(event) {
|
|
175
|
+
const { active } = event;
|
|
176
|
+
setActiveId(active.id);
|
|
177
|
+
}
|
|
178
|
+
function handleDragEnd(event) {
|
|
179
|
+
const { active, over } = event;
|
|
180
|
+
if (over && active.id !== over.id) {
|
|
181
|
+
// Indices
|
|
182
|
+
const oldIndex = items.findIndex((item) => item.id === active.id);
|
|
183
|
+
const newIndex = items.findIndex((item) => item.id === over.id);
|
|
184
|
+
// Clone
|
|
185
|
+
const newItems = [...items];
|
|
186
|
+
// Removed item
|
|
187
|
+
const [removed] = newItems.splice(oldIndex, 1);
|
|
188
|
+
// Insert to the destination index
|
|
189
|
+
newItems.splice(newIndex, 0, removed);
|
|
190
|
+
changeItems(newItems);
|
|
191
|
+
// Drag end handler
|
|
192
|
+
if (onDragEnd)
|
|
193
|
+
onDragEnd(newItems);
|
|
194
|
+
}
|
|
195
|
+
setActiveId(undefined);
|
|
196
|
+
}
|
|
197
|
+
const setupDiv = (div) => {
|
|
198
|
+
// Inputs
|
|
199
|
+
div
|
|
200
|
+
.querySelectorAll("input")
|
|
201
|
+
.forEach((input) => input.addEventListener("change", () => doFormChange()));
|
|
202
|
+
// Textareas
|
|
203
|
+
div
|
|
204
|
+
.querySelectorAll("textarea")
|
|
205
|
+
.forEach((input) => input.addEventListener("change", () => doFormChange()));
|
|
206
|
+
// Select
|
|
207
|
+
div
|
|
208
|
+
.querySelectorAll("select")
|
|
209
|
+
.forEach((input) => input.addEventListener("change", () => doFormChange()));
|
|
210
|
+
};
|
|
211
|
+
const children = ((0, jsx_runtime_1.jsx)(DndContextType, { onDragStart: handleDragStart, onDragEnd: handleDragEnd, children: (0, jsx_runtime_1.jsx)(SortableContextType, { items: items, strategy: strategy, children: items.map((item, index) => {
|
|
212
|
+
const id = item[keyField];
|
|
213
|
+
return ((0, jsx_runtime_1.jsx)(SortableItem, { id: id, useSortableType: useSortableType, CSSType: CSSType, style: getItemStyle(index, id === activeId), itemRenderer: (nodeRef, actionNodeRef) => itemRenderer(item, index, nodeRef, actionNodeRef) }, id));
|
|
214
|
+
}) }) }));
|
|
215
|
+
if (onFormChange) {
|
|
216
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { width: "100%" }, ref: (div) => {
|
|
217
|
+
if (div)
|
|
218
|
+
setupDiv(div);
|
|
219
|
+
}, children: children }));
|
|
220
|
+
}
|
|
221
|
+
return children;
|
|
222
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DraggablePaperComponent = DraggablePaperComponent;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const react_draggable_1 = __importDefault(require("react-draggable"));
|
|
11
|
+
/**
|
|
12
|
+
* Draggable paper component
|
|
13
|
+
* @param props Props
|
|
14
|
+
* @returns Component
|
|
15
|
+
*/
|
|
16
|
+
function DraggablePaperComponent(props) {
|
|
17
|
+
const nodeRef = react_1.default.useRef(null);
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(react_draggable_1.default, { handle: ".draggable-dialog-title", cancel: '[class*="MuiDialogContent-root"]', nodeRef: nodeRef, children: (0, jsx_runtime_1.jsx)(material_1.Paper, { ref: nodeRef, ...props }) }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailInput = EmailInput;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
/**
|
|
7
|
+
* Email input
|
|
8
|
+
* @param props Props
|
|
9
|
+
*/
|
|
10
|
+
function EmailInput(props) {
|
|
11
|
+
// Destruct
|
|
12
|
+
const { inputProps = {}, ...rest } = props;
|
|
13
|
+
// Default max length
|
|
14
|
+
inputProps.maxLength ??= 128;
|
|
15
|
+
// Layout
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(material_1.TextField, { type: "email", fullWidth: true, inputProps: inputProps, ...rest });
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FabBox = FabBox;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const initOpactiy = 0.15;
|
|
11
|
+
/**
|
|
12
|
+
* Fabs container box
|
|
13
|
+
* @param props Props
|
|
14
|
+
* @returns Component
|
|
15
|
+
*/
|
|
16
|
+
function FabBox(props) {
|
|
17
|
+
// Destruct
|
|
18
|
+
const { columnDirection, fabPanel = columnDirection, itemGap = 1, sx, ...rest } = props;
|
|
19
|
+
// Theme
|
|
20
|
+
const theme = (0, material_1.useTheme)();
|
|
21
|
+
const spaceGap = theme.spacing(itemGap);
|
|
22
|
+
const [opacity, setOpacity] = react_1.default.useState(initOpactiy);
|
|
23
|
+
if (columnDirection == null)
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, {});
|
|
25
|
+
return fabPanel ? ((0, jsx_runtime_1.jsx)(material_1.Paper, { sx: {
|
|
26
|
+
position: "fixed",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
padding: spaceGap,
|
|
30
|
+
flexDirection: columnDirection ? "column" : "row",
|
|
31
|
+
gap: spaceGap,
|
|
32
|
+
opacity: opacity,
|
|
33
|
+
...sx
|
|
34
|
+
}, onMouseEnter: () => setOpacity(1), onMouseLeave: () => setOpacity(initOpactiy), ...rest })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
35
|
+
position: "fixed",
|
|
36
|
+
display: "flex",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
flexDirection: columnDirection ? "column" : "row",
|
|
39
|
+
gap: spaceGap,
|
|
40
|
+
...sx
|
|
41
|
+
}, ...rest }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FieldSetEx = FieldSetEx;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const OutlinedInput_1 = __importDefault(require("@mui/material/OutlinedInput"));
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
/**
|
|
12
|
+
* FieldSetEx
|
|
13
|
+
* @param props Props
|
|
14
|
+
* @returns Component
|
|
15
|
+
*/
|
|
16
|
+
function FieldSetEx(props) {
|
|
17
|
+
// Destruct
|
|
18
|
+
const { label, helperText, required, fullWidth, children, ...rest } = props;
|
|
19
|
+
// Layout
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormControl, { fullWidth: fullWidth, ...rest, children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { required: required, variant: "outlined", shrink: true, children: label })), (0, jsx_runtime_1.jsx)(OutlinedInput_1.default, { label: label && required ? label + " *" : label, notched: true, endAdornment: children, sx: {
|
|
21
|
+
cursor: "default",
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexWrap: "wrap",
|
|
24
|
+
gap: 1,
|
|
25
|
+
paddingX: 2,
|
|
26
|
+
paddingY: "7px",
|
|
27
|
+
width: fullWidth ? "100%" : "auto",
|
|
28
|
+
"& input": {
|
|
29
|
+
display: "none"
|
|
30
|
+
}
|
|
31
|
+
} })] }), helperText && ((0, jsx_runtime_1.jsx)(material_1.FormHelperText, { sx: { marginLeft: 2, marginRight: 2 }, children: helperText }))] }));
|
|
32
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileUploadButton = FileUploadButton;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
/**
|
|
7
|
+
* File upload button
|
|
8
|
+
* @param props Props
|
|
9
|
+
* @returns Component
|
|
10
|
+
*/
|
|
11
|
+
function FileUploadButton(props) {
|
|
12
|
+
// Destruct
|
|
13
|
+
const { maxFiles, maxFileSize, inputProps, onFileInvalid, onUploadFiles, children, ...rest } = props;
|
|
14
|
+
const { onChange } = inputProps ?? {};
|
|
15
|
+
// Layout
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Button, { component: "label", ...rest, children: [children, (0, jsx_runtime_1.jsx)("input", { type: "file", hidden: true, onChange: (event) => {
|
|
17
|
+
if (onChange)
|
|
18
|
+
onChange(event);
|
|
19
|
+
if (event.isDefaultPrevented())
|
|
20
|
+
return;
|
|
21
|
+
if (onUploadFiles) {
|
|
22
|
+
const files = event.target.files;
|
|
23
|
+
if (files == null)
|
|
24
|
+
return;
|
|
25
|
+
const fl = files.length;
|
|
26
|
+
if (fl === 0)
|
|
27
|
+
return;
|
|
28
|
+
if (maxFiles && maxFiles > 0 && fl > maxFiles) {
|
|
29
|
+
if (onFileInvalid)
|
|
30
|
+
onFileInvalid([maxFiles, fl]);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (maxFileSize && maxFileSize > 0) {
|
|
34
|
+
for (let f = 0; f < fl; f++) {
|
|
35
|
+
const file = files[f];
|
|
36
|
+
if (file.size > maxFileSize) {
|
|
37
|
+
if (onFileInvalid)
|
|
38
|
+
onFileInvalid([maxFileSize, file.size], file);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
onUploadFiles(files);
|
|
44
|
+
}
|
|
45
|
+
}, ...inputProps })] }));
|
|
46
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HBox = HBox;
|
|
4
|
+
exports.VBox = VBox;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
/**
|
|
8
|
+
* Horizonal box
|
|
9
|
+
* @param props Props
|
|
10
|
+
* @returns Component
|
|
11
|
+
*/
|
|
12
|
+
function HBox(props) {
|
|
13
|
+
return (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", width: "100%", ...props });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Vertial box
|
|
17
|
+
* @param props Props
|
|
18
|
+
* @returns Component
|
|
19
|
+
*/
|
|
20
|
+
function VBox(props) {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "column", ...props });
|
|
22
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridDataFormat = GridDataFormat;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@etsoo/react");
|
|
6
|
+
const shared_1 = require("@etsoo/shared");
|
|
7
|
+
const DateText_1 = require("./texts/DateText");
|
|
8
|
+
/**
|
|
9
|
+
* Grid data format
|
|
10
|
+
* @param data Input data
|
|
11
|
+
* @param type Data type
|
|
12
|
+
* @param renderProps Render props
|
|
13
|
+
* @returns Result
|
|
14
|
+
*/
|
|
15
|
+
function GridDataFormat(data, type, renderProps) {
|
|
16
|
+
// Null
|
|
17
|
+
if (data == null)
|
|
18
|
+
return undefined;
|
|
19
|
+
// For date time
|
|
20
|
+
// Conversion if necessary
|
|
21
|
+
if (type === react_1.GridDataType.Date || type === react_1.GridDataType.DateTime) {
|
|
22
|
+
const dateValue = data instanceof Date
|
|
23
|
+
? data
|
|
24
|
+
: typeof data === "number" || typeof data === "string"
|
|
25
|
+
? new Date(data)
|
|
26
|
+
: undefined;
|
|
27
|
+
if (dateValue == null)
|
|
28
|
+
return undefined;
|
|
29
|
+
const option = type === react_1.GridDataType.DateTime ? "ds" : "d";
|
|
30
|
+
const nearDays = renderProps?.nearDays;
|
|
31
|
+
if (nearDays != null) {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(DateText_1.DateText, { value: dateValue, locale: renderProps?.culture, timeZone: renderProps?.timeZone, options: option, nearDays: nearDays }));
|
|
33
|
+
}
|
|
34
|
+
return shared_1.DateUtils.format(dateValue, renderProps?.culture, option, renderProps?.timeZone);
|
|
35
|
+
}
|
|
36
|
+
// For numbers
|
|
37
|
+
if (typeof data === "number") {
|
|
38
|
+
if (type === react_1.GridDataType.Money || type === react_1.GridDataType.IntMoney)
|
|
39
|
+
return shared_1.NumberUtils.formatMoney(data, renderProps?.currency, renderProps?.culture, type === react_1.GridDataType.IntMoney, renderProps?.numberFormatOptions);
|
|
40
|
+
else
|
|
41
|
+
return shared_1.NumberUtils.format(data, renderProps?.culture, renderProps?.numberFormatOptions);
|
|
42
|
+
}
|
|
43
|
+
if (typeof data === "string")
|
|
44
|
+
return data;
|
|
45
|
+
return `${data}`;
|
|
46
|
+
}
|