@sdcorejs/angular 19.2.15 → 19.3.1
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 +9 -7
- package/assets/STYLE-GUIDE.md +6 -3
- package/assets/THEME.md +166 -0
- package/assets/fonts/fonts.scss +1 -1
- package/assets/scss/ckeditor5.scss +2 -2
- package/assets/scss/core/_inline-edit.scss +3 -3
- package/assets/scss/core/_read-state-panel.scss +2 -2
- package/assets/scss/core/color.scss +4 -2
- package/assets/scss/core/form.scss +35 -12
- package/assets/scss/core/scrollbar.scss +3 -3
- package/assets/scss/core/utilities/_base.scss +5 -5
- package/assets/scss/core/utilities/_typography.scss +22 -22
- package/assets/scss/sd-core.scss +12 -0
- package/assets/scss/themes/_component-tokens.scss +261 -0
- package/assets/scss/themes/_presets.scss +3 -0
- package/assets/scss/themes/_ramps.scss +56 -0
- package/assets/scss/themes/_scales.scss +90 -0
- package/assets/scss/themes/_semantic.scss +22 -0
- package/assets/scss/themes/default.scss +113 -10
- package/assets/scss/themes/material-theme.scss +3 -0
- package/components/breadcrumb/src/breadcrumb.component.d.ts +2 -1
- package/components/data-state/src/data-state.component.d.ts +6 -2
- package/components/file-explorer/index.d.ts +1 -0
- package/components/file-explorer/src/components/actions.component.d.ts +40 -0
- package/components/file-explorer/src/components/command-sheet.component.d.ts +49 -0
- package/components/file-explorer/src/components/folder-tree.component.d.ts +41 -11
- package/components/file-explorer/src/components/item-list.component.d.ts +68 -13
- package/components/file-explorer/src/components/menu-trigger.component.d.ts +27 -0
- package/components/file-explorer/src/components/preview-panel.component.d.ts +12 -7
- package/components/file-explorer/src/file-explorer-actions.d.ts +80 -0
- package/components/file-explorer/src/file-explorer-column.directive.d.ts +20 -0
- package/components/file-explorer/src/file-explorer-move.d.ts +12 -0
- package/components/file-explorer/src/file-explorer-normalize.d.ts +72 -0
- package/components/file-explorer/src/file-explorer.component.d.ts +106 -23
- package/components/file-explorer/src/file-explorer.model.d.ts +210 -29
- package/components/file-explorer/src/file-explorer.utils.d.ts +2 -4
- package/components/file-explorer/src/file-explorer.view-model.d.ts +78 -5
- package/components/form-generic/index.d.ts +1 -1
- package/components/form-generic/src/components/form-builder/canvas/canvas.component.d.ts +86 -0
- package/components/form-generic/src/components/form-builder/canvas/drop-feedback.component.d.ts +42 -0
- package/components/form-generic/src/components/form-builder/canvas/field-preview.component.d.ts +43 -0
- package/components/form-generic/src/components/form-builder/components/attribute-expression/attribute-expression.component.d.ts +34 -17
- package/components/form-generic/src/components/form-builder/components/attribute-parameter/attribute-parameter.component.d.ts +12 -31
- package/components/form-generic/src/components/form-builder/components/attribute-selection/components/build-queries/build-queries.component.d.ts +64 -30
- package/components/form-generic/src/components/form-builder/components/attribute-selection/components/build-variables/build-variables.component.d.ts +46 -36
- package/components/form-generic/src/components/form-builder/components/configure-validation/configure-validation.component.d.ts +34 -22
- package/components/form-generic/src/components/form-builder/components/html/attribute/components/build-queries/build-queries.component.d.ts +21 -33
- package/components/form-generic/src/components/form-builder/components/value-box/mapping-box.component.d.ts +12 -0
- package/components/form-generic/src/components/form-builder/components/value-box/mapping-summary.d.ts +17 -0
- package/components/form-generic/src/components/form-builder/components/value-box/value-box.component.d.ts +24 -0
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +94 -160
- package/components/form-generic/src/components/form-builder/inspector/inspector.component.d.ts +216 -0
- package/components/form-generic/src/components/form-builder/inspector/options-editor.component.d.ts +32 -0
- package/components/form-generic/src/components/form-builder/inspector/toggle-row.component.d.ts +17 -0
- package/components/form-generic/src/components/form-builder/palette/palette.component.d.ts +50 -0
- package/components/form-generic/src/components/form-builder/palette/structure.component.d.ts +36 -0
- package/components/form-generic/src/components/form-builder/preview/preview.component.d.ts +38 -0
- package/components/form-generic/src/components/form-builder/state/builder-commands.d.ts +63 -0
- package/components/form-generic/src/components/form-builder/state/builder-document.d.ts +85 -0
- package/components/form-generic/src/components/form-builder/state/builder-drag.d.ts +55 -0
- package/components/form-generic/src/components/form-builder/state/builder-history.d.ts +33 -0
- package/components/form-generic/src/components/form-builder/state/builder-html.d.ts +6 -0
- package/components/form-generic/src/components/form-builder/state/builder-layout.d.ts +132 -0
- package/components/form-generic/src/components/form-builder/state/builder-palette.d.ts +39 -0
- package/components/form-generic/src/components/form-builder/state/builder-store.d.ts +142 -0
- package/components/form-generic/src/components/form-render/components/index.d.ts +0 -1
- package/components/form-generic/src/components/form-render/components/item/components/checkbox/checkbox.component.d.ts +10 -29
- package/components/form-generic/src/components/form-render/components/item/components/chip-calendar/chip-calendar.component.d.ts +11 -26
- package/components/form-generic/src/components/form-render/components/item/components/chip-string/chip-string.component.d.ts +11 -26
- package/components/form-generic/src/components/form-render/components/item/components/datetime/datetime.component.d.ts +15 -29
- package/components/form-generic/src/components/form-render/components/item/components/html/html.component.d.ts +14 -28
- package/components/form-generic/src/components/form-render/components/item/components/index.d.ts +0 -1
- package/components/form-generic/src/components/form-render/components/item/components/number/number.component.d.ts +21 -26
- package/components/form-generic/src/components/form-render/components/item/components/radio/radio.component.d.ts +15 -32
- package/components/form-generic/src/components/form-render/components/item/components/select/select.component.d.ts +17 -37
- package/components/form-generic/src/components/form-render/components/item/components/textarea/textarea.component.d.ts +11 -26
- package/components/form-generic/src/components/form-render/components/item/components/textfield/textfield.component.d.ts +29 -28
- package/components/form-generic/src/components/form-render/components/item/components/upload/upload.component.d.ts +15 -32
- package/components/form-generic/src/components/form-render/components/item/item.component.d.ts +19 -28
- package/components/form-generic/src/components/form-render/form-render-catalog.d.ts +19 -0
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +106 -31
- package/components/form-generic/src/components/form-render/form-render.context.d.ts +24 -0
- package/components/form-generic/src/components/index.d.ts +0 -1
- package/components/form-generic/src/configurations/form-generic-breakpoints.d.ts +15 -0
- package/components/form-generic/src/configurations/form-generic-config.token.d.ts +17 -0
- package/components/form-generic/src/configurations/form-generic.provider.d.ts +17 -0
- package/components/form-generic/src/configurations/index.d.ts +3 -2
- package/components/form-generic/src/layout/form-generic-layout.d.ts +29 -0
- package/components/form-generic/src/models/form-generic-config.model.d.ts +83 -0
- package/components/form-generic/src/models/form-generic-field.model.d.ts +148 -0
- package/components/form-generic/src/models/form-generic-schema.d.ts +36 -0
- package/components/form-generic/src/models/form-generic-schema.model.d.ts +73 -0
- package/components/form-generic/src/models/index.d.ts +4 -9
- package/components/form-generic/src/pipes/component-viewed.pipe.d.ts +4 -7
- package/components/form-generic/src/pipes/html.pipe.d.ts +3 -5
- package/components/form-generic/src/pipes/hyperlink.pipe.d.ts +7 -2
- package/components/form-generic/src/pipes/index.d.ts +0 -4
- package/components/form-generic/src/presets/form-generic-presets.d.ts +56 -0
- package/components/form-generic/src/rules/form-generic-display.d.ts +23 -0
- package/components/form-generic/src/rules/form-generic-filter.d.ts +34 -0
- package/components/form-generic/src/rules/form-generic-references.d.ts +15 -0
- package/components/form-generic/src/rules/form-generic-validation.d.ts +24 -0
- package/components/form-generic/src/rules/form-generic-values.d.ts +23 -0
- package/components/form-generic/src/services/form-generic.service.d.ts +14 -18
- package/components/form-generic/src/services/form-render.service.d.ts +8 -5
- package/components/highlight/index.d.ts +1 -0
- package/components/highlight/src/highlight.component.d.ts +23 -0
- package/components/image-editor/index.d.ts +2 -0
- package/components/image-editor/src/image-editor.component.d.ts +194 -0
- package/components/image-editor/src/image-editor.export.d.ts +52 -0
- package/components/image-editor/src/image-editor.geometry.d.ts +113 -0
- package/components/image-editor/src/image-editor.model.d.ts +265 -0
- package/components/image-editor/src/image-editor.source.d.ts +58 -0
- package/components/image-editor/src/image-editor.state.d.ts +64 -0
- package/components/index.d.ts +3 -0
- package/components/inform/src/inform.component.d.ts +5 -2
- package/components/kanban/index.d.ts +3 -0
- package/components/kanban/src/kanban.component.d.ts +83 -0
- package/components/kanban/src/kanban.model.d.ts +65 -0
- package/components/kanban/src/kanban.templates.d.ts +30 -0
- package/components/kanban/src/kanban.utils.d.ts +5 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +1 -1
- package/components/preview/index.d.ts +1 -0
- package/components/preview/src/preview-video/preview-video.component.d.ts +49 -0
- package/components/query-builder/src/query-builder.model.d.ts +1 -1
- package/components/section/src/section-item/section-item.component.d.ts +2 -1
- package/components/section/src/section.component.d.ts +5 -1
- package/components/tab/src/tab-group.component.d.ts +3 -1
- package/components/table/src/models/table-option-export.model.d.ts +6 -0
- package/components/table/src/services/field-value.util.d.ts +14 -0
- package/directives/src/sd-tooltip.directive.d.ts +8 -0
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +6 -6
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +34 -27
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +35 -5
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +13 -11
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-card.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +7 -3
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +2256 -129
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +6482 -6537
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-highlight.mjs +63 -0
- package/fesm2022/sdcorejs-angular-components-highlight.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +2088 -0
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +8 -4
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +441 -0
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +40 -22
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +129 -7
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +33 -24
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +12 -7
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +28 -4
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +7 -3
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +11 -3
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +308 -113
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +14 -5
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +3 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +98 -12
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +148 -5
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +18 -3
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +18 -3
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +16 -6
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +16 -6
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +3 -3
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +17 -3
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +28 -4
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +27 -2
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +244 -0
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms-select.mjs +497 -6
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +21 -3
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms.mjs +8 -0
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +1729 -271
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-auth.mjs +35 -3
- package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +19 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +39 -48
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +196 -8
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +10 -3
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +5 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +107 -7
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +458 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +169 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs +1 -0
- package/fesm2022/sdcorejs-angular-utilities.mjs.map +1 -1
- package/forms/autocomplete/src/autocomplete.component.d.ts +19 -1
- package/forms/chip/src/chip.component.d.ts +13 -1
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +13 -1
- package/forms/date/src/date.component.d.ts +7 -1
- package/forms/datetime/src/datetime.component.d.ts +7 -1
- package/forms/index.d.ts +1 -0
- package/forms/inline-text/src/inline-text.component.d.ts +1 -1
- package/forms/input/src/input.component.d.ts +21 -4
- package/forms/input-number/src/input-number.component.d.ts +12 -1
- package/forms/label/src/label.component.d.ts +16 -1
- package/forms/models/index.d.ts +1 -0
- package/forms/models/src/sd-label-placement.d.ts +14 -0
- package/forms/segmented/index.d.ts +2 -0
- package/forms/segmented/src/segmented.component.d.ts +57 -0
- package/forms/segmented/src/segmented.model.d.ts +28 -0
- package/forms/select/src/select.component.d.ts +66 -3
- package/forms/src/forms.module.d.ts +7 -6
- package/forms/textarea/src/textarea.component.d.ts +9 -1
- package/i18n/src/en.d.ts +339 -54
- package/i18n/src/i18n.service.d.ts +5 -0
- package/modules/auth/configurations/auth.configuration.d.ts +4 -3
- package/modules/icon/src/icon.model.d.ts +10 -0
- package/modules/layout/configurations/layout.configuration.d.ts +2 -2
- package/modules/permission/src/configurations/permission.configuration.d.ts +3 -2
- package/package.json +22 -2
- package/services/api/index.d.ts +1 -0
- package/services/api/src/api-handler-registry.d.ts +49 -0
- package/services/api/src/api-host.d.ts +15 -0
- package/services/api/src/api-route-configurations.d.ts +20 -0
- package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +3 -0
- package/services/confirm/src/lib/confirm.service.d.ts +13 -0
- package/services/notify/src/components/toast/toast.component.d.ts +8 -0
- package/services/notify/src/components/toast-container.component.d.ts +11 -2
- package/services/notify/src/notify.model.d.ts +8 -0
- package/utilities/extensions/index.d.ts +2 -0
- package/utilities/extensions/src/editor-html-sanitizer.d.ts +13 -0
- package/utilities/extensions/src/text-search.d.ts +34 -0
- package/utilities/extensions/src/url-safety.d.ts +17 -0
- package/utilities/index.d.ts +1 -0
- package/utilities/theme/index.d.ts +1 -0
- package/utilities/theme/src/theme-tokens.d.ts +22 -0
- package/components/form-generic/src/components/form-builder/components/attribute-expression/form-expression-query-adapter.d.ts +0 -6
- package/components/form-generic/src/components/form-builder/components/attribute-input/attribute-input.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/attribute-input-number/attribute-input-number.component.d.ts +0 -13
- package/components/form-generic/src/components/form-builder/components/attribute-select/attribute-select.component.d.ts +0 -25
- package/components/form-generic/src/components/form-builder/components/attribute-selection/attribute-selection.component.d.ts +0 -27
- package/components/form-generic/src/components/form-builder/components/attribute-switch/attribute-switch.component.d.ts +0 -13
- package/components/form-generic/src/components/form-builder/components/attribute-table/attribute-table.component.d.ts +0 -33
- package/components/form-generic/src/components/form-builder/components/attribute-template/attribute-template.component.d.ts +0 -12
- package/components/form-generic/src/components/form-builder/components/attribute-textarea/attribute-textarea.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/checkbox/attribute/checkbox-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/checkbox/control/checkbox-control.component.d.ts +0 -8
- package/components/form-generic/src/components/form-builder/components/checkbox/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/chip-calendar/attribute/chip-calendar-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/chip-calendar/control/chip-calendar-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/chip-calendar/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/chip-string/attribute/chip-string-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/chip-string/control/chip-string-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/chip-string/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/datetime/attribute/datetime-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/datetime/control/datetime-control.component.d.ts +0 -18
- package/components/form-generic/src/components/form-builder/components/datetime/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/expression-builder/expression-builder.component.d.ts +0 -49
- package/components/form-generic/src/components/form-builder/components/group/attribute/group-attribute.component.d.ts +0 -24
- package/components/form-generic/src/components/form-builder/components/group/index.d.ts +0 -1
- package/components/form-generic/src/components/form-builder/components/html/attribute/html-attribute.component.d.ts +0 -29
- package/components/form-generic/src/components/form-builder/components/html/control/html-control.component.d.ts +0 -19
- package/components/form-generic/src/components/form-builder/components/html/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/index.d.ts +0 -13
- package/components/form-generic/src/components/form-builder/components/number/attribute/number-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/number/control/number-control.component.d.ts +0 -17
- package/components/form-generic/src/components/form-builder/components/number/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/radio/attribute/radio-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/radio/control/radio-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/radio/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/select/attribute/select-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/select/control/select-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/select/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/table/attribute/table-attribute.component.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/components/table/control/table-control.component.d.ts +0 -19
- package/components/form-generic/src/components/form-builder/components/table/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/textarea/attribute/textarea-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/textarea/control/textarea-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/textarea/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/textfield/attribute/textfield-attribute.component.d.ts +0 -21
- package/components/form-generic/src/components/form-builder/components/textfield/control/textfield-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/textfield/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/components/upload/attribute/upload-attribute.component.d.ts +0 -27
- package/components/form-generic/src/components/form-builder/components/upload/control/upload-control.component.d.ts +0 -16
- package/components/form-generic/src/components/form-builder/components/upload/index.d.ts +0 -2
- package/components/form-generic/src/components/form-builder/form-builder-layout.d.ts +0 -22
- package/components/form-generic/src/components/form-builder/services/builder.service.d.ts +0 -11
- package/components/form-generic/src/components/form-builder/services/index.d.ts +0 -1
- package/components/form-generic/src/components/form-render/components/item/components/table/table.component.d.ts +0 -56
- package/components/form-generic/src/components/form-render/components/variable/variable.component.d.ts +0 -22
- package/components/form-generic/src/components/sd-feel-expression/sd-feel-expression.component.d.ts +0 -41
- package/components/form-generic/src/configurations/form-generic.configuration.d.ts +0 -6
- package/components/form-generic/src/configurations/form.configuration.d.ts +0 -12
- package/components/form-generic/src/models/form-generic-component.model.d.ts +0 -319
- package/components/form-generic/src/models/form-generic-definition-html.model.d.ts +0 -28
- package/components/form-generic/src/models/form-generic-definition-selection.model.d.ts +0 -49
- package/components/form-generic/src/models/form-generic-definition-table.model.d.ts +0 -6
- package/components/form-generic/src/models/form-generic-expression.model.d.ts +0 -74
- package/components/form-generic/src/models/form-generic-template.model.d.ts +0 -6
- package/components/form-generic/src/models/form-generic-validation.model.d.ts +0 -30
- package/components/form-generic/src/models/form-generic.model.d.ts +0 -7
- package/components/form-generic/src/models/form-render/form-render-args.model.d.ts +0 -7
- package/components/form-generic/src/models/form-render/form-render-entity.model.d.ts +0 -3
- package/components/form-generic/src/models/form-render/index.d.ts +0 -2
- package/components/form-generic/src/pipes/expression-feel.pipe.d.ts +0 -10
- package/components/form-generic/src/pipes/expression-query.pipe.d.ts +0 -10
- package/components/form-generic/src/pipes/expression-view.pipe.d.ts +0 -8
- package/components/form-generic/src/pipes/when-expression.pipe.d.ts +0 -13
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clockwise rotation in degrees, always a quarter turn.
|
|
3
|
+
*/
|
|
4
|
+
export type SdImageEditorRotation = 0 | 90 | 180 | 270;
|
|
5
|
+
/** Width and height in whole pixels. */
|
|
6
|
+
export interface SdImageEditorSize {
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly height: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Rectangle in whole pixels of the **oriented** image — the image as shown in the editor, after the EXIF
|
|
12
|
+
* orientation, the flip and the rotation. `x`/`y` is the top-left corner; the origin is the top-left of the image.
|
|
13
|
+
*/
|
|
14
|
+
export interface SdImageEditorRect {
|
|
15
|
+
readonly x: number;
|
|
16
|
+
readonly y: number;
|
|
17
|
+
readonly width: number;
|
|
18
|
+
readonly height: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Orientation applied to the decoded source, in this order: mirror left ↔ right when `flip` is `true`, then rotate
|
|
22
|
+
* clockwise by `rotate` degrees.
|
|
23
|
+
*
|
|
24
|
+
* Every combination of the toolbar's rotate and flip buttons reduces to this pair. For example "flip vertically"
|
|
25
|
+
* on an unrotated image is stored as `{ flip: true, rotate: 180 }`.
|
|
26
|
+
*/
|
|
27
|
+
export interface SdImageEditorOrientation {
|
|
28
|
+
readonly flip: boolean;
|
|
29
|
+
readonly rotate: SdImageEditorRotation;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Complete description of the edits, relative to the decoded source. Plain data: it is what undo/redo stores and
|
|
33
|
+
* what `SdImageEditorResult.edits` returns, so a server can replay the same transform on the original file.
|
|
34
|
+
*
|
|
35
|
+
* Replay order: decode with the EXIF orientation applied → `flip` → `rotate` → `crop` → scale to `resize`
|
|
36
|
+
* (or to the crop size when `resize` is `null`).
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const edits: SdImageEditorEdits = {
|
|
41
|
+
* flip: false,
|
|
42
|
+
* rotate: 90,
|
|
43
|
+
* crop: { x: 120, y: 0, width: 1080, height: 1080 },
|
|
44
|
+
* aspectRatio: 1,
|
|
45
|
+
* resize: { width: 512, height: 512 },
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export interface SdImageEditorEdits extends SdImageEditorOrientation {
|
|
50
|
+
/** Crop area in pixels of the oriented image. Always inside the image and at least 1 × 1. */
|
|
51
|
+
readonly crop: SdImageEditorRect;
|
|
52
|
+
/** Width / height ratio the crop is constrained to, or `null` for a free crop. */
|
|
53
|
+
readonly aspectRatio: number | null;
|
|
54
|
+
/** Output size chosen by the user, or `null` to follow the crop (see `SdImageEditorOutputOption.width`). */
|
|
55
|
+
readonly resize: SdImageEditorSize | null;
|
|
56
|
+
}
|
|
57
|
+
/** Output formats the editor can encode, when the browser supports them. */
|
|
58
|
+
export type SdImageEditorFormat = 'image/jpeg' | 'image/png' | 'image/webp';
|
|
59
|
+
/**
|
|
60
|
+
* One entry of the crop ratio picker.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const square: SdImageEditorAspectRatio = { label: '1:1', value: 1 };
|
|
65
|
+
* const free: SdImageEditorAspectRatio = { label: 'Free', value: null };
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export interface SdImageEditorAspectRatio {
|
|
69
|
+
/** Text of the chip. When omitted, `null` shows the translated "Free" and a number shows the ratio. */
|
|
70
|
+
readonly label?: string;
|
|
71
|
+
/** Width / height ratio (`16 / 9`), or `null` for a free crop. */
|
|
72
|
+
readonly value: number | null;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Output settings. The user can change format, quality, background and size in the panel; these values are the
|
|
76
|
+
* starting point.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const output: SdImageEditorOutputOption = {
|
|
81
|
+
* format: 'image/webp',
|
|
82
|
+
* quality: 0.85,
|
|
83
|
+
* width: 1600, // scale the crop down to at most 1600 px wide
|
|
84
|
+
* fileName: 'banner',
|
|
85
|
+
* };
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export interface SdImageEditorOutputOption {
|
|
89
|
+
/**
|
|
90
|
+
* Initial output format. Defaults to the source format; when the browser cannot encode it, PNG for images with
|
|
91
|
+
* transparency and JPEG otherwise — the panel shows the format that will be produced.
|
|
92
|
+
*/
|
|
93
|
+
format?: SdImageEditorFormat;
|
|
94
|
+
/**
|
|
95
|
+
* Formats offered in the panel, in this order. Defaults to JPEG, PNG and WebP. Formats the browser cannot
|
|
96
|
+
* encode stay visible but disabled. Pass a single format to hide the picker.
|
|
97
|
+
*/
|
|
98
|
+
formats?: readonly SdImageEditorFormat[];
|
|
99
|
+
/** Initial JPEG/WebP quality between `0` and `1`. Ignored for PNG, which is lossless. @defaultValue `0.92` */
|
|
100
|
+
quality?: number;
|
|
101
|
+
/**
|
|
102
|
+
* CSS colour painted under the image when encoding JPEG, which has no transparency. PNG and WebP keep the alpha
|
|
103
|
+
* channel. @defaultValue `'white'`
|
|
104
|
+
*/
|
|
105
|
+
background?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Default output box: while the user has not typed a size, the crop is scaled down to fit inside `width` ×
|
|
108
|
+
* `height` (either may be omitted), keeping its ratio. The user can still type another size.
|
|
109
|
+
*/
|
|
110
|
+
width?: number;
|
|
111
|
+
height?: number;
|
|
112
|
+
/** Allow an output larger than the crop. Off by default so the editor never upscales by accident. */
|
|
113
|
+
allowUpscale?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* File name without extension. The extension always follows the encoded format (`.jpg`, `.png`, `.webp`).
|
|
116
|
+
* Defaults to the source `File` name, or `image`.
|
|
117
|
+
*/
|
|
118
|
+
fileName?: string;
|
|
119
|
+
/**
|
|
120
|
+
* `'file'` returns a `File`, `'blob'` a plain `Blob`. `'auto'` (default) returns a `File` when the source is a
|
|
121
|
+
* `File`.
|
|
122
|
+
*/
|
|
123
|
+
resultType?: 'auto' | 'blob' | 'file';
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Hard limits, checked before any full-resolution canvas is created.
|
|
127
|
+
*
|
|
128
|
+
* Source limits reject the image with an error. Output limits cap the size the user can pick; when the automatic
|
|
129
|
+
* size had to be reduced, the panel says so and `SdImageEditorResult.sizeLimited` is `true`.
|
|
130
|
+
*/
|
|
131
|
+
export interface SdImageEditorLimits {
|
|
132
|
+
/** Largest accepted source, in bytes. @defaultValue `41_943_040` (40 MiB) */
|
|
133
|
+
maxSourceSize?: number;
|
|
134
|
+
/** Largest accepted source, in pixels (width × height). @defaultValue `40_000_000` */
|
|
135
|
+
maxSourcePixels?: number;
|
|
136
|
+
/** Largest output, in pixels. The default matches the canvas limit of iOS Safari. @defaultValue `16_777_216` */
|
|
137
|
+
maxOutputPixels?: number;
|
|
138
|
+
/** Longest output side, in pixels. @defaultValue `16_384` */
|
|
139
|
+
maxOutputSide?: number;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Configuration of `<sd-image-editor>`. Every field is optional.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* readonly avatarOption: SdImageEditorOption = {
|
|
147
|
+
* aspectRatio: 1,
|
|
148
|
+
* lockAspectRatio: true,
|
|
149
|
+
* output: { format: 'image/jpeg', width: 512, height: 512, fileName: 'avatar' },
|
|
150
|
+
* limits: { maxSourceSize: 10 * 1024 * 1024 },
|
|
151
|
+
* };
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export interface SdImageEditorOption {
|
|
155
|
+
/** Ratio chips shown above the crop fields. Defaults to Free, 1:1, 4:3, 16:9 and 3:4. */
|
|
156
|
+
aspectRatios?: readonly SdImageEditorAspectRatio[];
|
|
157
|
+
/** Ratio selected when an image loads. `null` (default) starts with a free crop of the whole image. */
|
|
158
|
+
aspectRatio?: number | null;
|
|
159
|
+
/** Keep `aspectRatio` for the whole session and hide the ratio chips — for avatars, thumbnails, banners. */
|
|
160
|
+
lockAspectRatio?: boolean;
|
|
161
|
+
/** Output format, quality, size and file name. */
|
|
162
|
+
output?: SdImageEditorOutputOption;
|
|
163
|
+
/** Source and output limits. */
|
|
164
|
+
limits?: SdImageEditorLimits;
|
|
165
|
+
/** Number of undo steps kept. @defaultValue `50` */
|
|
166
|
+
historyLimit?: number;
|
|
167
|
+
/** E2E scope. Produces `data-autoid="components-image-editor-{autoId}"` and derived child ids. */
|
|
168
|
+
autoId?: string;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Resolved by `SdImageEditor.getResult()`: the encoded image and what produced it.
|
|
172
|
+
*
|
|
173
|
+
* The editor never uploads, downloads or overwrites anything: send `blob` to your API yourself.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```ts
|
|
177
|
+
* async save(): Promise<void> {
|
|
178
|
+
* const result = await this.editor().getResult();
|
|
179
|
+
* const form = new FormData();
|
|
180
|
+
* form.append('file', result.blob, result.fileName);
|
|
181
|
+
* await firstValueFrom(this.http.post('/api/avatar', form));
|
|
182
|
+
* }
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
export interface SdImageEditorResult {
|
|
186
|
+
/** Encoded image. The same object as `file` when a `File` is returned. */
|
|
187
|
+
readonly blob: Blob;
|
|
188
|
+
/** `File` named `fileName`, or `null` when `resultType` resolved to a plain `Blob`. */
|
|
189
|
+
readonly file: File | null;
|
|
190
|
+
/** File name with the extension of the real encoded format. */
|
|
191
|
+
readonly fileName: string;
|
|
192
|
+
/** MIME type read back from the encoded bytes — never just the requested one. */
|
|
193
|
+
readonly mimeType: SdImageEditorFormat;
|
|
194
|
+
readonly width: number;
|
|
195
|
+
readonly height: number;
|
|
196
|
+
/** Encoded size in bytes. */
|
|
197
|
+
readonly size: number;
|
|
198
|
+
/** Quality used for JPEG/WebP; `null` for PNG. */
|
|
199
|
+
readonly quality: number | null;
|
|
200
|
+
/** Edits that produced the image, relative to the decoded source. */
|
|
201
|
+
readonly edits: SdImageEditorEdits;
|
|
202
|
+
/** `true` when the automatic output size was reduced to respect `limits`. */
|
|
203
|
+
readonly sizeLimited: boolean;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Reason of a failure: carried by `(failed)` for the source, and by the rejection of `getResult()` for the export.
|
|
207
|
+
*
|
|
208
|
+
* - `unsupported-format`: the bytes are not JPEG, PNG or WebP (for example GIF, HEIC, AVIF, SVG), whatever the
|
|
209
|
+
* declared MIME type.
|
|
210
|
+
* - `animated`: an animated PNG or WebP. Only still images are supported; the editor never drops frames silently.
|
|
211
|
+
* - `source-too-large`: the source is bigger than `limits.maxSourceSize`.
|
|
212
|
+
* - `source-too-many-pixels`: width × height is above `limits.maxSourcePixels`.
|
|
213
|
+
* - `decode-failed`: the browser could not decode the image (corrupt or truncated file).
|
|
214
|
+
* - `format-unsupported`: the browser cannot encode the chosen output format.
|
|
215
|
+
* - `render-failed`: the browser could not allocate the output canvas (too large for this device).
|
|
216
|
+
* - `encode-failed`: the browser returned no data while encoding.
|
|
217
|
+
* - `not-ready`: `getResult()` was called without a loaded image, or the image was replaced while encoding.
|
|
218
|
+
*/
|
|
219
|
+
export type SdImageEditorErrorCode = 'not-ready' | 'unsupported-format' | 'animated' | 'source-too-large' | 'source-too-many-pixels' | 'decode-failed' | 'format-unsupported' | 'render-failed' | 'encode-failed';
|
|
220
|
+
/**
|
|
221
|
+
* Error emitted by `(failed)` (source) or rejected by `getResult()` (export), and shown in the editor.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```ts
|
|
225
|
+
* onFailed(error: SdImageEditorError): void {
|
|
226
|
+
* if (error.code === 'source-too-large') this.notify.warning(error.message);
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export interface SdImageEditorError {
|
|
231
|
+
readonly code: SdImageEditorErrorCode;
|
|
232
|
+
/** `'load'` while reading the source, `'export'` while encoding the result. */
|
|
233
|
+
readonly stage: 'load' | 'export';
|
|
234
|
+
/** Translated, user-facing message. */
|
|
235
|
+
readonly message: string;
|
|
236
|
+
/** Underlying error or detected MIME type, for logging. */
|
|
237
|
+
readonly cause?: unknown;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Lifecycle of the editor.
|
|
241
|
+
*
|
|
242
|
+
* - `empty`: no source.
|
|
243
|
+
* - `loading`: the source is being checked and decoded.
|
|
244
|
+
* - `ready`: the image can be edited.
|
|
245
|
+
* - `exporting`: `getResult()` is encoding the result; the controls are disabled.
|
|
246
|
+
* - `error`: the source could not be loaded. Export errors keep the editor `ready`.
|
|
247
|
+
*/
|
|
248
|
+
export type SdImageEditorStatus = 'empty' | 'loading' | 'ready' | 'exporting' | 'error';
|
|
249
|
+
/** Facts about the loaded source, exposed through `SdImageEditor.sourceInfo`. */
|
|
250
|
+
export interface SdImageEditorSourceInfo {
|
|
251
|
+
/** Format detected from the bytes. */
|
|
252
|
+
readonly mimeType: SdImageEditorFormat;
|
|
253
|
+
/** Decoded size, EXIF orientation applied. */
|
|
254
|
+
readonly width: number;
|
|
255
|
+
readonly height: number;
|
|
256
|
+
/** Source size in bytes. */
|
|
257
|
+
readonly size: number;
|
|
258
|
+
/**
|
|
259
|
+
* The image has transparent pixels: the header declares an alpha channel and the decoded pixels confirm it
|
|
260
|
+
* (checked once on the preview copy). Always `false` for JPEG.
|
|
261
|
+
*/
|
|
262
|
+
readonly hasAlpha: boolean;
|
|
263
|
+
/** EXIF orientation found in a JPEG (1 when absent). The browser applies it while decoding. */
|
|
264
|
+
readonly exifOrientation: number;
|
|
265
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SdImageEditorErrorCode, SdImageEditorFormat } from './image-editor.model';
|
|
2
|
+
/** How many leading bytes are read to find the format, the size, the alpha flag and the EXIF orientation. */
|
|
3
|
+
export declare const SD_IMAGE_EDITOR_HEADER_BYTES: number;
|
|
4
|
+
/** Format recognised from magic bytes. Only the first three can be edited. */
|
|
5
|
+
export type SdImageEditorSniffedFormat = SdImageEditorFormat | 'image/gif' | 'image/bmp' | 'image/tiff' | 'image/avif' | 'image/heic' | 'image/svg+xml' | 'image/x-icon';
|
|
6
|
+
/** What the header says about an image. Dimensions are the stored ones, before EXIF orientation. */
|
|
7
|
+
export interface SdImageEditorHeader {
|
|
8
|
+
readonly format: SdImageEditorSniffedFormat | null;
|
|
9
|
+
readonly width?: number;
|
|
10
|
+
readonly height?: number;
|
|
11
|
+
readonly hasAlpha: boolean;
|
|
12
|
+
readonly animated: boolean;
|
|
13
|
+
/** EXIF orientation 1–8 (JPEG only); 1 when absent or invalid. */
|
|
14
|
+
readonly orientation: number;
|
|
15
|
+
}
|
|
16
|
+
/** Error raised by the loading and export pipeline; turned into `SdImageEditorError` by the component. */
|
|
17
|
+
export declare class SdImageEditorFailure extends Error {
|
|
18
|
+
readonly code: SdImageEditorErrorCode;
|
|
19
|
+
readonly detail?: unknown | undefined;
|
|
20
|
+
constructor(code: SdImageEditorErrorCode, detail?: unknown | undefined);
|
|
21
|
+
}
|
|
22
|
+
export declare const SD_IMAGE_EDITOR_EDITABLE_FORMATS: readonly SdImageEditorFormat[];
|
|
23
|
+
export declare function sdImageEditorIsEditableFormat(format: string | null | undefined): format is SdImageEditorFormat;
|
|
24
|
+
/** Format from magic bytes only — the declared `Blob.type` is never trusted. */
|
|
25
|
+
export declare function sdImageEditorSniffFormat(bytes: Uint8Array): SdImageEditorSniffedFormat | null;
|
|
26
|
+
/** Parses the header of a JPEG, PNG or WebP. Other formats only report `format`. */
|
|
27
|
+
export declare function sdImageEditorReadHeader(bytes: Uint8Array): SdImageEditorHeader;
|
|
28
|
+
/** Checks done before decoding. Throws `SdImageEditorFailure`. */
|
|
29
|
+
export interface SdImageEditorSourceLimits {
|
|
30
|
+
readonly maxSourceSize: number;
|
|
31
|
+
readonly maxSourcePixels: number;
|
|
32
|
+
}
|
|
33
|
+
export declare function sdImageEditorInspect(blob: Blob, limits: SdImageEditorSourceLimits): Promise<SdImageEditorHeader>;
|
|
34
|
+
/**
|
|
35
|
+
* Inspects then decodes `blob`. The pixel limit is checked on the header before decoding and again on the decoded
|
|
36
|
+
* size, for JPEGs whose frame header lies beyond the bytes read.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sdImageEditorLoad(blob: Blob, limits: SdImageEditorSourceLimits, doc: Document): Promise<{
|
|
39
|
+
header: SdImageEditorHeader;
|
|
40
|
+
decoded: SdImageEditorDecoded;
|
|
41
|
+
}>;
|
|
42
|
+
/** Decoded source. Call `release()` when done; it frees the bitmap and any object URL created for it. */
|
|
43
|
+
export interface SdImageEditorDecoded {
|
|
44
|
+
readonly image: CanvasImageSource;
|
|
45
|
+
readonly width: number;
|
|
46
|
+
readonly height: number;
|
|
47
|
+
release(): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Decodes once, letting the browser apply the EXIF orientation (`imageOrientation: 'from-image'`, the default of
|
|
51
|
+
* every current engine). The pixels are never rotated again by the editor, so no double rotation can happen.
|
|
52
|
+
*
|
|
53
|
+
* Only if the decoded size shows that a swapping orientation (5–8) was ignored, the orientation is applied here,
|
|
54
|
+
* exactly once.
|
|
55
|
+
*/
|
|
56
|
+
export declare function sdImageEditorDecode(blob: Blob, header: SdImageEditorHeader, doc: Document): Promise<SdImageEditorDecoded>;
|
|
57
|
+
/** Shrinks a canvas to 0 × 0 so its backing store is freed now (Safari keeps it until GC otherwise). */
|
|
58
|
+
export declare function sdImageEditorReleaseCanvas(canvas: HTMLCanvasElement): void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { SdImageEditorOrientationOp } from './image-editor.geometry';
|
|
2
|
+
import type { SdImageEditorEdits, SdImageEditorRect, SdImageEditorSize } from './image-editor.model';
|
|
3
|
+
/** Output rules resolved from `option.output` and `option.limits`. */
|
|
4
|
+
export interface SdImageEditorOutputRules {
|
|
5
|
+
readonly targetWidth?: number;
|
|
6
|
+
readonly targetHeight?: number;
|
|
7
|
+
readonly allowUpscale: boolean;
|
|
8
|
+
readonly maxPixels: number;
|
|
9
|
+
readonly maxSide: number;
|
|
10
|
+
}
|
|
11
|
+
/** Output size and whether the limits reduced it. */
|
|
12
|
+
export interface SdImageEditorOutputSize extends SdImageEditorSize {
|
|
13
|
+
readonly limited: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function sdImageEditorInitialEdits(source: SdImageEditorSize, aspectRatio: number | null): SdImageEditorEdits;
|
|
16
|
+
/** Oriented image size for these edits. */
|
|
17
|
+
export declare function sdImageEditorBounds(edits: SdImageEditorEdits, source: SdImageEditorSize): SdImageEditorSize;
|
|
18
|
+
/**
|
|
19
|
+
* Applies a rotate/flip button. The crop follows the content; a quarter turn with a fixed ratio re-shapes the
|
|
20
|
+
* crop to that ratio around the same centre, and swaps a typed output size.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sdImageEditorOperate(edits: SdImageEditorEdits, op: SdImageEditorOrientationOp, source: SdImageEditorSize, rules: SdImageEditorOutputRules): SdImageEditorEdits;
|
|
23
|
+
/** Replaces the crop (drag, keyboard or typed values). The rectangle is clamped inside the image. */
|
|
24
|
+
export declare function sdImageEditorSetCrop(edits: SdImageEditorEdits, crop: SdImageEditorRect, source: SdImageEditorSize, rules: SdImageEditorOutputRules): SdImageEditorEdits;
|
|
25
|
+
/** Selects a crop ratio. The crop keeps its centre and area; `null` keeps the current crop and frees it. */
|
|
26
|
+
export declare function sdImageEditorSetAspectRatio(edits: SdImageEditorEdits, ratio: number | null, source: SdImageEditorSize, rules: SdImageEditorOutputRules): SdImageEditorEdits;
|
|
27
|
+
/**
|
|
28
|
+
* "Keep ratio" on or off without moving the crop: on locks the current crop shape (`width / height`), off frees it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function sdImageEditorKeepRatio(edits: SdImageEditorEdits, keep: boolean): SdImageEditorEdits;
|
|
31
|
+
/**
|
|
32
|
+
* Sets the output width (`null` follows the crop again). The height always follows the crop ratio, and the size is
|
|
33
|
+
* clamped to the rules. To start from a height, convert it with `height × crop ratio` first.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sdImageEditorSetResize(edits: SdImageEditorEdits, size: SdImageEditorSize | null, rules: SdImageEditorOutputRules): SdImageEditorEdits;
|
|
36
|
+
/**
|
|
37
|
+
* Output size: the typed size when there is one, otherwise the crop scaled into the default box, never above the
|
|
38
|
+
* crop unless upscaling is allowed, and always inside the output limits.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sdImageEditorOutputSize(edits: SdImageEditorEdits, rules: SdImageEditorOutputRules): SdImageEditorOutputSize;
|
|
41
|
+
/**
|
|
42
|
+
* Clamps a typed size: the height is derived from the width and the crop ratio, never above the crop unless
|
|
43
|
+
* upscaling is allowed, and always inside the output limits.
|
|
44
|
+
*/
|
|
45
|
+
export declare function sdImageEditorClampResize(size: SdImageEditorSize, crop: SdImageEditorRect, rules: SdImageEditorOutputRules): {
|
|
46
|
+
size: SdImageEditorSize;
|
|
47
|
+
limited: boolean;
|
|
48
|
+
};
|
|
49
|
+
/** Largest scale (≤ 1) that keeps `width × height` inside the output limits. */
|
|
50
|
+
export declare function sdImageEditorLimitScale(width: number, height: number, rules: SdImageEditorOutputRules): number;
|
|
51
|
+
export declare function sdImageEditorSameEdits(a: SdImageEditorEdits, b: SdImageEditorEdits): boolean;
|
|
52
|
+
/** Ratio that exactly fits the given size — used to format ratio chips. */
|
|
53
|
+
export declare function sdImageEditorRatioLabel(ratio: number): string;
|
|
54
|
+
/** Bounded undo history. `present` is what the editor shows once no drag is in progress. */
|
|
55
|
+
export interface SdImageEditorHistory<T> {
|
|
56
|
+
readonly past: readonly T[];
|
|
57
|
+
readonly present: T;
|
|
58
|
+
readonly future: readonly T[];
|
|
59
|
+
}
|
|
60
|
+
export declare function sdImageEditorHistoryStart<T>(present: T): SdImageEditorHistory<T>;
|
|
61
|
+
/** Records `next` as a new step. A value equal to `present` records nothing; the redo branch is dropped. */
|
|
62
|
+
export declare function sdImageEditorHistoryCommit<T>(history: SdImageEditorHistory<T>, next: T, limit: number, same: (a: T, b: T) => boolean): SdImageEditorHistory<T>;
|
|
63
|
+
export declare function sdImageEditorHistoryUndo<T>(history: SdImageEditorHistory<T>): SdImageEditorHistory<T>;
|
|
64
|
+
export declare function sdImageEditorHistoryRedo<T>(history: SdImageEditorHistory<T>): SdImageEditorHistory<T>;
|
package/components/index.d.ts
CHANGED
|
@@ -36,3 +36,6 @@ export * from '@sdcorejs/angular/components/operator';
|
|
|
36
36
|
export * from '@sdcorejs/angular/components/stepper';
|
|
37
37
|
export * from '@sdcorejs/angular/components/tab';
|
|
38
38
|
export * from '@sdcorejs/angular/components/file-explorer';
|
|
39
|
+
export * from '@sdcorejs/angular/components/kanban';
|
|
40
|
+
export * from '@sdcorejs/angular/components/image-editor';
|
|
41
|
+
export * from '@sdcorejs/angular/components/highlight';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { Color } from '@sdcorejs/utils/models';
|
|
3
3
|
import { SdInformActionDirective } from './inform-action.directive';
|
|
4
|
-
import { type SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
4
|
+
import { type SdIconSet, type SdIconShape } from '@sdcorejs/angular/modules/icon';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export type SdInformType = 'default' | 'tip';
|
|
7
7
|
export declare class SdInform {
|
|
@@ -19,6 +19,8 @@ export declare class SdInform {
|
|
|
19
19
|
description: import("@angular/core").InputSignal<string | undefined>;
|
|
20
20
|
icon: import("@angular/core").InputSignal<string | undefined>;
|
|
21
21
|
hideIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
/** Hình nền ô icon; bỏ trống thì dùng `defaultShape` của `provideSdIcon` (mặc định `square`). */
|
|
23
|
+
iconShape: import("@angular/core").InputSignal<SdIconShape | null | undefined>;
|
|
22
24
|
fontSet: import("@angular/core").InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
23
25
|
closable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
24
26
|
actionLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -41,6 +43,7 @@ export declare class SdInform {
|
|
|
41
43
|
'c-error': boolean;
|
|
42
44
|
}>;
|
|
43
45
|
effectiveIcon: import("@angular/core").Signal<string | null>;
|
|
46
|
+
resolvedIconShape: import("@angular/core").Signal<SdIconShape>;
|
|
44
47
|
hasActionSlot: import("@angular/core").Signal<boolean>;
|
|
45
48
|
clampLines: import("@angular/core").Signal<number | null>;
|
|
46
49
|
showToggle: import("@angular/core").Signal<boolean>;
|
|
@@ -52,5 +55,5 @@ export declare class SdInform {
|
|
|
52
55
|
onClose(event: Event): void;
|
|
53
56
|
onAction(event: Event): void;
|
|
54
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdInform, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdInform, "sd-inform", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "secondary": { "alias": "secondary"; "required": false; "isSignal": true; }; "info": { "alias": "info"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "hideIcon": { "alias": "hideIcon"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "actionLabel": { "alias": "actionLabel"; "required": false; "isSignal": true; }; "lineClamp": { "alias": "lineClamp"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; "sdAction": "sdAction"; }, ["actionSlot"], ["[sdInformAction]", "*"], true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdInform, "sd-inform", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "secondary": { "alias": "secondary"; "required": false; "isSignal": true; }; "info": { "alias": "info"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "hideIcon": { "alias": "hideIcon"; "required": false; "isSignal": true; }; "iconShape": { "alias": "iconShape"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "actionLabel": { "alias": "actionLabel"; "required": false; "isSignal": true; }; "lineClamp": { "alias": "lineClamp"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; "sdAction": "sdAction"; }, ["actionSlot"], ["[sdInformAction]", "*"], true, never>;
|
|
56
59
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CdkDrag, CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { SdKanbanColumn, SdKanbanId, SdKanbanMoveError, SdKanbanMoveRequest, SdKanbanMoveSource, SdKanbanOption } from './kanban.model';
|
|
3
|
+
import { SdKanbanCardActionsTemplateDirective, SdKanbanCardTemplateDirective, SdKanbanColumnActionsTemplateDirective, SdKanbanColumnTemplateDirective } from './kanban.templates';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface CardView<T> {
|
|
6
|
+
readonly item: T;
|
|
7
|
+
readonly id: SdKanbanId;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly index: number;
|
|
10
|
+
}
|
|
11
|
+
interface ColumnView<T> {
|
|
12
|
+
readonly column: SdKanbanColumn;
|
|
13
|
+
readonly cards: readonly CardView<T>[];
|
|
14
|
+
readonly count: number;
|
|
15
|
+
}
|
|
16
|
+
/** Generic ordered board with one consumer-confirmed, serial move pipeline. */
|
|
17
|
+
export declare class SdKanban<T = unknown> {
|
|
18
|
+
#private;
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly columns: import("@angular/core").InputSignal<readonly SdKanbanColumn[]>;
|
|
21
|
+
readonly option: import("@angular/core").InputSignal<SdKanbanOption<T>>;
|
|
22
|
+
readonly model: import("@angular/core").ModelSignal<readonly T[]>;
|
|
23
|
+
readonly keyword: import("@angular/core").ModelSignal<string>;
|
|
24
|
+
readonly collapsedColumns: import("@angular/core").ModelSignal<readonly SdKanbanId[]>;
|
|
25
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
26
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
27
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
28
|
+
readonly error: import("@angular/core").InputSignal<string | null | undefined>;
|
|
29
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | null | undefined>;
|
|
30
|
+
readonly autoId: import("@angular/core").InputSignal<string | null | undefined>;
|
|
31
|
+
readonly sdChange: import("@angular/core").OutputEmitterRef<readonly T[]>;
|
|
32
|
+
readonly sdMove: import("@angular/core").OutputEmitterRef<SdKanbanMoveRequest<T>>;
|
|
33
|
+
readonly sdMoveError: import("@angular/core").OutputEmitterRef<SdKanbanMoveError<T>>;
|
|
34
|
+
readonly sdRetry: import("@angular/core").OutputEmitterRef<void>;
|
|
35
|
+
readonly pendingId: import("@angular/core").WritableSignal<SdKanbanId | null>;
|
|
36
|
+
protected readonly cardTemplate: import("@angular/core").Signal<SdKanbanCardTemplateDirective<T> | undefined>;
|
|
37
|
+
protected readonly cardActionsTemplate: import("@angular/core").Signal<SdKanbanCardActionsTemplateDirective<T> | undefined>;
|
|
38
|
+
protected readonly columnTemplate: import("@angular/core").Signal<SdKanbanColumnTemplateDirective | undefined>;
|
|
39
|
+
protected readonly columnActionsTemplate: import("@angular/core").Signal<SdKanbanColumnActionsTemplateDirective | undefined>;
|
|
40
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
41
|
+
protected readonly moveFailure: import("@angular/core").WritableSignal<string | undefined>;
|
|
42
|
+
/** Card the current failure belongs to; `null` for failures without a card (invalid configuration). */
|
|
43
|
+
protected readonly failedId: import("@angular/core").WritableSignal<SdKanbanId | null>;
|
|
44
|
+
protected readonly dataInvalid: import("@angular/core").Signal<boolean>;
|
|
45
|
+
protected readonly locked: import("@angular/core").Signal<boolean>;
|
|
46
|
+
protected readonly moveBlocked: import("@angular/core").Signal<boolean>;
|
|
47
|
+
protected readonly boardLabel: import("@angular/core").Signal<string>;
|
|
48
|
+
protected readonly boardColumns: import("@angular/core").Signal<readonly ColumnView<T>[]>;
|
|
49
|
+
protected readonly pendingAnchored: import("@angular/core").Signal<boolean>;
|
|
50
|
+
protected readonly failureAnchored: import("@angular/core").Signal<boolean>;
|
|
51
|
+
protected readonly enterPredicate: (_drag: CdkDrag<CardView<T>>, drop: CdkDropList<ColumnView<T>>) => boolean;
|
|
52
|
+
constructor();
|
|
53
|
+
/**
|
|
54
|
+
* Propose a full-column insertion, optionally wait for persistence, then commit once.
|
|
55
|
+
* No-op, locked, rejected and stale requests return false without a change event.
|
|
56
|
+
*/
|
|
57
|
+
move(itemId: SdKanbanId, columnId: SdKanbanId, index?: number, source?: SdKanbanMoveSource): Promise<boolean>;
|
|
58
|
+
protected drop(event: CdkDragDrop<ColumnView<T>, ColumnView<T>, CardView<T>>): void;
|
|
59
|
+
protected moveFromMenu(itemId: SdKanbanId, columnId: SdKanbanId, index: number | undefined, trigger: HTMLButtonElement): void;
|
|
60
|
+
protected keydown(event: KeyboardEvent, card: CardView<T>, view: ColumnView<T>): void;
|
|
61
|
+
protected collapsed(id: SdKanbanId): boolean;
|
|
62
|
+
protected toggleColumn(id: SdKanbanId): void;
|
|
63
|
+
protected columnContext(view: ColumnView<T>): {
|
|
64
|
+
$implicit: SdKanbanColumn;
|
|
65
|
+
column: SdKanbanColumn;
|
|
66
|
+
count: number;
|
|
67
|
+
visibleCount: number;
|
|
68
|
+
collapsed: boolean;
|
|
69
|
+
};
|
|
70
|
+
protected cardContext(card: CardView<T>, view: ColumnView<T>): {
|
|
71
|
+
$implicit: T;
|
|
72
|
+
item: T;
|
|
73
|
+
column: SdKanbanColumn;
|
|
74
|
+
index: number;
|
|
75
|
+
pending: boolean;
|
|
76
|
+
};
|
|
77
|
+
protected token(id: SdKanbanId): string;
|
|
78
|
+
protected updateKeyword(event: Event): void;
|
|
79
|
+
protected dismissFailure(): void;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdKanban<any>, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdKanban<any>, "sd-kanban", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; "keyword": { "alias": "keyword"; "required": false; "isSignal": true; }; "collapsedColumns": { "alias": "collapsedColumns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "keyword": "keywordChange"; "collapsedColumns": "collapsedColumnsChange"; "sdChange": "sdChange"; "sdMove": "sdMove"; "sdMoveError": "sdMoveError"; "sdRetry": "sdRetry"; }, ["cardTemplate", "cardActionsTemplate", "columnTemplate", "columnActionsTemplate"], never, true, never>;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Color } from '@sdcorejs/utils/models';
|
|
2
|
+
/** Stable identity; number `1` and string `'1'` are distinct. Never use a row index. */
|
|
3
|
+
export type SdKanbanId = string | number;
|
|
4
|
+
export type SdKanbanMoveSource = 'drag' | 'menu' | 'keyboard' | 'api';
|
|
5
|
+
export interface SdKanbanColumn {
|
|
6
|
+
readonly id: SdKanbanId;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly color?: Color;
|
|
9
|
+
readonly prefixIcon?: string;
|
|
10
|
+
readonly disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** One immutable proposed move. Indexes refer to the complete column, including filtered-out cards. */
|
|
13
|
+
export interface SdKanbanMoveRequest<T> {
|
|
14
|
+
readonly item: T;
|
|
15
|
+
readonly itemId: SdKanbanId;
|
|
16
|
+
readonly fromColumnId: SdKanbanId;
|
|
17
|
+
readonly toColumnId: SdKanbanId;
|
|
18
|
+
readonly fromIndex: number;
|
|
19
|
+
/** Insertion index after removing the source card from its column. */
|
|
20
|
+
readonly toIndex: number;
|
|
21
|
+
readonly previousItems: readonly T[];
|
|
22
|
+
readonly nextItems: readonly T[];
|
|
23
|
+
readonly source: SdKanbanMoveSource;
|
|
24
|
+
/** Aborted on replacement data/options/columns, locked state, or destruction. */
|
|
25
|
+
readonly signal: AbortSignal;
|
|
26
|
+
}
|
|
27
|
+
/** Domain mapping and consumer-owned persistence. Replace arrays and options immutably. */
|
|
28
|
+
export interface SdKanbanOption<T> {
|
|
29
|
+
readonly getId: (item: T) => SdKanbanId;
|
|
30
|
+
readonly getColumnId: (item: T) => SdKanbanId;
|
|
31
|
+
readonly getTitle: (item: T) => string;
|
|
32
|
+
/** Return a new item preserving its ID; never mutate the supplied item. */
|
|
33
|
+
readonly withColumn: (item: T, columnId: SdKanbanId) => T;
|
|
34
|
+
readonly getSearchText?: (item: T) => string;
|
|
35
|
+
readonly filter?: (item: T) => boolean;
|
|
36
|
+
readonly canMove?: (request: SdKanbanMoveRequest<T>) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Omit for local mode. In async mode, resolve `true`/`undefined` to accept or `false` to reject.
|
|
39
|
+
* Rejection/throw keeps the board unchanged and emits `sdMoveError`. No `modelChange`, `sdChange`,
|
|
40
|
+
* or `sdMove` is emitted before acceptance. New input data always wins over a late response.
|
|
41
|
+
* Persist using the stable IDs and full-column indexes, and forward `signal` when supported.
|
|
42
|
+
*/
|
|
43
|
+
readonly move?: (request: SdKanbanMoveRequest<T>) => Promise<boolean | void>;
|
|
44
|
+
readonly searchable?: boolean;
|
|
45
|
+
readonly collapsible?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface SdKanbanMoveError<T> {
|
|
48
|
+
readonly request: SdKanbanMoveRequest<T>;
|
|
49
|
+
readonly reason: 'rejected' | 'error';
|
|
50
|
+
readonly error?: unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface SdKanbanCardTemplateContext<T> {
|
|
53
|
+
readonly $implicit: T;
|
|
54
|
+
readonly item: T;
|
|
55
|
+
readonly column: SdKanbanColumn;
|
|
56
|
+
readonly index: number;
|
|
57
|
+
readonly pending: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface SdKanbanColumnTemplateContext {
|
|
60
|
+
readonly $implicit: SdKanbanColumn;
|
|
61
|
+
readonly column: SdKanbanColumn;
|
|
62
|
+
readonly count: number;
|
|
63
|
+
readonly visibleCount: number;
|
|
64
|
+
readonly collapsed: boolean;
|
|
65
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { SdKanbanCardTemplateContext, SdKanbanColumnTemplateContext, SdKanbanOption } from './kanban.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SdKanbanCardTemplateDirective<T = unknown> {
|
|
5
|
+
/** Bind the option for strict generic template inference, or use the bare attribute. */
|
|
6
|
+
readonly option: import("@angular/core").InputSignal<"" | SdKanbanOption<T>>;
|
|
7
|
+
readonly template: TemplateRef<SdKanbanCardTemplateContext<T>>;
|
|
8
|
+
static ngTemplateContextGuard<T>(_directive: SdKanbanCardTemplateDirective<T>, _context: unknown): _context is SdKanbanCardTemplateContext<T>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdKanbanCardTemplateDirective<any>, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdKanbanCardTemplateDirective<any>, "ng-template[sdKanbanCardTemplate]", never, { "option": { "alias": "sdKanbanCardTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
export declare class SdKanbanCardActionsTemplateDirective<T = unknown> {
|
|
13
|
+
readonly option: import("@angular/core").InputSignal<"" | SdKanbanOption<T>>;
|
|
14
|
+
readonly template: TemplateRef<SdKanbanCardTemplateContext<T>>;
|
|
15
|
+
static ngTemplateContextGuard<T>(_directive: SdKanbanCardActionsTemplateDirective<T>, _context: unknown): _context is SdKanbanCardTemplateContext<T>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdKanbanCardActionsTemplateDirective<any>, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdKanbanCardActionsTemplateDirective<any>, "ng-template[sdKanbanCardActionsTemplate]", never, { "option": { "alias": "sdKanbanCardActionsTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
export declare class SdKanbanColumnTemplateDirective {
|
|
20
|
+
readonly template: TemplateRef<SdKanbanColumnTemplateContext>;
|
|
21
|
+
static ngTemplateContextGuard(_directive: SdKanbanColumnTemplateDirective, _context: unknown): _context is SdKanbanColumnTemplateContext;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdKanbanColumnTemplateDirective, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdKanbanColumnTemplateDirective, "ng-template[sdKanbanColumnTemplate]", never, {}, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
export declare class SdKanbanColumnActionsTemplateDirective {
|
|
26
|
+
readonly template: TemplateRef<SdKanbanColumnTemplateContext>;
|
|
27
|
+
static ngTemplateContextGuard(_directive: SdKanbanColumnActionsTemplateDirective, _context: unknown): _context is SdKanbanColumnTemplateContext;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdKanbanColumnActionsTemplateDirective, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdKanbanColumnActionsTemplateDirective, "ng-template[sdKanbanColumnActionsTemplate]", never, {}, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SdKanbanColumn, SdKanbanId, SdKanbanMoveRequest, SdKanbanMoveSource, SdKanbanOption } from './kanban.model';
|
|
2
|
+
/** Internal pure proposal builder; performs no persistence or input mutation. */
|
|
3
|
+
export declare function prepareKanbanMove<T>(items: readonly T[], columns: readonly SdKanbanColumn[], option: SdKanbanOption<T>, itemId: SdKanbanId, toColumnId: SdKanbanId, toIndex: number, source: SdKanbanMoveSource, signal: AbortSignal): SdKanbanMoveRequest<T> | undefined;
|
|
4
|
+
/** Invalid data fails closed rather than silently hiding unmapped or duplicate cards. */
|
|
5
|
+
export declare function kanbanDataInvalid<T>(items: readonly T[], columns: readonly SdKanbanColumn[], option: SdKanbanOption<T>): boolean;
|
|
@@ -5,3 +5,4 @@ export * from './src/preview-pdf/preview-pdf.browser';
|
|
|
5
5
|
export * from './src/preview-pdf/preview-pdf.print';
|
|
6
6
|
export * from './src/preview-pdf/preview-pdf.pdfjs';
|
|
7
7
|
export type * from './src/preview-pdf/preview-pdf.types';
|
|
8
|
+
export * from './src/preview-video/preview-video.component';
|