@sdcorejs/angular 21.2.5 → 22.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/fonts/fonts.scss +2 -2
- package/assets/images/coming-soon.svg +6 -6
- package/assets/images/data-empty.svg +2 -2
- package/assets/images/expired.svg +6 -6
- package/assets/images/file-error.svg +6 -6
- package/assets/images/filter-empty.svg +2 -2
- package/assets/images/filter-required.svg +2 -2
- package/assets/images/forbidden.svg +2 -2
- package/assets/images/image-error.svg +8 -8
- package/assets/images/maintenance.svg +3 -3
- package/assets/images/not-found.svg +2 -2
- package/assets/images/offline.svg +5 -5
- package/assets/images/submitted.svg +5 -5
- package/assets/images/success.svg +3 -3
- package/assets/images/unauthorized.svg +2 -2
- package/assets/images/unknown-error.svg +2 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +46 -29
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +167 -94
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +20 -13
- package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +65 -40
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +15 -9
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +31 -17
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +17 -10
- package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +17 -10
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-card.mjs +28 -17
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-chart.mjs +52 -32
- package/fesm2022/sdcorejs-angular-components-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +15 -9
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +32 -19
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +38 -21
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +396 -306
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +10 -10
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +42 -24
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs +39 -21
- package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +9 -8
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +22 -14
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +21 -12
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +17 -10
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +26 -16
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +288 -147
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +279 -153
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +69 -36
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +17 -13
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +26 -16
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +58 -37
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +36 -21
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +27 -23
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +34 -20
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +432 -272
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +86 -46
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +65 -40
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +25 -14
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +42 -33
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +80 -42
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +15 -9
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +41 -24
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +37 -22
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +55 -30
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +63 -34
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +65 -35
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +12 -12
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +94 -53
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +33 -18
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +25 -14
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +66 -35
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +94 -49
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +3 -3
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +13 -8
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +41 -22
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +112 -59
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +21 -12
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +48 -26
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs +83 -43
- package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +72 -38
- package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +76 -41
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms.mjs +4 -4
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-handlers.mjs +3 -3
- package/fesm2022/sdcorejs-angular-handlers.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +12 -9
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +6 -6
- package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-auth.mjs +11 -10
- package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +19 -11
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-keycloak.mjs +7 -7
- package/fesm2022/sdcorejs-angular-modules-keycloak.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +387 -247
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-permission.mjs +13 -11
- package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +25 -25
- package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +10 -10
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-cache.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +9 -9
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +21 -16
- package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-persistence.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-persistence.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-storage.mjs +3 -3
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-task.mjs +19 -11
- package/fesm2022/sdcorejs-angular-services-task.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +17 -10
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-viewport.mjs +15 -9
- package/fesm2022/sdcorejs-angular-services-viewport.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-models.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -10,10 +10,10 @@ import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
|
10
10
|
* Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.
|
|
11
11
|
*/
|
|
12
12
|
class SdInformActionDirective {
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInformActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: SdInformActionDirective, isStandalone: true, selector: "[sdInformAction]", ngImport: i0 });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInformActionDirective, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
18
|
args: [{
|
|
19
19
|
selector: '[sdInformAction]',
|
|
@@ -39,24 +39,35 @@ class SdInform {
|
|
|
39
39
|
success = input(false, { ...(ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
40
40
|
warning = input(false, { ...(ngDevMode ? { debugName: "warning" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
41
41
|
error = input(false, { ...(ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
42
|
-
title = input(
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
title = input(/* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
44
|
+
description = input(/* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
|
|
46
|
+
icon = input(/* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
45
48
|
hideIcon = input(false, { ...(ngDevMode ? { debugName: "hideIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
46
49
|
fontSet = input(undefined, { ...(ngDevMode ? { debugName: "fontSet" } : /* istanbul ignore next */ {}), transform: value => value ?? undefined });
|
|
47
50
|
closable = input(false, { ...(ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
48
|
-
actionLabel = input(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
actionLabel = input(/* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [undefined, { debugName: "actionLabel" }] : /* istanbul ignore next */ []));
|
|
53
|
+
lineClamp = input(/* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [undefined, { debugName: "lineClamp" }] : /* istanbul ignore next */ []));
|
|
55
|
+
autoId = input(/* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [undefined, { debugName: "autoId" }] : /* istanbul ignore next */ []));
|
|
51
57
|
// 2. OUTPUTS
|
|
52
58
|
sdClosed = output();
|
|
53
59
|
sdAction = output();
|
|
54
60
|
// 3. STATE
|
|
55
|
-
dismissed = signal(false,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
dismissed = signal(false, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "dismissed" }] : /* istanbul ignore next */ []));
|
|
63
|
+
expanded = signal(false, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
65
|
+
overflowing = signal(false, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "overflowing" }] : /* istanbul ignore next */ []));
|
|
67
|
+
bodyRef = viewChild('body', /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "bodyRef" }] : /* istanbul ignore next */ []));
|
|
69
|
+
actionSlot = contentChild(SdInformActionDirective, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "actionSlot" }] : /* istanbul ignore next */ []));
|
|
60
71
|
// 4. COMPUTED
|
|
61
72
|
effectiveColor = computed(() => {
|
|
62
73
|
if (this.primary())
|
|
@@ -72,7 +83,8 @@ class SdInform {
|
|
|
72
83
|
if (this.error())
|
|
73
84
|
return 'error';
|
|
74
85
|
return this.color();
|
|
75
|
-
},
|
|
86
|
+
}, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "effectiveColor" }] : /* istanbul ignore next */ []));
|
|
76
88
|
colorClasses = computed(() => {
|
|
77
89
|
const c = this.effectiveColor();
|
|
78
90
|
return {
|
|
@@ -83,31 +95,37 @@ class SdInform {
|
|
|
83
95
|
'c-warning': c === 'warning',
|
|
84
96
|
'c-error': c === 'error',
|
|
85
97
|
};
|
|
86
|
-
},
|
|
98
|
+
}, /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "colorClasses" }] : /* istanbul ignore next */ []));
|
|
87
100
|
effectiveIcon = computed(() => {
|
|
88
101
|
if (this.hideIcon())
|
|
89
102
|
return null;
|
|
90
103
|
return this.icon() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];
|
|
91
|
-
},
|
|
92
|
-
|
|
104
|
+
}, /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "effectiveIcon" }] : /* istanbul ignore next */ []));
|
|
106
|
+
hasActionSlot = computed(() => !!this.actionSlot(), /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "hasActionSlot" }] : /* istanbul ignore next */ []));
|
|
93
108
|
// clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.
|
|
94
109
|
clampLines = computed(() => {
|
|
95
110
|
const n = this.lineClamp();
|
|
96
111
|
if (!n || n <= 0)
|
|
97
112
|
return null;
|
|
98
113
|
return this.expanded() ? null : n;
|
|
99
|
-
},
|
|
114
|
+
}, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "clampLines" }] : /* istanbul ignore next */ []));
|
|
100
116
|
// toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).
|
|
101
117
|
showToggle = computed(() => {
|
|
102
118
|
if (!this.lineClamp())
|
|
103
119
|
return false;
|
|
104
120
|
return this.overflowing() || this.expanded();
|
|
105
|
-
},
|
|
121
|
+
}, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
|
|
106
123
|
// why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.
|
|
107
124
|
liveRole = computed(() => {
|
|
108
125
|
const c = this.effectiveColor();
|
|
109
126
|
return c === 'error' || c === 'warning' ? 'alert' : 'status';
|
|
110
|
-
},
|
|
127
|
+
}, /* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [{ debugName: "liveRole" }] : /* istanbul ignore next */ []));
|
|
111
129
|
// 5. OVERFLOW MEASUREMENT
|
|
112
130
|
#measureScheduled = false;
|
|
113
131
|
constructor() {
|
|
@@ -159,10 +177,10 @@ class SdInform {
|
|
|
159
177
|
event.stopPropagation();
|
|
160
178
|
this.sdAction.emit(event);
|
|
161
179
|
}
|
|
162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
163
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n\n @if (_effectiveIcon) {\n <sd-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [fontSet]=\"_fontSet\" [name]=\"_effectiveIcon\"></sd-icon>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div\n #body\n class=\"c-inform-body\"\n [class.is-clamped]=\"clampLines() !== null\"\n [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <button type=\"button\" class=\"c-inform-action c-inform-action-link\" (click)=\"onAction($event)\">\n {{ _actionLabel }}\n </button>\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"c-inform-close\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}.c-inform{display:flex;align-items:flex-start;gap:12px;border:1px solid transparent;border-radius:8px;padding:12px 16px;background:#fff}.c-inform.c-primary{border-color:var(--sd-primary);background:var(--sd-primary-light)}.c-inform.c-primary .c-inform-icon,.c-inform.c-primary .c-inform-title{color:var(--sd-primary)}.c-inform.c-secondary{border-color:var(--sd-secondary);background:var(--sd-secondary-light)}.c-inform.c-secondary .c-inform-icon,.c-inform.c-secondary .c-inform-title{color:var(--sd-secondary)}.c-inform.c-info{border-color:var(--sd-info);background:var(--sd-info-light)}.c-inform.c-info .c-inform-icon,.c-inform.c-info .c-inform-title{color:var(--sd-info)}.c-inform.c-success{border-color:var(--sd-success);background:var(--sd-success-light)}.c-inform.c-success .c-inform-icon,.c-inform.c-success .c-inform-title{color:var(--sd-success)}.c-inform.c-warning{border-color:var(--sd-warning);background:var(--sd-warning-light)}.c-inform.c-warning .c-inform-icon,.c-inform.c-warning .c-inform-title{color:var(--sd-warning)}.c-inform.c-error{border-color:var(--sd-error);background:var(--sd-error-light)}.c-inform.c-error .c-inform-icon,.c-inform.c-error .c-inform-title{color:var(--sd-error)}.c-inform .c-inform-icon{flex:0 0 auto;width:20px;height:20px;font-size:20px;line-height:20px}.c-inform .c-inform-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.c-inform .c-inform-title{font-weight:600;font-size:14px;line-height:20px}.c-inform .c-inform-body{font-size:14px;line-height:20px;color:var(--sd-text);overflow-wrap:break-word}.c-inform .c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{align-self:flex-start;margin-top:4px;padding:0;border:none;background:none;cursor:pointer;font-size:14px;line-height:20px}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{color:var(--sd-info)}.c-inform .c-inform-action-link:hover{text-decoration:underline}.c-inform .c-inform-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;padding:0;border:none;background:transparent;cursor:pointer;color:var(--sd-text-secondary);transition:background-color 80ms ease,color 80ms ease}.c-inform .c-inform-close:hover{background:#0000000f;color:var(--sd-error)}.c-inform .c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInform, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n\n @if (_effectiveIcon) {\n <sd-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [fontSet]=\"_fontSet\" [name]=\"_effectiveIcon\"></sd-icon>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div\n #body\n class=\"c-inform-body\"\n [class.is-clamped]=\"clampLines() !== null\"\n [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <button type=\"button\" class=\"c-inform-action c-inform-action-link\" (click)=\"onAction($event)\">\n {{ _actionLabel }}\n </button>\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"c-inform-close\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}.c-inform{display:flex;align-items:flex-start;gap:12px;border:1px solid transparent;border-radius:8px;padding:12px 16px;background:#fff}.c-inform.c-primary{border-color:var(--sd-primary);background:var(--sd-primary-light)}.c-inform.c-primary .c-inform-icon,.c-inform.c-primary .c-inform-title{color:var(--sd-primary)}.c-inform.c-secondary{border-color:var(--sd-secondary);background:var(--sd-secondary-light)}.c-inform.c-secondary .c-inform-icon,.c-inform.c-secondary .c-inform-title{color:var(--sd-secondary)}.c-inform.c-info{border-color:var(--sd-info);background:var(--sd-info-light)}.c-inform.c-info .c-inform-icon,.c-inform.c-info .c-inform-title{color:var(--sd-info)}.c-inform.c-success{border-color:var(--sd-success);background:var(--sd-success-light)}.c-inform.c-success .c-inform-icon,.c-inform.c-success .c-inform-title{color:var(--sd-success)}.c-inform.c-warning{border-color:var(--sd-warning);background:var(--sd-warning-light)}.c-inform.c-warning .c-inform-icon,.c-inform.c-warning .c-inform-title{color:var(--sd-warning)}.c-inform.c-error{border-color:var(--sd-error);background:var(--sd-error-light)}.c-inform.c-error .c-inform-icon,.c-inform.c-error .c-inform-title{color:var(--sd-error)}.c-inform .c-inform-icon{flex:0 0 auto;width:20px;height:20px;font-size:20px;line-height:20px}.c-inform .c-inform-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.c-inform .c-inform-title{font-weight:600;font-size:14px;line-height:20px}.c-inform .c-inform-body{font-size:14px;line-height:20px;color:var(--sd-text);overflow-wrap:break-word}.c-inform .c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{align-self:flex-start;margin-top:4px;padding:0;border:none;background:none;cursor:pointer;font-size:14px;line-height:20px}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{color:var(--sd-info)}.c-inform .c-inform-action-link:hover{text-decoration:underline}.c-inform .c-inform-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;padding:0;border:none;background:transparent;cursor:pointer;color:var(--sd-text-secondary);transition:background-color 80ms ease,color 80ms ease}.c-inform .c-inform-close:hover{background:#0000000f;color:var(--sd-error)}.c-inform .c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
164
182
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInform, decorators: [{
|
|
166
184
|
type: Component,
|
|
167
185
|
args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdIcon, CommonModule, SdTranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n\n @if (_effectiveIcon) {\n <sd-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [fontSet]=\"_fontSet\" [name]=\"_effectiveIcon\"></sd-icon>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div\n #body\n class=\"c-inform-body\"\n [class.is-clamped]=\"clampLines() !== null\"\n [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <button type=\"button\" class=\"c-inform-action c-inform-action-link\" (click)=\"onAction($event)\">\n {{ _actionLabel }}\n </button>\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"c-inform-close\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}.c-inform{display:flex;align-items:flex-start;gap:12px;border:1px solid transparent;border-radius:8px;padding:12px 16px;background:#fff}.c-inform.c-primary{border-color:var(--sd-primary);background:var(--sd-primary-light)}.c-inform.c-primary .c-inform-icon,.c-inform.c-primary .c-inform-title{color:var(--sd-primary)}.c-inform.c-secondary{border-color:var(--sd-secondary);background:var(--sd-secondary-light)}.c-inform.c-secondary .c-inform-icon,.c-inform.c-secondary .c-inform-title{color:var(--sd-secondary)}.c-inform.c-info{border-color:var(--sd-info);background:var(--sd-info-light)}.c-inform.c-info .c-inform-icon,.c-inform.c-info .c-inform-title{color:var(--sd-info)}.c-inform.c-success{border-color:var(--sd-success);background:var(--sd-success-light)}.c-inform.c-success .c-inform-icon,.c-inform.c-success .c-inform-title{color:var(--sd-success)}.c-inform.c-warning{border-color:var(--sd-warning);background:var(--sd-warning-light)}.c-inform.c-warning .c-inform-icon,.c-inform.c-warning .c-inform-title{color:var(--sd-warning)}.c-inform.c-error{border-color:var(--sd-error);background:var(--sd-error-light)}.c-inform.c-error .c-inform-icon,.c-inform.c-error .c-inform-title{color:var(--sd-error)}.c-inform .c-inform-icon{flex:0 0 auto;width:20px;height:20px;font-size:20px;line-height:20px}.c-inform .c-inform-content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.c-inform .c-inform-title{font-weight:600;font-size:14px;line-height:20px}.c-inform .c-inform-body{font-size:14px;line-height:20px;color:var(--sd-text);overflow-wrap:break-word}.c-inform .c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{align-self:flex-start;margin-top:4px;padding:0;border:none;background:none;cursor:pointer;font-size:14px;line-height:20px}.c-inform .c-inform-toggle,.c-inform .c-inform-action-link{color:var(--sd-info)}.c-inform .c-inform-action-link:hover{text-decoration:underline}.c-inform .c-inform-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;padding:0;border:none;background:transparent;cursor:pointer;color:var(--sd-text-secondary);transition:background-color 80ms ease,color 80ms ease}.c-inform .c-inform-close:hover{background:#0000000f;color:var(--sd-error)}.c-inform .c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
168
186
|
}], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], primary: [{ type: i0.Input, args: [{ isSignal: true, alias: "primary", required: false }] }], secondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondary", required: false }] }], info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], warning: [{ type: i0.Input, args: [{ isSignal: true, alias: "warning", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], hideIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideIcon", required: false }] }], fontSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontSet", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], lineClamp: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineClamp", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdAction: [{ type: i0.Output, args: ["sdAction"] }], bodyRef: [{ type: i0.ViewChild, args: ['body', { isSignal: true }] }], actionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdInformActionDirective), { isSignal: true }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-components-inform.mjs","sources":["../../../projects/sdcorejs-angular/components/inform/src/inform-action.directive.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.html","../../../projects/sdcorejs-angular/components/inform/sdcorejs-angular-components-inform.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marker cho vùng action custom chiếu vào <sd-inform>.\n * Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.\n */\n@Directive({\n selector: '[sdInformAction]',\n standalone: true,\n})\nexport class SdInformActionDirective {}\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdInformActionDirective } from './inform-action.directive';\nimport { SdIcon, type SdIconSet } from '@sdcorejs/angular/modules/icon';\n\n// why: mỗi color có icon trạng thái mặc định khi consumer không truyền [icon].\nconst SD_INFORM_DEFAULT_ICON: Record<Color, string> = {\n primary: 'info',\n secondary: 'info',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n@Component({\n selector: 'sd-inform',\n templateUrl: './inform.component.html',\n styleUrl: './inform.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdIcon, CommonModule, SdTranslatePipe],\n})\nexport class SdInform {\n // 1. INPUTS\n color = input<Color, Color | undefined | null>('primary', {\n transform: value => value || 'primary',\n });\n\n primary = input(false, { transform: booleanAttribute });\n secondary = input(false, { transform: booleanAttribute });\n info = input(false, { transform: booleanAttribute });\n success = input(false, { transform: booleanAttribute });\n warning = input(false, { transform: booleanAttribute });\n error = input(false, { transform: booleanAttribute });\n\n title = input<string | undefined>();\n description = input<string | undefined>();\n icon = input<string | undefined>();\n hideIcon = input(false, { transform: booleanAttribute });\n\n fontSet = input<SdIconSet | undefined, SdIconSet | undefined | null>(undefined, {\n transform: value => value ?? undefined,\n });\n\n closable = input(false, { transform: booleanAttribute });\n actionLabel = input<string | undefined>();\n lineClamp = input<number | undefined>();\n autoId = input<string | undefined>();\n\n // 2. OUTPUTS\n sdClosed = output<Event>();\n sdAction = output<Event>();\n\n // 3. STATE\n readonly dismissed = signal(false);\n readonly expanded = signal(false);\n readonly overflowing = signal(false);\n\n protected readonly bodyRef = viewChild<ElementRef<HTMLElement>>('body');\n protected readonly actionSlot = contentChild(SdInformActionDirective);\n\n // 4. COMPUTED\n effectiveColor = computed<Color>(() => {\n if (this.primary()) return 'primary';\n if (this.secondary()) return 'secondary';\n if (this.info()) return 'info';\n if (this.success()) return 'success';\n if (this.warning()) return 'warning';\n if (this.error()) return 'error';\n return this.color();\n });\n\n colorClasses = computed(() => {\n const c = this.effectiveColor();\n return {\n 'c-primary': c === 'primary',\n 'c-secondary': c === 'secondary',\n 'c-info': c === 'info',\n 'c-success': c === 'success',\n 'c-warning': c === 'warning',\n 'c-error': c === 'error',\n };\n });\n\n effectiveIcon = computed<string | null>(() => {\n if (this.hideIcon()) return null;\n return this.icon() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];\n });\n\n hasActionSlot = computed(() => !!this.actionSlot());\n\n // clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.\n clampLines = computed<number | null>(() => {\n const n = this.lineClamp();\n if (!n || n <= 0) return null;\n return this.expanded() ? null : n;\n });\n\n // toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).\n showToggle = computed(() => {\n if (!this.lineClamp()) return false;\n return this.overflowing() || this.expanded();\n });\n\n // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.\n liveRole = computed<'alert' | 'status'>(() => {\n const c = this.effectiveColor();\n return c === 'error' || c === 'warning' ? 'alert' : 'status';\n });\n\n // 5. OVERFLOW MEASUREMENT\n #measureScheduled = false;\n\n constructor() {\n // đo lần đầu sau render\n afterNextRender(() => this.measureOverflow());\n // why: re-đo khi nội dung/clamp/expanded đổi; đồng thời gắn ResizeObserver để bắt thay đổi kích thước container (responsive).\n effect(onCleanup => {\n this.description();\n this.lineClamp();\n this.expanded();\n const el = this.bodyRef()?.nativeElement;\n this.#scheduleMeasure();\n // why: guard instanceof Element để test stub (plain object) không làm ResizeObserver.observe ném lỗi.\n if (el instanceof Element && typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.measureOverflow());\n ro.observe(el);\n onCleanup(() => ro.disconnect());\n }\n });\n }\n\n #scheduleMeasure(): void {\n if (this.#measureScheduled) return;\n this.#measureScheduled = true;\n // gom nhiều thay đổi vào 1 lần đo sau khi DOM cập nhật xong\n queueMicrotask(() => {\n this.#measureScheduled = false;\n this.measureOverflow();\n });\n }\n\n /** Đo tràn dòng của body; chỉ có ý nghĩa khi đang clamp. */\n measureOverflow(): void {\n const el = this.bodyRef()?.nativeElement;\n if (!el || this.expanded() || !this.lineClamp()) return;\n // +1 chống sai số làm tròn sub-pixel\n this.overflowing.set(el.scrollHeight > el.clientHeight + 1);\n }\n\n // 6. HANDLERS\n toggleExpanded(): void {\n this.expanded.update(v => !v);\n }\n\n onClose(event: Event): void {\n event.stopPropagation();\n this.dismissed.set(true);\n this.sdClosed.emit(event);\n }\n\n onAction(event: Event): void {\n event.stopPropagation();\n this.sdAction.emit(event);\n }\n}\n","@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n\n @if (_effectiveIcon) {\n <sd-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [fontSet]=\"_fontSet\" [name]=\"_effectiveIcon\"></sd-icon>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div\n #body\n class=\"c-inform-body\"\n [class.is-clamped]=\"clampLines() !== null\"\n [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <button type=\"button\" class=\"c-inform-action c-inform-action-link\" (click)=\"onAction($event)\">\n {{ _actionLabel }}\n </button>\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"c-inform-close\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;;;AAGG;MAKU,uBAAuB,CAAA;wGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACWD;AACA,MAAM,sBAAsB,GAA0B;AACpD,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KA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A,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,MAAM,2FACzB,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3EtE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-components-inform.mjs","sources":["../../../projects/sdcorejs-angular/components/inform/src/inform-action.directive.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.html","../../../projects/sdcorejs-angular/components/inform/sdcorejs-angular-components-inform.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marker cho vùng action custom chiếu vào <sd-inform>.\n * Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.\n */\n@Directive({\n selector: '[sdInformAction]',\n standalone: true,\n})\nexport class SdInformActionDirective {}\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdInformActionDirective } from './inform-action.directive';\nimport { SdIcon, type SdIconSet } from '@sdcorejs/angular/modules/icon';\n\n// why: mỗi color có icon trạng thái mặc định khi consumer không truyền [icon].\nconst SD_INFORM_DEFAULT_ICON: Record<Color, string> = {\n primary: 'info',\n secondary: 'info',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n@Component({\n selector: 'sd-inform',\n templateUrl: './inform.component.html',\n styleUrl: './inform.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdIcon, CommonModule, SdTranslatePipe],\n})\nexport class SdInform {\n // 1. INPUTS\n color = input<Color, Color | undefined | null>('primary', {\n transform: value => value || 'primary',\n });\n\n primary = input(false, { transform: booleanAttribute });\n secondary = input(false, { transform: booleanAttribute });\n info = input(false, { transform: booleanAttribute });\n success = input(false, { transform: booleanAttribute });\n warning = input(false, { transform: booleanAttribute });\n error = input(false, { transform: booleanAttribute });\n\n title = input<string | undefined>();\n description = input<string | undefined>();\n icon = input<string | undefined>();\n hideIcon = input(false, { transform: booleanAttribute });\n\n fontSet = input<SdIconSet | undefined, SdIconSet | undefined | null>(undefined, {\n transform: value => value ?? undefined,\n });\n\n closable = input(false, { transform: booleanAttribute });\n actionLabel = input<string | undefined>();\n lineClamp = input<number | undefined>();\n autoId = input<string | undefined>();\n\n // 2. OUTPUTS\n sdClosed = output<Event>();\n sdAction = output<Event>();\n\n // 3. STATE\n readonly dismissed = signal(false);\n readonly expanded = signal(false);\n readonly overflowing = signal(false);\n\n protected readonly bodyRef = viewChild<ElementRef<HTMLElement>>('body');\n protected readonly actionSlot = contentChild(SdInformActionDirective);\n\n // 4. COMPUTED\n effectiveColor = computed<Color>(() => {\n if (this.primary()) return 'primary';\n if (this.secondary()) return 'secondary';\n if (this.info()) return 'info';\n if (this.success()) return 'success';\n if (this.warning()) return 'warning';\n if (this.error()) return 'error';\n return this.color();\n });\n\n colorClasses = computed(() => {\n const c = this.effectiveColor();\n return {\n 'c-primary': c === 'primary',\n 'c-secondary': c === 'secondary',\n 'c-info': c === 'info',\n 'c-success': c === 'success',\n 'c-warning': c === 'warning',\n 'c-error': c === 'error',\n };\n });\n\n effectiveIcon = computed<string | null>(() => {\n if (this.hideIcon()) return null;\n return this.icon() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];\n });\n\n hasActionSlot = computed(() => !!this.actionSlot());\n\n // clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.\n clampLines = computed<number | null>(() => {\n const n = this.lineClamp();\n if (!n || n <= 0) return null;\n return this.expanded() ? null : n;\n });\n\n // toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).\n showToggle = computed(() => {\n if (!this.lineClamp()) return false;\n return this.overflowing() || this.expanded();\n });\n\n // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.\n liveRole = computed<'alert' | 'status'>(() => {\n const c = this.effectiveColor();\n return c === 'error' || c === 'warning' ? 'alert' : 'status';\n });\n\n // 5. OVERFLOW MEASUREMENT\n #measureScheduled = false;\n\n constructor() {\n // đo lần đầu sau render\n afterNextRender(() => this.measureOverflow());\n // why: re-đo khi nội dung/clamp/expanded đổi; đồng thời gắn ResizeObserver để bắt thay đổi kích thước container (responsive).\n effect(onCleanup => {\n this.description();\n this.lineClamp();\n this.expanded();\n const el = this.bodyRef()?.nativeElement;\n this.#scheduleMeasure();\n // why: guard instanceof Element để test stub (plain object) không làm ResizeObserver.observe ném lỗi.\n if (el instanceof Element && typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.measureOverflow());\n ro.observe(el);\n onCleanup(() => ro.disconnect());\n }\n });\n }\n\n #scheduleMeasure(): void {\n if (this.#measureScheduled) return;\n this.#measureScheduled = true;\n // gom nhiều thay đổi vào 1 lần đo sau khi DOM cập nhật xong\n queueMicrotask(() => {\n this.#measureScheduled = false;\n this.measureOverflow();\n });\n }\n\n /** Đo tràn dòng của body; chỉ có ý nghĩa khi đang clamp. */\n measureOverflow(): void {\n const el = this.bodyRef()?.nativeElement;\n if (!el || this.expanded() || !this.lineClamp()) return;\n // +1 chống sai số làm tròn sub-pixel\n this.overflowing.set(el.scrollHeight > el.clientHeight + 1);\n }\n\n // 6. HANDLERS\n toggleExpanded(): void {\n this.expanded.update(v => !v);\n }\n\n onClose(event: Event): void {\n event.stopPropagation();\n this.dismissed.set(true);\n this.sdClosed.emit(event);\n }\n\n onAction(event: Event): void {\n event.stopPropagation();\n this.sdAction.emit(event);\n }\n}\n","@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n\n @if (_effectiveIcon) {\n <sd-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [fontSet]=\"_fontSet\" [name]=\"_effectiveIcon\"></sd-icon>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div\n #body\n class=\"c-inform-body\"\n [class.is-clamped]=\"clampLines() !== null\"\n [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <button type=\"button\" class=\"c-inform-action c-inform-action-link\" (click)=\"onAction($event)\">\n {{ _actionLabel }}\n </button>\n }\n </div>\n\n @if (closable()) {\n <button\n type=\"button\"\n class=\"c-inform-close\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;;;AAGG;MAKU,uBAAuB,CAAA;uGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAA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EAAA,CAAA,EAAA,EAAA,CAAA;;AE3EtE;;AAEG;;"}
|
|
@@ -4,11 +4,16 @@ import { I18nService } from '@sdcorejs/angular/i18n';
|
|
|
4
4
|
import { SdTaskService } from '@sdcorejs/angular/services/task';
|
|
5
5
|
|
|
6
6
|
class SdJobProgress {
|
|
7
|
-
taskId = input(undefined,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
taskId = input(undefined, /* @ts-ignore */
|
|
8
|
+
...(ngDevMode ? [{ debugName: "taskId" }] : /* istanbul ignore next */ []));
|
|
9
|
+
state = input(undefined, /* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
11
|
+
mode = input('bar', /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
13
|
+
title = input(undefined, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
15
|
+
message = input(undefined, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
12
17
|
showActions = input(true, { ...(ngDevMode ? { debugName: "showActions" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13
18
|
sdCancel = output();
|
|
14
19
|
sdRetry = output();
|
|
@@ -19,33 +24,46 @@ class SdJobProgress {
|
|
|
19
24
|
return undefined;
|
|
20
25
|
const id = this.taskId();
|
|
21
26
|
return id ? this.#tasks.get(id) : undefined;
|
|
22
|
-
},
|
|
23
|
-
|
|
27
|
+
}, /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "task" }] : /* istanbul ignore next */ []));
|
|
29
|
+
resolvedState = computed(() => this.state() ?? this.task()?.state(), /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "resolvedState" }] : /* istanbul ignore next */ []));
|
|
24
31
|
progress = computed(() => {
|
|
25
32
|
const value = this.resolvedState()?.progress;
|
|
26
33
|
return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
}, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
36
|
+
effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "effectiveTitle" }] : /* istanbul ignore next */ []));
|
|
38
|
+
effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "effectiveMessage" }] : /* istanbul ignore next */ []));
|
|
40
|
+
statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`), /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
|
|
31
42
|
progressLabel = computed(() => {
|
|
32
43
|
const title = this.effectiveTitle();
|
|
33
44
|
return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
}, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "progressLabel" }] : /* istanbul ignore next */ []));
|
|
47
|
+
cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'), /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
49
|
+
retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'), /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "retryLabel" }] : /* istanbul ignore next */ []));
|
|
51
|
+
displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()), /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "displayedError" }] : /* istanbul ignore next */ []));
|
|
38
53
|
active = computed(() => {
|
|
39
54
|
const status = this.resolvedState()?.status;
|
|
40
55
|
return status === 'queued' || status === 'running';
|
|
41
|
-
},
|
|
42
|
-
|
|
56
|
+
}, /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
58
|
+
canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true), /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "canCancel" }] : /* istanbul ignore next */ []));
|
|
43
60
|
canRetry = computed(() => {
|
|
44
61
|
if (!this.showActions())
|
|
45
62
|
return false;
|
|
46
63
|
const status = this.resolvedState()?.status;
|
|
47
64
|
return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');
|
|
48
|
-
},
|
|
65
|
+
}, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "canRetry" }] : /* istanbul ignore next */ []));
|
|
49
67
|
get modeAttr() {
|
|
50
68
|
return this.mode();
|
|
51
69
|
}
|
|
@@ -65,10 +83,10 @@ class SdJobProgress {
|
|
|
65
83
|
this.#tasks.retry(id);
|
|
66
84
|
this.sdRetry.emit();
|
|
67
85
|
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdJobProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdJobProgress, isStandalone: true, selector: "sd-job-progress", inputs: { taskId: { classPropertyName: "taskId", publicName: "taskId", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdCancel: "sdCancel", sdRetry: "sdRetry" }, host: { properties: { "attr.data-mode": "this.modeAttr", "attr.data-status": "this.statusAttr", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:block}.sd-job-progress{display:grid;gap:8px;padding:12px;border:1px solid var(--sd-border-color, #dfe3e8);border-radius:8px;background:var(--sd-surface, #fff)}.sd-job-progress__header,.sd-job-progress__identity,.sd-job-progress__actions{display:flex;align-items:center;gap:8px}.sd-job-progress__header{justify-content:space-between}.sd-job-progress__identity{min-width:0;flex-wrap:wrap}.sd-job-progress__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-job-progress__status,.sd-job-progress__percentage,.sd-job-progress__message{color:var(--sd-text-muted, #5f6772);font-size:.875rem}.sd-job-progress__track{position:relative;height:8px;overflow:hidden;border-radius:999px;background:var(--sd-progress-track, #e8edf3)}.sd-job-progress__fill{display:block;height:100%;border-radius:inherit;background:var(--sd-primary, #1565c0);transition:width .16s ease}.sd-job-progress__fill--indeterminate{animation:sd-job-progress-indeterminate 1.2s ease-in-out infinite}.sd-job-progress__message,.sd-job-progress__error{margin:0}.sd-job-progress__error{color:var(--sd-error, #ba1a1a)}.sd-job-progress__actions{justify-content:flex-end}.sd-job-progress__actions button{padding:6px 10px;border:1px solid currentColor;border-radius:6px;color:var(--sd-primary, #1565c0);background:transparent;cursor:pointer}:host([data-mode=compact]) .sd-job-progress{grid-template-columns:minmax(0,1fr) minmax(80px,30%);align-items:center;padding:8px 10px}:host([data-mode=compact]) .sd-job-progress__actions,:host([data-mode=compact]) .sd-job-progress__error{grid-column:1/-1}@keyframes sd-job-progress-indeterminate{0%{transform:translate(-120%)}to{transform:translate(380%)}}@media(prefers-reduced-motion:reduce){.sd-job-progress__fill{transition:none}.sd-job-progress__fill--indeterminate{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
88
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdJobProgress, decorators: [{
|
|
72
90
|
type: Component,
|
|
73
91
|
args: [{ selector: 'sd-job-progress', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:block}.sd-job-progress{display:grid;gap:8px;padding:12px;border:1px solid var(--sd-border-color, #dfe3e8);border-radius:8px;background:var(--sd-surface, #fff)}.sd-job-progress__header,.sd-job-progress__identity,.sd-job-progress__actions{display:flex;align-items:center;gap:8px}.sd-job-progress__header{justify-content:space-between}.sd-job-progress__identity{min-width:0;flex-wrap:wrap}.sd-job-progress__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-job-progress__status,.sd-job-progress__percentage,.sd-job-progress__message{color:var(--sd-text-muted, #5f6772);font-size:.875rem}.sd-job-progress__track{position:relative;height:8px;overflow:hidden;border-radius:999px;background:var(--sd-progress-track, #e8edf3)}.sd-job-progress__fill{display:block;height:100%;border-radius:inherit;background:var(--sd-primary, #1565c0);transition:width .16s ease}.sd-job-progress__fill--indeterminate{animation:sd-job-progress-indeterminate 1.2s ease-in-out infinite}.sd-job-progress__message,.sd-job-progress__error{margin:0}.sd-job-progress__error{color:var(--sd-error, #ba1a1a)}.sd-job-progress__actions{justify-content:flex-end}.sd-job-progress__actions button{padding:6px 10px;border:1px solid currentColor;border-radius:6px;color:var(--sd-primary, #1565c0);background:transparent;cursor:pointer}:host([data-mode=compact]) .sd-job-progress{grid-template-columns:minmax(0,1fr) minmax(80px,30%);align-items:center;padding:8px 10px}:host([data-mode=compact]) .sd-job-progress__actions,:host([data-mode=compact]) .sd-job-progress__error{grid-column:1/-1}@keyframes sd-job-progress-indeterminate{0%{transform:translate(-120%)}to{transform:translate(380%)}}@media(prefers-reduced-motion:reduce){.sd-job-progress__fill{transition:none}.sd-job-progress__fill--indeterminate{animation:none}}\n"] }]
|
|
74
92
|
}], propDecorators: { taskId: [{ type: i0.Input, args: [{ isSignal: true, alias: "taskId", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], sdCancel: [{ type: i0.Output, args: ["sdCancel"] }], sdRetry: [{ type: i0.Output, args: ["sdRetry"] }], modeAttr: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-components-job-progress.mjs","sources":["../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.ts","../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.html","../../../projects/sdcorejs-angular/components/job-progress/sdcorejs-angular-components-job-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { I18nService } from '@sdcorejs/angular/i18n';\nimport { SdTaskService, SdTaskState, SdTaskStatus, SdTaskView } from '@sdcorejs/angular/services/task';\n\nexport type SdJobProgressMode = 'bar' | 'compact' | 'details';\n\n@Component({\n selector: 'sd-job-progress',\n standalone: true,\n templateUrl: './job-progress.component.html',\n styleUrl: './job-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdJobProgress {\n readonly taskId = input<string | undefined>(undefined);\n readonly state = input<SdTaskState | undefined>(undefined);\n readonly mode = input<SdJobProgressMode>('bar');\n readonly title = input<string | undefined>(undefined);\n readonly message = input<string | undefined>(undefined);\n readonly showActions = input(true, { transform: booleanAttribute });\n\n readonly sdCancel = output<void>();\n readonly sdRetry = output<void>();\n\n readonly #tasks = inject(SdTaskService);\n readonly #i18n = inject(I18nService);\n\n readonly task = computed<SdTaskView | undefined>(() => {\n if (this.state()) return undefined;\n const id = this.taskId();\n return id ? this.#tasks.get(id) : undefined;\n });\n readonly resolvedState = computed<SdTaskState | undefined>(() => this.state() ?? this.task()?.state());\n readonly progress = computed<number | undefined>(() => {\n const value = this.resolvedState()?.progress;\n return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));\n });\n readonly effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title);\n readonly effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message);\n readonly statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`));\n readonly progressLabel = computed(() => {\n const title = this.effectiveTitle();\n return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();\n });\n readonly cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'));\n readonly retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'));\n readonly displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()));\n readonly active = computed(() => {\n const status = this.resolvedState()?.status;\n return status === 'queued' || status === 'running';\n });\n readonly canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true));\n readonly canRetry = computed(() => {\n if (!this.showActions()) return false;\n const status = this.resolvedState()?.status;\n return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');\n });\n\n @HostBinding('attr.data-mode') get modeAttr(): SdJobProgressMode {\n return this.mode();\n }\n\n @HostBinding('attr.data-status') get statusAttr(): SdTaskStatus {\n return this.resolvedState()?.status ?? 'idle';\n }\n\n @HostBinding('attr.aria-live') readonly ariaLive = 'polite';\n\n onCancel(): void {\n const id = this.taskId();\n if (id && this.task()) void this.#tasks.cancel(id);\n this.sdCancel.emit();\n }\n\n onRetry(): void {\n const id = this.taskId();\n if (id && this.task()) this.#tasks.retry(id);\n this.sdRetry.emit();\n }\n}\n\nfunction formatError(error: unknown): string | undefined {\n if (error === null || error === undefined) return undefined;\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n","@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAaa,aAAa,CAAA;AACf,IAAA,MAAM,GAAG,KAAK,CAAqB,SAAS,6EAAC;AAC7C,IAAA,KAAK,GAAG,KAAK,CAA0B,SAAS,4EAAC;AACjD,IAAA,IAAI,GAAG,KAAK,CAAoB,KAAK,2EAAC;AACtC,IAAA,KAAK,GAAG,KAAK,CAAqB,SAAS,4EAAC;AAC5C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;IAC9C,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE1D,QAAQ,GAAG,MAAM,EAAQ;IACzB,OAAO,GAAG,MAAM,EAAQ;AAExB,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,IAAA,KAAK,GAAG,MAAM,CAAC,WA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4FD1Ca,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s2DAAA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA;;sBA+C9C,WAAW;uBAAC,gBAAgB;;sBAI5B,WAAW;uBAAC,kBAAkB;;sBAI9B,WAAW;uBAAC,gBAAgB;;AAe/B,SAAS,WAAW,CAAC,KAAc,EAAA;AACjC,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IAC3D,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO;AAChD,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1D;;AErFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-components-job-progress.mjs","sources":["../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.ts","../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.html","../../../projects/sdcorejs-angular/components/job-progress/sdcorejs-angular-components-job-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { I18nService } from '@sdcorejs/angular/i18n';\nimport { SdTaskService, SdTaskState, SdTaskStatus, SdTaskView } from '@sdcorejs/angular/services/task';\n\nexport type SdJobProgressMode = 'bar' | 'compact' | 'details';\n\n@Component({\n selector: 'sd-job-progress',\n standalone: true,\n templateUrl: './job-progress.component.html',\n styleUrl: './job-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdJobProgress {\n readonly taskId = input<string | undefined>(undefined);\n readonly state = input<SdTaskState | undefined>(undefined);\n readonly mode = input<SdJobProgressMode>('bar');\n readonly title = input<string | undefined>(undefined);\n readonly message = input<string | undefined>(undefined);\n readonly showActions = input(true, { transform: booleanAttribute });\n\n readonly sdCancel = output<void>();\n readonly sdRetry = output<void>();\n\n readonly #tasks = inject(SdTaskService);\n readonly #i18n = inject(I18nService);\n\n readonly task = computed<SdTaskView | undefined>(() => {\n if (this.state()) return undefined;\n const id = this.taskId();\n return id ? this.#tasks.get(id) : undefined;\n });\n readonly resolvedState = computed<SdTaskState | undefined>(() => this.state() ?? this.task()?.state());\n readonly progress = computed<number | undefined>(() => {\n const value = this.resolvedState()?.progress;\n return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));\n });\n readonly effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title);\n readonly effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message);\n readonly statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`));\n readonly progressLabel = computed(() => {\n const title = this.effectiveTitle();\n return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();\n });\n readonly cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'));\n readonly retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'));\n readonly displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()));\n readonly active = computed(() => {\n const status = this.resolvedState()?.status;\n return status === 'queued' || status === 'running';\n });\n readonly canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true));\n readonly canRetry = computed(() => {\n if (!this.showActions()) return false;\n const status = this.resolvedState()?.status;\n return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');\n });\n\n @HostBinding('attr.data-mode') get modeAttr(): SdJobProgressMode {\n return this.mode();\n }\n\n @HostBinding('attr.data-status') get statusAttr(): SdTaskStatus {\n return this.resolvedState()?.status ?? 'idle';\n }\n\n @HostBinding('attr.aria-live') readonly ariaLive = 'polite';\n\n onCancel(): void {\n const id = this.taskId();\n if (id && this.task()) void this.#tasks.cancel(id);\n this.sdCancel.emit();\n }\n\n onRetry(): void {\n const id = this.taskId();\n if (id && this.task()) this.#tasks.retry(id);\n this.sdRetry.emit();\n }\n}\n\nfunction formatError(error: unknown): string | undefined {\n if (error === null || error === undefined) return undefined;\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n","@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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A,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,6/BCb1B,s2DAuDA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FD1Ca,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s2DAAA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA;;sBA+C9C,WAAW;uBAAC,gBAAgB;;sBAI5B,WAAW;uBAAC,kBAAkB;;sBAI9B,WAAW;uBAAC,gBAAgB;;AAe/B,SAAS,WAAW,CAAC,KAAc,EAAA;AACjC,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IAC3D,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO;AAChD,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1D;;AErFA;;AAEG;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { output, input, forwardRef, Input, HostBinding, Component } from '@angular/core';
|
|
2
|
+
import { output, input, forwardRef, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i1 from '@ckeditor/ckeditor5-angular';
|
|
5
5
|
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
6
6
|
import { SdCKEditorStyles } from '@sdcorejs/angular/components/ckeditor-styles';
|
|
@@ -40,7 +40,8 @@ class SdMiniEditor {
|
|
|
40
40
|
/** Event emitter khi focus */
|
|
41
41
|
focus = output();
|
|
42
42
|
/** Disabled state */
|
|
43
|
-
disabled = input(false,
|
|
43
|
+
disabled = input(false, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
44
45
|
Editor = ClassicEditor;
|
|
45
46
|
#editor;
|
|
46
47
|
#subscription = new Subscription();
|
|
@@ -287,18 +288,18 @@ class SdMiniEditor {
|
|
|
287
288
|
/** ControlValueAccessor callbacks */
|
|
288
289
|
#onChange = () => { };
|
|
289
290
|
#onTouched = () => { };
|
|
290
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
291
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
291
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
292
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: SdMiniEditor, isStandalone: true, selector: "sd-mini-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", contentChange: "contentChange", blur: "blur", focus: "focus" }, host: { properties: { "style.--sd-mini-editor-max-height": "this.maxEditorHeight" } }, providers: [
|
|
292
293
|
{
|
|
293
294
|
provide: NG_VALUE_ACCESSOR,
|
|
294
295
|
useExisting: forwardRef(() => SdMiniEditor),
|
|
295
296
|
multi: true,
|
|
296
297
|
},
|
|
297
|
-
], ngImport: i0, template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:#fff!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:#fff!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:600;padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdCKEditorStyles, selector: "sd-ckeditor-styles" }] });
|
|
298
|
+
], ngImport: i0, template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:#fff!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:#fff!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:600;padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdCKEditorStyles, selector: "sd-ckeditor-styles" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
298
299
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, decorators: [{
|
|
300
301
|
type: Component,
|
|
301
|
-
args: [{ selector: 'sd-mini-editor', standalone: true, imports: [CommonModule, CKEditorModule, SdCKEditorStyles], providers: [
|
|
302
|
+
args: [{ changeDetection: ChangeDetectionStrategy.Eager, selector: 'sd-mini-editor', standalone: true, imports: [CommonModule, CKEditorModule, SdCKEditorStyles], providers: [
|
|
302
303
|
{
|
|
303
304
|
provide: NG_VALUE_ACCESSOR,
|
|
304
305
|
useExisting: forwardRef(() => SdMiniEditor),
|