@simplysm/angular 14.0.21 → 14.0.22

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useDataSheetFilterManager.d.ts","sourceRoot":"","sources":["../../../src/features/data-view/useDataSheetFilterManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAkB,MAAM,eAAe,CAAC;AAGjF,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE;IACtF,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC7B,kBAAkB,EAAE,MAAM,OAAO,CAAC;CACnC;;;0BAU4B,IAAI;EAUhC"}
1
+ {"version":3,"file":"useDataSheetFilterManager.d.ts","sourceRoot":"","sources":["../../../src/features/data-view/useDataSheetFilterManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAgB,MAAM,eAAe,CAAC;AAG/E,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE;IACtF,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC7B,kBAAkB,EAAE,MAAM,OAAO,CAAC;CACnC;;;0BAU4B,IAAI;EAUhC"}
@@ -1,13 +1,10 @@
1
- import { effect, signal } from "@angular/core";
1
+ import { linkedSignal } from "@angular/core";
2
2
  import { obj } from "@simplysm/core-common";
3
3
  export function useDataSheetFilterManager(options) {
4
- const filter = signal({}, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
5
- const lastFilter = signal({}, ...(ngDevMode ? [{ debugName: "lastFilter" }] : /* istanbul ignore next */ []));
6
- effect(() => {
7
- const f = options.bindFilter();
8
- filter.set(f);
9
- lastFilter.set(obj.clone(f));
10
- });
4
+ const filter = linkedSignal({ ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), source: options.bindFilter,
5
+ computation: (f) => f });
6
+ const lastFilter = linkedSignal({ ...(ngDevMode ? { debugName: "lastFilter" } : /* istanbul ignore next */ {}), source: options.bindFilter,
7
+ computation: (f) => obj.clone(f) });
11
8
  function doFilterSubmit() {
12
9
  if (options.busyCount() > 0)
13
10
  return;
@@ -20,8 +20,7 @@ export declare class SdSheetConfigModal implements ISdModal<ISdSheetConfig | und
20
20
  tablerArrowDown: string;
21
21
  };
22
22
  private readonly _initialItems;
23
- private readonly _editItems;
24
- _items: import("@angular/core").Signal<IConfigItem[]>;
23
+ _items: import("@angular/core").WritableSignal<IConfigItem[]>;
25
24
  onFixedToggle(idx: number): void;
26
25
  onHiddenToggle(idx: number): void;
27
26
  onWidthChange(idx: number, event: Event): void;
@@ -1 +1 @@
1
- {"version":3,"file":"sd-sheet-config.modal.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/sd-sheet-config.modal.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;;AAM1E,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAoHa,kBAAmB,YAAW,QAAQ,CAAC,cAAc,GAAG,SAAS,CAAC;IAC7E,WAAW,kDAAgB;IAC3B,KAAK,uEAAwC;IAE7C,QAAQ,yEAAuD;IAC/D,MAAM,kEAAgD;IAEtD,MAAM;;;MAAsC;IAE5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAiB3B;IAEH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgD;IAE3E,MAAM,gDAEH;IAEH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMhC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMjC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAO9C,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAU/B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAUjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO3B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO7B,IAAI,IAAI,IAAI;IAeZ,QAAQ,IAAI,IAAI;IAIhB,OAAO,IAAI,IAAI;yCA1GJ,kBAAkB;2CAAlB,kBAAkB;CA6G9B"}
1
+ {"version":3,"file":"sd-sheet-config.modal.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/sd-sheet-config.modal.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;;AAM1E,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAmHa,kBAAmB,YAAW,QAAQ,CAAC,cAAc,GAAG,SAAS,CAAC;IAC7E,WAAW,kDAAgB;IAC3B,KAAK,uEAAwC;IAE7C,QAAQ,yEAAuD;IAC/D,MAAM,kEAAgD;IAEtD,MAAM;;;MAAsC;IAE5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAiB3B;IAEH,MAAM,wDAA2D;IAEjE,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMhC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMjC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAO9C,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAU/B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAUjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO3B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO7B,IAAI,IAAI,IAAI;IAeZ,QAAQ,IAAI,IAAI;IAIhB,OAAO,IAAI,IAAI;yCAtGJ,kBAAkB;2CAAlB,kBAAkB;CAyG9B"}
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, Component, computed, input, output, signal, ViewEncapsulation, } from "@angular/core";
1
+ import { ChangeDetectionStrategy, Component, computed, input, linkedSignal, output, signal, ViewEncapsulation, } from "@angular/core";
2
2
  import { SdButtonControl } from "../../form/button/sd-button.control";
3
3
  import { SdCheckboxControl } from "../../form/checkbox/sd-checkbox.control";
4
4
  import { NgIcon } from "@ng-icons/core";
@@ -72,25 +72,22 @@ export class SdSheetConfigModal {
72
72
  })
73
73
  .sort((a, b) => a.ordering - b.ordering);
74
74
  }, ...(ngDevMode ? [{ debugName: "_initialItems" }] : /* istanbul ignore next */ []));
