@ng-nest/ui 20.0.0 → 20.0.1

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, inject, SecurityContext, Injectable, ElementRef, Renderer2, ChangeDetectorRef, computed, effect, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
2
+ import { input, Component, inject, SecurityContext, Injectable, ElementRef, Renderer2, ChangeDetectorRef, signal, computed, effect, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
3
3
  import { XPropertyFunction, XToBoolean, XHasIn, XIsEmpty, XWarnIconTypeNotFound, XWarnSVGTagNotFound } from '@ng-nest/ui/core';
4
4
  import { DomSanitizer } from '@angular/platform-browser';
5
5
  import { HttpClient } from '@angular/common/http';
@@ -174,9 +174,6 @@ const XViewBox = [
174
174
  // { souces: ["fto"], value: "0 0 24 24" }
175
175
  ];
176
176
  class XIconComponent extends XIconProperty {
177
- get className() {
178
- return `${XIconPrefix} ${this.type()}`;
179
- }
180
177
  get getSpin() {
181
178
  return this.spin();
182
179
  }
@@ -190,6 +187,8 @@ class XIconComponent extends XIconProperty {
190
187
  this.renderer = inject(Renderer2);
191
188
  this.cdr = inject(ChangeDetectorRef);
192
189
  this.iconService = inject(XIconService);
190
+ this.beforeClass = signal('');
191
+ this.hostClass = true;
193
192
  this.inSource = computed(() => {
194
193
  const type = this.type();
195
194
  if (typeof type === 'undefined' || type === '' || type === null)
@@ -224,6 +223,15 @@ class XIconComponent extends XIconProperty {
224
223
  this.iconService.getSvg(this.href(), this.sourceUrl()).subscribe((x) => this.setSvgs(x));
225
224
  }
226
225
  });
226
+ effect(() => {
227
+ if (this.elementRef.nativeElement && this.type()) {
228
+ if (this.beforeClass()) {
229
+ this.renderer.removeClass(this.elementRef.nativeElement, this.beforeClass());
230
+ }
231
+ this.renderer.addClass(this.elementRef.nativeElement, this.type());
232
+ this.beforeClass.set(this.type());
233
+ }
234
+ });
227
235
  }
228
236
  setSvgs(svg) {
229
237
  if (XIsEmpty(svg))
@@ -300,14 +308,14 @@ class XIconComponent extends XIconProperty {
300
308
  }
301
309
  }
302
310
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
303
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: XIconComponent, isStandalone: true, selector: "x-icon", host: { properties: { "class": "this.className", "class.x-icon-spin": "this.getSpin", "style.color": "this.getColor" } }, usesInheritance: true, ngImport: i0, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon{margin:0;padding:0}.x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em;font-size:1rem}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
311
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: XIconComponent, isStandalone: true, selector: "x-icon", host: { properties: { "class.x-icon": "this.hostClass", "class.x-icon-spin": "this.getSpin", "style.color": "this.getColor" } }, usesInheritance: true, ngImport: i0, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
304
312
  }
