@simplysm/angular 14.0.86 → 14.0.88
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/dist/controls/pagination/sd-pagination.d.ts.map +1 -1
- package/dist/controls/pagination/sd-pagination.js +2 -0
- package/dist/controls/select/sd-select-item.js +1 -1
- package/dist/controls/select/sd-select.js +1 -1
- package/dist/core/app-structure/sd-app-structure.provider.d.ts +1 -0
- package/dist/core/app-structure/sd-app-structure.provider.d.ts.map +1 -1
- package/dist/core/app-structure/sd-app-structure.provider.js +3 -0
- package/dist/core/app-structure/sd-app-structure.utils.d.ts +2 -0
- package/dist/core/app-structure/sd-app-structure.utils.d.ts.map +1 -1
- package/dist/core/app-structure/sd-app-structure.utils.js +9 -1
- package/dist/core/busy/sd-busy-container.d.ts +1 -1
- package/dist/core/busy/sd-busy-container.d.ts.map +1 -1
- package/dist/core/busy/sd-busy-container.js +11 -11
- package/dist/core/busy/sd-busy.provider.d.ts.map +1 -1
- package/dist/core/busy/sd-busy.provider.js +3 -0
- package/dist/core/config/sd-system-config.provider.d.ts +4 -4
- package/dist/core/config/sd-system-config.provider.d.ts.map +1 -1
- package/dist/core/config/sd-system-config.provider.js +3 -0
- package/dist/core/error-handler/sd-global-error-handler.plugin.d.ts +1 -1
- package/dist/core/error-handler/sd-global-error-handler.plugin.d.ts.map +1 -1
- package/dist/core/file-dialog/sd-file-dialog.provider.d.ts.map +1 -1
- package/dist/core/file-dialog/sd-file-dialog.provider.js +4 -0
- package/dist/core/modal/sd-activated-modal.provider.d.ts +2 -1
- package/dist/core/modal/sd-activated-modal.provider.d.ts.map +1 -1
- package/dist/core/modal/sd-modal.d.ts.map +1 -1
- package/dist/core/modal/sd-modal.js +3 -3
- package/dist/core/modal/sd-modal.provider.d.ts.map +1 -1
- package/dist/core/modal/sd-modal.provider.js +8 -0
- package/dist/core/modal/sd-prompt-modal.d.ts +2 -2
- package/dist/core/modal/sd-prompt-modal.d.ts.map +1 -1
- package/dist/core/modal/sd-prompt-modal.js +32 -37
- package/dist/core/print/sd-print.provider.d.ts.map +1 -1
- package/dist/core/print/sd-print.provider.js +19 -6
- package/dist/core/provideSdAngular.d.ts.map +1 -1
- package/dist/core/provideSdAngular.js +4 -1
- package/dist/core/routing/injectViewTitleSignal.d.ts.map +1 -1
- package/dist/core/routing/injectViewTitleSignal.js +1 -6
- package/dist/core/shared-data/sd-shared-data.provider.d.ts +2 -1
- package/dist/core/shared-data/sd-shared-data.provider.d.ts.map +1 -1
- package/dist/core/shared-data/sd-shared-data.provider.js +1 -1
- package/dist/core/toast/sd-toast.provider.d.ts +1 -0
- package/dist/core/toast/sd-toast.provider.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.provider.js +18 -4
- package/dist/data/kanban/sd-kanban-lane.d.ts.map +1 -1
- package/dist/data/shared-data/sd-shared-data-select-button.d.ts +1 -2
- package/dist/data/shared-data/sd-shared-data-select-button.d.ts.map +1 -1
- package/dist/data/shared-data/sd-shared-data-select-button.js +18 -21
- package/dist/data/shared-data/sd-shared-data-select.d.ts +3 -2
- package/dist/data/shared-data/sd-shared-data-select.d.ts.map +1 -1
- package/dist/data/shared-data/sd-shared-data-select.js +10 -10
- package/dist/data/sheet/sd-sheet-config.modal.d.ts +3 -3
- package/dist/data/sheet/sd-sheet-config.modal.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet-config.modal.js +37 -34
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +5 -1
- package/dist/data/sheet/useSheetCellStyling.d.ts.map +1 -1
- package/dist/data/sheet/useSheetCellStyling.js +4 -22
- package/dist/data/state-preset/sd-state-preset.d.ts +10 -10
- package/dist/data/state-preset/sd-state-preset.d.ts.map +1 -1
- package/dist/data/state-preset/sd-state-preset.js +4 -4
- package/dist/features/address/sd-address-search.modal.js +1 -1
- package/dist/features/editor/sd-tiptap-editor.d.ts.map +1 -1
- package/dist/features/editor/sd-tiptap-editor.js +3 -2
- package/dist/features/theme/sd-theme-selector.d.ts +6 -8
- package/dist/features/theme/sd-theme-selector.d.ts.map +1 -1
- package/dist/features/theme/sd-theme-selector.js +54 -51
- package/dist/features/visual/sd-barcode.d.ts.map +1 -1
- package/dist/features/visual/sd-barcode.js +5 -10
- package/dist/layout/sidebar/sd-sidebar-user.d.ts.map +1 -1
- package/dist/layout/sidebar/sd-sidebar-user.js +26 -36
- package/package.json +5 -5
- package/src/controls/button/sd-modal-select-button.ts +1 -1
- package/src/controls/form/sd-form.ts +1 -1
- package/src/controls/input/sd-textfield-type-handlers.ts +2 -2
- package/src/controls/pagination/sd-pagination.ts +1 -0
- package/src/controls/select/sd-select-item.ts +1 -1
- package/src/controls/select/sd-select.ts +1 -1
- package/src/core/app-structure/sd-app-structure.provider.ts +4 -0
- package/src/core/app-structure/sd-app-structure.utils.ts +14 -2
- package/src/core/busy/sd-busy-container.ts +6 -13
- package/src/core/busy/sd-busy.provider.ts +4 -0
- package/src/core/config/injectSdSystemConfigResource.ts +1 -1
- package/src/core/config/sd-system-config.provider.ts +5 -3
- package/src/core/error-handler/sd-global-error-handler.plugin.ts +1 -1
- package/src/core/file-dialog/sd-file-dialog.provider.ts +5 -1
- package/src/core/modal/sd-activated-modal.provider.ts +2 -1
- package/src/core/modal/sd-modal.provider.ts +8 -0
- package/src/core/modal/sd-modal.ts +6 -3
- package/src/core/modal/sd-prompt-modal.ts +13 -23
- package/src/core/print/sd-print.provider.ts +21 -6
- package/src/core/provideSdAngular.ts +5 -1
- package/src/core/routing/injectViewTitleSignal.ts +1 -5
- package/src/core/shared-data/sd-shared-data.provider.ts +2 -2
- package/src/core/toast/sd-toast.provider.ts +35 -12
- package/src/data/kanban/sd-kanban-lane.ts +2 -2
- package/src/data/shared-data/sd-shared-data-select-button.ts +15 -20
- package/src/data/shared-data/sd-shared-data-select-list.ts +4 -4
- package/src/data/shared-data/sd-shared-data-select.ts +10 -12
- package/src/data/sheet/sd-sheet-column.ts +1 -1
- package/src/data/sheet/sd-sheet-config.modal.ts +39 -35
- package/src/data/sheet/sd-sheet.ts +6 -1
- package/src/data/sheet/useSheetCellStyling.ts +3 -20
- package/src/data/state-preset/sd-state-preset.ts +11 -11
- package/src/features/address/sd-address-search.modal.ts +1 -1
- package/src/features/editor/sd-tiptap-editor.ts +3 -2
- package/src/features/theme/sd-theme-selector.ts +77 -75
- package/src/features/visual/sd-barcode.ts +5 -9
- package/src/features/visual/sd-calendar.ts +1 -1
- package/src/layout/sidebar/sd-sidebar-user.ts +3 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-pagination.d.ts","sourceRoot":"","sources":["../../../src/controls/pagination/sd-pagination.ts"],"names":[],"mappings":";AAkBA,qBA2Ca,YAAY;IACvB,KAAK;;;;;MAAsF;IAE3F,WAAW,8CAAY;IACvB,cAAc,oEAA4C;IAC1D,gBAAgB,oEAA6C;IAE7D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAEzB;IAEH,OAAO,0CAKJ;IAEH,OAAO,0CAOJ;IAEH,YAAY,2CAeT;IAEH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI5B,aAAa,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"sd-pagination.d.ts","sourceRoot":"","sources":["../../../src/controls/pagination/sd-pagination.ts"],"names":[],"mappings":";AAkBA,qBA2Ca,YAAY;IACvB,KAAK;;;;;MAAsF;IAE3F,WAAW,8CAAY;IACvB,cAAc,oEAA4C;IAC1D,gBAAgB,oEAA6C;IAE7D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAEzB;IAEH,OAAO,0CAKJ;IAEH,OAAO,0CAOJ;IAEH,YAAY,2CAeT;IAEH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI5B,aAAa,IAAI,IAAI;IAKrB,aAAa,IAAI,IAAI;IAKrB,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;yCA9DL,YAAY;2CAAZ,YAAY;CAkExB"}
|
|
@@ -25,7 +25,7 @@ export class SdSelectItem {
|
|
|
25
25
|
const itemValue = this.value();
|
|
26
26
|
if (this._parentControl.selectMode() === "multi") {
|
|
27
27
|
const arr = parentValue;
|
|
28
|
-
return arr != null && arr.
|
|
28
|
+
return arr != null && arr.some((x) => x === itemValue);
|
|
29
29
|
}
|
|
30
30
|
return parentValue === itemValue;
|
|
31
31
|
}, ...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
|
|
@@ -235,7 +235,7 @@ export class SdSelect {
|
|
|
235
235
|
else {
|
|
236
236
|
this.value.update((v) => {
|
|
237
237
|
const arr = Array.isArray(v) ? v : [];
|
|
238
|
-
if (arr.
|
|
238
|
+
if (arr.some((x) => x === itemValue)) {
|
|
239
239
|
return arr.filter((item) => item !== itemValue);
|
|
240
240
|
}
|
|
241
241
|
else {
|
|
@@ -12,6 +12,7 @@ export declare class SdAppStructureProvider<TModule = unknown> {
|
|
|
12
12
|
usableFlatMenus: Signal<SdFlatMenu<TModule>[]>;
|
|
13
13
|
getPermissionsByStructure(items: AppStructureItem<TModule>[], codeChain?: string[]): import("./sd-app-structure.types").SdPermission<TModule>[];
|
|
14
14
|
getTitleByFullCode(fullCode: string): string;
|
|
15
|
+
findTitleByFullCode(fullCode: string): string | undefined;
|
|
15
16
|
getItemChainByFullCode(fullCode: string): AppStructureItem<TModule>[];
|
|
16
17
|
getPermsByFullCode<K extends string>(fullCodes: string[], permKeys: K[]): K[];
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdAppStructureProvider<any>, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-app-structure.provider.d.ts","sourceRoot":"","sources":["../../../src/core/app-structure/sd-app-structure.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,K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,CAAC,aAAa,gEAA4C;IAClE,QAAQ,CAAC,UAAU,8EAA0D;IAC7E,QAAQ,CAAC,KAAK,sEAA2C;IAEzD,UAAU,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI;IAIpD,WAAW,sDAET;IACF,eAAe,gCAEb;IAEF,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,GAAE,MAAM,EAAO;IAItF,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAInC,mBAAmB,CAAC,QAAQ,EAAE,MAAM;IAIpC,sBAAsB,CAAC,QAAQ,EAAE,MAAM;IAIvC,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;yCAhClE,sBAAsB;6CAAtB,sBAAsB;CAwClC"}
|
|
@@ -22,6 +22,9 @@ export class SdAppStructureProvider {
|
|
|
22
22
|
getTitleByFullCode(fullCode) {
|
|
23
23
|
return SdAppStructureUtils.getTitleByFullCode(this.items(), fullCode);
|
|
24
24
|
}
|
|
25
|
+
findTitleByFullCode(fullCode) {
|
|
26
|
+
return SdAppStructureUtils.findTitleByFullCode(this.items(), fullCode);
|
|
27
|
+
}
|
|
25
28
|
getItemChainByFullCode(fullCode) {
|
|
26
29
|
return SdAppStructureUtils.getItemChainByFullCode(this.items(), fullCode);
|
|
27
30
|
}
|
|
@@ -2,6 +2,8 @@ import type { AppStructureItem } from "@simplysm/service-common";
|
|
|
2
2
|
import type { SdMenu, SdFlatMenu, SdPermission } from "./sd-app-structure.types";
|
|
3
3
|
export declare abstract class SdAppStructureUtils {
|
|
4
4
|
static getTitleByFullCode<TModule>(items: AppStructureItem<TModule>[], fullCode: string): string;
|
|
5
|
+
/** 항목을 못 찾으면 throw 대신 undefined 반환 (결측 보존). */
|
|
6
|
+
static findTitleByFullCode<TModule>(items: AppStructureItem<TModule>[], fullCode: string): string | undefined;
|
|
5
7
|
static getPermsByFullCode<TModule, K extends string>(items: AppStructureItem<TModule>[], fullCodes: string[], permKeys: K[], permRecord: Record<string, boolean> | undefined): K[];
|
|
6
8
|
static getItemChainByFullCode<TModule>(items: AppStructureItem<TModule>[], fullCode: string): AppStructureItem<TModule>[];
|
|
7
9
|
static getMenus<TModule>(items: AppStructureItem<TModule>[], codeChain: string[], usableModules: TModule[] | undefined, permRecord: Record<string, boolean> | undefined): SdMenu[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-app-structure.utils.d.ts","sourceRoot":"","sources":["../../../src/core/app-structure/sd-app-structure.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAMjE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjF,8BAAsB,mBAAmB;IAGvC,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"sd-app-structure.utils.d.ts","sourceRoot":"","sources":["../../../src/core/app-structure/sd-app-structure.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAMjE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjF,8BAAsB,mBAAmB;IAGvC,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAQhG,+CAA+C;IAC/C,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAChC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAClC,QAA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a,EAAE,OAAO,EAAE,GAAG,SAAS;CAIvC"}
|
|
@@ -2,9 +2,17 @@ import { getFlatPermissions, isUsableModules, isUsableModulesChain, } from "@sim
|
|
|
2
2
|
export class SdAppStructureUtils {
|
|
3
3
|
//---------- Info
|
|
4
4
|
static getTitleByFullCode(items, fullCode) {
|
|
5
|
+
const title = this.findTitleByFullCode(items, fullCode);
|
|
6
|
+
if (title == null) {
|
|
7
|
+
throw new Error(`Item not found for fullCode: ${fullCode}`);
|
|
8
|
+
}
|
|
9
|
+
return title;
|
|
10
|
+
}
|
|
11
|
+
/** 항목을 못 찾으면 throw 대신 undefined 반환 (결측 보존). */
|
|
12
|
+
static findTitleByFullCode(items, fullCode) {
|
|
5
13
|
const itemChain = this.getItemChainByFullCode(items, fullCode);
|
|
6
14
|
if (itemChain.length === 0) {
|
|
7
|
-
|
|
15
|
+
return undefined;
|
|
8
16
|
}
|
|
9
17
|
const parent = itemChain
|
|
10
18
|
.slice(0, -1)
|
|
@@ -7,7 +7,7 @@ export declare class SdBusyContainer {
|
|
|
7
7
|
type: import("@angular/core").InputSignal<SdBusyType | undefined>;
|
|
8
8
|
progressPercent: import("@angular/core").InputSignal<number | undefined>;
|
|
9
9
|
currType: import("@angular/core").Signal<SdBusyType>;
|
|
10
|
-
|
|
10
|
+
onKeydownCapture(event: Event): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdBusyContainer, never>;
|
|
12
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdBusyContainer, "sd-busy-container", never, { "busy": { "alias": "busy"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "progressPercent": { "alias": "progressPercent"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-busy-container.d.ts","sourceRoot":"","sources":["../../../src/core/busy/sd-busy-container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sd-busy-container.d.ts","sourceRoot":"","sources":["../../../src/core/busy/sd-busy-container.ts"],"names":[],"mappings":"AASA,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;;AAErE,qBAgUa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD,IAAI,qEAAiD;IACrD,OAAO,0DAAwC;IAC/C,IAAI,8DAA4C;IAChD,eAAe,0DAAwC;IAEvD,QAAQ,6CAAsD;IAE9D,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;yCAVzB,eAAe;2CAAf,eAAe;CAgB3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { booleanAttribute, ChangeDetectionStrategy, Component, computed,
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import { SdBusyProvider } from "./sd-busy.provider";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
const _c0 = ["*"];
|
|
@@ -36,17 +36,16 @@ export class SdBusyContainer {
|
|
|
36
36
|
type = input(undefined, ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
37
37
|
progressPercent = input(undefined, ...(ngDevMode ? [{ debugName: "progressPercent" }] : /* istanbul ignore next */ []));
|
|
38
38
|
currType = computed(() => this.type() ?? this._sdBusy.type(), ...(ngDevMode ? [{ debugName: "currType" }] : /* istanbul ignore next */ []));
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
event.stopPropagation();
|
|
45
|
-
}
|
|
46
|
-
}, true);
|
|
39
|
+
onKeydownCapture(event) {
|
|
40
|
+
if (this.busy()) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
}
|
|
47
44
|
}
|
|
48
45
|
static ɵfac = function SdBusyContainer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdBusyContainer)(); };
|
|
49
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdBusyContainer, selectors: [["sd-busy-container"]], hostVars: 2, hostBindings: function SdBusyContainer_HostBindings(rf, ctx) { if (rf &
|
|
46
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdBusyContainer, selectors: [["sd-busy-container"]], hostVars: 2, hostBindings: function SdBusyContainer_HostBindings(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵlistener("keydown.capture", function SdBusyContainer_keydown_capture_HostBindingHandler($event) { return ctx.onKeydownCapture($event); });
|
|
48
|
+
} if (rf & 2) {
|
|
50
49
|
i0.ɵɵattribute("data-sd-busy", ctx.busy() || undefined)("data-sd-type", ctx.currType());
|
|
51
50
|
} }, inputs: { busy: [1, "busy"], message: [1, "message"], type: [1, "type"], progressPercent: [1, "progressPercent"] }, ngContentSelectors: _c0, decls: 9, vars: 3, consts: [[1, "_screen"], [1, "_rect"], [1, "_indicator"], [1, "_spinner"], [1, "_bar"], [1, "_message"], [1, "_progress"], [1, "_cube1"], [1, "_cube2"], [1, "_cube4"], [1, "_cube3"], [1, "_progress-bar"]], template: function SdBusyContainer_Template(rf, ctx) { if (rf & 1) {
|
|
52
51
|
i0.ɵɵprojectionDef();
|
|
@@ -73,6 +72,7 @@ export class SdBusyContainer {
|
|
|
73
72
|
args: [{ selector: "sd-busy-container", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, host: {
|
|
74
73
|
"[attr.data-sd-busy]": "busy() || undefined",
|
|
75
74
|
"[attr.data-sd-type]": "currType()",
|
|
75
|
+
"(keydown.capture)": "onKeydownCapture($event)",
|
|
76
76
|
}, template: `
|
|
77
77
|
<div class="_screen">
|
|
78
78
|
<div class="_rect">
|
|
@@ -109,5 +109,5 @@ export class SdBusyContainer {
|
|
|
109
109
|
</div>
|
|
110
110
|
<ng-content></ng-content>
|
|
111
111
|
`, styles: ["sd-busy-container {\n display: block;\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n min-width: 70px;\n min-height: 70px;\n overflow: auto;\n}\nsd-busy-container > ._screen {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 9998;\n visibility: hidden;\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--animation-duration);\n transition-timing-function: linear;\n}\nsd-busy-container > ._screen > ._progress {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 4px;\n width: 100%;\n background-color: var(--background-color);\n}\nsd-busy-container > ._screen > ._progress > ._progress-bar {\n position: absolute;\n top: 0;\n left: 0;\n display: inline-block;\n content: \"\";\n height: 4px;\n width: 100%;\n transition: 0.1s ease-in;\n transition-property: transform;\n transform-origin: left;\n transform: scaleX(0);\n background-color: var(--theme-primary-default);\n}\nsd-busy-container[data-sd-busy=true] > ._screen {\n visibility: visible;\n pointer-events: auto;\n opacity: 1;\n}\nsd-busy-container[data-sd-type=spinner] > ._screen > ._rect {\n transform: translateY(-100%);\n transition: 0.1s ease-in;\n transition-property: transform;\n}\nsd-busy-container[data-sd-type=spinner] > ._screen > ._rect > ._indicator {\n top: 0;\n width: 30px;\n height: 30px;\n margin: 20px auto 0 auto;\n border: 6px solid var(--background-color);\n border-radius: 100%;\n border-bottom-color: var(--theme-primary-default);\n animation: sd-busy-spin 1s linear infinite;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n}\nsd-busy-container[data-sd-type=spinner] > ._screen > ._rect > ._indicator > div {\n display: none;\n}\nsd-busy-container[data-sd-type=spinner] > ._screen > ._rect > ._message {\n position: absolute;\n top: 55px;\n width: 100%;\n color: var(--background-color);\n font-weight: bold;\n text-align: center;\n text-shadow: 0 0 2px var(--background-rev-color);\n}\nsd-busy-container[data-sd-type=spinner][data-sd-busy=true] > ._screen > ._rect {\n transform: none;\n transition: 0.1s ease-out;\n}\nsd-busy-container[data-sd-type=bar] {\n min-height: 4px;\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator {\n position: absolute;\n top: 0;\n left: 0;\n height: 4px;\n width: 100%;\n background-color: var(--background-color);\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator:before, sd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator:after {\n position: absolute;\n top: 0;\n left: 0;\n display: inline-block;\n content: \"\";\n height: 4px;\n width: 100%;\n transform-origin: left;\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator:before {\n background-color: var(--theme-primary-default);\n animation: sd-busy-bar-indicator-before 2s infinite ease-in;\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator:after {\n background-color: var(--background-color);\n animation: sd-busy-bar-indicator-after 2s infinite ease-out;\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._indicator > div {\n display: none;\n}\nsd-busy-container[data-sd-type=bar][data-sd-busy=true] > ._screen > ._rect > ._message {\n position: absolute;\n top: 4px;\n right: 0;\n display: inline-block;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator {\n position: absolute;\n top: calc(50% - 20px);\n left: calc(50% - 20px);\n width: 40px;\n height: 40px;\n transform: rotateZ(45deg);\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube1,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube2,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube3,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube4 {\n float: left;\n width: 50%;\n height: 50%;\n position: relative;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube1:before,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube2:before,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube3:before,\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube4:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--trans-light);\n animation: sd-busy-cube 2.4s infinite linear both;\n transform-origin: 100% 100%;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube2 {\n transform: rotateZ(90deg);\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube2:before {\n animation-delay: 0.3s;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube3 {\n transform: rotateZ(180deg);\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube3:before {\n animation-delay: 0.6s;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube4 {\n transform: rotateZ(270deg);\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._indicator ._cube4:before {\n animation-delay: 0.9s;\n}\nsd-busy-container[data-sd-type=cube] > ._screen > ._rect > ._message {\n position: absolute;\n top: 4px;\n right: 0;\n display: inline-block;\n}\n\n@keyframes sd-busy-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes sd-busy-bar-indicator-before {\n 0% {\n transform: scaleX(0);\n }\n 60%, 100% {\n transform: scaleX(1);\n }\n}\n@keyframes sd-busy-bar-indicator-after {\n 0%, 50% {\n transform: scaleX(0);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n@keyframes sd-busy-cube {\n 0%, 10% {\n transform: perspective(140px) rotateX(-180deg);\n opacity: 0;\n }\n 25%, 75% {\n transform: perspective(140px) rotateX(0deg);\n opacity: 1;\n }\n 90%, 100% {\n transform: perspective(140px) rotateY(180deg);\n opacity: 0;\n }\n}"] }]
|
|
112
|
-
}],
|
|
112
|
+
}], null, { busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], progressPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressPercent", required: false }] }] }); })();
|
|
113
113
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdBusyContainer, { className: "SdBusyContainer", filePath: "packages/angular/src/core/busy/sd-busy-container.ts", lineNumber: 332 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-busy.provider.d.ts","sourceRoot":"","sources":["../../../src/core/busy/sd-busy.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,qBACa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D,IAAI,qDAA6B;IACjC,eAAe,iDAAa;IAE5B,OAAO,CAAC,aAAa,CAA4C;IAEjE,IAAI,YAAY,IAAI,YAAY,CAAC,eAAe,CAAC,CAiBhD;;yCA1BU,cAAc;6CAAd,cAAc;
|
|
1
|
+
{"version":3,"file":"sd-busy.provider.d.ts","sourceRoot":"","sources":["../../../src/core/busy/sd-busy.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,qBACa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D,IAAI,qDAA6B;IACjC,eAAe,iDAAa;IAE5B,OAAO,CAAC,aAAa,CAA4C;IAEjE,IAAI,YAAY,IAAI,YAAY,CAAC,eAAe,CAAC,CAiBhD;;yCA1BU,cAAc;6CAAd,cAAc;CA2C1B"}
|
|
@@ -27,6 +27,9 @@ export class SdBusyProvider {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
effect(() => {
|
|
29
29
|
const busy = this.globalBusyCount() > 0;
|
|
30
|
+
// busy 가 처음 true 가 되기 전엔 컨테이너를 생성하지 않음 (lazy)
|
|
31
|
+
if (!busy && this._containerRef == null)
|
|
32
|
+
return;
|
|
30
33
|
const ref = this.containerRef;
|
|
31
34
|
const el = ref.location.nativeElement;
|
|
32
35
|
ref.setInput("busy", busy);
|
|
@@ -2,11 +2,11 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class SdSystemConfigProvider<T> {
|
|
3
3
|
private readonly _sdLocalStorage;
|
|
4
4
|
fn?: {
|
|
5
|
-
set<K extends keyof T & string>(key: K, data: T[K]): Promise<void> | void;
|
|
6
|
-
get(key: keyof T & string): PromiseLike<
|
|
5
|
+
set<K extends keyof T & string>(key: K, data: T[K] | undefined): Promise<void> | void;
|
|
6
|
+
get(key: keyof T & string): PromiseLike<unknown>;
|
|
7
7
|
};
|
|
8
|
-
setAsync<K extends keyof T & string>(key: K, data: T[K]): Promise<void>;
|
|
9
|
-
getAsync(key: keyof T & string): Promise<
|
|
8
|
+
setAsync<K extends keyof T & string>(key: K, data: T[K] | undefined): Promise<void>;
|
|
9
|
+
getAsync(key: keyof T & string): Promise<unknown>;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdSystemConfigProvider<any>, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdSystemConfigProvider<any>>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-system-config.provider.d.ts","sourceRoot":"","sources":["../../../src/core/config/sd-system-config.provider.ts"],"names":[],"mappings":";AAGA,qBACa,sBAAsB,CAAC,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6D;IAE7F,EAAE,CAAC,EAAE;QACH,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"sd-system-config.provider.d.ts","sourceRoot":"","sources":["../../../src/core/config/sd-system-config.provider.ts"],"names":[],"mappings":";AAGA,qBACa,sBAAsB,CAAC,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6D;IAE7F,EAAE,CAAC,EAAE;QACH,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACtF,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;KAClD,CAAC;IAEI,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;IAUnE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM;yCAlBzB,sBAAsB;6CAAtB,sBAAsB;CAyBlC"}
|
|
@@ -4,7 +4,7 @@ export declare class SdGlobalErrorHandlerPlugin implements ErrorHandler {
|
|
|
4
4
|
private readonly _envInjector;
|
|
5
5
|
private readonly _sdSystemLog;
|
|
6
6
|
private _hasDisplayedError;
|
|
7
|
-
handleError(event:
|
|
7
|
+
handleError(event: unknown): false | undefined;
|
|
8
8
|
private _displayErrorMessage;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdGlobalErrorHandlerPlugin, never>;
|
|
10
10
|
static ɵprov: i0.ɵɵInjectableDeclaration<SdGlobalErrorHandlerPlugin>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-global-error-handler.plugin.d.ts","sourceRoot":"","sources":["../../../src/core/error-handler/sd-global-error-handler.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;;AAMvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,kBAAkB,CAAS;IAEnC,WAAW,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"sd-global-error-handler.plugin.d.ts","sourceRoot":"","sources":["../../../src/core/error-handler/sd-global-error-handler.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;;AAMvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,kBAAkB,CAAS;IAEnC,WAAW,CAAC,KAAK,EAAE,OAAO;IA0E1B,OAAO,CAAC,oBAAoB;yCA/EjB,0BAA0B;6CAA1B,0BAA0B;CAuHtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-file-dialog.provider.d.ts","sourceRoot":"","sources":["../../../src/core/file-dialog/sd-file-dialog.provider.ts"],"names":[],"mappings":";AAGA,qBACa,oBAAoB;IACzB,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IACvE,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC;yCAFlE,oBAAoB;6CAApB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"sd-file-dialog.provider.d.ts","sourceRoot":"","sources":["../../../src/core/file-dialog/sd-file-dialog.provider.ts"],"names":[],"mappings":";AAGA,qBACa,oBAAoB;IACzB,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IACvE,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC;yCAFlE,oBAAoB;6CAApB,oBAAoB;CAyDhC"}
|
|
@@ -19,6 +19,10 @@ export class SdFileDialogProvider {
|
|
|
19
19
|
inputEl.onchange = (event) => {
|
|
20
20
|
cleanup();
|
|
21
21
|
const files = event.target.files;
|
|
22
|
+
if (files == null) {
|
|
23
|
+
resolve(undefined);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
22
26
|
resolve(multiple ? Array.from(files) : files[0]);
|
|
23
27
|
};
|
|
24
28
|
// cancel 이벤트 (Chrome 77+)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { SdModalContentDef } from "./sd-modal.provider";
|
|
2
|
+
import type { SdModal } from "./sd-modal";
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* 모달 내부에서 inject하여 사용하는 프로바이더
|
|
5
6
|
*/
|
|
6
7
|
export declare class SdActivatedModalProvider<T extends SdModalContentDef<any> = SdModalContentDef<any>> {
|
|
7
|
-
modalComponent: import("@angular/core").WritableSignal<
|
|
8
|
+
modalComponent: import("@angular/core").WritableSignal<SdModal | undefined>;
|
|
8
9
|
contentComponent: import("@angular/core").WritableSignal<T | undefined>;
|
|
9
10
|
canDeactivateFn: () => boolean;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdActivatedModalProvider<any>, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-activated-modal.provider.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-activated-modal.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"sd-activated-modal.provider.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-activated-modal.provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;;AAE1C;;GAEG;AACH,qBACa,wBAAwB,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC;IAC7F,cAAc,8DAA0C;IACxD,gBAAgB,wDAAoC;IACpD,eAAe,EAAE,MAAM,OAAO,CAAc;yCAHjC,wBAAwB;6CAAxB,wBAAwB;CAIpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sd-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AASvB,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,wBAAwB,CAAC;;;AAEhC,qBA0Sa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,i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@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, effect, ElementRef, ErrorHandler, inject, input, model, output, ViewEncapsulation, } from "@angular/core";
|
|
1
|
+
import { afterNextRender, ChangeDetectionStrategy, Component, effect, ElementRef, ErrorHandler, inject, input, model, output, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import { NgTemplateOutlet } from "@angular/common";
|
|
3
3
|
import { NgIcon } from "@ng-icons/core";
|
|
4
4
|
import { tablerX } from "@ng-icons/tabler-icons";
|
|
@@ -114,7 +114,7 @@ export class SdModal {
|
|
|
114
114
|
});
|
|
115
115
|
constructor() {
|
|
116
116
|
// data-sd-init: 첫 렌더 후 설정하여 CSS transition 트리거 허용
|
|
117
|
-
|
|
117
|
+
afterNextRender(() => {
|
|
118
118
|
this._elRef.nativeElement.setAttribute("data-sd-init", "");
|
|
119
119
|
});
|
|
120
120
|
// widthPx/heightPx를 dialog 스타일에 적용
|
|
@@ -393,4 +393,4 @@ export class SdModal {
|
|
|
393
393
|
</div>
|
|
394
394
|
`, styles: ["sd-modal {\n display: block;\n position: fixed;\n z-index: var(--z-index-modal);\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding-top: calc(var(--topbar-height) + var(--gap-sm));\n opacity: 0;\n transition: opacity var(--animation-duration) ease-in-out;\n pointer-events: none;\n}\nsd-modal > ._backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: var(--trans-default);\n}\nsd-modal > ._dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n margin: 0 auto;\n width: fit-content;\n min-width: 200px;\n background: var(--control-color);\n overflow: hidden;\n box-shadow: 0 calc(16 * var(--elevation-size)) calc(16 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n border-radius: var(--border-radius-default);\n transform: translateY(-25px);\n transition: transform var(--animation-duration) ease-in-out;\n}\nsd-modal > ._dialog:focus {\n outline: none;\n}\nsd-modal > ._dialog > ._header {\n display: flex;\n align-items: center;\n user-select: none;\n border-bottom: 1px solid var(--theme-gray-lightest);\n}\nsd-modal > ._dialog > ._header > ._title {\n flex: 1;\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-modal > ._dialog > ._header > ._close-btn {\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-modal > ._dialog > ._content {\n flex: 1;\n overflow: auto;\n}\nsd-modal > ._dialog > ._resize-handle {\n position: absolute;\n}\nsd-modal > ._dialog > ._resize-handle._resize-left {\n top: 0;\n left: 0;\n width: var(--gap-sm);\n height: 100%;\n cursor: ew-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-right {\n top: 0;\n right: 0;\n width: var(--gap-sm);\n height: 100%;\n cursor: ew-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top {\n top: 0;\n left: 0;\n width: 100%;\n height: var(--gap-sm);\n cursor: ns-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top-right {\n right: 0;\n top: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n z-index: 1;\n cursor: nesw-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-top-left {\n left: 0;\n top: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n cursor: nwse-resize;\n z-index: 1;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom {\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--gap-sm);\n cursor: ns-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom-right {\n right: 0;\n bottom: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n z-index: 1;\n cursor: nwse-resize;\n}\nsd-modal > ._dialog > ._resize-handle._resize-bottom-left {\n left: 0;\n bottom: 0;\n width: var(--gap-sm);\n height: var(--gap-sm);\n cursor: nesw-resize;\n z-index: 1;\n}\nsd-modal[data-sd-open][data-sd-init] {\n opacity: 1;\n pointer-events: auto;\n}\nsd-modal[data-sd-open][data-sd-init] > ._dialog {\n transform: none;\n}\nsd-modal[data-sd-float] {\n pointer-events: none;\n}\nsd-modal[data-sd-float] > ._backdrop {\n display: none;\n}\nsd-modal[data-sd-float] > ._dialog {\n pointer-events: auto;\n opacity: 0;\n box-shadow: 0 calc(4 * var(--elevation-size)) calc(4 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n border: 1px solid var(--theme-gray-lighter);\n}\nsd-modal[data-sd-float] > ._dialog:focus {\n box-shadow: 0 calc(16 * var(--elevation-size)) calc(16 * 4 * var(--elevation-size)) var(--trans-lighter), 0 var(--elevation-size) var(--elevation-size) var(--trans-lighter);\n}\nsd-modal[data-sd-float][data-sd-open][data-sd-init] {\n pointer-events: none;\n}\nsd-modal[data-sd-float][data-sd-open][data-sd-init] > ._dialog {\n pointer-events: auto;\n opacity: 1;\n}\nsd-modal[data-sd-position=bottom-right] > ._dialog {\n position: absolute;\n right: calc(var(--gap-xxl) * 2);\n bottom: var(--gap-xxl);\n}\nsd-modal[data-sd-position=top-right] > ._dialog {\n position: absolute;\n right: var(--gap-xxl);\n top: var(--gap-xxl);\n}\nsd-modal[data-sd-fill] {\n padding-top: 0;\n}\nsd-modal[data-sd-fill] > ._dialog {\n width: 100%;\n height: 100%;\n border: none;\n border-radius: 0;\n}\nsd-modal[data-sd-fill] > ._dialog > ._header {\n background: transparent;\n color: var(--text-trans-lighter);\n}"] }]
|
|
395
395
|
}], () => [], { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], hideCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCloseButton", required: false }] }], headerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerStyle", required: false }] }], useCloseByBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByBackdrop", required: false }] }], useCloseByEscapeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCloseByEscapeKey", required: false }] }], float: [{ type: i0.Input, args: [{ isSignal: true, alias: "float", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], minHeightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeightPx", required: false }] }], minWidthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidthPx", required: false }] }], heightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightPx", required: false }] }], widthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthPx", required: false }] }], actionTplRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTplRef", required: false }] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }] }); })();
|
|
396
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdModal, { className: "SdModal", filePath: "packages/angular/src/core/modal/sd-modal.ts", lineNumber:
|
|
396
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdModal, { className: "SdModal", filePath: "packages/angular/src/core/modal/sd-modal.ts", lineNumber: 324 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-modal.provider.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACb,MAAM,4BAA4B,CAAC;AAGpC,OAAO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AC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,qBACa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAE9C,UAAU,iDAAa;IAEjB,SAAS,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAC9C,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAkKzD,OAAO,CAAC,aAAa;yCA5KV,eAAe;6CAAf,eAAe;CAuL3B"}
|
|
@@ -109,7 +109,12 @@ export class SdModalProvider {
|
|
|
109
109
|
// 닫힘 애니메이션 트리거: open(false) → CSS transition 시작
|
|
110
110
|
modalRef.instance.open.set(false);
|
|
111
111
|
const modalEl = modalRef.location.nativeElement;
|
|
112
|
+
let destroyed = false;
|
|
112
113
|
const doDestroy = () => {
|
|
114
|
+
// transitionend 와 setTimeout 폴백 중 먼저 도달한 쪽에서 1회만 실행
|
|
115
|
+
if (destroyed)
|
|
116
|
+
return;
|
|
117
|
+
destroyed = true;
|
|
113
118
|
// DOM에서 제거
|
|
114
119
|
if (modalEl.parentNode != null) {
|
|
115
120
|
modalEl.parentNode.removeChild(modalEl);
|
|
@@ -130,7 +135,10 @@ export class SdModalProvider {
|
|
|
130
135
|
// transition duration 확인 후 대기 또는 즉시 destroy
|
|
131
136
|
const duration = parseFloat(getComputedStyle(modalEl).transitionDuration || "0");
|
|
132
137
|
if (duration > 0) {
|
|
138
|
+
// transitionend 가 정상 경로. 단 백그라운드 탭·transition 인터럽트 시 미발화하므로
|
|
139
|
+
// duration(초→ms) + 여유 100ms 후 발화하는 setTimeout 폴백을 함께 걸어 destroy 누락을 방지.
|
|
133
140
|
modalEl.addEventListener("transitionend", doDestroy, { once: true });
|
|
141
|
+
setTimeout(doDestroy, duration * 1000 + 100);
|
|
134
142
|
}
|
|
135
143
|
else {
|
|
136
144
|
doDestroy();
|
|
@@ -4,13 +4,13 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
* 범용 프롬프트 모달.
|
|
5
5
|
* SdModalContentDef<string> 구현. message를 표시하고, 텍스트 입력 후 확인/취소.
|
|
6
6
|
* 확인 시 입력값 emit, 취소 시 undefined emit.
|
|
7
|
+
* 입력값은 필수(required)이며, 빈 값으로 확인 시 sd-form 네이티브 검증으로 차단된다.
|
|
7
8
|
*/
|
|
8
9
|
export declare class SdPromptModal implements SdModalContentDef<string> {
|
|
9
10
|
initialized: import("@angular/core").WritableSignal<boolean>;
|
|
10
11
|
close: import("@angular/core").OutputEmitterRef<string | undefined>;
|
|
11
12
|
message: import("@angular/core").InputSignal<string>;
|
|
12
|
-
_inputValue: import("@angular/core").WritableSignal<string>;
|
|
13
|
-
onInputChange(event: Event): void;
|
|
13
|
+
_inputValue: import("@angular/core").WritableSignal<string | undefined>;
|
|
14
14
|
onConfirm(): void;
|
|
15
15
|
onCancel(): void;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdPromptModal, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-prompt-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-prompt-modal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"sd-prompt-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-prompt-modal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;AAK7D;;;;;GAKG;AACH,qBAqBa,aAAc,YAAW,iBAAiB,CAAC,MAAM,CAAC;IAC7D,WAAW,kDAAgB;IAC3B,KAAK,+DAAgC;IAErC,OAAO,8CAA4B;IAEnC,WAAW,6DAAyC;IAEpD,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;yCAZL,aAAa;2CAAb,aAAa;CAezB"}
|
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, input, output, signal, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import { SdButton } from "../../controls/button/sd-button";
|
|
3
3
|
import { SdTextfield } from "../../controls/input/sd-textfield";
|
|
4
|
+
import { SdForm } from "../../controls/form/sd-form";
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* 범용 프롬프트 모달.
|
|
7
8
|
* SdModalContentDef<string> 구현. message를 표시하고, 텍스트 입력 후 확인/취소.
|
|
8
9
|
* 확인 시 입력값 emit, 취소 시 undefined emit.
|
|
10
|
+
* 입력값은 필수(required)이며, 빈 값으로 확인 시 sd-form 네이티브 검증으로 차단된다.
|
|
9
11
|
*/
|
|
10
12
|
export class SdPromptModal {
|
|
11
13
|
initialized = signal(true, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
12
14
|
close = output();
|
|
13
15
|
message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
14
|
-
_inputValue = signal(
|
|
15
|
-
onInputChange(event) {
|
|
16
|
-
const inputEl = event.target;
|
|
17
|
-
this._inputValue.set(inputEl.value);
|
|
18
|
-
}
|
|
16
|
+
_inputValue = signal(undefined, ...(ngDevMode ? [{ debugName: "_inputValue" }] : /* istanbul ignore next */ []));
|
|
19
17
|
onConfirm() {
|
|
20
|
-
|
|
21
|
-
if (val !== "") {
|
|
22
|
-
this.close.emit(val);
|
|
23
|
-
}
|
|
18
|
+
this.close.emit(this._inputValue());
|
|
24
19
|
}
|
|
25
20
|
onCancel() {
|
|
26
21
|
this.close.emit(undefined);
|
|
27
22
|
}
|
|
28
23
|
static ɵfac = function SdPromptModal_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdPromptModal)(); };
|
|
29
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdPromptModal, selectors: [["sd-prompt-modal"]], hostAttrs: [1, "p-default", 2, "display", "block"], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls:
|
|
30
|
-
i0.ɵɵ
|
|
31
|
-
i0.ɵɵ
|
|
32
|
-
i0.ɵɵ
|
|
24
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdPromptModal, selectors: [["sd-prompt-modal"]], hostAttrs: [1, "p-default", 2, "display", "block"], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls: 8, vars: 6, consts: [[3, "formSubmit"], [1, "mb-default", 3, "innerHTML"], [1, "mb-default", 3, "valueChange", "type", "value", "required"], [1, "flex-row", "main-align-end", "gap-sm"], [3, "type", "theme"], [3, "click"]], template: function SdPromptModal_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelementStart(0, "sd-form", 0);
|
|
26
|
+
i0.ɵɵlistener("formSubmit", function SdPromptModal_Template_sd_form_formSubmit_0_listener() { return ctx.onConfirm(); });
|
|
27
|
+
i0.ɵɵelement(1, "p", 1);
|
|
28
|
+
i0.ɵɵelementStart(2, "sd-textfield", 2);
|
|
29
|
+
i0.ɵɵtwoWayListener("valueChange", function SdPromptModal_Template_sd_textfield_valueChange_2_listener($event) { i0.ɵɵtwoWayBindingSet(ctx._inputValue, $event) || (ctx._inputValue = $event); return $event; });
|
|
33
30
|
i0.ɵɵelementEnd();
|
|
34
|
-
i0.ɵɵelementStart(
|
|
35
|
-
i0.ɵɵ
|
|
36
|
-
i0.ɵɵtext(4, "\uD655\uC778");
|
|
31
|
+
i0.ɵɵelementStart(3, "div", 3)(4, "sd-button", 4);
|
|
32
|
+
i0.ɵɵtext(5, "\uD655\uC778");
|
|
37
33
|
i0.ɵɵelementEnd();
|
|
38
|
-
i0.ɵɵelementStart(
|
|
39
|
-
i0.ɵɵlistener("click", function
|
|
40
|
-
i0.ɵɵtext(
|
|
41
|
-
i0.ɵɵelementEnd()();
|
|
34
|
+
i0.ɵɵelementStart(6, "sd-button", 5);
|
|
35
|
+
i0.ɵɵlistener("click", function SdPromptModal_Template_sd_button_click_6_listener() { return ctx.onCancel(); });
|
|
36
|
+
i0.ɵɵtext(7, "\uCDE8\uC18C");
|
|
37
|
+
i0.ɵɵelementEnd()()();
|
|
42
38
|
} if (rf & 2) {
|
|
39
|
+
i0.ɵɵadvance();
|
|
43
40
|
i0.ɵɵproperty("innerHTML", ctx.message(), i0.ɵɵsanitizeHtml);
|
|
44
41
|
i0.ɵɵadvance();
|
|
45
|
-
i0.ɵɵproperty("type", "text")
|
|
42
|
+
i0.ɵɵproperty("type", "text");
|
|
43
|
+
i0.ɵɵtwoWayProperty("value", ctx._inputValue);
|
|
44
|
+
i0.ɵɵproperty("required", true);
|
|
46
45
|
i0.ɵɵadvance(2);
|
|
47
|
-
i0.ɵɵproperty("theme", "primary");
|
|
48
|
-
} }, dependencies: [SdButton, SdTextfield], encapsulation: 2, changeDetection: 0 });
|
|
46
|
+
i0.ɵɵproperty("type", "submit")("theme", "primary");
|
|
47
|
+
} }, dependencies: [SdForm, SdButton, SdTextfield], encapsulation: 2, changeDetection: 0 });
|
|
49
48
|
}
|
|
50
49
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdPromptModal, [{
|
|
51
50
|
type: Component,
|
|
@@ -54,25 +53,21 @@ export class SdPromptModal {
|
|
|
54
53
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
55
54
|
encapsulation: ViewEncapsulation.None,
|
|
56
55
|
standalone: true,
|
|
57
|
-
imports: [SdButton, SdTextfield],
|
|
56
|
+
imports: [SdForm, SdButton, SdTextfield],
|
|
58
57
|
host: {
|
|
59
58
|
style: "display: block",
|
|
60
59
|
class: "p-default",
|
|
61
60
|
},
|
|
62
61
|
template: `
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
[type]="'text'"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<div class="flex-row main-align-end gap-sm">
|
|
72
|
-
<sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
|
|
73
|
-
<sd-button (click)="onCancel()">취소</sd-button>
|
|
74
|
-
</div>
|
|
62
|
+
<sd-form (formSubmit)="onConfirm()">
|
|
63
|
+
<p class="mb-default" [innerHTML]="message()"></p>
|
|
64
|
+
<sd-textfield [type]="'text'" [(value)]="_inputValue" [required]="true" class="mb-default" />
|
|
65
|
+
<div class="flex-row main-align-end gap-sm">
|
|
66
|
+
<sd-button [type]="'submit'" [theme]="'primary'">확인</sd-button>
|
|
67
|
+
<sd-button (click)="onCancel()">취소</sd-button>
|
|
68
|
+
</div>
|
|
69
|
+
</sd-form>
|
|
75
70
|
`,
|
|
76
71
|
}]
|
|
77
72
|
}], null, { close: [{ type: i0.Output, args: ["close"] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] }); })();
|
|
78
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdPromptModal, { className: "SdPromptModal", filePath: "packages/angular/src/core/modal/sd-prompt-modal.ts", lineNumber:
|
|
73
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdPromptModal, { className: "SdPromptModal", filePath: "packages/angular/src/core/modal/sd-prompt-modal.ts", lineNumber: 41 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-print.provider.d.ts","sourceRoot":"","sources":["../../../src/core/print/sd-print.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;;
|
|
1
|
+
{"version":3,"file":"sd-print.provider.d.ts","sourceRoot":"","sources":["../../../src/core/print/sd-print.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;;AAQtF,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,SAAS,MAAM,CAAA;CAAE,GACrF,CAAC,GACD,KAAK,CAAC;AAEV,MAAM,WAAW,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE;IACvD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd,MAAM,EAAE,YAAY,CAClB,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,sBAAsB,GAAG,CAAC,CAAC,EAC1D,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,sBAAsB,GAAG,CAAC,CAAC,CAC1F,CAAC;CACH;AAED,qBACa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAE5C,UAAU,CAAC,CAAC,SAAS,OAAO,EAChC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GACA,OAAO,CAAC,IAAI,CAAC;IAiDV,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACvC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;QACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GACA,OAAO,CAAC,UAAU,CAAC;YA6ER,4BAA4B;yCA9I/B,eAAe;6CAAf,eAAe;CAgL3B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ApplicationRef, createComponent, inject, Injectable, inputBinding, } from "@angular/core";
|
|
2
2
|
import { SdBusyProvider } from "../busy/sd-busy.provider";
|
|
3
|
-
import { wait } from "@simplysm/core-common";
|
|
3
|
+
import { createLogger, wait } from "@simplysm/core-common";
|
|
4
4
|
import { jsPDF } from "jspdf";
|
|
5
5
|
import * as htmlToImage from "html-to-image";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
const logger = createLogger("angular:print");
|
|
7
8
|
export class SdPrintProvider {
|
|
8
9
|
_appRef = inject(ApplicationRef);
|
|
9
10
|
_sdBusy = inject(SdBusyProvider);
|
|
@@ -116,22 +117,34 @@ export class SdPrintProvider {
|
|
|
116
117
|
}
|
|
117
118
|
async _waitForAllImagesLoadedAsync(container) {
|
|
118
119
|
const imgs = Array.from(container.querySelectorAll("img"));
|
|
120
|
+
const failedSrcs = [];
|
|
119
121
|
await Promise.all(imgs.map((img) => {
|
|
120
122
|
return new Promise((resolve) => {
|
|
121
123
|
if (img.complete && img.naturalWidth !== 0) {
|
|
122
124
|
resolve();
|
|
123
125
|
}
|
|
124
126
|
else {
|
|
125
|
-
const
|
|
126
|
-
img.removeEventListener("load",
|
|
127
|
-
img.removeEventListener("error",
|
|
127
|
+
const cleanup = () => {
|
|
128
|
+
img.removeEventListener("load", onLoad);
|
|
129
|
+
img.removeEventListener("error", onError);
|
|
130
|
+
};
|
|
131
|
+
const onLoad = () => {
|
|
132
|
+
cleanup();
|
|
133
|
+
resolve();
|
|
134
|
+
};
|
|
135
|
+
const onError = () => {
|
|
136
|
+
failedSrcs.push(img.src);
|
|
137
|
+
cleanup();
|
|
128
138
|
resolve();
|
|
129
139
|
};
|
|
130
|
-
img.addEventListener("load",
|
|
131
|
-
img.addEventListener("error",
|
|
140
|
+
img.addEventListener("load", onLoad);
|
|
141
|
+
img.addEventListener("error", onError);
|
|
132
142
|
}
|
|
133
143
|
});
|
|
134
144
|
}));
|
|
145
|
+
if (failedSrcs.length > 0) {
|
|
146
|
+
logger.error(`인쇄/PDF: 이미지 ${failedSrcs.length}건 로드 실패`, failedSrcs);
|
|
147
|
+
}
|
|
135
148
|
}
|
|
136
149
|
static ɵfac = function SdPrintProvider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdPrintProvider)(); };
|
|
137
150
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SdPrintProvider, factory: SdPrintProvider.ɵfac, providedIn: "root" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provideSdAngular.d.ts","sourceRoot":"","sources":["../../src/core/provideSdAngular.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"provideSdAngular.d.ts","sourceRoot":"","sources":["../../src/core/provideSdAngular.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAkC1D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA4IlF"}
|