75
- _editItems = signal(undefined, ...(ngDevMode ? [{ debugName: "_editItems" }] : /* istanbul ignore next */ []));
76
- _items = computed(() => {
77
- return this._editItems() ?? this._initialItems();
78
- }, ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
75
+ _items = linkedSignal(() => this._initialItems(), ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
79
76
  onFixedToggle(idx) {
80
77
  const items = [...this._items()];
81
78
  items[idx] = { ...items[idx], fixed: !items[idx].fixed };
82
- this._editItems.set(items);
79
+ this._items.set(items);
83
80
  }
84
81
  onHiddenToggle(idx) {
85
82
  const items = [...this._items()];
86
83
  items[idx] = { ...items[idx], hidden: !items[idx].hidden };
87
- this._editItems.set(items);
84
+ this._items.set(items);
88
85
  }
89
86
  onWidthChange(idx, event) {
90
87
  const inputEl = event.target;
91
88
  const items = [...this._items()];
92
89
  items[idx] = { ...items[idx], width: inputEl.value };
93
- this._editItems.set(items);
90
+ this._items.set(items);
94
91
  }
95
92
  canMoveUp(idx) {
96
93
  if (idx <= 0)
@@ -119,14 +116,14 @@ export class SdSheetConfigModal {
119
116
  return;
120
117
  const items = [...this._items()];
121
118
  [items[idx - 1], items[idx]] = [items[idx], items[idx - 1]];
122
- this._editItems.set(items);
119
+ this._items.set(items);
123
120
  }
124
121
  onMoveDown(idx) {
125
122
  if (!this.canMoveDown(idx))
126
123
  return;
127
124
  const items = [...this._items()];
128
125
  [items[idx], items[idx + 1]] = [items[idx + 1], items[idx]];
129
- this._editItems.set(items);
126
+ this._items.set(items);
130
127
  }
131
128
  onOk() {
132
129
  const items = this._items();
@@ -189,7 +186,7 @@ export class SdSheetConfigModal {
189
186
  }
190
187
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdSheetConfigModal, [{
191
188
  type: Component,
192
- args: [{ selector: "sd-sheet-config-modal", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [SdButtonControl, SdCheckboxControl, NgIcon], template: `
189
+ args: [{ selector: "sd-sheet-config-modal", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SdButtonControl, SdCheckboxControl, NgIcon], template: `
193
190
  <div class="_sd-sheet-config-modal">
194
191
  <table class="_config-table">
195
192
  <thead>
@@ -29,7 +29,7 @@ export declare class SdSelectControl<M extends "single" | "multi", T> {
29
29
  _beforeTpl: import("@angular/core").Signal<TemplateRef<void> | undefined>;
30
30
  _itemOfTpl: import("@angular/core").Signal<TemplateRef<any> | undefined>;
31
31
  _selectedItemContentHTML: import("@angular/core").WritableSignal<string | undefined>;
32
- _flatItems: import("@angular/core").WritableSignal<{
32
+ _flatItems: import("@angular/core").Signal<{
33
33
  data: T;
34
34
  index: number;
35
35
  depth: number;
@@ -1 +1 @@
1
- {"version":3,"file":"sd-select.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/select/sd-select.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,WAAW,EAIZ,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;AAU/D,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,qBAmJa,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,OAAO,EAAE,CAAC;IAC1D,UAAU,yCAAwB;IAClC,KAAK,4EAAqC;IAC1C,WAAW,0DAAmB;IAC9B,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,QAAQ,qEAAiD;IAEzD,aAAa,qEAAiD;IAC9D,8BAA8B,8DAAuB;IAErD,KAAK,uDAAgB;IACrB,aAAa,8CAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,eAAI;IAEtD,YAAY,0DAAmB;IAC/B,YAAY,0DAAmB;IAE/B,YAAY,kDAAiB;IAE7B,SAAS,CAAC,QAAQ,CAAC,eAAe,iUAAmB;IAErD,aAAa,sEAAwC;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyC;IAC1E,OAAO,CAAC,QAAQ,CAAC,cAAc,CAG7B;IAEF,UAAU,gEAAgD;IAC1D,UAAU,gEAAgD;IAC1D,UAAU,+DAAkE;IAE5E,wBAAwB,6DAAyC;IAEjE,UAAU;cAAkB,CAAC;eAAS,MAAM;eAAS,MAAM;SAAU;;IA2JrE,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAO9B,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAI9B,OAAO,CAAC,YAAY;IAepB,WAAW,IAAI,IAAI;IAQnB,aAAa,IAAI,IAAI;IAIrB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;yCAzOT,eAAe;2CAAf,eAAe;CA6O3B"}
1
+ {"version":3,"file":"sd-select.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/select/sd-select.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,WAAW,EAIZ,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;AAU/D,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,qBAmJa,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,OAAO,EAAE,CAAC;IAC1D,UAAU,yCAAwB;IAClC,KAAK,4EAAqC;IAC1C,WAAW,0DAAmB;IAC9B,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,QAAQ,qEAAiD;IAEzD,aAAa,qEAAiD;IAC9D,8BAA8B,8DAAuB;IAErD,KAAK,uDAAgB;IACrB,aAAa,8CAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,eAAI;IAEtD,YAAY,0DAAmB;IAC/B,YAAY,0DAAmB;IAE/B,YAAY,kDAAiB;IAE7B,SAAS,CAAC,QAAQ,CAAC,eAAe,iUAAmB;IAErD,aAAa,sEAAwC;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyC;IAC1E,OAAO,CAAC,QAAQ,CAAC,cAAc,CAG7B;IAEF,UAAU,gEAAgD;IAC1D,UAAU,gEAAgD;IAC1D,UAAU,+DAAkE;IAE5E,wBAAwB,6DAAyC;IAEjE,UAAU;cAIY,CAAC;eAAS,MAAM;eAAS,MAAM;SAelD;;IAkIH,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAO9B,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAI9B,OAAO,CAAC,YAAY;IAepB,WAAW,IAAI,IAAI;IAQnB,aAAa,IAAI,IAAI;IAIrB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;yCAnOT,eAAe;2CAAf,eAAe;CAuO3B"}
@@ -1,4 +1,4 @@
1
- import { booleanAttribute, ChangeDetectionStrategy, Component, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, untracked, viewChild, ViewEncapsulation, } from "@angular/core";
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, untracked, viewChild, ViewEncapsulation, } from "@angular/core";
2
2
  import { NgTemplateOutlet } from "@angular/common";
3
3
  import { SdDropdownControl } from "../../overlay/dropdown/sd-dropdown.control";
4
4
  import { SdDropdownPopupControl } from "../../overlay/dropdown/sd-dropdown-popup.control";
@@ -119,7 +119,27 @@ export class SdSelectControl {
119
119
  _beforeTpl = contentChild("beforeTpl", ...(ngDevMode ? [{ debugName: "_beforeTpl" }] : /* istanbul ignore next */ []));
120
120
  _itemOfTpl = contentChild(SdItemOfTemplateDirective, { ...(ngDevMode ? { debugName: "_itemOfTpl" } : /* istanbul ignore next */ {}), read: TemplateRef });
121
121
  _selectedItemContentHTML = signal(undefined, ...(ngDevMode ? [{ debugName: "_selectedItemContentHTML" }] : /* istanbul ignore next */ []));
122
- _flatItems = signal([], ...(ngDevMode ? [{ debugName: "_flatItems" }] : /* istanbul ignore next */ []));
122
+ _flatItems = computed(() => {
123
+ const items = this.items();
124
+ if (items == null)
125
+ return [];
126
+ const getChildren = this.getChildrenFn();
127
+ const flat = [];
128
+ let index = 0;
129
+ const walk = (list, depth) => {
130
+ for (const item of list) {
131
+ flat.push({ data: item, index: index++, depth });
132
+ if (getChildren !== undefined) {
133
+ const children = getChildren(item);
134
+ if (children !== undefined) {
135
+ walk(children, depth + 1);
136
+ }
137
+ }
138
+ }
139
+ };
140
+ walk(items, 0);
141
+ return flat;
142
+ }, ...(ngDevMode ? [{ debugName: "_flatItems" }] : /* istanbul ignore next */ []));
123
143
  constructor() {
124
144
  // Required validation
125
145
  setupInvalid(() => {
@@ -132,30 +152,6 @@ export class SdSelectControl {
132
152
  return "선택된 항목이 없습니다.";
133
153
  return "";
134
154
  });
135
- // Flatten items array (with hierarchy support)
136
- effect(() => {
137
- const items = this.items();
138
- if (items == null) {
139
- this._flatItems.set([]);
140
- return;
141
- }
142
- const getChildren = this.getChildrenFn();
143
- const flat = [];
144
- let index = 0;
145
- const walk = (list, depth) => {
146
- for (const item of list) {
147
- flat.push({ data: item, index: index++, depth });
148
- if (getChildren !== undefined) {
149
- const children = getChildren(item);
150
- if (children !== undefined) {
151
- walk(children, depth + 1);
152
- }
153
- }
154
- }
155
- };
156
- walk(items, 0);
157
- this._flatItems.set(flat);
158
- });
159
155
  // D3: contentClass/contentStyle via effect() on popup element
160
156
  // + D4: keyboard navigation via tabbable()
161
157
  effect((onCleanup) => {
@@ -431,4 +427,4 @@ export class SdSelectControl {
431
427
  "[attr.data-sd-disabled]": "disabled()",
432
428
  }, styles: ["sd-select {\n display: block;\n position: relative;\n}\nsd-select > sd-dropdown > ._sd-select-control {\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 display: flex;\n align-items: center;\n cursor: pointer;\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n background: var(--theme-secondary-lightest);\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-content {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n margin-left: var(--gap-sm);\n opacity: 0.3;\n}\nsd-select > sd-dropdown:focus-within > ._sd-select-control {\n border-color: var(--theme-secondary-default);\n}\nsd-select[data-sd-size=sm] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-xs) var(--gap-sm);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-default) var(--gap-lg);\n}\nsd-select[data-sd-inline=true] {\n display: inline-block;\n width: auto;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control {\n border: none;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control:focus-within {\n outline: 1px solid var(--theme-primary-default);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n background: var(--trans-lighter);\n cursor: default;\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n display: none;\n}\n\n._sd-select-all-bar {\n display: flex;\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--border-color-light);\n}"] }]
433
429
  }], () => [], { selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hideSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideSelectAll", required: false }] }], multiSelectionDisplayDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelectionDisplayDirection", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], _itemControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSelectItemControl), { isSignal: true }] }], _dropdownControl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { isSignal: true }] }], _dropdownElRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { ...{ read: ElementRef }, isSignal: true }] }], _headerTpl: [{ type: i0.ContentChild, args: ["headerTpl", { isSignal: true }] }], _beforeTpl: [{ type: i0.ContentChild, args: ["beforeTpl", { isSignal: true }] }], _itemOfTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdItemOfTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
434
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelectControl, { className: "SdSelectControl", filePath: "packages/angular/src/ui/form/select/sd-select.control.ts", lineNumber: 182, forbidOrphanRendering: true }); })();
430
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelectControl, { className: "SdSelectControl", filePath: "packages/angular/src/ui/form/select/sd-select.control.ts", lineNumber: 183, forbidOrphanRendering: true }); })();
@@ -1,12 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class SdGapControl {
3
- private readonly _elRef;
4
3
  height: import("@angular/core").InputSignal<"default" | "sm" | "lg" | "xxs" | "xs" | "xl" | "xxl" | undefined>;
5
4
  heightPx: import("@angular/core").InputSignal<number | undefined>;
6
5
  width: import("@angular/core").InputSignal<"default" | "sm" | "lg" | "xxs" | "xs" | "xl" | "xxl" | undefined>;
7
6
  widthPx: import("@angular/core").InputSignal<number | undefined>;
8
7
  widthEm: import("@angular/core").InputSignal<number | undefined>;
9
- constructor();
8
+ _displayStyle: import("@angular/core").Signal<"none" | "block" | "inline-block" | undefined>;
10
9
  static ɵfac: i0.ɵɵFactoryDeclaration<SdGapControl, never>;
11
10
  static ɵcmp: i0.ɵɵComponentDeclaration<SdGapControl, "sd-gap", never, { "height": { "alias": "height"; "required": false; "isSignal": true; }; "heightPx": { "alias": "heightPx"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "widthEm": { "alias": "widthEm"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sd-gap.control.d.ts","sourceRoot":"","sources":["../../../src/ui/layout/sd-gap.control.ts"],"names":[],"mappings":";AAEA,qBAkCa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAE1D,MAAM,yGAAkE;IACxE,QAAQ,0DAAmB;IAC3B,KAAK,yGAAkE;IACvE,OAAO,0DAAmB;IAC1B,OAAO,0DAAmB;;yCAPf,YAAY;2CAAZ,YAAY;CA0BxB"}
1
+ {"version":3,"file":"sd-gap.control.d.ts","sourceRoot":"","sources":["../../../src/ui/layout/sd-gap.control.ts"],"names":[],"mappings":";AAEA,qBAkCa,YAAY;IACvB,MAAM,yGAAkE;IACxE,QAAQ,0DAAmB;IAC3B,KAAK,yGAAkE;IACvE,OAAO,0DAAmB;IAC1B,OAAO,0DAAmB;IAE1B,aAAa,gFAcV;yCArBQ,YAAY;2CAAZ,YAAY;CAsBxB"}
@@ -1,44 +1,42 @@
1
- import { ChangeDetectionStrategy, Component, effect, ElementRef, inject, input, ViewEncapsulation } from "@angular/core";
1
+ import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
3
  export class SdGapControl {
4
- _elRef = inject((ElementRef));
5
4
  height = input(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
6
5
  heightPx = input(...(ngDevMode ? [undefined, { debugName: "heightPx" }] : /* istanbul ignore next */ []));
7
6
  width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
8
7
  widthPx = input(...(ngDevMode ? [undefined, { debugName: "widthPx" }] : /* istanbul ignore next */ []));
9
8
  widthEm = input(...(ngDevMode ? [undefined, { debugName: "widthEm" }] : /* istanbul ignore next */ []));
10
- constructor() {
11
- effect(() => {
12
- if (this.widthPx() === 0 || this.heightPx() === 0 || this.widthEm() === 0) {
13
- this._elRef.nativeElement.style.display = "none";
14
- }
15
- else if (this.width() !== undefined ||
16
- this.widthPx() !== undefined ||
17
- this.widthEm() !== undefined) {
18
- this._elRef.nativeElement.style.display = "inline-block";
19
- }
20
- else if (this.height() !== undefined || this.heightPx() !== undefined) {
21
- this._elRef.nativeElement.style.display = "block";
22
- }
23
- else {
24
- this._elRef.nativeElement.style.display = "";
25
- }
26
- });
27
- }
9
+ _displayStyle = computed(() => {
10
+ if (this.widthPx() === 0 || this.heightPx() === 0 || this.widthEm() === 0) {
11
+ return "none";
12
+ }
13
+ else if (this.width() !== undefined ||
14
+ this.widthPx() !== undefined ||
15
+ this.widthEm() !== undefined) {
16
+ return "inline-block";
17
+ }
18
+ else if (this.height() !== undefined || this.heightPx() !== undefined) {
19
+ return "block";
20
+ }
21
+ else {
22
+ return undefined;
23
+ }
24
+ }, ...(ngDevMode ? [{ debugName: "_displayStyle" }] : /* istanbul ignore next */ []));
28
25
  static ɵfac = function SdGapControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdGapControl)(); };
29
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdGapControl, selectors: [["sd-gap"]], hostVars: 8, hostBindings: function SdGapControl_HostBindings(rf, ctx) { if (rf & 2) {
26
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdGapControl, selectors: [["sd-gap"]], hostVars: 10, hostBindings: function SdGapControl_HostBindings(rf, ctx) { if (rf & 2) {
30
27
  i0.ɵɵattribute("data-sd-height", ctx.height())("data-sd-width", ctx.width());
31
- i0.ɵɵstyleProp("height", ctx.heightPx(), "px")("width", ctx.widthPx(), "px")("width", ctx.widthEm(), "em");
28
+ i0.ɵɵstyleProp("height", ctx.heightPx(), "px")("width", ctx.widthPx(), "px")("width", ctx.widthEm(), "em")("display", ctx._displayStyle());
32
29
  } }, inputs: { height: [1, "height"], heightPx: [1, "heightPx"], width: [1, "width"], widthPx: [1, "widthPx"], widthEm: [1, "widthEm"] }, decls: 0, vars: 0, template: function SdGapControl_Template(rf, ctx) { }, styles: ["sd-gap[data-sd-height=xxs] {\n height: var(--gap-xxs);\n}\nsd-gap[data-sd-width=xxs] {\n width: var(--gap-xxs);\n}\nsd-gap[data-sd-height=xs] {\n height: var(--gap-xs);\n}\nsd-gap[data-sd-width=xs] {\n width: var(--gap-xs);\n}\nsd-gap[data-sd-height=sm] {\n height: var(--gap-sm);\n}\nsd-gap[data-sd-width=sm] {\n width: var(--gap-sm);\n}\nsd-gap[data-sd-height=default] {\n height: var(--gap-default);\n}\nsd-gap[data-sd-width=default] {\n width: var(--gap-default);\n}\nsd-gap[data-sd-height=lg] {\n height: var(--gap-lg);\n}\nsd-gap[data-sd-width=lg] {\n width: var(--gap-lg);\n}\nsd-gap[data-sd-height=xl] {\n height: var(--gap-xl);\n}\nsd-gap[data-sd-width=xl] {\n width: var(--gap-xl);\n}\nsd-gap[data-sd-height=xxl] {\n height: var(--gap-xxl);\n}\nsd-gap[data-sd-width=xxl] {\n width: var(--gap-xxl);\n}\nsd-gap[data-sd-height=\"0\"] {\n height: var(--gap-0);\n}\nsd-gap[data-sd-width=\"0\"] {\n width: var(--gap-0);\n}\nsd-gap[data-sd-height=auto] {\n height: var(--gap-auto);\n}\nsd-gap[data-sd-width=auto] {\n width: var(--gap-auto);\n}"], encapsulation: 2, changeDetection: 0 });
33
30
  }
34
31
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdGapControl, [{
35
32
  type: Component,
36
- args: [{ selector: "sd-gap", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [], template: "", host: {
33
+ args: [{ selector: "sd-gap", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [], template: "", host: {
37
34
  "[attr.data-sd-height]": "height()",
38
35
  "[style.height.px]": "heightPx()",
39
36
  "[attr.data-sd-width]": "width()",
40
37
  "[style.width.px]": "widthPx()",
41
38
  "[style.width.em]": "widthEm()",
39
+ "[style.display]": "_displayStyle()",
42
40
  }, styles: ["sd-gap[data-sd-height=xxs] {\n height: var(--gap-xxs);\n}\nsd-gap[data-sd-width=xxs] {\n width: var(--gap-xxs);\n}\nsd-gap[data-sd-height=xs] {\n height: var(--gap-xs);\n}\nsd-gap[data-sd-width=xs] {\n width: var(--gap-xs);\n}\nsd-gap[data-sd-height=sm] {\n height: var(--gap-sm);\n}\nsd-gap[data-sd-width=sm] {\n width: var(--gap-sm);\n}\nsd-gap[data-sd-height=default] {\n height: var(--gap-default);\n}\nsd-gap[data-sd-width=default] {\n width: var(--gap-default);\n}\nsd-gap[data-sd-height=lg] {\n height: var(--gap-lg);\n}\nsd-gap[data-sd-width=lg] {\n width: var(--gap-lg);\n}\nsd-gap[data-sd-height=xl] {\n height: var(--gap-xl);\n}\nsd-gap[data-sd-width=xl] {\n width: var(--gap-xl);\n}\nsd-gap[data-sd-height=xxl] {\n height: var(--gap-xxl);\n}\nsd-gap[data-sd-width=xxl] {\n width: var(--gap-xxl);\n}\nsd-gap[data-sd-height=\"0\"] {\n height: var(--gap-0);\n}\nsd-gap[data-sd-width=\"0\"] {\n width: var(--gap-0);\n}\nsd-gap[data-sd-height=auto] {\n height: var(--gap-auto);\n}\nsd-gap[data-sd-width=auto] {\n width: var(--gap-auto);\n}"] }]
43
- }], () => [], { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], heightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightPx", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], widthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthPx", required: false }] }], widthEm: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthEm", required: false }] }] }); })();
41
+ }], null, { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], heightPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightPx", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], widthPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthPx", required: false }] }], widthEm: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthEm", required: false }] }] }); })();
44
42
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdGapControl, { className: "SdGapControl", filePath: "packages/angular/src/ui/layout/sd-gap.control.ts", lineNumber: 37, forbidOrphanRendering: true }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"sd-confirm-modal.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlay/modal/sd-confirm-modal.control.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;AAGpD;;;;GAIG;AACH,qBAoCa,qBAAsB,YAAW,QAAQ,CAAC,OAAO,CAAC;IAC7D,WAAW,kDAAgB;IAC3B,KAAK,gEAAiC;IAEtC,OAAO,8CAA4B;IAEnC,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;yCAVL,qBAAqB;2CAArB,qBAAqB;CAajC"}
1
+ {"version":3,"file":"sd-confirm-modal.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlay/modal/sd-confirm-modal.control.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;AAGpD;;;;GAIG;AACH,qBAkBa,qBAAsB,YAAW,QAAQ,CAAC,OAAO,CAAC;IAC7D,WAAW,kDAAgB;IAC3B,KAAK,gEAAiC;IAEtC,OAAO,8CAA4B;IAEnC,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;yCAVL,qBAAqB;2CAArB,qBAAqB;CAajC"}
@@ -17,35 +17,41 @@ export class SdConfirmModalControl {
17
17
  this.close.emit(undefined);
18
18
  }