305
313
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XIconComponent, decorators: [{
306
314
  type: Component,
307
- args: [{ selector: `${XIconPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon{margin:0;padding:0}.x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em;font-size:1rem}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}\n"] }]
308
- }], ctorParameters: () => [], propDecorators: { className: [{
315
+ args: [{ selector: `${XIconPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "\r\n", styles: ["@keyframes x-icon-spin{to{transform:rotate(360deg)}}.x-icon-spin{animation:1s linear infinite x-icon-spin}.x-icon[left]{margin-right:.25rem}.x-icon[right]{margin-left:.25rem}x-icon{display:inline-block;line-height:0;text-align:center;vertical-align:-.125em}\n"] }]
316
+ }], ctorParameters: () => [], propDecorators: { hostClass: [{
309
317
  type: HostBinding,
310
- args: ['class']
318
+ args: ['class.x-icon']
311
319
  }], getSpin: [{
312
320
  type: HostBinding,
313
321
  args: ['class.x-icon-spin']
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-icon.mjs","sources":["../../../../lib/ng-nest/ui/icon/icon.property.ts","../../../../lib/ng-nest/ui/icon/icon.service.ts","../../../../lib/ng-nest/ui/icon/icon.component.ts","../../../../lib/ng-nest/ui/icon/icon.component.html","../../../../lib/ng-nest/ui/icon/icon.module.ts","../../../../lib/ng-nest/ui/icon/ng-nest-ui-icon.ts"],"sourcesContent":["import { XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Icon\r\n * @selector x-icon\r\n * @decorator component\r\n */\r\nexport const XIconPrefix = 'x-icon';\r\nconst X_ICON_CONFIG_NAME = 'icon';\r\n\r\n/**\r\n * Icon Property\r\n */\r\n@Component({ selector: `${XIconPrefix}-property`, template: '' })\r\nexport class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN SVG 图标根路径地址,可以通过全局只配置一次,所有图标资源在 github 上的 ng-nest-icon 中\r\n * @en_US The root address of the SVG icon can be configured only once globally. All icon resources are in ng-nest-icon on github\r\n */\r\n readonly href = input<string>(this.config?.href ?? 'https://ngnest.com/static/icons/');\r\n /**\r\n * @zh_CN 图标类型\r\n * @en_US Icon type\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon type=\"fto-activity\"></x-icon>\r\n * <x-icon type=\"fto-airplay\"></x-icon>\r\n * <x-icon type=\"fto-anchor\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly type = input<string>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon color=\"red\" type=\"fto-activity\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly color = input<string>();\r\n /**\r\n * @zh_CN loading效果(图标一直旋转)\r\n * @en_US Loading effect (icon keeps rotating)\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon spin=\"true\" type=\"fto-loader\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly spin = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标来源\r\n * @en_US Icon source\r\n */\r\nexport type XIconSource = 'ant-design' | 'eva' | 'feather' | 'font-awesome' | 'material-design';\r\n","import { Injectable, SecurityContext, inject } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, Subscriber } from 'rxjs';\r\nimport { XHasIn, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XIconPrefix } from './icon.property';\r\n\r\ntype Task<T> = {\r\n name: string;\r\n observable: Observable<T>;\r\n callback: Function;\r\n};\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XIconService {\r\n caches: { [property: string]: any } = {};\r\n queue: Task<any>[] = [];\r\n activeTaskXm: number = 0;\r\n isRunningTask = false;\r\n limit: number = 10;\r\n sanitizer = inject(DomSanitizer);\r\n http = inject(HttpClient, { optional: true })!;\r\n customIcon: { [property: string]: string } = {};\r\n\r\n constructor() {\r\n if (!this.http) {\r\n throw new Error(`${XIconPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n public addTask<T>(task: Task<T>) {\r\n this.queue.push(task);\r\n this.runTask();\r\n }\r\n\r\n private execute<T>(task: Task<T>) {\r\n this.isRunningTask = true;\r\n if (XHasIn(this.caches, task.name)) {\r\n task.callback(this.caches[task.name]);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n return;\r\n }\r\n return task.observable.subscribe({\r\n next: (result) => {\r\n this.caches[task.name] = result;\r\n task.callback(result);\r\n return result;\r\n },\r\n error: (error) => {\r\n console.error(error);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n },\r\n complete: () => {\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n }\r\n });\r\n }\r\n\r\n private runTask() {\r\n if (!this.isRunningTask && this.activeTaskXm < this.limit && this.queue.length > 0) {\r\n const task = this.queue.shift();\r\n this.activeTaskXm++;\r\n this.execute(task!);\r\n }\r\n }\r\n\r\n getSvg(root: string, icon: string, isCustom = false): Observable<string> {\r\n return new Observable((subscriber: Subscriber<string>) => {\r\n if (XIsEmpty(icon)) {\r\n subscriber.next('');\r\n subscriber.complete();\r\n return;\r\n }\r\n this.addTask({\r\n name: icon,\r\n observable: this.getSvgElement(root, icon, isCustom),\r\n callback: (svg: string) => {\r\n subscriber.next(svg);\r\n subscriber.complete();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getSvgElement(root: string, icon: string, isCustom = false): Observable<string> {\r\n const url = isCustom ? `${root}${icon}` : `${root}${icon}.svg`;\r\n const safeUrl = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n return this.http.get(safeUrl as string, { responseType: 'text' });\r\n }\r\n\r\n register(icon: string, url: string) {\r\n this.customIcon[icon] = url;\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n HostBinding,\r\n inject,\r\n effect,\r\n computed,\r\n ChangeDetectorRef\r\n} from '@angular/core';\r\nimport { XIconPrefix, XIconProperty } from './icon.property';\r\nimport { XIconService } from './icon.service';\r\nimport { XWarnIconTypeNotFound, XIsEmpty, XHasIn, XWarnSVGTagNotFound } from '@ng-nest/ui/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n// 来源路径对应\r\nexport const XSouceUrl: { [property: string]: string } = {\r\n adf: `ant-design/fill/`,\r\n ado: `ant-design/outline/`,\r\n adt: `ant-design/twotone/`,\r\n eaf: `eva/fill/`,\r\n eao: `eva/outline/`,\r\n fto: `feather/`,\r\n fab: `font-awesome/brands/`,\r\n far: `font-awesome/regular/`,\r\n fas: `font-awesome/solid/`,\r\n mdf: `material-design/fill/`,\r\n mdo: `material-design/outline/`\r\n};\r\n\r\nexport const XViewBox = [\r\n // { souces: [\"adf\", \"ado\", \"adt\"], value: \"0 0 1024 1024\" },\r\n // { souces: [\"eaf\", \"eao\"], value: \"0 0 24 24\" },\r\n // { souces: [\"fto\"], value: \"0 0 24 24\" }\r\n];\r\n\r\n@Component({\r\n selector: `${XIconPrefix}`,\r\n templateUrl: './icon.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XIconComponent extends XIconProperty {\r\n @HostBinding('class') get className() {\r\n return `${XIconPrefix} ${this.type()}`;\r\n }\r\n private svgElement!: HTMLElement;\r\n private document = inject(DOCUMENT);\r\n private elementRef = inject(ElementRef);\r\n private renderer = inject(Renderer2);\r\n private cdr = inject(ChangeDetectorRef);\r\n private iconService = inject(XIconService);\r\n\r\n @HostBinding('class.x-icon-spin') get getSpin() {\r\n return this.spin();\r\n }\r\n\r\n @HostBinding('style.color') get getColor() {\r\n return this.color();\r\n }\r\n\r\n inSource = computed(() => {\r\n const type = this.type();\r\n if (typeof type === 'undefined' || type === '' || type === null) return false;\r\n const split = type.split('-');\r\n const souce = split.shift();\r\n if (typeof souce === 'undefined') return false;\r\n const souceUrl = XSouceUrl[souce];\r\n return souceUrl ? true : false;\r\n });\r\n\r\n sourceUrl = computed(() => {\r\n if (!this.inSource()) return '';\r\n const split = this.type()!.split('-');\r\n const souce = split.shift();\r\n const souceUrl = XSouceUrl[souce!];\r\n const fileName = split.join('-');\r\n if (!souceUrl || !fileName) {\r\n XWarnIconTypeNotFound();\r\n }\r\n return `${souceUrl}${fileName}`;\r\n });\r\n\r\n isCustom = computed(() => {\r\n return !this.inSource() && XHasIn(this.iconService.customIcon, this.type()!);\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n if (this.isCustom()) {\r\n this.iconService.getSvg('', this.iconService.customIcon[this.type()!], true).subscribe((x) => this.setSvgs(x));\r\n } else if (this.inSource()) {\r\n this.iconService.getSvg(this.href(), this.sourceUrl()).subscribe((x) => this.setSvgs(x));\r\n }\r\n });\r\n }\r\n\r\n setSvgs(svg: string) {\r\n if (XIsEmpty(svg)) return;\r\n if (this.svgElement) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\r\n }\r\n if (this.isCustom()) {\r\n const parser = new DOMParser();\r\n const svgDoc = parser.parseFromString(svg, 'image/svg+xml');\r\n let firstChild = this.elementRef.nativeElement.firstChild;\r\n if (firstChild) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, firstChild);\r\n }\r\n this.svgElement = svgDoc.documentElement;\r\n } else if (this.inSource()) {\r\n this.svgElement = this.buildSvg(svg)!;\r\n }\r\n if (!this.svgElement) return;\r\n this.setAttributes(this.svgElement);\r\n this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\r\n // TODO: use zoneless, renderer removeChild will not take effect immediately\r\n this.cdr.markForCheck();\r\n }\r\n\r\n buildSvg(svgStr: string): HTMLElement | undefined {\r\n const result = this.document.createElementNS('http://www.w3.org/2000/svg', 'svg') as any;\r\n const svg = this.createSvg(svgStr);\r\n if (!svg) return;\r\n svg.children.forEach((x) => {\r\n x.removeAttribute('class');\r\n if (x.tagName === 'rect') {\r\n x.setAttribute('fill', 'none');\r\n }\r\n result.appendChild(x);\r\n });\r\n this.setAttribute(result, svg.ele, 'viewBox');\r\n this.setAttribute(result, svg.ele, 'fill', 'currentColor');\r\n this.setAttribute(result, svg.ele, 'stroke');\r\n this.setAttribute(result, svg.ele, 'stroke-width');\r\n this.setAttribute(result, svg.ele, 'stroke-linecap');\r\n this.setAttribute(result, svg.ele, 'stroke-linejoin');\r\n if (!result) {\r\n XWarnSVGTagNotFound();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n createSvg(svgStr: string) {\r\n const div = this.document.createElement('div');\r\n div.innerHTML = svgStr;\r\n let svgEle = div.querySelector('svg') as SVGElement;\r\n if (!svgEle) return null;\r\n return {\r\n ele: svgEle,\r\n children: svgEle.querySelectorAll('path, polyline, polygon, circle, line, rect')\r\n };\r\n }\r\n\r\n setAttributes(svgEle: HTMLElement) {\r\n if (svgEle) {\r\n this.renderer.setAttribute(svgEle, 'width', '1em');\r\n this.renderer.setAttribute(svgEle, 'height', '1em');\r\n }\r\n }\r\n\r\n setAttribute(svg: SVGElement, svgEle: SVGElement, attribute: string, def?: string) {\r\n let attr = svgEle.getAttribute(attribute);\r\n if (attr) {\r\n svg.setAttribute(attribute, attr);\r\n } else if (def) {\r\n svg.setAttribute(attribute, def);\r\n }\r\n }\r\n}\r\n","\r\n","import { NgModule } from '@angular/core';\r\nimport { XIconComponent } from './icon.component';\r\n\r\n@NgModule({\r\n exports: [XIconComponent],\r\n imports: [XIconCompon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A,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,CAAA,gTAAA,CAAA,EAAA;wDAGrB,SAAS,EAAA,CAAA;sBAAlC,WAAW;uBAAC,OAAO;gBAUkB,OAAO,EAAA,CAAA;sBAA5C,WAAW;uBAAC,mBAAmB;gBAIA,QAAQ,EAAA,CAAA;sBAAvC,WAAW;uBAAC,aAAa;;;MErDf,WAAW,CAAA;iIAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAX,WAAW,EAAA,OAAA,EAAA,CAFZ,cAAc,CAAA,EAAA,OAAA,EAAA,CADd,cAAc,CAAA,EAAA,CAAA,CAAA;kIAGb,WAAW,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-icon.mjs","sources":["../../../../lib/ng-nest/ui/icon/icon.property.ts","../../../../lib/ng-nest/ui/icon/icon.service.ts","../../../../lib/ng-nest/ui/icon/icon.component.ts","../../../../lib/ng-nest/ui/icon/icon.component.html","../../../../lib/ng-nest/ui/icon/icon.module.ts","../../../../lib/ng-nest/ui/icon/ng-nest-ui-icon.ts"],"sourcesContent":["import { XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Icon\r\n * @selector x-icon\r\n * @decorator component\r\n */\r\nexport const XIconPrefix = 'x-icon';\r\nconst X_ICON_CONFIG_NAME = 'icon';\r\n\r\n/**\r\n * Icon Property\r\n */\r\n@Component({ selector: `${XIconPrefix}-property`, template: '' })\r\nexport class XIconProperty extends XPropertyFunction(X_ICON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN SVG 图标根路径地址,可以通过全局只配置一次,所有图标资源在 github 上的 ng-nest-icon 中\r\n * @en_US The root address of the SVG icon can be configured only once globally. All icon resources are in ng-nest-icon on github\r\n */\r\n readonly href = input<string>(this.config?.href ?? 'https://ngnest.com/static/icons/');\r\n /**\r\n * @zh_CN 图标类型\r\n * @en_US Icon type\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon type=\"fto-activity\"></x-icon>\r\n * <x-icon type=\"fto-airplay\"></x-icon>\r\n * <x-icon type=\"fto-anchor\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly type = input<string>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon color=\"red\" type=\"fto-activity\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly color = input<string>();\r\n /**\r\n * @zh_CN loading效果(图标一直旋转)\r\n * @en_US Loading effect (icon keeps rotating)\r\n * @example\r\n *\r\n * ```html\r\n * <x-icon spin=\"true\" type=\"fto-loader\"></x-icon>\r\n * ```\r\n *\r\n */\r\n readonly spin = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标来源\r\n * @en_US Icon source\r\n */\r\nexport type XIconSource = 'ant-design' | 'eva' | 'feather' | 'font-awesome' | 'material-design';\r\n","import { Injectable, SecurityContext, inject } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, Subscriber } from 'rxjs';\r\nimport { XHasIn, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XIconPrefix } from './icon.property';\r\n\r\ntype Task<T> = {\r\n name: string;\r\n observable: Observable<T>;\r\n callback: Function;\r\n};\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XIconService {\r\n caches: { [property: string]: any } = {};\r\n queue: Task<any>[] = [];\r\n activeTaskXm: number = 0;\r\n isRunningTask = false;\r\n limit: number = 10;\r\n sanitizer = inject(DomSanitizer);\r\n http = inject(HttpClient, { optional: true })!;\r\n customIcon: { [property: string]: string } = {};\r\n\r\n constructor() {\r\n if (!this.http) {\r\n throw new Error(`${XIconPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n public addTask<T>(task: Task<T>) {\r\n this.queue.push(task);\r\n this.runTask();\r\n }\r\n\r\n private execute<T>(task: Task<T>) {\r\n this.isRunningTask = true;\r\n if (XHasIn(this.caches, task.name)) {\r\n task.callback(this.caches[task.name]);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n return;\r\n }\r\n return task.observable.subscribe({\r\n next: (result) => {\r\n this.caches[task.name] = result;\r\n task.callback(result);\r\n return result;\r\n },\r\n error: (error) => {\r\n console.error(error);\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n },\r\n complete: () => {\r\n this.activeTaskXm--;\r\n this.isRunningTask = false;\r\n this.runTask();\r\n }\r\n });\r\n }\r\n\r\n private runTask() {\r\n if (!this.isRunningTask && this.activeTaskXm < this.limit && this.queue.length > 0) {\r\n const task = this.queue.shift();\r\n this.activeTaskXm++;\r\n this.execute(task!);\r\n }\r\n }\r\n\r\n getSvg(root: string, icon: string, isCustom = false): Observable<string> {\r\n return new Observable((subscriber: Subscriber<string>) => {\r\n if (XIsEmpty(icon)) {\r\n subscriber.next('');\r\n subscriber.complete();\r\n return;\r\n }\r\n this.addTask({\r\n name: icon,\r\n observable: this.getSvgElement(root, icon, isCustom),\r\n callback: (svg: string) => {\r\n subscriber.next(svg);\r\n subscriber.complete();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getSvgElement(root: string, icon: string, isCustom = false): Observable<string> {\r\n const url = isCustom ? `${root}${icon}` : `${root}${icon}.svg`;\r\n const safeUrl = this.sanitizer.sanitize(SecurityContext.URL, url);\r\n return this.http.get(safeUrl as string, { responseType: 'text' });\r\n }\r\n\r\n register(icon: string, url: string) {\r\n this.customIcon[icon] = url;\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n HostBinding,\r\n inject,\r\n effect,\r\n computed,\r\n ChangeDetectorRef,\r\n signal\r\n} from '@angular/core';\r\nimport { XIconPrefix, XIconProperty } from './icon.property';\r\nimport { XIconService } from './icon.service';\r\nimport { XWarnIconTypeNotFound, XIsEmpty, XHasIn, XWarnSVGTagNotFound } from '@ng-nest/ui/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n// 来源路径对应\r\nexport const XSouceUrl: { [property: string]: string } = {\r\n adf: `ant-design/fill/`,\r\n ado: `ant-design/outline/`,\r\n adt: `ant-design/twotone/`,\r\n eaf: `eva/fill/`,\r\n eao: `eva/outline/`,\r\n fto: `feather/`,\r\n fab: `font-awesome/brands/`,\r\n far: `font-awesome/regular/`,\r\n fas: `font-awesome/solid/`,\r\n mdf: `material-design/fill/`,\r\n mdo: `material-design/outline/`\r\n};\r\n\r\nexport const XViewBox = [\r\n // { souces: [\"adf\", \"ado\", \"adt\"], value: \"0 0 1024 1024\" },\r\n // { souces: [\"eaf\", \"eao\"], value: \"0 0 24 24\" },\r\n // { souces: [\"fto\"], value: \"0 0 24 24\" }\r\n];\r\n\r\n@Component({\r\n selector: `${XIconPrefix}`,\r\n templateUrl: './icon.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XIconComponent extends XIconProperty {\r\n private svgElement!: HTMLElement;\r\n private document = inject(DOCUMENT);\r\n private elementRef = inject(ElementRef);\r\n private renderer = inject(Renderer2);\r\n private cdr = inject(ChangeDetectorRef);\r\n private iconService = inject(XIconService);\r\n private beforeClass = signal('');\r\n\r\n @HostBinding('class.x-icon') hostClass = true;\r\n\r\n @HostBinding('class.x-icon-spin') get getSpin() {\r\n return this.spin();\r\n }\r\n\r\n @HostBinding('style.color') get getColor() {\r\n return this.color();\r\n }\r\n\r\n inSource = computed(() => {\r\n const type = this.type();\r\n if (typeof type === 'undefined' || type === '' || type === null) return false;\r\n const split = type.split('-');\r\n const souce = split.shift();\r\n if (typeof souce === 'undefined') return false;\r\n const souceUrl = XSouceUrl[souce];\r\n return souceUrl ? true : false;\r\n });\r\n\r\n sourceUrl = computed(() => {\r\n if (!this.inSource()) return '';\r\n const split = this.type()!.split('-');\r\n const souce = split.shift();\r\n const souceUrl = XSouceUrl[souce!];\r\n const fileName = split.join('-');\r\n if (!souceUrl || !fileName) {\r\n XWarnIconTypeNotFound();\r\n }\r\n return `${souceUrl}${fileName}`;\r\n });\r\n\r\n isCustom = computed(() => {\r\n return !this.inSource() && XHasIn(this.iconService.customIcon, this.type()!);\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n if (this.isCustom()) {\r\n this.iconService.getSvg('', this.iconService.customIcon[this.type()!], true).subscribe((x) => this.setSvgs(x));\r\n } else if (this.inSource()) {\r\n this.iconService.getSvg(this.href(), this.sourceUrl()).subscribe((x) => this.setSvgs(x));\r\n }\r\n });\r\n effect(() => {\r\n if (this.elementRef.nativeElement && this.type()) {\r\n if (this.beforeClass()) {\r\n this.renderer.removeClass(this.elementRef.nativeElement, this.beforeClass());\r\n }\r\n this.renderer.addClass(this.elementRef.nativeElement, this.type()!);\r\n this.beforeClass.set(this.type()!);\r\n }\r\n });\r\n }\r\n\r\n setSvgs(svg: string) {\r\n if (XIsEmpty(svg)) return;\r\n if (this.svgElement) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\r\n }\r\n if (this.isCustom()) {\r\n const parser = new DOMParser();\r\n const svgDoc = parser.parseFromString(svg, 'image/svg+xml');\r\n let firstChild = this.elementRef.nativeElement.firstChild;\r\n if (firstChild) {\r\n this.renderer.removeChild(this.elementRef.nativeElement, firstChild);\r\n }\r\n this.svgElement = svgDoc.documentElement;\r\n } else if (this.inSource()) {\r\n this.svgElement = this.buildSvg(svg)!;\r\n }\r\n if (!this.svgElement) return;\r\n this.setAttributes(this.svgElement);\r\n this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\r\n // TODO: use zoneless, renderer removeChild will not take effect immediately\r\n this.cdr.markForCheck();\r\n }\r\n\r\n buildSvg(svgStr: string): HTMLElement | undefined {\r\n const result = this.document.createElementNS('http://www.w3.org/2000/svg', 'svg') as any;\r\n const svg = this.createSvg(svgStr);\r\n if (!svg) return;\r\n svg.children.forEach((x) => {\r\n x.removeAttribute('class');\r\n if (x.tagName === 'rect') {\r\n x.setAttribute('fill', 'none');\r\n }\r\n result.appendChild(x);\r\n });\r\n this.setAttribute(result, svg.ele, 'viewBox');\r\n this.setAttribute(result, svg.ele, 'fill', 'currentColor');\r\n this.setAttribute(result, svg.ele, 'stroke');\r\n this.setAttribute(result, svg.ele, 'stroke-width');\r\n this.setAttribute(result, svg.ele, 'stroke-linecap');\r\n this.setAttribute(result, svg.ele, 'stroke-linejoin');\r\n if (!result) {\r\n XWarnSVGTagNotFound();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n createSvg(svgStr: string) {\r\n const div = this.document.createElement('div');\r\n div.innerHTML = svgStr;\r\n let svgEle = div.querySelector('svg') as SVGElement;\r\n if (!svgEle) return null;\r\n return {\r\n ele: svgEle,\r\n children: svgEle.querySelectorAll('path, polyline, polygon, circle, line, rect')\r\n };\r\n }\r\n\r\n setAttributes(svgEle: HTMLElement) {\r\n if (svgEle) {\r\n this.renderer.setAttribute(svgEle, 'width', '1em');\r\n this.renderer.setAttribute(svgEle, 'height', '1em');\r\n }\r\n }\r\n\r\n setAttribute(svg: SVGElement, svgEle: SVGElement, attribute: string, def?: string) {\r\n let attr = svgEle.getAttribute(attribute);\r\n if (attr) {\r\n svg.setAttribute(attribute, attr);\r\n } else if (def) {\r\n svg.setAttribute(attribute, def);\r\n }\r\n }\r\n}\r\n","\r\n","import { NgModule } from '@angular/core';\r\nimport { XIconComponent } from './icon.component';\r\n\r\n@NgModule({\r\n exports: [XIconComponent],\r\n imports: [XIconComponent]\r\n})\r\nexport class XIconModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG;AAC3B,MAAM,kBAAkB,GAAG,MAAM;AAEjC;;AAEG;MAEU,aAAc,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;AADxE,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,CAAS,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,kCAAkC,CAAC;AACtF;;;;;;;;;;;AAWG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU;AAC/B;;;;;;;;;AASG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,EAAU;AAChC;;;;;;;;;AASG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,CAAoB,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAC3E;iIAzCY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,qkBADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FACjD,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,SAAS;mBAAC,EAAE,QAAQ,EAAE,CAAG,EAAA,WAAW,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;;;MCDnD,YAAY,CAAA;AAUvB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A,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
@@ -309,11 +309,11 @@ class XListOptionComponent extends XListOptionProperty {
309
309
  return this.label();
310
310
  }
311
311
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XListOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
312
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XListOptionComponent, isStandalone: true, selector: "x-list-option", host: { properties: { "attr.role": "this.role" } }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-list-option\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-selected]=\"selected()\"\r\n [class.x-disabled]=\"forbidden()\"\r\n [class.x-open-portal]=\"openPortal()\"\r\n [class.x-active]=\"active()\"\r\n [class.x-list-icon]=\"icon()\"\r\n [class.x-list-divided]=\"divided()\"\r\n>\r\n <div class=\"x-list-option-content\">\r\n @if (nodeTpl()) {\r\n <ng-template *ngTemplateOutlet=\"nodeTpl()!; context: { $node: node() }\"></ng-template>\r\n } @else {\r\n @if (icon()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n <span x-keyword [text]=\"keywordText()\" [caseSensitive]=\"caseSensitive()\">{{ label() }}</span>\r\n }\r\n </div>\r\n @if (leaf()) {\r\n <x-icon class=\"x-list-leaf\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n @if (checked() && !leaf() && selected()) {\r\n <x-icon class=\"x-list-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list-option{display:block}.x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-option-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;-webkit-user-select:none;user-select:none;display:inline-block}.x-list-option:not(:first-child){margin-top:var(--x-border-width)}.x-list-option:hover:not(.x-disabled),.x-list-option.x-active:not(.x-disabled){background-color:var(--x-background-a200)}.x-list-option.x-list-divided{margin-top:.8125rem}.x-list-option.x-list-divided:before{content:\" \";position:absolute;top:0;left:0;width:100%;margin-top:-.5rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-list-option.x-selected:not(.x-disabled){background-color:var(--x-primary-900);color:var(--x-primary)}.x-list-option.x-selected:not(.x-disabled)>x-icon{color:var(--x-primary)}.x-list-option.x-disabled{color:var(--x-text-500);cursor:not-allowed}.x-list-option.x-disabled:hover{background-color:inherit}.x-list-option.x-disabled>span x-icon{color:var(--x-text-500)}.x-list-option-big{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-option-large{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-option-medium{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-option-small{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-option-mini{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}body>x-list-option{display:block}body>x-list-option.cdk-drag-preview .x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>x-list-option.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XKeywordDirective, selector: "[x-keyword]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
312
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XListOptionComponent, isStandalone: true, selector: "x-list-option", host: { properties: { "attr.role": "this.role" } }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-list-option\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-selected]=\"selected()\"\r\n [class.x-disabled]=\"forbidden()\"\r\n [class.x-open-portal]=\"openPortal()\"\r\n [class.x-active]=\"active()\"\r\n [class.x-list-icon]=\"icon()\"\r\n [class.x-list-divided]=\"divided()\"\r\n>\r\n <div class=\"x-list-option-content\">\r\n @if (nodeTpl()) {\r\n <ng-template *ngTemplateOutlet=\"nodeTpl()!; context: { $node: node() }\"></ng-template>\r\n } @else {\r\n @if (icon()) {\r\n <x-icon class=\"x-list-option-icon\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span x-keyword [text]=\"keywordText()\" [caseSensitive]=\"caseSensitive()\">{{ label() }}</span>\r\n }\r\n </div>\r\n @if (leaf()) {\r\n <x-icon class=\"x-list-leaf\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n @if (checked() && !leaf() && selected()) {\r\n <x-icon class=\"x-list-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list-option{display:block}.x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-option-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;-webkit-user-select:none;user-select:none;display:inline-block}.x-list-option-icon{margin-right:.25rem}.x-list-option:not(:first-child){margin-top:var(--x-border-width)}.x-list-option:hover:not(.x-disabled),.x-list-option.x-active:not(.x-disabled){background-color:var(--x-background-a200)}.x-list-option.x-list-divided{position:relative;margin-top:.8125rem}.x-list-option.x-list-divided:before{content:\" \";position:absolute;top:0;left:0;width:100%;margin-top:-.5rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-list-option.x-selected:not(.x-disabled){background-color:var(--x-primary-900);color:var(--x-primary)}.x-list-option.x-selected:not(.x-disabled)>x-icon{color:var(--x-primary)}.x-list-option.x-disabled{color:var(--x-text-500);cursor:not-allowed}.x-list-option.x-disabled:hover{background-color:inherit}.x-list-option.x-disabled>span x-icon{color:var(--x-text-500)}.x-list-option-big{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-option-large{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-option-medium{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-option-small{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-option-mini{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}body>x-list-option{display:block}body>x-list-option.cdk-drag-preview .x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>x-list-option.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XKeywordDirective, selector: "[x-keyword]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
313
313
  }
314
314
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XListOptionComponent, decorators: [{
315
315
  type: Component,
316
- args: [{ selector: `${XListOptionPrefix}`, imports: [NgClass, NgTemplateOutlet, XIconComponent, XKeywordDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"x-list-option\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-selected]=\"selected()\"\r\n [class.x-disabled]=\"forbidden()\"\r\n [class.x-open-portal]=\"openPortal()\"\r\n [class.x-active]=\"active()\"\r\n [class.x-list-icon]=\"icon()\"\r\n [class.x-list-divided]=\"divided()\"\r\n>\r\n <div class=\"x-list-option-content\">\r\n @if (nodeTpl()) {\r\n <ng-template *ngTemplateOutlet=\"nodeTpl()!; context: { $node: node() }\"></ng-template>\r\n } @else {\r\n @if (icon()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n <span x-keyword [text]=\"keywordText()\" [caseSensitive]=\"caseSensitive()\">{{ label() }}</span>\r\n }\r\n </div>\r\n @if (leaf()) {\r\n <x-icon class=\"x-list-leaf\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n @if (checked() && !leaf() && selected()) {\r\n <x-icon class=\"x-list-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list-option{display:block}.x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-option-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;-webkit-user-select:none;user-select:none;display:inline-block}.x-list-option:not(:first-child){margin-top:var(--x-border-width)}.x-list-option:hover:not(.x-disabled),.x-list-option.x-active:not(.x-disabled){background-color:var(--x-background-a200)}.x-list-option.x-list-divided{margin-top:.8125rem}.x-list-option.x-list-divided:before{content:\" \";position:absolute;top:0;left:0;width:100%;margin-top:-.5rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-list-option.x-selected:not(.x-disabled){background-color:var(--x-primary-900);color:var(--x-primary)}.x-list-option.x-selected:not(.x-disabled)>x-icon{color:var(--x-primary)}.x-list-option.x-disabled{color:var(--x-text-500);cursor:not-allowed}.x-list-option.x-disabled:hover{background-color:inherit}.x-list-option.x-disabled>span x-icon{color:var(--x-text-500)}.x-list-option-big{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-option-large{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-option-medium{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-option-small{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-option-mini{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}body>x-list-option{display:block}body>x-list-option.cdk-drag-preview .x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>x-list-option.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
316
+ args: [{ selector: `${XListOptionPrefix}`, imports: [NgClass, NgTemplateOutlet, XIconComponent, XKeywordDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"x-list-option\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-selected]=\"selected()\"\r\n [class.x-disabled]=\"forbidden()\"\r\n [class.x-open-portal]=\"openPortal()\"\r\n [class.x-active]=\"active()\"\r\n [class.x-list-icon]=\"icon()\"\r\n [class.x-list-divided]=\"divided()\"\r\n>\r\n <div class=\"x-list-option-content\">\r\n @if (nodeTpl()) {\r\n <ng-template *ngTemplateOutlet=\"nodeTpl()!; context: { $node: node() }\"></ng-template>\r\n } @else {\r\n @if (icon()) {\r\n <x-icon class=\"x-list-option-icon\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span x-keyword [text]=\"keywordText()\" [caseSensitive]=\"caseSensitive()\">{{ label() }}</span>\r\n }\r\n </div>\r\n @if (leaf()) {\r\n <x-icon class=\"x-list-leaf\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n @if (checked() && !leaf() && selected()) {\r\n <x-icon class=\"x-list-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list-option{display:block}.x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;transition:border-color var(--x-animation-duration-base),background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-option-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;-webkit-user-select:none;user-select:none;display:inline-block}.x-list-option-icon{margin-right:.25rem}.x-list-option:not(:first-child){margin-top:var(--x-border-width)}.x-list-option:hover:not(.x-disabled),.x-list-option.x-active:not(.x-disabled){background-color:var(--x-background-a200)}.x-list-option.x-list-divided{position:relative;margin-top:.8125rem}.x-list-option.x-list-divided:before{content:\" \";position:absolute;top:0;left:0;width:100%;margin-top:-.5rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-list-option.x-selected:not(.x-disabled){background-color:var(--x-primary-900);color:var(--x-primary)}.x-list-option.x-selected:not(.x-disabled)>x-icon{color:var(--x-primary)}.x-list-option.x-disabled{color:var(--x-text-500);cursor:not-allowed}.x-list-option.x-disabled:hover{background-color:inherit}.x-list-option.x-disabled>span x-icon{color:var(--x-text-500)}.x-list-option-big{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-option-large{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-option-medium{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-option-small{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-option-mini{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}body>x-list-option{display:block}body>x-list-option.cdk-drag-preview .x-list-option{border-radius:var(--x-border-radius);display:flex;align-items:center;justify-content:space-between;border:.0625rem dashed transparent;border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.9}body>x-list-option.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
317
317
  }], ctorParameters: () => [], propDecorators: { role: [{
318
318
  type: HostBinding,
319
319
  args: ['attr.role']
@@ -711,7 +711,7 @@ class XListComponent extends XListProperty {
711
711
  this.nodes()[num].active = false;
712
712
  }
713
713
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
714
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XListComponent, isStandalone: true, selector: "x-list", host: { listeners: { "keydown": "keydown($event)" }, properties: { "attr.role": "this.role", "attr.tabindex": "this.tabindex" } }, providers: [XValueAccessor(XListComponent)], viewQueries: [{ propertyName: "headerRef", first: true, predicate: ["headerRef"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footerRef"], descendants: true, isSignal: true }, { propertyName: "selectAllRef", first: true, predicate: ["selectAllRef"], descendants: true, isSignal: true }, { propertyName: "loadMoreRef", first: true, predicate: ["loadMoreRef"], descendants: true, isSignal: true }, { propertyName: "virtualBody", first: true, predicate: ["virtualBody"], descendants: true, isSignal: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }, { propertyName: "options", predicate: XListOptionComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-list\" [class.x-list-portal]=\"inPortal()\" [ngClass]=\"classMap()\">\r\n @if (header()) {\r\n <div #headerRef class=\"x-list-header\" *xOutlet=\"header()\">{{ header() }}</div>\r\n }\r\n @if (selectAll() && multiple() === 0) {\r\n <div #selectAllRef class=\"x-list-select-all\">\r\n <x-list-option\r\n [size]=\"size()\"\r\n [label]=\"getSelectAllText()\"\r\n [checked]=\"true\"\r\n [selected]=\"isSelectAll()\"\r\n (click)=\"onSelectAllNodes()\"\r\n ></x-list-option>\r\n </div>\r\n }\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n class=\"x-list-content\"\r\n [style.height.px]=\"getVirtualScrollHeight()\"\r\n [hidden]=\"isEmpty()\"\r\n >\r\n <x-list-option\r\n *cdkVirtualFor=\"let node of nodes(); trackBy: trackByNode\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-list-content\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id) {\r\n <x-list-option\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n }\r\n </div>\r\n }\r\n @if (loadMore() && !isEmpty()) {\r\n <div #loadMoreRef class=\"x-list-load-more\">\r\n <x-list-option [size]=\"size()\" [nodeTpl]=\"loadMoreTpl\" (click)=\"onLoadMore()\"></x-list-option>\r\n </div>\r\n <ng-template #loadMoreTpl>\r\n @if (icon() && iconSpin()) {\r\n <x-icon [type]=\"icon()\" [spin]=\"iconSpin()\"></x-icon>\r\n }\r\n {{ icon() && iconSpin() ? getLoadingMoreText() : getLoadMoreText() }}</ng-template\r\n >\r\n }\r\n @if (isEmpty()) {\r\n <x-empty></x-empty>\r\n }\r\n @if (footer()) {\r\n <div #footerRef class=\"x-list-footer\" *xOutlet=\"footer()\">{{ footer() }}</div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list{width:100%}x-list:focus{outline:none}.x-list{margin:0;padding:0}.x-list{width:100%}.x-list:focus{outline:none}.x-list-select-all{cursor:pointer;font-weight:700}.x-list-load-more,.x-list-content{cursor:pointer}.x-list-content.cdk-drop-list-dragging x-list-option.cdk-drag-placeholder .x-list-option{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-list-content.cdk-drop-list-dragging x-list-option:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-list-header,.x-list-footer{font-weight:700}.x-list-portal{padding:.125rem .25rem}.x-list-portal x-list-option .x-list-option{padding:0 calc(var(--x-padding-medium) - .5rem);margin:.125rem 0;border-radius:var(--x-border-small-radius);transition:background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-leaf,.x-list-checked{right:0;margin-left:.4rem;color:var(--x-text-400)}.x-list-icon>span x-icon{color:var(--x-text-300);margin-right:.25rem}.x-list>x-empty{margin:1rem;display:block}.x-list-big .x-list-header,.x-list-big .x-list-footer{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-large .x-list-header,.x-list-large .x-list-footer{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-medium .x-list-header,.x-list-medium .x-list-footer{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-small .x-list-header,.x-list-small .x-list-footer{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-mini .x-list-header,.x-list-mini .x-list-footer{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XEmptyComponent, selector: "x-empty" }, { kind: "component", type: XListOptionComponent, selector: "x-list-option" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
714
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XListComponent, isStandalone: true, selector: "x-list", host: { listeners: { "keydown": "keydown($event)" }, properties: { "attr.role": "this.role", "attr.tabindex": "this.tabindex" } }, providers: [XValueAccessor(XListComponent)], viewQueries: [{ propertyName: "headerRef", first: true, predicate: ["headerRef"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footerRef"], descendants: true, isSignal: true }, { propertyName: "selectAllRef", first: true, predicate: ["selectAllRef"], descendants: true, isSignal: true }, { propertyName: "loadMoreRef", first: true, predicate: ["loadMoreRef"], descendants: true, isSignal: true }, { propertyName: "virtualBody", first: true, predicate: ["virtualBody"], descendants: true, isSignal: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }, { propertyName: "options", predicate: XListOptionComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-list\" [class.x-list-portal]=\"inPortal()\" [ngClass]=\"classMap()\">\r\n @if (header()) {\r\n <div #headerRef class=\"x-list-header\" *xOutlet=\"header()\">{{ header() }}</div>\r\n }\r\n @if (selectAll() && multiple() === 0) {\r\n <div #selectAllRef class=\"x-list-select-all\">\r\n <x-list-option\r\n [size]=\"size()\"\r\n [label]=\"getSelectAllText()\"\r\n [checked]=\"true\"\r\n [selected]=\"isSelectAll()\"\r\n (click)=\"onSelectAllNodes()\"\r\n ></x-list-option>\r\n </div>\r\n }\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n class=\"x-list-content\"\r\n [style.height.px]=\"getVirtualScrollHeight()\"\r\n [hidden]=\"isEmpty()\"\r\n >\r\n <x-list-option\r\n *cdkVirtualFor=\"let node of nodes(); trackBy: trackByNode\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [divided]=\"node.divided!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-list-content\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id) {\r\n <x-list-option\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [divided]=\"node.divided!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n }\r\n </div>\r\n }\r\n @if (loadMore() && !isEmpty()) {\r\n <div #loadMoreRef class=\"x-list-load-more\">\r\n <x-list-option [size]=\"size()\" [nodeTpl]=\"loadMoreTpl\" (click)=\"onLoadMore()\"></x-list-option>\r\n </div>\r\n <ng-template #loadMoreTpl>\r\n @if (icon() && iconSpin()) {\r\n <x-icon [type]=\"icon()\" [spin]=\"iconSpin()\"></x-icon>\r\n }\r\n {{ icon() && iconSpin() ? getLoadingMoreText() : getLoadMoreText() }}</ng-template\r\n >\r\n }\r\n @if (isEmpty()) {\r\n <x-empty></x-empty>\r\n }\r\n @if (footer()) {\r\n <div #footerRef class=\"x-list-footer\" *xOutlet=\"footer()\">{{ footer() }}</div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list{width:100%}x-list:focus{outline:none}.x-list{margin:0;padding:0}.x-list{width:100%}.x-list:focus{outline:none}.x-list-select-all{cursor:pointer;font-weight:700}.x-list-load-more,.x-list-content{cursor:pointer}.x-list-content.cdk-drop-list-dragging x-list-option.cdk-drag-placeholder .x-list-option{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-list-content.cdk-drop-list-dragging x-list-option:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-list-header,.x-list-footer{font-weight:700}.x-list-portal{padding:.125rem .25rem}.x-list-portal x-list-option .x-list-option{padding:0 calc(var(--x-padding-medium) - .5rem);margin:.125rem 0;border-radius:var(--x-border-small-radius);transition:background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-leaf,.x-list-checked{right:0;margin-left:.4rem;color:var(--x-text-400)}.x-list-icon>span x-icon{color:var(--x-text-300);margin-right:.25rem}.x-list>x-empty{margin:1rem;display:block}.x-list-big .x-list-header,.x-list-big .x-list-footer{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-large .x-list-header,.x-list-large .x-list-footer{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-medium .x-list-header,.x-list-medium .x-list-footer{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-small .x-list-header,.x-list-small .x-list-footer{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-mini .x-list-header,.x-list-mini .x-list-footer{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XEmptyComponent, selector: "x-empty" }, { kind: "component", type: XListOptionComponent, selector: "x-list-option" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
715
715
  }
716
716
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XListComponent, decorators: [{
717
717
  type: Component,
@@ -726,7 +726,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
726
726
  XEmptyComponent,
727
727
  XListOptionComponent,
728
728
  XOutletDirective
729
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XListComponent)], template: "<div class=\"x-list\" [class.x-list-portal]=\"inPortal()\" [ngClass]=\"classMap()\">\r\n @if (header()) {\r\n <div #headerRef class=\"x-list-header\" *xOutlet=\"header()\">{{ header() }}</div>\r\n }\r\n @if (selectAll() && multiple() === 0) {\r\n <div #selectAllRef class=\"x-list-select-all\">\r\n <x-list-option\r\n [size]=\"size()\"\r\n [label]=\"getSelectAllText()\"\r\n [checked]=\"true\"\r\n [selected]=\"isSelectAll()\"\r\n (click)=\"onSelectAllNodes()\"\r\n ></x-list-option>\r\n </div>\r\n }\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n class=\"x-list-content\"\r\n [style.height.px]=\"getVirtualScrollHeight()\"\r\n [hidden]=\"isEmpty()\"\r\n >\r\n <x-list-option\r\n *cdkVirtualFor=\"let node of nodes(); trackBy: trackByNode\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-list-content\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id) {\r\n <x-list-option\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n }\r\n </div>\r\n }\r\n @if (loadMore() && !isEmpty()) {\r\n <div #loadMoreRef class=\"x-list-load-more\">\r\n <x-list-option [size]=\"size()\" [nodeTpl]=\"loadMoreTpl\" (click)=\"onLoadMore()\"></x-list-option>\r\n </div>\r\n <ng-template #loadMoreTpl>\r\n @if (icon() && iconSpin()) {\r\n <x-icon [type]=\"icon()\" [spin]=\"iconSpin()\"></x-icon>\r\n }\r\n {{ icon() && iconSpin() ? getLoadingMoreText() : getLoadMoreText() }}</ng-template\r\n >\r\n }\r\n @if (isEmpty()) {\r\n <x-empty></x-empty>\r\n }\r\n @if (footer()) {\r\n <div #footerRef class=\"x-list-footer\" *xOutlet=\"footer()\">{{ footer() }}</div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list{width:100%}x-list:focus{outline:none}.x-list{margin:0;padding:0}.x-list{width:100%}.x-list:focus{outline:none}.x-list-select-all{cursor:pointer;font-weight:700}.x-list-load-more,.x-list-content{cursor:pointer}.x-list-content.cdk-drop-list-dragging x-list-option.cdk-drag-placeholder .x-list-option{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-list-content.cdk-drop-list-dragging x-list-option:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-list-header,.x-list-footer{font-weight:700}.x-list-portal{padding:.125rem .25rem}.x-list-portal x-list-option .x-list-option{padding:0 calc(var(--x-padding-medium) - .5rem);margin:.125rem 0;border-radius:var(--x-border-small-radius);transition:background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-leaf,.x-list-checked{right:0;margin-left:.4rem;color:var(--x-text-400)}.x-list-icon>span x-icon{color:var(--x-text-300);margin-right:.25rem}.x-list>x-empty{margin:1rem;display:block}.x-list-big .x-list-header,.x-list-big .x-list-footer{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-large .x-list-header,.x-list-large .x-list-footer{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-medium .x-list-header,.x-list-medium .x-list-footer{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-small .x-list-header,.x-list-small .x-list-footer{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-mini .x-list-header,.x-list-mini .x-list-footer{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"] }]
729
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XListComponent)], template: "<div class=\"x-list\" [class.x-list-portal]=\"inPortal()\" [ngClass]=\"classMap()\">\r\n @if (header()) {\r\n <div #headerRef class=\"x-list-header\" *xOutlet=\"header()\">{{ header() }}</div>\r\n }\r\n @if (selectAll() && multiple() === 0) {\r\n <div #selectAllRef class=\"x-list-select-all\">\r\n <x-list-option\r\n [size]=\"size()\"\r\n [label]=\"getSelectAllText()\"\r\n [checked]=\"true\"\r\n [selected]=\"isSelectAll()\"\r\n (click)=\"onSelectAllNodes()\"\r\n ></x-list-option>\r\n </div>\r\n }\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n class=\"x-list-content\"\r\n [style.height.px]=\"getVirtualScrollHeight()\"\r\n [hidden]=\"isEmpty()\"\r\n >\r\n <x-list-option\r\n *cdkVirtualFor=\"let node of nodes(); trackBy: trackByNode\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [divided]=\"node.divided!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-list-content\"\r\n cdkDropList\r\n (cdkDropListDropped)=\"dropCdk($event)\"\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id) {\r\n <x-list-option\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n [node]=\"node\"\r\n [checked]=\"checked()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [selected]=\"node.selected!\"\r\n [forbidden]=\"node.disabled!\"\r\n [active]=\"node.active!\"\r\n (activeChange)=\"node.active = $event\"\r\n [openPortal]=\"node.openPortal!\"\r\n [icon]=\"node.icon\"\r\n [label]=\"node.label\"\r\n [leaf]=\"node.leaf!\"\r\n [divided]=\"node.divided!\"\r\n [size]=\"size()\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n (click)=\"onNodeClick($event, node)\"\r\n (mouseenter)=\"onMouseenter($event, node)\"\r\n (mouseleave)=\"onMouseleave($event, node)\"\r\n ></x-list-option>\r\n }\r\n </div>\r\n }\r\n @if (loadMore() && !isEmpty()) {\r\n <div #loadMoreRef class=\"x-list-load-more\">\r\n <x-list-option [size]=\"size()\" [nodeTpl]=\"loadMoreTpl\" (click)=\"onLoadMore()\"></x-list-option>\r\n </div>\r\n <ng-template #loadMoreTpl>\r\n @if (icon() && iconSpin()) {\r\n <x-icon [type]=\"icon()\" [spin]=\"iconSpin()\"></x-icon>\r\n }\r\n {{ icon() && iconSpin() ? getLoadingMoreText() : getLoadMoreText() }}</ng-template\r\n >\r\n }\r\n @if (isEmpty()) {\r\n <x-empty></x-empty>\r\n }\r\n @if (footer()) {\r\n <div #footerRef class=\"x-list-footer\" *xOutlet=\"footer()\">{{ footer() }}</div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-list{width:100%}x-list:focus{outline:none}.x-list{margin:0;padding:0}.x-list{width:100%}.x-list:focus{outline:none}.x-list-select-all{cursor:pointer;font-weight:700}.x-list-load-more,.x-list-content{cursor:pointer}.x-list-content.cdk-drop-list-dragging x-list-option.cdk-drag-placeholder .x-list-option{border-color:var(--x-primary);color:var(--x-primary);background-color:var(--x-background);opacity:.8}.x-list-content.cdk-drop-list-dragging x-list-option:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}.x-list-header,.x-list-footer{font-weight:700}.x-list-portal{padding:.125rem .25rem}.x-list-portal x-list-option .x-list-option{padding:0 calc(var(--x-padding-medium) - .5rem);margin:.125rem 0;border-radius:var(--x-border-small-radius);transition:background-color var(--x-animation-duration-base),color var(--x-animation-duration-base)}.x-list-leaf,.x-list-checked{right:0;margin-left:.4rem;color:var(--x-text-400)}.x-list-icon>span x-icon{color:var(--x-text-300);margin-right:.25rem}.x-list>x-empty{margin:1rem;display:block}.x-list-big .x-list-header,.x-list-big .x-list-footer{padding:0 var(--x-padding-big);height:var(--x-height-big);line-height:var(--x-height-big)}.x-list-large .x-list-header,.x-list-large .x-list-footer{padding:0 var(--x-padding-large);height:var(--x-height-large);line-height:var(--x-height-large)}.x-list-medium .x-list-header,.x-list-medium .x-list-footer{padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-list-small .x-list-header,.x-list-small .x-list-footer{padding:0 var(--x-padding-small);height:var(--x-height-small);line-height:var(--x-height-small)}.x-list-mini .x-list-header,.x-list-mini .x-list-footer{padding:0 var(--x-padding-mini);height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"] }]
730
730
  }], ctorParameters: () => [], propDecorators: { options: [{
731
731
  type: ViewChildren,
732
732
  args: [XListOptionComponent]