@simplysm/angular 14.0.43 → 14.0.45

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,4 +1,5 @@
1
1
  import { TemplateRef } from "@angular/core";
2
+ import type { SafeHtml } from "@angular/platform-browser";
2
3
  import { SdSelectItem } from "./sd-select-item";
3
4
  import * as i0 from "@angular/core";
4
5
  export type SelectModeValue<T> = {
@@ -29,7 +30,8 @@ export declare class SdSelect<M extends "single" | "multi", T> {
29
30
  _headerTpl: import("@angular/core").Signal<TemplateRef<void> | undefined>;
30
31
  _beforeTpl: import("@angular/core").Signal<TemplateRef<void> | undefined>;
31
32
  _itemOfTpl: import("@angular/core").Signal<TemplateRef<any> | undefined>;
32
- _selectedItemContentHTML: import("@angular/core").WritableSignal<string | undefined>;
33
+ private readonly _sanitizer;
34
+ _selectedItemContentHTML: import("@angular/core").WritableSignal<SafeHtml | undefined>;
33
35
  _flatItems: import("@angular/core").Signal<{
34
36
  data: T;
35
37
  index: number;
@@ -1 +1 @@
1
- {"version":3,"file":"sd-select.d.ts","sourceRoot":"","sources":["../../../src/controls/select/sd-select.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,WAAW,EAIZ,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;;AAUhD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,qBAuNa,QAAQ,CAAC,CAAC,SAAS,QAAQ,GAAG,OAAO,EAAE,CAAC;IACnD,UAAU,yCAAwB;IAClC,KAAK,2EAAoC;IACzC,WAAW,0DAAmB;IAC9B,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,QAAQ,qEAAiD;IAEzD,aAAa,qEAAiD;IAC9D,8BAA8B,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E,CAAC;IACnD,UAAU,yCAAwB;IAClC,KAAK,2EAAoC;IACzC,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,SAAS,6CAAgB,CAAC,SAAS,MAAM,KAAK,OAAO,EAAkB;IACvE,aAAa,8CAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,eAAI;IAEtD,YAAY,0DAAmB;IAC/B,YAAY,0DAAmB;IAE/B,YAAY,+CAAgB;IAE5B,SAAS,CAAC,QAAQ,CAAC,eAAe,iUAAmB;IAErD,aAAa,+DAAiC;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkC;IACnE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAG7B;IAEF,UAAU,gEAAgD;IAC1D,UAAU,gEAAgD;IAC1D,UAAU,+DAAyD;IAEnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IAEnD,wBAAwB,+DAA2C;IAEnE,UAAU;cAIY,CAAC;eAAS,MAAM;eAAS,MAAM;SAelD;;IAgIH,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI;IAO1C,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI;IAI1C,OAAO,CAAC,YAAY;IAepB,WAAW,IAAI,IAAI;IAQnB,aAAa,IAAI,IAAI;IAIrB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;yCApOT,QAAQ;2CAAR,QAAQ;CAwOpB"}
@@ -1,5 +1,6 @@
1
- import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, untracked, viewChild, ViewEncapsulation, } from "@angular/core";
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, ElementRef, inject, input, model, signal, TemplateRef, untracked, viewChild, ViewEncapsulation, } from "@angular/core";
2
2
  import { NgTemplateOutlet } from "@angular/common";
3
+ import { DomSanitizer } from "@angular/platform-browser";
3
4
  import { SdDropdown } from "../dropdown/sd-dropdown";
4
5
  import { SdDropdownPopup } from "../dropdown/sd-dropdown-popup";
5
6
  import { SdSelectItem } from "./sd-select-item";
@@ -120,6 +121,7 @@ export class SdSelect {
120
121
  _headerTpl = contentChild("headerTpl", ...(ngDevMode ? [{ debugName: "_headerTpl" }] : /* istanbul ignore next */ []));
121
122
  _beforeTpl = contentChild("beforeTpl", ...(ngDevMode ? [{ debugName: "_beforeTpl" }] : /* istanbul ignore next */ []));
122
123
  _itemOfTpl = contentChild(SdItemOfTemplate, { ...(ngDevMode ? { debugName: "_itemOfTpl" } : /* istanbul ignore next */ {}), read: TemplateRef });
124
+ _sanitizer = inject(DomSanitizer);
123
125
  _selectedItemContentHTML = signal(undefined, ...(ngDevMode ? [{ debugName: "_selectedItemContentHTML" }] : /* istanbul ignore next */ []));
124
126
  _flatItems = computed(() => {
125
127
  const items = this.items();
@@ -241,7 +243,7 @@ export class SdSelect {
241
243
  }
242
244
  }
243
245
  if (htmlParts.length > 0) {
244
- this._selectedItemContentHTML.set(htmlParts.join(separator));
246
+ this._selectedItemContentHTML.set(this._sanitizer.bypassSecurityTrustHtml(htmlParts.join(separator)));
245
247
  }
246
248
  else {
247
249
  this._selectedItemContentHTML.set(undefined);
@@ -252,7 +254,7 @@ export class SdSelect {
252
254
  if (selectedItem != null) {
253
255
  const html = selectedItem.contentHTML();
254
256
  if (html !== "") {
255
- this._selectedItemContentHTML.set(html);
257
+ this._selectedItemContentHTML.set(this._sanitizer.bypassSecurityTrustHtml(html));
256
258
  }
257
259
  else {
258
260
  this._selectedItemContentHTML.set(undefined);
@@ -426,4 +428,4 @@ export class SdSelect {
426
428
  "[attr.data-sd-disabled]": "disabled()",
427
429
  }, styles: ["sd-select {\n display: block;\n position: relative;\n width: 100%;\n min-width: 10em;\n}\nsd-select > sd-dropdown {\n display: flex;\n overflow: hidden;\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:focus, sd-select > sd-dropdown:focus-within {\n border-color: var(--theme-primary-default);\n}\nsd-select > sd-dropdown > ._sd-select-control {\n display: flex;\n position: relative;\n gap: var(--gap-default);\n flex-grow: 1;\n padding: var(--gap-sm) var(--gap-default);\n cursor: pointer;\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 opacity: 0.3;\n}\nsd-select > sd-dropdown > ._sd-select-control:hover > ._sd-select-control-icon, sd-select > sd-dropdown > ._sd-select-control:focus > ._sd-select-control-icon, sd-select > sd-dropdown > ._sd-select-control:active > ._sd-select-control-icon {\n opacity: 1;\n}\nsd-select > sd-dropdown > sd-select-button {\n padding: var(--gap-sm);\n border-left: 1px solid var(--theme-gray-lightest);\n}\nsd-select > sd-dropdown > sd-select-button:last-of-type {\n border-top-right-radius: var(--border-radius-default);\n border-bottom-right-radius: var(--border-radius-default);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown {\n background: var(--theme-gray-lightest);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n color: var(--text-trans-light);\n cursor: default;\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n display: none;\n}\nsd-select[data-sd-inline=true] {\n display: inline-block;\n width: auto;\n vertical-align: top;\n}\nsd-select[data-sd-size=sm] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-xs) var(--gap-sm);\n gap: var(--gap-sm);\n}\nsd-select[data-sd-size=sm] > sd-dropdown > sd-select-button {\n padding: var(--gap-xs);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-default) var(--gap-lg);\n gap: var(--gap-lg);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > sd-select-button {\n padding: var(--gap-default);\n}\nsd-select[data-sd-inset=true] {\n min-width: auto;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown {\n border: none;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > sd-select-button {\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown:focus, sd-select[data-sd-inset=true] > sd-dropdown:focus-within {\n outline: 1px solid var(--theme-primary-default);\n outline-offset: -1px;\n}\nsd-select[data-sd-inset=true] > sd-dropdown:focus > sd-select-button, sd-select[data-sd-inset=true] > sd-dropdown:focus-within > sd-select-button {\n outline: 1px solid var(--theme-primary-default);\n outline-offset: -1px;\n}\nsd-select[data-sd-inset=true][data-sd-disabled=true] > sd-dropdown {\n background: var(--control-color);\n}\nsd-select[data-sd-inset=true][data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n color: var(--text-trans-default);\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}"] }]
428
430
  }], () => [], { 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 }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", 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 }] }], dropdownOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownOpen", required: false }] }, { type: i0.Output, args: ["dropdownOpenChange"] }], _itemControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSelectItem), { isSignal: true }] }], _dropdownControl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdown), { isSignal: true }] }], _dropdownElRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdown), { ...{ 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(() => SdItemOfTemplate), { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
429
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelect, { className: "SdSelect", filePath: "packages/angular/src/controls/select/sd-select.ts", lineNumber: 251 }); })();
431
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelect, { className: "SdSelect", filePath: "packages/angular/src/controls/select/sd-select.ts", lineNumber: 254 }); })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/angular",
3
- "version": "14.0.43",
3
+ "version": "14.0.45",
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-common": "14.0.43",
54
- "@simplysm/core-browser": "14.0.43",
55
- "@simplysm/service-client": "14.0.43",
56
- "@simplysm/service-common": "14.0.43"
53
+ "@simplysm/core-common": "14.0.45",
54
+ "@simplysm/service-client": "14.0.45",
55
+ "@simplysm/service-common": "14.0.45",
56
+ "@simplysm/core-browser": "14.0.45"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@angular/compiler": "^21.2.8",
@@ -7,6 +7,7 @@ import {
7
7
  contentChildren,
8
8
  effect,
9
9
  ElementRef,
10
+ inject,
10
11
  input,
11
12
  model,
12
13
  signal,
@@ -16,6 +17,8 @@ import {
16
17
  ViewEncapsulation,
17
18
  } from "@angular/core";
18
19
  import { NgTemplateOutlet } from "@angular/common";
20
+ import type { SafeHtml } from "@angular/platform-browser";
21
+ import { DomSanitizer } from "@angular/platform-browser";
19
22
  import { SdDropdown } from "../dropdown/sd-dropdown";
20
23
  import { SdDropdownPopup } from "../dropdown/sd-dropdown-popup";
21
24
  import { SdSelectItem } from "./sd-select-item";
@@ -283,7 +286,9 @@ export class SdSelect<M extends "single" | "multi", T> {
283
286
  _beforeTpl = contentChild<TemplateRef<void>>("beforeTpl");
284
287
  _itemOfTpl = contentChild(SdItemOfTemplate, { read: TemplateRef });
285
288
 
286
- _selectedItemContentHTML = signal<string | undefined>(undefined);
289
+ private readonly _sanitizer = inject(DomSanitizer);
290
+
291
+ _selectedItemContentHTML = signal<SafeHtml | undefined>(undefined);
287
292
 
288
293
  _flatItems = computed(() => {
289
294
  const items = this.items();
@@ -409,7 +414,9 @@ export class SdSelect<M extends "single" | "multi", T> {
409
414
  }
410
415
  }
411
416
  if (htmlParts.length > 0) {
412
- this._selectedItemContentHTML.set(htmlParts.join(separator));
417
+ this._selectedItemContentHTML.set(
418
+ this._sanitizer.bypassSecurityTrustHtml(htmlParts.join(separator)),
419
+ );
413
420
  } else {
414
421
  this._selectedItemContentHTML.set(undefined);
415
422
  }
@@ -420,7 +427,7 @@ export class SdSelect<M extends "single" | "multi", T> {
420
427
  if (selectedItem != null) {
421
428
  const html = selectedItem.contentHTML();
422
429
  if (html !== "") {
423
- this._selectedItemContentHTML.set(html);
430
+ this._selectedItemContentHTML.set(this._sanitizer.bypassSecurityTrustHtml(html));
424
431
  } else {
425
432
  this._selectedItemContentHTML.set(undefined);
426
433
  }