19
19
  static ɵfac = function SdConfirmModalControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdConfirmModalControl)(); };
20
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdConfirmModalControl, selectors: [["sd-confirm-modal"]], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls: 8, vars: 2, consts: [[1, "_sd-confirm-modal"], [1, "_message"], [1, "_actions"], [3, "click", "theme"], [3, "click"]], template: function SdConfirmModalControl_Template(rf, ctx) { if (rf & 1) {
21
- i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
22
- i0.ɵɵtext(2);
20
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdConfirmModalControl, selectors: [["sd-confirm-modal"]], hostAttrs: [1, "p-default", 2, "display", "block"], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls: 6, vars: 2, consts: [[1, "mb-default", 3, "innerHTML"], [1, "flex-row", "main-align-end", "gap-sm"], [3, "click", "theme"], [3, "click"]], template: function SdConfirmModalControl_Template(rf, ctx) { if (rf & 1) {
21
+ i0.ɵɵelement(0, "p", 0);
22
+ i0.ɵɵelementStart(1, "div", 1)(2, "sd-button", 2);
23
+ i0.ɵɵlistener("click", function SdConfirmModalControl_Template_sd_button_click_2_listener() { return ctx.onConfirm(); });
24
+ i0.ɵɵtext(3, "\uD655\uC778");
23
25
  i0.ɵɵelementEnd();
24
- i0.ɵɵelementStart(3, "div", 2)(4, "sd-button", 3);
25
- i0.ɵɵlistener("click", function SdConfirmModalControl_Template_sd_button_click_4_listener() { return ctx.onConfirm(); });
26
- i0.ɵɵtext(5, "\uD655\uC778");
27
- i0.ɵɵelementEnd();
28
- i0.ɵɵelementStart(6, "sd-button", 4);
29
- i0.ɵɵlistener("click", function SdConfirmModalControl_Template_sd_button_click_6_listener() { return ctx.onCancel(); });
30
- i0.ɵɵtext(7, "\uCDE8\uC18C");
31
- i0.ɵɵelementEnd()()();
26
+ i0.ɵɵelementStart(4, "sd-button", 3);
27
+ i0.ɵɵlistener("click", function SdConfirmModalControl_Template_sd_button_click_4_listener() { return ctx.onCancel(); });
28
+ i0.ɵɵtext(5, "\uCDE8\uC18C");
29
+ i0.ɵɵelementEnd()();
32
30
  } if (rf & 2) {
33
- i0.ɵɵadvance(2);
34
- i0.ɵɵtextInterpolate(ctx.message());
31
+ i0.ɵɵproperty("innerHTML", ctx.message(), i0.ɵɵsanitizeHtml);
35
32
  i0.ɵɵadvance(2);
36
33
  i0.ɵɵproperty("theme", "primary");
37
- } }, dependencies: [SdButtonControl], styles: ["sd-confirm-modal {\n display: block;\n padding: var(--gap-default);\n}\nsd-confirm-modal > ._sd-confirm-modal > ._message {\n margin-bottom: var(--gap-default);\n}\nsd-confirm-modal > ._sd-confirm-modal > ._actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--gap-sm);\n}"], encapsulation: 2, changeDetection: 0 });
34
+ } }, dependencies: [SdButtonControl], encapsulation: 2, changeDetection: 0 });
38
35
  }
