@simplysm/angular 14.0.1 → 14.0.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/README.md +318 -0
- package/dist/core/commons.d.ts +2 -0
- package/dist/core/commons.d.ts.map +1 -0
- package/dist/core/commons.js +4 -0
- package/dist/core/directives/sd-events.directive.js +7 -7
- package/dist/core/directives/sd-item-of-template.directive.d.ts +14 -0
- package/dist/core/directives/sd-item-of-template.directive.d.ts.map +1 -0
- package/dist/core/directives/sd-item-of-template.directive.js +17 -0
- package/dist/core/directives/sd-router-link.directive.d.ts +19 -0
- package/dist/core/directives/sd-router-link.directive.d.ts.map +1 -0
- package/dist/core/directives/sd-router-link.directive.js +64 -0
- package/dist/core/directives/sd-typed-template.directive.d.ts +8 -0
- package/dist/core/directives/sd-typed-template.directive.d.ts.map +1 -0
- package/dist/core/directives/sd-typed-template.directive.js +17 -0
- package/dist/core/pipes/format.pipe.d.ts +9 -0
- package/dist/core/pipes/format.pipe.d.ts.map +1 -0
- package/dist/core/pipes/format.pipe.js +43 -0
- package/dist/core/plugins/commands/findTopOpenModalEl.d.ts +8 -0
- package/dist/core/plugins/commands/findTopOpenModalEl.d.ts.map +1 -0
- package/dist/core/plugins/commands/findTopOpenModalEl.js +21 -0
- package/dist/core/plugins/commands/sd-insert-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-insert-command-event.plugin.js +4 -0
- package/dist/core/plugins/commands/sd-refresh-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-refresh-command-event.plugin.js +4 -0
- package/dist/core/plugins/commands/sd-save-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-save-command-event.plugin.js +4 -0
- package/dist/core/plugins/events/sd-resize-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/events/sd-resize-event.plugin.js +0 -18
- package/dist/core/plugins/sd-global-error-handler.plugin.d.ts +1 -0
- package/dist/core/plugins/sd-global-error-handler.plugin.d.ts.map +1 -1
- package/dist/core/plugins/sd-global-error-handler.plugin.js +23 -13
- package/dist/core/provideSdAngular.d.ts +5 -0
- package/dist/core/provideSdAngular.d.ts.map +1 -0
- package/dist/core/provideSdAngular.js +127 -0
- package/dist/core/providers/sd-angular-config.provider.d.ts +7 -0
- package/dist/core/providers/sd-angular-config.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-angular-config.provider.js +11 -0
- package/dist/core/providers/sd-app-structure.provider.d.ts +79 -0
- package/dist/core/providers/sd-app-structure.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-app-structure.provider.js +278 -0
- package/dist/core/providers/sd-file-dialog.provider.d.ts +8 -0
- package/dist/core/providers/sd-file-dialog.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-file-dialog.provider.js +49 -0
- package/dist/core/providers/sd-local-storage.provider.d.ts +10 -0
- package/dist/core/providers/sd-local-storage.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-local-storage.provider.js +24 -0
- package/dist/core/providers/sd-navigate-window.provider.d.ts +9 -0
- package/dist/core/providers/sd-navigate-window.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-navigate-window.provider.js +33 -0
- package/dist/core/providers/sd-print.provider.d.ts +26 -0
- package/dist/core/providers/sd-print.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-print.provider.js +142 -0
- package/dist/core/providers/sd-service-client-factory.provider.d.ts +19 -0
- package/dist/core/providers/sd-service-client-factory.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-service-client-factory.provider.js +86 -0
- package/dist/core/providers/sd-shared-data.provider.d.ts +36 -0
- package/dist/core/providers/sd-shared-data.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-shared-data.provider.js +119 -0
- package/dist/core/providers/sd-system-config.provider.d.ts +13 -0
- package/dist/core/providers/sd-system-config.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-system-config.provider.js +29 -0
- package/dist/core/providers/sd-system-log.provider.d.ts +8 -0
- package/dist/core/providers/sd-system-log.provider.d.ts.map +1 -0
- package/dist/core/providers/sd-system-log.provider.js +23 -0
- package/dist/core/providers/sd-theme-provider.js +1 -1
- package/dist/core/utils/TDirectiveInputSignals.d.ts +29 -0
- package/dist/core/utils/TDirectiveInputSignals.d.ts.map +1 -0
- package/dist/core/utils/TDirectiveInputSignals.js +1 -0
- package/dist/core/utils/setups/setupCanDeactivate.d.ts +2 -0
- package/dist/core/utils/setups/setupCanDeactivate.d.ts.map +1 -0
- package/dist/core/utils/setups/setupCanDeactivate.js +28 -0
- package/dist/core/utils/setups/setupModelHook.d.ts +3 -0
- package/dist/core/utils/setups/setupModelHook.d.ts.map +1 -0
- package/dist/core/utils/setups/setupModelHook.js +18 -0
- package/dist/core/utils/useCurrentPageCodeSignal.d.ts +3 -0
- package/dist/core/utils/useCurrentPageCodeSignal.d.ts.map +1 -0
- package/dist/core/utils/useCurrentPageCodeSignal.js +13 -0
- package/dist/core/utils/useExpandingManager.d.ts +23 -0
- package/dist/core/utils/useExpandingManager.d.ts.map +1 -0
- package/dist/core/utils/useExpandingManager.js +86 -0
- package/dist/core/utils/useFullPageCodeSignal.d.ts +3 -0
- package/dist/core/utils/useFullPageCodeSignal.d.ts.map +1 -0
- package/dist/core/utils/useFullPageCodeSignal.js +13 -0
- package/dist/core/utils/useSdSystemConfigResource.d.ts +13 -0
- package/dist/core/utils/useSdSystemConfigResource.d.ts.map +1 -0
- package/dist/core/utils/useSdSystemConfigResource.js +31 -0
- package/dist/core/utils/useSelectionManager.d.ts +18 -0
- package/dist/core/utils/useSelectionManager.d.ts.map +1 -0
- package/dist/core/utils/useSelectionManager.js +89 -0
- package/dist/core/utils/useSortingManager.d.ts +17 -0
- package/dist/core/utils/useSortingManager.d.ts.map +1 -0
- package/dist/core/utils/useSortingManager.js +81 -0
- package/dist/core/utils/useViewTitleSignal.d.ts +3 -0
- package/dist/core/utils/useViewTitleSignal.d.ts.map +1 -0
- package/dist/core/utils/useViewTitleSignal.js +17 -0
- package/dist/core/utils/useViewTypeSignal.d.ts +4 -0
- package/dist/core/utils/useViewTypeSignal.d.ts.map +1 -0
- package/dist/core/utils/useViewTypeSignal.js +23 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +115 -0
- package/dist/styles.css +1462 -722
- package/dist/ui/data/list/sd-list-item.control.d.ts +18 -0
- package/dist/ui/data/list/sd-list-item.control.d.ts.map +1 -0
- package/dist/ui/data/list/sd-list-item.control.js +130 -0
- package/dist/ui/data/list/sd-list.control.d.ts +7 -0
- package/dist/ui/data/list/sd-list.control.d.ts.map +1 -0
- package/dist/ui/data/list/sd-list.control.js +22 -0
- package/dist/ui/data/sheet/sd-sheet-column.directive.d.ts +18 -0
- package/dist/ui/data/sheet/sd-sheet-column.directive.d.ts.map +1 -0
- package/dist/ui/data/sheet/sd-sheet-column.directive.js +30 -0
- package/dist/ui/data/sheet/sd-sheet-config.modal.d.ts +39 -0
- package/dist/ui/data/sheet/sd-sheet-config.modal.d.ts.map +1 -0
- package/dist/ui/data/sheet/sd-sheet-config.modal.js +258 -0
- package/dist/ui/data/sheet/sd-sheet.control.d.ts +154 -0
- package/dist/ui/data/sheet/sd-sheet.control.d.ts.map +1 -0
- package/dist/ui/data/sheet/sd-sheet.control.js +846 -0
- package/dist/ui/data/sheet/types.d.ts +32 -0
- package/dist/ui/data/sheet/types.d.ts.map +1 -0
- package/dist/ui/data/sheet/types.js +1 -0
- package/dist/ui/data/sheet/useSheetCellAgent.d.ts +21 -0
- package/dist/ui/data/sheet/useSheetCellAgent.d.ts.map +1 -0
- package/dist/ui/data/sheet/useSheetCellAgent.js +245 -0
- package/dist/ui/data/sheet/useSheetColumnFixing.d.ts +9 -0
- package/dist/ui/data/sheet/useSheetColumnFixing.d.ts.map +1 -0
- package/dist/ui/data/sheet/useSheetColumnFixing.js +29 -0
- package/dist/ui/data/sheet/useSheetDomAccessor.d.ts +11 -0
- package/dist/ui/data/sheet/useSheetDomAccessor.d.ts.map +1 -0
- package/dist/ui/data/sheet/useSheetDomAccessor.js +55 -0
- package/dist/ui/data/sheet/useSheetLayoutEngine.d.ts +14 -0
- package/dist/ui/data/sheet/useSheetLayoutEngine.d.ts.map +1 -0
- package/dist/ui/data/sheet/useSheetLayoutEngine.js +126 -0
- package/dist/ui/form/button/sd-additional-button.control.d.ts +8 -0
- package/dist/ui/form/button/sd-additional-button.control.d.ts.map +1 -0
- package/dist/ui/form/button/sd-additional-button.control.js +38 -0
- package/dist/ui/form/button/sd-anchor.control.d.ts +8 -0
- package/dist/ui/form/button/sd-anchor.control.d.ts.map +1 -0
- package/dist/ui/form/button/sd-anchor.control.js +25 -0
- package/dist/ui/form/button/sd-button.control.d.ts +14 -0
- package/dist/ui/form/button/sd-button.control.d.ts.map +1 -0
- package/dist/ui/form/button/sd-button.control.js +49 -0
- package/dist/ui/form/button/sd-modal-select-button.control.d.ts +46 -0
- package/dist/ui/form/button/sd-modal-select-button.control.d.ts.map +1 -0
- package/dist/ui/form/button/sd-modal-select-button.control.js +149 -0
- package/dist/ui/form/checkbox/sd-checkbox-group-item.control.d.ts +12 -0
- package/dist/ui/form/checkbox/sd-checkbox-group-item.control.d.ts.map +1 -0
- package/dist/ui/form/checkbox/sd-checkbox-group-item.control.js +53 -0
- package/dist/ui/form/checkbox/sd-checkbox-group.control.d.ts +8 -0
- package/dist/ui/form/checkbox/sd-checkbox-group.control.d.ts.map +1 -0
- package/dist/ui/form/checkbox/sd-checkbox-group.control.js +26 -0
- package/dist/ui/form/checkbox/sd-checkbox.control.d.ts +19 -0
- package/dist/ui/form/checkbox/sd-checkbox.control.d.ts.map +1 -0
- package/dist/ui/form/checkbox/sd-checkbox.control.js +103 -0
- package/dist/ui/form/checkbox/sd-switch.control.d.ts +14 -0
- package/dist/ui/form/checkbox/sd-switch.control.d.ts.map +1 -0
- package/dist/ui/form/checkbox/sd-switch.control.js +54 -0
- package/dist/ui/form/choice/sd-state-preset.control.d.ts +24 -0
- package/dist/ui/form/choice/sd-state-preset.control.d.ts.map +1 -0
- package/dist/ui/form/choice/sd-state-preset.control.js +134 -0
- package/dist/ui/form/editor/sd-tiptap-editor.control.d.ts +35 -0
- package/dist/ui/form/editor/sd-tiptap-editor.control.d.ts.map +1 -0
- package/dist/ui/form/editor/sd-tiptap-editor.control.js +480 -0
- package/dist/ui/form/input/sd-date-range.picker.d.ts +13 -0
- package/dist/ui/form/input/sd-date-range.picker.d.ts.map +1 -0
- package/dist/ui/form/input/sd-date-range.picker.js +125 -0
- package/dist/ui/form/input/sd-numpad.control.d.ts +18 -0
- package/dist/ui/form/input/sd-numpad.control.d.ts.map +1 -0
- package/dist/ui/form/input/sd-numpad.control.js +241 -0
- package/dist/ui/form/input/sd-range.control.d.ts +13 -0
- package/dist/ui/form/input/sd-range.control.d.ts.map +1 -0
- package/dist/ui/form/input/sd-range.control.js +53 -0
- package/dist/ui/form/input/sd-textarea.control.d.ts +23 -0
- package/dist/ui/form/input/sd-textarea.control.d.ts.map +1 -0
- package/dist/ui/form/input/sd-textarea.control.js +132 -0
- package/dist/ui/form/input/sd-textfield-type-handlers.d.ts +46 -0
- package/dist/ui/form/input/sd-textfield-type-handlers.d.ts.map +1 -0
- package/dist/ui/form/input/sd-textfield-type-handlers.js +336 -0
- package/dist/ui/form/input/sd-textfield.control.d.ts +39 -0
- package/dist/ui/form/input/sd-textfield.control.d.ts.map +1 -0
- package/dist/ui/form/input/sd-textfield.control.js +211 -0
- package/dist/ui/form/sd-form.control.d.ts +13 -0
- package/dist/ui/form/sd-form.control.d.ts.map +1 -0
- package/dist/ui/form/sd-form.control.js +60 -0
- package/dist/ui/form/select/sd-select-button.control.d.ts +7 -0
- package/dist/ui/form/select/sd-select-button.control.d.ts.map +1 -0
- package/dist/ui/form/select/sd-select-button.control.js +25 -0
- package/dist/ui/form/select/sd-select-item.control.d.ts +18 -0
- package/dist/ui/form/select/sd-select-item.control.d.ts.map +1 -0
- package/dist/ui/form/select/sd-select-item.control.js +103 -0
- package/dist/ui/form/select/sd-select.control.d.ts +45 -0
- package/dist/ui/form/select/sd-select.control.d.ts.map +1 -0
- package/dist/ui/form/select/sd-select.control.js +430 -0
- package/dist/ui/layout/dock/sd-dock-container.control.d.ts +12 -0
- package/dist/ui/layout/dock/sd-dock-container.control.d.ts.map +1 -0
- package/dist/ui/layout/dock/sd-dock-container.control.js +96 -0
- package/dist/ui/layout/dock/sd-dock.control.d.ts +17 -0
- package/dist/ui/layout/dock/sd-dock.control.d.ts.map +1 -0
- package/dist/ui/layout/dock/sd-dock.control.js +111 -0
- package/dist/ui/layout/kanban/sd-kanban-board.control.d.ts +24 -0
- package/dist/ui/layout/kanban/sd-kanban-board.control.d.ts.map +1 -0
- package/dist/ui/layout/kanban/sd-kanban-board.control.js +37 -0
- package/dist/ui/layout/kanban/sd-kanban-lane.control.d.ts +29 -0
- package/dist/ui/layout/kanban/sd-kanban-lane.control.d.ts.map +1 -0
- package/dist/ui/layout/kanban/sd-kanban-lane.control.js +223 -0
- package/dist/ui/layout/kanban/sd-kanban.control.d.ts +32 -0
- package/dist/ui/layout/kanban/sd-kanban.control.d.ts.map +1 -0
- package/dist/ui/layout/kanban/sd-kanban.control.js +147 -0
- package/dist/ui/layout/sd-card.directive.d.ts +6 -0
- package/dist/ui/layout/sd-card.directive.d.ts.map +1 -0
- package/dist/ui/layout/sd-card.directive.js +16 -0
- package/dist/ui/layout/sd-gap.control.d.ts +13 -0
- package/dist/ui/layout/sd-gap.control.d.ts.map +1 -0
- package/dist/ui/layout/sd-gap.control.js +44 -0
- package/dist/ui/layout/sd-pane.directive.d.ts +6 -0
- package/dist/ui/layout/sd-pane.directive.d.ts.map +1 -0
- package/dist/ui/layout/sd-pane.directive.js +17 -0
- package/dist/ui/layout/view/sd-view-item.control.d.ts +9 -0
- package/dist/ui/layout/view/sd-view-item.control.d.ts.map +1 -0
- package/dist/ui/layout/view/sd-view-item.control.js +25 -0
- package/dist/ui/layout/view/sd-view.control.d.ts +8 -0
- package/dist/ui/layout/view/sd-view.control.d.ts.map +1 -0
- package/dist/ui/layout/view/sd-view.control.js +23 -0
- package/dist/ui/navigation/collapse/sd-collapse-icon.control.d.ts +13 -0
- package/dist/ui/navigation/collapse/sd-collapse-icon.control.d.ts.map +1 -0
- package/dist/ui/navigation/collapse/sd-collapse-icon.control.js +33 -0
- package/dist/ui/navigation/collapse/sd-collapse.control.d.ts +14 -0
- package/dist/ui/navigation/collapse/sd-collapse.control.d.ts.map +1 -0
- package/dist/ui/navigation/collapse/sd-collapse.control.js +59 -0
- package/dist/ui/navigation/menu-utils.d.ts +13 -0
- package/dist/ui/navigation/menu-utils.d.ts.map +1 -0
- package/dist/ui/navigation/menu-utils.js +18 -0
- package/dist/ui/navigation/pagination/sd-pagination.control.d.ts +24 -0
- package/dist/ui/navigation/pagination/sd-pagination.control.d.ts.map +1 -0
- package/dist/ui/navigation/pagination/sd-pagination.control.js +137 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-container.control.d.ts +11 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-container.control.d.ts.map +1 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-container.control.js +46 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.d.ts +28 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.d.ts.map +1 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.js +159 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-user.control.d.ts +16 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-user.control.d.ts.map +1 -0
- package/dist/ui/navigation/sidebar/sd-sidebar-user.control.js +109 -0
- package/dist/ui/navigation/sidebar/sd-sidebar.control.d.ts +8 -0
- package/dist/ui/navigation/sidebar/sd-sidebar.control.d.ts.map +1 -0
- package/dist/ui/navigation/sidebar/sd-sidebar.control.js +24 -0
- package/dist/ui/navigation/tab/sd-tab-item.control.d.ts +10 -0
- package/dist/ui/navigation/tab/sd-tab-item.control.d.ts.map +1 -0
- package/dist/ui/navigation/tab/sd-tab-item.control.js +31 -0
- package/dist/ui/navigation/tab/sd-tab.control.d.ts +7 -0
- package/dist/ui/navigation/tab/sd-tab.control.d.ts.map +1 -0
- package/dist/ui/navigation/tab/sd-tab.control.js +18 -0
- package/dist/ui/navigation/tab/sd-tabview-item.control.d.ts +10 -0
- package/dist/ui/navigation/tab/sd-tabview-item.control.d.ts.map +1 -0
- package/dist/ui/navigation/tab/sd-tabview-item.control.js +26 -0
- package/dist/ui/navigation/tab/sd-tabview.control.d.ts +9 -0
- package/dist/ui/navigation/tab/sd-tabview.control.d.ts.map +1 -0
- package/dist/ui/navigation/tab/sd-tabview.control.js +67 -0
- package/dist/ui/navigation/topbar/sd-topbar-container.control.d.ts +6 -0
- package/dist/ui/navigation/topbar/sd-topbar-container.control.d.ts.map +1 -0
- package/dist/ui/navigation/topbar/sd-topbar-container.control.js +17 -0
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.d.ts +29 -0
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.d.ts.map +1 -0
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.js +245 -0
- package/dist/ui/navigation/topbar/sd-topbar-user.control.d.ts +13 -0
- package/dist/ui/navigation/topbar/sd-topbar-user.control.d.ts.map +1 -0
- package/dist/ui/navigation/topbar/sd-topbar-user.control.js +77 -0
- package/dist/ui/navigation/topbar/sd-topbar.control.d.ts +12 -0
- package/dist/ui/navigation/topbar/sd-topbar.control.d.ts.map +1 -0
- package/dist/ui/navigation/topbar/sd-topbar.control.js +59 -0
- package/dist/ui/overlay/busy/sd-busy-container.control.d.ts +14 -0
- package/dist/ui/overlay/busy/sd-busy-container.control.d.ts.map +1 -0
- package/dist/ui/overlay/busy/sd-busy-container.control.js +119 -0
- package/dist/ui/overlay/busy/sd-busy.provider.d.ts +16 -0
- package/dist/ui/overlay/busy/sd-busy.provider.d.ts.map +1 -0
- package/dist/ui/overlay/busy/sd-busy.provider.js +43 -0
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.d.ts +11 -0
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.d.ts.map +1 -0
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.js +43 -0
- package/dist/ui/overlay/dropdown/sd-dropdown.control.d.ts +27 -0
- package/dist/ui/overlay/dropdown/sd-dropdown.control.d.ts.map +1 -0
- package/dist/ui/overlay/dropdown/sd-dropdown.control.js +284 -0
- package/dist/ui/overlay/modal/sd-confirm-modal.control.d.ts +17 -0
- package/dist/ui/overlay/modal/sd-confirm-modal.control.d.ts.map +1 -0
- package/dist/ui/overlay/modal/sd-confirm-modal.control.js +51 -0
- package/dist/ui/overlay/modal/sd-modal.control.d.ts +51 -0
- package/dist/ui/overlay/modal/sd-modal.control.d.ts.map +1 -0
- package/dist/ui/overlay/modal/sd-modal.control.js +411 -0
- package/dist/ui/overlay/modal/sd-modal.provider.d.ts +65 -0
- package/dist/ui/overlay/modal/sd-modal.provider.d.ts.map +1 -0
- package/dist/ui/overlay/modal/sd-modal.provider.js +146 -0
- package/dist/ui/overlay/modal/sd-prompt-modal.control.d.ts +19 -0
- package/dist/ui/overlay/modal/sd-prompt-modal.control.d.ts.map +1 -0
- package/dist/ui/overlay/modal/sd-prompt-modal.control.js +71 -0
- package/dist/ui/overlay/toast/sd-toast-container.control.d.ts +7 -0
- package/dist/ui/overlay/toast/sd-toast-container.control.d.ts.map +1 -0
- package/dist/ui/overlay/toast/sd-toast-container.control.js +20 -0
- package/dist/ui/overlay/toast/sd-toast.control.d.ts +14 -0
- package/dist/ui/overlay/toast/sd-toast.control.d.ts.map +1 -0
- package/dist/ui/overlay/toast/sd-toast.control.js +79 -0
- package/dist/ui/overlay/toast/sd-toast.provider.d.ts +45 -0
- package/dist/ui/overlay/toast/sd-toast.provider.d.ts.map +1 -0
- package/dist/ui/overlay/toast/sd-toast.provider.js +219 -0
- package/dist/ui/visual/sd-barcode.control.d.ts +11 -0
- package/dist/ui/visual/sd-barcode.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-barcode.control.js +35 -0
- package/dist/ui/visual/sd-calendar.control.d.ts +20 -0
- package/dist/ui/visual/sd-calendar.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-calendar.control.js +189 -0
- package/dist/ui/visual/sd-echarts.control.d.ts +13 -0
- package/dist/ui/visual/sd-echarts.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-echarts.control.js +55 -0
- package/dist/ui/visual/sd-label.control.d.ts +9 -0
- package/dist/ui/visual/sd-label.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-label.control.js +27 -0
- package/dist/ui/visual/sd-note.control.d.ts +9 -0
- package/dist/ui/visual/sd-note.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-note.control.js +26 -0
- package/dist/ui/visual/sd-progress.control.d.ts +10 -0
- package/dist/ui/visual/sd-progress.control.d.ts.map +1 -0
- package/dist/ui/visual/sd-progress.control.js +38 -0
- package/docs/commons-and-configuration.md +34 -0
- package/docs/data-display-components.md +146 -0
- package/docs/directives.md +158 -0
- package/docs/event-plugins.md +109 -0
- package/docs/form-components.md +362 -0
- package/docs/hooks-and-utilities.md +175 -0
- package/docs/layout-components.md +140 -0
- package/docs/navigation-components.md +200 -0
- package/docs/overlay-components.md +193 -0
- package/docs/pipes.md +25 -0
- package/docs/providers.md +448 -0
- package/docs/setup-functions.md +66 -0
- package/docs/visual-components.md +89 -0
- package/package.json +37 -18
- package/scss/commons/_mixins.scss +34 -0
- package/scss/commons/_styles.scss +27 -68
- package/scss/commons/_variables.scss +7 -0
- package/scss/controls/_card.scss +29 -0
- package/scss/controls/_flex.scss +38 -0
- package/scss/controls/_form-box.scss +49 -0
- package/scss/controls/_form-table.scss +45 -0
- package/scss/controls/_grid.scss +36 -0
- package/scss/controls/_table.scss +99 -0
- package/scss/styles.scss +7 -0
- package/scss/themes/_variables-dark.scss +2 -0
- package/src/core/commons.ts +4 -0
- package/src/core/directives/sd-events.directive.ts +7 -7
- package/src/core/directives/sd-item-of-template.directive.ts +23 -0
- package/src/core/directives/sd-router-link.directive.ts +81 -0
- package/src/core/directives/sd-typed-template.directive.ts +16 -0
- package/src/core/pipes/format.pipe.ts +37 -0
- package/src/core/plugins/commands/findTopOpenModalEl.ts +23 -0
- package/src/core/plugins/commands/sd-insert-command-event.plugin.ts +4 -0
- package/src/core/plugins/commands/sd-refresh-command-event.plugin.ts +4 -0
- package/src/core/plugins/commands/sd-save-command-event.plugin.ts +4 -0
- package/src/core/plugins/events/sd-resize-event.plugin.ts +0 -22
- package/src/core/plugins/sd-global-error-handler.plugin.ts +22 -13
- package/src/core/provideSdAngular.ts +154 -0
- package/src/core/providers/sd-angular-config.provider.ts +6 -0
- package/src/core/providers/sd-app-structure.provider.ts +446 -0
- package/src/core/providers/sd-file-dialog.provider.ts +49 -0
- package/src/core/providers/sd-local-storage.provider.ts +21 -0
- package/src/core/providers/sd-navigate-window.provider.ts +44 -0
- package/src/core/providers/sd-print.provider.ts +189 -0
- package/src/core/providers/sd-service-client-factory.provider.ts +98 -0
- package/src/core/providers/sd-shared-data.provider.ts +179 -0
- package/src/core/providers/sd-system-config.provider.ts +28 -0
- package/src/core/providers/sd-system-log.provider.ts +19 -0
- package/src/core/providers/sd-theme-provider.ts +1 -1
- package/src/core/utils/TDirectiveInputSignals.ts +34 -0
- package/src/core/utils/setups/setupCanDeactivate.ts +34 -0
- package/src/core/utils/setups/setupModelHook.ts +26 -0
- package/src/core/utils/useCurrentPageCodeSignal.ts +16 -0
- package/src/core/utils/useExpandingManager.ts +117 -0
- package/src/core/utils/useFullPageCodeSignal.ts +24 -0
- package/src/core/utils/useSdSystemConfigResource.ts +36 -0
- package/src/core/utils/useSelectionManager.ts +104 -0
- package/src/core/utils/useSortingManager.ts +89 -0
- package/src/core/utils/useViewTitleSignal.ts +21 -0
- package/src/core/utils/useViewTypeSignal.ts +33 -0
- package/src/index.ts +209 -0
- package/src/scss.d.ts +1 -0
- package/src/ui/data/list/sd-list-item.control.ts +143 -0
- package/src/ui/data/list/sd-list.control.ts +41 -0
- package/src/ui/data/sheet/sd-sheet-column.directive.ts +26 -0
- package/src/ui/data/sheet/sd-sheet-config.modal.ts +252 -0
- package/src/ui/data/sheet/sd-sheet.control.ts +766 -0
- package/src/ui/data/sheet/types.ts +37 -0
- package/src/ui/data/sheet/useSheetCellAgent.ts +267 -0
- package/src/ui/data/sheet/useSheetColumnFixing.ts +37 -0
- package/src/ui/data/sheet/useSheetDomAccessor.ts +62 -0
- package/src/ui/data/sheet/useSheetLayoutEngine.ts +143 -0
- package/src/ui/form/button/sd-additional-button.control.ts +100 -0
- package/src/ui/form/button/sd-anchor.control.ts +67 -0
- package/src/ui/form/button/sd-button.control.ts +209 -0
- package/src/ui/form/button/sd-modal-select-button.control.ts +237 -0
- package/src/ui/form/checkbox/sd-checkbox-group-item.control.ts +51 -0
- package/src/ui/form/checkbox/sd-checkbox-group.control.ts +24 -0
- package/src/ui/form/checkbox/sd-checkbox.control.ts +305 -0
- package/src/ui/form/checkbox/sd-switch.control.ts +145 -0
- package/src/ui/form/choice/sd-state-preset.control.ts +173 -0
- package/src/ui/form/editor/sd-tiptap-editor.control.ts +474 -0
- package/src/ui/form/input/sd-date-range.picker.ts +98 -0
- package/src/ui/form/input/sd-numpad.control.ts +178 -0
- package/src/ui/form/input/sd-range.control.ts +59 -0
- package/src/ui/form/input/sd-textarea.control.ts +221 -0
- package/src/ui/form/input/sd-textfield-type-handlers.ts +445 -0
- package/src/ui/form/input/sd-textfield.control.ts +395 -0
- package/src/ui/form/sd-form.control.ts +52 -0
- package/src/ui/form/select/sd-select-button.control.ts +43 -0
- package/src/ui/form/select/sd-select-item.control.ts +143 -0
- package/src/ui/form/select/sd-select.control.ts +412 -0
- package/src/ui/layout/dock/sd-dock-container.control.ts +100 -0
- package/src/ui/layout/dock/sd-dock.control.ts +171 -0
- package/src/ui/layout/kanban/sd-kanban-board.control.ts +74 -0
- package/src/ui/layout/kanban/sd-kanban-lane.control.ts +210 -0
- package/src/ui/layout/kanban/sd-kanban.control.ts +227 -0
- package/src/ui/layout/sd-card.directive.ts +10 -0
- package/src/ui/layout/sd-gap.control.ts +63 -0
- package/src/ui/layout/sd-pane.directive.ts +11 -0
- package/src/ui/layout/view/sd-view-item.control.ts +45 -0
- package/src/ui/layout/view/sd-view.control.ts +31 -0
- package/src/ui/navigation/collapse/sd-collapse-icon.control.ts +51 -0
- package/src/ui/navigation/collapse/sd-collapse.control.ts +75 -0
- package/src/ui/navigation/menu-utils.ts +36 -0
- package/src/ui/navigation/pagination/sd-pagination.control.ts +125 -0
- package/src/ui/navigation/sidebar/sd-sidebar-container.control.ts +92 -0
- package/src/ui/navigation/sidebar/sd-sidebar-menu.control.ts +129 -0
- package/src/ui/navigation/sidebar/sd-sidebar-user.control.ts +84 -0
- package/src/ui/navigation/sidebar/sd-sidebar.control.ts +67 -0
- package/src/ui/navigation/tab/sd-tab-item.control.ts +55 -0
- package/src/ui/navigation/tab/sd-tab.control.ts +25 -0
- package/src/ui/navigation/tab/sd-tabview-item.control.ts +48 -0
- package/src/ui/navigation/tab/sd-tabview.control.ts +39 -0
- package/src/ui/navigation/topbar/sd-topbar-container.control.ts +22 -0
- package/src/ui/navigation/topbar/sd-topbar-menu.control.ts +165 -0
- package/src/ui/navigation/topbar/sd-topbar-user.control.ts +58 -0
- package/src/ui/navigation/topbar/sd-topbar.control.ts +94 -0
- package/src/ui/overlay/busy/sd-busy-container.control.ts +243 -0
- package/src/ui/overlay/busy/sd-busy.provider.ts +55 -0
- package/src/ui/overlay/dropdown/sd-dropdown-popup.control.ts +110 -0
- package/src/ui/overlay/dropdown/sd-dropdown.control.ts +310 -0
- package/src/ui/overlay/modal/sd-confirm-modal.control.ts +66 -0
- package/src/ui/overlay/modal/sd-modal.control.ts +362 -0
- package/src/ui/overlay/modal/sd-modal.provider.ts +216 -0
- package/src/ui/overlay/modal/sd-prompt-modal.control.ts +92 -0
- package/src/ui/overlay/toast/sd-toast-container.control.ts +58 -0
- package/src/ui/overlay/toast/sd-toast.control.ts +123 -0
- package/src/ui/overlay/toast/sd-toast.provider.ts +302 -0
- package/src/ui/visual/sd-barcode.control.ts +62 -0
- package/src/ui/visual/sd-calendar.control.ts +188 -0
- package/src/ui/visual/sd-echarts.control.ts +73 -0
- package/src/ui/visual/sd-label.control.ts +66 -0
- package/src/ui/visual/sd-note.control.ts +66 -0
- package/src/ui/visual/sd-progress.control.ts +88 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
booleanAttribute,
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
contentChild,
|
|
7
|
+
contentChildren,
|
|
8
|
+
input,
|
|
9
|
+
model,
|
|
10
|
+
TemplateRef,
|
|
11
|
+
ViewEncapsulation,
|
|
12
|
+
} from "@angular/core";
|
|
13
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
14
|
+
import { NgIcon } from "@ng-icons/core";
|
|
15
|
+
import { SdCollapseControl } from "../../navigation/collapse/sd-collapse.control";
|
|
16
|
+
import { SdCollapseIconControl } from "../../navigation/collapse/sd-collapse-icon.control";
|
|
17
|
+
import { SdListControl } from "./sd-list.control";
|
|
18
|
+
import { setupRipple } from "../../../core/utils/setups/setupRipple";
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: "sd-list-item",
|
|
22
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
encapsulation: ViewEncapsulation.None,
|
|
24
|
+
standalone: true,
|
|
25
|
+
imports: [SdCollapseControl, SdCollapseIconControl, NgTemplateOutlet, NgIcon],
|
|
26
|
+
template: `
|
|
27
|
+
<div class="_content" tabindex="0" (click)="onContentClick()" (keydown.enter)="onContentClick()">
|
|
28
|
+
@if (layout() === "accordion" && hasChildren()) {
|
|
29
|
+
<sd-collapse-icon [open]="open()" />
|
|
30
|
+
}
|
|
31
|
+
@if (selectedIcon() !== undefined && !hasChildren()) {
|
|
32
|
+
<ng-icon
|
|
33
|
+
[class.tx-theme-primary-default]="selected()"
|
|
34
|
+
[class.tx-trans-lightest]="!selected()"
|
|
35
|
+
[svg]="selectedIcon()!"
|
|
36
|
+
/>
|
|
37
|
+
}
|
|
38
|
+
<div class="_label">
|
|
39
|
+
<ng-content />
|
|
40
|
+
</div>
|
|
41
|
+
@if (toolTpl()) {
|
|
42
|
+
<div class="_tool">
|
|
43
|
+
<ng-template [ngTemplateOutlet]="toolTpl()!" />
|
|
44
|
+
</div>
|
|
45
|
+
}
|
|
46
|
+
</div>
|
|
47
|
+
@if (hasChildren()) {
|
|
48
|
+
<sd-collapse [open]="childrenOpen()">
|
|
49
|
+
<ng-content select="sd-list" />
|
|
50
|
+
</sd-collapse>
|
|
51
|
+
}
|
|
52
|
+
`,
|
|
53
|
+
styles: [
|
|
54
|
+
/* language=SCSS */ `
|
|
55
|
+
sd-list-item {
|
|
56
|
+
display: block;
|
|
57
|
+
|
|
58
|
+
> ._content {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
padding: var(--gap-sm) var(--gap-default);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
gap: var(--gap-sm);
|
|
64
|
+
|
|
65
|
+
> ._label {
|
|
66
|
+
flex: 1;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover > ._content {
|
|
71
|
+
background: var(--trans-lighter);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&[data-sd-selected="true"] > ._content {
|
|
75
|
+
background: var(--trans-lighter);
|
|
76
|
+
font-weight: bold;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&[data-sd-readonly="true"] {
|
|
80
|
+
> ._content {
|
|
81
|
+
cursor: default;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:hover > ._content {
|
|
85
|
+
background: transparent;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&[data-sd-layout="flat"] {
|
|
90
|
+
> ._content {
|
|
91
|
+
font-size: 0.85em;
|
|
92
|
+
opacity: 0.7;
|
|
93
|
+
cursor: default;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:hover > ._content {
|
|
97
|
+
background: transparent;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&[data-sd-has-children="false"] {
|
|
102
|
+
> ._content {
|
|
103
|
+
padding-left: calc(var(--gap-default) + var(--gap-sm) + 0.75em);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`,
|
|
108
|
+
],
|
|
109
|
+
host: {
|
|
110
|
+
"[attr.data-sd-layout]": "layout()",
|
|
111
|
+
"[attr.data-sd-selected]": "selected()",
|
|
112
|
+
"[attr.data-sd-readonly]": "readonly()",
|
|
113
|
+
"[attr.data-sd-has-children]": "hasChildren()",
|
|
114
|
+
},
|
|
115
|
+
})
|
|
116
|
+
export class SdListItemControl {
|
|
117
|
+
layout = input<"accordion" | "flat">("accordion");
|
|
118
|
+
open = model(false);
|
|
119
|
+
selected = input(false, { transform: booleanAttribute });
|
|
120
|
+
selectedIcon = input<string>();
|
|
121
|
+
readonly = input(false, { transform: booleanAttribute });
|
|
122
|
+
|
|
123
|
+
toolTpl = contentChild<TemplateRef<void>>("toolTpl");
|
|
124
|
+
|
|
125
|
+
private readonly _childLists = contentChildren(SdListControl);
|
|
126
|
+
|
|
127
|
+
hasChildren = computed(() => this._childLists().length > 0);
|
|
128
|
+
|
|
129
|
+
childrenOpen = computed(() => {
|
|
130
|
+
return this.layout() === "flat" ? true : this.open();
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
constructor() {
|
|
134
|
+
setupRipple(() => !this.readonly() && !(this.layout() === "flat" && this.hasChildren()));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
onContentClick(): void {
|
|
138
|
+
if (this.readonly()) return;
|
|
139
|
+
if (this.layout() === "accordion" && this.hasChildren()) {
|
|
140
|
+
this.open.update((v) => !v);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
booleanAttribute,
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
input,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: "sd-list",
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
encapsulation: ViewEncapsulation.None,
|
|
13
|
+
standalone: true,
|
|
14
|
+
imports: [],
|
|
15
|
+
template: `
|
|
16
|
+
<ng-content />
|
|
17
|
+
`,
|
|
18
|
+
styles: [
|
|
19
|
+
/* language=SCSS */ `
|
|
20
|
+
sd-list {
|
|
21
|
+
display: block;
|
|
22
|
+
user-select: none;
|
|
23
|
+
background: var(--control-color);
|
|
24
|
+
|
|
25
|
+
&[data-sd-inset="true"] {
|
|
26
|
+
background: transparent;
|
|
27
|
+
|
|
28
|
+
sd-list {
|
|
29
|
+
background: transparent;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
],
|
|
35
|
+
host: {
|
|
36
|
+
"[attr.data-sd-inset]": "inset()",
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
export class SdListControl {
|
|
40
|
+
inset = input(false, { transform: booleanAttribute });
|
|
41
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
booleanAttribute,
|
|
3
|
+
contentChild,
|
|
4
|
+
Directive,
|
|
5
|
+
input,
|
|
6
|
+
TemplateRef,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
|
|
9
|
+
@Directive({
|
|
10
|
+
selector: "sd-sheet-column",
|
|
11
|
+
standalone: true,
|
|
12
|
+
})
|
|
13
|
+
export class SdSheetColumnDirective {
|
|
14
|
+
key = input.required<string>();
|
|
15
|
+
header = input<string | string[]>("");
|
|
16
|
+
width = input<string>();
|
|
17
|
+
fixed = input(false, { transform: booleanAttribute });
|
|
18
|
+
hidden = input(false, { transform: booleanAttribute });
|
|
19
|
+
collapse = input(false, { transform: booleanAttribute });
|
|
20
|
+
disableSorting = input(false, { transform: booleanAttribute });
|
|
21
|
+
disableResizing = input(false, { transform: booleanAttribute });
|
|
22
|
+
ordering = input(0);
|
|
23
|
+
|
|
24
|
+
cellTplRef = contentChild<TemplateRef<void>>("cellTpl");
|
|
25
|
+
summaryTplRef = contentChild<TemplateRef<void>>("summaryTpl");
|
|
26
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
output,
|
|
7
|
+
signal,
|
|
8
|
+
ViewEncapsulation,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import type { ISdModal } from "../../overlay/modal/sd-modal.provider";
|
|
11
|
+
import type { ISdSheetConfig } from "./types";
|
|
12
|
+
import type { SdSheetColumnDirective } from "./sd-sheet-column.directive";
|
|
13
|
+
import { SdButtonControl } from "../../form/button/sd-button.control";
|
|
14
|
+
import { SdCheckboxControl } from "../../form/checkbox/sd-checkbox.control";
|
|
15
|
+
import { NgIcon } from "@ng-icons/core";
|
|
16
|
+
import { tablerArrowUp, tablerArrowDown } from "@ng-icons/tabler-icons";
|
|
17
|
+
|
|
18
|
+
interface IConfigItem {
|
|
19
|
+
key: string;
|
|
20
|
+
header: string;
|
|
21
|
+
fixed: boolean;
|
|
22
|
+
hidden: boolean;
|
|
23
|
+
width: string;
|
|
24
|
+
ordering: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
selector: "sd-sheet-config-modal",
|
|
29
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30
|
+
encapsulation: ViewEncapsulation.None,
|
|
31
|
+
standalone: true,
|
|
32
|
+
imports: [SdButtonControl, SdCheckboxControl, NgIcon],
|
|
33
|
+
template: `
|
|
34
|
+
<div class="_sd-sheet-config-modal">
|
|
35
|
+
<table class="_config-table">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>Fix</th>
|
|
39
|
+
<th>Order</th>
|
|
40
|
+
<th>Header</th>
|
|
41
|
+
<th>Width</th>
|
|
42
|
+
<th>Hidden</th>
|
|
43
|
+
</tr>
|
|
44
|
+
</thead>
|
|
45
|
+
<tbody>
|
|
46
|
+
@for (item of _items(); track item.key; let idx = $index) {
|
|
47
|
+
<tr>
|
|
48
|
+
<td>
|
|
49
|
+
<sd-checkbox
|
|
50
|
+
[value]="item.fixed"
|
|
51
|
+
(click)="onFixedToggle(idx)"
|
|
52
|
+
[inline]="true"
|
|
53
|
+
[inset]="true"
|
|
54
|
+
/>
|
|
55
|
+
</td>
|
|
56
|
+
<td class="_order-col">
|
|
57
|
+
<sd-button
|
|
58
|
+
[disabled]="!canMoveUp(idx)"
|
|
59
|
+
(click)="onMoveUp(idx)"
|
|
60
|
+
>
|
|
61
|
+
<ng-icon [svg]="_icons.tablerArrowUp" />
|
|
62
|
+
</sd-button>
|
|
63
|
+
<sd-button
|
|
64
|
+
[disabled]="!canMoveDown(idx)"
|
|
65
|
+
(click)="onMoveDown(idx)"
|
|
66
|
+
>
|
|
67
|
+
<ng-icon [svg]="_icons.tablerArrowDown" />
|
|
68
|
+
</sd-button>
|
|
69
|
+
</td>
|
|
70
|
+
<td>{{ item.header }}</td>
|
|
71
|
+
<td>
|
|
72
|
+
<input
|
|
73
|
+
type="text"
|
|
74
|
+
class="_width-input"
|
|
75
|
+
[value]="item.width"
|
|
76
|
+
(input)="onWidthChange(idx, $event)"
|
|
77
|
+
/>
|
|
78
|
+
</td>
|
|
79
|
+
<td>
|
|
80
|
+
<sd-checkbox
|
|
81
|
+
[value]="item.hidden"
|
|
82
|
+
(click)="onHiddenToggle(idx)"
|
|
83
|
+
[inline]="true"
|
|
84
|
+
[inset]="true"
|
|
85
|
+
/>
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
}
|
|
89
|
+
</tbody>
|
|
90
|
+
</table>
|
|
91
|
+
<div class="_actions">
|
|
92
|
+
<sd-button [theme]="'primary'" (click)="onOk()">OK</sd-button>
|
|
93
|
+
<sd-button (click)="onCancel()">Cancel</sd-button>
|
|
94
|
+
<sd-button (click)="onReset()">Reset</sd-button>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
`,
|
|
98
|
+
styles: [
|
|
99
|
+
/* language=SCSS */ `
|
|
100
|
+
sd-sheet-config-modal {
|
|
101
|
+
display: block;
|
|
102
|
+
padding: var(--gap-default);
|
|
103
|
+
|
|
104
|
+
> ._sd-sheet-config-modal {
|
|
105
|
+
> ._config-table {
|
|
106
|
+
width: 100%;
|
|
107
|
+
border-collapse: collapse;
|
|
108
|
+
margin-bottom: var(--gap-default);
|
|
109
|
+
|
|
110
|
+
th,
|
|
111
|
+
td {
|
|
112
|
+
border: 1px solid var(--trans-lighter);
|
|
113
|
+
padding: var(--gap-sm) var(--gap-default);
|
|
114
|
+
text-align: left;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
th {
|
|
118
|
+
background: var(--theme-secondary-lightest);
|
|
119
|
+
font-weight: bold;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
._order-col {
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
._width-input {
|
|
127
|
+
width: 80px;
|
|
128
|
+
padding: 2px 4px;
|
|
129
|
+
border: 1px solid var(--trans-lighter);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
> ._actions {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: flex-end;
|
|
136
|
+
gap: var(--gap-sm);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`,
|
|
141
|
+
],
|
|
142
|
+
})
|
|
143
|
+
export class SdSheetConfigModal implements ISdModal<ISdSheetConfig | undefined> {
|
|
144
|
+
initialized = signal(true);
|
|
145
|
+
close = output<ISdSheetConfig | undefined>();
|
|
146
|
+
|
|
147
|
+
controls = input.required<readonly SdSheetColumnDirective[]>();
|
|
148
|
+
config = input.required<ISdSheetConfig | undefined>();
|
|
149
|
+
|
|
150
|
+
_icons = { tablerArrowUp, tablerArrowDown };
|
|
151
|
+
|
|
152
|
+
private readonly _initialItems = computed((): IConfigItem[] => {
|
|
153
|
+
const cfg = this.config();
|
|
154
|
+
const controls = this.controls();
|
|
155
|
+
return controls
|
|
156
|
+
.map((ctrl): IConfigItem => {
|
|
157
|
+
const key = ctrl.key();
|
|
158
|
+
const cfgCol = cfg?.columnRecord[key];
|
|
159
|
+
return {
|
|
160
|
+
key,
|
|
161
|
+
header: Array.isArray(ctrl.header()) ? (ctrl.header() as string[]).join(" > ") : (ctrl.header() as string),
|
|
162
|
+
fixed: cfgCol?.fixed ?? ctrl.fixed(),
|
|
163
|
+
hidden: cfgCol?.hidden ?? ctrl.hidden(),
|
|
164
|
+
width: cfgCol?.width ?? ctrl.width() ?? "",
|
|
165
|
+
ordering: cfgCol?.ordering ?? ctrl.ordering(),
|
|
166
|
+
};
|
|
167
|
+
})
|
|
168
|
+
.sort((a, b) => a.ordering - b.ordering);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
private readonly _editItems = signal<IConfigItem[] | undefined>(undefined);
|
|
172
|
+
|
|
173
|
+
_items = computed((): IConfigItem[] => {
|
|
174
|
+
return this._editItems() ?? this._initialItems();
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
onFixedToggle(idx: number): void {
|
|
178
|
+
const items = [...this._items()];
|
|
179
|
+
items[idx] = { ...items[idx], fixed: !items[idx].fixed };
|
|
180
|
+
this._editItems.set(items);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
onHiddenToggle(idx: number): void {
|
|
184
|
+
const items = [...this._items()];
|
|
185
|
+
items[idx] = { ...items[idx], hidden: !items[idx].hidden };
|
|
186
|
+
this._editItems.set(items);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
onWidthChange(idx: number, event: Event): void {
|
|
190
|
+
const inputEl = event.target as HTMLInputElement;
|
|
191
|
+
const items = [...this._items()];
|
|
192
|
+
items[idx] = { ...items[idx], width: inputEl.value };
|
|
193
|
+
this._editItems.set(items);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
canMoveUp(idx: number): boolean {
|
|
197
|
+
if (idx <= 0) return false;
|
|
198
|
+
const items = this._items();
|
|
199
|
+
const current = items[idx];
|
|
200
|
+
const above = items[idx - 1];
|
|
201
|
+
// Cannot move non-fixed above fixed
|
|
202
|
+
if (!current.fixed && above.fixed) return false;
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
canMoveDown(idx: number): boolean {
|
|
207
|
+
const items = this._items();
|
|
208
|
+
if (idx >= items.length - 1) return false;
|
|
209
|
+
const current = items[idx];
|
|
210
|
+
const below = items[idx + 1];
|
|
211
|
+
// Cannot move fixed below non-fixed
|
|
212
|
+
if (current.fixed && !below.fixed) return false;
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
onMoveUp(idx: number): void {
|
|
217
|
+
if (!this.canMoveUp(idx)) return;
|
|
218
|
+
const items = [...this._items()];
|
|
219
|
+
[items[idx - 1], items[idx]] = [items[idx], items[idx - 1]];
|
|
220
|
+
this._editItems.set(items);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
onMoveDown(idx: number): void {
|
|
224
|
+
if (!this.canMoveDown(idx)) return;
|
|
225
|
+
const items = [...this._items()];
|
|
226
|
+
[items[idx], items[idx + 1]] = [items[idx + 1], items[idx]];
|
|
227
|
+
this._editItems.set(items);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
onOk(): void {
|
|
231
|
+
const items = this._items();
|
|
232
|
+
const columnRecord: ISdSheetConfig["columnRecord"] = {};
|
|
233
|
+
for (let i = 0; i < items.length; i++) {
|
|
234
|
+
const item = items[i];
|
|
235
|
+
columnRecord[item.key] = {
|
|
236
|
+
fixed: item.fixed,
|
|
237
|
+
hidden: item.hidden,
|
|
238
|
+
width: item.width !== "" ? item.width : undefined,
|
|
239
|
+
ordering: i,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
this.close.emit({ columnRecord });
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
onCancel(): void {
|
|
246
|
+
this.close.emit(undefined);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
onReset(): void {
|
|
250
|
+
this.close.emit({ columnRecord: {} });
|
|
251
|
+
}
|
|
252
|
+
}
|