@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,395 @@
|
|
|
1
|
+
import {
|
|
2
|
+
booleanAttribute,
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
input,
|
|
7
|
+
model,
|
|
8
|
+
ViewEncapsulation,
|
|
9
|
+
} from "@angular/core";
|
|
10
|
+
import { setupInvalid } from "../../../core/utils/setups/setupInvalid";
|
|
11
|
+
import {
|
|
12
|
+
textfieldTypeHandlers,
|
|
13
|
+
type TSdTextfieldTypes,
|
|
14
|
+
} from "./sd-textfield-type-handlers";
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: "sd-textfield",
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
encapsulation: ViewEncapsulation.None,
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [],
|
|
22
|
+
template: `
|
|
23
|
+
<div
|
|
24
|
+
[style]="inputStyle()"
|
|
25
|
+
[class]="inputClass() ? '_contents ' + inputClass() : '_contents'"
|
|
26
|
+
[attr.title]="title() ?? placeholder()"
|
|
27
|
+
[style.visibility]="!readonly() && !disabled() ? 'hidden' : undefined"
|
|
28
|
+
>
|
|
29
|
+
@if (controlType() === "password") {
|
|
30
|
+
<span class="tx-trans-light">****</span>
|
|
31
|
+
} @else {
|
|
32
|
+
@if (controlValue()) {
|
|
33
|
+
<pre>{{ controlValueText() ?? controlValue() }} </pre>
|
|
34
|
+
} @else if (placeholder()) {
|
|
35
|
+
<span class="tx-trans-lighter">{{ placeholder() }}</span>
|
|
36
|
+
} @else {
|
|
37
|
+
<span> </span>
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</div>
|
|
41
|
+
@if (!readonly() && !disabled()) {
|
|
42
|
+
<input
|
|
43
|
+
[style]="inputStyle()"
|
|
44
|
+
[class]="inputClass()"
|
|
45
|
+
[attr.title]="title() ?? placeholder()"
|
|
46
|
+
[attr.placeholder]="placeholder()"
|
|
47
|
+
[attr.min]="min()"
|
|
48
|
+
[attr.max]="max()"
|
|
49
|
+
[type]="controlType()"
|
|
50
|
+
[attr.inputmode]="type() === 'number' ? 'numeric' : undefined"
|
|
51
|
+
[value]="controlValue()"
|
|
52
|
+
[attr.autocomplete]="autocomplete()"
|
|
53
|
+
[attr.step]="controlStep()"
|
|
54
|
+
(input)="onInput($event)"
|
|
55
|
+
(paste)="onInputPaste($event)"
|
|
56
|
+
/>
|
|
57
|
+
}
|
|
58
|
+
`,
|
|
59
|
+
styles: [
|
|
60
|
+
/* language=SCSS */ `
|
|
61
|
+
@use "sass:map";
|
|
62
|
+
|
|
63
|
+
@use "../../../../scss/commons/variables";
|
|
64
|
+
@use "../../../../scss/commons/mixins";
|
|
65
|
+
|
|
66
|
+
sd-textfield {
|
|
67
|
+
display: block;
|
|
68
|
+
position: relative;
|
|
69
|
+
|
|
70
|
+
> input,
|
|
71
|
+
> ._contents {
|
|
72
|
+
@include mixins.form-control-base();
|
|
73
|
+
|
|
74
|
+
overflow: auto;
|
|
75
|
+
width: 100%;
|
|
76
|
+
|
|
77
|
+
border: 1px solid var(--trans-lighter);
|
|
78
|
+
border-radius: var(--border-radius-default);
|
|
79
|
+
background: var(--theme-secondary-lightest);
|
|
80
|
+
|
|
81
|
+
&:focus {
|
|
82
|
+
outline: none;
|
|
83
|
+
border-color: var(--theme-secondary-default);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&[type="date"],
|
|
87
|
+
&[type="month"],
|
|
88
|
+
&[type="datetime-local"] {
|
|
89
|
+
padding-top: calc(var(--gap-sm) - 1px);
|
|
90
|
+
padding-bottom: calc(var(--gap-sm) - 1px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&::-webkit-scrollbar {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&::-webkit-input-placeholder {
|
|
98
|
+
color: var(--text-trans-lighter);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&::-webkit-outer-spin-button,
|
|
102
|
+
&::-webkit-inner-spin-button {
|
|
103
|
+
-webkit-appearance: none;
|
|
104
|
+
margin: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::-webkit-calendar-picker-indicator {
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
margin: auto;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
> ._contents {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&[data-sd-type="number"] {
|
|
118
|
+
> input,
|
|
119
|
+
> ._contents {
|
|
120
|
+
text-align: right;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@each $key, $val in map.get(variables.$vars, theme) {
|
|
125
|
+
&[data-sd-theme="#{$key}"] {
|
|
126
|
+
> input,
|
|
127
|
+
> ._contents {
|
|
128
|
+
background: var(--theme-#{$key}-lightest);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&[data-sd-size="sm"] {
|
|
134
|
+
> input,
|
|
135
|
+
> ._contents {
|
|
136
|
+
padding: var(--gap-xs) var(--gap-sm);
|
|
137
|
+
|
|
138
|
+
&[type="date"],
|
|
139
|
+
&[type="month"],
|
|
140
|
+
&[type="datetime-local"],
|
|
141
|
+
&[type="color"] {
|
|
142
|
+
padding-top: calc(var(--gap-xs) - 1px);
|
|
143
|
+
padding-bottom: calc(var(--gap-xs) - 1px);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&[data-sd-size="lg"] {
|
|
149
|
+
> input,
|
|
150
|
+
> ._contents {
|
|
151
|
+
padding: var(--gap-default) var(--gap-lg);
|
|
152
|
+
|
|
153
|
+
&[type="date"],
|
|
154
|
+
&[type="month"],
|
|
155
|
+
&[type="datetime-local"],
|
|
156
|
+
&[type="color"] {
|
|
157
|
+
padding-top: calc(var(--gap-default) - 1px);
|
|
158
|
+
padding-bottom: calc(var(--gap-default) - 1px);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&[data-sd-inline="true"] {
|
|
164
|
+
display: inline-block;
|
|
165
|
+
vertical-align: top;
|
|
166
|
+
|
|
167
|
+
> input,
|
|
168
|
+
> ._contents {
|
|
169
|
+
width: auto;
|
|
170
|
+
vertical-align: top;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&[data-sd-inset="true"] {
|
|
175
|
+
> ._contents {
|
|
176
|
+
display: block;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
> input {
|
|
180
|
+
position: absolute;
|
|
181
|
+
top: 0;
|
|
182
|
+
left: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
> input,
|
|
186
|
+
> ._contents {
|
|
187
|
+
width: 100%;
|
|
188
|
+
border: none;
|
|
189
|
+
border-radius: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
> input:focus {
|
|
193
|
+
outline: 1px solid var(--theme-primary-default);
|
|
194
|
+
outline-offset: -1px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&[data-sd-type="month"] {
|
|
198
|
+
> input,
|
|
199
|
+
> ._contents {
|
|
200
|
+
width: 8.25em;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&[data-sd-type="date"] {
|
|
205
|
+
> input,
|
|
206
|
+
> ._contents {
|
|
207
|
+
width: 8.25em;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&[data-sd-type="datetime-local"] {
|
|
212
|
+
> input,
|
|
213
|
+
> ._contents {
|
|
214
|
+
width: 14em;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&[data-sd-type="year"] {
|
|
219
|
+
> input,
|
|
220
|
+
> ._contents {
|
|
221
|
+
width: 4em;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&[data-sd-type="color"] {
|
|
226
|
+
> input,
|
|
227
|
+
> ._contents {
|
|
228
|
+
height: calc(
|
|
229
|
+
var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-sm) * 2
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&[data-sd-size="sm"] {
|
|
234
|
+
> input,
|
|
235
|
+
> ._contents {
|
|
236
|
+
height: calc(
|
|
237
|
+
var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-xs) * 2
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&[data-sd-size="lg"] {
|
|
243
|
+
> input,
|
|
244
|
+
> ._contents {
|
|
245
|
+
height: calc(
|
|
246
|
+
var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-default) * 2
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
&[data-sd-disabled="true"] {
|
|
254
|
+
> ._contents {
|
|
255
|
+
display: block;
|
|
256
|
+
background: var(--theme-gray-lightest);
|
|
257
|
+
color: var(--text-trans-light);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&[data-sd-inset="true"] {
|
|
261
|
+
> ._contents {
|
|
262
|
+
background: var(--control-color);
|
|
263
|
+
color: var(--text-trans-default);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&[data-sd-readonly="true"] {
|
|
269
|
+
> ._contents {
|
|
270
|
+
display: block;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
`,
|
|
275
|
+
],
|
|
276
|
+
host: {
|
|
277
|
+
"[attr.data-sd-type]": "controlType()",
|
|
278
|
+
"[attr.data-sd-disabled]": "disabled()",
|
|
279
|
+
"[attr.data-sd-readonly]": "readonly()",
|
|
280
|
+
"[attr.data-sd-inline]": "inline()",
|
|
281
|
+
"[attr.data-sd-inset]": "inset()",
|
|
282
|
+
"[attr.data-sd-size]": "size()",
|
|
283
|
+
"[attr.data-sd-theme]": "theme()",
|
|
284
|
+
},
|
|
285
|
+
})
|
|
286
|
+
export class SdTextfieldControl<K extends keyof TSdTextfieldTypes> {
|
|
287
|
+
value = model<TSdTextfieldTypes[K]>();
|
|
288
|
+
|
|
289
|
+
type = input.required<K>();
|
|
290
|
+
placeholder = input<string>();
|
|
291
|
+
title = input<string>();
|
|
292
|
+
inputStyle = input<string>();
|
|
293
|
+
inputClass = input<string>();
|
|
294
|
+
|
|
295
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
296
|
+
readonly = input(false, { transform: booleanAttribute });
|
|
297
|
+
|
|
298
|
+
required = input(false, { transform: booleanAttribute });
|
|
299
|
+
min = input<TSdTextfieldTypes[K]>();
|
|
300
|
+
max = input<TSdTextfieldTypes[K]>();
|
|
301
|
+
minlength = input<number>();
|
|
302
|
+
maxlength = input<number>();
|
|
303
|
+
pattern = input<string>();
|
|
304
|
+
validatorFn = input<(value: TSdTextfieldTypes[K] | undefined) => string | undefined>();
|
|
305
|
+
format = input<string>();
|
|
306
|
+
|
|
307
|
+
step = input<number>();
|
|
308
|
+
autocomplete = input<string>();
|
|
309
|
+
useNumberComma = input(true, { transform: booleanAttribute });
|
|
310
|
+
minDigits = input<number>();
|
|
311
|
+
|
|
312
|
+
inline = input(false, { transform: booleanAttribute });
|
|
313
|
+
inset = input(false, { transform: booleanAttribute });
|
|
314
|
+
size = input<"sm" | "lg">();
|
|
315
|
+
theme = input<
|
|
316
|
+
"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray"
|
|
317
|
+
>();
|
|
318
|
+
|
|
319
|
+
private readonly handler = computed(() => textfieldTypeHandlers[this.type()]);
|
|
320
|
+
|
|
321
|
+
controlType = computed(() => this.handler().controlType);
|
|
322
|
+
|
|
323
|
+
controlStep = computed(() => this.handler().getControlStep(this.step()));
|
|
324
|
+
|
|
325
|
+
controlValue = computed(() => {
|
|
326
|
+
const value = this.value();
|
|
327
|
+
if (value == null) return "";
|
|
328
|
+
return this.handler().toControlValue(value, {
|
|
329
|
+
useNumberComma: this.useNumberComma(),
|
|
330
|
+
format: this.format(),
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
controlValueText = computed(() => {
|
|
335
|
+
const value = this.value();
|
|
336
|
+
if (value == null) return undefined;
|
|
337
|
+
return this.handler().toDisplayText(value, {
|
|
338
|
+
minDigits: this.minDigits(),
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
constructor() {
|
|
343
|
+
setupInvalid(() => {
|
|
344
|
+
const value = this.value();
|
|
345
|
+
const handlerErrors = this.handler().validate(value, {
|
|
346
|
+
required: this.required(),
|
|
347
|
+
min: this.min(),
|
|
348
|
+
max: this.max(),
|
|
349
|
+
minlength: this.minlength(),
|
|
350
|
+
maxlength: this.maxlength(),
|
|
351
|
+
pattern: this.pattern(),
|
|
352
|
+
format: this.format(),
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
const errorMessages = [...handlerErrors];
|
|
356
|
+
|
|
357
|
+
if (this.validatorFn()) {
|
|
358
|
+
const message = this.validatorFn()!(value);
|
|
359
|
+
if (message !== undefined) {
|
|
360
|
+
errorMessages.push(message);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return errorMessages.join("\r\n");
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
onInput(event: Event): void {
|
|
369
|
+
const inputEl = event.target as HTMLInputElement;
|
|
370
|
+
if (inputEl.value === "") {
|
|
371
|
+
this.value.set(undefined);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const parsed = this.handler().parse(inputEl.value, { format: this.format() });
|
|
375
|
+
if (parsed === undefined) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
this.value.set(parsed as TSdTextfieldTypes[K]);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
onInputPaste(event: ClipboardEvent): void {
|
|
382
|
+
const text = event.clipboardData?.getData("text/plain").trim();
|
|
383
|
+
if (text == null || text === "") {
|
|
384
|
+
this.value.set(undefined);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const parsed = this.handler().parse(text, { format: this.format() });
|
|
388
|
+
if (parsed === undefined) {
|
|
389
|
+
const inputEl = event.target as HTMLInputElement;
|
|
390
|
+
inputEl.value = this.controlValue();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
this.value.set(parsed as TSdTextfieldTypes[K] | undefined);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
output,
|
|
6
|
+
viewChild,
|
|
7
|
+
ViewEncapsulation,
|
|
8
|
+
} from "@angular/core";
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: "sd-form",
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
encapsulation: ViewEncapsulation.None,
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [],
|
|
16
|
+
template: `
|
|
17
|
+
<form #formEl novalidate (submit)="handleSubmit($event)">
|
|
18
|
+
<ng-content />
|
|
19
|
+
<button hidden type="submit"></button>
|
|
20
|
+
</form>
|
|
21
|
+
`,
|
|
22
|
+
})
|
|
23
|
+
export class SdFormControl {
|
|
24
|
+
formElRef = viewChild.required<any, ElementRef<HTMLFormElement>>("formEl", {
|
|
25
|
+
read: ElementRef,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
get formEl() {
|
|
29
|
+
return this.formElRef().nativeElement;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
formSubmit = output<SubmitEvent>();
|
|
33
|
+
formInvalid = output();
|
|
34
|
+
|
|
35
|
+
requestSubmit() {
|
|
36
|
+
this.formEl.requestSubmit();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
handleSubmit(event: SubmitEvent) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
|
|
43
|
+
if (this.formEl.checkValidity()) {
|
|
44
|
+
this.formSubmit.emit(event);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 자동 메시지 및 포커싱
|
|
49
|
+
this.formEl.reportValidity();
|
|
50
|
+
this.formInvalid.emit();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
ViewEncapsulation,
|
|
5
|
+
} from "@angular/core";
|
|
6
|
+
import { setupRipple } from "../../../core/utils/setups/setupRipple";
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: "sd-select-button",
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
encapsulation: ViewEncapsulation.None,
|
|
12
|
+
standalone: true,
|
|
13
|
+
imports: [],
|
|
14
|
+
template: `
|
|
15
|
+
<ng-content />
|
|
16
|
+
`,
|
|
17
|
+
styles: [
|
|
18
|
+
/* language=SCSS */ `
|
|
19
|
+
sd-select-button {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
padding: var(--gap-sm) var(--gap-default);
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
border-left: 1px solid var(--trans-lighter);
|
|
26
|
+
position: relative;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--trans-lighter);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
],
|
|
35
|
+
host: {
|
|
36
|
+
"[attr.tabindex]": "0",
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
export class SdSelectButtonControl {
|
|
40
|
+
constructor() {
|
|
41
|
+
setupRipple(() => true);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
afterNextRender,
|
|
3
|
+
booleanAttribute,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
Component,
|
|
6
|
+
computed,
|
|
7
|
+
DestroyRef,
|
|
8
|
+
ElementRef,
|
|
9
|
+
forwardRef,
|
|
10
|
+
inject,
|
|
11
|
+
input,
|
|
12
|
+
signal,
|
|
13
|
+
ViewEncapsulation,
|
|
14
|
+
} from "@angular/core";
|
|
15
|
+
import { SdSelectControl } from "./sd-select.control";
|
|
16
|
+
import { SdCheckboxControl } from "../checkbox/sd-checkbox.control";
|
|
17
|
+
import { SdGapControl } from "../../layout/sd-gap.control";
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
selector: "sd-select-item",
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
encapsulation: ViewEncapsulation.None,
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [SdCheckboxControl, SdGapControl],
|
|
25
|
+
template: `
|
|
26
|
+
<div class="_content" tabindex="0" (click)="onClick()" (keydown)="onKeydown($event)">
|
|
27
|
+
@if (_parentControl.selectMode() === "multi") {
|
|
28
|
+
<sd-checkbox [value]="isSelected()" [inline]="true" />
|
|
29
|
+
<sd-gap [width]="'sm'" />
|
|
30
|
+
}
|
|
31
|
+
<ng-content />
|
|
32
|
+
</div>
|
|
33
|
+
`,
|
|
34
|
+
styles: [
|
|
35
|
+
/* language=SCSS */ `
|
|
36
|
+
@use "../../../../scss/commons/mixins";
|
|
37
|
+
|
|
38
|
+
sd-select-item {
|
|
39
|
+
display: block;
|
|
40
|
+
|
|
41
|
+
> ._content {
|
|
42
|
+
padding: var(--gap-sm) var(--gap-default);
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background: var(--trans-lighter);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus {
|
|
50
|
+
outline: none;
|
|
51
|
+
background: var(--trans-lighter);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-sd-selected="true"] > ._content {
|
|
56
|
+
background: var(--trans-lighter);
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[data-sd-disabled="true"] {
|
|
61
|
+
> ._content {
|
|
62
|
+
opacity: 0.3;
|
|
63
|
+
cursor: default;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&[data-sd-hidden="true"] {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`,
|
|
73
|
+
],
|
|
74
|
+
host: {
|
|
75
|
+
"[attr.data-sd-selected]": "isSelected()",
|
|
76
|
+
"[attr.data-sd-disabled]": "disabled()",
|
|
77
|
+
"[attr.data-sd-hidden]": "hidden()",
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
export class SdSelectItemControl<T> {
|
|
81
|
+
protected readonly _parentControl = inject<SdSelectControl<T>>(
|
|
82
|
+
forwardRef(() => SdSelectControl),
|
|
83
|
+
);
|
|
84
|
+
private readonly _elRef = inject(ElementRef<HTMLElement>);
|
|
85
|
+
private readonly _destroyRef = inject(DestroyRef);
|
|
86
|
+
|
|
87
|
+
value = input.required<T>();
|
|
88
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
89
|
+
hidden = input(false, { transform: booleanAttribute });
|
|
90
|
+
|
|
91
|
+
contentHTML = signal("");
|
|
92
|
+
|
|
93
|
+
isSelected = computed(() => {
|
|
94
|
+
const parentValue = this._parentControl.value();
|
|
95
|
+
const itemValue = this.value();
|
|
96
|
+
if (this._parentControl.selectMode() === "multi") {
|
|
97
|
+
const arr = parentValue as T[] | undefined;
|
|
98
|
+
return arr != null && arr.includes(itemValue);
|
|
99
|
+
}
|
|
100
|
+
return parentValue === itemValue;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
constructor() {
|
|
104
|
+
afterNextRender(() => {
|
|
105
|
+
const contentEl = this._elRef.nativeElement.querySelector("._content");
|
|
106
|
+
if (contentEl == null) return;
|
|
107
|
+
|
|
108
|
+
this.contentHTML.set(contentEl.innerHTML);
|
|
109
|
+
|
|
110
|
+
const observer = new MutationObserver(() => {
|
|
111
|
+
this.contentHTML.set(contentEl.innerHTML);
|
|
112
|
+
});
|
|
113
|
+
observer.observe(contentEl, { childList: true, characterData: true, subtree: true });
|
|
114
|
+
|
|
115
|
+
this._destroyRef.onDestroy(() => observer.disconnect());
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
onClick(): void {
|
|
120
|
+
if (this.disabled()) return;
|
|
121
|
+
this._parentControl.selectItem(this.value());
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
onKeydown(event: KeyboardEvent): void {
|
|
125
|
+
if (event.key === " ") {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
event.stopPropagation();
|
|
128
|
+
if (this.disabled()) return;
|
|
129
|
+
// Space always toggles without closing
|
|
130
|
+
this._parentControl.toggleItem(this.value());
|
|
131
|
+
}
|
|
132
|
+
if (event.key === "Enter") {
|
|
133
|
+
event.preventDefault();
|
|
134
|
+
event.stopPropagation();
|
|
135
|
+
if (this.disabled()) return;
|
|
136
|
+
if (this._parentControl.selectMode() === "single") {
|
|
137
|
+
this._parentControl.selectItem(this.value());
|
|
138
|
+
} else {
|
|
139
|
+
this._parentControl.toggleItem(this.value());
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|