@ng-nest/ui 14.0.4 → 14.0.7
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/calendar/calendar.component.d.ts +1 -0
- package/calendar/calendar.property.d.ts +18 -4
- package/calendar/examples/en_US/default/card/README.md +6 -0
- package/calendar/examples/en_US/default/header/README.md +6 -0
- package/calendar/examples/zh_CN/default/card/README.md +6 -0
- package/calendar/examples/zh_CN/default/header/README.md +6 -0
- package/collapse/collapse.property.d.ts +6 -1
- package/collapse/examples/en_US/default/disabled/README.md +6 -0
- package/collapse/examples/zh_CN/default/disabled/README.md +6 -0
- package/core/config/config.d.ts +8 -0
- package/core/functions/convert.d.ts +1 -1
- package/dropdown/dropdown-portal.component.d.ts +3 -0
- package/dropdown/dropdown.property.d.ts +16 -1
- package/esm2020/badge/badge.component.mjs +3 -3
- package/esm2020/calendar/calendar.component.mjs +8 -4
- package/esm2020/calendar/calendar.property.mjs +11 -2
- package/esm2020/collapse/collapse-panel.component.mjs +3 -3
- package/esm2020/collapse/collapse.property.mjs +7 -2
- package/esm2020/core/config/config.mjs +1 -1
- package/esm2020/core/functions/convert.mjs +1 -1
- package/esm2020/date-picker/date-picker.component.mjs +5 -1
- package/esm2020/dropdown/dropdown-portal.component.mjs +6 -3
- package/esm2020/dropdown/dropdown.component.mjs +4 -1
- package/esm2020/dropdown/dropdown.property.mjs +8 -2
- package/esm2020/i18n/i18n.property.mjs +1 -1
- package/esm2020/i18n/languages/en_US.mjs +7 -2
- package/esm2020/i18n/languages/zh_CN.mjs +7 -2
- package/esm2020/i18n/languages/zh_TW.mjs +7 -2
- package/esm2020/image/image-group.component.mjs +18 -0
- package/esm2020/image/image-preview.component.mjs +136 -0
- package/esm2020/image/image.component.mjs +81 -0
- package/esm2020/image/image.module.mjs +26 -0
- package/esm2020/image/image.property.mjs +63 -0
- package/esm2020/image/ng-nest-ui-image.mjs +5 -0
- package/esm2020/image/public-api.mjs +6 -0
- package/esm2020/index.mjs +2 -1
- package/esm2020/input/input.component.mjs +2 -2
- package/esm2020/list/list.component.mjs +99 -13
- package/esm2020/list/list.module.mjs +8 -4
- package/esm2020/list/list.property.mjs +52 -2
- package/esm2020/loading/loading.component.mjs +3 -3
- package/esm2020/loading/loading.property.mjs +7 -2
- package/esm2020/popover/popover.directive.mjs +20 -3
- package/esm2020/popover/popover.property.mjs +1 -1
- package/esm2020/select/select.component.mjs +14 -6
- package/esm2020/slider/slider.component.mjs +27 -7
- package/esm2020/slider/slider.module.mjs +5 -4
- package/esm2020/slider/slider.property.mjs +13 -2
- package/esm2020/table/table-body.component.mjs +3 -3
- package/esm2020/table/table-head.component.mjs +4 -4
- package/esm2020/table/table.component.mjs +35 -4
- package/esm2020/table/table.property.mjs +8 -4
- package/esm2020/tabs/tabs.component.mjs +3 -3
- package/esm2020/tabs/tabs.property.mjs +13 -2
- package/esm2020/textarea/textarea.component.mjs +2 -2
- package/esm2020/timeline/timeline.component.mjs +6 -4
- package/fesm2015/ng-nest-ui-badge.mjs +2 -2
- package/fesm2015/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-calendar.mjs +17 -4
- package/fesm2015/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-collapse.mjs +8 -3
- package/fesm2015/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-date-picker.mjs +4 -0
- package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-dropdown.mjs +15 -3
- package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-i18n.mjs +18 -3
- package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-image.mjs +312 -0
- package/fesm2015/ng-nest-ui-image.mjs.map +1 -0
- package/fesm2015/ng-nest-ui-input.mjs +2 -2
- package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-list.mjs +155 -15
- package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-loading.mjs +8 -3
- package/fesm2015/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-popover.mjs +19 -2
- package/fesm2015/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-select.mjs +14 -6
- package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-slider.mjs +43 -11
- package/fesm2015/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-table.mjs +46 -11
- package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-tabs.mjs +14 -3
- package/fesm2015/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-textarea.mjs +2 -2
- package/fesm2015/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-timeline.mjs +5 -3
- package/fesm2015/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2015/ng-nest-ui.mjs +1 -0
- package/fesm2015/ng-nest-ui.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-badge.mjs +2 -2
- package/fesm2020/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-calendar.mjs +17 -4
- package/fesm2020/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-collapse.mjs +8 -3
- package/fesm2020/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-date-picker.mjs +4 -0
- package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-dropdown.mjs +15 -3
- package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-i18n.mjs +18 -3
- package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-image.mjs +308 -0
- package/fesm2020/ng-nest-ui-image.mjs.map +1 -0
- package/fesm2020/ng-nest-ui-input.mjs +2 -2
- package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-list.mjs +154 -15
- package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-loading.mjs +8 -3
- package/fesm2020/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-popover.mjs +19 -2
- package/fesm2020/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-select.mjs +14 -6
- package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-slider.mjs +43 -11
- package/fesm2020/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-table.mjs +46 -11
- package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-tabs.mjs +14 -3
- package/fesm2020/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-textarea.mjs +2 -2
- package/fesm2020/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-timeline.mjs +5 -3
- package/fesm2020/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2020/ng-nest-ui.mjs +1 -0
- package/fesm2020/ng-nest-ui.mjs.map +1 -1
- package/i18n/i18n.property.d.ts +6 -0
- package/i18n/languages/en_US.d.ts +5 -0
- package/i18n/languages/zh_CN.d.ts +5 -0
- package/i18n/languages/zh_TW.d.ts +5 -0
- package/image/examples/en_US/default/README.md +4 -0
- package/image/examples/en_US/default/default/README.md +6 -0
- package/image/examples/en_US/default/fallback/README.md +6 -0
- package/image/examples/en_US/default/group/README.md +6 -0
- package/image/examples/en_US/default/placeholder/README.md +6 -0
- package/image/examples/zh_CN/default/README.md +4 -0
- package/image/examples/zh_CN/default/default/README.md +6 -0
- package/image/examples/zh_CN/default/fallback/README.md +6 -0
- package/image/examples/zh_CN/default/group/README.md +6 -0
- package/image/examples/zh_CN/default/placeholder/README.md +6 -0
- package/image/image-group.component.d.ts +8 -0
- package/image/image-preview.component.d.ts +39 -0
- package/image/image.component.d.ts +29 -0
- package/image/image.module.d.ts +16 -0
- package/image/image.property.d.ts +96 -0
- package/image/index.d.ts +5 -0
- package/image/public-api.d.ts +5 -0
- package/index.d.ts +1 -0
- package/list/examples/en_US/default/load-more/README.md +8 -0
- package/list/examples/en_US/default/scroll/README.md +8 -0
- package/list/examples/zh_CN/default/load-more/README.md +8 -0
- package/list/examples/zh_CN/default/scroll/README.md +8 -0
- package/list/list.component.d.ts +19 -1
- package/list/list.module.d.ts +2 -1
- package/list/list.property.d.ts +59 -2
- package/loading/loading.property.d.ts +7 -2
- package/package.json +9 -1
- package/popover/popover.directive.d.ts +4 -3
- package/popover/popover.property.d.ts +1 -1
- package/slider/examples/en_US/default/expand/README.md +7 -0
- package/slider/examples/zh_CN/default/expand/README.md +7 -0
- package/slider/slider.component.d.ts +2 -0
- package/slider/slider.module.d.ts +2 -1
- package/slider/slider.property.d.ts +11 -1
- package/table/examples/en_US/default/edit/README.md +7 -0
- package/table/examples/en_US/default/header/README.md +2 -2
- package/table/examples/en_US/default/search/README.md +6 -0
- package/table/examples/zh_CN/default/edit/README.md +7 -0
- package/table/examples/zh_CN/default/header/README.md +2 -2
- package/table/examples/zh_CN/default/search/README.md +6 -0
- package/table/table.component.d.ts +5 -0
- package/table/table.property.d.ts +13 -3
- package/tabs/examples/en_US/default/expand/README.md +6 -0
- package/tabs/examples/zh_CN/default/expand/README.md +6 -0
- package/tabs/tabs.property.d.ts +11 -1
|
@@ -102,10 +102,10 @@ class XBadgeComponent extends XBadgeProperty {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
/** @nocollapse */ XBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XBadgeComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
-
/** @nocollapse */ XBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XBadgeComponent, selector: "x-badge", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n", styles: ["x-badge{display:inline-flex}.x-badge{margin:0;padding:0;font-size:var(--x-font-size);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;position:relative}.x-badge>sup{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%;border-radius:.625rem;color:var(--x-white);display:inline-block;height:1.125rem;line-height:1.125rem;padding:0 .375rem;text-align:center;white-space:nowrap;box-shadow:0 0 0 .0625rem var(--x-white)}.x-badge-dot>sup{width:.5rem;height:.5rem;padding:0;right:.
|
|
105
|
+
/** @nocollapse */ XBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XBadgeComponent, selector: "x-badge", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n", styles: ["x-badge{display:inline-flex}.x-badge{margin:0;padding:0;font-size:var(--x-font-size);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;position:relative}.x-badge>sup{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%;border-radius:.625rem;color:var(--x-white);display:inline-block;height:1.125rem;line-height:1.125rem;padding:0 .375rem;text-align:center;white-space:nowrap;box-shadow:0 0 0 .0625rem var(--x-white)}.x-badge-dot>sup{width:.5rem;height:.5rem;padding:0;right:.125rem;border-radius:50%}.x-badge-offset>sup{right:inherit}.x-badge-primary>sup{background-color:var(--x-primary)}.x-badge-success>sup{background-color:var(--x-success)}.x-badge-info>sup{background-color:var(--x-info)}.x-badge-warning>sup{background-color:var(--x-warning)}.x-badge-danger>sup{background-color:var(--x-danger)}.x-badge-text>sup{background-color:var(--x-text)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [XBadgeAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
106
106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XBadgeComponent, decorators: [{
|
|
107
107
|
type: Component,
|
|
108
|
-
args: [{ selector: `${XBadgePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XBadgeAnimation], template: "<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n", styles: ["x-badge{display:inline-flex}.x-badge{margin:0;padding:0;font-size:var(--x-font-size);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;position:relative}.x-badge>sup{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%;border-radius:.625rem;color:var(--x-white);display:inline-block;height:1.125rem;line-height:1.125rem;padding:0 .375rem;text-align:center;white-space:nowrap;box-shadow:0 0 0 .0625rem var(--x-white)}.x-badge-dot>sup{width:.5rem;height:.5rem;padding:0;right:.
|
|
108
|
+
args: [{ selector: `${XBadgePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XBadgeAnimation], template: "<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n", styles: ["x-badge{display:inline-flex}.x-badge{margin:0;padding:0;font-size:var(--x-font-size);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;position:relative}.x-badge>sup{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%;border-radius:.625rem;color:var(--x-white);display:inline-block;height:1.125rem;line-height:1.125rem;padding:0 .375rem;text-align:center;white-space:nowrap;box-shadow:0 0 0 .0625rem var(--x-white)}.x-badge-dot>sup{width:.5rem;height:.5rem;padding:0;right:.125rem;border-radius:50%}.x-badge-offset>sup{right:inherit}.x-badge-primary>sup{background-color:var(--x-primary)}.x-badge-success>sup{background-color:var(--x-success)}.x-badge-info>sup{background-color:var(--x-info)}.x-badge-warning>sup{background-color:var(--x-warning)}.x-badge-danger>sup{background-color:var(--x-danger)}.x-badge-text>sup{background-color:var(--x-text)}\n"] }]
|
|
109
109
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; } });
|
|
110
110
|
|
|
111
111
|
class XBadgeModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-badge.mjs","sources":["../../../../lib/ng-nest/ui/badge/badge.property.ts","../../../../lib/ng-nest/ui/badge/badge.component.ts","../../../../lib/ng-nest/ui/badge/badge.component.html","../../../../lib/ng-nest/ui/badge/badge.module.ts","../../../../lib/ng-nest/ui/badge/ng-nest-ui-badge.ts"],"sourcesContent":["import { XProperty, XInputNumber, XInputBoolean, XNumber, XBoolean, XType, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Badge\r\n * @selector x-badge\r\n * @decorator component\r\n */\r\nexport const XBadgePrefix = 'x-badge';\r\nconst X_CONFIG_NAME = 'badge';\r\n\r\n/**\r\n * Badge Property\r\n */\r\n@Component({ template: '' })\r\nexport class XBadgeProperty extends XProperty {\r\n /**\r\n * @zh_CN 背景颜色\r\n * @en_US Background color\r\n */\r\n @Input() @XWithConfig<XBadgeType>(X_CONFIG_NAME, 'danger') type?: XBadgeType;\r\n /**\r\n * @zh_CN 最大值\r\n * @en_US Max\r\n */\r\n @Input() @XInputNumber() max?: XNumber;\r\n /**\r\n * @zh_CN 显示值\r\n * @en_US Display value\r\n */\r\n @Input() value: XNumber = '';\r\n /**\r\n * @zh_CN 偏移值 [left, top]\r\n * @en_US Offset value\r\n */\r\n @Input() offset: (number | string)[] = [];\r\n /**\r\n * @zh_CN 是否显示小红点\r\n * @en_US Whether to show the small red dot\r\n */\r\n @Input() @XInputBoolean() dot?: XBoolean;\r\n}\r\n\r\n/**\r\n * @zh_CN 标记类型\r\n * @en_US Mark type\r\n */\r\nexport type XBadgeType = XType;\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n OnChanges\r\n} from '@angular/core';\r\nimport { XBadgePrefix, XBadgeProperty } from './badge.property';\r\nimport { XIsNumber, XIsChange, XIsEmpty, XConfigService, XIsArray, XBadgeAnimation } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XBadgePrefix}`,\r\n templateUrl: './badge.component.html',\r\n styleUrls: ['./badge.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XBadgeAnimation]\r\n})\r\nexport class XBadgeComponent extends XBadgeProperty implements OnInit, OnChanges {\r\n displayValue: string = '';\r\n viewInit = false;\r\n\r\n get getOffsetLeft() {\r\n if (this.offset && XIsArray(this.offset) && this.offset.length > 0) {\r\n return this.offset[0];\r\n }\r\n return null;\r\n }\r\n\r\n get getOffsetTop() {\r\n if (this.offset && XIsArray(this.offset) && this.offset.length > 1) {\r\n return this.offset[1];\r\n }\r\n return null;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges) {\r\n const { value } = simples;\r\n XIsChange(value) && this.setDisplayValue();\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n setClassMap() {\r\n this.classMap[`${XBadgePrefix}-${this.type}`] = !XIsEmpty(this.type);\r\n }\r\n\r\n setDisplayValue() {\r\n let toNumber = Number(this.value);\r\n if (XIsNumber(toNumber) && this.max && toNumber > this.max) {\r\n this.displayValue = `${this.max}+`;\r\n } else {\r\n this.displayValue = `${this.value}`;\r\n }\r\n }\r\n}\r\n","<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XBadgeComponent } from './badge.component';\r\nimport { XBadgeProperty } from './badge.property';\r\n\r\n@NgModule({\r\n declarations: [XBadgeComponent, XBadgeProperty],\r\n exports: [XBadgeComponent],\r\n imports: [CommonModule]\r\n})\r\nexport class XBadgeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,SAAS,CAAA;AAD7C,IAAA,WAAA,GAAA;;AAYE;;;AAGG;AACM,QAAA,IAAK,CAAA,KAAA,GAAY,EAAE,CAAC;AAC7B;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAC;KAM3C;;8HA1BY,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,mBAAA,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,+JADJ,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAMoC,UAAA,CAAA;AAAjD,IAAA,WAAW,CAAa,aAAa,EAAE,QAAQ,CAAC;CAAmB,EAAA,cAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKpD,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;CAAe,EAAA,cAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA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MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,ECtB5B,QAAA,EAAA,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,mWAMA,EDcc,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-badge.mjs","sources":["../../../../lib/ng-nest/ui/badge/badge.property.ts","../../../../lib/ng-nest/ui/badge/badge.component.ts","../../../../lib/ng-nest/ui/badge/badge.component.html","../../../../lib/ng-nest/ui/badge/badge.module.ts","../../../../lib/ng-nest/ui/badge/ng-nest-ui-badge.ts"],"sourcesContent":["import { XProperty, XInputNumber, XInputBoolean, XNumber, XBoolean, XType, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Badge\r\n * @selector x-badge\r\n * @decorator component\r\n */\r\nexport const XBadgePrefix = 'x-badge';\r\nconst X_CONFIG_NAME = 'badge';\r\n\r\n/**\r\n * Badge Property\r\n */\r\n@Component({ template: '' })\r\nexport class XBadgeProperty extends XProperty {\r\n /**\r\n * @zh_CN 背景颜色\r\n * @en_US Background color\r\n */\r\n @Input() @XWithConfig<XBadgeType>(X_CONFIG_NAME, 'danger') type?: XBadgeType;\r\n /**\r\n * @zh_CN 最大值\r\n * @en_US Max\r\n */\r\n @Input() @XInputNumber() max?: XNumber;\r\n /**\r\n * @zh_CN 显示值\r\n * @en_US Display value\r\n */\r\n @Input() value: XNumber = '';\r\n /**\r\n * @zh_CN 偏移值 [left, top]\r\n * @en_US Offset value\r\n */\r\n @Input() offset: (number | string)[] = [];\r\n /**\r\n * @zh_CN 是否显示小红点\r\n * @en_US Whether to show the small red dot\r\n */\r\n @Input() @XInputBoolean() dot?: XBoolean;\r\n}\r\n\r\n/**\r\n * @zh_CN 标记类型\r\n * @en_US Mark type\r\n */\r\nexport type XBadgeType = XType;\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n OnChanges\r\n} from '@angular/core';\r\nimport { XBadgePrefix, XBadgeProperty } from './badge.property';\r\nimport { XIsNumber, XIsChange, XIsEmpty, XConfigService, XIsArray, XBadgeAnimation } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XBadgePrefix}`,\r\n templateUrl: './badge.component.html',\r\n styleUrls: ['./badge.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XBadgeAnimation]\r\n})\r\nexport class XBadgeComponent extends XBadgeProperty implements OnInit, OnChanges {\r\n displayValue: string = '';\r\n viewInit = false;\r\n\r\n get getOffsetLeft() {\r\n if (this.offset && XIsArray(this.offset) && this.offset.length > 0) {\r\n return this.offset[0];\r\n }\r\n return null;\r\n }\r\n\r\n get getOffsetTop() {\r\n if (this.offset && XIsArray(this.offset) && this.offset.length > 1) {\r\n return this.offset[1];\r\n }\r\n return null;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges) {\r\n const { value } = simples;\r\n XIsChange(value) && this.setDisplayValue();\r\n }\r\n\r\n ngAfterViewInit() {\r\n }\r\n\r\n setClassMap() {\r\n this.classMap[`${XBadgePrefix}-${this.type}`] = !XIsEmpty(this.type);\r\n }\r\n\r\n setDisplayValue() {\r\n let toNumber = Number(this.value);\r\n if (XIsNumber(toNumber) && this.max && toNumber > this.max) {\r\n this.displayValue = `${this.max}+`;\r\n } else {\r\n this.displayValue = `${this.value}`;\r\n }\r\n }\r\n}\r\n","<div #badge class=\"x-badge\" [ngClass]=\"classMap\" [class.x-badge-dot]=\"dot\" [class.x-badge-offset]=\"getOffsetLeft\">\r\n <ng-content></ng-content>\r\n <sup [@x-badge-animation] [style.marginLeft]=\"getOffsetLeft\" [style.marginTop]=\"getOffsetTop\">\r\n <ng-container *ngIf=\"!dot\">{{ displayValue }}</ng-container>\r\n </sup>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XBadgeComponent } from './badge.component';\r\nimport { XBadgeProperty } from './badge.property';\r\n\r\n@NgModule({\r\n declarations: [XBadgeComponent, XBadgeProperty],\r\n exports: [XBadgeComponent],\r\n imports: [CommonModule]\r\n})\r\nexport class XBadgeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,SAAS,CAAA;AAD7C,IAAA,WAAA,GAAA;;AAYE;;;AAGG;AACM,QAAA,IAAK,CAAA,KAAA,GAAY,EAAE,CAAC;AAC7B;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAC;KAM3C;;8HA1BY,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,mBAAA,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,+JADJ,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAMoC,UAAA,CAAA;AA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uBAAuB,CAAC,MAAM,EACnC,UAAA,EAAA,CAAC,eAAe,CAAC,EAAA,QAAA,EAAA,mWAAA,EAAA,MAAA,EAAA,CAAA,46BAAA,CAAA,EAAA,CAAA;;;MEVlB,YAAY,CAAA;;4HAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAZ,mBAAA,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBAJR,eAAe,EAAE,cAAc,CAEpC,EAAA,OAAA,EAAA,CAAA,YAAY,aADZ,eAAe,CAAA,EAAA,CAAA,CAAA;AAGd,mBAAA,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAFb,YAAY,CAAA,EAAA,CAAA,CAAA;2FAEX,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@ng-nest/ui/core';
|
|
4
|
-
import { XProperty, XIsChange } from '@ng-nest/ui/core';
|
|
4
|
+
import { XProperty, XIsChange, XIsEmpty } from '@ng-nest/ui/core';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { DatePipe, LowerCasePipe, CommonModule } from '@angular/common';
|
|
7
7
|
import { map, takeUntil } from 'rxjs/operators';
|
|
@@ -38,6 +38,11 @@ class XCalendarProperty extends XProperty {
|
|
|
38
38
|
* @en_US Display mode
|
|
39
39
|
*/
|
|
40
40
|
this.model = 'month';
|
|
41
|
+
/**
|
|
42
|
+
* @zh_CN 显示类型
|
|
43
|
+
* @en_US Display type
|
|
44
|
+
*/
|
|
45
|
+
this.displayType = 'calendar';
|
|
41
46
|
/**
|
|
42
47
|
* @zh_CN 选择日期变化的事件
|
|
43
48
|
* @en_US Select the event of the date change
|
|
@@ -51,7 +56,7 @@ class XCalendarProperty extends XProperty {
|
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
/** @nocollapse */ XCalendarProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCalendarProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
-
/** @nocollapse */ XCalendarProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCalendarProperty, selector: "ng-component", inputs: { data: "data", model: "model" }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
59
|
+
/** @nocollapse */ XCalendarProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCalendarProperty, selector: "ng-component", inputs: { data: "data", model: "model", displayType: "displayType", headerLeftTemp: "headerLeftTemp" }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
55
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCalendarProperty, decorators: [{
|
|
56
61
|
type: Component,
|
|
57
62
|
args: [{ template: '' }]
|
|
@@ -59,6 +64,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
59
64
|
type: Input
|
|
60
65
|
}], model: [{
|
|
61
66
|
type: Input
|
|
67
|
+
}], displayType: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], headerLeftTemp: [{
|
|
70
|
+
type: Input
|
|
62
71
|
}], dateChange: [{
|
|
63
72
|
type: Output
|
|
64
73
|
}], rangeChange: [{
|
|
@@ -94,6 +103,7 @@ class XCalendarComponent extends XCalendarProperty {
|
|
|
94
103
|
this.setLocal();
|
|
95
104
|
this.cdr.markForCheck();
|
|
96
105
|
});
|
|
106
|
+
this.setClassMap();
|
|
97
107
|
}
|
|
98
108
|
ngOnChanges(changes) {
|
|
99
109
|
const { data } = changes;
|
|
@@ -103,6 +113,9 @@ class XCalendarComponent extends XCalendarProperty {
|
|
|
103
113
|
this._unSubject.next();
|
|
104
114
|
this._unSubject.unsubscribe();
|
|
105
115
|
}
|
|
116
|
+
setClassMap() {
|
|
117
|
+
this.classMap[`${XCalendarPrefix}-${this.displayType}`] = !XIsEmpty(this.displayType);
|
|
118
|
+
}
|
|
106
119
|
action(next) {
|
|
107
120
|
let datetime = new Date(this.datetime.getTime());
|
|
108
121
|
if (this.model === 'month') {
|
|
@@ -174,10 +187,10 @@ class XCalendarComponent extends XCalendarProperty {
|
|
|
174
187
|
}
|
|
175
188
|
}
|
|
176
189
|
/** @nocollapse */ XCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCalendarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.DatePipe }, { token: i1.LowerCasePipe }, { token: i2.XConfigService }, { token: i3.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
177
|
-
/** @nocollapse */ XCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCalendarComponent, selector: "x-calendar", providers: [DatePipe, LowerCasePipe], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #calendar class=\"x-calendar\">\r\n <div class=\"x-calendar-header\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-calendar{margin:0;padding:0;box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header>x-date-picker{display:inline-block;width:6rem}.x-calendar-header>x-buttons,.x-calendar-header>x-radio{margin-left:.5rem}.x-calendar-body{margin:.25rem -.25rem 0}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;padding:.325rem;margin:0 .25rem;display:inline-block;text-align:right;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;text-align:left;position:relative;flex:1;overflow:hidden;height:6.75rem;border-top:.125rem solid var(--x-border);margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block;padding:.325rem;text-align:right}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;height:4.5rem;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-background-300)}.x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-300)}.x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.XLinkComponent, selector: "x-link" }, { kind: "directive", type: i6.XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "component", type: i7.XRadioComponent, selector: "x-radio" }, { kind: "component", type: i8.XDatePickerComponent, selector: "x-date-picker" }, { kind: "component", type: i8.XPickerDateComponent, selector: "x-picker-date" }, { kind: "component", type: i8.XPickerMonthComponent, selector: "x-picker-month" }, { kind: "component", type: i9.XButtonComponent, selector: "x-button" }, { kind: "component", type: i9.XButtonsComponent, selector: "x-buttons" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
190
|
+
/** @nocollapse */ XCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCalendarComponent, selector: "x-calendar", providers: [DatePipe, LowerCasePipe], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #calendar class=\"x-calendar\" [ngClass]=\"classMap\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n <ng-container *ngIf=\"headerLeftTemp\">\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\" [clearable]=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["x-calendar{display:inline-block}.x-calendar{margin:0;padding:0;box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:space-between}.x-calendar-header-right{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header-right>x-date-picker{display:inline-block;width:6rem}.x-calendar-header-right>x-buttons,.x-calendar-header-right>x-radio{margin-left:.5rem}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{padding:.325rem;margin:0 .25rem;display:inline-block;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;position:relative;flex:1;overflow:hidden;margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-calendar{margin:.25rem -.25rem 0}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;text-align:right}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td{height:6.75rem;border-top:.125rem solid var(--x-border);text-align:left}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{text-align:right;padding:.325rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{height:4.5rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary-900)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary);border-top-color:var(--x-primary)}.x-calendar-card{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-calendar-card .x-calendar-header{padding:.5rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td{margin:.25rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-color:transparent}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{padding:.125rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary);color:var(--x-background-100)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200);color:var(--x-primary)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-700)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-month:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-month:not(.x-activated){color:var(--x-primary);background-color:transparent;border-color:var(--x-primary)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.XLinkComponent, selector: "x-link" }, { kind: "directive", type: i6.XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "component", type: i7.XRadioComponent, selector: "x-radio" }, { kind: "component", type: i8.XDatePickerComponent, selector: "x-date-picker" }, { kind: "component", type: i8.XPickerDateComponent, selector: "x-picker-date" }, { kind: "component", type: i8.XPickerMonthComponent, selector: "x-picker-month" }, { kind: "component", type: i9.XButtonComponent, selector: "x-button" }, { kind: "component", type: i9.XButtonsComponent, selector: "x-buttons" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
178
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCalendarComponent, decorators: [{
|
|
179
192
|
type: Component,
|
|
180
|
-
args: [{ selector: `${XCalendarPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DatePipe, LowerCasePipe], template: "<div #calendar class=\"x-calendar\">\r\n <div class=\"x-calendar-header\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-calendar{margin:0;padding:0;box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header>x-date-picker{display:inline-block;width:6rem}.x-calendar-header>x-buttons,.x-calendar-header>x-radio{margin-left:.5rem}.x-calendar-body{margin:.25rem -.25rem 0}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;padding:.325rem;margin:0 .25rem;display:inline-block;text-align:right;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;text-align:left;position:relative;flex:1;overflow:hidden;height:6.75rem;border-top:.125rem solid var(--x-border);margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block;padding:.325rem;text-align:right}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;height:4.5rem;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-background-300)}.x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-300)}.x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary)}\n"] }]
|
|
193
|
+
args: [{ selector: `${XCalendarPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DatePipe, LowerCasePipe], template: "<div #calendar class=\"x-calendar\" [ngClass]=\"classMap\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n <ng-container *ngIf=\"headerLeftTemp\">\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\" [clearable]=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["x-calendar{display:inline-block}.x-calendar{margin:0;padding:0;box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:space-between}.x-calendar-header-right{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header-right>x-date-picker{display:inline-block;width:6rem}.x-calendar-header-right>x-buttons,.x-calendar-header-right>x-radio{margin-left:.5rem}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{padding:.325rem;margin:0 .25rem;display:inline-block;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;position:relative;flex:1;overflow:hidden;margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-calendar{margin:.25rem -.25rem 0}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;text-align:right}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td{height:6.75rem;border-top:.125rem solid var(--x-border);text-align:left}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{text-align:right;padding:.325rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{height:4.5rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary-900)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary);border-top-color:var(--x-primary)}.x-calendar-card{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-calendar-card .x-calendar-header{padding:.5rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td{margin:.25rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-color:transparent}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{padding:.125rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary);color:var(--x-background-100)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200);color:var(--x-primary)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-700)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-month:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-month:not(.x-activated){color:var(--x-primary);background-color:transparent;border-color:var(--x-primary)}\n"] }]
|
|
181
194
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.DatePipe }, { type: i1.LowerCasePipe }, { type: i2.XConfigService }, { type: i3.XI18nService }]; } });
|
|
182
195
|
|
|
183
196
|
class XCalendarModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-calendar.mjs","sources":["../../../../lib/ng-nest/ui/calendar/calendar.property.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.html","../../../../lib/ng-nest/ui/calendar/calendar.module.ts","../../../../lib/ng-nest/ui/calendar/ng-nest-ui-calendar.ts"],"sourcesContent":["import { XIdentityProperty, XProperty } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\n\r\n/**\r\n * Calendar\r\n * @selector x-calendar\r\n * @decorator component\r\n */\r\nexport const XCalendarPrefix = 'x-calendar';\r\n\r\n/**\r\n * Calendar Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCalendarProperty extends XProperty {\r\n /**\r\n * @zh_CN 事务数据对象\r\n * @en_US Transaction data object\r\n */\r\n @Input() data?: XCalendarData;\r\n /**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\n @Input() model: XCalendarModel = 'month';\r\n /**\r\n * @zh_CN 选择日期变化的事件\r\n * @en_US Select the event of the date change\r\n */\r\n @Output() dateChange = new EventEmitter<Date>();\r\n /**\r\n * @zh_CN 日期范围变化的事件\r\n * @en_US Date range change event\r\n */\r\n @Output() rangeChange = new EventEmitter<Date[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarData {\r\n /**\r\n * key-value\r\n * 2020-2-22: [{id:\"1\",label:\"1\"}]\r\n */\r\n [property: string]: XCalendarNode[];\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarNode extends XIdentityProperty {}\r\n\r\n/**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\nexport type XCalendarModel = 'month' | 'year';\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n OnChanges,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XCalendarPrefix, XCalendarProperty, XCalendarNode } from './calendar.property';\r\nimport { XIsChange, XConfigService } from '@ng-nest/ui/core';\r\nimport { DatePipe, LowerCasePipe } from '@angular/common';\r\nimport { XI18nService, XI18nCalendar } from '@ng-nest/ui/i18n';\r\nimport { takeUntil, map } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XCalendarPrefix}`,\r\n templateUrl: './calendar.component.html',\r\n styleUrls: ['./calendar.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [DatePipe, LowerCasePipe]\r\n})\r\nexport class XCalendarComponent extends XCalendarProperty implements OnChanges, OnDestroy {\r\n now: Date = new Date();\r\n datetime: Date = new Date();\r\n activatedDate: Date = new Date();\r\n monthData: { [property: string]: XCalendarNode[] } = {};\r\n locale: XI18nCalendar = {};\r\n radioData = [\r\n { label: '月', id: 'month' },\r\n { label: '年', id: 'year' }\r\n ];\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public datePipe: DatePipe,\r\n public lowerCasePipe: LowerCasePipe,\r\n public configService: XConfigService,\r\n public i18n: XI18nService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.calendar as XI18nCalendar),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.setLocal();\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n const { data } = changes;\r\n XIsChange(data) && this.setMonthData();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n action(next: number) {\r\n let datetime = new Date(this.datetime.getTime());\r\n if (this.model === 'month') {\r\n datetime.setMonth(datetime.getMonth() + next);\r\n } else if (this.model === 'year') {\r\n datetime.setFullYear(datetime.getFullYear() + next);\r\n }\r\n this.datetime = datetime;\r\n this.cdr.markForCheck();\r\n }\r\n\r\n setLocal() {\r\n this.radioData = this.radioData.map((x) => {\r\n x.label = (this.locale as any)[x.id];\r\n return x;\r\n });\r\n }\r\n\r\n setMonthData() {\r\n let dt: { [property: string]: XCalendarNode[] } = {};\r\n for (let key in this.data) {\r\n let month = this.datePipe.transform(key, 'yyyy-MM') as string;\r\n let value = '';\r\n this.data[key].forEach((x) => {\r\n value += `${x.id}${x.label} <br/>`;\r\n });\r\n let item = { id: key, label: value };\r\n if (dt[month]) {\r\n dt[month] = [...dt[month], item];\r\n } else {\r\n dt[month] = [item];\r\n }\r\n }\r\n\r\n this.monthData = dt;\r\n }\r\n\r\n getLocaleMonth(date: Date) {\r\n return (this.locale as any)[this.lowerCasePipe.transform(this.datePipe.transform(date, 'LLLL') as string)];\r\n }\r\n\r\n dateOnChange(date: Date) {\r\n if (this.datePipe.transform(date, 'yyyy-MM-dd') !== this.datePipe.transform(this.activatedDate, 'yyyy-MM-dd')) {\r\n this.activatedDate = date;\r\n this.dateChange.emit(this.activatedDate);\r\n this.cdr.markForCheck();\r\n }\r\n }\r\n\r\n modelOnChange() {\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rangeOnChange(range: Date[]) {\r\n this.rangeChange.emit(range);\r\n }\r\n\r\n getDate(date: Date): XCalendarNode[] {\r\n if (this.data) {\r\n return this.data[this.datePipe.transform(date, 'yyyy-MM-dd') as string];\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n getMonth(date: Date): XCalendarNode[] {\r\n return this.monthData?.[this.datePipe.transform(date, 'yyyy-MM') as string];\r\n }\r\n\r\n trackByDate(_index: number, item: XCalendarNode) {\r\n return `${item.id}-${item.label}`;\r\n }\r\n\r\n trackByMonth(_index: number, item: XCalendarNode) {\r\n return item.id;\r\n }\r\n}\r\n","<div #calendar class=\"x-calendar\">\r\n <div class=\"x-calendar-header\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XCalendarComponent } from './calendar.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XDatePickerModule } from '@ng-nest/ui/date-picker';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioModule } from '@ng-nest/ui/radio';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XTooltipModule } from '@ng-nest/ui/tooltip';\r\nimport { XCalendarProperty } from './calendar.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\n\r\n@NgModule({\r\n declarations: [XCalendarComponent, XCalendarProperty],\r\n exports: [XCalendarComponent],\r\n imports: [CommonModule, FormsModule, XLinkModule, XTooltipModule, XRadioModule, XDatePickerModule, XButtonModule, XI18nModule]\r\n})\r\nexport class XCalendarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA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EAAE,iBAAiB,aAE1C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,CAAA,EAAA,OAAA,EAAA,CADnH,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGjB,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFhB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;2FAElH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;oBACrD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,CAAC;iBAC/H,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-calendar.mjs","sources":["../../../../lib/ng-nest/ui/calendar/calendar.property.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.html","../../../../lib/ng-nest/ui/calendar/calendar.module.ts","../../../../lib/ng-nest/ui/calendar/ng-nest-ui-calendar.ts"],"sourcesContent":["import { XIdentityProperty, XProperty } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component, TemplateRef } from '@angular/core';\r\n\r\n/**\r\n * Calendar\r\n * @selector x-calendar\r\n * @decorator component\r\n */\r\nexport const XCalendarPrefix = 'x-calendar';\r\n\r\n/**\r\n * Calendar Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCalendarProperty extends XProperty {\r\n /**\r\n * @zh_CN 事务数据对象\r\n * @en_US Transaction data object\r\n */\r\n @Input() data?: XCalendarData;\r\n /**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\n @Input() model: XCalendarModel = 'month';\r\n /**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n */\r\n @Input() displayType: XCalendarType = 'calendar';\r\n /**\r\n * @zh_CN 头部显示模版\r\n * @en_US Head display template\r\n */\r\n @Input() headerLeftTemp?: TemplateRef<void>;\r\n /**\r\n * @zh_CN 选择日期变化的事件\r\n * @en_US Select the event of the date change\r\n */\r\n @Output() dateChange = new EventEmitter<Date>();\r\n /**\r\n * @zh_CN 日期范围变化的事件\r\n * @en_US Date range change event\r\n */\r\n @Output() rangeChange = new EventEmitter<Date[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarData {\r\n /**\r\n * key-value { \"2020-2-22\": [{id:\"1\",label:\"1\"}] }\r\n */\r\n [property: string]: XCalendarNode[];\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarNode extends XIdentityProperty {}\r\n\r\n/**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\nexport type XCalendarModel = 'month' | 'year';\r\n\r\n/**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n */\r\nexport type XCalendarType = 'calendar' | 'card';\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n SimpleChanges,\r\n OnChanges,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XCalendarPrefix, XCalendarProperty, XCalendarNode } from './calendar.property';\r\nimport { XIsChange, XConfigService, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { DatePipe, LowerCasePipe } from '@angular/common';\r\nimport { XI18nService, XI18nCalendar } from '@ng-nest/ui/i18n';\r\nimport { takeUntil, map } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XCalendarPrefix}`,\r\n templateUrl: './calendar.component.html',\r\n styleUrls: ['./calendar.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [DatePipe, LowerCasePipe]\r\n})\r\nexport class XCalendarComponent extends XCalendarProperty implements OnChanges, OnDestroy {\r\n now: Date = new Date();\r\n datetime: Date = new Date();\r\n activatedDate: Date = new Date();\r\n monthData: { [property: string]: XCalendarNode[] } = {};\r\n locale: XI18nCalendar = {};\r\n radioData = [\r\n { label: '月', id: 'month' },\r\n { label: '年', id: 'year' }\r\n ];\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public datePipe: DatePipe,\r\n public lowerCasePipe: LowerCasePipe,\r\n public configService: XConfigService,\r\n public i18n: XI18nService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.calendar as XI18nCalendar),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.setLocal();\r\n this.cdr.markForCheck();\r\n });\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n const { data } = changes;\r\n XIsChange(data) && this.setMonthData();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setClassMap() {\r\n this.classMap[`${XCalendarPrefix}-${this.displayType}`] = !XIsEmpty(this.displayType);\r\n }\r\n\r\n action(next: number) {\r\n let datetime = new Date(this.datetime.getTime());\r\n if (this.model === 'month') {\r\n datetime.setMonth(datetime.getMonth() + next);\r\n } else if (this.model === 'year') {\r\n datetime.setFullYear(datetime.getFullYear() + next);\r\n }\r\n this.datetime = datetime;\r\n this.cdr.markForCheck();\r\n }\r\n\r\n setLocal() {\r\n this.radioData = this.radioData.map((x) => {\r\n x.label = (this.locale as any)[x.id];\r\n return x;\r\n });\r\n }\r\n\r\n setMonthData() {\r\n let dt: { [property: string]: XCalendarNode[] } = {};\r\n for (let key in this.data) {\r\n let month = this.datePipe.transform(key, 'yyyy-MM') as string;\r\n let value = '';\r\n this.data[key].forEach((x) => {\r\n value += `${x.id}${x.label} <br/>`;\r\n });\r\n let item = { id: key, label: value };\r\n if (dt[month]) {\r\n dt[month] = [...dt[month], item];\r\n } else {\r\n dt[month] = [item];\r\n }\r\n }\r\n\r\n this.monthData = dt;\r\n }\r\n\r\n getLocaleMonth(date: Date) {\r\n return (this.locale as any)[this.lowerCasePipe.transform(this.datePipe.transform(date, 'LLLL') as string)];\r\n }\r\n\r\n dateOnChange(date: Date) {\r\n if (this.datePipe.transform(date, 'yyyy-MM-dd') !== this.datePipe.transform(this.activatedDate, 'yyyy-MM-dd')) {\r\n this.activatedDate = date;\r\n this.dateChange.emit(this.activatedDate);\r\n this.cdr.markForCheck();\r\n }\r\n }\r\n\r\n modelOnChange() {\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rangeOnChange(range: Date[]) {\r\n this.rangeChange.emit(range);\r\n }\r\n\r\n getDate(date: Date): XCalendarNode[] {\r\n if (this.data) {\r\n return this.data[this.datePipe.transform(date, 'yyyy-MM-dd') as string];\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n getMonth(date: Date): XCalendarNode[] {\r\n return this.monthData?.[this.datePipe.transform(date, 'yyyy-MM') as string];\r\n }\r\n\r\n trackByDate(_index: number, item: XCalendarNode) {\r\n return `${item.id}-${item.label}`;\r\n }\r\n\r\n trackByMonth(_index: number, item: XCalendarNode) {\r\n return item.id;\r\n }\r\n}\r\n","<div #calendar class=\"x-calendar\" [ngClass]=\"classMap\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n <ng-container *ngIf=\"headerLeftTemp\">\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker [(ngModel)]=\"datetime\" [type]=\"model\" showHeader=\"false\" [clearable]=\"false\"></x-date-picker>\r\n <x-buttons>\r\n <x-button (click)=\"action(-1)\">{{ model === 'month' ? locale.lastMonth : locale.lastYear }}</x-button>\r\n <x-button (click)=\"action(1)\">{{ model === 'month' ? locale.nextMonth : locale.nextYear }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData\" [(ngModel)]=\"model\" (ngModelChange)=\"modelOnChange()\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n <x-picker-date\r\n *ngIf=\"model === 'month'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n <x-picker-month\r\n *ngIf=\"model === 'year'\"\r\n [display]=\"datetime\"\r\n (modelChange)=\"dateOnChange($event)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n <div class=\"x-calendar-date-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getDate(date)\">\r\n <li *ngFor=\"let item of getDate(date); trackBy: trackByDate\">\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n <div class=\"x-calendar-month-content\" *ngIf=\"displayType === 'calendar'\">\r\n <ul *ngIf=\"getMonth(date)\">\r\n <li *ngFor=\"let item of getMonth(date); trackBy: trackByMonth\">\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XCalendarComponent } from './calendar.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XDatePickerModule } from '@ng-nest/ui/date-picker';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioModule } from '@ng-nest/ui/radio';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XTooltipModule } from '@ng-nest/ui/tooltip';\r\nimport { XCalendarProperty } from './calendar.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\n\r\n@NgModule({\r\n declarations: [XCalendarComponent, XCalendarProperty],\r\n exports: [XCalendarComponent],\r\n imports: [CommonModule, FormsModule, XLinkModule, XTooltipModule, XRadioModule, XDatePickerModule, XButtonModule, XI18nModule]\r\n})\r\nexport class XCalendarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAE5C;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAOE;;;AAGG;AAC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,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,CAAC;iBAC/H,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -87,10 +87,13 @@ const XCollapsePanelPrefix = 'x-collapse-panel';
|
|
|
87
87
|
class XCollapsePanelProperty extends XProperty {
|
|
88
88
|
}
|
|
89
89
|
/** @nocollapse */ XCollapsePanelProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCollapsePanelProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
-
/** @nocollapse */ XCollapsePanelProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCollapsePanelProperty, selector: "ng-component", inputs: { label: "label", active: "active" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
90
|
+
/** @nocollapse */ XCollapsePanelProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCollapsePanelProperty, selector: "ng-component", inputs: { label: "label", active: "active", disabled: "disabled" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
91
91
|
__decorate([
|
|
92
92
|
XInputBoolean()
|
|
93
93
|
], XCollapsePanelProperty.prototype, "active", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
XInputBoolean()
|
|
96
|
+
], XCollapsePanelProperty.prototype, "disabled", void 0);
|
|
94
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCollapsePanelProperty, decorators: [{
|
|
95
98
|
type: Component,
|
|
96
99
|
args: [{ template: '' }]
|
|
@@ -98,6 +101,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
98
101
|
type: Input
|
|
99
102
|
}], active: [{
|
|
100
103
|
type: Input
|
|
104
|
+
}], disabled: [{
|
|
105
|
+
type: Input
|
|
101
106
|
}] } });
|
|
102
107
|
|
|
103
108
|
class XCollapseComponent extends XCollapseProperty {
|
|
@@ -172,10 +177,10 @@ class XCollapsePanelComponent extends XCollapsePanelProperty {
|
|
|
172
177
|
}
|
|
173
178
|
}
|
|
174
179
|
/** @nocollapse */ XCollapsePanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCollapsePanelComponent, deps: [{ token: XCollapseComponent, host: true, optional: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
-
/** @nocollapse */ XCollapsePanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCollapsePanelComponent, selector: "x-collapse-panel", usesInheritance: true, ngImport: i0, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"active\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0;box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:.625rem 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{overflow:hidden;border-bottom:.0625rem solid transparent;transition:border-color .3s}.x-collapse-panel-content{padding-bottom:.625rem}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i4.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XDropAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
180
|
+
/** @nocollapse */ XCollapsePanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XCollapsePanelComponent, selector: "x-collapse-panel", usesInheritance: true, ngImport: i0, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"active\" [class.x-collapse-panel-disabled]=\"disabled\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"!disabled && headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0;box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:.625rem 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-disabled .x-collapse-panel-header-title{color:var(--x-text-400);cursor:not-allowed}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{overflow:hidden;border-bottom:.0625rem solid transparent;transition:border-color .3s}.x-collapse-panel-content{padding-bottom:.625rem}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i4.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XDropAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
176
181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCollapsePanelComponent, decorators: [{
|
|
177
182
|
type: Component,
|
|
178
|
-
args: [{ selector: `${XCollapsePanelPrefix}`, animations: [XDropAnimation], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"active\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0;box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:.625rem 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{overflow:hidden;border-bottom:.0625rem solid transparent;transition:border-color .3s}.x-collapse-panel-content{padding-bottom:.625rem}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border)}\n"] }]
|
|
183
|
+
args: [{ selector: `${XCollapsePanelPrefix}`, animations: [XDropAnimation], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-collapse-panel\" [class.x-activated]=\"active\" [class.x-collapse-panel-disabled]=\"disabled\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"!disabled && headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n", styles: [".x-collapse-panel{margin:0;padding:0;box-sizing:border-box}.x-collapse-panel-header{display:flex;align-items:center;justify-content:space-between;padding:.625rem 0;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);transition:border-color .3s;cursor:pointer}.x-collapse-panel-header-title{flex:1}.x-collapse-panel-header>.x-icon{margin-right:.125rem;color:var(--x-text-300);transition:transform .3s}.x-collapse-panel-disabled .x-collapse-panel-header-title{color:var(--x-text-400);cursor:not-allowed}.x-collapse-panel-icon-left{flex-direction:row-reverse}.x-collapse-panel-body{overflow:hidden;border-bottom:.0625rem solid transparent;transition:border-color .3s}.x-collapse-panel-content{padding-bottom:.625rem}.x-collapse-panel.x-activated .x-collapse-panel-header{border-bottom-color:transparent}.x-collapse-panel.x-activated .x-collapse-panel-header>.x-icon{transform:rotate(90deg)}.x-collapse-panel.x-activated .x-collapse-panel-body{border-bottom-color:var(--x-border)}\n"] }]
|
|
179
184
|
}], ctorParameters: function () {
|
|
180
185
|
return [{ type: XCollapseComponent, decorators: [{
|
|
181
186
|
type: Optional
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XInputBoolean, XTemplate, XNumber, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, EventEmitter, Output, Component } from '@angular/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCollapseProperty extends XProperty {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n */\r\n @Input() @XInputBoolean() accordion?: XBoolean;\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n */\r\n @Input() icon?: XTemplate;\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, true) showIcon?: Boolean;\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\n @Input() @XWithConfig<XCollapseIconPosition>(X_CONFIG_NAME, 'right') iconPosition?: XCollapseIconPosition;\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, false) ghost?: XBoolean;\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, false) bordered?: XBoolean;\r\n /**\r\n * @zh_CN 当前激活的面板序号\r\n * @en_US The serial number of the currently active panel\r\n */\r\n @Input() active: XNumber | XNumber[] = [];\r\n /**\r\n * @zh_CN 激活的面板发生变化的事件\r\n * @en_US The event that the activated panel changes\r\n */\r\n @Output() activeChange = new EventEmitter<XNumber | XNumber[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n */\r\n @Input() label?: XTemplate;\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n */\r\n @Input() @XInputBoolean() active?: XBoolean;\r\n}\r\n","import { Component, OnInit, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\nimport { XIsArray, XConfigService } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty implements OnInit {\r\n start: number = 0;\r\n panelChanges: Function[] = [];\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n if (!XIsArray(this.active)) this.active = [Number(this.active)];\r\n }\r\n\r\n change(num: number, add = true) {\r\n this.active = this.active as number[];\r\n const i = this.active.indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active = [...this.active, num];\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.splice(i, 1);\r\n }\r\n }\r\n if (this.accordion && this.active.length === 2) {\r\n const panel = this.panelChanges[this.active[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n this.activeChange.emit(this.active);\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost\" [class.x-collapse-bordered]=\"bordered\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n Host,\r\n Optional\r\n} from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XDropAnimation } from '@ng-nest/ui/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n animations: [XDropAnimation],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index!: number;\r\n\r\n constructor(\r\n @Optional() @Host() public collapseComponent: XCollapseComponent,\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.index = this.collapseComponent.start;\r\n this.collapseComponent.start++;\r\n this.collapseComponent.panelChanges = [\r\n ...this.collapseComponent.panelChanges,\r\n () => {\r\n this.headerClick();\r\n }\r\n ];\r\n if (this.active) this.collapseComponent.change(this.index);\r\n }\r\n\r\n headerClick() {\r\n this.active = !this.active;\r\n if (this.active) this.collapseComponent.change(this.index);\r\n else this.collapseComponent.change(this.index, false);\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"active\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XCollapseProperty, XCollapsePanelProperty } from './collapse.property';\r\n\r\n@NgModule({\r\n declarations: [XCollapseComponent, XCollapsePanelComponent, XCollapseProperty, XCollapsePanelProperty],\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [CommonModule, XIconModule, XOutletModule]\r\n})\r\nexport class XCollapseModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.XCollapseComponent"],"mappings":";;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAgCE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAC;AAC1C;;;AAGG;AACO,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAuB,CAAC;KAClE;;iIAzCY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,mBAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,oRADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAMG,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAsB,EAAA,iBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUsB,UAAA,CAA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AA,eAAe,EAFhB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEvC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,sBAAsB,CAAC;AACtG,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,CAAC;iBACpD,CAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-collapse.mjs","sources":["../../../../lib/ng-nest/ui/collapse/collapse.property.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.ts","../../../../lib/ng-nest/ui/collapse/collapse.component.html","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.ts","../../../../lib/ng-nest/ui/collapse/collapse-panel.component.html","../../../../lib/ng-nest/ui/collapse/collapse.module.ts","../../../../lib/ng-nest/ui/collapse/ng-nest-ui-collapse.ts"],"sourcesContent":["import { XProperty, XInputBoolean, XTemplate, XNumber, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, EventEmitter, Output, Component } from '@angular/core';\r\n\r\n/**\r\n * Collapse\r\n * @selector x-collapse\r\n * @decorator component\r\n */\r\nexport const XCollapsePrefix = 'x-collapse';\r\nconst X_CONFIG_NAME = 'collapse';\r\n\r\n/**\r\n * Collapse Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCollapseProperty extends XProperty {\r\n /**\r\n * @zh_CN 是否以手风琴的方式展示,只展开一个面板\r\n * @en_US Whether to display as an accordion, only expand one panel\r\n */\r\n @Input() @XInputBoolean() accordion?: XBoolean;\r\n /**\r\n * @zh_CN 显示的图标\r\n * @en_US The icon displayed on the right\r\n */\r\n @Input() icon?: XTemplate;\r\n /**\r\n * @zh_CN 显示/隐藏图标\r\n * @en_US Show / hide icon\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, true) showIcon?: Boolean;\r\n /**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\n @Input() @XWithConfig<XCollapseIconPosition>(X_CONFIG_NAME, 'right') iconPosition?: XCollapseIconPosition;\r\n /**\r\n * @zh_CN 幽灵面板\r\n * @en_US Ghost panel\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, false) ghost?: XBoolean;\r\n /**\r\n * @zh_CN 边框\r\n * @en_US border\r\n */\r\n @Input() @XInputBoolean() @XWithConfig<Boolean>(X_CONFIG_NAME, false) bordered?: XBoolean;\r\n /**\r\n * @zh_CN 当前激活的面板序号\r\n * @en_US The serial number of the currently active panel\r\n */\r\n @Input() active: XNumber | XNumber[] = [];\r\n /**\r\n * @zh_CN 激活的面板发生变化的事件\r\n * @en_US The event that the activated panel changes\r\n */\r\n @Output() activeChange = new EventEmitter<XNumber | XNumber[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN 图标位置\r\n * @en_US Icon position\r\n */\r\nexport type XCollapseIconPosition = 'left' | 'right';\r\n\r\n/**\r\n * Collapse Panel\r\n * @selector x-collapse-panel\r\n * @decorator component\r\n */\r\nexport const XCollapsePanelPrefix = 'x-collapse-panel';\r\n\r\n/**\r\n * Collapse Panel Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCollapsePanelProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题,支持模板自定义\r\n * @en_US Title, support template customization\r\n */\r\n @Input() label?: XTemplate;\r\n /**\r\n * @zh_CN 激活当前面板\r\n * @en_US Activate the current panel\r\n */\r\n @Input() @XInputBoolean() active?: XBoolean;\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US disabled\r\n */\r\n @Input() @XInputBoolean() disabled?: XBoolean;\r\n}\r\n","import { Component, OnInit, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XCollapsePrefix, XCollapseProperty } from './collapse.property';\r\nimport { XIsArray, XConfigService } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: `${XCollapsePrefix}`,\r\n templateUrl: './collapse.component.html',\r\n styleUrls: ['./collapse.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapseComponent extends XCollapseProperty implements OnInit {\r\n start: number = 0;\r\n panelChanges: Function[] = [];\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n if (!XIsArray(this.active)) this.active = [Number(this.active)];\r\n }\r\n\r\n change(num: number, add = true) {\r\n this.active = this.active as number[];\r\n const i = this.active.indexOf(num);\r\n if (i === -1) {\r\n if (add) {\r\n this.active = [...this.active, num];\r\n }\r\n } else {\r\n if (!add) {\r\n this.active.splice(i, 1);\r\n }\r\n }\r\n if (this.accordion && this.active.length === 2) {\r\n const panel = this.panelChanges[this.active[0] as number];\r\n panel && panel();\r\n return;\r\n }\r\n this.activeChange.emit(this.active);\r\n }\r\n}\r\n","<div #collapse class=\"x-collapse\" [class.x-collapse-ghost]=\"ghost\" [class.x-collapse-bordered]=\"bordered\">\r\n <ng-content></ng-content>\r\n</div>\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n Host,\r\n Optional\r\n} from '@angular/core';\r\nimport { XCollapsePanelPrefix, XCollapsePanelProperty } from './collapse.property';\r\nimport { XDropAnimation } from '@ng-nest/ui/core';\r\nimport { XCollapseComponent } from './collapse.component';\r\n\r\n@Component({\r\n selector: `${XCollapsePanelPrefix}`,\r\n templateUrl: './collapse-panel.component.html',\r\n styleUrls: ['./collapse-panel.component.scss'],\r\n animations: [XDropAnimation],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCollapsePanelComponent extends XCollapsePanelProperty implements OnInit {\r\n index!: number;\r\n\r\n constructor(\r\n @Optional() @Host() public collapseComponent: XCollapseComponent,\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.index = this.collapseComponent.start;\r\n this.collapseComponent.start++;\r\n this.collapseComponent.panelChanges = [\r\n ...this.collapseComponent.panelChanges,\r\n () => {\r\n this.headerClick();\r\n }\r\n ];\r\n if (this.active) this.collapseComponent.change(this.index);\r\n }\r\n\r\n headerClick() {\r\n this.active = !this.active;\r\n if (this.active) this.collapseComponent.change(this.index);\r\n else this.collapseComponent.change(this.index, false);\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div class=\"x-collapse-panel\" [class.x-activated]=\"active\" [class.x-collapse-panel-disabled]=\"disabled\">\r\n <div class=\"x-collapse-panel-header x-collapse-panel-icon-{{ collapseComponent.iconPosition }}\" (click)=\"!disabled && headerClick()\">\r\n <div class=\"x-collapse-panel-header-title\">\r\n <ng-container *xOutlet=\"label\">{{ label }}</ng-container>\r\n </div>\r\n <ng-container *ngIf=\"collapseComponent.showIcon\">\r\n <ng-container *xOutlet=\"collapseComponent.icon\">\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-collapse-panel-body\">\r\n <div class=\"x-collapse-panel-content\" [@x-drop-animation]=\"active\"><ng-content></ng-content></div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XCollapseComponent } from './collapse.component';\r\nimport { XCollapsePanelComponent } from './collapse-panel.component';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XCollapseProperty, XCollapsePanelProperty } from './collapse.property';\r\n\r\n@NgModule({\r\n declarations: [XCollapseComponent, XCollapsePanelComponent, XCollapseProperty, XCollapsePanelProperty],\r\n exports: [XCollapseComponent, XCollapsePanelComponent],\r\n imports: [CommonModule, XIconModule, XOutletModule]\r\n})\r\nexport class XCollapseModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.XCollapseComponent"],"mappings":";;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAgCE;;;AAGG;AACM,QAAA,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAC;AAC1C;;;AAGG;AACO,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAuB,CAAC;KAClE;;iIAzCY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,mBAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,oRADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAMG,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAsB,EAAA,iBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUsB,UAAA,CAAA;AAA3D,IAAA,aAAa,EAAE;AAAE,IAAA,WAAW,CAAU,aAAa,EAAE,IAAI,CAAC;CAAoB,EAAA,iBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;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