@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,846 @@
|
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChildren, DestroyRef, inject, input, model, output, signal, ViewEncapsulation, } from "@angular/core";
|
|
2
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
3
|
+
import { SdSheetColumnDirective } from "./sd-sheet-column.directive";
|
|
4
|
+
import { SdCheckboxControl } from "../../form/checkbox/sd-checkbox.control";
|
|
5
|
+
import { NgIcon } from "@ng-icons/core";
|
|
6
|
+
import { tablerArrowUp, tablerArrowDown, tablerChevronRight, tablerChevronDown, tablerChevronsRight, tablerChevronsDown, tablerSettings, } from "@ng-icons/tabler-icons";
|
|
7
|
+
import { useSheetLayoutEngine } from "./useSheetLayoutEngine";
|
|
8
|
+
import { useSheetColumnFixing } from "./useSheetColumnFixing";
|
|
9
|
+
import { useSelectionManager } from "../../../core/utils/useSelectionManager";
|
|
10
|
+
import { useSortingManager } from "../../../core/utils/useSortingManager";
|
|
11
|
+
import { useExpandingManager } from "../../../core/utils/useExpandingManager";
|
|
12
|
+
import { SdPaginationControl } from "../../navigation/pagination/sd-pagination.control";
|
|
13
|
+
import { SdAnchorControl } from "../../form/button/sd-anchor.control";
|
|
14
|
+
import { SdButtonControl } from "../../form/button/sd-button.control";
|
|
15
|
+
import { useSdSystemConfigResource } from "../../../core/utils/useSdSystemConfigResource";
|
|
16
|
+
import { useSheetDomAccessor } from "./useSheetDomAccessor";
|
|
17
|
+
import { useSheetCellAgent } from "./useSheetCellAgent";
|
|
18
|
+
import { SdModalProvider } from "../../overlay/modal/sd-modal.provider";
|
|
19
|
+
import { SdSheetConfigModal } from "./sd-sheet-config.modal";
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
21
|
+
const _c0 = (a0, a1) => ({ r: a0, c: a1 });
|
|
22
|
+
const _c1 = (a0, a1, a2, a3, a4) => ({ $implicit: a0, item: a1, index: a2, depth: a3, edit: a4 });
|
|
23
|
+
function _forTrack0($index, $item) { return this.trackByFn() ? this.trackByFn()($item, $index) : $index; }
|
|
24
|
+
const _forTrack1 = ($index, $item) => $item.key;
|
|
25
|
+
function SdSheetControl_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
27
|
+
i0.ɵɵelementStart(0, "sd-button", 5);
|
|
28
|
+
i0.ɵɵlistener("click", function SdSheetControl_Conditional_0_Conditional_1_Template_sd_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConfigButtonClick()); });
|
|
29
|
+
i0.ɵɵelement(1, "ng-icon", 6);
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
33
|
+
i0.ɵɵadvance();
|
|
34
|
+
i0.ɵɵproperty("svg", ctx_r1.icons.tablerSettings);
|
|
35
|
+
} }
|
|
36
|
+
function SdSheetControl_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
38
|
+
i0.ɵɵelementStart(0, "sd-pagination", 7);
|
|
39
|
+
i0.ɵɵtwoWayListener("currentPageChange", function SdSheetControl_Conditional_0_Conditional_2_Template_sd_pagination_currentPageChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.currentPage, $event) || (ctx_r1.currentPage = $event); return i0.ɵɵresetView($event); });
|
|
40
|
+
i0.ɵɵelementEnd();
|
|
41
|
+
} if (rf & 2) {
|
|
42
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
43
|
+
i0.ɵɵtwoWayProperty("currentPage", ctx_r1.currentPage);
|
|
44
|
+
i0.ɵɵproperty("totalPageCount", ctx_r1.effectivePageCount())("visiblePageCount", ctx_r1.visiblePageCount());
|
|
45
|
+
} }
|
|
46
|
+
function SdSheetControl_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
48
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_Conditional_0_Conditional_1_Template, 2, 1, "sd-button");
|
|
49
|
+
i0.ɵɵconditionalCreate(2, SdSheetControl_Conditional_0_Conditional_2_Template, 1, 3, "sd-pagination", 4);
|
|
50
|
+
i0.ɵɵelementEnd();
|
|
51
|
+
} if (rf & 2) {
|
|
52
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
53
|
+
i0.ɵɵadvance();
|
|
54
|
+
i0.ɵɵconditional(ctx_r1.key() ? 1 : -1);
|
|
55
|
+
i0.ɵɵadvance();
|
|
56
|
+
i0.ɵɵconditional(ctx_r1.effectivePageCount() > 1 ? 2 : -1);
|
|
57
|
+
} }
|
|
58
|
+
function SdSheetControl_For_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
60
|
+
i0.ɵɵelementStart(0, "th", 8)(1, "sd-anchor", 5);
|
|
61
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_5_Conditional_1_Template_sd_anchor_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.expanding.toggleAll()); });
|
|
62
|
+
i0.ɵɵelement(2, "ng-icon", 6);
|
|
63
|
+
i0.ɵɵelementEnd()();
|
|
64
|
+
} if (rf & 2) {
|
|
65
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
66
|
+
i0.ɵɵattribute("rowspan", ctx_r1.layout.headerFeatureRowSpan() > 1 ? ctx_r1.layout.headerFeatureRowSpan() : null);
|
|
67
|
+
i0.ɵɵadvance(2);
|
|
68
|
+
i0.ɵɵproperty("svg", ctx_r1.expanding.isAllExpanded() ? ctx_r1.icons.tablerChevronsDown : ctx_r1.icons.tablerChevronsRight);
|
|
69
|
+
} }
|
|
70
|
+
function SdSheetControl_For_5_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
72
|
+
i0.ɵɵelementStart(0, "sd-checkbox", 12);
|
|
73
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_5_Conditional_2_Conditional_1_Template_sd_checkbox_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.selection.toggleAll()); });
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
} if (rf & 2) {
|
|
76
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
77
|
+
i0.ɵɵproperty("value", ctx_r1.selection.isAllSelected())("inline", true)("inset", true);
|
|
78
|
+
} }
|
|
79
|
+
function SdSheetControl_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
80
|
+
i0.ɵɵelementStart(0, "th", 9);
|
|
81
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_5_Conditional_2_Conditional_1_Template, 1, 3, "sd-checkbox", 11);
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
} if (rf & 2) {
|
|
84
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
85
|
+
i0.ɵɵattribute("rowspan", ctx_r1.layout.headerFeatureRowSpan() > 1 ? ctx_r1.layout.headerFeatureRowSpan() : null);
|
|
86
|
+
i0.ɵɵadvance();
|
|
87
|
+
i0.ɵɵconditional(ctx_r1.selectMode() === "multi" ? 1 : -1);
|
|
88
|
+
} }
|
|
89
|
+
function SdSheetControl_For_5_For_4_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
+
i0.ɵɵelementStart(0, "span", 15);
|
|
91
|
+
i0.ɵɵtext(1);
|
|
92
|
+
i0.ɵɵelementEnd();
|
|
93
|
+
} if (rf & 2) {
|
|
94
|
+
const sortDef_r8 = i0.ɵɵnextContext();
|
|
95
|
+
i0.ɵɵadvance();
|
|
96
|
+
i0.ɵɵtextInterpolate(sortDef_r8.indexText);
|
|
97
|
+
} }
|
|
98
|
+
function SdSheetControl_For_5_For_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
99
|
+
i0.ɵɵelement(0, "ng-icon", 14);
|
|
100
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_5_For_4_Conditional_3_Conditional_1_Template, 2, 1, "span", 15);
|
|
101
|
+
} if (rf & 2) {
|
|
102
|
+
const sortDef_r8 = ctx;
|
|
103
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
104
|
+
i0.ɵɵproperty("svg", sortDef_r8.desc ? ctx_r1.icons.tablerArrowDown : ctx_r1.icons.tablerArrowUp);
|
|
105
|
+
i0.ɵɵadvance();
|
|
106
|
+
i0.ɵɵconditional(sortDef_r8.indexText ? 1 : -1);
|
|
107
|
+
} }
|
|
108
|
+
function SdSheetControl_For_5_For_4_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
109
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
110
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
111
|
+
i0.ɵɵlistener("mousedown", function SdSheetControl_For_5_For_4_Conditional_4_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r9); const cell_r7 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onResizerMousedown($event, cell_r7.colDef)); })("dblclick", function SdSheetControl_For_5_For_4_Conditional_4_Template_div_dblclick_0_listener($event) { i0.ɵɵrestoreView(_r9); const cell_r7 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onResizerDblClick($event, cell_r7.colDef)); });
|
|
112
|
+
i0.ɵɵelementEnd();
|
|
113
|
+
} }
|
|
114
|
+
function SdSheetControl_For_5_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
115
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
116
|
+
i0.ɵɵelementStart(0, "th", 5);
|
|
117
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_5_For_4_Template_th_click_0_listener($event) { const cell_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onHeaderClick($event, cell_r7)); });
|
|
118
|
+
i0.ɵɵelementStart(1, "span");
|
|
119
|
+
i0.ɵɵtext(2);
|
|
120
|
+
i0.ɵɵelementEnd();
|
|
121
|
+
i0.ɵɵconditionalCreate(3, SdSheetControl_For_5_For_4_Conditional_3_Template, 2, 2);
|
|
122
|
+
i0.ɵɵconditionalCreate(4, SdSheetControl_For_5_For_4_Conditional_4_Template, 1, 0, "div", 13);
|
|
123
|
+
i0.ɵɵelementEnd();
|
|
124
|
+
} if (rf & 2) {
|
|
125
|
+
let tmp_26_0;
|
|
126
|
+
const cell_r7 = ctx.$implicit;
|
|
127
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
128
|
+
i0.ɵɵstyleMap(ctx_r1.getHeaderCellStyle(cell_r7));
|
|
129
|
+
i0.ɵɵattribute("colspan", cell_r7.colspan > 1 ? cell_r7.colspan : null)("rowspan", cell_r7.rowspan > 1 ? cell_r7.rowspan : null)("aria-sort", ctx_r1.getAriaSortValue(cell_r7));
|
|
130
|
+
i0.ɵɵadvance(2);
|
|
131
|
+
i0.ɵɵtextInterpolate(cell_r7.text);
|
|
132
|
+
i0.ɵɵadvance();
|
|
133
|
+
i0.ɵɵconditional((tmp_26_0 = cell_r7.colDef && ctx_r1.getSortDef(cell_r7.colDef.key)) ? 3 : -1, tmp_26_0);
|
|
134
|
+
i0.ɵɵadvance();
|
|
135
|
+
i0.ɵɵconditional(cell_r7.isLastRow && cell_r7.colDef && !cell_r7.colDef.disableResizing ? 4 : -1);
|
|
136
|
+
} }
|
|
137
|
+
function SdSheetControl_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
138
|
+
i0.ɵɵelementStart(0, "tr");
|
|
139
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_5_Conditional_1_Template, 3, 2, "th", 8);
|
|
140
|
+
i0.ɵɵconditionalCreate(2, SdSheetControl_For_5_Conditional_2_Template, 2, 2, "th", 9);
|
|
141
|
+
i0.ɵɵrepeaterCreate(3, SdSheetControl_For_5_For_4_Template, 5, 8, "th", 10, i0.ɵɵrepeaterTrackByIndex);
|
|
142
|
+
i0.ɵɵelementEnd();
|
|
143
|
+
} if (rf & 2) {
|
|
144
|
+
const row_r10 = ctx.$implicit;
|
|
145
|
+
const ɵ$index_18_r11 = ctx.$index;
|
|
146
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
147
|
+
i0.ɵɵadvance();
|
|
148
|
+
i0.ɵɵconditional(ctx_r1.expanding.hasExpandable() && ɵ$index_18_r11 === 0 ? 1 : -1);
|
|
149
|
+
i0.ɵɵadvance();
|
|
150
|
+
i0.ɵɵconditional(ctx_r1.selectMode() && ɵ$index_18_r11 === 0 ? 2 : -1);
|
|
151
|
+
i0.ɵɵadvance();
|
|
152
|
+
i0.ɵɵrepeater(row_r10);
|
|
153
|
+
} }
|
|
154
|
+
function SdSheetControl_For_8_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
156
|
+
i0.ɵɵelementStart(0, "sd-anchor", 5);
|
|
157
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_8_Conditional_1_Conditional_1_Template_sd_anchor_click_0_listener($event) { i0.ɵɵrestoreView(_r14); const item_r13 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onExpandClick($event, item_r13)); });
|
|
158
|
+
i0.ɵɵelement(1, "ng-icon", 6);
|
|
159
|
+
i0.ɵɵelementEnd();
|
|
160
|
+
} if (rf & 2) {
|
|
161
|
+
const item_r13 = i0.ɵɵnextContext(2).$implicit;
|
|
162
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
163
|
+
i0.ɵɵadvance();
|
|
164
|
+
i0.ɵɵproperty("svg", ctx_r1.isExpanded(item_r13) ? ctx_r1.icons.tablerChevronDown : ctx_r1.icons.tablerChevronRight);
|
|
165
|
+
} }
|
|
166
|
+
function SdSheetControl_For_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
167
|
+
i0.ɵɵelementStart(0, "td", 8);
|
|
168
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_8_Conditional_1_Conditional_1_Template, 2, 1, "sd-anchor");
|
|
169
|
+
i0.ɵɵelementEnd();
|
|
170
|
+
} if (rf & 2) {
|
|
171
|
+
let tmp_12_0;
|
|
172
|
+
const item_r13 = i0.ɵɵnextContext().$implicit;
|
|
173
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
174
|
+
i0.ɵɵadvance();
|
|
175
|
+
i0.ɵɵconditional(((tmp_12_0 = ctx_r1.getItemDef(item_r13)) == null ? null : tmp_12_0.hasChildren) ? 1 : -1);
|
|
176
|
+
} }
|
|
177
|
+
function SdSheetControl_For_8_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
179
|
+
i0.ɵɵelementStart(0, "td", 9)(1, "sd-checkbox", 19);
|
|
180
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_8_Conditional_2_Template_sd_checkbox_click_1_listener($event) { i0.ɵɵrestoreView(_r15); const item_r13 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectCheckboxClick($event, item_r13)); });
|
|
181
|
+
i0.ɵɵelementEnd()();
|
|
182
|
+
} if (rf & 2) {
|
|
183
|
+
const item_r13 = i0.ɵɵnextContext().$implicit;
|
|
184
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
185
|
+
i0.ɵɵadvance();
|
|
186
|
+
i0.ɵɵproperty("value", ctx_r1.selection.isSelected(item_r13))("canChangeFn", ctx_r1.selection.getCanChangeFn(item_r13))("inline", true)("inset", true);
|
|
187
|
+
i0.ɵɵattribute("title", ctx_r1.getSelectableTooltip(item_r13));
|
|
188
|
+
} }
|
|
189
|
+
function SdSheetControl_For_8_For_4_Conditional_1_ng_template_0_Template(rf, ctx) { }
|
|
190
|
+
function SdSheetControl_For_8_For_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
191
|
+
i0.ɵɵtemplate(0, SdSheetControl_For_8_For_4_Conditional_1_ng_template_0_Template, 0, 0, "ng-template", 21);
|
|
192
|
+
} if (rf & 2) {
|
|
193
|
+
const ɵ$index_68_r18 = i0.ɵɵnextContext().$index;
|
|
194
|
+
const ctx_r18 = i0.ɵɵnextContext();
|
|
195
|
+
const item_r13 = ctx_r18.$implicit;
|
|
196
|
+
const ɵ$index_52_r20 = ctx_r18.$index;
|
|
197
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
198
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx)("ngTemplateOutletContext", i0.ɵɵpureFunction5(5, _c1, item_r13, item_r13, ɵ$index_52_r20, ctx_r1.getChildrenFn() !== undefined ? ctx_r1.getItemDef(item_r13).depth : 0, ctx_r1.cellAgent.isCellEditMode(i0.ɵɵpureFunction2(2, _c0, ɵ$index_52_r20, ɵ$index_68_r18))));
|
|
199
|
+
} }
|
|
200
|
+
function SdSheetControl_For_8_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
201
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
202
|
+
i0.ɵɵelementStart(0, "td", 20);
|
|
203
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_8_For_4_Template_td_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const item_r13 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCellClick($event, item_r13)); })("focus", function SdSheetControl_For_8_For_4_Template_td_focus_0_listener() { i0.ɵɵrestoreView(_r16); const item_r13 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCellFocus(item_r13)); })("keydown", function SdSheetControl_For_8_For_4_Template_td_keydown_0_listener($event) { const colDef_r17 = i0.ɵɵrestoreView(_r16).$implicit; const item_r13 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCellKeydown($event, item_r13, colDef_r17.key)); });
|
|
204
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_8_For_4_Conditional_1_Template, 1, 11, null, 21);
|
|
205
|
+
i0.ɵɵelementEnd();
|
|
206
|
+
} if (rf & 2) {
|
|
207
|
+
let tmp_26_0;
|
|
208
|
+
const colDef_r17 = ctx.$implicit;
|
|
209
|
+
const ɵ$index_68_r18 = ctx.$index;
|
|
210
|
+
const ctx_r18 = i0.ɵɵnextContext();
|
|
211
|
+
const item_r13 = ctx_r18.$implicit;
|
|
212
|
+
const ɵ$index_52_r20 = ctx_r18.$index;
|
|
213
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
214
|
+
i0.ɵɵstyleMap(ctx_r1.getCellStyleWithIndent(item_r13, colDef_r17, ɵ$index_68_r18));
|
|
215
|
+
i0.ɵɵclassMap(ctx_r1.getDataCellClass(item_r13, colDef_r17, ɵ$index_52_r20, ɵ$index_68_r18));
|
|
216
|
+
i0.ɵɵattribute("data-r", ɵ$index_52_r20)("data-c", ɵ$index_68_r18);
|
|
217
|
+
i0.ɵɵadvance();
|
|
218
|
+
i0.ɵɵconditional((tmp_26_0 = ctx_r1.getColumnCellTpl(colDef_r17.key)) ? 1 : -1, tmp_26_0);
|
|
219
|
+
} }
|
|
220
|
+
function SdSheetControl_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
221
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
222
|
+
i0.ɵɵelementStart(0, "tr", 17);
|
|
223
|
+
i0.ɵɵlistener("click", function SdSheetControl_For_8_Template_tr_click_0_listener() { const item_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRowClick(item_r13)); })("keydown", function SdSheetControl_For_8_Template_tr_keydown_0_listener($event) { const item_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onItemKeydown($event, item_r13)); });
|
|
224
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_For_8_Conditional_1_Template, 2, 1, "td", 8);
|
|
225
|
+
i0.ɵɵconditionalCreate(2, SdSheetControl_For_8_Conditional_2_Template, 2, 5, "td", 9);
|
|
226
|
+
i0.ɵɵrepeaterCreate(3, SdSheetControl_For_8_For_4_Template, 2, 7, "td", 18, _forTrack1);
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
} if (rf & 2) {
|
|
229
|
+
const item_r13 = ctx.$implicit;
|
|
230
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
231
|
+
i0.ɵɵstyleProp("background", ctx_r1.selection.isSelected(item_r13) ? "var(--trans-lighter)" : null);
|
|
232
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.selection.isSelected(item_r13) ? "true" : null)("aria-expanded", ctx_r1.getAriaExpanded(item_r13));
|
|
233
|
+
i0.ɵɵadvance();
|
|
234
|
+
i0.ɵɵconditional(ctx_r1.expanding.hasExpandable() ? 1 : -1);
|
|
235
|
+
i0.ɵɵadvance();
|
|
236
|
+
i0.ɵɵconditional(ctx_r1.selectMode() ? 2 : -1);
|
|
237
|
+
i0.ɵɵadvance();
|
|
238
|
+
i0.ɵɵrepeater(ctx_r1.layout.columnDefs());
|
|
239
|
+
} }
|
|
240
|
+
function SdSheetControl_Conditional_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
241
|
+
i0.ɵɵelement(0, "td", 8);
|
|
242
|
+
} }
|
|
243
|
+
function SdSheetControl_Conditional_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
244
|
+
i0.ɵɵelement(0, "td", 9);
|
|
245
|
+
} }
|
|
246
|
+
function SdSheetControl_Conditional_9_For_5_Conditional_1_ng_template_0_Template(rf, ctx) { }
|
|
247
|
+
function SdSheetControl_Conditional_9_For_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
248
|
+
i0.ɵɵtemplate(0, SdSheetControl_Conditional_9_For_5_Conditional_1_ng_template_0_Template, 0, 0, "ng-template", 22);
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx);
|
|
251
|
+
} }
|
|
252
|
+
function SdSheetControl_Conditional_9_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
253
|
+
i0.ɵɵelementStart(0, "td");
|
|
254
|
+
i0.ɵɵconditionalCreate(1, SdSheetControl_Conditional_9_For_5_Conditional_1_Template, 1, 1, null, 22);
|
|
255
|
+
i0.ɵɵelementEnd();
|
|
256
|
+
} if (rf & 2) {
|
|
257
|
+
let tmp_12_0;
|
|
258
|
+
const colDef_r21 = ctx.$implicit;
|
|
259
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
260
|
+
i0.ɵɵstyleMap(ctx_r1.getFixedCellStyle(colDef_r21));
|
|
261
|
+
i0.ɵɵadvance();
|
|
262
|
+
i0.ɵɵconditional((tmp_12_0 = ctx_r1.getColumnSummaryTpl(colDef_r21.key)) ? 1 : -1, tmp_12_0);
|
|
263
|
+
} }
|
|
264
|
+
function SdSheetControl_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
265
|
+
i0.ɵɵelementStart(0, "tfoot")(1, "tr");
|
|
266
|
+
i0.ɵɵconditionalCreate(2, SdSheetControl_Conditional_9_Conditional_2_Template, 1, 0, "td", 8);
|
|
267
|
+
i0.ɵɵconditionalCreate(3, SdSheetControl_Conditional_9_Conditional_3_Template, 1, 0, "td", 9);
|
|
268
|
+
i0.ɵɵrepeaterCreate(4, SdSheetControl_Conditional_9_For_5_Template, 2, 3, "td", 10, _forTrack1);
|
|
269
|
+
i0.ɵɵelementEnd()();
|
|
270
|
+
} if (rf & 2) {
|
|
271
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
272
|
+
i0.ɵɵadvance(2);
|
|
273
|
+
i0.ɵɵconditional(ctx_r1.expanding.hasExpandable() ? 2 : -1);
|
|
274
|
+
i0.ɵɵadvance();
|
|
275
|
+
i0.ɵɵconditional(ctx_r1.selectMode() ? 3 : -1);
|
|
276
|
+
i0.ɵɵadvance();
|
|
277
|
+
i0.ɵɵrepeater(ctx_r1.layout.columnDefs());
|
|
278
|
+
} }
|
|
279
|
+
export class SdSheetControl {
|
|
280
|
+
// Inputs
|
|
281
|
+
key = input(...(ngDevMode ? [undefined, { debugName: "key" }] : /* istanbul ignore next */ []));
|
|
282
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
283
|
+
trackByFn = input(...(ngDevMode ? [undefined, { debugName: "trackByFn" }] : /* istanbul ignore next */ []));
|
|
284
|
+
selectMode = input(...(ngDevMode ? [undefined, { debugName: "selectMode" }] : /* istanbul ignore next */ []));
|
|
285
|
+
autoSelect = input(...(ngDevMode ? [undefined, { debugName: "autoSelect" }] : /* istanbul ignore next */ []));
|
|
286
|
+
getItemSelectableFn = input(...(ngDevMode ? [undefined, { debugName: "getItemSelectableFn" }] : /* istanbul ignore next */ []));
|
|
287
|
+
getChildrenFn = input(...(ngDevMode ? [undefined, { debugName: "getChildrenFn" }] : /* istanbul ignore next */ []));
|
|
288
|
+
useAutoSort = input(false, { ...(ngDevMode ? { debugName: "useAutoSort" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
289
|
+
visiblePageCount = input(10, ...(ngDevMode ? [{ debugName: "visiblePageCount" }] : /* istanbul ignore next */ []));
|
|
290
|
+
totalPageCount = input(0, ...(ngDevMode ? [{ debugName: "totalPageCount" }] : /* istanbul ignore next */ []));
|
|
291
|
+
itemsPerPage = input(0, ...(ngDevMode ? [{ debugName: "itemsPerPage" }] : /* istanbul ignore next */ []));
|
|
292
|
+
focusMode = input("cell", ...(ngDevMode ? [{ debugName: "focusMode" }] : /* istanbul ignore next */ []));
|
|
293
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
294
|
+
contentStyle = input(...(ngDevMode ? [undefined, { debugName: "contentStyle" }] : /* istanbul ignore next */ []));
|
|
295
|
+
getItemCellClassFn = input(...(ngDevMode ? [undefined, { debugName: "getItemCellClassFn" }] : /* istanbul ignore next */ []));
|
|
296
|
+
getItemCellStyleFn = input(...(ngDevMode ? [undefined, { debugName: "getItemCellStyleFn" }] : /* istanbul ignore next */ []));
|
|
297
|
+
hideConfigBar = input(false, { ...(ngDevMode ? { debugName: "hideConfigBar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
298
|
+
// Outputs
|
|
299
|
+
itemKeydown = output();
|
|
300
|
+
cellKeydown = output();
|
|
301
|
+
// Models
|
|
302
|
+
selectedItems = model([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
303
|
+
expandedItems = model([], ...(ngDevMode ? [{ debugName: "expandedItems" }] : /* istanbul ignore next */ []));
|
|
304
|
+
sorts = model([], ...(ngDevMode ? [{ debugName: "sorts" }] : /* istanbul ignore next */ [])); // Re-exported from useSortingManager
|
|
305
|
+
currentPage = model(0, ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
306
|
+
// Content query
|
|
307
|
+
columnControls = contentChildren(SdSheetColumnDirective, ...(ngDevMode ? [{ debugName: "columnControls" }] : /* istanbul ignore next */ []));
|
|
308
|
+
// Injected providers
|
|
309
|
+
_modalProvider = inject(SdModalProvider);
|
|
310
|
+
_destroyRef = inject(DestroyRef);
|
|
311
|
+
// DOM accessor & cell agent
|
|
312
|
+
domAccessor = useSheetDomAccessor();
|
|
313
|
+
cellAgent = useSheetCellAgent({ domAccessor: this.domAccessor });
|
|
314
|
+
constructor() {
|
|
315
|
+
this._destroyRef.onDestroy(() => {
|
|
316
|
+
this._resizingCleanup?.();
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
// Resizing state
|
|
320
|
+
_isResizing = signal(false, ...(ngDevMode ? [{ debugName: "_isResizing" }] : /* istanbul ignore next */ []));
|
|
321
|
+
_resizeIndicatorLeft = signal(0, ...(ngDevMode ? [{ debugName: "_resizeIndicatorLeft" }] : /* istanbul ignore next */ []));
|
|
322
|
+
_isOnResizing = false;
|
|
323
|
+
_resizingCleanup = null;
|
|
324
|
+
// Config resource
|
|
325
|
+
_configResource = useSdSystemConfigResource({
|
|
326
|
+
key: this.key,
|
|
327
|
+
});
|
|
328
|
+
// Layout engine
|
|
329
|
+
layout = useSheetLayoutEngine({
|
|
330
|
+
columnControls: this.columnControls,
|
|
331
|
+
config: computed(() => this._configResource.value()),
|
|
332
|
+
});
|
|
333
|
+
// Column fixing
|
|
334
|
+
fixing = useSheetColumnFixing({
|
|
335
|
+
columnDefs: this.layout.columnDefs,
|
|
336
|
+
});
|
|
337
|
+
// Sorting manager
|
|
338
|
+
sorting = useSortingManager({
|
|
339
|
+
sorts: this.sorts,
|
|
340
|
+
});
|
|
341
|
+
// Effective page count (from totalPageCount or computed from items/itemsPerPage)
|
|
342
|
+
effectivePageCount = computed(() => {
|
|
343
|
+
const total = this.totalPageCount();
|
|
344
|
+
if (total > 0)
|
|
345
|
+
return total;
|
|
346
|
+
const perPage = this.itemsPerPage();
|
|
347
|
+
if (perPage <= 0)
|
|
348
|
+
return 0;
|
|
349
|
+
return Math.ceil(this.items().length / perPage);
|
|
350
|
+
}, ...(ngDevMode ? [{ debugName: "effectivePageCount" }] : /* istanbul ignore next */ []));
|
|
351
|
+
// Icons
|
|
352
|
+
icons = {
|
|
353
|
+
tablerArrowUp,
|
|
354
|
+
tablerArrowDown,
|
|
355
|
+
tablerChevronRight,
|
|
356
|
+
tablerChevronDown,
|
|
357
|
+
tablerChevronsRight,
|
|
358
|
+
tablerChevronsDown,
|
|
359
|
+
tablerSettings,
|
|
360
|
+
};
|
|
361
|
+
// Sorted items
|
|
362
|
+
_sortedItems = computed(() => {
|
|
363
|
+
const items = this.items();
|
|
364
|
+
if (this.useAutoSort()) {
|
|
365
|
+
return this.sorting.sort(items);
|
|
366
|
+
}
|
|
367
|
+
return items;
|
|
368
|
+
}, ...(ngDevMode ? [{ debugName: "_sortedItems" }] : /* istanbul ignore next */ []));
|
|
369
|
+
// Paged items (root-level only)
|
|
370
|
+
_pagedItems = computed(() => {
|
|
371
|
+
const items = this._sortedItems();
|
|
372
|
+
const perPage = this.itemsPerPage();
|
|
373
|
+
if (perPage <= 0)
|
|
374
|
+
return items;
|
|
375
|
+
const page = this.currentPage();
|
|
376
|
+
const start = page * perPage;
|
|
377
|
+
return items.slice(start, start + perPage);
|
|
378
|
+
}, ...(ngDevMode ? [{ debugName: "_pagedItems" }] : /* istanbul ignore next */ []));
|
|
379
|
+
// Expanding manager
|
|
380
|
+
expanding = useExpandingManager({
|
|
381
|
+
items: this._pagedItems,
|
|
382
|
+
expandedItems: this.expandedItems,
|
|
383
|
+
getChildrenFn: this.getChildrenFn,
|
|
384
|
+
sort: (items) => {
|
|
385
|
+
if (this.useAutoSort()) {
|
|
386
|
+
return this.sorting.sort(items);
|
|
387
|
+
}
|
|
388
|
+
return items;
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
// Final display items (sorted → paged → expanded)
|
|
392
|
+
displayItems = computed(() => {
|
|
393
|
+
const getChildrenFn = this.getChildrenFn();
|
|
394
|
+
if (getChildrenFn != null) {
|
|
395
|
+
// With tree: only show visible items (parent expanded)
|
|
396
|
+
return this.expanding.displayItems().filter((item) => this.expanding.isVisible(item));
|
|
397
|
+
}
|
|
398
|
+
return this._pagedItems();
|
|
399
|
+
}, ...(ngDevMode ? [{ debugName: "displayItems" }] : /* istanbul ignore next */ []));
|
|
400
|
+
// Selection manager
|
|
401
|
+
selection = useSelectionManager({
|
|
402
|
+
displayItems: this.displayItems,
|
|
403
|
+
selectedItems: this.selectedItems,
|
|
404
|
+
selectMode: this.selectMode,
|
|
405
|
+
getItemSelectableFn: this.getItemSelectableFn,
|
|
406
|
+
});
|
|
407
|
+
getColumnCellTpl(key) {
|
|
408
|
+
const col = this.columnControls().find((c) => c.key() === key);
|
|
409
|
+
return col?.cellTplRef() ?? null;
|
|
410
|
+
}
|
|
411
|
+
getColumnSummaryTpl(key) {
|
|
412
|
+
const col = this.columnControls().find((c) => c.key() === key);
|
|
413
|
+
return col?.summaryTplRef() ?? null;
|
|
414
|
+
}
|
|
415
|
+
getHeaderCellStyle(cell) {
|
|
416
|
+
const parts = [];
|
|
417
|
+
if (cell.colDef != null) {
|
|
418
|
+
const baseStyle = this._getColDefStyle(cell.colDef);
|
|
419
|
+
if (baseStyle != null) {
|
|
420
|
+
parts.push(baseStyle);
|
|
421
|
+
}
|
|
422
|
+
const fixedStyle = this._getFixedStyle(cell.colDef);
|
|
423
|
+
if (fixedStyle != null) {
|
|
424
|
+
parts.push(fixedStyle);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return parts.length > 0 ? parts.join("; ") : null;
|
|
428
|
+
}
|
|
429
|
+
getCellStyle(item, colDef) {
|
|
430
|
+
const parts = [];
|
|
431
|
+
const baseStyle = this._getColDefStyle(colDef);
|
|
432
|
+
if (baseStyle != null) {
|
|
433
|
+
parts.push(baseStyle);
|
|
434
|
+
}
|
|
435
|
+
const fixedStyle = this._getFixedStyle(colDef);
|
|
436
|
+
if (fixedStyle != null) {
|
|
437
|
+
parts.push(fixedStyle);
|
|
438
|
+
}
|
|
439
|
+
const customStyle = this.getItemCellStyleFn()
|
|
440
|
+
? this.getItemCellStyleFn()(item, colDef.key)
|
|
441
|
+
: undefined;
|
|
442
|
+
if (customStyle != null) {
|
|
443
|
+
parts.push(customStyle);
|
|
444
|
+
}
|
|
445
|
+
return parts.length > 0 ? parts.join("; ") : null;
|
|
446
|
+
}
|
|
447
|
+
getFixedCellStyle(colDef) {
|
|
448
|
+
return this._getFixedStyle(colDef);
|
|
449
|
+
}
|
|
450
|
+
getSelectableTooltip(item) {
|
|
451
|
+
const result = this.selection.getSelectable(item);
|
|
452
|
+
if (typeof result === "string")
|
|
453
|
+
return result;
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
onRowClick(item) {
|
|
457
|
+
if (this.autoSelect() === "click") {
|
|
458
|
+
this.selection.select(item);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
onSelectCheckboxClick(event, item) {
|
|
462
|
+
event.stopPropagation();
|
|
463
|
+
this.selection.toggle(item);
|
|
464
|
+
}
|
|
465
|
+
onCellClick(event, item) {
|
|
466
|
+
if (this.autoSelect() === "click") {
|
|
467
|
+
this.selection.select(item);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
onCellFocus(item) {
|
|
471
|
+
if (this.autoSelect() === "focus") {
|
|
472
|
+
this.selection.select(item);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
onHeaderClick(event, cell) {
|
|
476
|
+
if (this._isOnResizing)
|
|
477
|
+
return;
|
|
478
|
+
if (cell.colDef == null)
|
|
479
|
+
return;
|
|
480
|
+
if (cell.colDef.disableSorting)
|
|
481
|
+
return;
|
|
482
|
+
this.sorting.toggle(cell.colDef.key, event.shiftKey);
|
|
483
|
+
}
|
|
484
|
+
getSortDef(key) {
|
|
485
|
+
return this.sorting.defMap().get(key) ?? null;
|
|
486
|
+
}
|
|
487
|
+
getCellStyleWithIndent(item, colDef, colIdx) {
|
|
488
|
+
const parts = [];
|
|
489
|
+
const cellStyle = this.getCellStyle(item, colDef);
|
|
490
|
+
if (cellStyle != null) {
|
|
491
|
+
parts.push(cellStyle);
|
|
492
|
+
}
|
|
493
|
+
// Add indent for tree depth on first data column
|
|
494
|
+
if (colIdx === 0 && this.getChildrenFn() != null) {
|
|
495
|
+
const itemDef = this.getItemDef(item);
|
|
496
|
+
if (itemDef.depth > 0) {
|
|
497
|
+
parts.push(`padding-left: calc(var(--gap-default) + ${itemDef.depth}em)`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return parts.length > 0 ? parts.join("; ") : null;
|
|
501
|
+
}
|
|
502
|
+
getItemDef(item) {
|
|
503
|
+
return this.expanding.def(item);
|
|
504
|
+
}
|
|
505
|
+
isExpanded(item) {
|
|
506
|
+
return this.expandedItems().includes(item);
|
|
507
|
+
}
|
|
508
|
+
getAriaExpanded(item) {
|
|
509
|
+
if (this.getChildrenFn() == null)
|
|
510
|
+
return null;
|
|
511
|
+
const def = this.getItemDef(item);
|
|
512
|
+
if (!def.hasChildren)
|
|
513
|
+
return null;
|
|
514
|
+
return this.isExpanded(item) ? "true" : "false";
|
|
515
|
+
}
|
|
516
|
+
onExpandClick(event, item) {
|
|
517
|
+
event.stopPropagation();
|
|
518
|
+
this.expanding.toggle(item);
|
|
519
|
+
}
|
|
520
|
+
getAriaSortValue(cell) {
|
|
521
|
+
if (cell.colDef == null)
|
|
522
|
+
return null;
|
|
523
|
+
const sortDef = this.sorting.defMap().get(cell.colDef.key);
|
|
524
|
+
if (sortDef == null)
|
|
525
|
+
return null;
|
|
526
|
+
return sortDef.desc ? "descending" : "ascending";
|
|
527
|
+
}
|
|
528
|
+
_getColDefStyle(colDef) {
|
|
529
|
+
const parts = [];
|
|
530
|
+
if (colDef.width != null) {
|
|
531
|
+
parts.push(`width: ${colDef.width}`);
|
|
532
|
+
parts.push(`min-width: ${colDef.width}`);
|
|
533
|
+
parts.push(`max-width: ${colDef.width}`);
|
|
534
|
+
}
|
|
535
|
+
if (colDef.collapse) {
|
|
536
|
+
parts.push("padding: 0");
|
|
537
|
+
parts.push("width: 0");
|
|
538
|
+
parts.push("min-width: 0");
|
|
539
|
+
parts.push("max-width: 0");
|
|
540
|
+
parts.push("overflow: hidden");
|
|
541
|
+
parts.push("border: none");
|
|
542
|
+
}
|
|
543
|
+
return parts.length > 0 ? parts.join("; ") : null;
|
|
544
|
+
}
|
|
545
|
+
_getFixedStyle(colDef) {
|
|
546
|
+
const fixedLeftMap = this.fixing.fixedLeftMap();
|
|
547
|
+
const leftValue = fixedLeftMap.get(colDef.key);
|
|
548
|
+
if (leftValue == null)
|
|
549
|
+
return null;
|
|
550
|
+
const parts = [];
|
|
551
|
+
parts.push("position: sticky");
|
|
552
|
+
parts.push(`left: ${leftValue}px`);
|
|
553
|
+
parts.push("z-index: 1");
|
|
554
|
+
parts.push("background: var(--control-color)");
|
|
555
|
+
return parts.join("; ");
|
|
556
|
+
}
|
|
557
|
+
getDataCellClass(item, colDef, r, c) {
|
|
558
|
+
const parts = [];
|
|
559
|
+
const customClass = this.getItemCellClassFn() ? this.getItemCellClassFn()(item, colDef.key) : undefined;
|
|
560
|
+
if (customClass != null) {
|
|
561
|
+
parts.push(customClass);
|
|
562
|
+
}
|
|
563
|
+
if (this.cellAgent.isCellEditMode({ r, c })) {
|
|
564
|
+
parts.push("_edit-mode");
|
|
565
|
+
}
|
|
566
|
+
return parts.length > 0 ? parts.join(" ") : null;
|
|
567
|
+
}
|
|
568
|
+
async onKeydownCapture(event) {
|
|
569
|
+
await this.cellAgent.handleKeydownCapture(event);
|
|
570
|
+
}
|
|
571
|
+
onDblClick(event) {
|
|
572
|
+
this.cellAgent.handleCellDoubleClick(event);
|
|
573
|
+
}
|
|
574
|
+
onBlurCapture(event) {
|
|
575
|
+
this.cellAgent.handleBlurCapture(event);
|
|
576
|
+
}
|
|
577
|
+
onItemKeydown(event, item) {
|
|
578
|
+
this.itemKeydown.emit({ item, event });
|
|
579
|
+
}
|
|
580
|
+
onCellKeydown(event, item, colKey) {
|
|
581
|
+
this.cellKeydown.emit({ item, key: colKey, event });
|
|
582
|
+
}
|
|
583
|
+
async onConfigButtonClick() {
|
|
584
|
+
const result = await this._modalProvider.showAsync({
|
|
585
|
+
title: "시트 설정",
|
|
586
|
+
type: SdSheetConfigModal,
|
|
587
|
+
inputs: {
|
|
588
|
+
controls: this.columnControls(),
|
|
589
|
+
config: this._configResource.value(),
|
|
590
|
+
},
|
|
591
|
+
});
|
|
592
|
+
if (result != null) {
|
|
593
|
+
this._configResource.set(result);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
// --- Resizing ---
|
|
597
|
+
onResizerMousedown(event, colDef) {
|
|
598
|
+
event.preventDefault();
|
|
599
|
+
event.stopPropagation();
|
|
600
|
+
const container = this.domAccessor.getContainer();
|
|
601
|
+
const startX = event.clientX;
|
|
602
|
+
const th = event.target.parentElement;
|
|
603
|
+
const startWidth = th.offsetWidth;
|
|
604
|
+
this._isResizing.set(true);
|
|
605
|
+
this._isOnResizing = true;
|
|
606
|
+
this._resizeIndicatorLeft.set(th.offsetLeft + th.offsetWidth - container.scrollLeft);
|
|
607
|
+
const onMouseMove = (e) => {
|
|
608
|
+
const deltaX = e.clientX - startX;
|
|
609
|
+
const newWidth = Math.max(startWidth + deltaX, 5);
|
|
610
|
+
this._resizeIndicatorLeft.set(th.offsetLeft + newWidth - container.scrollLeft);
|
|
611
|
+
};
|
|
612
|
+
const onMouseUp = (e) => {
|
|
613
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
614
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
615
|
+
this._resizingCleanup = null;
|
|
616
|
+
const deltaX = e.clientX - startX;
|
|
617
|
+
const newWidth = Math.max(startWidth + deltaX, 5);
|
|
618
|
+
this._isResizing.set(false);
|
|
619
|
+
this._saveColumnConfig(colDef.key, { width: `${newWidth}px` });
|
|
620
|
+
// Prevent sorting for 300ms after resize
|
|
621
|
+
setTimeout(() => {
|
|
622
|
+
this._isOnResizing = false;
|
|
623
|
+
}, 300);
|
|
624
|
+
};
|
|
625
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
626
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
627
|
+
this._resizingCleanup = () => {
|
|
628
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
629
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
onResizerDblClick(event, colDef) {
|
|
633
|
+
event.preventDefault();
|
|
634
|
+
event.stopPropagation();
|
|
635
|
+
// Remove the width from config to reset to column definition default
|
|
636
|
+
const current = this._configResource.value() ?? { columnRecord: {} };
|
|
637
|
+
const columnRecord = { ...current.columnRecord };
|
|
638
|
+
const colConfig = { ...columnRecord[colDef.key] };
|
|
639
|
+
delete colConfig.width;
|
|
640
|
+
columnRecord[colDef.key] = colConfig;
|
|
641
|
+
this._configResource.set({ ...current, columnRecord });
|
|
642
|
+
}
|
|
643
|
+
_saveColumnConfig(colKey, changes) {
|
|
644
|
+
const current = this._configResource.value() ?? { columnRecord: {} };
|
|
645
|
+
const columnRecord = { ...current.columnRecord };
|
|
646
|
+
columnRecord[colKey] = { ...columnRecord[colKey], ...changes };
|
|
647
|
+
this._configResource.set({ ...current, columnRecord });
|
|
648
|
+
}
|
|
649
|
+
static ɵfac = function SdSheetControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdSheetControl)(); };
|
|
650
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdSheetControl, selectors: [["sd-sheet"]], contentQueries: function SdSheetControl_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
651
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.columnControls, SdSheetColumnDirective, 4);
|
|
652
|
+
} if (rf & 2) {
|
|
653
|
+
i0.ɵɵqueryAdvance();
|
|
654
|
+
} }, hostVars: 1, hostBindings: function SdSheetControl_HostBindings(rf, ctx) { if (rf & 1) {
|
|
655
|
+
i0.ɵɵlistener("keydown.capture", function SdSheetControl_keydown_capture_HostBindingHandler($event) { return ctx.onKeydownCapture($event); })("dblclick", function SdSheetControl_dblclick_HostBindingHandler($event) { return ctx.onDblClick($event); })("blur.capture", function SdSheetControl_blur_capture_HostBindingHandler($event) { return ctx.onBlurCapture($event); });
|
|
656
|
+
} if (rf & 2) {
|
|
657
|
+
i0.ɵɵattribute("data-sd-inset", ctx.inset());
|
|
658
|
+
} }, inputs: { key: [1, "key"], items: [1, "items"], trackByFn: [1, "trackByFn"], selectMode: [1, "selectMode"], autoSelect: [1, "autoSelect"], getItemSelectableFn: [1, "getItemSelectableFn"], getChildrenFn: [1, "getChildrenFn"], useAutoSort: [1, "useAutoSort"], visiblePageCount: [1, "visiblePageCount"], totalPageCount: [1, "totalPageCount"], itemsPerPage: [1, "itemsPerPage"], focusMode: [1, "focusMode"], inset: [1, "inset"], contentStyle: [1, "contentStyle"], getItemCellClassFn: [1, "getItemCellClassFn"], getItemCellStyleFn: [1, "getItemCellStyleFn"], hideConfigBar: [1, "hideConfigBar"], selectedItems: [1, "selectedItems"], expandedItems: [1, "expandedItems"], sorts: [1, "sorts"], currentPage: [1, "currentPage"] }, outputs: { itemKeydown: "itemKeydown", cellKeydown: "cellKeydown", selectedItems: "selectedItemsChange", expandedItems: "expandedItemsChange", sorts: "sortsChange", currentPage: "currentPageChange" }, decls: 11, vars: 8, consts: [[1, "_tool"], [1, "_container"], [3, "background"], [1, "_resize-indicator"], [3, "currentPage", "totalPageCount", "visiblePageCount"], [3, "click"], [3, "svg"], [3, "currentPageChange", "currentPage", "totalPageCount", "visiblePageCount"], [1, "_expand-col"], [1, "_select-col"], [3, "style"], [3, "value", "inline", "inset"], [3, "click", "value", "inline", "inset"], [1, "_resizer"], [1, "_sort-icon", 3, "svg"], [1, "_sort-index"], [1, "_resizer", 3, "mousedown", "dblclick"], [3, "click", "keydown"], ["tabindex", "0", 3, "class", "style"], [3, "click", "value", "canChangeFn", "inline", "inset"], ["tabindex", "0", 3, "click", "focus", "keydown"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "ngTemplateOutlet"]], template: function SdSheetControl_Template(rf, ctx) { if (rf & 1) {
|
|
659
|
+
i0.ɵɵconditionalCreate(0, SdSheetControl_Conditional_0_Template, 3, 2, "div", 0);
|
|
660
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "table")(3, "thead");
|
|
661
|
+
i0.ɵɵrepeaterCreate(4, SdSheetControl_For_5_Template, 5, 2, "tr", null, i0.ɵɵrepeaterTrackByIndex);
|
|
662
|
+
i0.ɵɵelementEnd();
|
|
663
|
+
i0.ɵɵelementStart(6, "tbody");
|
|
664
|
+
i0.ɵɵrepeaterCreate(7, SdSheetControl_For_8_Template, 5, 6, "tr", 2, _forTrack0, true);
|
|
665
|
+
i0.ɵɵelementEnd();
|
|
666
|
+
i0.ɵɵconditionalCreate(9, SdSheetControl_Conditional_9_Template, 6, 2, "tfoot");
|
|
667
|
+
i0.ɵɵelementEnd();
|
|
668
|
+
i0.ɵɵelement(10, "div", 3);
|
|
669
|
+
i0.ɵɵelementEnd();
|
|
670
|
+
} if (rf & 2) {
|
|
671
|
+
i0.ɵɵconditional((ctx.key() || ctx.effectivePageCount() > 1) && !ctx.hideConfigBar() ? 0 : -1);
|
|
672
|
+
i0.ɵɵadvance();
|
|
673
|
+
i0.ɵɵstyleMap(ctx.contentStyle());
|
|
674
|
+
i0.ɵɵadvance(3);
|
|
675
|
+
i0.ɵɵrepeater(ctx.layout.headerDefTable());
|
|
676
|
+
i0.ɵɵadvance(3);
|
|
677
|
+
i0.ɵɵrepeater(ctx.displayItems());
|
|
678
|
+
i0.ɵɵadvance(2);
|
|
679
|
+
i0.ɵɵconditional(ctx.layout.hasSummary() ? 9 : -1);
|
|
680
|
+
i0.ɵɵadvance();
|
|
681
|
+
i0.ɵɵstyleProp("display", ctx._isResizing() ? "block" : "none")("left", ctx._resizeIndicatorLeft(), "px");
|
|
682
|
+
} }, dependencies: [NgTemplateOutlet, SdCheckboxControl, NgIcon, SdPaginationControl, SdAnchorControl, SdButtonControl], styles: ["sd-sheet {\n display: block;\n position: relative;\n overflow: hidden;\n border: 1px solid var(--trans-lighter);\n}\nsd-sheet[data-sd-inset=true] {\n border: none;\n}\nsd-sheet > ._tool {\n display: flex;\n align-items: center;\n gap: var(--gap-sm);\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--trans-lighter);\n background: var(--theme-secondary-lightest);\n}\nsd-sheet > ._container {\n overflow: auto;\n width: 100%;\n height: 100%;\n}\nsd-sheet > ._container > table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\nsd-sheet > ._container > table > thead > tr > th {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n text-align: left;\n font-weight: bold;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n}\nsd-sheet > ._container > table > thead > tr > th:not(._select-col):not(._expand-col) {\n position: relative;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-icon {\n font-size: 0.85em;\n vertical-align: middle;\n margin-left: 0.25em;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-index {\n font-size: 0.75em;\n vertical-align: super;\n}\nsd-sheet > ._container > table > thead > tr > th > ._resizer {\n position: absolute;\n top: 0;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: col-resize;\n z-index: 3;\n}\nsd-sheet > ._container > table > tbody > tr > td {\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n white-space: nowrap;\n}\nsd-sheet > ._container > table > tbody > tr > td:focus {\n outline: 2px solid var(--theme-primary-default);\n outline-offset: -2px;\n}\nsd-sheet > ._container > table > thead > tr > th._select-col,\nsd-sheet > ._container > table > tbody > tr > td._select-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > thead > tr > th._expand-col,\nsd-sheet > ._container > table > tbody > tr > td._expand-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > tfoot > tr > td {\n position: sticky;\n bottom: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-sheet > ._container > ._resize-indicator {\n position: absolute;\n top: 0;\n width: 2px;\n height: 100%;\n background: var(--theme-primary-default);\n z-index: 10;\n pointer-events: none;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
683
|
+
}
|
|
684
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdSheetControl, [{
|
|
685
|
+
type: Component,
|
|
686
|
+
args: [{ selector: "sd-sheet", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgTemplateOutlet, SdCheckboxControl, NgIcon, SdPaginationControl, SdAnchorControl, SdButtonControl], template: `
|
|
687
|
+
@if ((key() || effectivePageCount() > 1) && !hideConfigBar()) {
|
|
688
|
+
<div class="_tool">
|
|
689
|
+
@if (key()) {
|
|
690
|
+
<sd-button (click)="onConfigButtonClick()">
|
|
691
|
+
<ng-icon [svg]="icons.tablerSettings" />
|
|
692
|
+
</sd-button>
|
|
693
|
+
}
|
|
694
|
+
@if (effectivePageCount() > 1) {
|
|
695
|
+
<sd-pagination [(currentPage)]="currentPage" [totalPageCount]="effectivePageCount()" [visiblePageCount]="visiblePageCount()" />
|
|
696
|
+
}
|
|
697
|
+
</div>
|
|
698
|
+
}
|
|
699
|
+
<div class="_container" [style]="contentStyle()">
|
|
700
|
+
<table>
|
|
701
|
+
<thead>
|
|
702
|
+
@for (row of layout.headerDefTable(); track $index; let rowIdx = $index) {
|
|
703
|
+
<tr>
|
|
704
|
+
@if (expanding.hasExpandable() && rowIdx === 0) {
|
|
705
|
+
<th
|
|
706
|
+
class="_expand-col"
|
|
707
|
+
[attr.rowspan]="layout.headerFeatureRowSpan() > 1 ? layout.headerFeatureRowSpan() : null"
|
|
708
|
+
>
|
|
709
|
+
<sd-anchor (click)="expanding.toggleAll()">
|
|
710
|
+
<ng-icon [svg]="expanding.isAllExpanded() ? icons.tablerChevronsDown : icons.tablerChevronsRight" />
|
|
711
|
+
</sd-anchor>
|
|
712
|
+
</th>
|
|
713
|
+
}
|
|
714
|
+
@if (selectMode() && rowIdx === 0) {
|
|
715
|
+
<th
|
|
716
|
+
class="_select-col"
|
|
717
|
+
[attr.rowspan]="layout.headerFeatureRowSpan() > 1 ? layout.headerFeatureRowSpan() : null"
|
|
718
|
+
>
|
|
719
|
+
@if (selectMode() === "multi") {
|
|
720
|
+
<sd-checkbox
|
|
721
|
+
[value]="selection.isAllSelected()"
|
|
722
|
+
(click)="selection.toggleAll()"
|
|
723
|
+
[inline]="true"
|
|
724
|
+
[inset]="true"
|
|
725
|
+
/>
|
|
726
|
+
}
|
|
727
|
+
</th>
|
|
728
|
+
}
|
|
729
|
+
@for (cell of row; track $index) {
|
|
730
|
+
<th
|
|
731
|
+
[attr.colspan]="cell.colspan > 1 ? cell.colspan : null"
|
|
732
|
+
[attr.rowspan]="cell.rowspan > 1 ? cell.rowspan : null"
|
|
733
|
+
[attr.aria-sort]="getAriaSortValue(cell)"
|
|
734
|
+
[style]="getHeaderCellStyle(cell)"
|
|
735
|
+
(click)="onHeaderClick($event, cell)"
|
|
736
|
+
>
|
|
737
|
+
<span>{{ cell.text }}</span>
|
|
738
|
+
@if (cell.colDef && getSortDef(cell.colDef.key); as sortDef) {
|
|
739
|
+
<ng-icon
|
|
740
|
+
class="_sort-icon"
|
|
741
|
+
[svg]="sortDef.desc ? icons.tablerArrowDown : icons.tablerArrowUp"
|
|
742
|
+
/>
|
|
743
|
+
@if (sortDef.indexText) {
|
|
744
|
+
<span class="_sort-index">{{ sortDef.indexText }}</span>
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
@if (cell.isLastRow && cell.colDef && !cell.colDef.disableResizing) {
|
|
748
|
+
<div
|
|
749
|
+
class="_resizer"
|
|
750
|
+
(mousedown)="onResizerMousedown($event, cell.colDef)"
|
|
751
|
+
(dblclick)="onResizerDblClick($event, cell.colDef)"
|
|
752
|
+
></div>
|
|
753
|
+
}
|
|
754
|
+
</th>
|
|
755
|
+
}
|
|
756
|
+
</tr>
|
|
757
|
+
}
|
|
758
|
+
</thead>
|
|
759
|
+
<tbody>
|
|
760
|
+
@for (item of displayItems(); track trackByFn() ? trackByFn()!(item, $index) : $index; let rowIdx = $index) {
|
|
761
|
+
<tr
|
|
762
|
+
[attr.aria-selected]="selection.isSelected(item) ? 'true' : null"
|
|
763
|
+
[attr.aria-expanded]="getAriaExpanded(item)"
|
|
764
|
+
[style.background]="selection.isSelected(item) ? 'var(--trans-lighter)' : null"
|
|
765
|
+
(click)="onRowClick(item)"
|
|
766
|
+
(keydown)="onItemKeydown($event, item)"
|
|
767
|
+
>
|
|
768
|
+
@if (expanding.hasExpandable()) {
|
|
769
|
+
<td class="_expand-col">
|
|
770
|
+
@if (getItemDef(item)?.hasChildren) {
|
|
771
|
+
<sd-anchor (click)="onExpandClick($event, item)">
|
|
772
|
+
<ng-icon [svg]="isExpanded(item) ? icons.tablerChevronDown : icons.tablerChevronRight" />
|
|
773
|
+
</sd-anchor>
|
|
774
|
+
}
|
|
775
|
+
</td>
|
|
776
|
+
}
|
|
777
|
+
@if (selectMode()) {
|
|
778
|
+
<td class="_select-col">
|
|
779
|
+
<sd-checkbox
|
|
780
|
+
[value]="selection.isSelected(item)"
|
|
781
|
+
[canChangeFn]="selection.getCanChangeFn(item)"
|
|
782
|
+
(click)="onSelectCheckboxClick($event, item)"
|
|
783
|
+
[inline]="true"
|
|
784
|
+
[inset]="true"
|
|
785
|
+
[attr.title]="getSelectableTooltip(item)"
|
|
786
|
+
/>
|
|
787
|
+
</td>
|
|
788
|
+
}
|
|
789
|
+
@for (colDef of layout.columnDefs(); track colDef.key; let colIdx = $index) {
|
|
790
|
+
<td
|
|
791
|
+
[attr.data-r]="rowIdx"
|
|
792
|
+
[attr.data-c]="colIdx"
|
|
793
|
+
[class]="getDataCellClass(item, colDef, rowIdx, colIdx)"
|
|
794
|
+
[style]="getCellStyleWithIndent(item, colDef, colIdx)"
|
|
795
|
+
(click)="onCellClick($event, item)"
|
|
796
|
+
(focus)="onCellFocus(item)"
|
|
797
|
+
(keydown)="onCellKeydown($event, item, colDef.key)"
|
|
798
|
+
tabindex="0"
|
|
799
|
+
>
|
|
800
|
+
@if (getColumnCellTpl(colDef.key); as tpl) {
|
|
801
|
+
<ng-template
|
|
802
|
+
[ngTemplateOutlet]="tpl"
|
|
803
|
+
[ngTemplateOutletContext]="{
|
|
804
|
+
$implicit: item,
|
|
805
|
+
item: item,
|
|
806
|
+
index: rowIdx,
|
|
807
|
+
depth: getChildrenFn() !== undefined ? getItemDef(item).depth : 0,
|
|
808
|
+
edit: cellAgent.isCellEditMode({ r: rowIdx, c: colIdx })
|
|
809
|
+
}"
|
|
810
|
+
/>
|
|
811
|
+
}
|
|
812
|
+
</td>
|
|
813
|
+
}
|
|
814
|
+
</tr>
|
|
815
|
+
}
|
|
816
|
+
</tbody>
|
|
817
|
+
@if (layout.hasSummary()) {
|
|
818
|
+
<tfoot>
|
|
819
|
+
<tr>
|
|
820
|
+
@if (expanding.hasExpandable()) {
|
|
821
|
+
<td class="_expand-col"></td>
|
|
822
|
+
}
|
|
823
|
+
@if (selectMode()) {
|
|
824
|
+
<td class="_select-col"></td>
|
|
825
|
+
}
|
|
826
|
+
@for (colDef of layout.columnDefs(); track colDef.key) {
|
|
827
|
+
<td [style]="getFixedCellStyle(colDef)">
|
|
828
|
+
@if (getColumnSummaryTpl(colDef.key); as tpl) {
|
|
829
|
+
<ng-template [ngTemplateOutlet]="tpl" />
|
|
830
|
+
}
|
|
831
|
+
</td>
|
|
832
|
+
}
|
|
833
|
+
</tr>
|
|
834
|
+
</tfoot>
|
|
835
|
+
}
|
|
836
|
+
</table>
|
|
837
|
+
<div class="_resize-indicator" [style.display]="_isResizing() ? 'block' : 'none'" [style.left.px]="_resizeIndicatorLeft()"></div>
|
|
838
|
+
</div>
|
|
839
|
+
`, host: {
|
|
840
|
+
"[attr.data-sd-inset]": "inset()",
|
|
841
|
+
"(keydown.capture)": "onKeydownCapture($event)",
|
|
842
|
+
"(dblclick)": "onDblClick($event)",
|
|
843
|
+
"(blur.capture)": "onBlurCapture($event)",
|
|
844
|
+
}, styles: ["sd-sheet {\n display: block;\n position: relative;\n overflow: hidden;\n border: 1px solid var(--trans-lighter);\n}\nsd-sheet[data-sd-inset=true] {\n border: none;\n}\nsd-sheet > ._tool {\n display: flex;\n align-items: center;\n gap: var(--gap-sm);\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--trans-lighter);\n background: var(--theme-secondary-lightest);\n}\nsd-sheet > ._container {\n overflow: auto;\n width: 100%;\n height: 100%;\n}\nsd-sheet > ._container > table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\nsd-sheet > ._container > table > thead > tr > th {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n text-align: left;\n font-weight: bold;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n}\nsd-sheet > ._container > table > thead > tr > th:not(._select-col):not(._expand-col) {\n position: relative;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-icon {\n font-size: 0.85em;\n vertical-align: middle;\n margin-left: 0.25em;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-index {\n font-size: 0.75em;\n vertical-align: super;\n}\nsd-sheet > ._container > table > thead > tr > th > ._resizer {\n position: absolute;\n top: 0;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: col-resize;\n z-index: 3;\n}\nsd-sheet > ._container > table > tbody > tr > td {\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n white-space: nowrap;\n}\nsd-sheet > ._container > table > tbody > tr > td:focus {\n outline: 2px solid var(--theme-primary-default);\n outline-offset: -2px;\n}\nsd-sheet > ._container > table > thead > tr > th._select-col,\nsd-sheet > ._container > table > tbody > tr > td._select-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > thead > tr > th._expand-col,\nsd-sheet > ._container > table > tbody > tr > td._expand-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > tfoot > tr > td {\n position: sticky;\n bottom: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-sheet > ._container > ._resize-indicator {\n position: absolute;\n top: 0;\n width: 2px;\n height: 100%;\n background: var(--theme-primary-default);\n z-index: 10;\n pointer-events: none;\n}"] }]
|
|
845
|
+
}], () => [], { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], getItemSelectableFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemSelectableFn", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], useAutoSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "useAutoSort", required: false }] }], visiblePageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePageCount", required: false }] }], totalPageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPageCount", required: false }] }], itemsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPage", required: false }] }], focusMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusMode", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], getItemCellClassFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellClassFn", required: false }] }], getItemCellStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellStyleFn", required: false }] }], hideConfigBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideConfigBar", required: false }] }], itemKeydown: [{ type: i0.Output, args: ["itemKeydown"] }], cellKeydown: [{ type: i0.Output, args: ["cellKeydown"] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }, { type: i0.Output, args: ["selectedItemsChange"] }], expandedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedItems", required: false }] }, { type: i0.Output, args: ["expandedItemsChange"] }], sorts: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorts", required: false }] }, { type: i0.Output, args: ["sortsChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], columnControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSheetColumnDirective), { isSignal: true }] }] }); })();
|
|
846
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSheetControl, { className: "SdSheetControl", filePath: "packages/angular/src/ui/data/sheet/sd-sheet.control.ts", lineNumber: 337 }); })();
|