@sdcorejs/angular 21.0.10 → 21.0.11
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 +2 -2
- package/assets/STYLE-GUIDE.md +2 -2
- package/assets/scss/core/_inline-edit.scss +1 -1
- package/assets/scss/core/form.scss +1 -1
- package/assets/scss/themes/default.scss +2 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +13 -11
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +9 -10
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +7 -13
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +5 -7
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +4 -14
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +7 -8
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +24 -28
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +18 -22
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +6 -8
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +8 -9
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +6 -8
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +4 -5
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +4 -5
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +1 -3
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +6 -8
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +505 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +24 -26
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +3 -4
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +22 -14
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-models.mjs +3 -2
- package/fesm2022/sdcorejs-angular-utilities-models.mjs.map +1 -1
- package/package.json +6 -1
- package/types/sdcorejs-angular-components-badge.d.ts +3 -14
- package/types/sdcorejs-angular-components-button.d.ts +6 -4
- package/types/sdcorejs-angular-components-inform.d.ts +2 -8
- package/types/sdcorejs-angular-components-query-builder.d.ts +6 -6
- package/types/sdcorejs-angular-components-table.d.ts +9 -8
- package/types/sdcorejs-angular-components-tree.d.ts +3 -2
- package/types/sdcorejs-angular-modules-icon.d.ts +191 -0
- package/types/sdcorejs-angular-modules.d.ts +1 -0
- package/types/sdcorejs-angular-utilities-models.d.ts +6 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
3
4
|
import { Color, Size } from '@sdcorejs/utils/models';
|
|
4
|
-
import { MaterialIconFontSet } from '@sdcorejs/angular/utilities/models';
|
|
5
5
|
|
|
6
6
|
type SdBadgeType = 'tag' | 'round' | 'icon';
|
|
7
7
|
declare class SdBadge {
|
|
@@ -14,7 +14,7 @@ declare class SdBadge {
|
|
|
14
14
|
info: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
15
15
|
warning: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
16
16
|
error: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
17
|
-
fontSet: _angular_core.InputSignalWithTransform<
|
|
17
|
+
fontSet: _angular_core.InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
18
18
|
title: _angular_core.InputSignal<string | number | null | undefined>;
|
|
19
19
|
description: _angular_core.InputSignal<string | null | undefined>;
|
|
20
20
|
tooltip: _angular_core.InputSignal<string | null | undefined>;
|
|
@@ -43,11 +43,8 @@ declare class SdBadge {
|
|
|
43
43
|
'c-sm': boolean;
|
|
44
44
|
'c-md': boolean;
|
|
45
45
|
'c-lg': boolean;
|
|
46
|
-
'material-icons': boolean;
|
|
47
|
-
'material-icons-outlined': boolean;
|
|
48
|
-
'material-icons-round': boolean;
|
|
49
|
-
'material-icons-sharp': boolean;
|
|
50
46
|
}>;
|
|
47
|
+
iconCssSize: _angular_core.Signal<"18px" | "24px" | "16px">;
|
|
51
48
|
containerSizeClasses: _angular_core.Signal<{
|
|
52
49
|
'c-badge--sm': boolean;
|
|
53
50
|
'c-badge--md': boolean;
|
|
@@ -63,10 +60,6 @@ declare class SdBadge {
|
|
|
63
60
|
'c-sm': boolean;
|
|
64
61
|
'c-md': boolean;
|
|
65
62
|
'c-lg': boolean;
|
|
66
|
-
'material-icons': boolean;
|
|
67
|
-
'material-icons-outlined': boolean;
|
|
68
|
-
'material-icons-round': boolean;
|
|
69
|
-
'material-icons-sharp': boolean;
|
|
70
63
|
}>;
|
|
71
64
|
containerCombinedClasses: _angular_core.Signal<{
|
|
72
65
|
'c-badge--sm': boolean;
|
|
@@ -89,10 +82,6 @@ declare class SdBadge {
|
|
|
89
82
|
'c-sm': boolean;
|
|
90
83
|
'c-md': boolean;
|
|
91
84
|
'c-lg': boolean;
|
|
92
|
-
'material-icons': boolean;
|
|
93
|
-
'material-icons-outlined': boolean;
|
|
94
|
-
'material-icons-round': boolean;
|
|
95
|
-
'material-icons-sharp': boolean;
|
|
96
85
|
}>;
|
|
97
86
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdBadge, never>;
|
|
98
87
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdBadge, "sd-badge", 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; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "info": { "alias": "info"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { Color } from '@sdcorejs/utils/models';
|
|
4
|
-
import {
|
|
4
|
+
import { SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
5
5
|
|
|
6
6
|
type SdButtonType = 'fill' | 'light' | 'outline' | 'link';
|
|
7
7
|
type SdButtonSize = 'sm' | 'md' | 'lg';
|
|
8
8
|
type SdButtonHtmlType = 'button' | 'submit' | 'reset';
|
|
9
|
+
type SdButtonColor = Color | 'black';
|
|
9
10
|
declare class SdButton implements OnInit, OnDestroy {
|
|
10
11
|
#private;
|
|
11
12
|
private el;
|
|
12
13
|
autoIdInput: _angular_core.InputSignal<string | null | undefined>;
|
|
13
14
|
type: _angular_core.InputSignalWithTransform<SdButtonType, SdButtonType | null | undefined>;
|
|
14
|
-
color: _angular_core.InputSignalWithTransform<
|
|
15
|
+
color: _angular_core.InputSignalWithTransform<SdButtonColor, SdButtonColor | null | undefined>;
|
|
15
16
|
size: _angular_core.InputSignalWithTransform<SdButtonSize, SdButtonSize | null | undefined>;
|
|
16
|
-
fontSet: _angular_core.InputSignalWithTransform<
|
|
17
|
+
fontSet: _angular_core.InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
17
18
|
title: _angular_core.InputSignal<string | null | undefined>;
|
|
18
19
|
width: _angular_core.InputSignal<string | null | undefined>;
|
|
19
20
|
tooltip: _angular_core.InputSignal<string | null | undefined>;
|
|
@@ -29,6 +30,7 @@ declare class SdButton implements OnInit, OnDestroy {
|
|
|
29
30
|
'c-sm': boolean;
|
|
30
31
|
'c-md': boolean;
|
|
31
32
|
'c-lg': boolean;
|
|
33
|
+
'c-black': boolean;
|
|
32
34
|
'c-disabled': boolean;
|
|
33
35
|
'c-block': boolean;
|
|
34
36
|
}>;
|
|
@@ -42,4 +44,4 @@ declare class SdButton implements OnInit, OnDestroy {
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
export { SdButton };
|
|
45
|
-
export type { SdButtonHtmlType, SdButtonSize, SdButtonType };
|
|
47
|
+
export type { SdButtonColor, SdButtonHtmlType, SdButtonSize, SdButtonType };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef } from '@angular/core';
|
|
3
3
|
import { Color } from '@sdcorejs/utils/models';
|
|
4
|
-
import {
|
|
4
|
+
import { SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Marker cho vùng action custom chiếu vào <sd-inform>.
|
|
@@ -25,7 +25,7 @@ declare class SdInform {
|
|
|
25
25
|
description: _angular_core.InputSignal<string | undefined>;
|
|
26
26
|
icon: _angular_core.InputSignal<string | undefined>;
|
|
27
27
|
hideIcon: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
28
|
-
fontSet: _angular_core.InputSignalWithTransform<
|
|
28
|
+
fontSet: _angular_core.InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
29
29
|
closable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
30
30
|
actionLabel: _angular_core.InputSignal<string | undefined>;
|
|
31
31
|
lineClamp: _angular_core.InputSignal<number | undefined>;
|
|
@@ -47,12 +47,6 @@ declare class SdInform {
|
|
|
47
47
|
'c-error': boolean;
|
|
48
48
|
}>;
|
|
49
49
|
effectiveIcon: _angular_core.Signal<string | null>;
|
|
50
|
-
fontSetClasses: _angular_core.Signal<{
|
|
51
|
-
'material-icons': boolean;
|
|
52
|
-
'material-icons-outlined': boolean;
|
|
53
|
-
'material-icons-round': boolean;
|
|
54
|
-
'material-icons-sharp': boolean;
|
|
55
|
-
}>;
|
|
56
50
|
hasActionSlot: _angular_core.Signal<boolean>;
|
|
57
51
|
clampLines: _angular_core.Signal<number | null>;
|
|
58
52
|
showToggle: _angular_core.Signal<boolean>;
|
|
@@ -150,7 +150,7 @@ interface QbDateModeOption {
|
|
|
150
150
|
icon: string;
|
|
151
151
|
}
|
|
152
152
|
/** Stable option list for the date-mode select (module ref — never reallocated). */
|
|
153
|
-
declare const QB_DATE_MODES:
|
|
153
|
+
declare const QB_DATE_MODES: QbDateModeOption[];
|
|
154
154
|
/** One value-source option for field-to-field comparison UI. */
|
|
155
155
|
interface QbValueSourceOption {
|
|
156
156
|
value: QbValueSource;
|
|
@@ -159,9 +159,9 @@ interface QbValueSourceOption {
|
|
|
159
159
|
icon: string;
|
|
160
160
|
}
|
|
161
161
|
/** Stable option list for choosing between a literal value and another field. */
|
|
162
|
-
declare const QB_VALUE_SOURCE_OPTIONS:
|
|
162
|
+
declare const QB_VALUE_SOURCE_OPTIONS: QbValueSourceOption[];
|
|
163
163
|
/** Stable combined direction×unit option list (token `'unit:direction'`). */
|
|
164
|
-
declare const QB_RELATIVE_UNIT_OPTIONS:
|
|
164
|
+
declare const QB_RELATIVE_UNIT_OPTIONS: {
|
|
165
165
|
value: string;
|
|
166
166
|
display: string;
|
|
167
167
|
}[];
|
|
@@ -204,11 +204,11 @@ declare class SdQueryBuilder {
|
|
|
204
204
|
readonly resolvedAutoId: _angular_core.Signal<string | undefined>;
|
|
205
205
|
readonly fieldByKey: _angular_core.Signal<Record<string, SdQueryBuilderField>>;
|
|
206
206
|
/** Stable option list for the date-mode select. */
|
|
207
|
-
readonly dateModes:
|
|
207
|
+
readonly dateModes: _sdcorejs_angular_components_query_builder.QbDateModeOption[];
|
|
208
208
|
/** Stable option list for the literal-vs-field operand select. */
|
|
209
|
-
readonly valueSourceOptions:
|
|
209
|
+
readonly valueSourceOptions: _sdcorejs_angular_components_query_builder.QbValueSourceOption[];
|
|
210
210
|
/** Stable combined unit×direction option list for the relative select. */
|
|
211
|
-
readonly relativeUnitOptions:
|
|
211
|
+
readonly relativeUnitOptions: {
|
|
212
212
|
value: string;
|
|
213
213
|
display: string;
|
|
214
214
|
}[];
|
|
@@ -3,12 +3,13 @@ import { TemplateRef, Signal, EventEmitter, ChangeDetectorRef, InjectionToken, A
|
|
|
3
3
|
import { SdBadge } from '@sdcorejs/angular/components/badge';
|
|
4
4
|
import { SdSearch } from '@sdcorejs/angular/forms';
|
|
5
5
|
import { Operator, NestedKeyOf, Order, PagingReq, Color } from '@sdcorejs/utils/models';
|
|
6
|
-
import { SdUnwrapSignal
|
|
6
|
+
import { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
|
|
7
7
|
import { MatPaginatorIntl, MatPaginator } from '@angular/material/paginator';
|
|
8
8
|
import { MatSort } from '@angular/material/sort';
|
|
9
9
|
import { MatTable } from '@angular/material/table';
|
|
10
10
|
import { SdExcelColumn, SdLoadingService, SdExcelService, SdNotifyService, SdConfirmService } from '@sdcorejs/angular/services';
|
|
11
11
|
import { Observable } from 'rxjs';
|
|
12
|
+
import { SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
12
13
|
import { SdButton } from '@sdcorejs/angular/components/button';
|
|
13
14
|
import { CdkDrag, CdkDropList, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
15
|
import { SdQuickAction } from '@sdcorejs/angular/components/quick-action';
|
|
@@ -451,7 +452,7 @@ type SdTableCommand<T = any> = SdTableCommandNormal<T> | SdTableCommandChildren<
|
|
|
451
452
|
interface SdTableCommandNormal<T = any> {
|
|
452
453
|
color?: Color;
|
|
453
454
|
icon?: string | ((rowData: T) => string);
|
|
454
|
-
fontSet?:
|
|
455
|
+
fontSet?: SdIconSet;
|
|
455
456
|
title?: string | ((rowData: T) => string);
|
|
456
457
|
disabled?: boolean | ((rowData: T) => boolean);
|
|
457
458
|
hidden?: boolean | ((rowData: T) => boolean | Promise<boolean>);
|
|
@@ -460,7 +461,7 @@ interface SdTableCommandNormal<T = any> {
|
|
|
460
461
|
}
|
|
461
462
|
interface SdTableCommandChildren<T = any> {
|
|
462
463
|
icon?: string | ((rowData: T) => string);
|
|
463
|
-
fontSet?:
|
|
464
|
+
fontSet?: SdIconSet;
|
|
464
465
|
title?: string | ((rowData: T) => string);
|
|
465
466
|
disabled?: boolean | ((rowData: T) => boolean);
|
|
466
467
|
hidden?: boolean | ((rowData: T) => boolean | Promise<boolean>);
|
|
@@ -635,13 +636,13 @@ type SdTableAction<T = any> = SdTableActionNormal<T> | SdTableActionChildren<T>;
|
|
|
635
636
|
interface SdTableActionNormal<T = any> {
|
|
636
637
|
/**
|
|
637
638
|
* Tên icon hiển thị trên action button.
|
|
638
|
-
* Giá trị này được render qua `
|
|
639
|
+
* Giá trị này được render qua `sd-icon`, vì vậy nên dùng đúng tên glyph của configured icon set.
|
|
639
640
|
* Tra cứu icon tại: https://fonts.google.com/icons
|
|
640
641
|
*/
|
|
641
642
|
icon?: string;
|
|
642
643
|
/**
|
|
643
|
-
* Font set của
|
|
644
|
-
* Kiểu thực tế lấy từ `SdButton['fontSet']` và chỉ hỗ trợ các giá trị thuộc `
|
|
644
|
+
* Font set của icon.
|
|
645
|
+
* Kiểu thực tế lấy từ `SdButton['fontSet']` và chỉ hỗ trợ các giá trị thuộc `SdIconSet`,
|
|
645
646
|
* ví dụ: `material-icons`, `material-icons-outlined`, `material-icons-round`,
|
|
646
647
|
* `material-icons-sharp`.
|
|
647
648
|
* Nếu không truyền, `SdButton` sẽ dùng font set mặc định của nó.
|
|
@@ -672,11 +673,11 @@ interface SdTableActionNormal<T = any> {
|
|
|
672
673
|
interface SdTableActionChildren<T = any> {
|
|
673
674
|
/**
|
|
674
675
|
* Tên icon của action cha (group action).
|
|
675
|
-
* Giá trị nên là tên glyph
|
|
676
|
+
* Giá trị nên là tên glyph configured icon set: https://fonts.google.com/icons
|
|
676
677
|
*/
|
|
677
678
|
icon?: string;
|
|
678
679
|
/**
|
|
679
|
-
* Font set của
|
|
680
|
+
* Font set của icon cho action cha.
|
|
680
681
|
* Dùng cùng kiểu dữ liệu với `SdButton['fontSet']`.
|
|
681
682
|
*/
|
|
682
683
|
fontSet?: SdUnwrapSignal<SdButton['fontSet']>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, TemplateRef } from '@angular/core';
|
|
3
3
|
import { SdButton } from '@sdcorejs/angular/components/button';
|
|
4
|
-
import {
|
|
4
|
+
import { SdIconSet } from '@sdcorejs/angular/modules/icon';
|
|
5
|
+
import { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
|
|
5
6
|
import { Color } from '@sdcorejs/utils/models';
|
|
6
7
|
|
|
7
8
|
type SdTreeDataSource<TItem = any> = TItem[] | Signal<TItem[]> | (() => TItem[] | Promise<TItem[]>);
|
|
@@ -60,7 +61,7 @@ interface SdTreeCommand<T = any> {
|
|
|
60
61
|
title: string | ((item: T) => string);
|
|
61
62
|
icon?: string | ((item: T) => string | undefined | null);
|
|
62
63
|
color?: Color;
|
|
63
|
-
fontSet?:
|
|
64
|
+
fontSet?: SdIconSet;
|
|
64
65
|
disabled?: boolean | ((item: T) => boolean);
|
|
65
66
|
hidden?: boolean | ((item: T) => boolean);
|
|
66
67
|
click: (item: T) => void;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { Size } from '@sdcorejs/utils/models';
|
|
4
|
+
import { SdIconSet, SdMaterialIconSet } from '@sdcorejs/angular/utilities/models';
|
|
5
|
+
export { SdIconSet, SdMaterialIconSet } from '@sdcorejs/angular/utilities/models';
|
|
6
|
+
import { LucideConfig, LucideIcon, LucideIconData } from '@lucide/angular';
|
|
7
|
+
|
|
8
|
+
/** @deprecated Use `SdIconSet` instead. */
|
|
9
|
+
type SdIconFontSet = SdIconSet;
|
|
10
|
+
/**
|
|
11
|
+
* Một icon Lucide có thể đăng ký bằng class icon Angular hoặc dữ liệu path thuần.
|
|
12
|
+
*/
|
|
13
|
+
type SdLucideIconRegistration = LucideIcon | LucideIconData;
|
|
14
|
+
/**
|
|
15
|
+
* Danh sách đăng ký Lucide cho provider, hỗ trợ cả array và object map để app có thể giữ cấu trúc import riêng.
|
|
16
|
+
*/
|
|
17
|
+
type SdLucideIconRegistrations = SdLucideIconRegistration[] | Record<string, SdLucideIconRegistration>;
|
|
18
|
+
/**
|
|
19
|
+
* Cấu hình app-level cho `SdIcon`.
|
|
20
|
+
*
|
|
21
|
+
* Các alias tách riêng theo renderer để app có thể giữ tên Material trong template trong lúc chuyển dần sang Lucide.
|
|
22
|
+
*/
|
|
23
|
+
interface ISdIconConfiguration {
|
|
24
|
+
/** Default icon font set when component does not pass `fontSet`. */
|
|
25
|
+
defaultFontSet?: SdIconSet;
|
|
26
|
+
/** Alias áp dụng khi renderer hiện tại là Material. */
|
|
27
|
+
materialAliases?: Record<string, string>;
|
|
28
|
+
/** Alias áp dụng khi renderer hiện tại là Lucide. */
|
|
29
|
+
lucideAliases?: Record<string, string>;
|
|
30
|
+
/** Cấu hình stroke toàn cục cho Lucide SVG. */
|
|
31
|
+
lucideConfig?: Partial<LucideConfig>;
|
|
32
|
+
/** Icon Lucide cần đăng ký vào `@lucide/angular`. */
|
|
33
|
+
lucideIcons?: SdLucideIconRegistrations;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Cấu hình đã resolve đầy đủ để component không phải tự xử lý fallback nhiều lần.
|
|
37
|
+
*/
|
|
38
|
+
interface ISdIconResolvedConfiguration extends Required<Omit<ISdIconConfiguration, 'lucideIcons'>> {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Quy đổi token `Size` chung của SDCoreJS sang pixel cho icon.
|
|
42
|
+
*/
|
|
43
|
+
declare const SD_ICON_SIZE_MAP: Record<Size, number>;
|
|
44
|
+
/**
|
|
45
|
+
* Alias mặc định giúp template giữ tên Material trong khi renderer có thể là Lucide.
|
|
46
|
+
*/
|
|
47
|
+
declare const SD_DEFAULT_LUCIDE_ALIASES: Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Alias mac dinh giup template dung ten Lucide van render duoc khi quay ve Material font.
|
|
50
|
+
*/
|
|
51
|
+
declare const SD_DEFAULT_MATERIAL_ALIASES: Record<string, string>;
|
|
52
|
+
/**
|
|
53
|
+
* Cấu hình mặc định của Core UI icon.
|
|
54
|
+
*
|
|
55
|
+
* `material-icons-outlined` được giữ làm mặc định để không đổi visual của các component Material hiện có.
|
|
56
|
+
*/
|
|
57
|
+
declare const SD_ICON_DEFAULT_CONFIG: ISdIconResolvedConfiguration;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Facade icon dùng chung cho Core UI.
|
|
61
|
+
*
|
|
62
|
+
* Component này giữ template app theo tên icon ổn định, còn renderer có thể đổi giữa Material font và Lucide SVG qua provider hoặc input.
|
|
63
|
+
*/
|
|
64
|
+
declare class SdIcon {
|
|
65
|
+
private readonly config;
|
|
66
|
+
/**
|
|
67
|
+
* Tên icon theo namespace hiện tại.
|
|
68
|
+
*
|
|
69
|
+
* Khi `set` là `lucide`, tên này sẽ đi qua alias để app có thể tiếp tục dùng tên Material trong template.
|
|
70
|
+
*/
|
|
71
|
+
name: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
72
|
+
fontIcon: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
73
|
+
color: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
74
|
+
/**
|
|
75
|
+
* Renderer icon của riêng instance này.
|
|
76
|
+
*
|
|
77
|
+
* Deprecated alias for `fontSet`.
|
|
78
|
+
*/
|
|
79
|
+
set: _angular_core.InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Escape hatch cho Material icon font set.
|
|
82
|
+
*
|
|
83
|
+
* Prefer this input for both Material font families and Lucide SVG icons.
|
|
84
|
+
*/
|
|
85
|
+
fontSet: _angular_core.InputSignalWithTransform<SdIconSet | undefined, SdIconSet | null | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* Kích thước icon theo token SDCoreJS hoặc CSS size tùy biến.
|
|
88
|
+
*
|
|
89
|
+
* Token `sm | md | lg` giữ icon đồng bộ với các component Core UI; CSS string xử lý các ngoại lệ layout.
|
|
90
|
+
*/
|
|
91
|
+
size: _angular_core.InputSignalWithTransform<Size | (string & {}), Size | (string & {}) | null | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* Độ dày stroke riêng cho Lucide SVG.
|
|
94
|
+
*
|
|
95
|
+
* Bỏ trống để nhận giá trị từ `lucideConfig` app-level.
|
|
96
|
+
*/
|
|
97
|
+
strokeWidth: _angular_core.InputSignalWithTransform<string | number | undefined, string | number | null | undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* Giữ stroke width tuyệt đối cho Lucide khi SVG đổi kích thước.
|
|
100
|
+
*
|
|
101
|
+
* Input này đi qua `booleanAttribute` để hỗ trợ cả attribute trần trong template.
|
|
102
|
+
*/
|
|
103
|
+
absoluteStrokeWidth: _angular_core.InputSignalWithTransform<boolean | undefined, string | boolean | null | undefined>;
|
|
104
|
+
/**
|
|
105
|
+
* Nhãn truy cập cho icon có ý nghĩa.
|
|
106
|
+
*
|
|
107
|
+
* Khi không có nhãn, component tự đánh dấu decorative bằng `aria-hidden`.
|
|
108
|
+
*/
|
|
109
|
+
ariaLabel: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
110
|
+
/**
|
|
111
|
+
* Set icon cuối cùng sau khi áp dụng input và provider.
|
|
112
|
+
*
|
|
113
|
+
* @returns renderer hiện tại của component.
|
|
114
|
+
*/
|
|
115
|
+
resolvedFontSet: _angular_core.Signal<SdIconSet>;
|
|
116
|
+
/** @deprecated Use `resolvedFontSet` instead. */
|
|
117
|
+
resolvedSet: _angular_core.Signal<SdIconSet>;
|
|
118
|
+
/**
|
|
119
|
+
* Tên icon cuối cùng theo renderer hiện tại.
|
|
120
|
+
*
|
|
121
|
+
* @returns tên icon đã áp alias nếu renderer yêu cầu.
|
|
122
|
+
*/
|
|
123
|
+
resolvedName: _angular_core.Signal<string | undefined>;
|
|
124
|
+
/**
|
|
125
|
+
* Font set Material cuối cùng.
|
|
126
|
+
*
|
|
127
|
+
* @returns font set dùng cho `mat-icon`; với Lucide trả về fallback Material để computed luôn có type ổn định.
|
|
128
|
+
*/
|
|
129
|
+
resolvedMaterialFontSet: _angular_core.Signal<SdMaterialIconSet>;
|
|
130
|
+
/**
|
|
131
|
+
* Kích thước runtime cho renderer hiện tại.
|
|
132
|
+
*
|
|
133
|
+
* @returns số pixel cho token chuẩn hoặc CSS string nguyên bản cho custom size.
|
|
134
|
+
*/
|
|
135
|
+
resolvedSize: _angular_core.Signal<string | number>;
|
|
136
|
+
/**
|
|
137
|
+
* Kích thước CSS cuối cùng cho host element.
|
|
138
|
+
*
|
|
139
|
+
* @returns CSS length dùng cho custom property `--sd-icon-size`.
|
|
140
|
+
*/
|
|
141
|
+
resolvedCssSize: _angular_core.Signal<string>;
|
|
142
|
+
/**
|
|
143
|
+
* Stroke width cuối cùng cho Lucide SVG.
|
|
144
|
+
*
|
|
145
|
+
* @returns giá trị input instance hoặc fallback từ provider.
|
|
146
|
+
*/
|
|
147
|
+
resolvedStrokeWidth: _angular_core.Signal<string | number | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* Absolute stroke width cuối cùng cho Lucide SVG.
|
|
150
|
+
*
|
|
151
|
+
* @returns giá trị input instance hoặc fallback từ provider.
|
|
152
|
+
*/
|
|
153
|
+
resolvedAbsoluteStrokeWidth: _angular_core.Signal<boolean | undefined>;
|
|
154
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdIcon, never>;
|
|
155
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdIcon, "sd-icon", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "fontIcon": { "alias": "fontIcon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "set": { "alias": "set"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "absoluteStrokeWidth": { "alias": "absoluteStrokeWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Injection token chứa cấu hình icon đã resolve cho toàn bộ app.
|
|
160
|
+
*
|
|
161
|
+
* Token có factory mặc định để `SdIcon` vẫn chạy khi app chưa gọi `provideSdIcon`.
|
|
162
|
+
*/
|
|
163
|
+
declare const SD_ICON_CONFIGURATION: InjectionToken<ISdIconResolvedConfiguration>;
|
|
164
|
+
/**
|
|
165
|
+
* Đăng ký cấu hình icon Core UI ở app-level.
|
|
166
|
+
*
|
|
167
|
+
* Provider này gom cả cấu hình `SdIcon` và registry của `@lucide/angular` để consumer chỉ cần gọi một hàm.
|
|
168
|
+
*
|
|
169
|
+
* @param config - cấu hình app-level cho Material/Lucide icon.
|
|
170
|
+
* @returns environment providers dùng được trong `ApplicationConfig.providers`.
|
|
171
|
+
*/
|
|
172
|
+
declare function provideSdIcon(config?: ISdIconConfiguration): EnvironmentProviders;
|
|
173
|
+
/**
|
|
174
|
+
* Resolve cấu hình `SdIcon` thành object đầy đủ, không còn field optional.
|
|
175
|
+
*
|
|
176
|
+
* Alias mặc định đứng trước để app có thể override từng key mà không phải copy toàn bộ bảng alias.
|
|
177
|
+
*
|
|
178
|
+
* @param config - cấu hình rời rạc từ consumer hoặc mặc định rỗng.
|
|
179
|
+
* @returns cấu hình đầy đủ dùng trực tiếp trong component.
|
|
180
|
+
*/
|
|
181
|
+
declare function resolveSdIconConfig(config?: ISdIconConfiguration): ISdIconResolvedConfiguration;
|
|
182
|
+
/**
|
|
183
|
+
* Chuẩn hóa nhiều kiểu khai báo Lucide icon về array cho `provideLucideIcons`.
|
|
184
|
+
*
|
|
185
|
+
* @param registrations - array hoặc object map icon Lucide từ consumer.
|
|
186
|
+
* @returns danh sách icon Lucide đã sẵn sàng để spread vào provider của Lucide.
|
|
187
|
+
*/
|
|
188
|
+
declare function normalizeSdLucideIcons(registrations?: SdLucideIconRegistrations): SdLucideIconRegistration[];
|
|
189
|
+
|
|
190
|
+
export { SD_DEFAULT_LUCIDE_ALIASES, SD_DEFAULT_MATERIAL_ALIASES, SD_ICON_CONFIGURATION, SD_ICON_DEFAULT_CONFIG, SD_ICON_SIZE_MAP, SdIcon, normalizeSdLucideIcons, provideSdIcon, resolveSdIconConfig };
|
|
191
|
+
export type { ISdIconConfiguration, ISdIconResolvedConfiguration, SdIconFontSet, SdLucideIconRegistration, SdLucideIconRegistrations };
|
|
@@ -10,8 +10,10 @@ type SdColor = Color;
|
|
|
10
10
|
/** @deprecated Use {@link Size} from `@sdcorejs/utils/models` instead */
|
|
11
11
|
type SdSize = Size;
|
|
12
12
|
|
|
13
|
-
type
|
|
14
|
-
|
|
13
|
+
type SdIconSet = 'material-icons' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp' | 'lucide';
|
|
14
|
+
type SdMaterialIconSet = Exclude<SdIconSet, 'lucide'>;
|
|
15
|
+
declare const DefaultSdIconSet: SdIconSet;
|
|
16
|
+
declare const DefaultSdMaterialIconSet: SdMaterialIconSet;
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* @deprecated Use {@link ValidationPatternType} from `@sdcorejs/utils/models` instead.
|
|
@@ -83,5 +85,5 @@ type SdPagingReq<T = any> = PagingReq<T>;
|
|
|
83
85
|
/** @deprecated Use {@link PagingRes} from `@sdcorejs/utils/models` instead */
|
|
84
86
|
type SdPagingRes<T = any> = PagingRes<T>;
|
|
85
87
|
|
|
86
|
-
export {
|
|
87
|
-
export type {
|
|
88
|
+
export { DefaultSdIconSet, DefaultSdMaterialIconSet, SD_EMPTY_STR, SdNormalizeAsync, SdOperators, SdPatternCommons, SdResolveMaybeAsync };
|
|
89
|
+
export type { SdColor, SdFilter, SdFilterAndOr, SdFilterBetween, SdFilterHasData, SdFilterNoData, SdIconSet, SdMaterialIconSet, SdMaybeAsync, SdNestedKeyOf, SdOperator, SdOperatorHasData, SdOperatorNoData, SdOrder, SdPagingReq, SdPagingRes, SdPatternCommon, SdPatternType, SdQueryReq, SdSize, SdUnwrapSafe, SdUnwrapSignal };
|