@simplysm/angular 14.0.38 → 14.0.39

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.
Files changed (59) hide show
  1. package/dist/controls/checkbox/sd-checkbox.d.ts +1 -1
  2. package/dist/controls/checkbox/sd-checkbox.d.ts.map +1 -1
  3. package/dist/controls/checkbox/sd-checkbox.js +8 -5
  4. package/dist/controls/checkbox/sd-switch.d.ts +3 -1
  5. package/dist/controls/checkbox/sd-switch.d.ts.map +1 -1
  6. package/dist/controls/checkbox/sd-switch.js +11 -5
  7. package/dist/controls/input/sd-textfield.d.ts.map +1 -1
  8. package/dist/controls/input/sd-textfield.js +1 -0
  9. package/dist/core/error-handler/sd-global-error-handler.plugin.d.ts.map +1 -1
  10. package/dist/core/error-handler/sd-global-error-handler.plugin.js +7 -2
  11. package/dist/core/modal/sd-modal.d.ts +2 -3
  12. package/dist/core/modal/sd-modal.d.ts.map +1 -1
  13. package/dist/core/modal/sd-modal.js +8 -9
  14. package/dist/core/modal/sd-modal.provider.d.ts +0 -1
  15. package/dist/core/modal/sd-modal.provider.d.ts.map +1 -1
  16. package/dist/core/modal/sd-modal.provider.js +1 -1
  17. package/dist/core/routing/sd-navigate-window.provider.d.ts.map +1 -1
  18. package/dist/core/routing/sd-navigate-window.provider.js +3 -1
  19. package/dist/core/setupModelHook.d.ts.map +1 -1
  20. package/dist/core/setupModelHook.js +18 -1
  21. package/dist/core/shared-data/sd-shared-data.provider.d.ts.map +1 -1
  22. package/dist/core/shared-data/sd-shared-data.provider.js +12 -3
  23. package/dist/data/data-detail/sd-data-detail.base.d.ts +1 -1
  24. package/dist/data/data-detail/sd-data-detail.base.d.ts.map +1 -1
  25. package/dist/data/data-detail/sd-data-detail.base.js +19 -20
  26. package/dist/data/data-sheet/sd-data-sheet.base.d.ts +0 -1
  27. package/dist/data/data-sheet/sd-data-sheet.base.d.ts.map +1 -1
  28. package/dist/data/data-sheet/sd-data-sheet.base.js +4 -12
  29. package/dist/data/getOrmDataEditToastErrorMessage.d.ts +2 -0
  30. package/dist/data/getOrmDataEditToastErrorMessage.d.ts.map +1 -0
  31. package/dist/data/getOrmDataEditToastErrorMessage.js +8 -0
  32. package/dist/data/permission-table/sd-permission-table.d.ts +1 -1
  33. package/dist/data/permission-table/sd-permission-table.d.ts.map +1 -1
  34. package/dist/data/permission-table/sd-permission-table.js +6 -5
  35. package/dist/features/editor/sd-tiptap-editor.d.ts.map +1 -1
  36. package/dist/features/editor/sd-tiptap-editor.js +3 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +2 -0
  40. package/dist/layout/base-container/sd-base-container.d.ts +1 -0
  41. package/dist/layout/base-container/sd-base-container.d.ts.map +1 -1
  42. package/dist/layout/base-container/sd-base-container.js +5 -2
  43. package/package.json +6 -5
  44. package/src/controls/checkbox/sd-checkbox.ts +7 -3
  45. package/src/controls/checkbox/sd-switch.ts +8 -2
  46. package/src/controls/input/sd-textfield.ts +1 -0
  47. package/src/core/error-handler/sd-global-error-handler.plugin.ts +6 -2
  48. package/src/core/modal/sd-modal.provider.ts +1 -2
  49. package/src/core/modal/sd-modal.ts +5 -5
  50. package/src/core/routing/sd-navigate-window.provider.ts +3 -1
  51. package/src/core/setupModelHook.ts +21 -1
  52. package/src/core/shared-data/sd-shared-data.provider.ts +13 -2
  53. package/src/data/data-detail/sd-data-detail.base.ts +21 -24
  54. package/src/data/data-sheet/sd-data-sheet.base.ts +4 -15
  55. package/src/data/getOrmDataEditToastErrorMessage.ts +10 -0
  56. package/src/data/permission-table/sd-permission-table.ts +7 -6
  57. package/src/features/editor/sd-tiptap-editor.ts +2 -0
  58. package/src/index.ts +3 -0
  59. package/src/layout/base-container/sd-base-container.ts +4 -1