39
36
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdConfirmModalControl, [{
40
37
  type: Component,
41
- args: [{ selector: "sd-confirm-modal", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [SdButtonControl], template: `
42
- <div class="_sd-confirm-modal">
43
- <p class="_message">{{ message() }}</p>
44
- <div class="_actions">
45
- <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
46
- <sd-button (click)="onCancel()">취소</sd-button>
47
- </div>
38
+ args: [{
39
+ selector: "sd-confirm-modal",
40
+ changeDetection: ChangeDetectionStrategy.OnPush,
41
+ encapsulation: ViewEncapsulation.None,
42
+ standalone: true,
43
+ imports: [SdButtonControl],
44
+ host: {
45
+ style: "display: block",
46
+ class: "p-default",
47
+ },
48
+ template: `
49
+ <p class="mb-default" [innerHTML]="message()"></p>
50
+ <div class="flex-row main-align-end gap-sm">
51
+ <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
52
+ <sd-button (click)="onCancel()">취소</sd-button>
48
53
  </div>
49
- `, styles: ["sd-confirm-modal {\n display: block;\n padding: var(--gap-default);\n}\nsd-confirm-modal > ._sd-confirm-modal > ._message {\n margin-bottom: var(--gap-default);\n}\nsd-confirm-modal > ._sd-confirm-modal > ._actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--gap-sm);\n}"] }]
54
+ `,
55
+ }]
50
56
  }], null, { close: [{ type: i0.Output, args: ["close"] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] }); })();
