@ng-nest/ui 20.1.6 → 20.2.0
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/attachments/index.d.ts +277 -0
- package/auto-complete/index.d.ts +11 -2
- package/card/index.d.ts +12 -2
- package/cascade/index.d.ts +2 -1
- package/collapse/index.d.ts +0 -3
- package/color-picker/index.d.ts +2 -1
- package/core/index.d.ts +41 -43
- package/date-picker/index.d.ts +20 -4
- package/dialog/index.d.ts +8 -10
- package/drawer/index.d.ts +10 -12
- package/dropdown/index.d.ts +32 -9
- package/fesm2022/ng-nest-ui-affix.mjs +11 -11
- package/fesm2022/ng-nest-ui-alert.mjs +13 -13
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +18 -18
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-attachments.mjs +331 -0
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -0
- package/fesm2022/ng-nest-ui-auto-complete.mjs +36 -26
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +18 -18
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +12 -12
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +13 -13
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +8 -8
- 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 +19 -19
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +11 -11
- package/fesm2022/ng-nest-ui-card.mjs +20 -14
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +21 -21
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +27 -25
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +12 -12
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +20 -28
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +31 -29
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +11 -11
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +18 -18
- package/fesm2022/ng-nest-ui-container.mjs +35 -35
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +48 -148
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-coversations.mjs +11 -11
- package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
- package/fesm2022/ng-nest-ui-date-picker.mjs +92 -78
- 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 +68 -67
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drag.mjs +11 -11
- package/fesm2022/ng-nest-ui-drawer.mjs +67 -84
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +182 -58
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +11 -11
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs +12 -12
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +19 -19
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +15 -15
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +14 -14
- 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 +22 -22
- 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 +12 -12
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +19 -19
- 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 +18 -18
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +12 -12
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +52 -28
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +12 -12
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +18 -18
- 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 +8 -8
- package/fesm2022/ng-nest-ui-page-header.mjs +11 -11
- package/fesm2022/ng-nest-ui-pagination.mjs +11 -11
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popconfirm.mjs +11 -11
- package/fesm2022/ng-nest-ui-popover.mjs +25 -21
- 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 +11 -11
- package/fesm2022/ng-nest-ui-prompts.mjs +17 -12
- package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +12 -12
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +12 -12
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +11 -11
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +11 -11
- package/fesm2022/ng-nest-ui-ripple.mjs +11 -11
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +8 -8
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +37 -26
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +19 -18
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +11 -11
- package/fesm2022/ng-nest-ui-slider-select.mjs +13 -13
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +12 -12
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +18 -18
- package/fesm2022/ng-nest-ui-steps.mjs +11 -11
- package/fesm2022/ng-nest-ui-suggestion.mjs +110 -0
- package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -0
- package/fesm2022/ng-nest-ui-switch.mjs +12 -12
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +60 -60
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +58 -47
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +30 -30
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +22 -18
- 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-textarea.mjs +12 -12
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +11 -11
- package/fesm2022/ng-nest-ui-thought-chain.mjs +121 -0
- package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -0
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +31 -29
- 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 +36 -14
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +27 -74
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +12 -12
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +11 -11
- package/fesm2022/ng-nest-ui-tree-select.mjs +27 -25
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +23 -23
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +11 -11
- package/fesm2022/ng-nest-ui-upload.mjs +221 -24
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +11 -11
- package/fesm2022/ng-nest-ui.mjs +4 -0
- package/fesm2022/ng-nest-ui.mjs.map +1 -1
- package/index.d.ts +4 -0
- package/list/index.d.ts +30 -18
- package/package.json +44 -32
- package/popover/index.d.ts +2 -1
- package/prompts/index.d.ts +17 -2
- package/select/index.d.ts +12 -2
- package/sender/index.d.ts +1 -0
- package/style/animates/base.scss +32 -0
- package/style/animates/conect.scss +32 -0
- package/style/animates/fade.scss +32 -0
- package/style/animates/index.scss +11 -0
- package/style/animates/move.scss +129 -0
- package/style/animates/opacity.scss +26 -0
- package/style/animates/slide.scss +113 -0
- package/style/core/index.css +353 -0
- package/style/core/index.css.map +1 -1
- package/style/core/index.scss +1 -6
- package/suggestion/index.d.ts +96 -0
- package/table/index.d.ts +15 -4
- package/table-view/index.d.ts +1 -1
- package/tag/index.d.ts +2 -1
- package/thought-chain/index.d.ts +107 -0
- package/time-picker/index.d.ts +2 -1
- package/timeline/index.d.ts +35 -19
- package/tooltip/index.d.ts +2 -12
- package/tree-select/index.d.ts +2 -1
- package/upload/index.d.ts +39 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-prompts.mjs","sources":["../../../../lib/ng-nest/ui/prompts/prompts.property.ts","../../../../lib/ng-nest/ui/prompts/prompts.component.ts","../../../../lib/ng-nest/ui/prompts/prompts.component.html","../../../../lib/ng-nest/ui/prompts/prompts.module.ts","../../../../lib/ng-nest/ui/prompts/ng-nest-ui-prompts.ts"],"sourcesContent":["import { Component, input, output } from '@angular/core';\r\nimport { XBoolean, XData, XIdentityProperty, XPropertyFunction, XStyle, XTemplate, XToBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Prompts\r\n * @selector x-prompts\r\n * @decorator component\r\n */\r\nexport const XPromptsPrefix = 'x-prompts';\r\nconst X_PROPMTS_CONFIG_NAME = 'prompts';\r\n\r\n/**\r\n * Prompts Property\r\n */\r\n@Component({ selector: `${XPromptsPrefix}-property`, template: '' })\r\nexport class XPromptsProperty extends XPropertyFunction(X_PROPMTS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 显示标题,支持自定义模板\r\n * @en_US Display title, support custom template\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 列表数据\r\n * @en_US List data\r\n */\r\n readonly data = input<XData<XPromptsNode>>([]);\r\n /**\r\n * @zh_CN 纵向展示\r\n * @en_US List vertical display\r\n */\r\n readonly vertical = input<boolean, XBoolean>(this.config?.vertical ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN Item 点击事件\r\n * @en_US Item click event\r\n */\r\n readonly itemClick = output<XPromptsNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN 提示词\r\n * @en_US Promtp\r\n */\r\nexport interface XPromptsNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 描述\r\n * @en_US Description\r\n */\r\n description
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-prompts.mjs","sources":["../../../../lib/ng-nest/ui/prompts/prompts.property.ts","../../../../lib/ng-nest/ui/prompts/prompts.component.ts","../../../../lib/ng-nest/ui/prompts/prompts.component.html","../../../../lib/ng-nest/ui/prompts/prompts.module.ts","../../../../lib/ng-nest/ui/prompts/ng-nest-ui-prompts.ts"],"sourcesContent":["import { Component, input, output } from '@angular/core';\r\nimport { XBoolean, XData, XIdentityProperty, XPropertyFunction, XStyle, XTemplate, XToBoolean } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Prompts\r\n * @selector x-prompts\r\n * @decorator component\r\n */\r\nexport const XPromptsPrefix = 'x-prompts';\r\nconst X_PROPMTS_CONFIG_NAME = 'prompts';\r\n\r\n/**\r\n * Prompts Property\r\n */\r\n@Component({ selector: `${XPromptsPrefix}-property`, template: '' })\r\nexport class XPromptsProperty extends XPropertyFunction(X_PROPMTS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 显示标题,支持自定义模板\r\n * @en_US Display title, support custom template\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 列表数据\r\n * @en_US List data\r\n */\r\n readonly data = input<XData<XPromptsNode>>([]);\r\n /**\r\n * @zh_CN 纵向展示\r\n * @en_US List vertical display\r\n */\r\n readonly vertical = input<boolean, XBoolean>(this.config?.vertical ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN wrap\r\n * @en_US List wrap display\r\n */\r\n readonly wrap = input<boolean, XBoolean>(this.config?.wrap ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN Item 点击事件\r\n * @en_US Item click event\r\n */\r\n readonly itemClick = output<XPromptsNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN 提示词\r\n * @en_US Promtp\r\n */\r\nexport interface XPromptsNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 描述\r\n * @en_US Description\r\n */\r\n description?: string;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 节点样式\r\n * @en_US Icon style\r\n */\r\n style?: XStyle;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n iconStyle?: XStyle;\r\n /**\r\n * @zh_CN 是否禁用\r\n * @en_US Whether to disable\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 自定义属性\r\n * @en_US Custom attributes\r\n */\r\n [property: string]: any;\r\n}\r\n","import { ChangeDetectionStrategy, Component, signal, SimpleChanges, ViewEncapsulation } from '@angular/core';\r\nimport { XPromptsProperty, XPromptsNode } from './prompts.property';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIsChange, XSetData } from '@ng-nest/ui/core';\r\nimport { Subject } from 'rxjs';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: 'x-prompts',\r\n templateUrl: './prompts.component.html',\r\n styleUrls: ['./prompts.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XOutletDirective, XIconComponent]\r\n})\r\nexport class XPromptsComponent extends XPromptsProperty {\r\n nodes = signal<XPromptsNode[]>([]);\r\n\r\n unSubject = new Subject<void>();\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n onItemClick(node: XPromptsNode) {\r\n this.itemClick.emit(node);\r\n }\r\n\r\n private setData() {\r\n XSetData<XPromptsNode>(this.data(), this.unSubject, true).subscribe((x) => {\r\n this.nodes.set(x);\r\n });\r\n }\r\n}\r\n","<div class=\"x-prompts\" [class.x-prompts-vertical]=\"vertical()\" [class.x-prompts-wrap]=\"wrap()\">\r\n <div class=\"x-prompts-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <div class=\"x-prompts-list\">\r\n @for (item of nodes(); track item.id) {\r\n <div class=\"x-prompts-item\" [class.x-disabled]=\"item.disabled\" [style]=\"item.style\" (click)=\"onItemClick(item)\">\r\n @if (item.icon) {\r\n <div class=\"x-prompts-item-icon\">\r\n <x-icon [type]=\"item.icon\" [style]=\"item.iconStyle\"></x-icon>\r\n </div>\r\n }\r\n <div class=\"x-prompts-item-content\">\r\n @if (item.label) {\r\n <div class=\"x-prompts-item-label\" [class.x-prompts-item-only-label]=\"item.label && !item.description\">\r\n {{ item.label }}\r\n </div>\r\n }\r\n @if (item.description) {\r\n <div\r\n class=\"x-prompts-item-description\"\r\n [class.x-prompts-item-only-description]=\"!item.label && item.description\"\r\n >\r\n {{ item.description }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPromptsComponent } from './prompts.component';\r\n\r\n@NgModule({\r\n exports: [XPromptsComponent],\r\n imports: [XPromptsComponent]\r\n})\r\nexport class XPromptsModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAGA;;;;AAIG;AACI,MAAM,cAAc,GAAG;AAC9B,MAAM,qBAAqB,GAAG,SAAS;AAEvC;;AAEG;MAEU,gBAAiB,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC,CAAA;AAD9E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACnC;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAsB,EAAE,gDAAC;AAC9C;;;AAGG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,4CAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA,CAAA,CAAC;AACvG;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAoB,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,KAAK,wCAAI,SAAS,EAAE,UAAU,EAAA,CAAA,GAAA,CAAvB,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA,CAAA,CAAC;AAC/F;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,MAAM,EAAgB;AAC5C,IAAA;i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,EAAA,CAAA,CAAA;AAGhB,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,cAAc,YAFf,iBAAiB,CAAA,EAAA,CAAA,CAAA;;2FAEhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB;AAC5B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -118,13 +118,13 @@ class XRadioProperty extends XFormControlFunction(X_RADIO_CONFIG_NAME) {
|
|
|
118
118
|
*/
|
|
119
119
|
this.after = input(...(ngDevMode ? [undefined, { debugName: "after" }] : []));
|
|
120
120
|
}
|
|
121
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
122
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
121
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
122
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XRadioProperty, isStandalone: true, selector: "x-radio-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, button: { classPropertyName: "button", publicName: "button", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tag: { classPropertyName: "tag", publicName: "tag", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tagBordered: { classPropertyName: "tagBordered", publicName: "tagBordered", isSignal: true, isRequired: false, transformFunction: null }, tagDark: { classPropertyName: "tagDark", publicName: "tagDark", isSignal: true, isRequired: false, transformFunction: null }, allowCancel: { classPropertyName: "allowCancel", publicName: "allowCancel", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
123
123
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioProperty, decorators: [{
|
|
125
125
|
type: Component,
|
|
126
126
|
args: [{ selector: `${XRadioPrefix}-property`, template: '' }]
|
|
127
|
-
}] });
|
|
127
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], button: [{ type: i0.Input, args: [{ isSignal: true, alias: "button", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], tag: [{ type: i0.Input, args: [{ isSignal: true, alias: "tag", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], tagBordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagBordered", required: false }] }], tagDark: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagDark", required: false }] }], allowCancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCancel", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], before: [{ type: i0.Input, args: [{ isSignal: true, alias: "before", required: false }] }], after: [{ type: i0.Input, args: [{ isSignal: true, alias: "after", required: false }] }] } });
|
|
128
128
|
|
|
129
129
|
class XRadioComponent extends XRadioProperty {
|
|
130
130
|
constructor() {
|
|
@@ -184,20 +184,20 @@ class XRadioComponent extends XRadioProperty {
|
|
|
184
184
|
this.nodes.set(x);
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
188
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: XRadioComponent, isStandalone: true, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-radio-button]=\"button()\"\r\n [class.x-radio-icon]=\"icon()\"\r\n [class.x-radio-vertical]=\"vertical()\"\r\n [class.x-radio-after]=\"after()\"\r\n [class.x-radio-before]=\"before()\"\r\n [class.x-radio-after-template]=\"afterIsTemplate()\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-radio-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-radio-row\">\r\n @if (before()) {\r\n <div class=\"x-radio-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-radio-row-list\">\r\n @switch (radioType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-radio-row-item\"\r\n [class.x-checked]=\"item.id === value()\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item.id) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"value() === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-radio-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0}.x-radio{width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border-radius:var(--x-border-radius);background-color:var(--x-background-a200);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary);border-width:.375rem}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-vertical .x-radio-row-list{flex-direction:column;align-items:flex-start}.x-radio-vertical .x-radio-row-list x-tag{margin-left:0}.x-radio-vertical .x-radio-row-list x-tag:not(:first-child){margin-top:.25rem}.x-radio-vertical .x-radio-row-item{margin-right:0}.x-radio-vertical .x-radio-row-item:not(:first-child){margin-top:.25rem}.x-radio-box{border:var(--x-border-width) solid var(--x-border);border-radius:100%;width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .2s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XTagComponent, selector: "x-tag" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
187
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
188
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XRadioComponent, isStandalone: true, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-radio-button]=\"button()\"\r\n [class.x-radio-icon]=\"icon()\"\r\n [class.x-radio-vertical]=\"vertical()\"\r\n [class.x-radio-after]=\"after()\"\r\n [class.x-radio-before]=\"before()\"\r\n [class.x-radio-after-template]=\"afterIsTemplate()\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-radio-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-radio-row\">\r\n @if (before()) {\r\n <div class=\"x-radio-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-radio-row-list\">\r\n @switch (radioType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-radio-row-item\"\r\n [class.x-checked]=\"item.id === value()\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item.id) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"value() === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-radio-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0}.x-radio{width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border-radius:var(--x-border-radius);background-color:var(--x-background-a200);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary);border-width:.375rem}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-vertical .x-radio-row-list{flex-direction:column;align-items:flex-start}.x-radio-vertical .x-radio-row-list x-tag{margin-left:0}.x-radio-vertical .x-radio-row-list x-tag:not(:first-child){margin-top:.25rem}.x-radio-vertical .x-radio-row-item{margin-right:0}.x-radio-vertical .x-radio-row-item:not(:first-child){margin-top:.25rem}.x-radio-box{border:var(--x-border-width) solid var(--x-border);border-radius:100%;width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .2s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XTagComponent, selector: "x-tag" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioComponent, decorators: [{
|
|
191
191
|
type: Component,
|
|
192
192
|
args: [{ selector: `${XRadioPrefix}`, imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-radio-button]=\"button()\"\r\n [class.x-radio-icon]=\"icon()\"\r\n [class.x-radio-vertical]=\"vertical()\"\r\n [class.x-radio-after]=\"after()\"\r\n [class.x-radio-before]=\"before()\"\r\n [class.x-radio-after-template]=\"afterIsTemplate()\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-radio-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-radio-row\">\r\n @if (before()) {\r\n <div class=\"x-radio-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-radio-row-list\">\r\n @switch (radioType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-radio-row-item\"\r\n [class.x-checked]=\"item.id === value()\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item.id) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"value() === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-radio-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0}.x-radio{width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border-radius:var(--x-border-radius);background-color:var(--x-background-a200);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:var(--x-font-size)}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:var(--x-font-size);font-size:var(--x-font-size);cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary);border-width:.375rem}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-vertical .x-radio-row-list{flex-direction:column;align-items:flex-start}.x-radio-vertical .x-radio-row-list x-tag{margin-left:0}.x-radio-vertical .x-radio-row-list x-tag:not(:first-child){margin-top:.25rem}.x-radio-vertical .x-radio-row-item{margin-right:0}.x-radio-vertical .x-radio-row-item:not(:first-child){margin-top:.25rem}.x-radio-box{border:var(--x-border-width) solid var(--x-border);border-radius:100%;width:calc(var(--x-height-medium) - .875rem);height:calc(var(--x-height-medium) - .875rem);background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .2s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-a900);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
|
|
193
|
-
}] });
|
|
193
|
+
}], propDecorators: { radio: [{ type: i0.ViewChild, args: ['radio', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
194
194
|
|
|
195
195
|
class XRadioModule {
|
|
196
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
197
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
198
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
196
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
197
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XRadioModule, imports: [XRadioComponent], exports: [XRadioComponent] }); }
|
|
198
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioModule, imports: [XRadioComponent] }); }
|
|
199
199
|
}
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRadioModule, decorators: [{
|
|
201
201
|
type: NgModule,
|
|
202
202
|
args: [{
|
|
203
203
|
exports: [XRadioComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type {\r\n XData,\r\n XIdentityProperty,\r\n XBoolean,\r\n XTemplate,\r\n XDirection,\r\n XAlign,\r\n XJustify,\r\n XNumber\r\n} from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_RADIO_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XFormControlFunction(X_RADIO_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n readonly data = input<XData<XRadioNode>>([]);\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n readonly button = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n readonly icon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n readonly tag = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n readonly type = input<XButtonType>('initial');\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n readonly tagBordered = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n readonly tagDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n readonly allowCancel = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n readonly vertical = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n override readonly before = input<XTemplate>();\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n override readonly after = input<XTemplate>();\r\n}\r\n\r\n/**\r\n * Radio Option\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: boolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: boolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: boolean;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: boolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: boolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n allowCancel?: boolean;\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n vertical?: boolean;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n OnChanges,\r\n SimpleChanges,\r\n TemplateRef,\r\n OnDestroy,\r\n viewChild,\r\n signal,\r\n computed\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { NgClass } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XTagComponent } from '@ng-nest/ui/tag';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective],\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges, OnDestroy {\r\n radio = viewChild.required('radio', { read: ElementRef<HTMLElement> });\r\n nodes = signal<XRadioNode[]>([]);\r\n private unSubject = new Subject<void>();\r\n\r\n beforeIsTemplate = computed(() => this.before() instanceof TemplateRef);\r\n afterIsTemplate = computed(() => this.after() instanceof TemplateRef);\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n radioType = computed(() => {\r\n if (this.button()) {\r\n return 'button';\r\n } else if (this.icon()) {\r\n return 'icon';\r\n } else if (this.tag()) {\r\n return 'tag';\r\n } else {\r\n return 'initial';\r\n }\r\n });\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabledComputed() || node.disabled || (!this.allowCancel() && node.id === this.value())) return;\r\n this.formControlValidator();\r\n if (this.allowCancel() && node.id === this.value()) {\r\n this.value.set(null);\r\n } else {\r\n this.value.set(node.id);\r\n }\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data(), this.unSubject).subscribe((x) => {\r\n this.nodes.set(x);\r\n });\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-radio-button]=\"button()\"\r\n [class.x-radio-icon]=\"icon()\"\r\n [class.x-radio-vertical]=\"vertical()\"\r\n [class.x-radio-after]=\"after()\"\r\n [class.x-radio-before]=\"before()\"\r\n [class.x-radio-after-template]=\"afterIsTemplate()\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-radio-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-radio-row\">\r\n @if (before()) {\r\n <div class=\"x-radio-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-radio-row-list\">\r\n @switch (radioType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-radio-row-item\"\r\n [class.x-checked]=\"item.id === value()\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item.id) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"value() === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-radio-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRadioComponent } from './radio.component';\r\n\r\n@NgModule({\r\n exports: [XRadioComponent],\r\n imports: [XRadioComponent]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAeA;;;;AAIG;AACI,MAAM,YAAY,GAAG;AAC5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,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAFb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAEd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type {\r\n XData,\r\n XIdentityProperty,\r\n XBoolean,\r\n XTemplate,\r\n XDirection,\r\n XAlign,\r\n XJustify,\r\n XNumber\r\n} from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_RADIO_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XFormControlFunction(X_RADIO_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n readonly data = input<XData<XRadioNode>>([]);\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n readonly button = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n readonly icon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n readonly tag = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n readonly type = input<XButtonType>('initial');\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n readonly tagBordered = input<boolean, XBoolean>(true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n readonly tagDark = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n readonly allowCancel = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n readonly vertical = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n override readonly before = input<XTemplate>();\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n override readonly after = input<XTemplate>();\r\n}\r\n\r\n/**\r\n * Radio Option\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: boolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: boolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: boolean;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: boolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: boolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n allowCancel?: boolean;\r\n /**\r\n * @zh_CN 垂直布局,不支持 button 和 icon 样式\r\n * @en_US Vertical layout, does not support button and icon styles\r\n */\r\n vertical?: boolean;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n OnChanges,\r\n SimpleChanges,\r\n TemplateRef,\r\n OnDestroy,\r\n viewChild,\r\n signal,\r\n computed\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { NgClass } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XTagComponent } from '@ng-nest/ui/tag';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n imports: [NgClass, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective],\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges, OnDestroy {\r\n radio = viewChild.required('radio', { read: ElementRef<HTMLElement> });\r\n nodes = signal<XRadioNode[]>([]);\r\n private unSubject = new Subject<void>();\r\n\r\n beforeIsTemplate = computed(() => this.before() instanceof TemplateRef);\r\n afterIsTemplate = computed(() => this.after() instanceof TemplateRef);\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n radioType = computed(() => {\r\n if (this.button()) {\r\n return 'button';\r\n } else if (this.icon()) {\r\n return 'icon';\r\n } else if (this.tag()) {\r\n return 'tag';\r\n } else {\r\n return 'initial';\r\n }\r\n });\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabledComputed() || node.disabled || (!this.allowCancel() && node.id === this.value())) return;\r\n this.formControlValidator();\r\n if (this.allowCancel() && node.id === this.value()) {\r\n this.value.set(null);\r\n } else {\r\n this.value.set(node.id);\r\n }\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data(), this.unSubject).subscribe((x) => {\r\n this.nodes.set(x);\r\n });\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n [class.x-radio-button]=\"button()\"\r\n [class.x-radio-icon]=\"icon()\"\r\n [class.x-radio-vertical]=\"vertical()\"\r\n [class.x-radio-after]=\"after()\"\r\n [class.x-radio-before]=\"before()\"\r\n [class.x-radio-after-template]=\"afterIsTemplate()\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate()\"\r\n>\r\n @if (label()) {\r\n <label\r\n [class.x-radio-label-required]=\"requiredComputed()\"\r\n [style.width]=\"labelWidth()\"\r\n [ngClass]=\"labelMapSignal()\"\r\n *xOutlet=\"label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n }\r\n <div class=\"x-radio-row\">\r\n @if (before()) {\r\n <div class=\"x-radio-row-before\">\r\n <ng-container *xOutlet=\"before()\">{{ before() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-radio-row-list\">\r\n @switch (radioType()) {\r\n @case ('initial') {\r\n @for (item of nodes(); track item.id) {\r\n <div\r\n class=\"x-radio-row-item\"\r\n [class.x-checked]=\"item.id === value()\"\r\n [class.x-disabled]=\"disabledComputed() || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n }\r\n }\r\n @case ('button') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('icon') {\r\n <x-buttons boxShadow=\"false\">\r\n @for (item of nodes(); track item.id) {\r\n <x-button\r\n [icon]=\"item.icon!\"\r\n [size]=\"size()\"\r\n [type]=\"type()\"\r\n [activated]=\"item.id === value()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n plain\r\n >{{ item.label }}</x-button\r\n >\r\n }\r\n </x-buttons>\r\n }\r\n @case ('tag') {\r\n @for (item of nodes(); track item.id) {\r\n <x-tag\r\n checked\r\n manual\r\n [type]=\"type()\"\r\n [size]=\"size()\"\r\n [bordered]=\"tagBordered()\"\r\n [dark]=\"tagDark()\"\r\n [disabled]=\"disabledComputed() || item.disabled!\"\r\n [selected]=\"value() === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n }\r\n }\r\n }\r\n </div>\r\n @if (after()) {\r\n <div class=\"x-radio-row-after\">\r\n <ng-container *xOutlet=\"after()\">{{ after() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRadioComponent } from './radio.component';\r\n\r\n@NgModule({\r\n exports: [XRadioComponent],\r\n imports: [XRadioComponent]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAeA;;;;AAIG;AACI,MAAM,YAAY,GAAG;AAC5B,MAAM,mBAAmB,GAAG,OAAO;AAEnC;;AAEG;MAEU,cAAe,SAAQ,oBAAoB,CAAC,mBAAmB,CAAC,CAAA;AAD7E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,C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,CAAA,CAAA;AAGd,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,YAAY,YAFb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAEd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -80,13 +80,13 @@ class XRateProperty extends XFormControlFunction(X_RATE_CONFIG_NAME) {
|
|
|
80
80
|
*/
|
|
81
81
|
this.required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
82
82
|
}
|
|
83
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
84
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
83
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XRateProperty, isStandalone: true, selector: "x-rate-property", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, half: { classPropertyName: "half", publicName: "half", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, customTemp: { classPropertyName: "customTemp", publicName: "customTemp", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
85
85
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateProperty, decorators: [{
|
|
87
87
|
type: Component,
|
|
88
88
|
args: [{ selector: `${XRatePrefix}-property`, template: '' }]
|
|
89
|
-
}] });
|
|
89
|
+
}], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], half: [{ type: i0.Input, args: [{ isSignal: true, alias: "half", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], customTemp: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTemp", 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }] } });
|
|
90
90
|
|
|
91
91
|
class XRateComponent extends XRateProperty {
|
|
92
92
|
constructor() {
|
|
@@ -170,20 +170,20 @@ class XRateComponent extends XRateProperty {
|
|
|
170
170
|
this.onChange(this.value());
|
|
171
171
|
}
|
|
172
172
|
formControlChanges() { }
|
|
173
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
174
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
173
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
174
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XRateComponent, isStandalone: true, selector: "x-rate", providers: [XValueAccessor(XRateComponent)], viewQueries: [{ propertyName: "rate", first: true, predicate: ["rate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n>\r\n @if (label()) {\r\n <label [class.x-rate-label-required]=\"requiredComputed()\" [style.width]=\"labelWidth()\" [ngClass]=\"labelMapSignal()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n @for (rate of rates(); track rate; let i = $index) {\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated()\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated()\"\r\n [style.color]=\"rate <= hoverActivated() ? getColor() : ''\"\r\n >\r\n @if (half()) {\r\n <div\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated() ? getColor() : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n }\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0}.x-rate{width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:var(--x-height-medium);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
175
175
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateComponent, decorators: [{
|
|
177
177
|
type: Component,
|
|
178
178
|
args: [{ selector: `${XRatePrefix}`, imports: [NgClass, NgTemplateOutlet, FormsModule, XIconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRateComponent)], template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n>\r\n @if (label()) {\r\n <label [class.x-rate-label-required]=\"requiredComputed()\" [style.width]=\"labelWidth()\" [ngClass]=\"labelMapSignal()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n @for (rate of rates(); track rate; let i = $index) {\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated()\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated()\"\r\n [style.color]=\"rate <= hoverActivated() ? getColor() : ''\"\r\n >\r\n @if (half()) {\r\n <div\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated() ? getColor() : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n }\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0}.x-rate{width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:var(--x-height-medium);line-height:var(--x-height-medium);position:relative;color:var(--x-text-300);font-weight:500}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:var(--x-height-medium);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"] }]
|
|
179
|
-
}] });
|
|
179
|
+
}], propDecorators: { rate: [{ type: i0.ViewChild, args: ['rate', { isSignal: true }] }] } });
|
|
180
180
|
|
|
181
181
|
class XRateModule {
|
|
182
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
184
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
182
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
183
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XRateModule, imports: [XRateComponent], exports: [XRateComponent] }); }
|
|
184
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateModule, imports: [XRateComponent] }); }
|
|
185
185
|
}
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XRateModule, decorators: [{
|
|
187
187
|
type: NgModule,
|
|
188
188
|
args: [{
|
|
189
189
|
exports: [XRateComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input } from '@angular/core';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type { XNumber, XBoolean, XDirection, XAlign, XJustify, XTemplate } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_RATE_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XFormControlFunction(X_RATE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n readonly count = input<number, XNumber>(5, { transform: XToNumber });\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n readonly half = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n readonly color = input<XRateColor>(this.config?.color ?? '');\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n readonly customTemp = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: number;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: boolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: TemplateRef<any>;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n viewChild,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XIsEmpty, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, FormsModule, XIconComponent],\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty {\r\n rate = viewChild.required<ElementRef<HTMLElement>>('rate');\r\n rates = computed(() =>\r\n Array(this.count())\r\n .fill(0)\r\n .map((_, i) => i + 1)\r\n );\r\n hoverActivated = signal(0);\r\n hoverHalfActivated = signal(0);\r\n\r\n getColor = computed(() => {\r\n let result = '';\r\n const color = this.color();\r\n if (XIsString(color)) {\r\n result = color as string;\r\n } else if (XIsObject(color)) {\r\n let val = this.half()\r\n ? (Math.floor(this.hoverActivated()) + this.hoverHalfActivated()) * 0.5\r\n : this.hoverActivated();\r\n for (let key in color) {\r\n if (color[key](val)) {\r\n result = key;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n });\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n\r\n override requiredIsEmpty = computed(() => {\r\n return this.validatorComputed() && this.requiredComputed() && (XIsEmpty(this.value()) || this.value() === 0);\r\n });\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value.set(value);\r\n this.hoverActivated.set(value);\r\n this.hoverHalfActivated.set(Math.ceil(value));\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.hoverActivated.set(rate);\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabledComputed()) return;\r\n const activited = this.value();\r\n this.hoverActivated.set(activited);\r\n this.hoverHalfActivated.set(Math.ceil(activited));\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.formControlValidator();\r\n this.value.update((x) => (x === rate ? 0 : rate));\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.formControlValidator();\r\n this.hoverActivated.set(rate - 1);\r\n this.hoverHalfActivated.set(rate);\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.value.set(rate - 0.5);\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n formControlChanges() {}\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n>\r\n @if (label()) {\r\n <label [class.x-rate-label-required]=\"requiredComputed()\" [style.width]=\"labelWidth()\" [ngClass]=\"labelMapSignal()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n @for (rate of rates(); track rate; let i = $index) {\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated()\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated()\"\r\n [style.color]=\"rate <= hoverActivated() ? getColor() : ''\"\r\n >\r\n @if (half()) {\r\n <div\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated() ? getColor() : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n }\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRateComponent } from './rate.component';\r\n\r\n@NgModule({\r\n exports: [XRateComponent],\r\n imports: [XRateComponent]\r\n})\r\nexport class XRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;AAIG;AACI,MAAM,WAAW,GAAG;AAC3B,MAAM,kBAAkB,GAAG,MAAM;AAEjC;;AAEG;MAEU,aAAc,SAAQ,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;AAD3E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkB,CAAC,yCAAI,SAAS,EAAE,SAAS,EAAA,CAAA,GAAA,CAAtB,EAAE,SAAS,EAAE,SAAS,EAAE,GAAC;AACpE;;;AAGG;AACM,QAAA,IAAA,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AO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input } from '@angular/core';\r\nimport { XFormControlFunction, XFormOption } from '@ng-nest/ui/base-form';\r\nimport type { XNumber, XBoolean, XDirection, XAlign, XJustify, XTemplate } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_RATE_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XFormControlFunction(X_RATE_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n readonly count = input<number, XNumber>(5, { transform: XToNumber });\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n readonly half = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n readonly color = input<XRateColor>(this.config?.color ?? '');\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n readonly customTemp = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n override readonly label = input<XTemplate>('');\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n override readonly labelWidth = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n override readonly labelAlign = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n override readonly justify = input<XJustify>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n override readonly align = input<XAlign>('start');\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n override readonly direction = input<XDirection>('column');\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n override readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n override readonly required = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: number;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: boolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: TemplateRef<any>;\r\n /**\r\n * @zh_CN 标签\r\n * @en_US Label\r\n */\r\n label?: string;\r\n /**\r\n * @zh_CN 标签宽度\r\n * @en_US Label width\r\n */\r\n labelWidth?: string;\r\n /**\r\n * @zh_CN 标签文字对齐方式\r\n * @en_US Label text alignment method\r\n */\r\n labelAlign?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US The level of sub-element level arrangement under flex layout\r\n */\r\n justify?: XJustify;\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US sub-element vertical arrangement method under flex layout\r\n */\r\n align?: XAlign;\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US The direction of the sub-element arrangement under flex layout\r\n */\r\n direction?: XDirection;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 必填\r\n * @en_US Required\r\n */\r\n required?: boolean;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n viewChild,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XIsEmpty, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, FormsModule, XIconComponent],\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty {\r\n rate = viewChild.required<ElementRef<HTMLElement>>('rate');\r\n rates = computed(() =>\r\n Array(this.count())\r\n .fill(0)\r\n .map((_, i) => i + 1)\r\n );\r\n hoverActivated = signal(0);\r\n hoverHalfActivated = signal(0);\r\n\r\n getColor = computed(() => {\r\n let result = '';\r\n const color = this.color();\r\n if (XIsString(color)) {\r\n result = color as string;\r\n } else if (XIsObject(color)) {\r\n let val = this.half()\r\n ? (Math.floor(this.hoverActivated()) + this.hoverHalfActivated()) * 0.5\r\n : this.hoverActivated();\r\n for (let key in color) {\r\n if (color[key](val)) {\r\n result = key;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n });\r\n\r\n classMap = computed(() => ({\r\n [`x-justify-${this.justify()}`]: !!this.justify(),\r\n [`x-align-${this.align()}`]: !!this.align(),\r\n [`x-direction-${this.direction()}`]: !!this.direction()\r\n }));\r\n labelMapSignal = computed(() => ({\r\n [`x-text-align-${this.labelAlign()}`]: !!this.labelAlign()\r\n }));\r\n\r\n override requiredIsEmpty = computed(() => {\r\n return this.validatorComputed() && this.requiredComputed() && (XIsEmpty(this.value()) || this.value() === 0);\r\n });\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value.set(value);\r\n this.hoverActivated.set(value);\r\n this.hoverHalfActivated.set(Math.ceil(value));\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.hoverActivated.set(rate);\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabledComputed()) return;\r\n const activited = this.value();\r\n this.hoverActivated.set(activited);\r\n this.hoverHalfActivated.set(Math.ceil(activited));\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.formControlValidator();\r\n this.value.update((x) => (x === rate ? 0 : rate));\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.formControlValidator();\r\n this.hoverActivated.set(rate - 1);\r\n this.hoverHalfActivated.set(rate);\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabledComputed()) return;\r\n this.value.set(rate - 0.5);\r\n if (this.onChange) this.onChange(this.value());\r\n }\r\n\r\n formControlChanges() {}\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-flex]=\"justify() || align() || direction()\"\r\n [class.x-disabled]=\"disabledComputed()\"\r\n [class.x-required]=\"requiredIsEmpty()\"\r\n [class.x-invalid]=\"invalid()\"\r\n>\r\n @if (label()) {\r\n <label [class.x-rate-label-required]=\"requiredComputed()\" [style.width]=\"labelWidth()\" [ngClass]=\"labelMapSignal()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n @for (rate of rates(); track rate; let i = $index) {\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated()\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated()\"\r\n [style.color]=\"rate <= hoverActivated() ? getColor() : ''\"\r\n >\r\n @if (half()) {\r\n <div\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated() ? getColor() : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n }\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n @if (customTemp()) {\r\n <ng-container *ngTemplateOutlet=\"customTemp()!\"></ng-container>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRateComponent } from './rate.component';\r\n\r\n@NgModule({\r\n exports: [XRateComponent],\r\n imports: [XRateComponent]\r\n})\r\nexport class XRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;A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CAAA,QAAA,EAAA,CAAA,CAAA;kIAAX,WAAW,EAAA,OAAA,EAAA,CAFZ,cAAc,CAAA,EAAA,OAAA,EAAA,CADd,cAAc,CAAA,EAAA,CAAA,CAAA;AAGb,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,WAAW,YAFZ,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAEb,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;;;;"}
|
|
@@ -57,13 +57,13 @@ class XResizableProperty extends XProperty {
|
|
|
57
57
|
*/
|
|
58
58
|
this.resizeEnd = output();
|
|
59
59
|
}
|
|
60
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
61
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
60
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableProperty, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
61
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.5", type: XResizableProperty, isStandalone: true, selector: "[xResizable]", inputs: { xResizable: { classPropertyName: "xResizable", publicName: "xResizable", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, offsetLeft: { classPropertyName: "offsetLeft", publicName: "offsetLeft", isSignal: true, isRequired: false, transformFunction: null }, offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resizeBegin: "resizeBegin", resizing: "resizing", resizeEnd: "resizeEnd" }, usesInheritance: true, ngImport: i0 }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableProperty, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
65
|
args: [{ selector: '[xResizable]' }]
|
|
66
|
-
}] });
|
|
66
|
+
}], propDecorators: { xResizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "xResizable", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ghost: [{ type: i0.Input, args: [{ isSignal: true, alias: "ghost", required: false }] }], offsetLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetLeft", required: false }] }], offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }], resizeBegin: [{ type: i0.Output, args: ["resizeBegin"] }], resizing: [{ type: i0.Output, args: ["resizing"] }], resizeEnd: [{ type: i0.Output, args: ["resizeEnd"] }] } });
|
|
67
67
|
|
|
68
68
|
class XResizableDirective extends XResizableProperty {
|
|
69
69
|
constructor() {
|
|
@@ -306,10 +306,10 @@ class XResizableDirective extends XResizableProperty {
|
|
|
306
306
|
this.mouseUpSub = undefined;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
310
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
309
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
310
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.5", type: XResizableDirective, isStandalone: true, selector: "[xResizable]", host: { listeners: { "mousedown": "mousedown($event)" }, properties: { "class": "this.className", "class.x-resizable-disabled": "this.getDisabled" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
311
311
|
}
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableDirective, decorators: [{
|
|
313
313
|
type: Directive,
|
|
314
314
|
args: [{ selector: '[xResizable]' }]
|
|
315
315
|
}], propDecorators: { className: [{
|
|
@@ -324,11 +324,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
324
324
|
}] } });
|
|
325
325
|
|
|
326
326
|
class XResizableModule {
|
|
327
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
328
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
329
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
327
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
328
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XResizableModule, imports: [XResizableDirective], exports: [XResizableDirective] }); }
|
|
329
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableModule }); }
|
|
330
330
|
}
|
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XResizableModule, decorators: [{
|
|
332
332
|
type: NgModule,
|
|
333
333
|
args: [{
|
|
334
334
|
imports: [XResizableDirective],
|