@@ -11,7 +11,7 @@ export declare class SdCheckbox {
11
11
  theme: import("@angular/core").InputSignal<"info" | "success" | "white" | "primary" | "secondary" | "warning" | "danger" | "gray" | "blue-gray" | undefined>;
12
12
  contentStyle: import("@angular/core").InputSignal<string | undefined>;
13
13
  constructor();
14
- onClick(): void;
14
+ onClick(event: Event): void;
15
15
  onKeydown(event: KeyboardEvent): void;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<SdCheckbox, never>;
17
17
  static ɵcmp: i0.ɵɵComponentDeclaration<SdCheckbox, "sd-checkbox", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "canChangeFn": { "alias": "canChangeFn"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "radio": { "alias": "radio"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "contentStyle": { "alias": "contentStyle"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["*"], true, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"sd-checkbox.d.ts","sourceRoot":"","sources":["../../../src/controls/checkbox/sd-checkbox.ts"],"names":[],"mappings":";AAaA,qBAiPa,UAAU;IACrB,KAAK,+CAAgB;IACrB,WAAW,6CAAgB,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAAc;IAE/E,IAAI,8CAAsB;IAC1B,KAAK,qEAAiD;IACtD,QAAQ,qEAAiD;IAEzD,IAAI,+DAAwB;IAC5B,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,KAAK,wJAUD;IAEJ,YAAY,0DAAmB;;IAO/B,OAAO;IASP,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCAvC1B,UAAU;2CAAV,UAAU;CAkDtB"}
1
+ {"version":3,"file":"sd-checkbox.d.ts","sourceRoot":"","sources":["../../../src/controls/checkbox/sd-checkbox.ts"],"names":[],"mappings":";AAaA,qBAiPa,UAAU;IACrB,KAAK,+CAAgB;IACrB,WAAW,6CAAgB,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAAc;IAE/E,IAAI,8CAAsB;IAC1B,KAAK,qEAAiD;IACtD,QAAQ,qEAAiD;IAEzD,IAAI,+DAAwB;IAC5B,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,KAAK,wJAUD;IAEJ,YAAY,0DAAmB;;IAO/B,OAAO,CAAC,KAAK,EAAE,KAAK;IAYpB,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCA1C1B,UAAU;2CAAV,UAAU;CAsDtB"}
@@ -29,7 +29,9 @@ export class SdCheckbox {
29
29
  setupModelHook(this.value, this.canChangeFn);
30
30
  setupRipple(() => !this.disabled());
31
31
  }
32
- onClick() {
32
+ onClick(event) {
33
+ event.preventDefault();
34
+ event.stopPropagation();
33
35
  if (this.disabled())
34
36
  return;
35
37
  if (this.radio()) {
@@ -42,6 +44,7 @@ export class SdCheckbox {
42
44
  onKeydown(event) {
43
45
  if (event.key === " ") {
44
46
  event.preventDefault();
47
+ event.stopPropagation();
45
48
  if (this.disabled())
46
49
  return;
47
50
  if (this.radio()) {
@@ -54,9 +57,9 @@ export class SdCheckbox {
54
57
  }
55
58
  static ɵfac = function SdCheckbox_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdCheckbox)(); };
56
59
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdCheckbox, selectors: [["sd-checkbox"]], hostVars: 8, hostBindings: function SdCheckbox_HostBindings(rf, ctx) { if (rf & 1) {
57
- i0.ɵɵlistener("click", function SdCheckbox_click_HostBindingHandler() { return ctx.onClick(); })("keydown", function SdCheckbox_keydown_HostBindingHandler($event) { return ctx.onKeydown($event); });
60
+ i0.ɵɵlistener("click", function SdCheckbox_click_HostBindingHandler($event) { return ctx.onClick($event); })("keydown", function SdCheckbox_keydown_HostBindingHandler($event) { return ctx.onKeydown($event); });
58
61
  } if (rf & 2) {
59
- i0.ɵɵattribute("data-sd-checked", ctx.value())("data-sd-disabled", ctx.disabled())("data-sd-inline", ctx.inline())("data-sd-inset", ctx.inset())("data-sd-radio", ctx.radio())("data-sd-size", ctx.size())("data-sd-theme", ctx.theme())("tabindex", 0);
62
+ i0.ɵɵattribute("data-sd-checked", ctx.value())("data-sd-disabled", ctx.disabled())("data-sd-inline", ctx.inline())("data-sd-inset", ctx.inset())("data-sd-radio", ctx.radio())("data-sd-size", ctx.size())("data-sd-theme", ctx.theme())("tabindex", "0");
60
63
  } }, inputs: { value: [1, "value"], canChangeFn: [1, "canChangeFn"], icon: [1, "icon"], radio: [1, "radio"], disabled: [1, "disabled"], size: [1, "size"], inline: [1, "inline"], inset: [1, "inset"], theme: [1, "theme"], contentStyle: [1, "contentStyle"] }, outputs: { value: "valueChange" }, ngContentSelectors: _c0, decls: 6, vars: 3, consts: [[1, "_indicator_rect"], [1, "_indicator"], [3, "svg"], [1, "_contents"]], template: function SdCheckbox_Template(rf, ctx) { if (rf & 1) {
61
64
  i0.ɵɵprojectionDef();
62
65
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
@@ -95,8 +98,8 @@ export class SdCheckbox {
95
98
  "[attr.data-sd-radio]": "radio()",
96
99
  "[attr.data-sd-size]": "size()",
97
100
  "[attr.data-sd-theme]": "theme()",
98
- "[attr.tabindex]": "0",
99
- "(click)": "onClick()",
101
+ "[attr.tabindex]": "'0'",
102
+ "(click)": "onClick($event)",
100
103
  "(keydown)": "onKeydown($event)",
101
104
  }, styles: ["sd-checkbox {\n display: block;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid transparent;\n font-size: var(--font-size-default);\n font-family: var(--font-family);\n font-variant-numeric: tabular-nums;\n line-height: var(--line-height);\n color: var(--text-trans-default);\n color: inherit;\n cursor: pointer;\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-sm) * 2 + 2px);\n gap: var(--gap-sm);\n}\n@supports not (appearance: auto) {\n sd-checkbox {\n gap: 0;\n }\n sd-checkbox > * + * {\n margin-left: var(--gap-sm);\n }\n}\nsd-checkbox > ._indicator_rect {\n display: inline-block;\n vertical-align: -0.125em;\n user-select: none;\n width: calc(var(--font-size-default) + 2px);\n height: calc(var(--font-size-default) + 2px);\n border: 1px solid var(--trans-light);\n background: var(--theme-secondary-lightest);\n}\nsd-checkbox > ._indicator_rect > ._indicator {\n margin: -1px -2px;\n text-align: center;\n opacity: 0;\n color: var(--text-trans-rev-default);\n}\nsd-checkbox > ._indicator_rect > ._indicator > ng-icon > svg {\n vertical-align: top;\n stroke-width: 2.5px !important;\n}\nsd-checkbox ._contents {\n display: inline-block;\n vertical-align: top;\n padding-left: var(--gap-sm);\n}\nsd-checkbox > ._indicator_rect + ._contents:empty {\n display: none;\n}\nsd-checkbox:focus > ._indicator_rect {\n border-color: var(--theme-primary-dark);\n}\nsd-checkbox[data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-checked=true] > ._indicator_rect > ._indicator {\n opacity: 1;\n}\nsd-checkbox[data-sd-theme=gray] > ._indicator_rect {\n background: var(--theme-gray-lightest);\n}\nsd-checkbox[data-sd-theme=gray] > ._indicator_rect > ._indicator {\n color: var(--theme-gray-default);\n}\nsd-checkbox[data-sd-theme=gray]:focus > ._indicator_rect {\n border-color: var(--theme-gray-default);\n}\nsd-checkbox[data-sd-theme=gray][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-gray-default);\n}\nsd-checkbox[data-sd-theme=gray][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=blue-gray] > ._indicator_rect {\n background: var(--theme-blue-gray-lightest);\n}\nsd-checkbox[data-sd-theme=blue-gray] > ._indicator_rect > ._indicator {\n color: var(--theme-blue-gray-default);\n}\nsd-checkbox[data-sd-theme=blue-gray]:focus > ._indicator_rect {\n border-color: var(--theme-blue-gray-default);\n}\nsd-checkbox[data-sd-theme=blue-gray][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-blue-gray-default);\n}\nsd-checkbox[data-sd-theme=blue-gray][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=primary] > ._indicator_rect {\n background: var(--theme-primary-lightest);\n}\nsd-checkbox[data-sd-theme=primary] > ._indicator_rect > ._indicator {\n color: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-theme=primary]:focus > ._indicator_rect {\n border-color: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-theme=primary][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-theme=primary][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=secondary] > ._indicator_rect {\n background: var(--theme-secondary-lightest);\n}\nsd-checkbox[data-sd-theme=secondary] > ._indicator_rect > ._indicator {\n color: var(--theme-secondary-default);\n}\nsd-checkbox[data-sd-theme=secondary]:focus > ._indicator_rect {\n border-color: var(--theme-secondary-default);\n}\nsd-checkbox[data-sd-theme=secondary][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-secondary-default);\n}\nsd-checkbox[data-sd-theme=secondary][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=info] > ._indicator_rect {\n background: var(--theme-info-lightest);\n}\nsd-checkbox[data-sd-theme=info] > ._indicator_rect > ._indicator {\n color: var(--theme-info-default);\n}\nsd-checkbox[data-sd-theme=info]:focus > ._indicator_rect {\n border-color: var(--theme-info-default);\n}\nsd-checkbox[data-sd-theme=info][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-info-default);\n}\nsd-checkbox[data-sd-theme=info][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=success] > ._indicator_rect {\n background: var(--theme-success-lightest);\n}\nsd-checkbox[data-sd-theme=success] > ._indicator_rect > ._indicator {\n color: var(--theme-success-default);\n}\nsd-checkbox[data-sd-theme=success]:focus > ._indicator_rect {\n border-color: var(--theme-success-default);\n}\nsd-checkbox[data-sd-theme=success][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-success-default);\n}\nsd-checkbox[data-sd-theme=success][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=warning] > ._indicator_rect {\n background: var(--theme-warning-lightest);\n}\nsd-checkbox[data-sd-theme=warning] > ._indicator_rect > ._indicator {\n color: var(--theme-warning-default);\n}\nsd-checkbox[data-sd-theme=warning]:focus > ._indicator_rect {\n border-color: var(--theme-warning-default);\n}\nsd-checkbox[data-sd-theme=warning][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-warning-default);\n}\nsd-checkbox[data-sd-theme=warning][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=danger] > ._indicator_rect {\n background: var(--theme-danger-lightest);\n}\nsd-checkbox[data-sd-theme=danger] > ._indicator_rect > ._indicator {\n color: var(--theme-danger-default);\n}\nsd-checkbox[data-sd-theme=danger]:focus > ._indicator_rect {\n border-color: var(--theme-danger-default);\n}\nsd-checkbox[data-sd-theme=danger][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-danger-default);\n}\nsd-checkbox[data-sd-theme=danger][data-sd-checked=true] > ._indicator_rect > ._indicator {\n color: var(--text-trans-rev-default);\n}\nsd-checkbox[data-sd-theme=white] > ._indicator_rect {\n background: var(--control-color);\n border-color: var(--text-trans-lightest);\n}\nsd-checkbox[data-sd-theme=white]:focus > ._indicator_rect {\n border-color: var(--text-trans-default);\n}\nsd-checkbox[data-sd-theme=white][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-radio=true] > ._indicator_rect {\n border-radius: 100%;\n padding: var(--gap-xs);\n}\nsd-checkbox[data-sd-radio=true] > ._indicator_rect > ._indicator {\n border-radius: 100%;\n width: 100%;\n height: 100%;\n background: var(--theme-primary-default);\n}\nsd-checkbox[data-sd-radio=true][data-sd-checked=true] > ._indicator_rect {\n background: var(--theme-secondary-lightest);\n border-color: var(--theme-primary-dark);\n}\nsd-checkbox[data-sd-size=sm] {\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-xs) * 2 + 2px);\n padding: var(--gap-xs) var(--gap-sm);\n gap: var(--gap-xs);\n}\n@supports not (appearance: auto) {\n sd-checkbox[data-sd-size=sm] {\n gap: 0;\n }\n sd-checkbox[data-sd-size=sm] > * + * {\n margin-left: var(--gap-xs);\n }\n}\nsd-checkbox[data-sd-size=lg] {\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-default) * 2 + 2px);\n padding: var(--gap-default) var(--gap-lg);\n gap: var(--gap-default);\n}\n@supports not (appearance: auto) {\n sd-checkbox[data-sd-size=lg] {\n gap: 0;\n }\n sd-checkbox[data-sd-size=lg] > * + * {\n margin-left: var(--gap-default);\n }\n}\nsd-checkbox[data-sd-inset=true] {\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-sm) * 2);\n border: none;\n justify-content: center;\n text-align: center;\n}\nsd-checkbox[data-sd-inset=true][data-sd-size=sm] {\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-xs) * 2);\n}\nsd-checkbox[data-sd-inset=true][data-sd-size=lg] {\n height: calc(var(--font-size-default) * var(--line-height-strip-unit) + var(--gap-default) * 2);\n}\nsd-checkbox[data-sd-inline=true] {\n display: inline-block;\n vertical-align: top;\n padding: 0;\n border: none;\n height: calc(var(--font-size-default) * var(--line-height-strip-unit));\n width: auto;\n}\nsd-checkbox[data-sd-disabled=true] {\n opacity: 0.3;\n pointer-events: none;\n}"] }]
102
105
  }], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], canChangeFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "canChangeFn", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], radio: [{ type: i0.Input, args: [{ isSignal: true, alias: "radio", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }] }); })();
@@ -1,14 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class SdSwitch {
3
3
  value: import("@angular/core").ModelSignal<boolean>;
4
+ canChangeFn: import("@angular/core").InputSignal<(item: boolean) => boolean | Promise<boolean>>;
4
5
  disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
5
6
  inline: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
6
7
  inset: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
7
8
  size: import("@angular/core").InputSignal<"sm" | "lg" | undefined>;
8
9
  theme: import("@angular/core").InputSignal<"info" | "success" | "primary" | "secondary" | "warning" | "danger" | "gray" | "blue-gray" | undefined>;
10
+ constructor();
9
11
  onClick(event: Event): void;
10
12
  onKeydown(event: KeyboardEvent): void;
11
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SdSwitch, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<SdSwitch, "sd-switch", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdSwitch, "sd-switch", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "canChangeFn": { "alias": "canChangeFn"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
13
15
  }
14
16
  //# sourceMappingURL=sd-switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-switch.d.ts","sourceRoot":"","sources":["../../../src/controls/checkbox/sd-switch.ts"],"names":[],"mappings":";AASA,qBA2Ga,QAAQ;IACnB,KAAK,+CAAgB;IAErB,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IAEtD,IAAI,+DAAwB;IAC5B,KAAK,8IAED;IAEJ,OAAO,CAAC,KAAK,EAAE,KAAK;IASpB,SAAS,CAAC,KAAK,EAAE,aAAa;yCArBnB,QAAQ;2CAAR,QAAQ;CA4BpB"}
1
+ {"version":3,"file":"sd-switch.d.ts","sourceRoot":"","sources":["../../../src/controls/checkbox/sd-switch.ts"],"names":[],"mappings":";AAUA,qBA2Ga,QAAQ;IACnB,KAAK,+CAAgB;IACrB,WAAW,6CAAgB,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAAc;IAE/E,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IAEtD,IAAI,+DAAwB;IAC5B,KAAK,8IAED;;IAMJ,OAAO,CAAC,KAAK,EAAE,KAAK;IAQpB,SAAS,CAAC,KAAK,EAAE,aAAa;yCAzBnB,QAAQ;2CAAR,QAAQ;CAiCpB"}
@@ -1,22 +1,28 @@
1
1
  import { booleanAttribute, ChangeDetectionStrategy, Component, input, model, ViewEncapsulation, } from "@angular/core";
2
+ import { setupModelHook } from "../../core/setupModelHook";
2
3
  import * as i0 from "@angular/core";
3
4
  export class SdSwitch {
4
5
  value = model(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
6
+ canChangeFn = input(() => true, ...(ngDevMode ? [{ debugName: "canChangeFn" }] : /* istanbul ignore next */ []));
5
7
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6
8
  inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7
9
  inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8
10
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
9
11
  theme = input(...(ngDevMode ? [undefined, { debugName: "theme" }] : /* istanbul ignore next */ []));
12
+ constructor() {
13
+ setupModelHook(this.value, this.canChangeFn);
14
+ }
10
15
  onClick(event) {
11
- if (this.disabled())
12
- return;
13
16
  event.preventDefault();
14
17
  event.stopPropagation();
18
+ if (this.disabled())
19
+ return;
15
20
  this.value.update((v) => !v);
16
21
  }
17
22
  onKeydown(event) {
18
23
  if (event.key === " ") {
19
24
  event.preventDefault();
25
+ event.stopPropagation();
20
26
  if (this.disabled())
21
27
  return;
22
28
  this.value.update((v) => !v);
@@ -27,7 +33,7 @@ export class SdSwitch {
27
33
  i0.ɵɵlistener("click", function SdSwitch_click_HostBindingHandler($event) { return ctx.onClick($event); })("keydown", function SdSwitch_keydown_HostBindingHandler($event) { return ctx.onKeydown($event); });
28
34
  } if (rf & 2) {
29
35
  i0.ɵɵattribute("data-sd-on", ctx.value())("data-sd-disabled", ctx.disabled())("data-sd-inline", ctx.inline())("data-sd-inset", ctx.inset())("data-sd-size", ctx.size())("data-sd-theme", ctx.theme())("tabindex", "0");
30
- } }, inputs: { value: [1, "value"], disabled: [1, "disabled"], inline: [1, "inline"], inset: [1, "inset"], size: [1, "size"], theme: [1, "theme"] }, outputs: { value: "valueChange" }, decls: 2, vars: 0, template: function SdSwitch_Template(rf, ctx) { if (rf & 1) {
36
+ } }, inputs: { value: [1, "value"], canChangeFn: [1, "canChangeFn"], disabled: [1, "disabled"], inline: [1, "inline"], inset: [1, "inset"], size: [1, "size"], theme: [1, "theme"] }, outputs: { value: "valueChange" }, decls: 2, vars: 0, template: function SdSwitch_Template(rf, ctx) { if (rf & 1) {
31
37
  i0.ɵɵdomElementStart(0, "div");
32
38
  i0.ɵɵdomElement(1, "div");
33
39
  i0.ɵɵdomElementEnd();
@@ -50,5 +56,5 @@ export class SdSwitch {
50
56
  <div></div>
51
57
  </div>
52
58
  `, styles: ["sd-switch {\n display: block;\n padding: var(--gap-sm) 0;\n border: 1px solid transparent;\n vertical-align: top;\n cursor: pointer;\n}\nsd-switch > div {\n height: var(--line-height);\n width: calc(var(--line-height) * 2 - var(--gap-xs));\n padding: calc(var(--gap-xs) / 2);\n border-radius: calc(var(--line-height) / 2);\n text-align: left;\n background: var(--theme-gray-lighter);\n}\nsd-switch > div > div {\n display: inline-block;\n width: calc(var(--line-height) - var(--gap-xs));\n height: calc(var(--line-height) - var(--gap-xs));\n border-radius: 100%;\n background: var(--control-color);\n transition: transform var(--animation-duration);\n}\nsd-switch[data-sd-on=true] > div {\n background: var(--theme-success-default);\n}\nsd-switch[data-sd-on=true] > div > div {\n transform: translateX(100%);\n}\nsd-switch[data-sd-inline=true] {\n display: inline-block;\n padding: 0;\n border: none;\n}\nsd-switch[data-sd-inset=true] {\n border: none;\n}\nsd-switch[data-sd-size=sm] {\n padding: var(--gap-sm) 0;\n}\nsd-switch[data-sd-size=lg] {\n padding: var(--gap-default) 0;\n}\nsd-switch[data-sd-theme=gray][data-sd-on=true] > div {\n background: var(--theme-gray-default);\n}\nsd-switch[data-sd-theme=blue-gray][data-sd-on=true] > div {\n background: var(--theme-blue-gray-default);\n}\nsd-switch[data-sd-theme=primary][data-sd-on=true] > div {\n background: var(--theme-primary-default);\n}\nsd-switch[data-sd-theme=secondary][data-sd-on=true] > div {\n background: var(--theme-secondary-default);\n}\nsd-switch[data-sd-theme=info][data-sd-on=true] > div {\n background: var(--theme-info-default);\n}\nsd-switch[data-sd-theme=success][data-sd-on=true] > div {\n background: var(--theme-success-default);\n}\nsd-switch[data-sd-theme=warning][data-sd-on=true] > div {\n background: var(--theme-warning-default);\n}\nsd-switch[data-sd-theme=danger][data-sd-on=true] > div {\n background: var(--theme-danger-default);\n}\nsd-switch[data-sd-disabled=true] > div {\n opacity: 0.5;\n}\nsd-switch[data-sd-disabled=true] > div > div {\n background: var(--theme-gray-default);\n}"] }]
53
- }], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }] }); })();
54
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSwitch, { className: "SdSwitch", filePath: "packages/angular/src/controls/checkbox/sd-switch.ts", lineNumber: 117, forbidOrphanRendering: true }); })();
59
+ }], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], canChangeFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "canChangeFn", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }] }); })();
60
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSwitch, { className: "SdSwitch", filePath: "packages/angular/src/controls/checkbox/sd-switch.ts", lineNumber: 118, forbidOrphanRendering: true }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"sd-textfield.d.ts","sourceRoot":"","sources":["../../../src/controls/input/sd-textfield.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;;AAEtC,qBA8Qa,WAAW,CAAC,CAAC,SAAS,MAAM,gBAAgB;IACvD,KAAK,uEAAgC;IAErC,IAAI,yCAAuB;IAC3B,WAAW,0DAAmB;IAC9B,KAAK,0DAAmB;IACxB,UAAU,0DAAmB;IAC7B,UAAU,0DAAmB;IAE7B,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IAEzD,QAAQ,qEAAiD;IACzD,GAAG,uEAAgC;IACnC,GAAG,uEAAgC;IACnC,SAAS,0DAAmB;IAC5B,SAAS,0DAAmB;IAC5B,OAAO,0DAAmB;IAC1B,WAAW,+CAAiB,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,eAAI;IACtF,MAAM,0DAAmB;IAEzB,IAAI,0DAAmB;IACvB,YAAY,0DAAmB;IAC/B,cAAc,qEAAgD;IAC9D,SAAS,0DAAmB;IAE5B,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,KAAK,8IAED;IAEJ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsD;IAE/E,WAAW,yCAA+C;IAE1D,WAAW,kDAA+D;IAE1E,YAAY,yCAOT;IAEH,gBAAgB,qDAMb;;IA4BH,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAa3B,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;yCA/F9B,WAAW;2CAAX,WAAW;CA8GvB"}
1
+ {"version":3,"file":"sd-textfield.d.ts","sourceRoot":"","sources":["../../../src/controls/input/sd-textfield.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;;AAEtC,qBA8Qa,WAAW,CAAC,CAAC,SAAS,MAAM,gBAAgB;IACvD,KAAK,uEAAgC;IAErC,IAAI,yCAAuB;IAC3B,WAAW,0DAAmB;IAC9B,KAAK,0DAAmB;IACxB,UAAU,0DAAmB;IAC7B,UAAU,0DAAmB;IAE7B,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IAEzD,QAAQ,qEAAiD;IACzD,GAAG,uEAAgC;IACnC,GAAG,uEAAgC;IACnC,SAAS,0DAAmB;IAC5B,SAAS,0DAAmB;IAC5B,OAAO,0DAAmB;IAC1B,WAAW,+CAAiB,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,eAAI;IACtF,MAAM,0DAAmB;IAEzB,IAAI,0DAAmB;IACvB,YAAY,0DAAmB;IAC/B,cAAc,qEAAgD;IAC9D,SAAS,0DAAmB;IAE5B,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,KAAK,8IAED;IAEJ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsD;IAE/E,WAAW,yCAA+C;IAE1D,WAAW,kDAA+D;IAE1E,YAAY,yCAOT;IAEH,gBAAgB,qDAMb;;IA4BH,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAc3B,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;yCAhG9B,WAAW;2CAAX,WAAW;CA+GvB"}
@@ -123,6 +123,7 @@ export class SdTextfield {
123
123
  }
124
124
  const parsed = this._handler().parse(inputEl.value, { format: this.format() });
125
125
  if (parsed === undefined) {
126
+ inputEl.value = this.controlValue();
126
127
  return;
127
128
  }
128
129
  this.value.set(parsed);
@@ -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;;AAGvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,kBAAkB,CAAS;IAEnC,WAAW,CAAC,KAAK,EAAE,GAAG;IAuEtB,OAAO,CAAC,oBAAoB;yCA5EjB,0BAA0B;6CAA1B,0BAA0B;CAoHtC"}
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;;AAGvB,qBACa,0BAA2B,YAAW,YAAY;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,kBAAkB,CAAS;IAEnC,WAAW,CAAC,KAAK,EAAE,GAAG;IA2EtB,OAAO,CAAC,oBAAoB;yCAhFjB,0BAA0B;6CAA1B,0BAA0B;CAwHtC"}
@@ -67,8 +67,13 @@ export class SdGlobalErrorHandlerPlugin {
67
67
  console.error(err, event);
68
68
  document.body.textContent =
69
69
  `[에러 처리 실패]\n원본: ${String(event)}\n2차: ${String(err)}`;
70
- const appRef = this._envInjector.get(ApplicationRef);
71
- appRef.destroy();
70
+ try {
71
+ const appRef = this._envInjector.get(ApplicationRef);
72
+ appRef.destroy();
73
+ }
74
+ catch {
75
+ // _displayErrorMessage에서 이미 destroy된 경우 무시
76
+ }
72
77
  }
73
78
  return false;
74
79
  }
@@ -5,6 +5,7 @@ export declare class SdModal {
5
5
  private readonly _elRef;
6
6
  private readonly _activatedModal;
7
7
  private readonly _systemConfig;
8
+ private readonly _errorHandler;
8
9
  private readonly _focusTrap;
9
10
  protected readonly tablerX = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M18 6l-12 12\"></path><path d=\"M6 6l12 12\"></path></svg>";
10
11
  open: import("@angular/core").ModelSignal<boolean>;
@@ -23,8 +24,6 @@ export declare class SdModal {
23
24
  minWidthPx: import("@angular/core").InputSignal<number | undefined>;
24
25
  heightPx: import("@angular/core").InputSignal<number | undefined>;
25
26
  widthPx: import("@angular/core").InputSignal<number | undefined>;
26
- headerStyle: import("@angular/core").InputSignal<string | undefined>;
27
- noFirstControlFocusing: import("@angular/core").InputSignal<boolean>;
28
27
  actionTplRef: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
29
28
  closeRequest: import("@angular/core").OutputEmitterRef<void>;
30
29
  private readonly _dragResize;
@@ -41,6 +40,6 @@ export declare class SdModal {
41
40
  private _saveConfig;
42
41
  private _restoreConfig;
43
42
  static ɵfac: i0.ɵɵFactoryDeclaration<SdModal, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "hideCloseButton": { "alias": "hideCloseButton"; "required": false; "isSignal": true; }; "useCloseByBackdrop": { "alias": "useCloseByBackdrop"; "required": false; "isSignal": true; }; "useCloseByEscapeKey": { "alias": "useCloseByEscapeKey"; "required": false; "isSignal": true; }; "float": { "alias": "float"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "movable": { "alias": "movable"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "minHeightPx": { "alias": "minHeightPx"; "required": false; "isSignal": true; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; "isSignal": true; }; "heightPx": { "alias": "heightPx"; "required": false; "isSignal": true; }; "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "headerStyle": { "alias": "headerStyle"; "required": false; "isSignal": true; }; "noFirstControlFocusing": { "alias": "noFirstControlFocusing"; "required": false; "isSignal": true; }; "actionTplRef": { "alias": "actionTplRef"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closeRequest": "closeRequest"; }, never, ["*"], true, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "hideCloseButton": { "alias": "hideCloseButton"; "required": false; "isSignal": true; }; "useCloseByBackdrop": { "alias": "useCloseByBackdrop"; "required": false; "isSignal": true; }; "useCloseByEscapeKey": { "alias": "useCloseByEscapeKey"; "required": false; "isSignal": true; }; "float": { "alias": "float"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "movable": { "alias": "movable"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "minHeightPx": { "alias": "minHeightPx"; "required": false; "isSignal": true; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; "isSignal": true; }; "heightPx": { "alias": "heightPx"; "required": false; "isSignal": true; }; "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "actionTplRef": { "alias": "actionTplRef"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closeRequest": "closeRequest"; }, never, ["*"], true, never>;
45
44
  }
46
45
  //# sourceMappingURL=sd-modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sd-modal.d.ts","sourceRoot":"","sources":["../../../src/core/modal/sd-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAQvB,OAAO,wBAAwB,CAAC;;AAEhC,qBAuQa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwD;IACxF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsD;IACpF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD,SAAS,CAAC,QAAQ,CAAC,OAAO,yVAAW;IAErC,IAAI,+CAAgB;IACpB,GAAG,0DAAwC;IAC3C,KAAK,8CAAa;IAClB,UAAU,+CAAgB;IAC1B,eAAe,+CAAgB;IAC/B,kBAAkB,+CAAe;IACjC,mBAAmB,+CAAe;IAClC,KAAK,+CAAgB;IACrB,IAAI,+CAAgB;IACpB,SAAS,+CAAgB;IACzB,OAAO,+CAAgB;IACvB,QAAQ,gFAA8D;IACtE,WAAW,0DAAwC;IACnD,UAAU,0DAAwC;IAClD,QAAQ,0DAAwC;IAChD,OAAO,0DAAwC;IAC/C,WAAW,0DAAwC;IACnD,sBAAsB,+CAAgB;IACtC,YAAY,oEAAkD;IAE9D,YAAY,iDAAkB;IAE9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAKzB;;IAqCH,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvD,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAO1C,eAAe,IAAI,IAAI;IAKvB,kBAAkB,IAAI,IAAI;IAI1B,eAAe,CAAC,KAAK,EA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kBAAkB,IAAI,IAAI;IAI1B,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAS3C,aAAa,IAAI,IAAI;IAIrB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,YAAY;YAIN,WAAW;YAgBX,cAAc;yCArJjB,OAAO;2CAAP,OAAO;CAqKnB"}
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, effect, ElementRef, inject, input, model, output, ViewEncapsulation, } from "@angular/core";
1
+ import { 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";
@@ -79,6 +79,7 @@ export class SdModal {
79
79
  _elRef = inject((ElementRef));
80
80
  _activatedModal = inject(SdActivatedModalProvider, { optional: true });
81
81
  _systemConfig = inject(SdSystemConfigProvider, { optional: true });
82
+ _errorHandler = inject(ErrorHandler);
82
83
  _focusTrap = injectFocusTrap();
83
84
  tablerX = tablerX;
84
85
  open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
@@ -97,15 +98,13 @@ export class SdModal {
97
98
  minWidthPx = input(undefined, ...(ngDevMode ? [{ debugName: "minWidthPx" }] : /* istanbul ignore next */ []));
98
99
  heightPx = input(undefined, ...(ngDevMode ? [{ debugName: "heightPx" }] : /* istanbul ignore next */ []));
99
100
  widthPx = input(undefined, ...(ngDevMode ? [{ debugName: "widthPx" }] : /* istanbul ignore next */ []));
100
- headerStyle = input(undefined, ...(ngDevMode ? [{ debugName: "headerStyle" }] : /* istanbul ignore next */ []));
101
- noFirstControlFocusing = input(false, ...(ngDevMode ? [{ debugName: "noFirstControlFocusing" }] : /* istanbul ignore next */ []));
102
101
  actionTplRef = input(undefined, ...(ngDevMode ? [{ debugName: "actionTplRef" }] : /* istanbul ignore next */ []));
103
102
  closeRequest = output();
104
103
  _dragResize = injectDragResize({
105
104
  getDialogEl: () => this._getDialogEl(),
106
105
  minWidthPx: this.minWidthPx,
107
106
  minHeightPx: this.minHeightPx,
108
- onEnd: () => void this._saveConfig(),
107
+ onEnd: () => void this._saveConfig().catch((err) => this._errorHandler.handleError(err)),
109
108
  });
110
109
  constructor() {
111
110
  // data-sd-init: 첫 렌더 후 설정하여 CSS transition 트리거 허용
@@ -137,7 +136,7 @@ export class SdModal {
137
136
  const k = this.key();
138
137
  if (k === undefined || this._systemConfig == null)
139
138
  return;
140
- void this._restoreConfig(k);
139
+ void this._restoreConfig(k).catch((err) => this._errorHandler.handleError(err));
141
140
  });
142
141
  }
143
142
  onResizeMouseDown(event, dir) {
@@ -177,7 +176,7 @@ export class SdModal {
177
176
  if (this._activatedModal !== null && !this._activatedModal.canDeactivateFn()) {
178
177
  return;
179
178
  }
180
- void this._saveConfig();
179
+ void this._saveConfig().catch((err) => this._errorHandler.handleError(err));
181
180
  this.closeRequest.emit();
182
181
  }
183
182
  _bringToFront() {
@@ -239,7 +238,7 @@ export class SdModal {
239
238
  static ɵfac = function SdModal_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdModal)(); };
240
239
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdModal, selectors: [["sd-modal"]], hostVars: 4, hostBindings: function SdModal_HostBindings(rf, ctx) { if (rf & 2) {
241
240
  i0.ɵɵattribute("data-sd-open", ctx.open() || undefined)("data-sd-float", ctx.float() || undefined)("data-sd-fill", ctx.fill() || undefined)("data-sd-position", ctx.position() || undefined);
242
- } }, inputs: { open: [1, "open"], key: [1, "key"], title: [1, "title"], hideHeader: [1, "hideHeader"], hideCloseButton: [1, "hideCloseButton"], useCloseByBackdrop: [1, "useCloseByBackdrop"], useCloseByEscapeKey: [1, "useCloseByEscapeKey"], float: [1, "float"], fill: [1, "fill"], resizable: [1, "resizable"], movable: [1, "movable"], position: [1, "position"], minHeightPx: [1, "minHeightPx"], minWidthPx: [1, "minWidthPx"], heightPx: [1, "heightPx"], widthPx: [1, "widthPx"], headerStyle: [1, "headerStyle"], noFirstControlFocusing: [1, "noFirstControlFocusing"], actionTplRef: [1, "actionTplRef"] }, outputs: { open: "openChange", closeRequest: "closeRequest" }, ngContentSelectors: _c0, decls: 6, vars: 2, consts: [[1, "_backdrop", 3, "mousedown"], ["tabindex", "-1", 1, "_dialog", 3, "keydown", "focus"], [1, "_header"], [1, "_content"], [1, "_header", 3, "mousedown"], [1, "_title"], [1, "_close-btn"], [4, "ngTemplateOutlet"], [1, "_close-btn", 3, "click"], [3, "svg"], ["data-resize-dir", "top", 1, "_resize-handle", "_resize-top", 3, "mousedown"], ["data-resize-dir", "bottom", 1, "_resize-handle", "_resize-bottom", 3, "mousedown"], ["data-resize-dir", "left", 1, "_resize-handle", "_resize-left", 3, "mousedown"], ["data-resize-dir", "right", 1, "_resize-handle", "_resize-right", 3, "mousedown"], ["data-resize-dir", "top-left", 1, "_resize-handle", "_resize-top-left", 3, "mousedown"], ["data-resize-dir", "top-right", 1, "_resize-handle", "_resize-top-right", 3, "mousedown"], ["data-resize-dir", "bottom-left", 1, "_resize-handle", "_resize-bottom-left", 3, "mousedown"], ["data-resize-dir", "bottom-right", 1, "_resize-handle", "_resize-bottom-right", 3, "mousedown"]], template: function SdModal_Template(rf, ctx) { if (rf & 1) {
241
+ } }, inputs: { open: [1, "open"], key: [1, "key"], title: [1, "title"], hideHeader: [1, "hideHeader"], hideCloseButton: [1, "hideCloseButton"], useCloseByBackdrop: [1, "useCloseByBackdrop"], useCloseByEscapeKey: [1, "useCloseByEscapeKey"], float: [1, "float"], fill: [1, "fill"], resizable: [1, "resizable"], movable: [1, "movable"], position: [1, "position"], minHeightPx: [1, "minHeightPx"], minWidthPx: [1, "minWidthPx"], heightPx: [1, "heightPx"], widthPx: [1, "widthPx"], actionTplRef: [1, "actionTplRef"] }, outputs: { open: "openChange", closeRequest: "closeRequest" }, ngContentSelectors: _c0, decls: 6, vars: 2, consts: [[1, "_backdrop", 3, "mousedown"], ["tabindex", "-1", 1, "_dialog", 3, "keydown", "focus"], [1, "_header"], [1, "_content"], [1, "_header", 3, "mousedown"], [1, "_title"], [1, "_close-btn"], [4, "ngTemplateOutlet"], [1, "_close-btn", 3, "click"], [3, "svg"], ["data-resize-dir", "top", 1, "_resize-handle", "_resize-top", 3, "mousedown"], ["data-resize-dir", "bottom", 1, "_resize-handle", "_resize-bottom", 3, "mousedown"], ["data-resize-dir", "left", 1, "_resize-handle", "_resize-left", 3, "mousedown"], ["data-resize-dir", "right", 1, "_resize-handle", "_resize-right", 3, "mousedown"], ["data-resize-dir", "top-left", 1, "_resize-handle", "_resize-top-left", 3, "mousedown"], ["data-resize-dir", "top-right", 1, "_resize-handle", "_resize-top-right", 3, "mousedown"], ["data-resize-dir", "bottom-left", 1, "_resize-handle", "_resize-bottom-left", 3, "mousedown"], ["data-resize-dir", "bottom-right", 1, "_resize-handle", "_resize-bottom-right", 3, "mousedown"]], template: function SdModal_Template(rf, ctx) { if (rf & 1) {
243
242
  i0.ɵɵprojectionDef();
244
243
  i0.ɵɵelementStart(0, "div", 0);
245
244
  i0.ɵɵlistener("mousedown", function SdModal_Template_div_mousedown_0_listener() { return ctx.onBackdropClick(); });
@@ -295,5 +294,5 @@ export class SdModal {
295
294
  }
296
295
  </div>
297
296
  `, 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 display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--gap-sm) var(--gap-default);\n border: none;\n background: transparent;\n cursor: pointer;\n font-size: inherit;\n color: inherit;\n}\nsd-modal > ._dialog > ._header > ._close-btn:hover {\n background: var(--trans-lightest);\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}"] }]
298
- }], () => [], { 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 }] }], 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 }] }], headerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerStyle", required: false }] }], noFirstControlFocusing: [{ type: i0.Input, args: [{ isSignal: true, alias: "noFirstControlFocusing", required: false }] }], actionTplRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTplRef", required: false }] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }] }); })();
299
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdModal, { className: "SdModal", filePath: "packages/angular/src/core/modal/sd-modal.ts", lineNumber: 285, forbidOrphanRendering: true }); })();
297
+ }], () => [], { 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 }] }], 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"] }] }); })();
298
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdModal, { className: "SdModal", filePath: "packages/angular/src/core/modal/sd-modal.ts", lineNumber: 286, forbidOrphanRendering: true }); })();
@@ -41,7 +41,6 @@ export interface SdModalOptions {
41
41
  minWidthPx?: number;
42
42
  heightPx?: number;
43
43
  widthPx?: number;
44
- headerStyle?: string;
45
44
  noFirstControlFocusing?: boolean;
46
45
  }