51
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdConfirmModalControl, { className: "SdConfirmModalControl", filePath: "packages/angular/src/ui/overlay/modal/sd-confirm-modal.control.ts", lineNumber: 53, forbidOrphanRendering: true }); })();
57
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdConfirmModalControl, { className: "SdConfirmModalControl", filePath: "packages/angular/src/ui/overlay/modal/sd-confirm-modal.control.ts", lineNumber: 35, forbidOrphanRendering: true }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"sd-prompt-modal.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlay/modal/sd-prompt-modal.control.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;AAGpD;;;;GAIG;AACH,qBAoDa,oBAAqB,YAAW,QAAQ,CAAC,MAAM,CAAC;IAC3D,WAAW,kDAAgB;IAC3B,KAAK,+DAAgC;IAErC,OAAO,8CAA4B;IAEnC,WAAW,iDAAc;IAEzB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKjC,SAAS,IAAI,IAAI;IAOjB,QAAQ,IAAI,IAAI;yCApBL,oBAAoB;2CAApB,oBAAoB;CAuBhC"}
1
+ {"version":3,"file":"sd-prompt-modal.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlay/modal/sd-prompt-modal.control.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;AAIpD;;;;GAIG;AACH,qBAyBa,oBAAqB,YAAW,QAAQ,CAAC,MAAM,CAAC;IAC3D,WAAW,kDAAgB;IAC3B,KAAK,+DAAgC;IAErC,OAAO,8CAA4B;IAEnC,WAAW,iDAAc;IAEzB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKjC,SAAS,IAAI,IAAI;IAOjB,QAAQ,IAAI,IAAI;yCApBL,oBAAoB;2CAApB,oBAAoB;CAuBhC"}
@@ -1,5 +1,6 @@
1
1
  import { ChangeDetectionStrategy, Component, input, output, signal, ViewEncapsulation, } from "@angular/core";
2
2
  import { SdButtonControl } from "../../form/button/sd-button.control";
3
+ import { SdTextfieldControl } from "../../form/input/sd-textfield.control";
3
4
  import * as i0 from "@angular/core";
