@ng-nest/ui 21.0.3 → 21.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-nest-ui-affix.mjs +12 -12
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +22 -24
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +19 -19
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-attachments.mjs +22 -22
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +26 -30
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +17 -17
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +13 -13
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +16 -16
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +13 -13
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +20 -20
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +31 -31
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +10 -10
- package/fesm2022/ng-nest-ui-card.mjs +11 -11
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +24 -24
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +25 -29
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +22 -22
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +22 -22
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +25 -25
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +10 -10
- package/fesm2022/ng-nest-ui-comment.mjs +19 -19
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +34 -34
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +18 -18
- package/fesm2022/ng-nest-ui-coversations.mjs +11 -11
- package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +87 -87
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +20 -20
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +58 -58
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drawer.mjs +34 -34
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +21 -21
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +10 -10
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-find.mjs +31 -35
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +21 -21
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +14 -14
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +32 -31
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +14 -14
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +21 -21
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +21 -21
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +36 -40
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +11 -11
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +25 -25
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +13 -13
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +41 -41
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +14 -14
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +22 -22
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-outlet.mjs +7 -7
- package/fesm2022/ng-nest-ui-page-header.mjs +10 -10
- package/fesm2022/ng-nest-ui-pagination.mjs +27 -31
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-popconfirm.mjs +14 -14
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +19 -19
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +7 -7
- package/fesm2022/ng-nest-ui-progress.mjs +22 -22
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-prompts.mjs +12 -12
- package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +20 -20
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +15 -15
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +14 -14
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +10 -10
- package/fesm2022/ng-nest-ui-ripple.mjs +12 -12
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +19 -7
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +35 -39
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +19 -19
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +13 -13
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +21 -21
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +16 -18
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +16 -16
- package/fesm2022/ng-nest-ui-steps.mjs +14 -14
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-suggestion.mjs +17 -17
- package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +15 -15
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +58 -58
- package/fesm2022/ng-nest-ui-table.mjs +90 -112
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +38 -40
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +16 -16
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +11 -11
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +19 -19
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +12 -12
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-thought-chain.mjs +12 -12
- package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +28 -28
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-timeline.mjs +12 -12
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +17 -17
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +14 -14
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +17 -17
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +36 -42
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +44 -46
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +10 -10
- package/fesm2022/ng-nest-ui-upload.mjs +24 -24
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +10 -10
- package/package.json +1 -1
- package/types/ng-nest-ui-i18n.d.ts +13 -11
- package/types/ng-nest-ui-scrollable.d.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_COLLAPSE_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ selector: `${XCollapsePrefix}-property`, template: '' })\r\nexport class XCollapseProperty extends XPropertyFunction(X_COLLAPSE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse accordion>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly accordion = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse [icon]=\"iconTpl\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #iconTpl>\r\n * <x-icon type=\"ado-caret-right\"></x-icon>\r\n * </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse showIcon=\"false\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly showIcon = input<boolean, XBoolean>(this.config?.showIcon ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse iconPosition=\"left\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly iconPosition = input<XCollapseIconPosition>(this.config?.iconPosition ?? 'right');\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse ghost>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly ghost = input<boolean, XBoolean>(this.config?.ghost ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse bordered>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ selector: `${XCollapsePanelPrefix}-property`, template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel [label]=\"labelTpl\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #labelTpl>Title 2</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" active></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US disabled\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" disabled></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty {\r\n start = signal(0);\r\n panelChanges = signal<(() => void)[]>([]);\r\n active = signal<number[]>([]);\r\n\r\n change(num: number, add = true) {\r\n const i = this.active().indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active.update((x) => [...x, num]);\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.update((x) => {\r\n x.splice(i, 1);\r\n return [...x];\r\n });\r\n }\r\n }\r\n if (this.accordion() && this.active().length === 2) {\r\n const panel = this.panelChanges()[this.active()[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, inject, signal } from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n imports: [XIconComponent, XOutletDirective],\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index = signal<number>(0);\r\n collapseComponent = inject(XCollapseComponent, { optional: true, host: true });\r\n activeSignal = signal(false);\r\n\r\n ngOnInit() {\r\n if (!this.collapseComponent) return;\r\n this.activeSignal.set(this.active());\r\n this.index.set(this.collapseComponent.start());\r\n this.collapseComponent.start.update((x) => x + 1);\r\n this.collapseComponent.panelChanges.update((x) => {\r\n x.push(() => {\r\n this.headerClick();\r\n });\r\n return [...x];\r\n });\r\n if (this.activeSignal()) {\r\n this.collapseComponent.change(this.index());\r\n }\r\n }\r\n\r\n headerClick() {\r\n this.activeSignal.update((x) => !x);\r\n if (!this.collapseComponent) return;\r\n if (this.activeSignal()) this.collapseComponent.change(this.index());\r\n else this.collapseComponent.change(this.index(), false);\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n\r\n <div class=\"x-collapse-panel-body\" [class.x-collapse-panel-active]=\"activeSignal()\">\r\n <div class=\"x-collapse-panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\n\r\n@NgModule({\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [XCollapseComponent, XCollapsePanelComponent]\r\n})\r\nexport class XCollapseModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AADhF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;AAYG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,KAAK,6CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAC;AAC/E;;;;;;;;;;;;;;;AAeG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AAClC;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,QAAQ,IAAI,IAAI,4CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA,CAAA,CAAC;AACtG;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK,CAAwB,IAAI,CAAC,MAAM,EAAE,YAAY,IAAI,OAAO,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAC1F;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,KAAK,yCAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAA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AA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAD3C,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAG1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFI,uBAAuB,CAAA,EAAA,CAAA,CAAA;;2FAE1C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XPropertyFunction, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_COLLAPSE_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ selector: `${XCollapsePrefix}-property`, template: '' })\r\nexport class XCollapseProperty extends XPropertyFunction(X_COLLAPSE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse accordion>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly accordion = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse [icon]=\"iconTpl\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #iconTpl>\r\n * <x-icon type=\"ado-caret-right\"></x-icon>\r\n * </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse showIcon=\"false\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly showIcon = input<boolean, XBoolean>(this.config?.showIcon ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse iconPosition=\"left\">\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly iconPosition = input<XCollapseIconPosition>(this.config?.iconPosition ?? 'right');\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse ghost>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly ghost = input<boolean, XBoolean>(this.config?.ghost ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse bordered>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\"></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly bordered = input<boolean, XBoolean>(this.config?.bordered ?? false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ selector: `${XCollapsePanelPrefix}-property`, template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel [label]=\"labelTpl\"></x-collapse-panel>\r\n * </x-collapse>\r\n * <ng-template #labelTpl>Title 2</ng-template>\r\n * ```\r\n *\r\n */\r\n readonly label = input<XTemplate>();\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" active></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly active = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US disabled\r\n * @example\r\n *\r\n * ```html\r\n * <x-collapse>\r\n * <x-collapse-panel label=\"Title 1\"></x-collapse-panel>\r\n * <x-collapse-panel label=\"Title 2\" disabled></x-collapse-panel>\r\n * </x-collapse>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty {\r\n start = signal(0);\r\n panelChanges = signal<(() => void)[]>([]);\r\n active = signal<number[]>([]);\r\n\r\n change(num: number, add = true) {\r\n const i = this.active().indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active.update((x) => [...x, num]);\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.update((x) => {\r\n x.splice(i, 1);\r\n return [...x];\r\n });\r\n }\r\n }\r\n if (this.accordion() && this.active().length === 2) {\r\n const panel = this.panelChanges()[this.active()[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost()\" [class.x-collapse-bordered]=\"bordered()\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, inject, signal } from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n imports: [XIconComponent, XOutletDirective],\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index = signal<number>(0);\r\n collapseComponent = inject(XCollapseComponent, { optional: true, host: true });\r\n activeSignal = signal(false);\r\n\r\n ngOnInit() {\r\n if (!this.collapseComponent) return;\r\n this.activeSignal.set(this.active());\r\n this.index.set(this.collapseComponent.start());\r\n this.collapseComponent.start.update((x) => x + 1);\r\n this.collapseComponent.panelChanges.update((x) => {\r\n x.push(() => {\r\n this.headerClick();\r\n });\r\n return [...x];\r\n });\r\n if (this.activeSignal()) {\r\n this.collapseComponent.change(this.index());\r\n }\r\n }\r\n\r\n headerClick() {\r\n this.activeSignal.update((x) => !x);\r\n if (!this.collapseComponent) return;\r\n if (this.activeSignal()) this.collapseComponent.change(this.index());\r\n else this.collapseComponent.change(this.index(), false);\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"activeSignal()\" [class.x-collapse-panel-disabled]=\"disabled()\">\r\n <div\r\n class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent?.iconPosition() }}\"\r\n (click)=\"!disabled() && headerClick()\"\r\n >\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label()\">{{ label() }}</ng-container>\r\n </div>\r\n @if (collapseComponent?.showIcon()) {\r\n <ng-container *xOutlet=\"collapseComponent?.icon()\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n }\r\n </div>\r\n\r\n <div class=\"x-collapse-panel-body\" [class.x-collapse-panel-active]=\"activeSignal()\">\r\n <div class=\"x-collapse-panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\n\r\n@NgModule({\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [XCollapseComponent, XCollapsePanelComponent]\r\n})\r\nexport class XCollapseModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AADhF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,KAAK,sDAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAC/E;;;;;;;;;;;;;;;AAeG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AAClC;;;;;;;;;;;;AAYG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,QAAQ,IAAI,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,GAAA,EAAA,CAAA,EAAI,SAAS,EAAE,UAAU,GAAG;AACtG;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK,CAAwB,IAAI,CAAC,MAAM,EAAE,YAAY,IAAI,OAAO,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAC1F;;;;;;;;;;;;AAYG;AACM,QAAA,IAA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AAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAD3C,kBAAkB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAG1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFI,uBAAuB,CAAA,EAAA,CAAA,CAAA;;2FAE1C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -42,12 +42,12 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
42
42
|
* @zh_CN 清除按钮
|
|
43
43
|
* @en_US Clear button
|
|
44
44
|
*/
|
|
45
|
-
this.clearable = input(this.config?.clearable ?? true, ...(ngDevMode ?
|
|
45
|
+
this.clearable = input(this.config?.clearable ?? true, { ...(ngDevMode ? { debugName: "clearable" } : {}), transform: XToBoolean });
|
|
46
46
|
/**
|
|
47
47
|
* @zh_CN 显示边框
|
|
48
48
|
* @en_US Display Border
|
|
49
49
|
*/
|
|
50
|
-
this.bordered = input(this.config?.bordered ?? true, ...(ngDevMode ?
|
|
50
|
+
this.bordered = input(this.config?.bordered ?? true, { ...(ngDevMode ? { debugName: "bordered" } : {}), transform: XToBoolean });
|
|
51
51
|
/**
|
|
52
52
|
* @zh_CN 输入框样式
|
|
53
53
|
* @en_US Input Style
|
|
@@ -62,7 +62,7 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
62
62
|
* @zh_CN 固定浮动标签
|
|
63
63
|
* @en_US Fixed float label
|
|
64
64
|
*/
|
|
65
|
-
this.floatFixed = input(this.config?.floatFixed ?? false, ...(ngDevMode ?
|
|
65
|
+
this.floatFixed = input(this.config?.floatFixed ?? false, { ...(ngDevMode ? { debugName: "floatFixed" } : {}), transform: XToBoolean });
|
|
66
66
|
/**
|
|
67
67
|
/**
|
|
68
68
|
* @zh_CN 尺寸
|
|
@@ -73,7 +73,7 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
73
73
|
* @zh_CN 输入框点击样式
|
|
74
74
|
* @en_US Input pointer
|
|
75
75
|
*/
|
|
76
|
-
this.pointer = input(true, ...(ngDevMode ?
|
|
76
|
+
this.pointer = input(true, { ...(ngDevMode ? { debugName: "pointer" } : {}), transform: XToBoolean });
|
|
77
77
|
/**
|
|
78
78
|
* @zh_CN 标签
|
|
79
79
|
* @en_US Label
|
|
@@ -83,7 +83,7 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
83
83
|
* @zh_CN 标签宽度
|
|
84
84
|
* @en_US Label width
|
|
85
85
|
*/
|
|
86
|
-
this.labelWidth = input('', ...(ngDevMode ?
|
|
86
|
+
this.labelWidth = input('', { ...(ngDevMode ? { debugName: "labelWidth" } : {}), transform: XToCssPixelValue });
|
|
87
87
|
/**
|
|
88
88
|
* @zh_CN 标签文字对齐方式
|
|
89
89
|
* @en_US Label text alignment method
|
|
@@ -113,17 +113,17 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
113
113
|
* @zh_CN 禁用
|
|
114
114
|
* @en_US Disabled
|
|
115
115
|
*/
|
|
116
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
116
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: XToBoolean });
|
|
117
117
|
/**
|
|
118
118
|
* @zh_CN 必填
|
|
119
119
|
* @en_US Required
|
|
120
120
|
*/
|
|
121
|
-
this.required = input(false, ...(ngDevMode ?
|
|
121
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: XToBoolean });
|
|
122
122
|
/**
|
|
123
123
|
* @zh_CN 只读
|
|
124
124
|
* @en_US Readonly
|
|
125
125
|
*/
|
|
126
|
-
this.readonly = input(true, ...(ngDevMode ?
|
|
126
|
+
this.readonly = input(true, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: XToBoolean });
|
|
127
127
|
/**
|
|
128
128
|
* @zh_CN 值模板
|
|
129
129
|
* @en_US Node template
|
|
@@ -165,10 +165,10 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
|
|
|
165
165
|
*/
|
|
166
166
|
this.inputValidator = input(...(ngDevMode ? [undefined, { debugName: "inputValidator" }] : []));
|
|
167
167
|
}
|
|
168
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
169
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
168
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: XColorPickerProperty, isStandalone: true, selector: "x-color-picker-property", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatFixed: { classPropertyName: "floatFixed", publicName: "floatFixed", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, pointer: { classPropertyName: "pointer", publicName: "pointer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, labelAlign: { classPropertyName: "labelAlign", publicName: "labelAlign", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTplContext: { classPropertyName: "valueTplContext", publicName: "valueTplContext", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, inputValidator: { classPropertyName: "inputValidator", publicName: "inputValidator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
170
170
|
}
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerProperty, decorators: [{
|
|
172
172
|
type: Component,
|
|
173
173
|
args: [{ selector: `${XColorPickerPrefix}-property`, template: '' }]
|
|
174
174
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatFixed: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatFixed", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], pointer: [{ type: i0.Input, args: [{ isSignal: true, alias: "pointer", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], labelAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }], valueTplContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTplContext", required: false }] }], before: [{ type: i0.Input, args: [{ isSignal: true, alias: "before", required: false }] }], after: [{ type: i0.Input, args: [{ isSignal: true, alias: "after", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], inputValidator: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputValidator", required: false }] }] } });
|
|
@@ -560,10 +560,10 @@ class XColorPickerPortalComponent {
|
|
|
560
560
|
}
|
|
561
561
|
return result;
|
|
562
562
|
}
|
|
563
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
564
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
563
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
564
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.6", type: XColorPickerPortalComponent, isStandalone: true, selector: "x-color-picker-portal", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputCom: { classPropertyName: "inputCom", publicName: "inputCom", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, panelTemplate: { classPropertyName: "panelTemplate", publicName: "panelTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", animating: "animating", nodeClick: "nodeClick" }, host: { listeners: { "animationend": "done()", "animationstart": "start()" }, properties: { "animate.enter": "this.animateEnter", "animate.leave": "this.animateLeave" } }, providers: [DecimalPipe, PercentPipe], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panelRef"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "plateRef", first: true, predicate: ["plateRef"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "transparentCom", first: true, predicate: ["transparentCom"], descendants: true, read: XSliderSelectComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"x-color-picker-portal\" tabindex=\"-1\" (click)=\"stopPropagation($event)\">\r\n <div #panelRef class=\"x-color-picker-portal-panel\">\r\n <div #plateRef class=\"x-color-picker-portal-plate\" (click)=\"plateClick($event)\">\r\n <div class=\"x-color-picker-portal-white\"></div>\r\n <div class=\"x-color-picker-portal-black\"></div>\r\n <div\r\n #dragCom\r\n class=\"x-color-picker-portal-cursor\"\r\n [style.left.px]=\"transformX()\"\r\n [style.top.px]=\"transformY()\"\r\n cdkDrag\r\n [cdkDragBoundary]=\"panelRef\"\r\n (cdkDragStarted)=\"started()\"\r\n (cdkDragEnded)=\"ended()\"\r\n (cdkDragMoved)=\"moved($event)\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div class=\"x-color-picker-portal-tool\">\r\n <div class=\"x-color-picker-portal-operations\">\r\n <!-- <x-button icon=\"fto-edit-2\" onlyIcon></x-button> -->\r\n <div class=\"x-color-picker-portal-selected\">\r\n <div [style.background-color]=\"value()\"></div>\r\n </div>\r\n <div class=\"x-color-picker-portal-area\">\r\n <div class=\"x-color-picker-portal-slider\">\r\n <x-slider-select\r\n [style.width.%]=\"100\"\r\n [(ngModel)]=\"hsla().h\"\r\n min=\"0\"\r\n max=\"360\"\r\n step=\"1\"\r\n (dragStartEmit)=\"started()\"\r\n (dragEndEmit)=\"ended()\"\r\n (ngModelChange)=\"hueChange()\"\r\n ></x-slider-select>\r\n </div>\r\n <div class=\"x-color-picker-portal-transparent\">\r\n <x-slider-select\r\n [style.width.%]=\"100\"\r\n #transparentCom\r\n [(ngModel)]=\"hsla().a\"\r\n min=\"0\"\r\n max=\"1\"\r\n step=\"0.01\"\r\n (dragStarted)=\"started()\"\r\n (dragEnded)=\"ended()\"\r\n (ngModelChange)=\"transparentChange()\"\r\n ></x-slider-select>\r\n <div class=\"x-color-picker-portal-alpha\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-color-picker-portal-type\">\r\n <x-tabs animated=\"false\" justify=\"center\">\r\n <x-tab label=\"HEX\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [style.width.%]=\"100\" [(ngModel)]=\"hex\" (ngModelChange)=\"hexChange()\"></x-input>\r\n </div>\r\n </x-tab>\r\n <x-tab label=\"RGBA\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [(ngModel)]=\"rgba().r\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().g\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().b\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().a\" disabled></x-input>\r\n </div>\r\n </x-tab>\r\n <x-tab label=\"HSLA\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [(ngModel)]=\"hsla().h\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().sp\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().lp\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().a\" disabled></x-input>\r\n </div>\r\n </x-tab>\r\n </x-tabs>\r\n </div>\r\n <div class=\"x-color-picker-panel\">\r\n <ng-container *ngTemplateOutlet=\"panelTemplate()!\"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.x-color-picker-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);background-color:var(--x-background-100);width:17rem;overflow:hidden}.x-color-picker-portal:focus{outline:none}.x-color-picker-portal-panel{padding:.375rem;margin:-.375rem}.x-color-picker-portal-plate{width:100%;height:8rem;display:flex;border-radius:var(--x-border-small-radius);position:relative}.x-color-picker-portal-white,.x-color-picker-portal-black{position:absolute;inset:0}.x-color-picker-portal-white{background:linear-gradient(90deg,#fff,#fff0)}.x-color-picker-portal-black{background:linear-gradient(0deg,#000,transparent)}.x-color-picker-portal-cursor{position:absolute;width:.75rem;height:.75rem;display:inline-block;border-radius:50%;border:.0625rem solid var(--x-background-100)}.x-color-picker-portal-tool{padding:.4rem}.x-color-picker-portal-operations{display:flex;align-items:center;padding:.4rem 0}.x-color-picker-portal-selected{margin-left:.4rem;width:2rem;height:2rem;border-radius:2rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.x-color-picker-portal-selected>div{width:2rem;height:2rem;border-radius:2rem}.x-color-picker-portal-area{margin-left:.4rem;position:relative;flex:1}.x-color-picker-portal-area .x-slider-select:hover:not(.x-disabled) .x-slider-select-process{background-color:transparent}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner .x-slider-select-rail{height:.75rem}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner .x-slider-select-process{background-color:transparent}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner>.x-slider-select-drags>.x-slider-select-drag>.x-slider-select-button{border-color:var(--x-border);box-shadow:var(--x-box-shadow)}.x-color-picker-portal-slider{position:relative;width:100%;display:flex;align-items:center}.x-color-picker-portal-slider .x-slider-select>.x-slider-select-inner>.x-slider-select-rail{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.x-color-picker-portal-transparent{position:relative;width:100%;display:flex;align-items:center}.x-color-picker-portal-transparent .x-slider-select>.x-slider-select-inner>.x-slider-select-rail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.x-color-picker-portal-type .x-tabs .x-tabs-list{display:flex;justify-content:center}.x-color-picker-portal-type-content{padding:.25rem;display:flex}.x-color-picker-portal-type-content .x-input .x-input-row input{text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: XSliderSelectComponent, selector: "x-slider-select" }, { kind: "component", type: XTabsComponent, selector: "x-tabs" }, { kind: "component", type: XTabComponent, selector: "x-tab" }, { kind: "component", type: XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
565
565
|
}
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerPortalComponent, decorators: [{
|
|
567
567
|
type: Component,
|
|
568
568
|
args: [{ selector: `${XColorPickerPortalPrefix}`, imports: [
|
|
569
569
|
FormsModule,
|
|
@@ -920,17 +920,17 @@ class XColorPickerComponent extends XColorPickerProperty {
|
|
|
920
920
|
setPortal() {
|
|
921
921
|
this.portalAttached() && this.portalOverlayRef()?.updatePositionStrategy(this.setPlacement());
|
|
922
922
|
}
|
|
923
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
924
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
923
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
924
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.6", type: XColorPickerComponent, isStandalone: true, selector: "x-color-picker", providers: [XValueAccessor(XColorPickerComponent)], viewQueries: [{ propertyName: "colorPicker", first: true, predicate: ["colorPicker"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, read: XInputComponent, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable() && inputClearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyleComputed()\"\r\n [attr.title]=\"inputStyleComputed().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
925
925
|
}
|
|
926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerComponent, decorators: [{
|
|
927
927
|
type: Component,
|
|
928
928
|
args: [{ selector: 'x-color-picker', imports: [FormsModule, ReactiveFormsModule, XInputComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XColorPickerComponent)], template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable() && inputClearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyleComputed()\"\r\n [attr.title]=\"inputStyleComputed().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\n"] }]
|
|
929
929
|
}], ctorParameters: () => [], propDecorators: { colorPicker: [{ type: i0.ViewChild, args: ['colorPicker', { ...{ read: (ElementRef) }, isSignal: true }] }], inputCom: [{ type: i0.ViewChild, args: ['inputCom', { ...{ read: XInputComponent }, isSignal: true }] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTemplate', { isSignal: true }] }] } });
|
|
930
930
|
|
|
931
931
|
class XColorPickerOptionDirective {
|
|
932
932
|
constructor() {
|
|
933
|
-
this.color = input.required(...(ngDevMode ?
|
|
933
|
+
this.color = input.required({ ...(ngDevMode ? { debugName: "color" } : {}), alias: 'x-color-picker-option' });
|
|
934
934
|
this.colorPicker = inject(XColorPickerComponent, { optional: true });
|
|
935
935
|
}
|
|
936
936
|
onSelectClick() {
|
|
@@ -940,10 +940,10 @@ class XColorPickerOptionDirective {
|
|
|
940
940
|
if (this.colorPicker.onChange)
|
|
941
941
|
this.colorPicker.onChange(this.colorPicker.value());
|
|
942
942
|
}
|
|
943
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
944
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
943
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
944
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: XColorPickerOptionDirective, isStandalone: true, selector: "[x-color-picker-option], x-color-picker-option", inputs: { color: { classPropertyName: "color", publicName: "x-color-picker-option", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onSelectClick()" } }, ngImport: i0 }); }
|
|
945
945
|
}
|
|
946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerOptionDirective, decorators: [{
|
|
947
947
|
type: Directive,
|
|
948
948
|
args: [{
|
|
949
949
|
selector: `[x-color-picker-option], x-color-picker-option`
|
|
@@ -954,11 +954,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
954
954
|
}] } });
|
|
955
955
|
|
|
956
956
|
class XColorPickerModule {
|
|
957
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
958
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.
|
|
959
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.
|
|
957
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
958
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerModule, imports: [XColorPickerComponent, XColorPickerOptionDirective], exports: [XColorPickerComponent, XColorPickerOptionDirective] }); }
|
|
959
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerModule, imports: [XColorPickerComponent] }); }
|
|
960
960
|
}
|
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XColorPickerModule, decorators: [{
|
|
962
962
|
type: NgModule,
|
|
963
963
|
args: [{
|
|
964
964
|
imports: [XColorPickerComponent, XColorPickerOptionDirective],
|