47
46
  /**
@@ -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,wBAAwB,CAAC;;AAEhC;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,KAAK,kBAAkB,GAAG,aAAa,GAAG,OAAO,GAAG,cAAc,GAAG,sBAAsB,CAAC;AAC5F,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,SAAS,MAAM,CAAA;CAAE,GACrF,CAAC,GACD,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd,MAAM,EAAE,YAAY,CAClB,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,kBAAkB,GAAG,CAAC,CAAC,EACtD,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,kBAAkB,GAAG,CAA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AU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;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;IA0JzD,OAAO,CAAC,aAAa;yCApKV,eAAe;6CAAf,eAAe;CA+K3B"}
@@ -50,7 +50,7 @@ export class SdModalProvider {
50
50
  modalRef.setInput("title", modal.title);
51
51
  if (options !== undefined) {
52
52
  for (const [key, value] of Object.entries(options)) {
53
- if (value !== undefined) {
53
+ if (value !== undefined && key !== "noFirstControlFocusing") {
54
54
  modalRef.setInput(key, value);
55
55
  }
56
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-navigate-window.provider.d.ts","sourceRoot":"","sources":["../../../src/core/routing/sd-navigate-window.provider.ts"],"names":[],"mappings":";AAEA,qBACa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqB;IACpD,OAAO,CAAC,uBAAuB,CAAS;IAExC,IAAI,QAAQ,IAAI,OAAO,CAKtB;IAED,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;yCAXrE,wBAAwB;6CAAxB,wBAAwB;CAuCpC"}
1
+ {"version":3,"file":"sd-navigate-window.provider.d.ts","sourceRoot":"","sources":["../../../src/core/routing/sd-navigate-window.provider.ts"],"names":[],"mappings":";AAEA,qBACa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqB;IACpD,OAAO,CAAC,uBAAuB,CAAS;IAExC,IAAI,QAAQ,IAAI,OAAO,CAKtB;IAED,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;yCAXrE,wBAAwB;6CAAxB,wBAAwB;CAyCpC"}
@@ -27,7 +27,9 @@ export class SdNavigateWindowProvider {
27
27
  }
28
28
  }
29
29
  else {
30
- window.open(`${location.pathname}#${navigate};${new URLSearchParams(params).toString()}`, "_blank");
30
+ const paramStr = params !== undefined ? new URLSearchParams(params).toString() : "";
31
+ const suffix = paramStr !== "" ? `;${paramStr}` : "";
32
+ window.open(`${location.pathname}#${navigate}${suffix}`, "_blank");
31
33
  }
32
34
  }
33
35
  static ɵfac = function SdNavigateWindowProvider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdNavigateWindowProvider)(); };
@@ -1 +1 @@
1
- {"version":3,"file":"setupModelHook.d.ts","sourceRoot":"","sources":["../../src/core/setupModelHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvF,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAC3D,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GACrD,IAAI,CA4BN"}
1
+ {"version":3,"file":"setupModelHook.d.ts","sourceRoot":"","sources":["../../src/core/setupModelHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvF,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAC3D,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GACrD,IAAI,CAgDN"}
@@ -20,6 +20,23 @@ export function setupModelHook(model, canFn) {
20
20
  });
21
21
  };
22
22
  model.update = (fn) => {
23
- model.set(fn(model()));
23
+ const value = fn(model());
24
+ const canSet = canFn()(value);
25
+ if (canSet === false) {
26
+ return;
27
+ }
28
+ if (canSet === true) {
29
+ orgSet(value);
30
+ return;
31
+ }
32
+ void canSet
33
+ .then((allowed) => {
34
+ if (allowed !== false) {
35
+ orgSet(fn(model()));
36
+ }
37
+ })
38
+ .catch((err) => {
39
+ errorHandler.handleError(err);
40
+ });
24
41
  };
25
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-shared-data.provider.d.ts","sourceRoot":"","sources":["../../../src/core/shared-data/sd-shared-data.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,MAAM,EAAE,KAAK,cAAc,EA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,OAAO,CAAC,IAAI,CAAC;IAI3B,OAAO,CAAC,cAAc;YAuCR,QAAQ;yCAzHF,oBAAoB;6CAApB,oBAAoB;CAkKzC"}
@@ -13,12 +13,13 @@ export class SdSharedDataProvider {
13
13
  register(name, info) {
14
14
  const existing = this._entries.get(name);
15
15
  if (existing != null) {
16
- // 기존 리스너 키 초기화
16
+ // 기존 리스너 키 초기화 + generation 증가로 이전 이벤트 무시
17
17
  if (existing.listenerKey != null) {
18
18
  const client = this._clientFactory.get(existing.info.serviceKey);
19
19
  void client.removeListener(existing.listenerKey);
20
20
  existing.listenerKey = undefined;
21
21
  }
22
+ existing.generation++;
22
23
  existing.info = info;
23
24
  existing.needsReload = true;
24
25
  }
@@ -37,6 +38,7 @@ export class SdSharedDataProvider {
37
38
  info,
38
39
  itemsSignal,
39
40
  handle,
41
+ generation: 0,
40
42
  needsReload: true,
41
43
  isLoading: false,
42
44
  });
@@ -67,18 +69,22 @@ export class SdSharedDataProvider {
67
69
  }
68
70
  _loadAndListen(name, entry) {
69
71
  entry.isLoading = true;
72
+ const capturedGeneration = entry.generation;
70
73
  this.loadingCount.update((v) => v + 1);
71
74
  // 비동기 로드
72
75
  void entry.info
73
76
  .getter()
74
77
  .then(async (data) => {
78
+ // register 재호출로 generation이 변경되었으면 결과를 무시
79
+ if (entry.generation !== capturedGeneration)
80
+ return;
75
81
  entry.itemsSignal.set(data);
76
82
  // 이벤트 리스너 등록
77
83
  if (entry.listenerKey == null) {
78
84
  const client = this._clientFactory.get(entry.info.serviceKey);
79
85
  const event = client.getEvent("SdSharedDataChange");
80
86
  entry.listenerKey = await event.addListener({ name, filter: entry.info.filter }, async (changeKeys) => {
81
- await this._onEvent(name, entry, changeKeys);
87
+ await this._onEvent(name, entry, changeKeys, capturedGeneration);
82
88
  });
83
89
  }
84
90
  })
@@ -94,7 +100,10 @@ export class SdSharedDataProvider {
94
100
  }
95
101
  });
96
102
  }
97
- async _onEvent(name, entry, changeKeys) {
103
+ async _onEvent(name, entry, changeKeys, generation) {
104
+ // register 재호출로 generation이 변경되었으면 이벤트 무시
105
+ if (entry.generation !== generation)
106
+ return;
98
107
  this.loadingCount.update((v) => v + 1);
99
108
  try {
100
109
  if (changeKeys == null) {
@@ -24,6 +24,7 @@ export declare abstract class SdDataDetailBase<T extends object, R = boolean> im
24
24
  submit?(data: T): Promise<R | undefined> | R | undefined;
25
25
  private readonly _sdToast;
26
26
  private readonly _sdSharedData;
27
+ private readonly _errorHandler;
27
28
  viewType: Signal<import("../..").SdViewType>;
28
29
  busyCount: import("@angular/core").WritableSignal<number>;
29
30
  busyMessage: import("@angular/core").WritableSignal<string | undefined>;
@@ -42,7 +43,6 @@ export declare abstract class SdDataDetailBase<T extends object, R = boolean> im
42
43
  permCheck?: boolean;
43
44
  hideNoChangeMessage?: boolean;
44
45
  }): Promise<void>;
45
- private _getOrmDataEditToastErrorMessage;
46
46
  static ɵfac: i0.ɵɵFactoryDeclaration<SdDataDetailBase<any, any>, never>;
47
47
  static ɵdir: i0.ɵɵDirectiveDeclaration<SdDataDetailBase<any, any>, never, never, {}, { "close": "close"; }, never, never, true, never>;
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-data-detail.base.d.ts","sourceRoot":"","sources":["../../../src/data/data-detail/sd-data-detail.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACX,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAO,MAAM,uBAAuB,CAAC;AAMtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;;AAG5E,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,8BACsB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OA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,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgC;IAC9D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;IAEtD,QAAQ,qCAAoC;IAE5C,SAAS,iDAAa;IACtB,WAAW,6DAAyC;IACpD,WAAW,kDAAiB;IAC5B,KAAK,8CAAe;IACpB,YAAY,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,4CAAsB;IAE1B,QAAQ,2EAAuD;IAE/D,OAAO,CAAC,aAAa,CAAC,CAAI;;IAoC1B,kBAAkB;IAQZ,SAAS;IAYT,OAAO;IASP,cAAc,CAAC,GAAG,EAAE,OAAO;IAqB3B,QAAQ,CAAC,GAAG,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE;yCA3HvD,gBAAgB;2CAAhB,gBAAgB;CA8JrC"}
@@ -1,4 +1,4 @@
1
- import { Directive, effect, inject, output, signal, TemplateRef, } from "@angular/core";
1
+ import { Directive, effect, ErrorHandler, inject, output, signal, TemplateRef, } from "@angular/core";
2
2
  import { DateTime, obj } from "@simplysm/core-common";
3
3
  import { TXT_CHANGE_IGNORE_CONFIRM } from "../../core/commons";
4
4
  import { SdSharedDataProvider } from "../../core/shared-data/sd-shared-data.provider";
@@ -7,12 +7,14 @@ import { injectViewTypeSignal } from "../../core/routing/injectViewTypeSignal";
7
7
  import { withBusy } from "../../core/withBusy";
8
8
  import {} from "../../core/modal/sd-modal.provider";
9
9
  import { SdToastProvider } from "../../core/toast/sd-toast.provider";
10
+ import { getOrmDataEditToastErrorMessage } from "../getOrmDataEditToastErrorMessage";
10
11
  import * as i0 from "@angular/core";
11
12
  export class SdDataDetailBase {
12
13
  canDelete;
13
14
  //-- implement
14
15
  _sdToast = inject(SdToastProvider);
15
16
  _sdSharedData = inject(SdSharedDataProvider);
17
+ _errorHandler = inject(ErrorHandler);
16
18
  viewType = injectViewTypeSignal(() => this);
17
19
  busyCount = signal(0, ...(ngDevMode ? [{ debugName: "busyCount" }] : /* istanbul ignore next */ []));