4
5
  /**
5
6
  * 범용 프롬프트 모달.
@@ -25,47 +26,53 @@ export class SdPromptModalControl {
25
26
  this.close.emit(undefined);
26
27
  }
27
28
  static ɵfac = function SdPromptModalControl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SdPromptModalControl)(); };
28
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdPromptModalControl, selectors: [["sd-prompt-modal"]], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls: 9, vars: 3, consts: [[1, "_sd-prompt-modal"], [1, "_message"], ["type", "text", 1, "_input", 3, "input", "keydown.enter", "value"], [1, "_actions"], [3, "click", "theme"], [3, "click"]], template: function SdPromptModalControl_Template(rf, ctx) { if (rf & 1) {
29
- i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
30
- i0.ɵɵtext(2);
29
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SdPromptModalControl, selectors: [["sd-prompt-modal"]], hostAttrs: [1, "p-default", 2, "display", "block"], inputs: { message: [1, "message"] }, outputs: { close: "close" }, decls: 7, vars: 4, consts: [[1, "mb-default", 3, "innerHTML"], [1, "mb-default", 3, "input", "keydown.enter", "type", "value"], [1, "flex-row", "main-align-end", "gap-sm"], [3, "click", "theme"], [3, "click"]], template: function SdPromptModalControl_Template(rf, ctx) { if (rf & 1) {
30
+ i0.ɵɵelement(0, "p", 0);
31
+ i0.ɵɵelementStart(1, "sd-textfield", 1);
32
+ i0.ɵɵlistener("input", function SdPromptModalControl_Template_sd_textfield_input_1_listener($event) { return ctx.onInputChange($event); })("keydown.enter", function SdPromptModalControl_Template_sd_textfield_keydown_enter_1_listener() { return ctx.onConfirm(); });
31
33
  i0.ɵɵelementEnd();
32
- i0.ɵɵelementStart(3, "input", 2);
33
- i0.ɵɵlistener("input", function SdPromptModalControl_Template_input_input_3_listener($event) { return ctx.onInputChange($event); })("keydown.enter", function SdPromptModalControl_Template_input_keydown_enter_3_listener() { return ctx.onConfirm(); });
34
+ i0.ɵɵelementStart(2, "div", 2)(3, "sd-button", 3);
35
+ i0.ɵɵlistener("click", function SdPromptModalControl_Template_sd_button_click_3_listener() { return ctx.onConfirm(); });
36
+ i0.ɵɵtext(4, "\uD655\uC778");
34
37
  i0.ɵɵelementEnd();
35
- i0.ɵɵelementStart(4, "div", 3)(5, "sd-button", 4);
36
- i0.ɵɵlistener("click", function SdPromptModalControl_Template_sd_button_click_5_listener() { return ctx.onConfirm(); });
37
- i0.ɵɵtext(6, "\uD655\uC778");
38
- i0.ɵɵelementEnd();
39
- i0.ɵɵelementStart(7, "sd-button", 5);
40
- i0.ɵɵlistener("click", function SdPromptModalControl_Template_sd_button_click_7_listener() { return ctx.onCancel(); });
41
- i0.ɵɵtext(8, "\uCDE8\uC18C");
42
- i0.ɵɵelementEnd()()();
38
+ i0.ɵɵelementStart(5, "sd-button", 4);
39
+ i0.ɵɵlistener("click", function SdPromptModalControl_Template_sd_button_click_5_listener() { return ctx.onCancel(); });
40
+ i0.ɵɵtext(6, "\uCDE8\uC18C");
41
+ i0.ɵɵelementEnd()();
43
42
  } if (rf & 2) {
44
- i0.ɵɵadvance(2);
45
- i0.ɵɵtextInterpolate(ctx.message());
43
+ i0.ɵɵproperty("innerHTML", ctx.message(), i0.ɵɵsanitizeHtml);
46
44
  i0.ɵɵadvance();
47
- i0.ɵɵproperty("value", ctx._inputValue());
45
+ i0.ɵɵproperty("type", "text")("value", ctx._inputValue());
48
46
  i0.ɵɵadvance(2);
49
47
  i0.ɵɵproperty("theme", "primary");
50
- } }, dependencies: [SdButtonControl], styles: ["sd-prompt-modal {\n display: block;\n padding: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._message {\n margin-bottom: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._input {\n display: block;\n width: 100%;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n margin-bottom: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--gap-sm);\n}"], encapsulation: 2, changeDetection: 0 });
48
+ } }, dependencies: [SdButtonControl, SdTextfieldControl], encapsulation: 2, changeDetection: 0 });
51
49
  }
52
50
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdPromptModalControl, [{
53
51
  type: Component,
54
- args: [{ selector: "sd-prompt-modal", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [SdButtonControl], template: `
55
- <div class="_sd-prompt-modal">
56
- <p class="_message">{{ message() }}</p>
57
- <input
58
- class="_input"
59
- type="text"
60
- [value]="_inputValue()"
61
- (input)="onInputChange($event)"
62
- (keydown.enter)="onConfirm()"
63
- />
64
- <div class="_actions">
65
- <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
66
- <sd-button (click)="onCancel()">취소</sd-button>
67
- </div>
52
+ args: [{
53
+ selector: "sd-prompt-modal",
54
+ changeDetection: ChangeDetectionStrategy.OnPush,
55
+ encapsulation: ViewEncapsulation.None,
56
+ standalone: true,
57
+ imports: [SdButtonControl, SdTextfieldControl],
58
+ host: {
59
+ style: "display: block",
60
+ class: "p-default",
61
+ },
62
+ template: `
63
+ <p class="mb-default" [innerHTML]="message()"></p>
64
+ <sd-textfield
65
+ [type]="'text'"
66
+ [value]="_inputValue()"
67
+ (input)="onInputChange($event)"
68
+ (keydown.enter)="onConfirm()"
69
+ class="mb-default"
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>
68
74
  </div>
69
- `, styles: ["sd-prompt-modal {\n display: block;\n padding: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._message {\n margin-bottom: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._input {\n display: block;\n width: 100%;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n margin-bottom: var(--gap-default);\n}\nsd-prompt-modal > ._sd-prompt-modal > ._actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--gap-sm);\n}"] }]
75
+ `,
76
+ }]
70
77
  }], null, { close: [{ type: i0.Output, args: ["close"] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] }); })();
71
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdPromptModalControl, { className: "SdPromptModalControl", filePath: "packages/angular/src/ui/overlay/modal/sd-prompt-modal.control.ts", lineNumber: 69, forbidOrphanRendering: true }); })();
78
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdPromptModalControl, { className: "SdPromptModalControl", filePath: "packages/angular/src/ui/overlay/modal/sd-prompt-modal.control.ts", lineNumber: 43, forbidOrphanRendering: true }); })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/angular",
3
- "version": "14.0.21",
3
+ "version": "14.0.22",
4
4
  "description": "심플리즘 패키지 - Angular",
5
5
  "author": "심플리즘",
6
6
  "license": "Apache-2.0",
@@ -50,10 +50,10 @@
50
50
  "jspdf": "^4.2.1",
51
51
  "rxjs": "^7.8.2",
52
52
  "tabbable": "^6.4.0",
53
- "@simplysm/core-browser": "14.0.21",
54
- "@simplysm/core-common": "14.0.21",
55
- "@simplysm/service-client": "14.0.21",
56
- "@simplysm/service-common": "14.0.21"
53
+ "@simplysm/core-browser": "14.0.22",
54
+ "@simplysm/service-common": "14.0.22",
55
+ "@simplysm/service-client": "14.0.22",
56
+ "@simplysm/core-common": "14.0.22"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@angular/compiler": "^21.2.7",
@@ -1,4 +1,4 @@
1
- import { type Signal, type WritableSignal, effect, signal } from "@angular/core";
1
+ import { type Signal, type WritableSignal, linkedSignal } from "@angular/core";
2
2
  import { obj } from "@simplysm/core-common";
3
3
 
4
4
  export function useDataSheetFilterManager<TFilter extends Record<string, any>>(options: {
@@ -8,13 +8,13 @@ export function useDataSheetFilterManager<TFilter extends Record<string, any>>(o
8
8
  page: WritableSignal<number>;
9
9
  checkIgnoreChanges: () => boolean;
10
10
  }) {
11
- const filter = signal<TFilter>({} as TFilter);
12
- const lastFilter = signal<TFilter>({} as TFilter);
13
-
14
- effect(() => {
15
- const f = options.bindFilter();
16
- filter.set(f);
17
- lastFilter.set(obj.clone(f));
11
+ const filter = linkedSignal<TFilter, TFilter>({
12
+ source: options.bindFilter,
13
+ computation: (f) => f,
14
+ });
15
+ const lastFilter = linkedSignal<TFilter, TFilter>({
16
+ source: options.bindFilter,
17
+ computation: (f) => obj.clone(f),
18
18
  });
19
19
 
20
20
  function doFilterSubmit(): void {
@@ -3,6 +3,7 @@ import {
3
3
  Component,
4
4
  computed,
5
5
  input,
6
+ linkedSignal,
6
7
  output,
7
8
  signal,
8
9
  ViewEncapsulation,
@@ -28,7 +29,6 @@ interface IConfigItem {
28
29
  selector: "sd-sheet-config-modal",
29
30
  changeDetection: ChangeDetectionStrategy.OnPush,
30
31
  encapsulation: ViewEncapsulation.None,
31
- standalone: true,
32
32
  imports: [SdButtonControl, SdCheckboxControl, NgIcon],
33
33
  template: `
34
34
  <div class="_sd-sheet-config-modal">
@@ -168,29 +168,25 @@ export class SdSheetConfigModal implements ISdModal<ISdSheetConfig | undefined>
168
168
  .sort((a, b) => a.ordering - b.ordering);
169
169
  });
170
170
 
171
- private readonly _editItems = signal<IConfigItem[] | undefined>(undefined);
172
-
173
- _items = computed((): IConfigItem[] => {
174
- return this._editItems() ?? this._initialItems();
175
- });
171
+ _items = linkedSignal<IConfigItem[]>(() => this._initialItems());
176
172
 
177
173
  onFixedToggle(idx: number): void {
178
174
  const items = [...this._items()];
179
175
  items[idx] = { ...items[idx], fixed: !items[idx].fixed };
180
- this._editItems.set(items);
176
+ this._items.set(items);
181
177
  }
182
178
 
183
179
  onHiddenToggle(idx: number): void {
184
180
  const items = [...this._items()];
185
181
  items[idx] = { ...items[idx], hidden: !items[idx].hidden };
186
- this._editItems.set(items);
182
+ this._items.set(items);
187
183
  }
188
184
 
189
185
  onWidthChange(idx: number, event: Event): void {
190
186
  const inputEl = event.target as HTMLInputElement;
191
187
  const items = [...this._items()];
192
188
  items[idx] = { ...items[idx], width: inputEl.value };
193
- this._editItems.set(items);
189
+ this._items.set(items);
194
190
  }
195
191
 
196
192
  canMoveUp(idx: number): boolean {
@@ -217,14 +213,14 @@ export class SdSheetConfigModal implements ISdModal<ISdSheetConfig | undefined>
217
213
  if (!this.canMoveUp(idx)) return;
218
214
  const items = [...this._items()];
219
215
  [items[idx - 1], items[idx]] = [items[idx], items[idx - 1]];
220
- this._editItems.set(items);
216
+ this._items.set(items);
221
217
  }
222
218
 
223
219
  onMoveDown(idx: number): void {
224
220
  if (!this.canMoveDown(idx)) return;
225
221
  const items = [...this._items()];
226
222
  [items[idx], items[idx + 1]] = [items[idx + 1], items[idx]];
227
- this._editItems.set(items);
223
+ this._items.set(items);
228
224
  }
229
225
 
230
226
  onOk(): void {
@@ -2,6 +2,7 @@ import {
2
2
  booleanAttribute,
3
3
  ChangeDetectionStrategy,
4
4
  Component,
5
+ computed,
5
6
  contentChild,
6
7
  contentChildren,
7
8
  effect,
@@ -215,7 +216,26 @@ export class SdSelectControl<M extends "single" | "multi", T> {
215
216
 
216
217
  _selectedItemContentHTML = signal<string | undefined>(undefined);
217
218
 
218
- _flatItems = signal<{ data: T; index: number; depth: number }[]>([]);
219
+ _flatItems = computed(() => {
220
+ const items = this.items();
221
+ if (items == null) return [];
222
+ const getChildren = this.getChildrenFn();
223
+ const flat: { data: T; index: number; depth: number }[] = [];
224
+ let index = 0;
225
+ const walk = (list: T[], depth: number) => {
226
+ for (const item of list) {
227
+ flat.push({ data: item, index: index++, depth });
228
+ if (getChildren !== undefined) {
229
+ const children = getChildren(item);
230
+ if (children !== undefined) {
231
+ walk(children, depth + 1);
232
+ }
233
+ }
234
+ }
235
+ };
236
+ walk(items, 0);
237
+ return flat;
238
+ });
219
239
 
220
240
  constructor() {
221
241
  // Required validation
@@ -227,31 +247,6 @@ export class SdSelectControl<M extends "single" | "multi", T> {
227
247
  return "";
228
248
  });
229
249
 
230
- // Flatten items array (with hierarchy support)
231
- effect(() => {
232
- const items = this.items();
233
- if (items == null) {
234
- this._flatItems.set([]);
235
- return;
236
- }
237
- const getChildren = this.getChildrenFn();
238
- const flat: { data: T; index: number; depth: number }[] = [];
239
- let index = 0;
240
- const walk = (list: T[], depth: number) => {
241
- for (const item of list) {
242
- flat.push({ data: item, index: index++, depth });
243
- if (getChildren !== undefined) {
244
- const children = getChildren(item);
245
- if (children !== undefined) {
246
- walk(children, depth + 1);
247
- }
248
- }
249
- }
250
- };
251
- walk(items, 0);
252
- this._flatItems.set(flat);
253
- });
254
-
255
250
  // D3: contentClass/contentStyle via effect() on popup element
256
251
  // + D4: keyboard navigation via tabbable()
257
252
  effect((onCleanup) => {
@@ -1,10 +1,9 @@
1
- import { ChangeDetectionStrategy, Component, effect, ElementRef, inject, input, ViewEncapsulation } from "@angular/core";
1
+ import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from "@angular/core";
2
2
 
3
3
  @Component({
4
4
  selector: "sd-gap",
5
5
  changeDetection: ChangeDetectionStrategy.OnPush,
6
6
  encapsulation: ViewEncapsulation.None,
7
- standalone: true,
8
7
  imports: [],
9
8
  styles: [
10
9
  /* language=SCSS */ `
@@ -32,32 +31,29 @@ import { ChangeDetectionStrategy, Component, effect, ElementRef, inject, input,
32
31
  "[attr.data-sd-width]": "width()",
33
32
  "[style.width.px]": "widthPx()",
34
33
  "[style.width.em]": "widthEm()",
34
+ "[style.display]": "_displayStyle()",
35
35
  },
36
36
  })
37
37
  export class SdGapControl {
38
- private readonly _elRef = inject(ElementRef<HTMLElement>);
39
-
40
38
  height = input<"xxs" | "xs" | "sm" | "default" | "lg" | "xl" | "xxl">();
41
39
  heightPx = input<number>();
42
40
  width = input<"xxs" | "xs" | "sm" | "default" | "lg" | "xl" | "xxl">();
43
41
  widthPx = input<number>();
44
42
  widthEm = input<number>();
45
43
 
46
- constructor() {
47
- effect(() => {
48
- if (this.widthPx() === 0 || this.heightPx() === 0 || this.widthEm() === 0) {
49
- this._elRef.nativeElement.style.display = "none";
50
- } else if (
51
- this.width() !== undefined ||
52
- this.widthPx() !== undefined ||
53
- this.widthEm() !== undefined
54
- ) {
55
- this._elRef.nativeElement.style.display = "inline-block";
56
- } else if (this.height() !== undefined || this.heightPx() !== undefined) {
57
- this._elRef.nativeElement.style.display = "block";
58
- } else {
59
- this._elRef.nativeElement.style.display = "";
60
- }
61
- });
62
- }
44
+ _displayStyle = computed(() => {
45
+ if (this.widthPx() === 0 || this.heightPx() === 0 || this.widthEm() === 0) {
46
+ return "none";
47
+ } else if (
48
+ this.width() !== undefined ||
49
+ this.widthPx() !== undefined ||
50
+ this.widthEm() !== undefined
51
+ ) {
52
+ return "inline-block";
53
+ } else if (this.height() !== undefined || this.heightPx() !== undefined) {
54
+ return "block";
55
+ } else {
56
+ return undefined;
57
+ }
58
+ });
63
59
  }
@@ -20,35 +20,17 @@ import { SdButtonControl } from "../../form/button/sd-button.control";
20
20
  encapsulation: ViewEncapsulation.None,
21
21
  standalone: true,
22
22
  imports: [SdButtonControl],
23
+ host: {
24
+ style: "display: block",
25
+ class: "p-default",
26
+ },
23
27
  template: `
