@sd-angular/core 19.0.0-beta.94 → 19.0.0-beta.96
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 +10 -10
- package/components/anchor/src/components/anchor/anchor.component.d.ts +4 -1
- package/components/anchor/src/components/anchor-item/anchor-item.component.d.ts +2 -1
- package/components/anchor/src/components/anchor-vertical/anchor-vertical-list.component.d.ts +3 -1
- package/components/badge/src/badge.component.d.ts +3 -4
- package/components/button/src/button.component.d.ts +2 -2
- package/components/document-builder/src/components/header-footer-builder/header-footer-builder.component.d.ts +2 -2
- package/components/document-builder/src/document-builder.model.d.ts +2 -2
- package/components/editor/src/models/editor.model.d.ts +2 -2
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +2 -2
- package/components/form-generic/src/components/form-builder/components/attribute-table/attribute-table.component.d.ts +4 -2
- package/components/form-generic/src/components/form-builder/components/attribute-template/attribute-template.component.d.ts +2 -2
- package/components/form-generic/src/components/form-builder/components/configure-validation/configure-validation.component.d.ts +2 -2
- package/components/form-generic/src/components/form-builder/components/group/attribute/group-attribute.component.d.ts +23 -0
- package/components/form-generic/src/components/form-builder/components/group/index.d.ts +1 -0
- package/components/form-generic/src/components/form-builder/components/index.d.ts +1 -0
- package/components/form-generic/src/components/form-builder/components/table/control/table-control.component.d.ts +3 -0
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +61 -18
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +2 -2
- package/components/form-generic/src/models/form-generic-component.model.d.ts +22 -2
- package/components/index.d.ts +1 -2
- package/components/modal/src/modal.component.d.ts +5 -3
- package/components/preview/index.d.ts +3 -0
- package/components/preview/src/preview-image/preview-image.component.d.ts +84 -24
- package/components/preview/src/preview-image/preview-image.types.d.ts +53 -0
- package/components/preview/src/preview-pdf/preview-pdf.component.d.ts +186 -0
- package/components/preview/src/preview-pdf/preview-pdf.types.d.ts +84 -0
- package/components/quick-action/src/quick-action.component.d.ts +5 -6
- package/components/section/src/section.component.d.ts +1 -2
- package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
- package/components/table/src/table.component.d.ts +2 -2
- package/components/upload-file/src/upload-file.component.d.ts +4 -1
- package/configurations/src/sd-core.configuration.d.ts +2 -1
- package/fesm2022/sd-angular-core-components-anchor.mjs +19 -6
- package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-code-editor.mjs +3 -3
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +3 -3
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +3 -3
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-form-generic.mjs +627 -317
- package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-history.mjs +3 -3
- package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs +5 -5
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal.mjs +8 -3
- package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +1963 -91
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-quick-action.mjs +8 -19
- package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +31 -26
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +32 -29
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +12 -8
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +1 -2
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-configurations.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +2 -2
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-checkbox.mjs +6 -13
- package/fesm2022/sd-angular-core-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +6 -5
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs +6 -12
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +33 -26
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +29 -19
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +98 -57
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +25 -10
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +7 -15
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +4 -4
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-switch.mjs +6 -14
- package/fesm2022/sd-angular-core-forms-switch.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +5 -5
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-handlers.mjs +2 -2
- package/fesm2022/sd-angular-core-handlers.mjs.map +1 -1
- package/fesm2022/sd-angular-core-i18n.mjs +1610 -38
- package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
- package/fesm2022/sd-angular-core-interceptors.mjs +2 -2
- package/fesm2022/sd-angular-core-interceptors.mjs.map +1 -1
- package/fesm2022/sd-angular-core-models.mjs +6 -0
- package/fesm2022/sd-angular-core-models.mjs.map +1 -0
- package/fesm2022/sd-angular-core-modules-layout.mjs +87 -39
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +2 -2
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs +2 -2
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-excel.mjs +27 -23
- package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-notify.mjs +21 -21
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs +74 -830
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs +36 -136
- package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core.mjs +0 -1
- package/fesm2022/sd-angular-core.mjs.map +1 -1
- package/forms/autocomplete/src/autocomplete.component.d.ts +1 -2
- package/forms/checkbox/src/checkbox.component.d.ts +3 -3
- package/forms/chip/src/chip.component.d.ts +4 -4
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +4 -4
- package/forms/date/src/date.component.d.ts +3 -5
- package/forms/date-range/src/date-range.component.d.ts +3 -5
- package/forms/datetime/src/datetime.component.d.ts +2 -2
- package/forms/datetime/src/popup/sd-datetime-picker.component.d.ts +10 -11
- package/forms/input/src/input.component.d.ts +1 -2
- package/forms/input-number/src/input-number.component.d.ts +1 -2
- package/forms/radio/src/radio.component.d.ts +3 -3
- package/forms/select/src/select.component.d.ts +5 -5
- package/forms/switch/src/switch.component.d.ts +3 -3
- package/forms/textarea/src/textarea.component.d.ts +1 -2
- package/i18n/index.d.ts +5 -5
- package/i18n/src/en.d.ts +406 -2
- package/i18n/src/i18n.messages.d.ts +2 -0
- package/i18n/src/i18n.pipe.d.ts +9 -0
- package/i18n/src/i18n.service.d.ts +14 -0
- package/i18n/src/i18n.token.d.ts +1 -0
- package/i18n/src/i18n.types.d.ts +31 -0
- package/i18n/src/ja.d.ts +2 -0
- package/i18n/src/ko.d.ts +2 -0
- package/i18n/src/vi.d.ts +2 -312
- package/i18n/src/zh.d.ts +2 -0
- package/models/index.d.ts +1 -0
- package/models/src/language.model.d.ts +2 -0
- package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +25 -0
- package/package.json +82 -89
- package/public-api.d.ts +0 -1
- package/sd-angular-core-19.0.0-beta.96.tgz +0 -0
- package/services/notify/index.d.ts +1 -1
- package/services/notify/src/components/toast/toast.component.d.ts +3 -3
- package/services/notify/src/components/toast-container.component.d.ts +3 -4
- package/services/notify/src/notify.model.d.ts +1 -1
- package/services/notify/src/notify.service.d.ts +5 -5
- package/utilities/extensions/src/array.extension.d.ts +1 -7
- package/utilities/extensions/src/color.extension.d.ts +5 -20
- package/utilities/extensions/src/date.extension.d.ts +1 -18
- package/utilities/extensions/src/number.extension.d.ts +1 -10
- package/utilities/extensions/src/string.extension.d.ts +30 -4
- package/utilities/extensions/src/utility.extension.d.ts +6 -0
- package/utilities/models/src/color.model.d.ts +4 -1
- package/utilities/models/src/empty.model.d.ts +3 -0
- package/utilities/models/src/filter.model.d.ts +12 -24
- package/utilities/models/src/maybe-async.model.d.ts +10 -4
- package/utilities/models/src/nested-key-of.model.d.ts +4 -5
- package/utilities/models/src/operator.model.d.ts +9 -4
- package/utilities/models/src/order.model.d.ts +4 -5
- package/utilities/models/src/paging.model.d.ts +8 -16
- package/utilities/models/src/pattern.model.d.ts +13 -0
- package/utilities/models/src/size.model.d.ts +4 -1
- package/components/anchor-v2/index.d.ts +0 -1
- package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +0 -12
- package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +0 -19
- package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +0 -16
- package/components/anchor-v2/src/components/index.d.ts +0 -2
- package/components/anchor-v2/src/index.d.ts +0 -2
- package/components/anchor-v2/src/models/index.d.ts +0 -1
- package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +0 -7
- package/components/workflow/index.d.ts +0 -2
- package/components/workflow/src/configurations/index.d.ts +0 -1
- package/components/workflow/src/configurations/workflow.configuration.d.ts +0 -10
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs +0 -151
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +0 -1
- package/fesm2022/sd-angular-core-components-workflow.mjs +0 -17
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +0 -1
- package/fesm2022/sd-angular-core-services-firebase.mjs +0 -38
- package/fesm2022/sd-angular-core-services-firebase.mjs.map +0 -1
- package/i18n/src/sd-i18n.messages.d.ts +0 -2
- package/i18n/src/sd-i18n.pipe.d.ts +0 -9
- package/i18n/src/sd-i18n.service.d.ts +0 -12
- package/i18n/src/sd-i18n.token.d.ts +0 -1
- package/i18n/src/sd-i18n.types.d.ts +0 -5
- package/sd-angular-core-19.0.0-beta.94.tgz +0 -0
- package/services/firebase/index.d.ts +0 -2
- package/services/firebase/src/firebase.model.d.ts +0 -8
- package/services/firebase/src/firebase.service.d.ts +0 -14
package/README.md
CHANGED
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
|---|---|
|
|
36
36
|
| `@angular/core` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
|
|
37
37
|
| `@angular/material` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
|
|
38
|
-
| `@angular/material-
|
|
38
|
+
| `@angular/material-date-fns-adapter` | `^19.0.0 \|\| ^20.0.0 \|\| ^21.0.0` |
|
|
39
|
+
| `date-fns` | `^3 \|\| ^4` |
|
|
39
40
|
|
|
40
41
|
### Installation / Cài đặt
|
|
41
42
|
|
|
@@ -188,7 +189,7 @@ import { SdButton } from '@sd-angular/core/components/button';
|
|
|
188
189
|
| Input | Type | Default | Description |
|
|
189
190
|
|---|---|---|---|
|
|
190
191
|
| `type` | `'fill' \| 'light' \| 'outline' \| 'link'` | `'light'` | Kiểu nút |
|
|
191
|
-
| `color` | `
|
|
192
|
+
| `color` | `Color` | `'secondary'` | Màu sắc |
|
|
192
193
|
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Kích thước |
|
|
193
194
|
| `title` | `string` | — | Nhãn nút |
|
|
194
195
|
| `prefixIcon` | `string` | — | Icon Material trước text |
|
|
@@ -220,10 +221,10 @@ import { SdBadge } from '@sd-angular/core/components/badge';
|
|
|
220
221
|
| Input | Type | Default | Description |
|
|
221
222
|
|---|---|---|---|
|
|
222
223
|
| `type` | `'tag' \| 'round' \| 'icon'` | `'icon'` | Kiểu badge |
|
|
223
|
-
| `color` | `
|
|
224
|
+
| `color` | `Color` | `'secondary'` | Màu sắc |
|
|
224
225
|
| `title` | `string \| number` | — | Nội dung hiển thị |
|
|
225
226
|
| `icon` | `string` | — | Icon Material |
|
|
226
|
-
| `size` | `
|
|
227
|
+
| `size` | `Size` | `'sm'` | Kích thước |
|
|
227
228
|
| `tooltip` | `string` | — | Tooltip |
|
|
228
229
|
|
|
229
230
|
Shorthand color inputs (boolean): `primary`, `secondary`, `success`, `info`, `warning`, `error`.
|
|
@@ -249,7 +250,7 @@ import { SdSection } from '@sd-angular/core/components/section';
|
|
|
249
250
|
| `title` | `string` | *required* | Tiêu đề section |
|
|
250
251
|
| `subTitle` | `string` | — | Tiêu đề phụ |
|
|
251
252
|
| `icon` | `string` | — | Icon Material |
|
|
252
|
-
| `iconColor` | `
|
|
253
|
+
| `iconColor` | `Color` | `'primary'` | Màu icon |
|
|
253
254
|
| `collapsable` | `boolean` | `false` | Cho phép thu gọn |
|
|
254
255
|
| `collapsed` | `boolean` | `false` | Trạng thái ban đầu thu gọn |
|
|
255
256
|
| `hideHeader` | `boolean` | `false` | Ẩn phần header |
|
|
@@ -277,7 +278,7 @@ import { SdModal } from '@sd-angular/core/components/modal';
|
|
|
277
278
|
| Input | Type | Default | Description |
|
|
278
279
|
|---|---|---|---|
|
|
279
280
|
| `title` | `string` | — | Tiêu đề modal |
|
|
280
|
-
| `color` | `
|
|
281
|
+
| `color` | `Color` | `'primary'` | Màu header |
|
|
281
282
|
| `width` | `'sx' \| 'sm' \| 'md' \| 'lg' \| string` | `'md'` | Độ rộng (md = 60vw) |
|
|
282
283
|
| `height` | `string` | `'auto'` | Chiều cao |
|
|
283
284
|
| `view` | `'dialog' \| 'bottom-sheet'` | auto | Tự động bottom-sheet trên mobile |
|
|
@@ -405,7 +406,6 @@ import { SdAvatar } from '@sd-angular/core/components/avatar';
|
|
|
405
406
|
| `SdHistory` | `@sd-angular/core/components/history` | Lịch sử thay đổi |
|
|
406
407
|
| `SdImportExcel` | `@sd-angular/core/components/import-excel` | Wizard import Excel |
|
|
407
408
|
| `SdQueryBuilder` | `@sd-angular/core/components/query-builder` | Visual query builder |
|
|
408
|
-
| `SdWorkflow` | `@sd-angular/core/components/workflow` | Workflow builder |
|
|
409
409
|
| `SdCodeEditor` | `@sd-angular/core/components/code-editor` | Code editor (PrismJS) |
|
|
410
410
|
| `SdMiniEditor` | `@sd-angular/core/components/mini-editor` | Rich text editor nhỏ |
|
|
411
411
|
| `SdDocumentBuilder` | `@sd-angular/core/components/document-builder` | Document builder |
|
|
@@ -653,7 +653,7 @@ export * from './src/my-component.component';
|
|
|
653
653
|
// my-component.component.ts
|
|
654
654
|
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
655
655
|
import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
656
|
-
import {
|
|
656
|
+
import { Color } from '@sd-angular/core/utilities';
|
|
657
657
|
|
|
658
658
|
@Component({
|
|
659
659
|
selector: 'sd-my-component',
|
|
@@ -664,7 +664,7 @@ import { SdColor } from '@sd-angular/core/utilities';
|
|
|
664
664
|
imports: [],
|
|
665
665
|
})
|
|
666
666
|
export class SdMyComponent extends SdBaseSecureComponent {
|
|
667
|
-
color = input<
|
|
667
|
+
color = input<Color, Color | undefined | null>('primary', {
|
|
668
668
|
transform: (value) => value || 'primary',
|
|
669
669
|
});
|
|
670
670
|
|
|
@@ -690,7 +690,7 @@ export * from '@sd-angular/core/components/my-component';
|
|
|
690
690
|
| Base class | Extend `SdBaseSecureComponent` cho component có permission |
|
|
691
691
|
| Change detection | Luôn dùng `ChangeDetectionStrategy.OnPush` |
|
|
692
692
|
| Standalone | Luôn `standalone: true` |
|
|
693
|
-
| Colors | Dùng `
|
|
693
|
+
| Colors | Dùng `Color` type, không hardcode màu |
|
|
694
694
|
|
|
695
695
|
### Build
|
|
696
696
|
|
|
@@ -5,6 +5,9 @@ export declare class SdAnchor implements OnDestroy {
|
|
|
5
5
|
#private;
|
|
6
6
|
wrapper: import("@angular/core").Signal<ElementRef<any>>;
|
|
7
7
|
sections: import("@angular/core").Signal<readonly SdAnchorItem[]>;
|
|
8
|
+
readonly autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
9
|
+
readonly autoId: import("@angular/core").Signal<string | undefined>;
|
|
10
|
+
readonly itemAutoId: (key: string | undefined) => string | undefined;
|
|
8
11
|
type: import("@angular/core").InputSignal<"vertical" | "horizontal">;
|
|
9
12
|
sidebarWidth: import("@angular/core").InputSignal<string>;
|
|
10
13
|
ellipsis: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -15,5 +18,5 @@ export declare class SdAnchor implements OnDestroy {
|
|
|
15
18
|
scrollSectionByClick(idSectionTarget: string): void;
|
|
16
19
|
ngOnDestroy(): void;
|
|
17
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdAnchor, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchor, "sd-anchor", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "sidebarWidth": { "alias": "sidebarWidth"; "required": false; "isSignal": true; }; "ellipsis": { "alias": "ellipsis"; "required": false; "isSignal": true; }; "isOverscroll": { "alias": "isOverscroll"; "required": false; "isSignal": true; }; "isHiddenAnchorList": { "alias": "isHiddenAnchorList"; "required": false; "isSignal": true; }; }, {}, ["sections"], ["*"], true, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchor, "sd-anchor", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "sidebarWidth": { "alias": "sidebarWidth"; "required": false; "isSignal": true; }; "ellipsis": { "alias": "ellipsis"; "required": false; "isSignal": true; }; "isOverscroll": { "alias": "isOverscroll"; "required": false; "isSignal": true; }; "isHiddenAnchorList": { "alias": "isHiddenAnchorList"; "required": false; "isSignal": true; }; }, {}, ["sections"], ["*"], true, never>;
|
|
19
22
|
}
|
|
@@ -4,9 +4,10 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class SdAnchorItem implements IAnchorItem {
|
|
5
5
|
title: import("@angular/core").InputSignal<string>;
|
|
6
6
|
icon: import("@angular/core").InputSignal<string | undefined>;
|
|
7
|
+
key: import("@angular/core").InputSignal<string | undefined>;
|
|
7
8
|
id: string;
|
|
8
9
|
elementRef: ElementRef<any>;
|
|
9
10
|
constructor();
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdAnchorItem, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchorItem, "sd-anchor-item", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchorItem, "sd-anchor-item", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
13
|
}
|
package/components/anchor/src/components/anchor-vertical/anchor-vertical-list.component.d.ts
CHANGED
|
@@ -7,10 +7,12 @@ export declare class SdAnchorVerticalList implements OnDestroy {
|
|
|
7
7
|
activeSectionId: import("@angular/core").InputSignal<string>;
|
|
8
8
|
ellipsis: import("@angular/core").InputSignal<boolean>;
|
|
9
9
|
sidebarWidth: import("@angular/core").InputSignal<string>;
|
|
10
|
+
parentAutoId: import("@angular/core").InputSignal<string | null | undefined>;
|
|
11
|
+
itemAutoId(section: SdAnchorItem): string | undefined;
|
|
10
12
|
sdClickSection: import("@angular/core").OutputEmitterRef<string>;
|
|
11
13
|
constructor();
|
|
12
14
|
onClickSection: (id: string) => void;
|
|
13
15
|
ngOnDestroy(): void;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdAnchorVerticalList, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchorVerticalList, "sd-anchor-vertical-list", never, { "sections": { "alias": "sections"; "required": true; "isSignal": true; }; "activeSectionId": { "alias": "activeSectionId"; "required": false; "isSignal": true; }; "ellipsis": { "alias": "ellipsis"; "required": false; "isSignal": true; }; "sidebarWidth": { "alias": "sidebarWidth"; "required": false; "isSignal": true; }; }, { "sdClickSection": "sdClickSection"; }, never, never, true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdAnchorVerticalList, "sd-anchor-vertical-list", never, { "sections": { "alias": "sections"; "required": true; "isSignal": true; }; "activeSectionId": { "alias": "activeSectionId"; "required": false; "isSignal": true; }; "ellipsis": { "alias": "ellipsis"; "required": false; "isSignal": true; }; "sidebarWidth": { "alias": "sidebarWidth"; "required": false; "isSignal": true; }; "parentAutoId": { "alias": "parentAutoId"; "required": false; "isSignal": true; }; }, { "sdClickSection": "sdClickSection"; }, never, never, true, never>;
|
|
16
18
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { SdColor, SdSize } from '@sd-angular/core/utilities/models';
|
|
3
2
|
import { MaterialIconFontSet } from '@sd-angular/core/utilities/models';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export type SdBadgeType = 'tag' | 'round' | 'icon';
|
|
6
5
|
export declare class SdBadge {
|
|
7
6
|
defaultIcon: string;
|
|
8
7
|
type: import("@angular/core").InputSignalWithTransform<SdBadgeType, SdBadgeType | null | undefined>;
|
|
9
|
-
color: import("@angular/core").InputSignalWithTransform<
|
|
8
|
+
color: import("@angular/core").InputSignalWithTransform<import("@sdcorejs/utils/models").Color, import("@sdcorejs/utils/models").Color | null | undefined>;
|
|
10
9
|
primary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
11
10
|
secondary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
11
|
success: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -18,10 +17,10 @@ export declare class SdBadge {
|
|
|
18
17
|
description: import("@angular/core").InputSignal<string | null | undefined>;
|
|
19
18
|
tooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
20
19
|
icon: import("@angular/core").InputSignal<string | null | undefined>;
|
|
21
|
-
size: import("@angular/core").InputSignalWithTransform<
|
|
20
|
+
size: import("@angular/core").InputSignalWithTransform<import("@sdcorejs/utils/models").Size, import("@sdcorejs/utils/models").Size | null | undefined>;
|
|
22
21
|
click: EventEmitter<Event>;
|
|
23
22
|
onClick: (event: Event) => void;
|
|
24
|
-
effectiveColor: import("@angular/core").Signal<
|
|
23
|
+
effectiveColor: import("@angular/core").Signal<import("@sdcorejs/utils/models").Color>;
|
|
25
24
|
baseColorClasses: import("@angular/core").Signal<{
|
|
26
25
|
'c-primary': boolean;
|
|
27
26
|
'c-secondary': boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
3
|
-
import { MaterialIconFontSet
|
|
3
|
+
import { MaterialIconFontSet } from '@sd-angular/core/utilities/models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export type SdButtonType = 'fill' | 'light' | 'outline' | 'link';
|
|
6
6
|
export type SdButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -10,7 +10,7 @@ export declare class SdButton extends SdBaseSecureComponent implements OnInit, O
|
|
|
10
10
|
private el;
|
|
11
11
|
autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12
12
|
type: import("@angular/core").InputSignalWithTransform<SdButtonType, SdButtonType | null | undefined>;
|
|
13
|
-
color: import("@angular/core").InputSignalWithTransform<
|
|
13
|
+
color: import("@angular/core").InputSignalWithTransform<import("@sdcorejs/utils/models").Color, import("@sdcorejs/utils/models").Color | null | undefined>;
|
|
14
14
|
size: import("@angular/core").InputSignalWithTransform<SdButtonSize, SdButtonSize | null | undefined>;
|
|
15
15
|
fontSet: import("@angular/core").InputSignalWithTransform<MaterialIconFontSet, MaterialIconFontSet | null | undefined>;
|
|
16
16
|
title: import("@angular/core").InputSignal<string | null | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nService } from '@sd-angular/core/i18n';
|
|
3
3
|
import { ClassicEditor, EditorConfig } from 'ckeditor5';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SdHeaderFooterBuilder {
|
|
@@ -8,7 +8,7 @@ export declare class SdHeaderFooterBuilder {
|
|
|
8
8
|
set model(value: string | undefined | null);
|
|
9
9
|
modelChange: EventEmitter<string>;
|
|
10
10
|
config: EditorConfig & {
|
|
11
|
-
_i18n?:
|
|
11
|
+
_i18n?: I18nService;
|
|
12
12
|
};
|
|
13
13
|
onReady(editor: ClassicEditor): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdHeaderFooterBuilder, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EditorConfig, EventInfo, ModelDocumentSelection, ViewDataTransfer } from 'ckeditor5';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nService } from '@sd-angular/core/i18n';
|
|
3
3
|
import { CkCommentConfig } from './plugins/ck-comment/ck-comment.plugin.model';
|
|
4
4
|
export type DocumentBuilderOption = EditorConfig & {
|
|
5
5
|
getOption?: () => SdDocumentBuilderOption;
|
|
6
|
-
_i18n?:
|
|
6
|
+
_i18n?: I18nService;
|
|
7
7
|
};
|
|
8
8
|
export interface SdDocumentBuilderOption {
|
|
9
9
|
onDropVariable?: (variable: SdDocumentBuilderVariable) => boolean | Promise<boolean | SdDocumentBuilderVariable>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EditorConfig } from 'ckeditor5';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nService } from '@sd-angular/core/i18n';
|
|
3
3
|
import { SdEditorImageConfig } from './image-upload.plugin.model';
|
|
4
4
|
export interface SdEditorOption {
|
|
5
5
|
imageConfig?: SdEditorImageConfig;
|
|
6
|
-
_i18n?:
|
|
6
|
+
_i18n?: I18nService;
|
|
7
7
|
}
|
|
8
8
|
export type EditorOption = EditorConfig & {
|
|
9
9
|
getOption?: () => SdEditorOption;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FileLoader } from 'ckeditor5';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nService } from '@sd-angular/core/i18n';
|
|
3
3
|
import { SdEditorImageUploadValidation } from '../../../models';
|
|
4
|
-
export declare const validateAndGetFile: (loader: FileLoader, validation?: SdEditorImageUploadValidation, onWarning?: (message: string) => void, i18n?:
|
|
4
|
+
export declare const validateAndGetFile: (loader: FileLoader, validation?: SdEditorImageUploadValidation, onWarning?: (message: string) => void, i18n?: I18nService) => Promise<File>;
|
|
@@ -22,13 +22,15 @@ export declare class AttributeTable {
|
|
|
22
22
|
set _columns(columns: SdFormGenericTableColumn[] | undefined | null);
|
|
23
23
|
columnsChange: EventEmitter<SdFormGenericTableColumn[]>;
|
|
24
24
|
column?: SdFormGenericTableColumn;
|
|
25
|
-
constructor(formGenericConfiguration: ISdFormGenericConfiguration);
|
|
25
|
+
constructor(formGenericConfiguration: ISdFormGenericConfiguration | null);
|
|
26
26
|
onChangeColumnsKey: (value: any) => void;
|
|
27
27
|
addColumn: () => void;
|
|
28
|
+
readonly columnTypeIcons: Record<string, string>;
|
|
29
|
+
columnTypeSymbol: (type: string | undefined) => string;
|
|
28
30
|
selectedIdx?: number | undefined;
|
|
29
31
|
editColumn: (idx: number) => void;
|
|
30
32
|
removeColumn: (idx: number) => void;
|
|
31
33
|
onConfirm: () => void;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AttributeTable,
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttributeTable, [{ optional: true; }]>;
|
|
33
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<AttributeTable, "attribute-table", never, { "components": { "alias": "components"; "required": true; }; "variables": { "alias": "variables"; "required": true; }; "_columnsKey": { "alias": "columnsKey"; "required": true; }; "_columns": { "alias": "columns"; "required": true; }; }, { "columnsKeyChange": "columnsKeyChange"; "columnsChange": "columnsChange"; }, never, never, true, never>;
|
|
34
36
|
}
|
|
@@ -8,8 +8,8 @@ export declare class AttributeTemplate {
|
|
|
8
8
|
component: SdFormGenericComponent;
|
|
9
9
|
set _component(component: SdFormGenericComponent);
|
|
10
10
|
sdChange: EventEmitter<SdFormGenericComponent>;
|
|
11
|
-
constructor(formGenericConfiguration: ISdFormGenericConfiguration);
|
|
11
|
+
constructor(formGenericConfiguration: ISdFormGenericConfiguration | null);
|
|
12
12
|
onChange: (value: string | number | null) => void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AttributeTemplate,
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttributeTemplate, [{ optional: true; }]>;
|
|
14
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<AttributeTemplate, "attribute-template", never, { "_component": { "alias": "component"; "required": true; }; }, { "sdChange": "sdChange"; }, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -19,13 +19,13 @@ export declare class ConfigureValidationComponent {
|
|
|
19
19
|
display: string;
|
|
20
20
|
}[];
|
|
21
21
|
accept: EventEmitter<SdFormGenericValidation[]>;
|
|
22
|
-
constructor(ref: ChangeDetectorRef, formGenericConfiguration: ISdFormGenericConfiguration);
|
|
22
|
+
constructor(ref: ChangeDetectorRef, formGenericConfiguration: ISdFormGenericConfiguration | null);
|
|
23
23
|
ngAfterViewInit(): void;
|
|
24
24
|
ngOnDestroy(): void;
|
|
25
25
|
open: (formGeneric: SdFormGeneric) => void;
|
|
26
26
|
addValidation: (type: SdFormGenericValidation["type"]) => void;
|
|
27
27
|
removaValidation: (index: number) => void;
|
|
28
28
|
updateValidations: () => void;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigureValidationComponent,
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigureValidationComponent, [null, { optional: true; }]>;
|
|
30
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigureValidationComponent, "configure-validation", never, {}, { "accept": "accept"; }, never, never, true, never>;
|
|
31
31
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { SdFormGenericComponent, SdFormGenericGroup } from '../../../../../models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
declare const COLOR_PRESETS: readonly ["primary", "secondary", "success", "warning", "error"];
|
|
5
|
+
export declare class GroupAttribute {
|
|
6
|
+
#private;
|
|
7
|
+
readonly iconPresets: readonly ["category", "folder", "inventory_2", "group_work", "workspaces", "view_quilt"];
|
|
8
|
+
readonly colorPresets: readonly ["primary", "secondary", "success", "warning", "error"];
|
|
9
|
+
readonly componentIcons: Record<string, {
|
|
10
|
+
symbol: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
form: FormGroup<{}>;
|
|
14
|
+
/** Required group reference. Mutated in place khi user pick icon/color/expression. */
|
|
15
|
+
readonly group: import("@angular/core").InputSignal<SdFormGenericGroup>;
|
|
16
|
+
constructor();
|
|
17
|
+
pickIcon: (icon: string) => void;
|
|
18
|
+
pickColor: (color: (typeof COLOR_PRESETS)[number]) => void;
|
|
19
|
+
symbolForChild: (c: SdFormGenericComponent) => string;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupAttribute, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupAttribute, "group-attribute", never, { "group": { "alias": "group"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './attribute/group-attribute.component';
|
|
@@ -11,6 +11,9 @@ export declare class TableControl {
|
|
|
11
11
|
constructor(ref: ChangeDetectorRef, builderService: BuilderService);
|
|
12
12
|
ngAfterViewInit(): void;
|
|
13
13
|
ngOnDestroy(): void;
|
|
14
|
+
columnIcon: (type: string) => "image" | "text_fields" | "123" | "calendar_month" | "radio_button_checked" | "check_box" | "attach_file";
|
|
15
|
+
sampleRows: () => number[];
|
|
16
|
+
cellPreview: (column: any, rowIndex: number) => any;
|
|
14
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableControl, never>;
|
|
15
18
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableControl, "table-control", never, { "_component": { "alias": "component"; "required": true; }; }, {}, never, never, true, never>;
|
|
16
19
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { CdkDragDrop, CdkDragMove } from '@angular/cdk/drag-drop';
|
|
2
|
-
import { ChangeDetectorRef } from '@angular/core';
|
|
3
2
|
import { FormGroup } from '@angular/forms';
|
|
4
3
|
import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
5
4
|
import { SdModal } from '@sd-angular/core/components/modal';
|
|
6
|
-
import {
|
|
7
|
-
import { FormBuilderComponent, SdFormGenericComponent, SdFormGenericGroup, SdFormGenericVariable } from '../../models';
|
|
5
|
+
import { FormBuilderComponent, FormBuilderComponentGroup, SdFormGenericComponent, SdFormGenericGroup, SdFormGenericVariable } from '../../models';
|
|
8
6
|
import { SdFormGenericValidation } from '../../models/form-generic-validation.model';
|
|
9
7
|
import { SdFormGeneric } from '../../models/form-generic.model';
|
|
10
8
|
import { SdFormRender } from '../form-render/form-render.component';
|
|
11
9
|
import { ConfigureValidationComponent } from './components/configure-validation/configure-validation.component';
|
|
12
|
-
import { BuilderService } from './services';
|
|
13
10
|
import * as i0 from "@angular/core";
|
|
14
11
|
interface DragDropRowItem {
|
|
15
12
|
items: (SdFormGenericComponent | SdFormGenericGroup)[];
|
|
@@ -17,31 +14,71 @@ interface DragDropRowItem {
|
|
|
17
14
|
}
|
|
18
15
|
export declare class SdFormBuilder extends SdBaseSecureComponent {
|
|
19
16
|
#private;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
popupViewJSON?: SdModal;
|
|
25
|
-
popupConfigureVariables?: SdModal;
|
|
26
|
-
configureValidation?: ConfigureValidationComponent;
|
|
27
|
-
formRender?: SdFormRender;
|
|
17
|
+
readonly popupViewJSON: import("@angular/core").Signal<SdModal | undefined>;
|
|
18
|
+
readonly popupConfigureVariables: import("@angular/core").Signal<SdModal | undefined>;
|
|
19
|
+
readonly configureValidation: import("@angular/core").Signal<ConfigureValidationComponent | undefined>;
|
|
20
|
+
readonly formRender: import("@angular/core").Signal<SdFormRender | undefined>;
|
|
28
21
|
form: FormGroup<{}>;
|
|
29
|
-
|
|
22
|
+
/** Input chính: schema form. Mỗi lần ref thay đổi → effect sẽ clone về local arrays. */
|
|
23
|
+
readonly formGeneric: import("@angular/core").InputSignal<SdFormGeneric | undefined>;
|
|
24
|
+
readonly formBuilderComponents: FormBuilderComponent[];
|
|
25
|
+
readonly componentIcons: Record<string, {
|
|
26
|
+
symbol: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}>;
|
|
29
|
+
readonly paletteSearch: import("@angular/core").WritableSignal<string>;
|
|
30
|
+
readonly paletteGroups: import("@angular/core").Signal<{
|
|
31
|
+
key: FormBuilderComponentGroup;
|
|
32
|
+
label: string;
|
|
33
|
+
items: FormBuilderComponent[];
|
|
34
|
+
}[]>;
|
|
30
35
|
components: Required<SdFormGeneric>['components'];
|
|
31
36
|
variables: Required<SdFormGeneric>['variables'];
|
|
32
37
|
validations: Required<SdFormGeneric>['validations'];
|
|
38
|
+
/** Cloned variables — dùng cho modal "Configure variables" (huỷ thì discard, ok thì gán ngược). */
|
|
33
39
|
clonedVariables: SdFormGenericVariable[];
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
readonly selectedComponent: import("@angular/core").WritableSignal<SdFormGenericComponent | SdFormGenericGroup | undefined>;
|
|
41
|
+
readonly isPreview: import("@angular/core").WritableSignal<boolean>;
|
|
42
|
+
/** Signal toàn cục: TRUE khi BẤT KỲ cdkDrag nào đang active (palette, canvas, group, resize).
|
|
43
|
+
* Trigger class `.fb-shell--dragging` để ẩn hover/actions/resize toàn diện, không phụ thuộc :has(). */
|
|
44
|
+
readonly isAnyDragging: import("@angular/core").WritableSignal<boolean>;
|
|
37
45
|
expand: boolean;
|
|
38
46
|
dragDropRows: DragDropRowItem[];
|
|
39
47
|
isDragging: boolean;
|
|
40
48
|
targetItem?: DragDropRowItem;
|
|
41
|
-
|
|
49
|
+
private lastDragPointer?;
|
|
50
|
+
/** Handler chung cho mọi cdkDragStarted — set signal global true. */
|
|
51
|
+
onAnyDragStarted: () => void;
|
|
52
|
+
onAnyDragMoved: (event: CdkDragMove<any>) => void;
|
|
53
|
+
/** Handler chung cho mọi cdkDragEnded — set signal global false (dùng setTimeout 0
|
|
54
|
+
* để chờ CDK xử lý xong drop event trước khi UI re-enable). */
|
|
55
|
+
onAnyDragEnded: () => void;
|
|
56
|
+
constructor();
|
|
42
57
|
ngOnInit(): void;
|
|
43
58
|
ngOnDestroy(): void;
|
|
44
59
|
addComponent: (item: FormBuilderComponent, index?: number) => void;
|
|
60
|
+
/** Symbol Material để render trên canvas item / attribute header. */
|
|
61
|
+
symbolFor: (item: SdFormGenericComponent | SdFormGenericGroup) => string;
|
|
62
|
+
/** Human-readable type label (e.g. "Text field", "Date"). */
|
|
63
|
+
typeLabelFor: (item: SdFormGenericComponent | SdFormGenericGroup) => string;
|
|
64
|
+
/** True nếu component có expression điều kiện — drives the "conditional" status chip. */
|
|
65
|
+
hasConditional: (item: SdFormGenericComponent | SdFormGenericGroup) => boolean;
|
|
66
|
+
/** Map SdColor preset → 2 CSS var names cho header-bg và header-fg của group card. */
|
|
67
|
+
groupColorVars: (color: string | undefined | null) => {
|
|
68
|
+
bg: string;
|
|
69
|
+
fg: string;
|
|
70
|
+
};
|
|
71
|
+
/** Segmented Design/Preview toggle (replaces play_circle/stop_circle). */
|
|
72
|
+
setMode: (preview: boolean) => void;
|
|
73
|
+
/** Nested drop handler — when dragging a palette item or canvas item INTO a group body. */
|
|
74
|
+
dropInGroup: (event: CdkDragDrop<any[]>, group: SdFormGenericGroup) => void;
|
|
75
|
+
/** Quick-add break sau row chỉ định.
|
|
76
|
+
* Tính component index cuối cùng của row đó trong this.components, splice break vào sau.
|
|
77
|
+
* Không qua palette — chỉ là utility action bám theo row trên canvas.
|
|
78
|
+
*/
|
|
79
|
+
insertBreakAfter: (row: DragDropRowItem) => void;
|
|
80
|
+
/** Remove a child component from a group's nested list. */
|
|
81
|
+
removeFromGroup: (group: SdFormGenericGroup, id: string) => void;
|
|
45
82
|
removeComponent: (id: string) => void;
|
|
46
83
|
selectComponent: (item?: SdFormGenericComponent | SdFormGenericGroup) => void;
|
|
47
84
|
onClickedOutside: (e: any) => void;
|
|
@@ -55,6 +92,12 @@ export declare class SdFormBuilder extends SdBaseSecureComponent {
|
|
|
55
92
|
noReturnPredicate: () => boolean;
|
|
56
93
|
changeSizeControl: (event: CdkDragMove<SdFormGenericComponent | SdFormGenericGroup>, item: SdFormGenericComponent | SdFormGenericGroup, items: (SdFormGenericComponent | SdFormGenericGroup)[], currentIndex: number) => Promise<void>;
|
|
57
94
|
dragEndChangeSizeControl: (event: any) => void;
|
|
95
|
+
/** Resize a child item INSIDE a group.
|
|
96
|
+
* Math: lấy bounding của chính item, tính (mouse.x - item.left) / colWidth = newCols.
|
|
97
|
+
* Cách này đúng cho cả flex-wrap (item ở wrap row 2+) vì dùng item-relative,
|
|
98
|
+
* không phải sum-of-all-preceding-cols (sai khi item wrap xuống row mới).
|
|
99
|
+
*/
|
|
100
|
+
changeSizeChildInGroup: (event: CdkDragMove<SdFormGenericComponent>, child: SdFormGenericComponent, group: SdFormGenericGroup) => void;
|
|
58
101
|
onChangeViewed: (component: SdFormGenericComponent) => void;
|
|
59
102
|
onChangeHidden: (component: SdFormGenericComponent | SdFormGenericGroup) => void;
|
|
60
103
|
onDuplicate: (component: SdFormGenericComponent | SdFormGenericGroup) => void;
|
|
@@ -72,6 +115,6 @@ export declare class SdFormBuilder extends SdBaseSecureComponent {
|
|
|
72
115
|
onUpdateValidations: (validations: SdFormGenericValidation[]) => void;
|
|
73
116
|
onValidate: () => Promise<void>;
|
|
74
117
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdFormBuilder, never>;
|
|
75
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdFormBuilder, "sd-form-builder", never, { "
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdFormBuilder, "sd-form-builder", never, { "formGeneric": { "alias": "formGeneric"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
76
119
|
}
|
|
77
120
|
export {};
|
|
@@ -29,11 +29,11 @@ export declare class SdFormRender extends SdBaseSecureComponent implements OnDes
|
|
|
29
29
|
key: string;
|
|
30
30
|
value: any;
|
|
31
31
|
}>;
|
|
32
|
-
constructor(ref: ChangeDetectorRef, formGenericConfiguration: ISdFormGenericConfiguration);
|
|
32
|
+
constructor(ref: ChangeDetectorRef, formGenericConfiguration: ISdFormGenericConfiguration | null);
|
|
33
33
|
ngAfterViewInit(): void;
|
|
34
34
|
ngOnDestroy(): void;
|
|
35
35
|
upload: () => Promise<void>;
|
|
36
36
|
getValidationMessages: (alert: SdFormGenericValidation["alert"]) => Promise<string[] | undefined>;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SdFormRender,
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdFormRender, [null, { optional: true; }]>;
|
|
38
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdFormRender, "sd-form-render", never, { "form": { "alias": "form"; "required": false; }; "_configuration": { "alias": "configuration"; "required": true; }; "_default": { "alias": "defaultEntity"; "required": false; }; "_entity": { "alias": "entity"; "required": false; }; "_properties": { "alias": "properties"; "required": false; }; "_viewed": { "alias": "viewed"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
39
|
}
|
|
@@ -26,7 +26,7 @@ export interface SdFormGenericVariable {
|
|
|
26
26
|
key: string;
|
|
27
27
|
label: string;
|
|
28
28
|
}
|
|
29
|
-
export type SdFormGenericComponent = SdFormGenericTextfield | SdFormGenericChipString | SdFormGenericChipCalendar | SdFormGenericTextarea | SdFormGenericNumber | SdFormGenericCheckbox | SdFormGenericDatetime | SdFormGenericValues | SdFormGenericUpload | SdFormGenericTable | SdFormGenericHtml;
|
|
29
|
+
export type SdFormGenericComponent = SdFormGenericTextfield | SdFormGenericChipString | SdFormGenericChipCalendar | SdFormGenericTextarea | SdFormGenericNumber | SdFormGenericCheckbox | SdFormGenericDatetime | SdFormGenericValues | SdFormGenericUpload | SdFormGenericTable | SdFormGenericHtml | SdFormGenericBreak;
|
|
30
30
|
export type SdFormGenericValues = SdFormGenericRadio | SdFormGenericSelect | SdFormGenericChecklist;
|
|
31
31
|
export interface SdFormGenericComponentBase {
|
|
32
32
|
template?: string;
|
|
@@ -254,6 +254,17 @@ export interface SdFormGenericTable extends SdFormGenericComponentBase {
|
|
|
254
254
|
titleButtonCreate?: string;
|
|
255
255
|
} & SdFormGenericComponentBase['properties'];
|
|
256
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Break component — invisible runtime element ép xuống dòng mới. Dùng khi layout có
|
|
259
|
+
* vùng cố định và việc ẩn/hiện trường khác không nên xáo trộn vị trí các trường còn lại.
|
|
260
|
+
* Ở canvas (design) render thanh ngang mảnh; ở runtime render empty 12-col cell.
|
|
261
|
+
*
|
|
262
|
+
* Extend SdFormGenericComponentBase để tương thích với union narrowing trong các pipe/render
|
|
263
|
+
* (key, validate, disabled, properties full) — runtime sẽ ignore mọi field ngoài id/type/layout.
|
|
264
|
+
*/
|
|
265
|
+
export interface SdFormGenericBreak extends SdFormGenericComponentBase {
|
|
266
|
+
type: 'break';
|
|
267
|
+
}
|
|
257
268
|
export interface SdFormGenericHtml {
|
|
258
269
|
template?: string;
|
|
259
270
|
id: string;
|
|
@@ -282,12 +293,21 @@ export interface SdFormGenericHtml {
|
|
|
282
293
|
query?: Record<string, any>;
|
|
283
294
|
};
|
|
284
295
|
}
|
|
296
|
+
export type FormBuilderComponentGroup = 'basic' | 'choice' | 'advanced' | 'layout';
|
|
285
297
|
export interface FormBuilderComponent {
|
|
286
298
|
type: string;
|
|
287
|
-
icon
|
|
299
|
+
/** Material Symbols Rounded icon name. Rendered via <span class="msi">{symbol}</span>. */
|
|
300
|
+
symbol: string;
|
|
301
|
+
/** Category group for the left palette grouping. */
|
|
302
|
+
group: FormBuilderComponentGroup;
|
|
288
303
|
name: string;
|
|
289
304
|
}
|
|
290
305
|
export declare const FormBuilderComponents: FormBuilderComponent[];
|
|
306
|
+
/** Lookup: component type → Material Symbol + label, used by attribute panel header. */
|
|
307
|
+
export declare const COMPONENT_ICONS: Record<string, {
|
|
308
|
+
symbol: string;
|
|
309
|
+
label: string;
|
|
310
|
+
}>;
|
|
291
311
|
export declare const GetComponentAttributes: (components: (SdFormGenericComponent | SdFormGenericGroup)[]) => {
|
|
292
312
|
value: string;
|
|
293
313
|
display: string;
|
package/components/index.d.ts
CHANGED
|
@@ -8,9 +8,7 @@ export * from '@sd-angular/core/components/table';
|
|
|
8
8
|
export * from '@sd-angular/core/components/quick-action';
|
|
9
9
|
export * from '@sd-angular/core/components/upload-file';
|
|
10
10
|
export * from '@sd-angular/core/components/section';
|
|
11
|
-
export * from '@sd-angular/core/components/workflow';
|
|
12
11
|
export * from '@sd-angular/core/components/anchor';
|
|
13
|
-
export * from '@sd-angular/core/components/anchor-v2';
|
|
14
12
|
export * from '@sd-angular/core/components/query-builder';
|
|
15
13
|
export * from '@sd-angular/core/components/import-excel';
|
|
16
14
|
export * from '@sd-angular/core/components/document-builder';
|
|
@@ -20,3 +18,4 @@ export * from '@sd-angular/core/components/code-editor';
|
|
|
20
18
|
export * from '@sd-angular/core/components/chart';
|
|
21
19
|
export * from '@sd-angular/core/components/editor';
|
|
22
20
|
export * from '@sd-angular/core/components/splitter';
|
|
21
|
+
export * from '@sd-angular/core/components/preview';
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ElementRef, TemplateRef } from '@angular/core';
|
|
2
|
-
import { SdColor } from '@sd-angular/core/utilities/models';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class SdModal {
|
|
5
4
|
#private;
|
|
6
5
|
static index: import("@angular/core").WritableSignal<number>;
|
|
7
6
|
templateRef: import("@angular/core").Signal<TemplateRef<any>>;
|
|
8
7
|
modal: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
8
|
+
readonly autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
9
|
+
readonly autoId: import("@angular/core").Signal<string | undefined>;
|
|
10
|
+
readonly closeButtonAutoId: import("@angular/core").Signal<string | undefined>;
|
|
9
11
|
title: import("@angular/core").InputSignalWithTransform<string, string | null | undefined>;
|
|
10
|
-
color: import("@angular/core").InputSignalWithTransform<
|
|
12
|
+
color: import("@angular/core").InputSignalWithTransform<import("@sdcorejs/utils/models").Color, import("@sdcorejs/utils/models").Color | null | undefined>;
|
|
11
13
|
width: import("@angular/core").InputSignalWithTransform<string, string | null | undefined>;
|
|
12
14
|
height: import("@angular/core").InputSignalWithTransform<string, string | null | undefined>;
|
|
13
15
|
view: import("@angular/core").InputSignalWithTransform<"dialog" | "bottom-sheet" | undefined, "dialog" | "bottom-sheet" | null | undefined>;
|
|
@@ -22,5 +24,5 @@ export declare class SdModal {
|
|
|
22
24
|
open: () => void;
|
|
23
25
|
close: () => void;
|
|
24
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdModal, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "modalClass": { "alias": "modalClass"; "required": false; "isSignal": true; }; "lazyLoadContent": { "alias": "lazyLoadContent"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "disableBackdropClose": { "alias": "disableBackdropClose"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "[sdHeader]", "*", "[sdFooterLeft]", "[sdFooterRight]", "[sdFooter]"], true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "modalClass": { "alias": "modalClass"; "required": false; "isSignal": true; }; "lazyLoadContent": { "alias": "lazyLoadContent"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "disableBackdropClose": { "alias": "disableBackdropClose"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "[sdHeader]", "*", "[sdFooterLeft]", "[sdFooterRight]", "[sdFooter]"], true, never>;
|
|
26
28
|
}
|