18
20
  busyMessage = signal(undefined, ...(ngDevMode ? [{ debugName: "busyMessage" }] : /* istanbul ignore next */ []));
@@ -30,17 +32,22 @@ export class SdDataDetailBase {
30
32
  cancelled = true;
31
33
  });
32
34
  queueMicrotask(async () => {
33
- if (cancelled)
34
- return;
35
- if (!this.canUse()) {
35
+ try {
36
+ if (cancelled)
37
+ return;
38
+ if (!this.canUse()) {
39
+ this.initialized.set(true);
40
+ return;
41
+ }
42
+ await withBusy(this.busyCount, () => this._sdToast.try(async () => {
43
+ await this._sdSharedData.wait();
44
+ await this.refresh();
45
+ }));
36
46
  this.initialized.set(true);
37
- return;
38
47
  }
39
- await withBusy(this.busyCount, () => this._sdToast.try(async () => {
40
- await this._sdSharedData.wait();
41
- await this.refresh();
42
- }));
43
- this.initialized.set(true);
48
+ catch (err) {
49
+ this._errorHandler.handleError(err);
50
+ }
44
51
  });
45
52
  });
46
53
  setupCanDeactivate(() => this.viewType() === "modal" || this.checkIgnoreChanges());
@@ -84,7 +91,7 @@ export class SdDataDetailBase {
84
91
  return;
85
92
  this._sdToast.success(`${del ? "삭제" : "복구"}되었습니다.`);
86
93
  this.close.emit(result);
87
- }, (err) => this._getOrmDataEditToastErrorMessage(err)));
94
+ }, (err) => getOrmDataEditToastErrorMessage(err)));
88
95
  }
89
96
  async doSubmit(opt) {
90
97
  if (this.busyCount() > 0)
@@ -110,15 +117,7 @@ export class SdDataDetailBase {
110
117
  this._sdToast.success("저장되었습니다.");
111
118
  this.close.emit(result);
112
119
  await this.refresh();
113
- }, (err) => this._getOrmDataEditToastErrorMessage(err)));
114
- }
115
- _getOrmDataEditToastErrorMessage(err) {
116
- const message = err instanceof Error ? err.message : String(err);
117
- if (message.includes("a parent row: a foreign key constraint") ||
118
- message.includes("conflicted with the REFERENCE")) {
119
- return "경고! 연결된 작업에 의한 처리 거부. 후속작업 확인 요망";
120
- }
121
- return message;
120
+ }, (err) => getOrmDataEditToastErrorMessage(err)));
122
121
  }
123
122
  static ɵfac = function SdDataDetailBase_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdDataDetailBase)(); };
124
123
  static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SdDataDetailBase, outputs: { close: "close" } });