24
- <div class="_sd-confirm-modal">
25
- <p class="_message">{{ message() }}</p>
26
- <div class="_actions">
27
- <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
28
- <sd-button (click)="onCancel()">취소</sd-button>
29
- </div>
28
+ <p class="mb-default" [innerHTML]="message()"></p>
29
+ <div class="flex-row main-align-end gap-sm">
30
+ <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
31
+ <sd-button (click)="onCancel()">취소</sd-button>
30
32
  </div>
31
33
  `,
32
- styles: [
33
- /* language=SCSS */ `
34
- sd-confirm-modal {
35
- display: block;
36
- padding: var(--gap-default);
37
-
38
- > ._sd-confirm-modal {
39
- > ._message {
40
- margin-bottom: var(--gap-default);
41
- }
42
-
43
- > ._actions {
44
- display: flex;
45
- justify-content: flex-end;
46
- gap: var(--gap-sm);
47
- }
48
- }
49
- }
50
- `,
51
- ],
52
34
  })
53
35
  export class SdConfirmModalControl implements ISdModal<boolean> {
54
36
  initialized = signal(true);
@@ -8,6 +8,7 @@ import {
8
8
  } from "@angular/core";
9
9
  import type { ISdModal } from "./sd-modal.provider";
10
10
  import { SdButtonControl } from "../../form/button/sd-button.control";
11
+ import { SdTextfieldControl } from "../../form/input/sd-textfield.control";
11
12
 
12
13
  /**
13
14
  * 범용 프롬프트 모달.
@@ -19,52 +20,25 @@ import { SdButtonControl } from "../../form/button/sd-button.control";
19
20
  changeDetection: ChangeDetectionStrategy.OnPush,
20
21
  encapsulation: ViewEncapsulation.None,
21
22
  standalone: true,
22
- imports: [SdButtonControl],
23
+ imports: [SdButtonControl, SdTextfieldControl],
24
+ host: {
25
+ style: "display: block",
26
+ class: "p-default",
27
+ },
23
28
  template: `
