@simplysm/angular 14.0.1 → 14.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/package.json +35 -17
- 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,430 @@
|
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, viewChild, ViewEncapsulation, } from "@angular/core";
|
|
2
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
3
|
+
import { SdDropdownControl } from "../../overlay/dropdown/sd-dropdown.control";
|
|
4
|
+
import { SdDropdownPopupControl } from "../../overlay/dropdown/sd-dropdown-popup.control";
|
|
5
|
+
import { SdSelectItemControl } from "./sd-select-item.control";
|
|
6
|
+
import { SdAnchorControl } from "../button/sd-anchor.control";
|
|
7
|
+
import { SdGapControl } from "../../layout/sd-gap.control";
|
|
8
|
+
import { SdItemOfTemplateDirective } from "../../../core/directives/sd-item-of-template.directive";
|
|
9
|
+
import { SdRippleDirective } from "../../../core/directives/sd-ripple.directive";
|
|
10
|
+
import { setupInvalid } from "../../../core/utils/setups/setupInvalid";
|
|
11
|
+
import { NgIcon } from "@ng-icons/core";
|
|
12
|
+
import { tablerCaretDown } from "@ng-icons/tabler-icons";
|
|
13
|
+
import { tabbable } from "tabbable";
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
const _c0 = ["headerTpl"];
|
|
16
|
+
const _c1 = ["beforeTpl"];
|
|
17
|
+
const _c2 = [[["sd-select-button"]], "*"];
|
|
18
|
+
const _c3 = ["sd-select-button", "*"];
|
|
19
|
+
const _c4 = (a0, a1, a2, a3) => ({ $implicit: a0, item: a1, index: a2, depth: a3 });
|
|
20
|
+
function SdSelectControl_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelement(0, "div", 4);
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
24
|
+
i0.ɵɵproperty("innerHTML", ctx_r1._selectedItemContentHTML(), i0.ɵɵsanitizeHtml);
|
|
25
|
+
} }
|
|
26
|
+
function SdSelectControl_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
28
|
+
i0.ɵɵtext(1);
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
} if (rf & 2) {
|
|
31
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵadvance();
|
|
33
|
+
i0.ɵɵtextInterpolate(ctx_r1.placeholder());
|
|
34
|
+
} }
|
|
35
|
+
function SdSelectControl_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelementStart(0, "span");
|
|
37
|
+
i0.ɵɵtext(1, "\u00A0");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
} }
|
|
40
|
+
function SdSelectControl_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
42
|
+
i0.ɵɵelement(1, "ng-icon", 9);
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
46
|
+
i0.ɵɵadvance();
|
|
47
|
+
i0.ɵɵproperty("svg", ctx_r1.tablerCaretDown);
|
|
48
|
+
} }
|
|
49
|
+
function SdSelectControl_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
i0.ɵɵprojection(0);
|
|
51
|
+
} }
|
|
52
|
+
function SdSelectControl_Conditional_10_ng_template_0_Template(rf, ctx) { }
|
|
53
|
+
function SdSelectControl_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
54
|
+
i0.ɵɵtemplate(0, SdSelectControl_Conditional_10_ng_template_0_Template, 0, 0, "ng-template", 7);
|
|
55
|
+
} if (rf & 2) {
|
|
56
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
57
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1._headerTpl());
|
|
58
|
+
} }
|
|
59
|
+
function SdSelectControl_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
60
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
61
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "sd-anchor", 10);
|
|
62
|
+
i0.ɵɵlistener("click", function SdSelectControl_Conditional_11_Template_sd_anchor_click_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectAll()); });
|
|
63
|
+
i0.ɵɵtext(2, "\uC804\uCCB4\uC120\uD0DD");
|
|
64
|
+
i0.ɵɵelementEnd();
|
|
65
|
+
i0.ɵɵelement(3, "sd-gap", 11);
|
|
66
|
+
i0.ɵɵelementStart(4, "sd-anchor", 12);
|
|
67
|
+
i0.ɵɵlistener("click", function SdSelectControl_Conditional_11_Template_sd_anchor_click_4_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onDeselectAll()); });
|
|
68
|
+
i0.ɵɵtext(5, "\uC804\uCCB4\uD574\uC81C");
|
|
69
|
+
i0.ɵɵelementEnd()();
|
|
70
|
+
} if (rf & 2) {
|
|
71
|
+
i0.ɵɵadvance(3);
|
|
72
|
+
i0.ɵɵproperty("width", "sm");
|
|
73
|
+
} }
|
|
74
|
+
function SdSelectControl_Conditional_12_ng_template_0_Template(rf, ctx) { }
|
|
75
|
+
function SdSelectControl_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
i0.ɵɵtemplate(0, SdSelectControl_Conditional_12_ng_template_0_Template, 0, 0, "ng-template", 7);
|
|
77
|
+
} if (rf & 2) {
|
|
78
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
79
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1._beforeTpl());
|
|
80
|
+
} }
|
|
81
|
+
function SdSelectControl_Conditional_13_For_1_ng_template_0_Template(rf, ctx) { }
|
|
82
|
+
function SdSelectControl_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
i0.ɵɵtemplate(0, SdSelectControl_Conditional_13_For_1_ng_template_0_Template, 0, 0, "ng-template", 13);
|
|
84
|
+
} if (rf & 2) {
|
|
85
|
+
const item_r4 = ctx.$implicit;
|
|
86
|
+
const tpl_r5 = i0.ɵɵnextContext();
|
|
87
|
+
i0.ɵɵproperty("ngTemplateOutlet", tpl_r5)("ngTemplateOutletContext", i0.ɵɵpureFunction4(2, _c4, item_r4.data, item_r4.data, item_r4.index, item_r4.depth));
|
|
88
|
+
} }
|
|
89
|
+
function SdSelectControl_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
+
i0.ɵɵrepeaterCreate(0, SdSelectControl_Conditional_13_For_1_Template, 1, 7, null, 13, i0.ɵɵrepeaterTrackByIdentity);
|
|
91
|
+
} if (rf & 2) {
|
|
92
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
93
|
+
i0.ɵɵrepeater(ctx_r1._flatItems());
|
|
94
|
+
} }
|
|
95
|
+
function SdSelectControl_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
i0.ɵɵprojection(0, 1);
|
|
97
|
+
} }
|
|
98
|
+
export class SdSelectControl {
|
|
99
|
+
selectMode = input("single", ...(ngDevMode ? [{ debugName: "selectMode" }] : /* istanbul ignore next */ []));
|
|
100
|
+
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
101
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
102
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
103
|
+
inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
104
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
105
|
+
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
106
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
107
|
+
hideSelectAll = input(false, { ...(ngDevMode ? { debugName: "hideSelectAll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
108
|
+
multiSelectionDisplayDirection = input(...(ngDevMode ? [undefined, { debugName: "multiSelectionDisplayDirection" }] : /* istanbul ignore next */ []));
|
|
109
|
+
items = input(...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
110
|
+
getChildrenFn = input(...(ngDevMode ? [undefined, { debugName: "getChildrenFn" }] : /* istanbul ignore next */ []));
|
|
111
|
+
contentClass = input(...(ngDevMode ? [undefined, { debugName: "contentClass" }] : /* istanbul ignore next */ []));
|
|
112
|
+
contentStyle = input(...(ngDevMode ? [undefined, { debugName: "contentStyle" }] : /* istanbul ignore next */ []));
|
|
113
|
+
dropdownOpen = signal(false, ...(ngDevMode ? [{ debugName: "dropdownOpen" }] : /* istanbul ignore next */ []));
|
|
114
|
+
tablerCaretDown = tablerCaretDown;
|
|
115
|
+
_itemControls = contentChildren(SdSelectItemControl, ...(ngDevMode ? [{ debugName: "_itemControls" }] : /* istanbul ignore next */ []));
|
|
116
|
+
_dropdownControl = viewChild.required(SdDropdownControl);
|
|
117
|
+
_dropdownElRef = viewChild.required(SdDropdownControl, { read: ElementRef });
|
|
118
|
+
_headerTpl = contentChild("headerTpl", ...(ngDevMode ? [{ debugName: "_headerTpl" }] : /* istanbul ignore next */ []));
|
|
119
|
+
_beforeTpl = contentChild("beforeTpl", ...(ngDevMode ? [{ debugName: "_beforeTpl" }] : /* istanbul ignore next */ []));
|
|
120
|
+
_itemOfTpl = contentChild(SdItemOfTemplateDirective, { ...(ngDevMode ? { debugName: "_itemOfTpl" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
121
|
+
_selectedItemContentHTML = signal(undefined, ...(ngDevMode ? [{ debugName: "_selectedItemContentHTML" }] : /* istanbul ignore next */ []));
|
|
122
|
+
_flatItems = signal([], ...(ngDevMode ? [{ debugName: "_flatItems" }] : /* istanbul ignore next */ []));
|
|
123
|
+
constructor() {
|
|
124
|
+
// Required validation
|
|
125
|
+
setupInvalid(() => {
|
|
126
|
+
if (!this.required())
|
|
127
|
+
return "";
|
|
128
|
+
const v = this.value();
|
|
129
|
+
if (v == null)
|
|
130
|
+
return "선택된 항목이 없습니다.";
|
|
131
|
+
if (Array.isArray(v) && v.length === 0)
|
|
132
|
+
return "선택된 항목이 없습니다.";
|
|
133
|
+
return "";
|
|
134
|
+
});
|
|
135
|
+
// Flatten items array (with hierarchy support)
|
|
136
|
+
effect(() => {
|
|
137
|
+
const items = this.items();
|
|
138
|
+
if (items == null) {
|
|
139
|
+
this._flatItems.set([]);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const getChildren = this.getChildrenFn();
|
|
143
|
+
const flat = [];
|
|
144
|
+
let index = 0;
|
|
145
|
+
const walk = (list, depth) => {
|
|
146
|
+
for (const item of list) {
|
|
147
|
+
flat.push({ data: item, index: index++, depth });
|
|
148
|
+
if (getChildren !== undefined) {
|
|
149
|
+
const children = getChildren(item);
|
|
150
|
+
if (children !== undefined) {
|
|
151
|
+
walk(children, depth + 1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
walk(items, 0);
|
|
157
|
+
this._flatItems.set(flat);
|
|
158
|
+
});
|
|
159
|
+
// D3: contentClass/contentStyle via effect() on popup element
|
|
160
|
+
// + D4: keyboard navigation via tabbable()
|
|
161
|
+
effect((onCleanup) => {
|
|
162
|
+
if (this.dropdownOpen()) {
|
|
163
|
+
const popupEl = this._dropdownControl().popupElRef().nativeElement;
|
|
164
|
+
const cls = this.contentClass();
|
|
165
|
+
const addedClasses = [];
|
|
166
|
+
if (cls !== undefined) {
|
|
167
|
+
for (const c of cls.split(" ").filter(Boolean)) {
|
|
168
|
+
popupEl.classList.add(c);
|
|
169
|
+
addedClasses.push(c);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const style = this.contentStyle();
|
|
173
|
+
const addedStyleProps = [];
|
|
174
|
+
if (style !== undefined) {
|
|
175
|
+
const tempEl = document.createElement("div");
|
|
176
|
+
tempEl.style.cssText = style;
|
|
177
|
+
for (let i = 0; i < tempEl.style.length; i++) {
|
|
178
|
+
const prop = tempEl.style[i];
|
|
179
|
+
addedStyleProps.push(prop);
|
|
180
|
+
popupEl.style.setProperty(prop, tempEl.style.getPropertyValue(prop));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const onKeydown = (event) => {
|
|
184
|
+
if (event.ctrlKey || event.altKey)
|
|
185
|
+
return;
|
|
186
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
event.stopPropagation();
|
|
189
|
+
const focusableEls = tabbable(popupEl);
|
|
190
|
+
if (focusableEls.length === 0)
|
|
191
|
+
return;
|
|
192
|
+
const currIndex = focusableEls.indexOf(document.activeElement);
|
|
193
|
+
if (event.key === "ArrowDown") {
|
|
194
|
+
const nextIndex = currIndex + 1;
|
|
195
|
+
if (nextIndex < focusableEls.length) {
|
|
196
|
+
focusableEls[nextIndex].focus();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
// ArrowUp
|
|
201
|
+
if (currIndex <= 0) {
|
|
202
|
+
// Return focus to dropdown trigger
|
|
203
|
+
this._dropdownElRef().nativeElement.focus();
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
focusableEls[currIndex - 1].focus();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
popupEl.addEventListener("keydown", onKeydown);
|
|
212
|
+
onCleanup(() => {
|
|
213
|
+
popupEl.removeEventListener("keydown", onKeydown);
|
|
214
|
+
for (const c of addedClasses) {
|
|
215
|
+
popupEl.classList.remove(c);
|
|
216
|
+
}
|
|
217
|
+
for (const prop of addedStyleProps) {
|
|
218
|
+
popupEl.style.removeProperty(prop);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
// Mirror selected item's contentHTML to the trigger display area
|
|
224
|
+
effect(() => {
|
|
225
|
+
const items = this._itemControls();
|
|
226
|
+
const currentValue = this.value();
|
|
227
|
+
if (currentValue == null) {
|
|
228
|
+
this._selectedItemContentHTML.set(undefined);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (this.selectMode() === "multi") {
|
|
232
|
+
const arr = currentValue;
|
|
233
|
+
if (arr.length === 0) {
|
|
234
|
+
this._selectedItemContentHTML.set(undefined);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const separator = this.multiSelectionDisplayDirection() === "vertical" ? "<br>" : ", ";
|
|
238
|
+
const htmlParts = [];
|
|
239
|
+
for (const item of items) {
|
|
240
|
+
if (arr.includes(item.value())) {
|
|
241
|
+
const html = item.contentHTML();
|
|
242
|
+
if (html !== "") {
|
|
243
|
+
htmlParts.push(html);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (htmlParts.length > 0) {
|
|
248
|
+
this._selectedItemContentHTML.set(htmlParts.join(separator));
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
this._selectedItemContentHTML.set(undefined);
|
|
252
|
+
}
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
for (const item of items) {
|
|
256
|
+
if (item.value() === currentValue) {
|
|
257
|
+
const html = item.contentHTML();
|
|
258
|
+
if (html !== "") {
|
|
259
|
+
this._selectedItemContentHTML.set(html);
|
|
260
|
+
}
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
this._selectedItemContentHTML.set(undefined);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
selectItem(itemValue) {
|
|
268
|
+
this._setOrToggle(itemValue);
|
|
269
|
+
if (this.selectMode() === "single") {
|
|
270
|
+
this.closeDropdown();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
toggleItem(itemValue) {
|
|
274
|
+
this._setOrToggle(itemValue);
|
|
275
|
+
}
|
|
276
|
+
_setOrToggle(itemValue) {
|
|
277
|
+
if (this.selectMode() === "single") {
|
|
278
|
+
this.value.set(itemValue);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
this.value.update((v) => {
|
|
282
|
+
const arr = v ?? [];
|
|
283
|
+
if (arr.includes(itemValue)) {
|
|
284
|
+
return arr.filter((item) => item !== itemValue);
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return [...arr, itemValue];
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
onSelectAll() {
|
|
293
|
+
const items = this._itemControls();
|
|
294
|
+
const values = items
|
|
295
|
+
.filter((item) => !item.disabled() && !item.hidden())
|
|
296
|
+
.map((item) => item.value());
|
|
297
|
+
this.value.set(values);
|
|
298
|
+
}
|
|
299
|
+
onDeselectAll() {
|
|
300
|
+
this.value.set([]);
|
|
301
|
+
}
|
|
302
|
+
closeDropdown() {
|
|
303
|
+
this.dropdownOpen.set(false);
|
|
304
|
+
}
|
|
305
|
+
openDropdown() {
|
|
306
|
+
if (this.disabled())
|
|
307
|
+
return;
|
|
308
|
+
this.dropdownOpen.set(true);
|
|
309
|
+
}
|
|
310
|
+
static ɵfac = function SdSelectControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdSelectControl)(); };
|
|
311
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdSelectControl, selectors: [["sd-select"]], contentQueries: function SdSelectControl_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
312
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx._itemControls, SdSelectItemControl, 4)(dirIndex, ctx._headerTpl, _c0, 5)(dirIndex, ctx._beforeTpl, _c1, 5)(dirIndex, ctx._itemOfTpl, SdItemOfTemplateDirective, 5, TemplateRef);
|
|
313
|
+
} if (rf & 2) {
|
|
314
|
+
i0.ɵɵqueryAdvance(4);
|
|
315
|
+
} }, viewQuery: function SdSelectControl_Query(rf, ctx) { if (rf & 1) {
|
|
316
|
+
i0.ɵɵviewQuerySignal(ctx._dropdownControl, SdDropdownControl, 5)(ctx._dropdownElRef, SdDropdownControl, 5, ElementRef);
|
|
317
|
+
} if (rf & 2) {
|
|
318
|
+
i0.ɵɵqueryAdvance(2);
|
|
319
|
+
} }, hostVars: 4, hostBindings: function SdSelectControl_HostBindings(rf, ctx) { if (rf & 2) {
|
|
320
|
+
i0.ɵɵattribute("data-sd-size", ctx.size())("data-sd-inline", ctx.inline())("data-sd-inset", ctx.inset())("data-sd-disabled", ctx.disabled());
|
|
321
|
+
} }, inputs: { selectMode: [1, "selectMode"], value: [1, "value"], placeholder: [1, "placeholder"], disabled: [1, "disabled"], inline: [1, "inline"], inset: [1, "inset"], size: [1, "size"], required: [1, "required"], hideSelectAll: [1, "hideSelectAll"], multiSelectionDisplayDirection: [1, "multiSelectionDisplayDirection"], items: [1, "items"], getChildrenFn: [1, "getChildrenFn"], contentClass: [1, "contentClass"], contentStyle: [1, "contentStyle"] }, outputs: { value: "valueChange" }, ngContentSelectors: _c3, decls: 15, vars: 10, consts: [["contentEl", ""], [3, "openChange", "disabled", "open"], [1, "_sd-select-control", 3, "sd-ripple"], [1, "_sd-select-control-content"], [3, "innerHTML"], [1, "tx-trans-lighter"], [1, "_sd-select-control-icon"], [3, "ngTemplateOutlet"], [1, "_sd-select-all-bar"], [3, "svg"], ["data-sd-select-all", "", 3, "click"], [3, "width"], ["data-sd-deselect-all", "", 3, "click"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function SdSelectControl_Template(rf, ctx) { if (rf & 1) {
|
|
322
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
323
|
+
i0.ɵɵprojectionDef(_c2);
|
|
324
|
+
i0.ɵɵelementStart(0, "sd-dropdown", 1);
|
|
325
|
+
i0.ɵɵtwoWayListener("openChange", function SdSelectControl_Template_sd_dropdown_openChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.dropdownOpen, $event) || (ctx.dropdownOpen = $event); return i0.ɵɵresetView($event); });
|
|
326
|
+
i0.ɵɵelementStart(1, "div", 2)(2, "div", 3, 0);
|
|
327
|
+
i0.ɵɵconditionalCreate(4, SdSelectControl_Conditional_4_Template, 1, 1, "div", 4)(5, SdSelectControl_Conditional_5_Template, 2, 1, "span", 5)(6, SdSelectControl_Conditional_6_Template, 2, 0, "span");
|
|
328
|
+
i0.ɵɵelementEnd();
|
|
329
|
+
i0.ɵɵconditionalCreate(7, SdSelectControl_Conditional_7_Template, 2, 1, "div", 6);
|
|
330
|
+
i0.ɵɵelementEnd();
|
|
331
|
+
i0.ɵɵconditionalCreate(8, SdSelectControl_Conditional_8_Template, 1, 0);
|
|
332
|
+
i0.ɵɵelementStart(9, "sd-dropdown-popup");
|
|
333
|
+
i0.ɵɵconditionalCreate(10, SdSelectControl_Conditional_10_Template, 1, 1, null, 7);
|
|
334
|
+
i0.ɵɵconditionalCreate(11, SdSelectControl_Conditional_11_Template, 6, 1, "div", 8);
|
|
335
|
+
i0.ɵɵconditionalCreate(12, SdSelectControl_Conditional_12_Template, 1, 1, null, 7);
|
|
336
|
+
i0.ɵɵconditionalCreate(13, SdSelectControl_Conditional_13_Template, 2, 0)(14, SdSelectControl_Conditional_14_Template, 1, 0);
|
|
337
|
+
i0.ɵɵelementEnd()();
|
|
338
|
+
} if (rf & 2) {
|
|
339
|
+
let tmp_10_0;
|
|
340
|
+
i0.ɵɵproperty("disabled", ctx.disabled());
|
|
341
|
+
i0.ɵɵtwoWayProperty("open", ctx.dropdownOpen);
|
|
342
|
+
i0.ɵɵadvance();
|
|
343
|
+
i0.ɵɵproperty("sd-ripple", !ctx.disabled());
|
|
344
|
+
i0.ɵɵadvance(3);
|
|
345
|
+
i0.ɵɵconditional(ctx._selectedItemContentHTML() !== undefined ? 4 : ctx.placeholder() ? 5 : 6);
|
|
346
|
+
i0.ɵɵadvance(3);
|
|
347
|
+
i0.ɵɵconditional(!ctx.disabled() ? 7 : -1);
|
|
348
|
+
i0.ɵɵadvance();
|
|
349
|
+
i0.ɵɵconditional(!ctx.disabled() ? 8 : -1);
|
|
350
|
+
i0.ɵɵadvance(2);
|
|
351
|
+
i0.ɵɵconditional(ctx._headerTpl() ? 10 : -1);
|
|
352
|
+
i0.ɵɵadvance();
|
|
353
|
+
i0.ɵɵconditional(ctx.selectMode() === "multi" && !ctx.hideSelectAll() ? 11 : -1);
|
|
354
|
+
i0.ɵɵadvance();
|
|
355
|
+
i0.ɵɵconditional(ctx._beforeTpl() ? 12 : -1);
|
|
356
|
+
i0.ɵɵadvance();
|
|
357
|
+
i0.ɵɵconditional((tmp_10_0 = ctx._itemOfTpl()) ? 13 : 14, tmp_10_0);
|
|
358
|
+
} }, dependencies: [SdDropdownControl,
|
|
359
|
+
SdDropdownPopupControl,
|
|
360
|
+
SdAnchorControl,
|
|
361
|
+
SdGapControl,
|
|
362
|
+
NgTemplateOutlet,
|
|
363
|
+
SdRippleDirective,
|
|
364
|
+
NgIcon], styles: ["sd-select {\n display: block;\n position: relative;\n}\nsd-select > sd-dropdown > ._sd-select-control {\n display: block;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid transparent;\n font-size: var(--font-size-default);\n font-family: var(--font-family);\n font-variant-numeric: tabular-nums;\n line-height: var(--line-height);\n color: var(--text-trans-default);\n display: flex;\n align-items: center;\n cursor: pointer;\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n background: var(--theme-secondary-lightest);\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-content {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n margin-left: var(--gap-sm);\n opacity: 0.3;\n}\nsd-select > sd-dropdown:focus-within > ._sd-select-control {\n border-color: var(--theme-secondary-default);\n}\nsd-select[data-sd-size=sm] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-xs) var(--gap-sm);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-default) var(--gap-lg);\n}\nsd-select[data-sd-inline=true] {\n display: inline-block;\n width: auto;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control {\n border: none;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control:focus-within {\n outline: 1px solid var(--theme-primary-default);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n background: var(--trans-lighter);\n cursor: default;\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n display: none;\n}\n\n._sd-select-all-bar {\n display: flex;\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--border-color-light);\n}"], encapsulation: 2, changeDetection: 0 });
|
|
365
|
+
}
|
|
366
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdSelectControl, [{
|
|
367
|
+
type: Component,
|
|
368
|
+
args: [{ selector: "sd-select", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
|
|
369
|
+
SdDropdownControl,
|
|
370
|
+
SdDropdownPopupControl,
|
|
371
|
+
SdAnchorControl,
|
|
372
|
+
SdGapControl,
|
|
373
|
+
NgTemplateOutlet,
|
|
374
|
+
SdRippleDirective,
|
|
375
|
+
NgIcon,
|
|
376
|
+
], template: `
|
|
377
|
+
<sd-dropdown [disabled]="disabled()" [(open)]="dropdownOpen">
|
|
378
|
+
<div class="_sd-select-control" [sd-ripple]="!disabled()">
|
|
379
|
+
<div class="_sd-select-control-content" #contentEl>
|
|
380
|
+
@if (_selectedItemContentHTML() !== undefined) {
|
|
381
|
+
<div [innerHTML]="_selectedItemContentHTML()"></div>
|
|
382
|
+
} @else if (placeholder()) {
|
|
383
|
+
<span class="tx-trans-lighter">{{ placeholder() }}</span>
|
|
384
|
+
} @else {
|
|
385
|
+
<span> </span>
|
|
386
|
+
}
|
|
387
|
+
</div>
|
|
388
|
+
@if (!disabled()) {
|
|
389
|
+
<div class="_sd-select-control-icon">
|
|
390
|
+
<ng-icon [svg]="tablerCaretDown" />
|
|
391
|
+
</div>
|
|
392
|
+
}
|
|
393
|
+
</div>
|
|
394
|
+
@if (!disabled()) {
|
|
395
|
+
<ng-content select="sd-select-button" />
|
|
396
|
+
}
|
|
397
|
+
<sd-dropdown-popup>
|
|
398
|
+
@if (_headerTpl()) {
|
|
399
|
+
<ng-template [ngTemplateOutlet]="_headerTpl()!" />
|
|
400
|
+
}
|
|
401
|
+
@if (selectMode() === "multi" && !hideSelectAll()) {
|
|
402
|
+
<div class="_sd-select-all-bar">
|
|
403
|
+
<sd-anchor data-sd-select-all (click)="onSelectAll()">전체선택</sd-anchor>
|
|
404
|
+
<sd-gap [width]="'sm'" />
|
|
405
|
+
<sd-anchor data-sd-deselect-all (click)="onDeselectAll()">전체해제</sd-anchor>
|
|
406
|
+
</div>
|
|
407
|
+
}
|
|
408
|
+
@if (_beforeTpl()) {
|
|
409
|
+
<ng-template [ngTemplateOutlet]="_beforeTpl()!" />
|
|
410
|
+
}
|
|
411
|
+
@if (_itemOfTpl(); as tpl) {
|
|
412
|
+
@for (item of _flatItems(); track item) {
|
|
413
|
+
<ng-template
|
|
414
|
+
[ngTemplateOutlet]="tpl"
|
|
415
|
+
[ngTemplateOutletContext]="{ $implicit: item.data, item: item.data, index: item.index, depth: item.depth }"
|
|
416
|
+
/>
|
|
417
|
+
}
|
|
418
|
+
} @else {
|
|
419
|
+
<ng-content />
|
|
420
|
+
}
|
|
421
|
+
</sd-dropdown-popup>
|
|
422
|
+
</sd-dropdown>
|
|
423
|
+
`, host: {
|
|
424
|
+
"[attr.data-sd-size]": "size()",
|
|
425
|
+
"[attr.data-sd-inline]": "inline()",
|
|
426
|
+
"[attr.data-sd-inset]": "inset()",
|
|
427
|
+
"[attr.data-sd-disabled]": "disabled()",
|
|
428
|
+
}, styles: ["sd-select {\n display: block;\n position: relative;\n}\nsd-select > sd-dropdown > ._sd-select-control {\n display: block;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid transparent;\n font-size: var(--font-size-default);\n font-family: var(--font-family);\n font-variant-numeric: tabular-nums;\n line-height: var(--line-height);\n color: var(--text-trans-default);\n display: flex;\n align-items: center;\n cursor: pointer;\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n background: var(--theme-secondary-lightest);\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-content {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n margin-left: var(--gap-sm);\n opacity: 0.3;\n}\nsd-select > sd-dropdown:focus-within > ._sd-select-control {\n border-color: var(--theme-secondary-default);\n}\nsd-select[data-sd-size=sm] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-xs) var(--gap-sm);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-default) var(--gap-lg);\n}\nsd-select[data-sd-inline=true] {\n display: inline-block;\n width: auto;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control {\n border: none;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control:focus-within {\n outline: 1px solid var(--theme-primary-default);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n background: var(--trans-lighter);\n cursor: default;\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n display: none;\n}\n\n._sd-select-all-bar {\n display: flex;\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--border-color-light);\n}"] }]
|
|
429
|
+
}], () => [], { selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hideSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideSelectAll", required: false }] }], multiSelectionDisplayDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelectionDisplayDirection", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], _itemControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSelectItemControl), { isSignal: true }] }], _dropdownControl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { isSignal: true }] }], _dropdownElRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { ...{ read: ElementRef }, isSignal: true }] }], _headerTpl: [{ type: i0.ContentChild, args: ["headerTpl", { isSignal: true }] }], _beforeTpl: [{ type: i0.ContentChild, args: ["beforeTpl", { isSignal: true }] }], _itemOfTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdItemOfTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
|
|
430
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelectControl, { className: "SdSelectControl", filePath: "packages/angular/src/ui/form/select/sd-select.control.ts", lineNumber: 178 }); })();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { SdDockControl } from "./sd-dock.control";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdDockContainerControl {
|
|
5
|
+
dockControls: import("@angular/core").Signal<readonly SdDockControl[]>;
|
|
6
|
+
contentElRef: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
|
|
7
|
+
contentClass: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
constructor();
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdDockContainerControl, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdDockContainerControl, "sd-dock-container", never, { "contentClass": { "alias": "contentClass"; "required": false; "isSignal": true; }; }, {}, ["dockControls"], ["*"], true, never>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=sd-dock-container.control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-dock-container.control.d.ts","sourceRoot":"","sources":["..\\..\\..\\..\\src\\ui\\layout\\dock\\sd-dock-container.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,UAAU,EAIX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;AAElD,qBAyBa,sBAAsB;IACjC,YAAY,2DAAkC;IAE9C,YAAY,6DAET;IAEH,YAAY,0DAAmB;;yCAPpB,sBAAsB;2CAAtB,sBAAsB;CA8DlC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, contentChildren, effect, ElementRef, input, viewChild, ViewEncapsulation, } from "@angular/core";
|
|
2
|
+
import { SdDockControl } from "./sd-dock.control";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["content"];
|
|
5
|
+
const _c1 = ["*"];
|
|
6
|
+
const _c2 = a0 => ["_content", a0];
|
|
7
|
+
const arrowFn0 = (ctx, view) => v => v != null;
|
|
8
|
+
export class SdDockContainerControl {
|
|
9
|
+
dockControls = contentChildren(SdDockControl, ...(ngDevMode ? [{ debugName: "dockControls" }] : /* istanbul ignore next */ []));
|
|
10
|
+
contentElRef = viewChild.required("content", {
|
|
11
|
+
read: ElementRef,
|
|
12
|
+
});
|
|
13
|
+
contentClass = input(...(ngDevMode ? [undefined, { debugName: "contentClass" }] : /* istanbul ignore next */ []));
|
|
14
|
+
constructor() {
|
|
15
|
+
effect(() => {
|
|
16
|
+
let top = 0;
|
|
17
|
+
let left = 0;
|
|
18
|
+
let bottom = 0;
|
|
19
|
+
let right = 0;
|
|
20
|
+
for (const dockControl of this.dockControls()) {
|
|
21
|
+
const position = dockControl.position();
|
|
22
|
+
const size = dockControl.size();
|
|
23
|
+
if (position === "top") {
|
|
24
|
+
dockControl.assignStyle({
|
|
25
|
+
top: top + "px",
|
|
26
|
+
bottom: "",
|
|
27
|
+
left: left + "px",
|
|
28
|
+
right: right + "px",
|
|
29
|
+
});
|
|
30
|
+
top += size;
|
|
31
|
+
}
|
|
32
|
+
else if (position === "bottom") {
|
|
33
|
+
dockControl.assignStyle({
|
|
34
|
+
top: "",
|
|
35
|
+
bottom: bottom + "px",
|
|
36
|
+
left: left + "px",
|
|
37
|
+
right: right + "px",
|
|
38
|
+
});
|
|
39
|
+
bottom += size;
|
|
40
|
+
}
|
|
41
|
+
else if (position === "left") {
|
|
42
|
+
dockControl.assignStyle({
|
|
43
|
+
top: top + "px",
|
|
44
|
+
bottom: bottom + "px",
|
|
45
|
+
left: left + "px",
|
|
46
|
+
right: "",
|
|
47
|
+
});
|
|
48
|
+
left += size;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
dockControl.assignStyle({
|
|
52
|
+
top: top + "px",
|
|
53
|
+
bottom: bottom + "px",
|
|
54
|
+
left: "",
|
|
55
|
+
right: right + "px",
|
|
56
|
+
});
|
|
57
|
+
right += size;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Object.assign(this.contentElRef().nativeElement.style, {
|
|
61
|
+
paddingTop: top + "px",
|
|
62
|
+
paddingBottom: bottom + "px",
|
|
63
|
+
paddingRight: right + "px",
|
|
64
|
+
paddingLeft: left + "px",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
static ɵfac = function SdDockContainerControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdDockContainerControl)(); };
|
|
69
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdDockContainerControl, selectors: [["sd-dock-container"]], contentQueries: function SdDockContainerControl_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
70
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.dockControls, SdDockControl, 4);
|
|
71
|
+
} if (rf & 2) {
|
|
72
|
+
i0.ɵɵqueryAdvance();
|
|
73
|
+
} }, viewQuery: function SdDockContainerControl_Query(rf, ctx) { if (rf & 1) {
|
|
74
|
+
i0.ɵɵviewQuerySignal(ctx.contentElRef, _c0, 5, ElementRef);
|
|
75
|
+
} if (rf & 2) {
|
|
76
|
+
i0.ɵɵqueryAdvance();
|
|
77
|
+
} }, inputs: { contentClass: [1, "contentClass"] }, ngContentSelectors: _c1, decls: 3, vars: 5, consts: [["content", ""]], template: function SdDockContainerControl_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵprojectionDef();
|
|
79
|
+
i0.ɵɵdomElementStart(0, "div", null, 0);
|
|
80
|
+
i0.ɵɵprojection(2);
|
|
81
|
+
i0.ɵɵdomElementEnd();
|
|
82
|
+
} if (rf & 2) {
|
|
83
|
+
i0.ɵɵclassMap(i0.ɵɵpureFunction1(3, _c2, ctx.contentClass()).filter(i0.ɵɵarrowFunction(2, arrowFn0, ctx)).join(" "));
|
|
84
|
+
} }, styles: ["sd-dock-container {\n display: block;\n height: 100%;\n}\nsd-dock-container > ._content {\n position: relative;\n height: 100%;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
85
|
+
}
|
|
86
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdDockContainerControl, [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{ selector: "sd-dock-container", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [], template: `
|
|
89
|
+
<div #content [class]="['_content', contentClass()].filter(v => v != null).join(' ')">
|
|
90
|
+
<ng-content />
|
|
91
|
+
</div>
|
|
92
|
+
`, styles: ["sd-dock-container {\n display: block;\n height: 100%;\n}\nsd-dock-container > ._content {\n position: relative;\n height: 100%;\n}"] }]
|
|
93
|
+
}], () => [], { dockControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdDockControl), { isSignal: true }] }], contentElRef: [{ type: i0.ViewChild, args: ["content", { ...{
|
|
94
|
+
read: ElementRef,
|
|
95
|
+
}, isSignal: true }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }] }); })();
|
|
96
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdDockContainerControl, { className: "SdDockContainerControl", filePath: "packages/angular/src/ui/layout/dock/sd-dock-container.control.ts", lineNumber: 38 }); })();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ISdResizeEvent } from "../../../core/plugins/events/sd-resize-event.plugin";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdDockControl {
|
|
4
|
+
private readonly _elRef;
|
|
5
|
+
key: import("@angular/core").InputSignal<string | undefined>;
|
|
6
|
+
position: import("@angular/core").InputSignal<"bottom" | "left" | "right" | "top">;
|
|
7
|
+
resizable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
8
|
+
size: import("@angular/core").WritableSignal<number>;
|
|
9
|
+
private readonly _config;
|
|
10
|
+
constructor();
|
|
11
|
+
assignStyle(style: Partial<CSSStyleDeclaration>): void;
|
|
12
|
+
onHostResize(event: ISdResizeEvent): void;
|
|
13
|
+
onResizeBarMousedown(event: MouseEvent): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdDockControl, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdDockControl, "sd-dock", never, { "key": { "alias": "key"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=sd-dock.control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-dock.control.d.ts","sourceRoot":"","sources":["..\\..\\..\\..\\src\\ui\\layout\\dock\\sd-dock.control.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;;AAE1F,qBAyEa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAE1D,GAAG,0DAAmB;IACtB,QAAQ,2EAAqD;IAC7D,SAAS,qEAAiD;IAE1D,IAAI,iDAAa;IAEjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmE;;IAgB3F,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAI/C,YAAY,CAAC,KAAK,EAAE,cAAc;IASlC,oBAAoB,CAAC,KAAK,EAAE,UAAU;yCAtC3B,aAAa;2CAAb,aAAa;CAmFzB"}
|