@nu-art/thunderstorm-frontend 0.400.5
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/_ats/ATS_ActionProcessor/ATS_ActionProcessor.d.ts +17 -0
- package/_ats/ATS_ActionProcessor/ATS_ActionProcessor.js +52 -0
- package/_ats/ATS_ActionProcessor/ATS_ActionProcessor.scss +43 -0
- package/_ats/ATS_AppConfigEditor/ATS_AppConfigEditor.d.ts +25 -0
- package/_ats/ATS_AppConfigEditor/ATS_AppConfigEditor.js +88 -0
- package/_ats/ATS_AppConfigEditor/ATS_AppConfigEditor.scss +117 -0
- package/_ats/ATS_CollectionUpgrades/ATS_CollectionUpgrades.d.ts +17 -0
- package/_ats/ATS_CollectionUpgrades/ATS_CollectionUpgrades.js +45 -0
- package/_ats/ATS_CollectionUpgrades/ATS_CollectionUpgrades.scss +24 -0
- package/_ats/ATS_CrudOperations/ATS_CrudOperations.d.ts +29 -0
- package/_ats/ATS_CrudOperations/ATS_CrudOperations.js +93 -0
- package/_ats/ATS_CrudOperations/ATS_CrudOperations.scss +46 -0
- package/_ats/ATS_CrudOperations/ui-components.d.ts +24 -0
- package/_ats/ATS_CrudOperations/ui-components.js +11 -0
- package/_ats/ATS_EditableItem/ATS_EditableItem.d.ts +16 -0
- package/_ats/ATS_EditableItem/ATS_EditableItem.js +48 -0
- package/_ats/ATS_IDBCacheComparison/ATS_IDBCacheComparison.d.ts +18 -0
- package/_ats/ATS_IDBCacheComparison/ATS_IDBCacheComparison.js +28 -0
- package/_ats/ATS_IDBCacheComparison/ATS_IDBCacheComparison.scss +7 -0
- package/_ats/ATS_IDBCacheComparison/Component_CollectionGrid.d.ts +23 -0
- package/_ats/ATS_IDBCacheComparison/Component_CollectionGrid.js +66 -0
- package/_ats/ATS_IDBCacheComparison/Component_CollectionGrid.scss +52 -0
- package/_ats/ATS_IDBCacheComparison/Dialog_IDBCacheComparison.d.ts +17 -0
- package/_ats/ATS_IDBCacheComparison/Dialog_IDBCacheComparison.js +30 -0
- package/_ats/ATS_IDBCacheComparison/Dialog_IDBCacheComparison.scss +25 -0
- package/_ats/ATS_Printables/ATS_AbstractPrintable.d.ts +16 -0
- package/_ats/ATS_Printables/ATS_AbstractPrintable.js +37 -0
- package/_ats/ATS_Printables/ATS_Printable.d.ts +13 -0
- package/_ats/ATS_Printables/ATS_Printable.js +45 -0
- package/_ats/ATS_Printables/ATS_Printable.scss +40 -0
- package/_ats/ATS_ProtoComponent/ATS_ProtoComponent.d.ts +33 -0
- package/_ats/ATS_ProtoComponent/ATS_ProtoComponent.js +80 -0
- package/_ats/ATS_ProtoComponent/ATS_ProtoComponent.scss +19 -0
- package/_ats/ATS_SyncEnv/ATS_SyncEnv.d.ts +51 -0
- package/_ats/ATS_SyncEnv/ATS_SyncEnv.js +215 -0
- package/_ats/ATS_SyncEnv/ATS_SyncEnv.scss +172 -0
- package/_ats/ATS_Toaster/ATS_Toaster.d.ts +23 -0
- package/_ats/ATS_Toaster/ATS_Toaster.js +48 -0
- package/_ats/ATS_Toaster/ATS_Toaster.scss +2 -0
- package/_ats/ATS_Toaster/index.d.ts +1 -0
- package/_ats/ATS_Toaster/index.js +1 -0
- package/_ats/dialogs/Dialog_ActionProcessorConfirmation/Dialog_ActionProcessorConfirmation.d.ts +18 -0
- package/_ats/dialogs/Dialog_ActionProcessorConfirmation/Dialog_ActionProcessorConfirmation.js +41 -0
- package/_ats/dialogs/Dialog_ActionProcessorConfirmation/Dialog_ActionProcessorConfirmation.scss +71 -0
- package/_ats/dialogs/index.d.ts +1 -0
- package/_ats/dialogs/index.js +1 -0
- package/_ats/index.d.ts +8 -0
- package/_ats/index.js +8 -0
- package/_entity/app-config/ModuleFE_AppConfig.d.ts +24 -0
- package/_entity/app-config/ModuleFE_AppConfig.js +52 -0
- package/_entity/app-config/index.d.ts +2 -0
- package/_entity/app-config/index.js +2 -0
- package/_entity/app-config/module-pack.d.ts +1 -0
- package/_entity/app-config/module-pack.js +2 -0
- package/_entity/editable-test/ModuleFE_EditableTest.d.ts +11 -0
- package/_entity/editable-test/ModuleFE_EditableTest.js +12 -0
- package/_entity/editable-test/index.d.ts +2 -0
- package/_entity/editable-test/index.js +2 -0
- package/_entity/editable-test/module-pack.d.ts +1 -0
- package/_entity/editable-test/module-pack.js +2 -0
- package/_entity/editable-test/ui-components.d.ts +37 -0
- package/_entity/editable-test/ui-components.js +21 -0
- package/_entity.d.ts +2 -0
- package/_entity.js +2 -0
- package/_to-refactor/MenuAndButton.d.ts +1 -0
- package/_to-refactor/MenuAndButton.js +87 -0
- package/behavior-functions/index.d.ts +1 -0
- package/behavior-functions/index.js +1 -0
- package/behavior-functions/scroll-into-view.d.ts +6 -0
- package/behavior-functions/scroll-into-view.js +55 -0
- package/component-modules/ModuleFE_Dialog.d.ts +27 -0
- package/component-modules/ModuleFE_Dialog.js +48 -0
- package/component-modules/ModuleFE_Notifications.d.ts +45 -0
- package/component-modules/ModuleFE_Notifications.js +133 -0
- package/component-modules/ModuleFE_Toaster.d.ts +28 -0
- package/component-modules/ModuleFE_Toaster.js +97 -0
- package/component-modules/mouse-interactivity/ModuleFE_MouseInteractivity.d.ts +9 -0
- package/component-modules/mouse-interactivity/ModuleFE_MouseInteractivity.js +35 -0
- package/component-modules/mouse-interactivity/helper-functions.d.ts +108 -0
- package/component-modules/mouse-interactivity/helper-functions.js +339 -0
- package/component-modules/mouse-interactivity/index.d.ts +3 -0
- package/component-modules/mouse-interactivity/index.js +3 -0
- package/component-modules/mouse-interactivity/types.d.ts +37 -0
- package/component-modules/mouse-interactivity/types.js +2 -0
- package/components/ActionButton.d.ts +7 -0
- package/components/ActionButton.js +29 -0
- package/components/AwaitModules/AwaitModules.d.ts +40 -0
- package/components/AwaitModules/AwaitModules.js +95 -0
- package/components/AwaitModules/AwaitModules.scss +53 -0
- package/components/AwaitSync/AwaitSync.d.ts +18 -0
- package/components/AwaitSync/AwaitSync.js +25 -0
- package/components/AwaitSync/AwaitSync.scss +13 -0
- package/components/Button/ATS_Button.d.ts +21 -0
- package/components/Button/ATS_Button.js +66 -0
- package/components/Button/ATS_Button.scss +19 -0
- package/components/Button/Button.d.ts +40 -0
- package/components/Button/Button.js +94 -0
- package/components/Button/Button.scss +151 -0
- package/components/FrameLayout/FrameLayout.d.ts +7 -0
- package/components/FrameLayout/FrameLayout.js +10 -0
- package/components/FrameLayout/FrameLayout.scss +5 -0
- package/components/FrameLayout/index.d.ts +1 -0
- package/components/FrameLayout/index.js +1 -0
- package/components/GenericDropDown/GenericDropDownV3.d.ts +108 -0
- package/components/GenericDropDown/GenericDropDownV3.js +98 -0
- package/components/GenericDropDown/index.d.ts +1 -0
- package/components/GenericDropDown/index.js +1 -0
- package/components/GenericRenderer/Component_GenericRenderer.d.ts +15 -0
- package/components/GenericRenderer/Component_GenericRenderer.js +13 -0
- package/components/HeightBounder.d.ts +11 -0
- package/components/HeightBounder.js +25 -0
- package/components/Label/ATS_Label.d.ts +12 -0
- package/components/Label/ATS_Label.js +34 -0
- package/components/Label/ATS_Label.scss +24 -0
- package/components/Label/Label.d.ts +30 -0
- package/components/Label/Label.js +84 -0
- package/components/Label/Label.scss +89 -0
- package/components/Layouts/Layouts.d.ts +38 -0
- package/components/Layouts/Layouts.js +56 -0
- package/components/Layouts/_Layouts.scss +53 -0
- package/components/Layouts/_Layouts_.scss +69 -0
- package/components/Layouts/index.d.ts +1 -0
- package/components/Layouts/index.js +21 -0
- package/components/Page_ItemsEditor/Page_ItemsEditor.d.ts +66 -0
- package/components/Page_ItemsEditor/Page_ItemsEditor.js +134 -0
- package/components/Page_ItemsEditor/Page_ItemsEditor.scss +104 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_DefaultFilter/ItemEditor_DefaultFilter.d.ts +16 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_DefaultFilter/ItemEditor_DefaultFilter.js +15 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_DefaultFilter/ItemEditor_DefaultFilter.scss +4 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_DefaultFilter/index.d.ts +1 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_DefaultFilter/index.js +1 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_ListRenderer/ItemEditor_DefaultList.d.ts +26 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_ListRenderer/ItemEditor_DefaultList.js +68 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_ListRenderer/ItemEditor_DefaultList.scss +4 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_ListRenderer/index.d.ts +1 -0
- package/components/Page_ItemsEditor/defaults/ItemEditor_ListRenderer/index.js +1 -0
- package/components/Page_ItemsEditor/index.d.ts +1 -0
- package/components/Page_ItemsEditor/index.js +1 -0
- package/components/Page_ItemsEditor/types.d.ts +4 -0
- package/components/Page_ItemsEditor/types.js +1 -0
- package/components/RelativeLayout/RelativeLayout.d.ts +7 -0
- package/components/RelativeLayout/RelativeLayout.js +10 -0
- package/components/RelativeLayout/RelativeLayout.scss +3 -0
- package/components/RelativeLayout/index.d.ts +1 -0
- package/components/RelativeLayout/index.js +1 -0
- package/components/Show.d.ts +20 -0
- package/components/Show.js +30 -0
- package/components/TS_AppTools/TS_AppTools.d.ts +30 -0
- package/components/TS_AppTools/TS_AppTools.js +144 -0
- package/components/TS_AppTools/TS_AppTools.scss +193 -0
- package/components/TS_AppTools/TS_AppTools_Default.d.ts +7 -0
- package/components/TS_AppTools/TS_AppTools_Default.js +16 -0
- package/components/TS_AppTools/index.d.ts +2 -0
- package/components/TS_AppTools/index.js +22 -0
- package/components/TS_AppTools/types.d.ts +19 -0
- package/components/TS_AppTools/types.js +6 -0
- package/components/TS_ButtonGroup/TS_ButtonGroup.d.ts +12 -0
- package/components/TS_ButtonGroup/TS_ButtonGroup.js +94 -0
- package/components/TS_ButtonGroup/TS_ButtonGroup.scss +58 -0
- package/components/TS_ButtonGroup/index.d.ts +2 -0
- package/components/TS_ButtonGroup/index.js +2 -0
- package/components/TS_ButtonGroup/types.d.ts +38 -0
- package/components/TS_ButtonGroup/types.js +1 -0
- package/components/TS_ButtonLoader/TS_ButtonLoader.d.ts +5 -0
- package/components/TS_ButtonLoader/TS_ButtonLoader.js +8 -0
- package/components/TS_ButtonLoader/TS_ButtonLoader.scss +63 -0
- package/components/TS_ButtonLoader/index.d.ts +1 -0
- package/components/TS_ButtonLoader/index.js +1 -0
- package/components/TS_Card/TS_Card.d.ts +7 -0
- package/components/TS_Card/TS_Card.js +14 -0
- package/components/TS_Card/TS_Card.scss +7 -0
- package/components/TS_Card/index.d.ts +1 -0
- package/components/TS_Card/index.js +1 -0
- package/components/TS_Checkbox/ATS_CheckboxV2.d.ts +3 -0
- package/components/TS_Checkbox/ATS_CheckboxV2.js +30 -0
- package/components/TS_Checkbox/ATS_CheckboxV2.scss +4 -0
- package/components/TS_Checkbox/TS_Checkbox.d.ts +48 -0
- package/components/TS_Checkbox/TS_Checkbox.js +46 -0
- package/components/TS_Checkbox/TS_Checkbox.scss +62 -0
- package/components/TS_Checkbox/TS_CheckboxV2.d.ts +37 -0
- package/components/TS_Checkbox/TS_CheckboxV2.js +53 -0
- package/components/TS_Checkbox/TS_CheckboxV2.scss +97 -0
- package/components/TS_Checkbox/index.d.ts +1 -0
- package/components/TS_Checkbox/index.js +21 -0
- package/components/TS_CheckboxGroup/ATS_CheckboxGroup.d.ts +19 -0
- package/components/TS_CheckboxGroup/ATS_CheckboxGroup.js +89 -0
- package/components/TS_CheckboxGroup/ATS_CheckboxGroup.scss +6 -0
- package/components/TS_CheckboxGroup/TS_CheckboxGroup.d.ts +35 -0
- package/components/TS_CheckboxGroup/TS_CheckboxGroup.js +47 -0
- package/components/TS_CheckboxGroup/TS_CheckboxGroup.scss +32 -0
- package/components/TS_CheckboxGroup/index.d.ts +1 -0
- package/components/TS_CheckboxGroup/index.js +1 -0
- package/components/TS_CollapsableContainer/TS_CollapsableContainer.d.ts +44 -0
- package/components/TS_CollapsableContainer/TS_CollapsableContainer.js +80 -0
- package/components/TS_CollapsableContainer/TS_CollapsableContainer.scss +47 -0
- package/components/TS_CollapsableContainer/index.d.ts +1 -0
- package/components/TS_CollapsableContainer/index.js +1 -0
- package/components/TS_CollapsableContainerV2/TS_CollapsableContainerV2.d.ts +36 -0
- package/components/TS_CollapsableContainerV2/TS_CollapsableContainerV2.js +46 -0
- package/components/TS_CollapsableContainerV2/TS_CollapsableContainerV2.scss +66 -0
- package/components/TS_CollapsableContainerV2/ats.d.ts +3 -0
- package/components/TS_CollapsableContainerV2/ats.js +39 -0
- package/components/TS_CollapsableContainerV2/ats.scss +35 -0
- package/components/TS_CollapsableContainerV2/index.d.ts +2 -0
- package/components/TS_CollapsableContainerV2/index.js +2 -0
- package/components/TS_ComponentTransition/TS_ComponentTransition.d.ts +25 -0
- package/components/TS_ComponentTransition/TS_ComponentTransition.js +65 -0
- package/components/TS_ComponentTransition/index.d.ts +1 -0
- package/components/TS_ComponentTransition/index.js +1 -0
- package/components/TS_CopyToClipboard/TS_CopyToClipboard.d.ts +4 -0
- package/components/TS_CopyToClipboard/TS_CopyToClipboard.js +11 -0
- package/components/TS_CopyToClipboard/index.d.ts +1 -0
- package/components/TS_CopyToClipboard/index.js +21 -0
- package/components/TS_Dialog/TS_Dialog.d.ts +89 -0
- package/components/TS_Dialog/TS_Dialog.js +140 -0
- package/components/TS_Dialog/TS_Dialog.scss +116 -0
- package/components/TS_Dialog/TS_DialogOverlay.d.ts +15 -0
- package/components/TS_Dialog/TS_DialogOverlay.js +48 -0
- package/components/TS_Dialog/TS_DialogOverlay.scss +41 -0
- package/components/TS_Dialog/TS_SimpleDialog.d.ts +21 -0
- package/components/TS_Dialog/TS_SimpleDialog.js +37 -0
- package/components/TS_Dialog/TS_SimpleDialog.scss +5 -0
- package/components/TS_Dialog/TS_SimpleDialogue.d.ts +28 -0
- package/components/TS_Dialog/TS_SimpleDialogue.js +38 -0
- package/components/TS_Dialog/index.d.ts +2 -0
- package/components/TS_Dialog/index.js +22 -0
- package/components/TS_DragAndDrop/TS_DragAndDrop.d.ts +48 -0
- package/components/TS_DragAndDrop/TS_DragAndDrop.js +105 -0
- package/components/TS_DragAndDrop/TS_DragAndDrop.scss +61 -0
- package/components/TS_DragAndDrop/index.d.ts +1 -0
- package/components/TS_DragAndDrop/index.js +21 -0
- package/components/TS_Dropdown/TS_DropDown.d.ts +120 -0
- package/components/TS_Dropdown/TS_DropDown.js +332 -0
- package/components/TS_Dropdown/TS_DropDown.scss +134 -0
- package/components/TS_Dropdown/index.d.ts +1 -0
- package/components/TS_Dropdown/index.js +21 -0
- package/components/TS_EditableContent/TS_EditableContent.d.ts +19 -0
- package/components/TS_EditableContent/TS_EditableContent.js +32 -0
- package/components/TS_EditableContent/types.d.ts +4 -0
- package/components/TS_EditableContent/types.js +1 -0
- package/components/TS_EditableItemComponent/TS_EditableItemComponent.d.ts +23 -0
- package/components/TS_EditableItemComponent/TS_EditableItemComponent.js +47 -0
- package/components/TS_EditableItemController/TS_EditableItemController.d.ts +36 -0
- package/components/TS_EditableItemController/TS_EditableItemController.js +54 -0
- package/components/TS_EditableItemController/TS_EditableItemController.scss +3 -0
- package/components/TS_EditableItemController/index.d.ts +1 -0
- package/components/TS_EditableItemController/index.js +1 -0
- package/components/TS_EditableItemControllerProto/TS_EditableItemControllerProto.d.ts +32 -0
- package/components/TS_EditableItemControllerProto/TS_EditableItemControllerProto.js +53 -0
- package/components/TS_EditableItemControllerProto/TS_EditableItemControllerProto.scss +3 -0
- package/components/TS_EditableItemControllerProto/index.d.ts +1 -0
- package/components/TS_EditableItemControllerProto/index.js +1 -0
- package/components/TS_EditableItemStatus/TS_EditableItemStatus.d.ts +20 -0
- package/components/TS_EditableItemStatus/TS_EditableItemStatus.js +34 -0
- package/components/TS_EditableText/TS_EditableText.d.ts +57 -0
- package/components/TS_EditableText/TS_EditableText.js +100 -0
- package/components/TS_EditableText/TS_EditableText.scss +90 -0
- package/components/TS_EditableText/index.d.ts +1 -0
- package/components/TS_EditableText/index.js +1 -0
- package/components/TS_ErrorBoundary/TS_ErrorBoundary.d.ts +54 -0
- package/components/TS_ErrorBoundary/TS_ErrorBoundary.js +103 -0
- package/components/TS_ErrorBoundary/TS_ErrorBoundary.scss +95 -0
- package/components/TS_ErrorBoundary/index.d.ts +1 -0
- package/components/TS_ErrorBoundary/index.js +21 -0
- package/components/TS_Form/TS_Form.d.ts +9 -0
- package/components/TS_Form/TS_Form.js +11 -0
- package/components/TS_Form/TS_Form.scss +0 -0
- package/components/TS_Form/consts.d.ts +1 -0
- package/components/TS_Form/consts.js +1 -0
- package/components/TS_Form/index.d.ts +3 -0
- package/components/TS_Form/index.js +3 -0
- package/components/TS_Form/types.d.ts +13 -0
- package/components/TS_Form/types.js +1 -0
- package/components/TS_GridTableProto/TS_GridTableProto.d.ts +18 -0
- package/components/TS_GridTableProto/TS_GridTableProto.js +22 -0
- package/components/TS_GridTableProto/TS_GridTableProto.scss +4 -0
- package/components/TS_GridTableProto/index.d.ts +1 -0
- package/components/TS_GridTableProto/index.js +1 -0
- package/components/TS_Input/ATS_TextArea.d.ts +14 -0
- package/components/TS_Input/ATS_TextArea.js +24 -0
- package/components/TS_Input/ATS_TextArea.scss +24 -0
- package/components/TS_Input/TS_BaseInput.d.ts +44 -0
- package/components/TS_Input/TS_BaseInput.js +47 -0
- package/components/TS_Input/TS_Input.d.ts +24 -0
- package/components/TS_Input/TS_Input.js +53 -0
- package/components/TS_Input/TS_Input.scss +64 -0
- package/components/TS_Input/TS_TextArea.d.ts +14 -0
- package/components/TS_Input/TS_TextArea.js +72 -0
- package/components/TS_Input/TS_TextArea.scss +41 -0
- package/components/TS_Input/index.d.ts +4 -0
- package/components/TS_Input/index.js +25 -0
- package/components/TS_JSONViewer/TS_JSONViewer.d.ts +18 -0
- package/components/TS_JSONViewer/TS_JSONViewer.js +64 -0
- package/components/TS_JSONViewer/TS_JSONViewer.scss +87 -0
- package/components/TS_JSONViewer/types.d.ts +10 -0
- package/components/TS_JSONViewer/types.js +1 -0
- package/components/TS_Link/TS_Link.d.ts +15 -0
- package/components/TS_Link/TS_Link.js +36 -0
- package/components/TS_Link/TS_Link.scss +32 -0
- package/components/TS_Link/index.d.ts +1 -0
- package/components/TS_Link/index.js +21 -0
- package/components/TS_ListOrganizer/TS_ListOrganizer.d.ts +33 -0
- package/components/TS_ListOrganizer/TS_ListOrganizer.js +64 -0
- package/components/TS_ListOrganizer/TS_ListOrganizer.scss +37 -0
- package/components/TS_ListOrganizer/index.d.ts +1 -0
- package/components/TS_ListOrganizer/index.js +21 -0
- package/components/TS_Loader/TS_Loader.d.ts +6 -0
- package/components/TS_Loader/TS_Loader.js +9 -0
- package/components/TS_Loader/TS_Loader.scss +71 -0
- package/components/TS_Loader/index.d.ts +1 -0
- package/components/TS_Loader/index.js +1 -0
- package/components/TS_MemoryMonitor/TS_MemoryMonitor.d.ts +10 -0
- package/components/TS_MemoryMonitor/TS_MemoryMonitor.js +48 -0
- package/components/TS_MemoryMonitor/TS_MemoryMonitor.scss +31 -0
- package/components/TS_MemoryMonitor/index.d.ts +1 -0
- package/components/TS_MemoryMonitor/index.js +21 -0
- package/components/TS_MouseInteractivity/TS_PopUp/TS_PopUp.d.ts +9 -0
- package/components/TS_MouseInteractivity/TS_PopUp/TS_PopUp.js +28 -0
- package/components/TS_MouseInteractivity/TS_PopUp/TS_PopUp.scss +53 -0
- package/components/TS_MouseInteractivity/TS_Tooltip/TS_ToolTip.d.ts +12 -0
- package/components/TS_MouseInteractivity/TS_Tooltip/TS_ToolTip.js +65 -0
- package/components/TS_MouseInteractivity/TS_Tooltip/TS_ToolTip.scss +46 -0
- package/components/TS_MouseInteractivity/base/TS_MouseInteractivity.d.ts +18 -0
- package/components/TS_MouseInteractivity/base/TS_MouseInteractivity.js +100 -0
- package/components/TS_MouseInteractivity/index.d.ts +2 -0
- package/components/TS_MouseInteractivity/index.js +22 -0
- package/components/TS_MultiSelect/TS_MultiSelect.scss +34 -0
- package/components/TS_MultiSelect/TS_MultiSelect_V2.d.ts +36 -0
- package/components/TS_MultiSelect/TS_MultiSelect_V2.js +41 -0
- package/components/TS_MultiSelect/index.d.ts +1 -0
- package/components/TS_MultiSelect/index.js +21 -0
- package/components/TS_Notifications/TS_Notifications.d.ts +22 -0
- package/components/TS_Notifications/TS_Notifications.js +96 -0
- package/components/TS_Notifications/TS_Notifications.scss +120 -0
- package/components/TS_Notifications/genericNotificationAction.d.ts +8 -0
- package/components/TS_Notifications/genericNotificationAction.js +16 -0
- package/components/TS_Notifications/index.d.ts +2 -0
- package/components/TS_Notifications/index.js +2 -0
- package/components/TS_Overlay/TS_Overlay.d.ts +12 -0
- package/components/TS_Overlay/TS_Overlay.js +32 -0
- package/components/TS_Overlay/TS_Overlay.scss +41 -0
- package/components/TS_Overlay/index.d.ts +1 -0
- package/components/TS_Overlay/index.js +21 -0
- package/components/TS_Printable/TS_Printable.d.ts +13 -0
- package/components/TS_Printable/TS_Printable.js +20 -0
- package/components/TS_Printable/TS_Printable.scss +47 -0
- package/components/TS_Printable/index.d.ts +1 -0
- package/components/TS_Printable/index.js +21 -0
- package/components/TS_ProgressBar/TS_ProgressBar.d.ts +22 -0
- package/components/TS_ProgressBar/TS_ProgressBar.js +47 -0
- package/components/TS_ProgressBar/TS_ProgressBar.scss +79 -0
- package/components/TS_ProgressBar/index.d.ts +1 -0
- package/components/TS_ProgressBar/index.js +1 -0
- package/components/TS_PropRenderer/TS_PropRenderer.d.ts +18 -0
- package/components/TS_PropRenderer/TS_PropRenderer.js +36 -0
- package/components/TS_PropRenderer/TS_PropRenderer.scss +19 -0
- package/components/TS_PropRenderer/index.d.ts +1 -0
- package/components/TS_PropRenderer/index.js +1 -0
- package/components/TS_Radio/TS_Radio.d.ts +34 -0
- package/components/TS_Radio/TS_Radio.js +49 -0
- package/components/TS_Radio/TS_Radio.scss +68 -0
- package/components/TS_Radio/index.d.ts +1 -0
- package/components/TS_Radio/index.js +1 -0
- package/components/TS_ReadMore/TS_ReadMore.d.ts +26 -0
- package/components/TS_ReadMore/TS_ReadMore.js +86 -0
- package/components/TS_ReadMore/TS_ReadMore.scss +36 -0
- package/components/TS_ReadMore/index.d.ts +1 -0
- package/components/TS_ReadMore/index.js +1 -0
- package/components/TS_Slider/TS_Slider.d.ts +26 -0
- package/components/TS_Slider/TS_Slider.js +42 -0
- package/components/TS_Slider/TS_Slider.scss +68 -0
- package/components/TS_Slider/index.d.ts +1 -0
- package/components/TS_Slider/index.js +1 -0
- package/components/TS_Space/TS_Space.d.ts +8 -0
- package/components/TS_Space/TS_Space.js +8 -0
- package/components/TS_Space/index.d.ts +1 -0
- package/components/TS_Space/index.js +1 -0
- package/components/TS_Space/ts-space.scss +3 -0
- package/components/TS_Table/TS_Table.d.ts +42 -0
- package/components/TS_Table/TS_Table.js +74 -0
- package/components/TS_Table/TS_Table.scss +51 -0
- package/components/TS_Table/index.d.ts +1 -0
- package/components/TS_Table/index.js +21 -0
- package/components/TS_Tabs/TS_Tabs.d.ts +55 -0
- package/components/TS_Tabs/TS_Tabs.js +102 -0
- package/components/TS_Tabs/TS_Tabs.scss +103 -0
- package/components/TS_Tabs/index.d.ts +1 -0
- package/components/TS_Tabs/index.js +21 -0
- package/components/TS_Toaster/TS_Toast.d.ts +5 -0
- package/components/TS_Toaster/TS_Toast.js +9 -0
- package/components/TS_Toaster/TS_Toast.scss +80 -0
- package/components/TS_Toaster/TS_ToastOverlay.d.ts +16 -0
- package/components/TS_Toaster/TS_ToastOverlay.js +26 -0
- package/components/TS_Toaster/TS_ToastOverlay.scss +33 -0
- package/components/TS_Toaster/index.d.ts +2 -0
- package/components/TS_Toaster/index.js +22 -0
- package/components/TS_Toggle/ATS_Toggle.d.ts +11 -0
- package/components/TS_Toggle/ATS_Toggle.js +18 -0
- package/components/TS_Toggle/TS_Toggle.d.ts +21 -0
- package/components/TS_Toggle/TS_Toggle.js +26 -0
- package/components/TS_Toggle/TS_Toggle.scss +56 -0
- package/components/TS_Toggle/index.d.ts +2 -0
- package/components/TS_Toggle/index.js +2 -0
- package/components/TS_Toggler/TS_Toggler.d.ts +23 -0
- package/components/TS_Toggler/TS_Toggler.js +50 -0
- package/components/TS_Toggler/TS_Toggler.scss +83 -0
- package/components/TS_Toggler/index.d.ts +1 -0
- package/components/TS_Toggler/index.js +1 -0
- package/components/TS_Tree/SimpleTreeNodeRenderer.d.ts +9 -0
- package/components/TS_Tree/SimpleTreeNodeRenderer.js +53 -0
- package/components/TS_Tree/TS_Tree.d.ts +68 -0
- package/components/TS_Tree/TS_Tree.js +174 -0
- package/components/TS_Tree/TS_Tree.scss +44 -0
- package/components/TS_Tree/index.d.ts +3 -0
- package/components/TS_Tree/index.js +23 -0
- package/components/TS_Tree/types.d.ts +4 -0
- package/components/TS_Tree/types.js +21 -0
- package/components/TS_V2_Input/TS_InputV2.d.ts +93 -0
- package/components/TS_V2_Input/TS_InputV2.js +220 -0
- package/components/TS_V2_Input/index.d.ts +1 -0
- package/components/TS_V2_Input/index.js +21 -0
- package/components/TS_V2_TextArea/TS_BaseInput.d.ts +42 -0
- package/components/TS_V2_TextArea/TS_BaseInput.js +46 -0
- package/components/TS_V2_TextArea/TS_TextAreaV2.d.ts +78 -0
- package/components/TS_V2_TextArea/TS_TextAreaV2.js +178 -0
- package/components/TS_V2_TextArea/TS_TextAreaV2.scss +49 -0
- package/components/TS_V2_TextArea/index.d.ts +2 -0
- package/components/TS_V2_TextArea/index.js +22 -0
- package/components/TS_VirtualizedList/TS_VirtualizedList.d.ts +14 -0
- package/components/TS_VirtualizedList/TS_VirtualizedList.js +22 -0
- package/components/TS_VirtualizedList/index.d.ts +1 -0
- package/components/TS_VirtualizedList/index.js +1 -0
- package/components/Video/Video.d.ts +16 -0
- package/components/Video/Video.js +40 -0
- package/components/Video/VideoDialog.d.ts +20 -0
- package/components/Video/VideoDialog.js +44 -0
- package/components/Video/VideoDialog.scss +31 -0
- package/components/Video/types.d.ts +20 -0
- package/components/Video/types.js +1 -0
- package/components/_TS_MultiSelect/DBItemDropDownMultiSelector.d.ts +57 -0
- package/components/_TS_MultiSelect/DBItemDropDownMultiSelector.js +63 -0
- package/components/adapter/Adapter.d.ts +139 -0
- package/components/adapter/Adapter.js +259 -0
- package/components/adapter/BaseRenderer.d.ts +24 -0
- package/components/adapter/BaseRenderer.js +31 -0
- package/components/ats-group.d.ts +2 -0
- package/components/ats-group.js +14 -0
- package/components/form/Form.d.ts +24 -0
- package/components/form/Form.js +34 -0
- package/components/form/types.d.ts +23 -0
- package/components/form/types.js +21 -0
- package/components/formv3/FormV3.d.ts +25 -0
- package/components/formv3/FormV3.js +23 -0
- package/components/formv3/types.d.ts +29 -0
- package/components/formv3/types.js +1 -0
- package/components/treeicons.d.ts +10 -0
- package/components/treeicons.js +3 -0
- package/components/types.d.ts +23 -0
- package/components/types.js +22 -0
- package/components/utils.d.ts +1 -0
- package/components/utils.js +7 -0
- package/consts.d.ts +2 -0
- package/consts.js +2 -0
- package/core/AppPage.d.ts +11 -0
- package/core/AppPage.js +52 -0
- package/core/AppPageV2.d.ts +9 -0
- package/core/AppPageV2.js +53 -0
- package/core/AppWrapper.d.ts +4 -0
- package/core/AppWrapper.js +34 -0
- package/core/ComponentAsync.d.ts +16 -0
- package/core/ComponentAsync.js +64 -0
- package/core/ComponentBase.d.ts +28 -0
- package/core/ComponentBase.js +152 -0
- package/core/ComponentSync.d.ts +13 -0
- package/core/ComponentSync.js +49 -0
- package/core/Controller.d.ts +13 -0
- package/core/Controller.js +28 -0
- package/core/IndexedDB.d.ts +42 -0
- package/core/IndexedDB.js +259 -0
- package/core/IndexedDBV3.d.ts +43 -0
- package/core/IndexedDBV3.js +259 -0
- package/core/IndexedDBV4/IndexedDB_Database.d.ts +20 -0
- package/core/IndexedDBV4/IndexedDB_Database.js +268 -0
- package/core/IndexedDBV4/IndexedDB_Store.d.ts +34 -0
- package/core/IndexedDBV4/IndexedDB_Store.js +207 -0
- package/core/IndexedDBV4/ModuleFE_IDBManager.d.ts +11 -0
- package/core/IndexedDBV4/ModuleFE_IDBManager.js +19 -0
- package/core/IndexedDBV4/types.d.ts +16 -0
- package/core/IndexedDBV4/types.js +1 -0
- package/core/SimpleScriptInjector.d.ts +13 -0
- package/core/SimpleScriptInjector.js +42 -0
- package/core/Thunder.d.ts +37 -0
- package/core/Thunder.js +139 -0
- package/core/ThunderstormDefaultApp.d.ts +12 -0
- package/core/ThunderstormDefaultApp.js +29 -0
- package/core/consts.d.ts +6 -0
- package/core/consts.js +2 -0
- package/core/db-api-gen/consts.d.ts +22 -0
- package/core/db-api-gen/consts.js +25 -0
- package/core/db-api-gen/db-def.d.ts +9 -0
- package/core/db-api-gen/db-def.js +16 -0
- package/core/db-api-gen/types.d.ts +23 -0
- package/core/db-api-gen/types.js +3 -0
- package/core/proto-component/ProtoComponent.d.ts +57 -0
- package/core/proto-component/ProtoComponent.js +73 -0
- package/core/proto-component/UrlState.d.ts +42 -0
- package/core/proto-component/UrlState.js +59 -0
- package/core/proto-component/index.d.ts +2 -0
- package/core/proto-component/index.js +2 -0
- package/core/proto-component/types.d.ts +25 -0
- package/core/proto-component/types.js +15 -0
- package/core/thunder-dispatcher.d.ts +13 -0
- package/core/thunder-dispatcher.js +69 -0
- package/core/thunder-helpers.d.ts +7 -0
- package/core/thunder-helpers.js +171 -0
- package/core/thunder-modulepack.d.ts +3 -0
- package/core/thunder-modulepack.js +34 -0
- package/core/typed-api.d.ts +6 -0
- package/core/typed-api.js +41 -0
- package/core/types.d.ts +6 -0
- package/core/types.js +1 -0
- package/editable-item.d.ts +7 -0
- package/editable-item.js +7 -0
- package/index.d.ts +112 -0
- package/index.js +134 -0
- package/modules/ModuleFE_BaseTheme.d.ts +18 -0
- package/modules/ModuleFE_BaseTheme.js +27 -0
- package/modules/ModuleFE_BroadcastChannel/ModuleFE_BroadcastChannel.d.ts +20 -0
- package/modules/ModuleFE_BroadcastChannel/ModuleFE_BroadcastChannel.js +66 -0
- package/modules/ModuleFE_BrowserHistory.d.ts +46 -0
- package/modules/ModuleFE_BrowserHistory.js +165 -0
- package/modules/ModuleFE_BrowserHistoryV2.d.ts +43 -0
- package/modules/ModuleFE_BrowserHistoryV2.js +113 -0
- package/modules/ModuleFE_CSVParser.d.ts +12 -0
- package/modules/ModuleFE_CSVParser.js +52 -0
- package/modules/ModuleFE_CollectionActions.d.ts +10 -0
- package/modules/ModuleFE_CollectionActions.js +18 -0
- package/modules/ModuleFE_ConnectivityModule.d.ts +15 -0
- package/modules/ModuleFE_ConnectivityModule.js +31 -0
- package/modules/ModuleFE_ForceUpgrade.d.ts +20 -0
- package/modules/ModuleFE_ForceUpgrade.js +54 -0
- package/modules/ModuleFE_LocalStorage.d.ts +46 -0
- package/modules/ModuleFE_LocalStorage.js +179 -0
- package/modules/ModuleFE_Locale.d.ts +44 -0
- package/modules/ModuleFE_Locale.js +83 -0
- package/modules/ModuleFE_Print.d.ts +16 -0
- package/modules/ModuleFE_Print.js +116 -0
- package/modules/ModuleFE_StorageCleaner.d.ts +17 -0
- package/modules/ModuleFE_StorageCleaner.js +90 -0
- package/modules/ModuleFE_Thunderstorm.d.ts +31 -0
- package/modules/ModuleFE_Thunderstorm.js +122 -0
- package/modules/ModuleFE_Utils/ModuleFE_Utils.d.ts +29 -0
- package/modules/ModuleFE_Utils/ModuleFE_Utils.js +43 -0
- package/modules/ModuleFE_Window.d.ts +19 -0
- package/modules/ModuleFE_Window.js +42 -0
- package/modules/ModuleFE_WindowMessenger.d.ts +62 -0
- package/modules/ModuleFE_WindowMessenger.js +128 -0
- package/modules/action-processor/ModuleFE_ActionProcessor.d.ts +9 -0
- package/modules/action-processor/ModuleFE_ActionProcessor.js +14 -0
- package/modules/archiving/ModuleFE_Archiving.d.ts +8 -0
- package/modules/archiving/ModuleFE_Archiving.js +15 -0
- package/modules/clearWebsiteDataDispatcher.d.ts +5 -0
- package/modules/clearWebsiteDataDispatcher.js +2 -0
- package/modules/component-loader/ReactEntryComponentInjector.d.ts +23 -0
- package/modules/component-loader/ReactEntryComponentInjector.js +59 -0
- package/modules/component-loader/entry-component-loading-module.d.ts +7 -0
- package/modules/component-loader/entry-component-loading-module.js +52 -0
- package/modules/component-loader/index.d.ts +2 -0
- package/modules/component-loader/index.js +2 -0
- package/modules/db-api-gen/ModuleFE_BaseApi.d.ts +45 -0
- package/modules/db-api-gen/ModuleFE_BaseApi.js +152 -0
- package/modules/db-api-gen/ModuleFE_BaseDB.d.ts +146 -0
- package/modules/db-api-gen/ModuleFE_BaseDB.js +433 -0
- package/modules/db-api-gen/types.d.ts +13 -0
- package/modules/db-api-gen/types.js +6 -0
- package/modules/http/ModuleFE_XHR.d.ts +20 -0
- package/modules/http/ModuleFE_XHR.js +175 -0
- package/modules/routing/LocationChangeListener.d.ts +6 -0
- package/modules/routing/LocationChangeListener.js +15 -0
- package/modules/routing/ModuleFE_Routing.d.ts +30 -0
- package/modules/routing/ModuleFE_Routing.js +122 -0
- package/modules/routing/ModuleFE_RoutingV2.d.ts +25 -0
- package/modules/routing/ModuleFE_RoutingV2.js +143 -0
- package/modules/routing/index.d.ts +5 -0
- package/modules/routing/index.js +5 -0
- package/modules/routing/route.d.ts +22 -0
- package/modules/routing/route.js +83 -0
- package/modules/routing/types.d.ts +20 -0
- package/modules/routing/types.js +1 -0
- package/modules/sync-env/ModuleFE_SyncEnvV2.d.ts +8 -0
- package/modules/sync-env/ModuleFE_SyncEnvV2.js +18 -0
- package/modules/sync-manager/ModuleFE_SyncManager.d.ts +59 -0
- package/modules/sync-manager/ModuleFE_SyncManager.js +378 -0
- package/modules/sync-manager/ModuleFE_SyncManager_CSV.d.ts +11 -0
- package/modules/sync-manager/ModuleFE_SyncManager_CSV.js +121 -0
- package/package.json +107 -0
- package/server-info/Button_VersionUpdate.d.ts +15 -0
- package/server-info/Button_VersionUpdate.js +29 -0
- package/server-info/Button_VersionUpdate.scss +29 -0
- package/server-info/ModuleFE_ServerInfo.d.ts +26 -0
- package/server-info/ModuleFE_ServerInfo.js +73 -0
- package/server-info/index.d.ts +2 -0
- package/server-info/index.js +2 -0
- package/shared.d.ts +1 -0
- package/shared.js +21 -0
- package/styles/declaration/basic.scss +155 -0
- package/styles/declaration/mixins.scss +58 -0
- package/styles/impl/basic.scss +141 -0
- package/styles/impl/icons.scss +34 -0
- package/styles.scss +40 -0
- package/utils/EditableItem.d.ts +240 -0
- package/utils/EditableItem.js +552 -0
- package/utils/console/LogClient_ConsoleInterceptor.d.ts +5 -0
- package/utils/console/LogClient_ConsoleInterceptor.js +70 -0
- package/utils/perform-action/genereteToasts.d.ts +3 -0
- package/utils/perform-action/genereteToasts.js +14 -0
- package/utils/perform-action/index.d.ts +2 -0
- package/utils/perform-action/index.js +2 -0
- package/utils/perform-action/notification-dispatchers.d.ts +6 -0
- package/utils/perform-action/notification-dispatchers.js +2 -0
- package/utils/perform-action/performAction.d.ts +34 -0
- package/utils/perform-action/performAction.js +77 -0
- package/utils/perform-action/resolve-dependency-toast/ResolveDependencyToast.d.ts +8 -0
- package/utils/perform-action/resolve-dependency-toast/ResolveDependencyToast.js +11 -0
- package/utils/perform-action/resolve-dependency-toast/ResolveDependencyToast.scss +12 -0
- package/utils/tools.d.ts +31 -0
- package/utils/tools.js +138 -0
- package/utils/types.d.ts +3 -0
- package/utils/types.js +1 -0
- package/widgets/FieldEditor.d.ts +29 -0
- package/widgets/FieldEditor.js +47 -0
- package/widgets/FieldEditorClick.d.ts +33 -0
- package/widgets/FieldEditorClick.js +49 -0
- package/widgets/FieldEditorWithButtons.d.ts +32 -0
- package/widgets/FieldEditorWithButtons.js +42 -0
package/_ats/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './ATS_ActionProcessor/ATS_ActionProcessor.js';
|
|
2
|
+
export * from './ATS_CollectionUpgrades/ATS_CollectionUpgrades.js';
|
|
3
|
+
export * from './ATS_SyncEnv/ATS_SyncEnv.js';
|
|
4
|
+
export * from './ATS_ProtoComponent/ATS_ProtoComponent.js';
|
|
5
|
+
export * from './ATS_IDBCacheComparison/Component_CollectionGrid.js';
|
|
6
|
+
export * from './ATS_IDBCacheComparison/Dialog_IDBCacheComparison.js';
|
|
7
|
+
export * from './ATS_AppConfigEditor/ATS_AppConfigEditor.js';
|
|
8
|
+
export * from './ATS_CrudOperations/ATS_CrudOperations.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DispatcherDef, ThunderDispatcherV3 } from '../../core/db-api-gen/types.js';
|
|
2
|
+
import { ModuleFE_BaseApi } from '../../modules/db-api-gen/ModuleFE_BaseApi.js';
|
|
3
|
+
import { ApiDefCaller, ApiStruct_AppConfig, DBProto_AppConfig } from '@nu-art/thunderstorm-shared';
|
|
4
|
+
import { TypedKeyValue } from '@nu-art/ts-common';
|
|
5
|
+
export type DispatcherType_AppConfig = DispatcherDef<DBProto_AppConfig, `__onAppConfigsUpdated`>;
|
|
6
|
+
type InferType<T> = T extends AppConfigKey_FE<infer ValueType> ? ValueType : never;
|
|
7
|
+
export declare const dispatch_onAppConfigsUpdated: ThunderDispatcherV3<DispatcherType_AppConfig>;
|
|
8
|
+
export declare class ModuleFE_AppConfig_Class extends ModuleFE_BaseApi<DBProto_AppConfig> implements ApiDefCaller<ApiStruct_AppConfig> {
|
|
9
|
+
_v1: ApiDefCaller<ApiStruct_AppConfig>['_v1'];
|
|
10
|
+
constructor();
|
|
11
|
+
init(): Promise<void>;
|
|
12
|
+
get<K extends AppConfigKey_FE<any>>(appConfigKey: K): InferType<K>;
|
|
13
|
+
set<K extends AppConfigKey_FE<any>>(appConfigKey: K, data: InferType<K>): Promise<void>;
|
|
14
|
+
delete<K extends AppConfigKey_FE<any>>(appConfigKey: K): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare const ModuleFE_AppConfig: ModuleFE_AppConfig_Class;
|
|
17
|
+
export declare class AppConfigKey_FE<Binder extends TypedKeyValue<string, any>> {
|
|
18
|
+
readonly key: Binder['key'];
|
|
19
|
+
constructor(key: Binder['key']);
|
|
20
|
+
get(): Binder['value'];
|
|
21
|
+
set(value: Binder['value']): Promise<void>;
|
|
22
|
+
delete(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ThunderDispatcherV3 } from '../../core/db-api-gen/types.js';
|
|
2
|
+
import { apiWithQuery } from '../../core/typed-api.js';
|
|
3
|
+
import { ModuleFE_BaseApi } from '../../modules/db-api-gen/ModuleFE_BaseApi.js';
|
|
4
|
+
import { ApiDef_AppConfig, DBDef_AppConfig } from '@nu-art/thunderstorm-shared';
|
|
5
|
+
import { BadImplementationException, cloneObj } from '@nu-art/ts-common';
|
|
6
|
+
export const dispatch_onAppConfigsUpdated = new ThunderDispatcherV3('__onAppConfigsUpdated');
|
|
7
|
+
export class ModuleFE_AppConfig_Class extends ModuleFE_BaseApi {
|
|
8
|
+
_v1;
|
|
9
|
+
constructor() {
|
|
10
|
+
super(DBDef_AppConfig, dispatch_onAppConfigsUpdated);
|
|
11
|
+
this._v1 = {
|
|
12
|
+
getConfigByKey: apiWithQuery(ApiDef_AppConfig._v1.getConfigByKey),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async init() {
|
|
16
|
+
super.init();
|
|
17
|
+
}
|
|
18
|
+
get(appConfigKey) {
|
|
19
|
+
const config = this.cache.find(item => item.key === appConfigKey.key);
|
|
20
|
+
return config?.data;
|
|
21
|
+
}
|
|
22
|
+
async set(appConfigKey, data) {
|
|
23
|
+
let _config = cloneObj(this.cache.find(item => item.key === appConfigKey.key));
|
|
24
|
+
if (!_config)
|
|
25
|
+
_config = { key: appConfigKey.key };
|
|
26
|
+
_config.data = data;
|
|
27
|
+
await this.v1.upsert(_config).executeSync();
|
|
28
|
+
}
|
|
29
|
+
async delete(appConfigKey) {
|
|
30
|
+
const config = this.cache.find(item => item.key === appConfigKey.key);
|
|
31
|
+
if (!config)
|
|
32
|
+
throw new BadImplementationException('Config of this key does not exist');
|
|
33
|
+
await this.v1.delete(config).executeSync();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export const ModuleFE_AppConfig = new ModuleFE_AppConfig_Class();
|
|
37
|
+
export class AppConfigKey_FE {
|
|
38
|
+
key;
|
|
39
|
+
constructor(key) {
|
|
40
|
+
this.key = key;
|
|
41
|
+
}
|
|
42
|
+
get() {
|
|
43
|
+
return ModuleFE_AppConfig.get(this);
|
|
44
|
+
}
|
|
45
|
+
async set(value) {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
await ModuleFE_AppConfig.set(this, value);
|
|
48
|
+
}
|
|
49
|
+
async delete() {
|
|
50
|
+
await ModuleFE_AppConfig.delete(this);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ModulePackFE_AppConfigDB: import("./ModuleFE_AppConfig.js").ModuleFE_AppConfig_Class[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiStruct_EditableTest, DBProto_EditableTest } from '@nu-art/thunderstorm-shared/_entity/editable-test/index';
|
|
2
|
+
import { DispatcherDef, ThunderDispatcherV3 } from '../../core/db-api-gen/types.js';
|
|
3
|
+
import { ModuleFE_BaseApi } from '../../modules/db-api-gen/ModuleFE_BaseApi.js';
|
|
4
|
+
import { ApiDefCaller } from '@nu-art/thunderstorm-shared/types';
|
|
5
|
+
export type DispatcherType_EditableTest = DispatcherDef<DBProto_EditableTest, `__onEditableTestUpdated`>;
|
|
6
|
+
export declare const dispatch_onEditableTestChanged: ThunderDispatcherV3<DispatcherType_EditableTest>;
|
|
7
|
+
export declare class ModuleFE_EditableTest_Class extends ModuleFE_BaseApi<DBProto_EditableTest> implements ApiDefCaller<ApiStruct_EditableTest> {
|
|
8
|
+
_v1: ApiDefCaller<ApiStruct_EditableTest>['_v1'];
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare const ModuleFE_EditableTest: ModuleFE_EditableTest_Class;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DBDef_EditableTest } from '@nu-art/thunderstorm-shared/_entity/editable-test/index';
|
|
2
|
+
import { ThunderDispatcherV3 } from '../../core/db-api-gen/types.js';
|
|
3
|
+
import { ModuleFE_BaseApi } from '../../modules/db-api-gen/ModuleFE_BaseApi.js';
|
|
4
|
+
export const dispatch_onEditableTestChanged = new ThunderDispatcherV3('__onEditableTestUpdated');
|
|
5
|
+
export class ModuleFE_EditableTest_Class extends ModuleFE_BaseApi {
|
|
6
|
+
_v1;
|
|
7
|
+
constructor() {
|
|
8
|
+
super(DBDef_EditableTest, dispatch_onEditableTestChanged);
|
|
9
|
+
this._v1 = {};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export const ModuleFE_EditableTest = new ModuleFE_EditableTest_Class();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ModulePackFE_EditableTest: import("./ModuleFE_EditableTest.js").ModuleFE_EditableTest_Class[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const DropDown_EditableTest: {
|
|
2
|
+
editable: (props: import("../../components/types.js").ComponentProps_Error & {
|
|
3
|
+
dropdownRef?: import("react").RefObject<any>;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: import("react").CSSProperties;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
mapper?: ((item: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest) => (string | undefined)[]) | undefined;
|
|
8
|
+
noOptionsRenderer?: import("react").ReactNode | ((filter?: string) => import("react").ReactNode);
|
|
9
|
+
renderer?: ((item: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest) => import("react").ReactElement) | undefined;
|
|
10
|
+
ifNoneShowAll?: boolean;
|
|
11
|
+
caret?: {
|
|
12
|
+
open: import("react").ReactNode;
|
|
13
|
+
close: import("react").ReactNode;
|
|
14
|
+
};
|
|
15
|
+
onNoMatchingSelectionForString?: ((filterText: string, matchingItems: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest[], e: import("react").KeyboardEvent) => any) | undefined;
|
|
16
|
+
limitItems?: number;
|
|
17
|
+
hidePlaceholderOnOpen?: boolean;
|
|
18
|
+
itemResolver?: (() => import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest[]) | undefined;
|
|
19
|
+
innerRef?: import("react").RefObject<any>;
|
|
20
|
+
tabIndex?: number;
|
|
21
|
+
unselectLabel?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
queryFilter?: ((item: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest) => boolean) | undefined;
|
|
24
|
+
sortBy?: ("d" | "a" | "b" | "_id" | "__metadata1" | "__hardDelete" | "__created" | "__updated" | "_v" | "_originDocId" | "c" | ((item: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest) => string | number))[] | undefined;
|
|
25
|
+
} & {
|
|
26
|
+
inputValue?: string;
|
|
27
|
+
boundingParentSelector?: string;
|
|
28
|
+
renderSearch?: ((dropDown: import("../../index.js").TS_DropDown<import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest>) => import("react").ReactNode) | undefined;
|
|
29
|
+
limitItems?: number;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
} & import("../../editable-item.js").UIProps_EditableItem<any, any, string> & {
|
|
32
|
+
onSelected?: ((selected: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest | undefined, superOnSelected: (selected?: import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest | undefined) => Promise<void>) => void) | undefined;
|
|
33
|
+
canUnselect?: boolean;
|
|
34
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
selectable: (props: import("../../components/GenericDropDown/GenericDropDownV3.js").AppLevelProps_TS_GenericDropDownV3<import("@nu-art/thunderstorm-shared/_entity/editable-test/types").DB_EditableTest>) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
};
|
|
37
|
+
export declare const MultiSelect_EditableTest: <EnclosingItem_, Prop extends import("@nu-art/ts-common").SubsetKeys<keyof EnclosingItem_, EnclosingItem_, string[] | undefined>>(props: import("../../components/TS_MultiSelect/TS_MultiSelect_V2.js").DynamicProps_TS_MultiSelect_V2<EnclosingItem_, Prop> & Partial<import("../../components/TS_MultiSelect/TS_MultiSelect_V2.js").StaticProps_TS_MultiSelect_V2<string>>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ModuleFE_EditableTest } from './ModuleFE_EditableTest.js';
|
|
3
|
+
import { DBItemDropDownMultiSelector } from '../../components/_TS_MultiSelect/DBItemDropDownMultiSelector.js';
|
|
4
|
+
import { GenericDropDownV3 } from '../../components/GenericDropDown/index.js';
|
|
5
|
+
import { TS_MultiSelect_V2 } from '../../components/TS_MultiSelect/index.js';
|
|
6
|
+
const Props_DropDown = {
|
|
7
|
+
module: ModuleFE_EditableTest,
|
|
8
|
+
modules: [ModuleFE_EditableTest],
|
|
9
|
+
mapper: item => [item.a],
|
|
10
|
+
placeholder: 'Choose a EditableTest',
|
|
11
|
+
renderer: item => _jsxs("div", { className: "ll_h_c", children: [" ", item.a, " "] })
|
|
12
|
+
};
|
|
13
|
+
export const DropDown_EditableTest = GenericDropDownV3.prepare(Props_DropDown);
|
|
14
|
+
const Props_MultiSelect = DBItemDropDownMultiSelector.propsV3({
|
|
15
|
+
module: ModuleFE_EditableTest,
|
|
16
|
+
itemRenderer: (item, onDelete) => {
|
|
17
|
+
return !item ? _jsx(_Fragment, { children: "Not Found" }) : _jsx(_Fragment, { children: item.a });
|
|
18
|
+
},
|
|
19
|
+
uiSelector: DropDown_EditableTest.selectable,
|
|
20
|
+
});
|
|
21
|
+
export const MultiSelect_EditableTest = TS_MultiSelect_V2.prepare(Props_MultiSelect);
|
package/_entity.d.ts
ADDED
package/_entity.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// /*
|
|
3
|
+
// * Thunderstorm is a full web app framework!
|
|
4
|
+
// *
|
|
5
|
+
// * Typescript & Express backend infrastructure that natively runs on firebase function
|
|
6
|
+
// * Typescript & React frontend infrastructure
|
|
7
|
+
// *
|
|
8
|
+
// * Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
9
|
+
// *
|
|
10
|
+
// * Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
// * you may not use this file except in compliance with the License.
|
|
12
|
+
// * You may obtain a copy of the License at
|
|
13
|
+
// *
|
|
14
|
+
// * http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
// *
|
|
16
|
+
// * Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
// * distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
// * See the License for the specific language governing permissions and
|
|
20
|
+
// * limitations under the License.
|
|
21
|
+
// */
|
|
22
|
+
//
|
|
23
|
+
// import * as React from 'react';
|
|
24
|
+
// import {CSSProperties, ReactNode} from 'react';
|
|
25
|
+
// import {MenuBuilder, PopUp_Model_Content, PopUpListener, resolveRealPosition} from '../component-modules/mouse-interactivity/ModuleFE_PopUp.js';
|
|
26
|
+
// import {BadImplementationException} from '@nu-art/ts-common';
|
|
27
|
+
// import {Adapter} from '../components/adapter/Adapter.js';
|
|
28
|
+
//
|
|
29
|
+
// type Props = {
|
|
30
|
+
// id: string
|
|
31
|
+
// iconOpen: ReactNode
|
|
32
|
+
// iconClosed: ReactNode
|
|
33
|
+
// adapter: Adapter
|
|
34
|
+
// resolvePosition?: (button: HTMLImageElement) => { y: number, x: number }
|
|
35
|
+
// css?: CSSProperties
|
|
36
|
+
// }
|
|
37
|
+
//
|
|
38
|
+
//
|
|
39
|
+
// export class MenuAndButton
|
|
40
|
+
// extends React.Component<Props, { isOpen: boolean, over: boolean }>
|
|
41
|
+
// implements PopUpListener {
|
|
42
|
+
//
|
|
43
|
+
// ref = React.createRef<HTMLImageElement>();
|
|
44
|
+
//
|
|
45
|
+
// state = {
|
|
46
|
+
// isOpen: false,
|
|
47
|
+
// over: false
|
|
48
|
+
// };
|
|
49
|
+
//
|
|
50
|
+
// __onPopUpHide = (id: string) => {
|
|
51
|
+
// if (this.props.id !== id)
|
|
52
|
+
// return;
|
|
53
|
+
//
|
|
54
|
+
// this.setState({isOpen: false});
|
|
55
|
+
// };
|
|
56
|
+
//
|
|
57
|
+
// __onPopUpDisplay = (menu: PopUp_Model_Content) => {
|
|
58
|
+
// if (this.props.id !== menu.id)
|
|
59
|
+
// return;
|
|
60
|
+
//
|
|
61
|
+
// this.setState({isOpen: true});
|
|
62
|
+
// };
|
|
63
|
+
//
|
|
64
|
+
// render() {
|
|
65
|
+
// return <div
|
|
66
|
+
// className={'clickable'}
|
|
67
|
+
// onClick={this.open}
|
|
68
|
+
// style={{position: 'relative'}}>
|
|
69
|
+
// <div ref={this.ref}
|
|
70
|
+
// onMouseOver={e => this.setState({over: true})}
|
|
71
|
+
// onMouseOut={e => this.setState({over: false})}>
|
|
72
|
+
// {this.state.isOpen || this.state.over ? this.props.iconClosed : this.props.iconOpen}
|
|
73
|
+
// </div>
|
|
74
|
+
// </div>;
|
|
75
|
+
// }
|
|
76
|
+
//
|
|
77
|
+
// open = () => {
|
|
78
|
+
// if (!this.ref.current)
|
|
79
|
+
// throw new BadImplementationException('Could not find image reference');
|
|
80
|
+
//
|
|
81
|
+
// const pos = this.props.resolvePosition ? this.props.resolvePosition(this.ref.current) : resolveRealPosition(this.ref.current);
|
|
82
|
+
//
|
|
83
|
+
// new MenuBuilder(this.props.adapter, pos, {x: 0, y: 1})
|
|
84
|
+
// .setId(this.props.id)
|
|
85
|
+
// .show();
|
|
86
|
+
// };
|
|
87
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scroll-into-view.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scroll-into-view.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ScrollBehavior = 'smooth' | 'auto';
|
|
3
|
+
export declare const scrollIntoView: (_child: React.RefObject<HTMLElement> | HTMLElement, _container: React.RefObject<HTMLElement> | HTMLElement, scrollBehavior?: ScrollBehavior) => void;
|
|
4
|
+
export declare const scrollIntoView_Horizontal: (_child: React.RefObject<HTMLElement> | HTMLElement, _container: React.RefObject<HTMLElement> | HTMLElement, scrollBehavior?: ScrollBehavior) => void;
|
|
5
|
+
export declare const scrollToTop: (_child: React.RefObject<HTMLElement> | HTMLElement, _container: React.RefObject<HTMLElement> | HTMLElement, scrollBehavior?: ScrollBehavior, offset?: number) => void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BadImplementationException } from '@nu-art/ts-common';
|
|
2
|
+
const extractElement = (element) => {
|
|
3
|
+
return element instanceof HTMLElement ? element : element.current;
|
|
4
|
+
};
|
|
5
|
+
export const scrollIntoView = (_child, _container, scrollBehavior = 'smooth') => {
|
|
6
|
+
const child = extractElement(_child);
|
|
7
|
+
const container = extractElement(_container);
|
|
8
|
+
if (!child || !container)
|
|
9
|
+
throw new BadImplementationException('Got no elements');
|
|
10
|
+
const childRect = child.getBoundingClientRect();
|
|
11
|
+
const containerRect = container.getBoundingClientRect();
|
|
12
|
+
const inView = (childRect.top >= containerRect.top) && (childRect.bottom <= containerRect.top + container.clientHeight);
|
|
13
|
+
if (!inView) {
|
|
14
|
+
const scrollTop = childRect.top - containerRect.top;
|
|
15
|
+
const scrollBot = childRect.bottom - containerRect.bottom;
|
|
16
|
+
let scroll = container.scrollTop;
|
|
17
|
+
if (Math.abs(scrollTop) < Math.abs(scrollBot))
|
|
18
|
+
scroll += scrollTop - 35;
|
|
19
|
+
else
|
|
20
|
+
scroll += scrollBot;
|
|
21
|
+
container.scroll({ top: scroll, behavior: scrollBehavior });
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const scrollIntoView_Horizontal = (_child, _container, scrollBehavior = 'smooth') => {
|
|
25
|
+
const child = extractElement(_child);
|
|
26
|
+
const container = extractElement(_container);
|
|
27
|
+
if (!child || !container)
|
|
28
|
+
throw new BadImplementationException('Got no elements');
|
|
29
|
+
const childRect = child.getBoundingClientRect();
|
|
30
|
+
const containerRect = container.getBoundingClientRect();
|
|
31
|
+
const inView = (childRect.left >= containerRect.left) && (childRect.right <= containerRect.left + container.clientWidth);
|
|
32
|
+
if (!inView) {
|
|
33
|
+
const scrollLeft = childRect.left - containerRect.left;
|
|
34
|
+
const scrollRight = childRect.right - containerRect.right;
|
|
35
|
+
let scroll = container.scrollLeft;
|
|
36
|
+
if (Math.abs(scrollLeft) < Math.abs(scrollRight))
|
|
37
|
+
scroll += scrollLeft - 35;
|
|
38
|
+
else
|
|
39
|
+
scroll += scrollRight;
|
|
40
|
+
container.scroll({ left: scroll, behavior: scrollBehavior });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export const scrollToTop = (_child, _container, scrollBehavior = 'smooth', offset = 0) => {
|
|
44
|
+
const child = extractElement(_child);
|
|
45
|
+
const container = extractElement(_container);
|
|
46
|
+
if (!child || !container)
|
|
47
|
+
throw new BadImplementationException('Got no elements');
|
|
48
|
+
const childRect = child.getBoundingClientRect();
|
|
49
|
+
const containerRect = container.getBoundingClientRect();
|
|
50
|
+
if (childRect.top === containerRect.top)
|
|
51
|
+
return;
|
|
52
|
+
let scroll = container.scrollTop;
|
|
53
|
+
scroll += childRect.top - containerRect.top - offset;
|
|
54
|
+
container.scroll({ top: scroll, behavior: scrollBehavior });
|
|
55
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Module, ResolvableContent } from '@nu-art/ts-common';
|
|
3
|
+
import { ThunderDispatcher } from '../core/thunder-dispatcher.js';
|
|
4
|
+
export type Dialog_Model = DialogKey & {
|
|
5
|
+
content: ResolvableContent<React.ReactNode, [VoidFunction]>;
|
|
6
|
+
closeOverlayOnClick?: () => boolean;
|
|
7
|
+
overlayClass?: string;
|
|
8
|
+
};
|
|
9
|
+
export type DialogKey = {
|
|
10
|
+
dialogKey?: string;
|
|
11
|
+
};
|
|
12
|
+
export interface DialogListener {
|
|
13
|
+
__showDialog(dialogModel?: Dialog_Model): void;
|
|
14
|
+
__closeDialog(dialogModel?: DialogKey): void;
|
|
15
|
+
}
|
|
16
|
+
export interface DialogCloseListener {
|
|
17
|
+
__consumeDialogCloseEvent(dialogModel?: DialogKey): boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const dispatch_canClose: ThunderDispatcher<DialogCloseListener, "__consumeDialogCloseEvent", [dialogModel?: DialogKey | undefined], boolean>;
|
|
20
|
+
export declare const defaultCloseCallback: () => boolean;
|
|
21
|
+
export declare class ModuleFE_Dialog_Class extends Module<{}> {
|
|
22
|
+
constructor();
|
|
23
|
+
protected init(): void;
|
|
24
|
+
close: (force?: boolean, _dialogKey?: string) => void;
|
|
25
|
+
show: (model: Dialog_Model) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const ModuleFE_Dialog: ModuleFE_Dialog_Class;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Thunderstorm is a full web app framework!
|
|
3
|
+
*
|
|
4
|
+
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
5
|
+
* Typescript & React frontend infrastructure
|
|
6
|
+
*
|
|
7
|
+
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import { generateHex, Module } from '@nu-art/ts-common';
|
|
22
|
+
import { ThunderDispatcher } from '../core/thunder-dispatcher.js';
|
|
23
|
+
const dispatch_showDialog = new ThunderDispatcher('__showDialog');
|
|
24
|
+
const dispatch_closeDialog = new ThunderDispatcher('__closeDialog');
|
|
25
|
+
export const dispatch_canClose = new ThunderDispatcher('__consumeDialogCloseEvent');
|
|
26
|
+
export const defaultCloseCallback = () => true;
|
|
27
|
+
export class ModuleFE_Dialog_Class extends Module {
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
}
|
|
31
|
+
init() {
|
|
32
|
+
}
|
|
33
|
+
close = (force = true, _dialogKey) => {
|
|
34
|
+
const dialogKey = _dialogKey ? { dialogKey: _dialogKey } : undefined;
|
|
35
|
+
if (!force && dispatch_canClose.dispatchUI(dialogKey)[0])
|
|
36
|
+
return;
|
|
37
|
+
dispatch_closeDialog.dispatchUI(dialogKey);
|
|
38
|
+
};
|
|
39
|
+
show = (model) => {
|
|
40
|
+
dispatch_showDialog.dispatchUI({
|
|
41
|
+
content: model.content,
|
|
42
|
+
closeOverlayOnClick: model.closeOverlayOnClick ?? defaultCloseCallback,
|
|
43
|
+
dialogKey: model.dialogKey ?? generateHex(8),
|
|
44
|
+
overlayClass: model.overlayClass,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export const ModuleFE_Dialog = new ModuleFE_Dialog_Class();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DB_Object, Module } from '@nu-art/ts-common';
|
|
2
|
+
type NS_Normal = 'normal';
|
|
3
|
+
type NS_InProgress = 'in-progress';
|
|
4
|
+
type NS_Resolved = 'resolved';
|
|
5
|
+
type NS_Failed = 'failed';
|
|
6
|
+
export declare const NotificationStatus_Normal: NS_Normal;
|
|
7
|
+
export declare const NotificationStatus_InProgress: NS_InProgress;
|
|
8
|
+
export declare const NotificationStatus_Resolved: NS_Resolved;
|
|
9
|
+
export declare const NotificationStatus_Failed: NS_Failed;
|
|
10
|
+
export type NotificationStatus = NS_Normal | NS_InProgress | NS_Resolved | NS_Failed;
|
|
11
|
+
export type DB_Notification = DB_Object & {
|
|
12
|
+
title: string;
|
|
13
|
+
message: string;
|
|
14
|
+
postDelayed: number;
|
|
15
|
+
status: NotificationStatus;
|
|
16
|
+
};
|
|
17
|
+
export interface UI_Notification {
|
|
18
|
+
postDelayed: (postDelayed: number) => UI_Notification;
|
|
19
|
+
content: (title: string, message?: string) => UI_Notification;
|
|
20
|
+
execute: <T>(action: (notification: UI_Notification) => Promise<T>) => Promise<T>;
|
|
21
|
+
setStatus: (status: NotificationStatus) => UI_Notification;
|
|
22
|
+
show: (postDelay?: number) => void;
|
|
23
|
+
hide: () => void;
|
|
24
|
+
delete: () => void;
|
|
25
|
+
}
|
|
26
|
+
export interface NotificationListener {
|
|
27
|
+
__showNotifications(notifications: DB_Notification[]): void;
|
|
28
|
+
}
|
|
29
|
+
export declare class ModuleFE_Notifications_Class extends Module<{}> {
|
|
30
|
+
readonly maxNotifications: number;
|
|
31
|
+
private notificationStorage;
|
|
32
|
+
private showing;
|
|
33
|
+
private timeouts;
|
|
34
|
+
constructor(maxNotifications?: number);
|
|
35
|
+
create(id?: string): UI_Notification;
|
|
36
|
+
private upsert;
|
|
37
|
+
private showImpl;
|
|
38
|
+
private hide;
|
|
39
|
+
private delete;
|
|
40
|
+
showAllNotifications(): void;
|
|
41
|
+
hideAllNotifications(): void;
|
|
42
|
+
show(title: string, content: string, action: () => Promise<any>): Promise<UI_Notification>;
|
|
43
|
+
}
|
|
44
|
+
export declare const ModuleFE_Notifications: ModuleFE_Notifications_Class;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { addItemToArrayAtIndex, currentTimeMillis, generateHex, Module, removeFromArrayByIndex } from '@nu-art/ts-common';
|
|
2
|
+
import { StorageKey } from '../modules/ModuleFE_LocalStorage.js';
|
|
3
|
+
import { ThunderDispatcher } from '../core/thunder-dispatcher.js';
|
|
4
|
+
export const NotificationStatus_Normal = 'normal';
|
|
5
|
+
export const NotificationStatus_InProgress = 'in-progress';
|
|
6
|
+
export const NotificationStatus_Resolved = 'resolved';
|
|
7
|
+
export const NotificationStatus_Failed = 'failed';
|
|
8
|
+
const dispatch_showNotifications = new ThunderDispatcher('__showNotifications');
|
|
9
|
+
export class ModuleFE_Notifications_Class extends Module {
|
|
10
|
+
maxNotifications;
|
|
11
|
+
notificationStorage;
|
|
12
|
+
showing = [];
|
|
13
|
+
timeouts = {};
|
|
14
|
+
constructor(maxNotifications = 15) {
|
|
15
|
+
super();
|
|
16
|
+
this.notificationStorage = new StorageKey('notifications');
|
|
17
|
+
this.maxNotifications = maxNotifications;
|
|
18
|
+
}
|
|
19
|
+
create(id) {
|
|
20
|
+
const __created = currentTimeMillis();
|
|
21
|
+
const notification = this.notificationStorage.get([]).find(n => n._id === id) || {
|
|
22
|
+
postDelayed: 5000,
|
|
23
|
+
status: NotificationStatus_Normal,
|
|
24
|
+
title: '',
|
|
25
|
+
message: '',
|
|
26
|
+
_id: generateHex(8),
|
|
27
|
+
__created,
|
|
28
|
+
__updated: __created,
|
|
29
|
+
_v: '1.0.0'
|
|
30
|
+
};
|
|
31
|
+
const uiNotification = {
|
|
32
|
+
postDelayed: (postDelayed) => {
|
|
33
|
+
notification.postDelayed = postDelayed;
|
|
34
|
+
return uiNotification;
|
|
35
|
+
},
|
|
36
|
+
content: (title, message) => {
|
|
37
|
+
notification.title = title;
|
|
38
|
+
notification.message = message || '';
|
|
39
|
+
return uiNotification;
|
|
40
|
+
},
|
|
41
|
+
setStatus: (status) => {
|
|
42
|
+
notification.status = status;
|
|
43
|
+
return uiNotification;
|
|
44
|
+
},
|
|
45
|
+
execute: async (action) => {
|
|
46
|
+
notification.status = NotificationStatus_InProgress;
|
|
47
|
+
uiNotification.show(-1);
|
|
48
|
+
try {
|
|
49
|
+
const t = await action(uiNotification);
|
|
50
|
+
notification.status = NotificationStatus_Resolved;
|
|
51
|
+
uiNotification.show();
|
|
52
|
+
return t;
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
notification.status = NotificationStatus_Failed;
|
|
56
|
+
uiNotification.show();
|
|
57
|
+
throw e;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
show: (postDelay) => {
|
|
61
|
+
this.showImpl(notification, postDelay || notification.postDelayed);
|
|
62
|
+
},
|
|
63
|
+
hide: () => {
|
|
64
|
+
this.hide(notification);
|
|
65
|
+
},
|
|
66
|
+
delete: () => {
|
|
67
|
+
this.delete(notification);
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
return uiNotification;
|
|
71
|
+
}
|
|
72
|
+
upsert(notification) {
|
|
73
|
+
const notifications = this.notificationStorage.get([]);
|
|
74
|
+
const index = notifications.findIndex(n => n._id === notification._id);
|
|
75
|
+
if (index !== -1)
|
|
76
|
+
notifications[index] = notification;
|
|
77
|
+
else
|
|
78
|
+
addItemToArrayAtIndex(notifications, notification, 0);
|
|
79
|
+
//If length of array is bigger than max, pop last item
|
|
80
|
+
if (notifications.length > this.maxNotifications)
|
|
81
|
+
notifications.pop();
|
|
82
|
+
this.notificationStorage.set(notifications);
|
|
83
|
+
}
|
|
84
|
+
showImpl(notification, postDelay) {
|
|
85
|
+
this.upsert(notification);
|
|
86
|
+
const index = this.showing.findIndex(n => n._id === notification._id);
|
|
87
|
+
if (index !== -1)
|
|
88
|
+
this.showing[index] = notification;
|
|
89
|
+
else
|
|
90
|
+
addItemToArrayAtIndex(this.showing, notification, 0);
|
|
91
|
+
dispatch_showNotifications.dispatchUI(this.showing);
|
|
92
|
+
if (this.timeouts[notification._id]) {
|
|
93
|
+
clearTimeout(this.timeouts[notification._id]);
|
|
94
|
+
delete this.timeouts[notification._id];
|
|
95
|
+
}
|
|
96
|
+
if (postDelay <= 0)
|
|
97
|
+
return;
|
|
98
|
+
const timeoutId = setTimeout(() => this.hide(notification), postDelay);
|
|
99
|
+
this.timeouts[notification._id] = timeoutId;
|
|
100
|
+
}
|
|
101
|
+
hide(notification) {
|
|
102
|
+
const index = this.showing.findIndex(n => n._id === notification._id);
|
|
103
|
+
if (index === -1)
|
|
104
|
+
return;
|
|
105
|
+
removeFromArrayByIndex(this.showing, index);
|
|
106
|
+
dispatch_showNotifications.dispatchUI(this.showing);
|
|
107
|
+
}
|
|
108
|
+
delete(notification) {
|
|
109
|
+
this.hide(notification);
|
|
110
|
+
this.notificationStorage.set(this.notificationStorage.get([]).filter(item => item._id !== notification._id));
|
|
111
|
+
}
|
|
112
|
+
showAllNotifications() {
|
|
113
|
+
const notifications = this.notificationStorage.get([]);
|
|
114
|
+
dispatch_showNotifications.dispatchUI(notifications);
|
|
115
|
+
}
|
|
116
|
+
hideAllNotifications() {
|
|
117
|
+
dispatch_showNotifications.dispatchUI([]);
|
|
118
|
+
}
|
|
119
|
+
async show(title, content, action) {
|
|
120
|
+
const notification = this.create().content(title, content);
|
|
121
|
+
try {
|
|
122
|
+
await notification.execute(action);
|
|
123
|
+
notification.content(`${title} - Success`).show();
|
|
124
|
+
}
|
|
125
|
+
catch (e) {
|
|
126
|
+
this.logError(e);
|
|
127
|
+
notification.content(`Failed ${title}`, e.message).show();
|
|
128
|
+
throw e;
|
|
129
|
+
}
|
|
130
|
+
return notification;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export const ModuleFE_Notifications = new ModuleFE_Notifications_Class();
|