24
- <div class="_sd-prompt-modal">
25
- <p class="_message">{{ message() }}</p>
26
- <input
27
- class="_input"
28
- type="text"
29
- [value]="_inputValue()"
30
- (input)="onInputChange($event)"
31
- (keydown.enter)="onConfirm()"
32
- />
33
- <div class="_actions">
34
- <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
35
- <sd-button (click)="onCancel()">취소</sd-button>
36
- </div>
29
+ <p class="mb-default" [innerHTML]="message()"></p>
30
+ <sd-textfield
31
+ [type]="'text'"
32
+ [value]="_inputValue()"
33
+ (input)="onInputChange($event)"
34
+ (keydown.enter)="onConfirm()"
35
+ class="mb-default"
36
+ />
37
+ <div class="flex-row main-align-end gap-sm">
38
+ <sd-button [theme]="'primary'" (click)="onConfirm()">확인</sd-button>
39
+ <sd-button (click)="onCancel()">취소</sd-button>
37
40
  </div>
38
41
  `,
39
- styles: [
40
- /* language=SCSS */ `
41
- sd-prompt-modal {
42
- display: block;
43
- padding: var(--gap-default);
44
-
45
- > ._sd-prompt-modal {
46
- > ._message {
47
- margin-bottom: var(--gap-default);
48
- }
49
-
50
- > ._input {
51
- display: block;
52
- width: 100%;
53
- padding: var(--gap-sm) var(--gap-default);
54
- border: 1px solid var(--trans-lighter);
55
- border-radius: var(--border-radius-default);
56
- margin-bottom: var(--gap-default);
57
- }
58
-
59
- > ._actions {
60
- display: flex;
61
- justify-content: flex-end;
62
- gap: var(--gap-sm);
63
- }
64
- }
65
- }
66
- `,
67
- ],
68
42
  })
69
43
  export class SdPromptModalControl implements ISdModal<string> {
70
44
  initialized = signal(true);