@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.
Files changed (179) hide show
  1. package/calendar/calendar.component.d.ts +1 -0
  2. package/calendar/calendar.property.d.ts +18 -4
  3. package/calendar/examples/en_US/default/card/README.md +6 -0
  4. package/calendar/examples/en_US/default/header/README.md +6 -0
  5. package/calendar/examples/zh_CN/default/card/README.md +6 -0
  6. package/calendar/examples/zh_CN/default/header/README.md +6 -0
  7. package/collapse/collapse.property.d.ts +6 -1
  8. package/collapse/examples/en_US/default/disabled/README.md +6 -0
  9. package/collapse/examples/zh_CN/default/disabled/README.md +6 -0
  10. package/core/config/config.d.ts +8 -0
  11. package/core/functions/convert.d.ts +1 -1
  12. package/dropdown/dropdown-portal.component.d.ts +3 -0
  13. package/dropdown/dropdown.property.d.ts +16 -1
  14. package/esm2020/badge/badge.component.mjs +3 -3
  15. package/esm2020/calendar/calendar.component.mjs +8 -4
  16. package/esm2020/calendar/calendar.property.mjs +11 -2
  17. package/esm2020/collapse/collapse-panel.component.mjs +3 -3
  18. package/esm2020/collapse/collapse.property.mjs +7 -2
  19. package/esm2020/core/config/config.mjs +1 -1
  20. package/esm2020/core/functions/convert.mjs +1 -1
  21. package/esm2020/date-picker/date-picker.component.mjs +5 -1
  22. package/esm2020/dropdown/dropdown-portal.component.mjs +6 -3
  23. package/esm2020/dropdown/dropdown.component.mjs +4 -1
  24. package/esm2020/dropdown/dropdown.property.mjs +8 -2
  25. package/esm2020/i18n/i18n.property.mjs +1 -1
  26. package/esm2020/i18n/languages/en_US.mjs +7 -2
  27. package/esm2020/i18n/languages/zh_CN.mjs +7 -2
  28. package/esm2020/i18n/languages/zh_TW.mjs +7 -2
  29. package/esm2020/image/image-group.component.mjs +18 -0
  30. package/esm2020/image/image-preview.component.mjs +136 -0
  31. package/esm2020/image/image.component.mjs +81 -0
  32. package/esm2020/image/image.module.mjs +26 -0
  33. package/esm2020/image/image.property.mjs +63 -0
  34. package/esm2020/image/ng-nest-ui-image.mjs +5 -0
  35. package/esm2020/image/public-api.mjs +6 -0
  36. package/esm2020/index.mjs +2 -1
  37. package/esm2020/input/input.component.mjs +2 -2
  38. package/esm2020/list/list.component.mjs +99 -13
  39. package/esm2020/list/list.module.mjs +8 -4
  40. package/esm2020/list/list.property.mjs +52 -2
  41. package/esm2020/loading/loading.component.mjs +3 -3
  42. package/esm2020/loading/loading.property.mjs +7 -2
  43. package/esm2020/popover/popover.directive.mjs +20 -3
  44. package/esm2020/popover/popover.property.mjs +1 -1
  45. package/esm2020/select/select.component.mjs +14 -6
  46. package/esm2020/slider/slider.component.mjs +27 -7
  47. package/esm2020/slider/slider.module.mjs +5 -4
  48. package/esm2020/slider/slider.property.mjs +13 -2
  49. package/esm2020/table/table-body.component.mjs +3 -3
  50. package/esm2020/table/table-head.component.mjs +4 -4
  51. package/esm2020/table/table.component.mjs +35 -4
  52. package/esm2020/table/table.property.mjs +8 -4
  53. package/esm2020/tabs/tabs.component.mjs +3 -3
  54. package/esm2020/tabs/tabs.property.mjs +13 -2
  55. package/esm2020/textarea/textarea.component.mjs +2 -2
  56. package/esm2020/timeline/timeline.component.mjs +6 -4
  57. package/fesm2015/ng-nest-ui-badge.mjs +2 -2
  58. package/fesm2015/ng-nest-ui-badge.mjs.map +1 -1
  59. package/fesm2015/ng-nest-ui-calendar.mjs +17 -4
  60. package/fesm2015/ng-nest-ui-calendar.mjs.map +1 -1
  61. package/fesm2015/ng-nest-ui-collapse.mjs +8 -3
  62. package/fesm2015/ng-nest-ui-collapse.mjs.map +1 -1
  63. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  64. package/fesm2015/ng-nest-ui-date-picker.mjs +4 -0
  65. package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
  66. package/fesm2015/ng-nest-ui-dropdown.mjs +15 -3
  67. package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
  68. package/fesm2015/ng-nest-ui-i18n.mjs +18 -3
  69. package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
  70. package/fesm2015/ng-nest-ui-image.mjs +312 -0
  71. package/fesm2015/ng-nest-ui-image.mjs.map +1 -0
  72. package/fesm2015/ng-nest-ui-input.mjs +2 -2
  73. package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
  74. package/fesm2015/ng-nest-ui-list.mjs +155 -15
  75. package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
  76. package/fesm2015/ng-nest-ui-loading.mjs +8 -3
  77. package/fesm2015/ng-nest-ui-loading.mjs.map +1 -1
  78. package/fesm2015/ng-nest-ui-popover.mjs +19 -2
  79. package/fesm2015/ng-nest-ui-popover.mjs.map +1 -1
  80. package/fesm2015/ng-nest-ui-select.mjs +14 -6
  81. package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
  82. package/fesm2015/ng-nest-ui-slider.mjs +43 -11
  83. package/fesm2015/ng-nest-ui-slider.mjs.map +1 -1
  84. package/fesm2015/ng-nest-ui-table.mjs +46 -11
  85. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  86. package/fesm2015/ng-nest-ui-tabs.mjs +14 -3
  87. package/fesm2015/ng-nest-ui-tabs.mjs.map +1 -1
  88. package/fesm2015/ng-nest-ui-textarea.mjs +2 -2
  89. package/fesm2015/ng-nest-ui-textarea.mjs.map +1 -1
  90. package/fesm2015/ng-nest-ui-timeline.mjs +5 -3
  91. package/fesm2015/ng-nest-ui-timeline.mjs.map +1 -1
  92. package/fesm2015/ng-nest-ui.mjs +1 -0
  93. package/fesm2015/ng-nest-ui.mjs.map +1 -1
  94. package/fesm2020/ng-nest-ui-badge.mjs +2 -2
  95. package/fesm2020/ng-nest-ui-badge.mjs.map +1 -1
  96. package/fesm2020/ng-nest-ui-calendar.mjs +17 -4
  97. package/fesm2020/ng-nest-ui-calendar.mjs.map +1 -1
  98. package/fesm2020/ng-nest-ui-collapse.mjs +8 -3
  99. package/fesm2020/ng-nest-ui-collapse.mjs.map +1 -1
  100. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  101. package/fesm2020/ng-nest-ui-date-picker.mjs +4 -0
  102. package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
  103. package/fesm2020/ng-nest-ui-dropdown.mjs +15 -3
  104. package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
  105. package/fesm2020/ng-nest-ui-i18n.mjs +18 -3
  106. package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
  107. package/fesm2020/ng-nest-ui-image.mjs +308 -0
  108. package/fesm2020/ng-nest-ui-image.mjs.map +1 -0
  109. package/fesm2020/ng-nest-ui-input.mjs +2 -2
  110. package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
  111. package/fesm2020/ng-nest-ui-list.mjs +154 -15
  112. package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
  113. package/fesm2020/ng-nest-ui-loading.mjs +8 -3
  114. package/fesm2020/ng-nest-ui-loading.mjs.map +1 -1
  115. package/fesm2020/ng-nest-ui-popover.mjs +19 -2
  116. package/fesm2020/ng-nest-ui-popover.mjs.map +1 -1
  117. package/fesm2020/ng-nest-ui-select.mjs +14 -6
  118. package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
  119. package/fesm2020/ng-nest-ui-slider.mjs +43 -11
  120. package/fesm2020/ng-nest-ui-slider.mjs.map +1 -1
  121. package/fesm2020/ng-nest-ui-table.mjs +46 -11
  122. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  123. package/fesm2020/ng-nest-ui-tabs.mjs +14 -3
  124. package/fesm2020/ng-nest-ui-tabs.mjs.map +1 -1
  125. package/fesm2020/ng-nest-ui-textarea.mjs +2 -2
  126. package/fesm2020/ng-nest-ui-textarea.mjs.map +1 -1
  127. package/fesm2020/ng-nest-ui-timeline.mjs +5 -3
  128. package/fesm2020/ng-nest-ui-timeline.mjs.map +1 -1
  129. package/fesm2020/ng-nest-ui.mjs +1 -0
  130. package/fesm2020/ng-nest-ui.mjs.map +1 -1
  131. package/i18n/i18n.property.d.ts +6 -0
  132. package/i18n/languages/en_US.d.ts +5 -0
  133. package/i18n/languages/zh_CN.d.ts +5 -0
  134. package/i18n/languages/zh_TW.d.ts +5 -0
  135. package/image/examples/en_US/default/README.md +4 -0
  136. package/image/examples/en_US/default/default/README.md +6 -0
  137. package/image/examples/en_US/default/fallback/README.md +6 -0
  138. package/image/examples/en_US/default/group/README.md +6 -0
  139. package/image/examples/en_US/default/placeholder/README.md +6 -0
  140. package/image/examples/zh_CN/default/README.md +4 -0
  141. package/image/examples/zh_CN/default/default/README.md +6 -0
  142. package/image/examples/zh_CN/default/fallback/README.md +6 -0
  143. package/image/examples/zh_CN/default/group/README.md +6 -0
  144. package/image/examples/zh_CN/default/placeholder/README.md +6 -0
  145. package/image/image-group.component.d.ts +8 -0
  146. package/image/image-preview.component.d.ts +39 -0
  147. package/image/image.component.d.ts +29 -0
  148. package/image/image.module.d.ts +16 -0
  149. package/image/image.property.d.ts +96 -0
  150. package/image/index.d.ts +5 -0
  151. package/image/public-api.d.ts +5 -0
  152. package/index.d.ts +1 -0
  153. package/list/examples/en_US/default/load-more/README.md +8 -0
  154. package/list/examples/en_US/default/scroll/README.md +8 -0
  155. package/list/examples/zh_CN/default/load-more/README.md +8 -0
  156. package/list/examples/zh_CN/default/scroll/README.md +8 -0
  157. package/list/list.component.d.ts +19 -1
  158. package/list/list.module.d.ts +2 -1
  159. package/list/list.property.d.ts +59 -2
  160. package/loading/loading.property.d.ts +7 -2
  161. package/package.json +9 -1
  162. package/popover/popover.directive.d.ts +4 -3
  163. package/popover/popover.property.d.ts +1 -1
  164. package/slider/examples/en_US/default/expand/README.md +7 -0
  165. package/slider/examples/zh_CN/default/expand/README.md +7 -0
  166. package/slider/slider.component.d.ts +2 -0
  167. package/slider/slider.module.d.ts +2 -1
  168. package/slider/slider.property.d.ts +11 -1
  169. package/table/examples/en_US/default/edit/README.md +7 -0
  170. package/table/examples/en_US/default/header/README.md +2 -2
  171. package/table/examples/en_US/default/search/README.md +6 -0
  172. package/table/examples/zh_CN/default/edit/README.md +7 -0
  173. package/table/examples/zh_CN/default/header/README.md +2 -2
  174. package/table/examples/zh_CN/default/search/README.md +6 -0
  175. package/table/table.component.d.ts +5 -0
  176. package/table/table.property.d.ts +13 -3
  177. package/tabs/examples/en_US/default/expand/README.md +6 -0
  178. package/tabs/examples/zh_CN/default/expand/README.md +6 -0
  179. package/tabs/tabs.property.d.ts +11 -1
@@ -71,7 +71,9 @@ class XTimelineComponent extends XTimelineProperty {
71
71
  this.nodes = [];
72
72
  this._unSubject = new Subject();
73
73
  }
74
- ngOnInit() { }
74
+ ngOnInit() {
75
+ this.setClassMap();
76
+ }
75
77
  ngOnChanges(changes) {
76
78
  const { data, mode } = changes;
77
79
  XIsChange(data) && this.setData();
@@ -114,10 +116,10 @@ class XTimelineComponent extends XTimelineProperty {
114
116
  }
115
117
  }
116
118
  /** @nocollapse */ XTimelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTimelineComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
117
- /** @nocollapse */ XTimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XTimelineComponent, selector: "x-timeline", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".x-timeline{margin:0;padding:0;display:block}.x-timeline>ul{padding-left:.625rem}.x-timeline>ul>li{padding-bottom:1rem;position:relative}.x-timeline>ul>li:last-child .x-timeline-tail{border-left-color:transparent}.x-timeline>ul>li:first-child .x-timeline-tail{top:1.25rem}.x-timeline-tail{position:absolute;height:100%;border-left:.125rem solid var(--x-border)}.x-timeline-tail-dashed{border-left-style:dashed}.x-timeline-icon{position:absolute;background-color:var(--x-border);border-radius:50%;display:flex;justify-content:center;align-items:center;color:var(--x-white);width:1.375rem;height:1.375rem;border:.0625rem solid var(--x-background-100)}.x-timeline-wrapper{position:relative}.x-timeline-label{display:flex;align-items:center;margin-bottom:.125rem}.x-timeline-label>x-link{margin-right:.325rem}.x-timeline-content{color:var(--x-text-300)}.x-timeline-time{font-size:.75rem;color:var(--x-text-400)}.x-timeline-loading .x-timeline-icon{color:var(--x-text-400);font-size:1.25rem;background-color:transparent!important}.x-timeline-left .x-timeline-icon{left:-.625rem}.x-timeline-left .x-timeline-wrapper{padding-left:1.625rem}.x-timeline-right .x-timeline-icon{right:-.625rem}.x-timeline-right .x-timeline-wrapper{padding-right:1.625rem;text-align:right}.x-timeline-right .x-timeline-tail{right:0}.x-timeline-right .x-timeline-label{justify-content:flex-end}.x-timeline-right .x-timeline-content{text-align:right}.x-timeline-alternate .x-timeline-icon{left:50%;margin-left:-.6875rem}.x-timeline-alternate .x-timeline-tail{left:50%;margin-left:-.0625rem}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-wrapper{width:50%;padding-right:1.625rem;text-align:right}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-label{justify-content:flex-end}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-content{text-align:right}.x-timeline-alternate>ul>li:nth-child(even) .x-timeline-wrapper{left:calc(50% - .6875rem);width:50%;padding-left:1.625rem}.x-timeline-primary{background-color:var(--x-primary)}.x-timeline-success{background-color:var(--x-success)}.x-timeline-warning{background-color:var(--x-warning)}.x-timeline-danger{background-color:var(--x-danger)}.x-timeline-info{background-color:var(--x-info)}.x-timeline-big{width:2.175rem;height:2.175rem;left:-1.025rem;font-size:1.55rem}.x-timeline-large{width:1.875rem;height:1.875rem;left:-.875rem;font-size:1.25rem}.x-timeline-medium{width:1.675rem;height:1.675rem;left:-.775rem;font-size:1.05rem}.x-timeline-small{width:1.5rem;height:1.5rem;left:-.6875rem;font-size:.875rem}.x-timeline-mini{width:1.375rem;height:1.375rem;left:-.625rem;font-size:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }, { kind: "component", type: i4.XLinkComponent, selector: "x-link" }, { kind: "directive", type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i6.XTimeAgoPipe, name: "xTimeAgo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
119
+ /** @nocollapse */ XTimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XTimelineComponent, selector: "x-timeline", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".x-timeline{margin:0;padding:0;display:block}.x-timeline>ul{padding-left:.625rem}.x-timeline>ul>li{padding-bottom:1rem;position:relative}.x-timeline>ul>li:last-child .x-timeline-tail{border-left-color:transparent}.x-timeline>ul>li:first-child .x-timeline-tail{top:1.25rem}.x-timeline-tail{position:absolute;height:100%;border-left:.125rem solid var(--x-border)}.x-timeline-tail-dashed{border-left-style:dashed}.x-timeline-icon{position:absolute;background-color:var(--x-border);border-radius:50%;display:flex;justify-content:center;align-items:center;color:var(--x-white);width:1.375rem;height:1.375rem;border:.0625rem solid var(--x-background-100)}.x-timeline-wrapper{position:relative}.x-timeline-label{display:flex;align-items:center;margin-bottom:.125rem}.x-timeline-label>x-link{margin-right:.325rem}.x-timeline-content{color:var(--x-text-300)}.x-timeline-time{font-size:.75rem;color:var(--x-text-400)}.x-timeline-loading .x-timeline-icon{color:var(--x-text-400);font-size:1.25rem;background-color:transparent!important}.x-timeline-left .x-timeline-icon{left:-.625rem}.x-timeline-left .x-timeline-wrapper{padding-left:1.625rem}.x-timeline-right .x-timeline-icon{right:-.625rem}.x-timeline-right .x-timeline-wrapper{padding-right:1.625rem;text-align:right}.x-timeline-right .x-timeline-tail{right:0}.x-timeline-right .x-timeline-label{justify-content:flex-end}.x-timeline-right .x-timeline-content{text-align:right}.x-timeline-alternate .x-timeline-icon{left:50%;margin-left:-.6875rem}.x-timeline-alternate .x-timeline-tail{left:50%;margin-left:-.0625rem}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-wrapper{width:50%;padding-right:1.625rem;text-align:right}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-label{justify-content:flex-end}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-content{text-align:right}.x-timeline-alternate>ul>li:nth-child(even) .x-timeline-wrapper{left:50%;width:50%;padding-left:1.625rem}.x-timeline-primary{background-color:var(--x-primary)}.x-timeline-success{background-color:var(--x-success)}.x-timeline-warning{background-color:var(--x-warning)}.x-timeline-danger{background-color:var(--x-danger)}.x-timeline-info{background-color:var(--x-info)}.x-timeline-big{width:2.175rem;height:2.175rem;left:-1.025rem;font-size:1.55rem}.x-timeline-large{width:1.875rem;height:1.875rem;left:-.875rem;font-size:1.25rem}.x-timeline-medium{width:1.675rem;height:1.675rem;left:-.775rem;font-size:1.05rem}.x-timeline-small{width:1.5rem;height:1.5rem;left:-.6875rem;font-size:.875rem}.x-timeline-mini{width:1.375rem;height:1.375rem;left:-.625rem;font-size:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }, { kind: "component", type: i4.XLinkComponent, selector: "x-link" }, { kind: "directive", type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i6.XTimeAgoPipe, name: "xTimeAgo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
118
120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XTimelineComponent, decorators: [{
119
121
  type: Component,
120
- args: [{ selector: `${XTimelinePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".x-timeline{margin:0;padding:0;display:block}.x-timeline>ul{padding-left:.625rem}.x-timeline>ul>li{padding-bottom:1rem;position:relative}.x-timeline>ul>li:last-child .x-timeline-tail{border-left-color:transparent}.x-timeline>ul>li:first-child .x-timeline-tail{top:1.25rem}.x-timeline-tail{position:absolute;height:100%;border-left:.125rem solid var(--x-border)}.x-timeline-tail-dashed{border-left-style:dashed}.x-timeline-icon{position:absolute;background-color:var(--x-border);border-radius:50%;display:flex;justify-content:center;align-items:center;color:var(--x-white);width:1.375rem;height:1.375rem;border:.0625rem solid var(--x-background-100)}.x-timeline-wrapper{position:relative}.x-timeline-label{display:flex;align-items:center;margin-bottom:.125rem}.x-timeline-label>x-link{margin-right:.325rem}.x-timeline-content{color:var(--x-text-300)}.x-timeline-time{font-size:.75rem;color:var(--x-text-400)}.x-timeline-loading .x-timeline-icon{color:var(--x-text-400);font-size:1.25rem;background-color:transparent!important}.x-timeline-left .x-timeline-icon{left:-.625rem}.x-timeline-left .x-timeline-wrapper{padding-left:1.625rem}.x-timeline-right .x-timeline-icon{right:-.625rem}.x-timeline-right .x-timeline-wrapper{padding-right:1.625rem;text-align:right}.x-timeline-right .x-timeline-tail{right:0}.x-timeline-right .x-timeline-label{justify-content:flex-end}.x-timeline-right .x-timeline-content{text-align:right}.x-timeline-alternate .x-timeline-icon{left:50%;margin-left:-.6875rem}.x-timeline-alternate .x-timeline-tail{left:50%;margin-left:-.0625rem}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-wrapper{width:50%;padding-right:1.625rem;text-align:right}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-label{justify-content:flex-end}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-content{text-align:right}.x-timeline-alternate>ul>li:nth-child(even) .x-timeline-wrapper{left:calc(50% - .6875rem);width:50%;padding-left:1.625rem}.x-timeline-primary{background-color:var(--x-primary)}.x-timeline-success{background-color:var(--x-success)}.x-timeline-warning{background-color:var(--x-warning)}.x-timeline-danger{background-color:var(--x-danger)}.x-timeline-info{background-color:var(--x-info)}.x-timeline-big{width:2.175rem;height:2.175rem;left:-1.025rem;font-size:1.55rem}.x-timeline-large{width:1.875rem;height:1.875rem;left:-.875rem;font-size:1.25rem}.x-timeline-medium{width:1.675rem;height:1.675rem;left:-.775rem;font-size:1.05rem}.x-timeline-small{width:1.5rem;height:1.5rem;left:-.6875rem;font-size:.875rem}.x-timeline-mini{width:1.375rem;height:1.375rem;left:-.625rem;font-size:.75rem}\n"] }]
122
+ args: [{ selector: `${XTimelinePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n", styles: [".x-timeline{margin:0;padding:0;display:block}.x-timeline>ul{padding-left:.625rem}.x-timeline>ul>li{padding-bottom:1rem;position:relative}.x-timeline>ul>li:last-child .x-timeline-tail{border-left-color:transparent}.x-timeline>ul>li:first-child .x-timeline-tail{top:1.25rem}.x-timeline-tail{position:absolute;height:100%;border-left:.125rem solid var(--x-border)}.x-timeline-tail-dashed{border-left-style:dashed}.x-timeline-icon{position:absolute;background-color:var(--x-border);border-radius:50%;display:flex;justify-content:center;align-items:center;color:var(--x-white);width:1.375rem;height:1.375rem;border:.0625rem solid var(--x-background-100)}.x-timeline-wrapper{position:relative}.x-timeline-label{display:flex;align-items:center;margin-bottom:.125rem}.x-timeline-label>x-link{margin-right:.325rem}.x-timeline-content{color:var(--x-text-300)}.x-timeline-time{font-size:.75rem;color:var(--x-text-400)}.x-timeline-loading .x-timeline-icon{color:var(--x-text-400);font-size:1.25rem;background-color:transparent!important}.x-timeline-left .x-timeline-icon{left:-.625rem}.x-timeline-left .x-timeline-wrapper{padding-left:1.625rem}.x-timeline-right .x-timeline-icon{right:-.625rem}.x-timeline-right .x-timeline-wrapper{padding-right:1.625rem;text-align:right}.x-timeline-right .x-timeline-tail{right:0}.x-timeline-right .x-timeline-label{justify-content:flex-end}.x-timeline-right .x-timeline-content{text-align:right}.x-timeline-alternate .x-timeline-icon{left:50%;margin-left:-.6875rem}.x-timeline-alternate .x-timeline-tail{left:50%;margin-left:-.0625rem}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-wrapper{width:50%;padding-right:1.625rem;text-align:right}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-label{justify-content:flex-end}.x-timeline-alternate>ul>li:nth-child(odd) .x-timeline-content{text-align:right}.x-timeline-alternate>ul>li:nth-child(even) .x-timeline-wrapper{left:50%;width:50%;padding-left:1.625rem}.x-timeline-primary{background-color:var(--x-primary)}.x-timeline-success{background-color:var(--x-success)}.x-timeline-warning{background-color:var(--x-warning)}.x-timeline-danger{background-color:var(--x-danger)}.x-timeline-info{background-color:var(--x-info)}.x-timeline-big{width:2.175rem;height:2.175rem;left:-1.025rem;font-size:1.55rem}.x-timeline-large{width:1.875rem;height:1.875rem;left:-.875rem;font-size:1.25rem}.x-timeline-medium{width:1.675rem;height:1.675rem;left:-.775rem;font-size:1.05rem}.x-timeline-small{width:1.5rem;height:1.5rem;left:-.6875rem;font-size:.875rem}.x-timeline-mini{width:1.375rem;height:1.375rem;left:-.625rem;font-size:.75rem}\n"] }]
121
123
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; } });
122
124
 
123
125
  class XTimelineModule {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-timeline.mjs","sources":["../../../../lib/ng-nest/ui/timeline/timeline.property.ts","../../../../lib/ng-nest/ui/timeline/timeline.component.ts","../../../../lib/ng-nest/ui/timeline/timeline.component.html","../../../../lib/ng-nest/ui/timeline/timeline.module.ts","../../../../lib/ng-nest/ui/timeline/ng-nest-ui-timeline.ts"],"sourcesContent":["import { XType, XSize, XData, XTemplate, XProperty, XIdentityProperty, XDataConvert, XWithConfig, XDate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Timeline\r\n * @selector x-timeline\r\n * @decorator component\r\n */\r\nexport const XTimelinePrefix = 'x-timeline';\r\nconst X_CONFIG_NAME = 'timeline';\r\n\r\n/**\r\n * Timeline Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTimelineProperty extends XProperty {\r\n /**\r\n * @zh_CN 数据\r\n * @en_US Date\r\n */\r\n @Input() @XDataConvert() data: XData<XTimelineNode> = [];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Type\r\n */\r\n @Input() type?: XType;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') size?: XSize;\r\n /**\r\n * @zh_CN 内容模板\r\n * @en_US Content template\r\n */\r\n @Input() wrapper?: XTemplate;\r\n /**\r\n * @zh_CN 时间轴的相对位置\r\n * @en_US Content and timeline relative position\r\n */\r\n @Input() @XWithConfig<XTimelineMode>(X_CONFIG_NAME, 'left') mode?: XTimelineMode;\r\n}\r\n\r\n/**\r\n * @zh_CN Timeline 数据对象\r\n * @en_US Timeline node data\r\n */\r\nexport interface XTimelineNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 时间\r\n * @en_US Time\r\n */\r\n time?: XDate;\r\n /**\r\n * @zh_CN 内容\r\n * @en_US Content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Type\r\n */\r\n type?: XType;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n color?: string;\r\n /**\r\n * @zh_CN 加载中\r\n * @en_US Loading\r\n */\r\n loading?: boolean;\r\n /**\r\n * @zh_CN 连接线显示虚线,针对下一个节点,下一个节点为 loading 状态也会显示虚线\r\n * @en_US The connecting line displays a dotted line. For the next node, the dotted line will also be displayed when the next node is in loading status\r\n */\r\n dashed?: boolean;\r\n /**\r\n * @zh_CN 其它自定义属性\r\n * @en_US Other property\r\n */\r\n [property: string]: any;\r\n}\r\n\r\n/**\r\n * @zh_CN 时间轴的相对位置\r\n * @en_US Content and timeline relative position\r\n */\r\nexport type XTimelineMode = 'left' | 'right' | 'alternate';\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 { XTimelinePrefix, XTimelineNode, XTimelineProperty } from './timeline.property';\r\nimport { XIsChange, XSetData, XConfigService, XClearClass } from '@ng-nest/ui/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XTimelinePrefix}`,\r\n templateUrl: './timeline.component.html',\r\n styleUrls: ['./timeline.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTimelineComponent extends XTimelineProperty implements OnInit, OnChanges {\r\n nodes: XTimelineNode[] = [];\r\n private _unSubject = new Subject<void>();\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\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data, mode } = changes;\r\n XIsChange(data) && this.setData();\r\n XIsChange(mode) && this.setClassMap();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap);\r\n this.classMap[`${XTimelinePrefix}-${this.mode}`] = this.mode ? true : false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n trackByNode(_index: number, item: XTimelineNode) {\r\n return item.id;\r\n }\r\n\r\n private setData() {\r\n XSetData<XTimelineNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.setDashed(x);\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n private setDashed(nodes: XTimelineNode[]) {\r\n const len = nodes.length;\r\n if (len <= 1) return;\r\n for (let i = 0; i < nodes.length; i++) {\r\n let node = nodes[i];\r\n if (!node.loading) continue;\r\n if (i === 0) {\r\n node.dashed = true;\r\n } else if (i > 0) {\r\n nodes[i - 1].dashed = true;\r\n }\r\n }\r\n }\r\n}\r\n","<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XTimelineComponent } from './timeline.component';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XTimeAgoModule } from '@ng-nest/ui/time-ago';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XTimelineProperty } from './timeline.property';\r\n\r\n@NgModule({\r\n declarations: [XTimelineComponent, XTimelineProperty],\r\n exports: [XTimelineComponent],\r\n imports: [CommonModule, XIconModule, XTimeAgoModule, XLinkModule, XOutletModule]\r\n})\r\nexport class XTimelineModule {}\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;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAEE;;;AAG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f,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6rCAAA,EAAA,MAAA,EAAA,CAAA,kkFAAA,CAAA,EAAA,CAAA;;;MENpC,eAAe,CAAA;;+HAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,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,EAJX,YAAA,EAAA,CAAA,kBAAkB,EAAE,iBAAiB,aAE1C,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,aADrE,kBAAkB,CAAA,EAAA,CAAA,CAAA;gIAGjB,eAAe,EAAA,OAAA,EAAA,CAFhB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEpE,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;oBAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,CAAC;iBACjF,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-timeline.mjs","sources":["../../../../lib/ng-nest/ui/timeline/timeline.property.ts","../../../../lib/ng-nest/ui/timeline/timeline.component.ts","../../../../lib/ng-nest/ui/timeline/timeline.component.html","../../../../lib/ng-nest/ui/timeline/timeline.module.ts","../../../../lib/ng-nest/ui/timeline/ng-nest-ui-timeline.ts"],"sourcesContent":["import { XType, XSize, XData, XTemplate, XProperty, XIdentityProperty, XDataConvert, XWithConfig, XDate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Timeline\r\n * @selector x-timeline\r\n * @decorator component\r\n */\r\nexport const XTimelinePrefix = 'x-timeline';\r\nconst X_CONFIG_NAME = 'timeline';\r\n\r\n/**\r\n * Timeline Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTimelineProperty extends XProperty {\r\n /**\r\n * @zh_CN 数据\r\n * @en_US Date\r\n */\r\n @Input() @XDataConvert() data: XData<XTimelineNode> = [];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Type\r\n */\r\n @Input() type?: XType;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') size?: XSize;\r\n /**\r\n * @zh_CN 内容模板\r\n * @en_US Content template\r\n */\r\n @Input() wrapper?: XTemplate;\r\n /**\r\n * @zh_CN 时间轴的相对位置\r\n * @en_US Content and timeline relative position\r\n */\r\n @Input() @XWithConfig<XTimelineMode>(X_CONFIG_NAME, 'left') mode?: XTimelineMode;\r\n}\r\n\r\n/**\r\n * @zh_CN Timeline 数据对象\r\n * @en_US Timeline node data\r\n */\r\nexport interface XTimelineNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 时间\r\n * @en_US Time\r\n */\r\n time?: XDate;\r\n /**\r\n * @zh_CN 内容\r\n * @en_US Content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Type\r\n */\r\n type?: XType;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n color?: string;\r\n /**\r\n * @zh_CN 加载中\r\n * @en_US Loading\r\n */\r\n loading?: boolean;\r\n /**\r\n * @zh_CN 连接线显示虚线,针对下一个节点,下一个节点为 loading 状态也会显示虚线\r\n * @en_US The connecting line displays a dotted line. For the next node, the dotted line will also be displayed when the next node is in loading status\r\n */\r\n dashed?: boolean;\r\n /**\r\n * @zh_CN 其它自定义属性\r\n * @en_US Other property\r\n */\r\n [property: string]: any;\r\n}\r\n\r\n/**\r\n * @zh_CN 时间轴的相对位置\r\n * @en_US Content and timeline relative position\r\n */\r\nexport type XTimelineMode = 'left' | 'right' | 'alternate';\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 { XTimelinePrefix, XTimelineNode, XTimelineProperty } from './timeline.property';\r\nimport { XIsChange, XSetData, XConfigService, XClearClass } from '@ng-nest/ui/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XTimelinePrefix}`,\r\n templateUrl: './timeline.component.html',\r\n styleUrls: ['./timeline.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTimelineComponent extends XTimelineProperty implements OnInit, OnChanges {\r\n nodes: XTimelineNode[] = [];\r\n private _unSubject = new Subject<void>();\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(changes: SimpleChanges): void {\r\n const { data, mode } = changes;\r\n XIsChange(data) && this.setData();\r\n XIsChange(mode) && this.setClassMap();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap);\r\n this.classMap[`${XTimelinePrefix}-${this.mode}`] = this.mode ? true : false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n trackByNode(_index: number, item: XTimelineNode) {\r\n return item.id;\r\n }\r\n\r\n private setData() {\r\n XSetData<XTimelineNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.setDashed(x);\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n private setDashed(nodes: XTimelineNode[]) {\r\n const len = nodes.length;\r\n if (len <= 1) return;\r\n for (let i = 0; i < nodes.length; i++) {\r\n let node = nodes[i];\r\n if (!node.loading) continue;\r\n if (i === 0) {\r\n node.dashed = true;\r\n } else if (i > 0) {\r\n nodes[i - 1].dashed = true;\r\n }\r\n }\r\n }\r\n}\r\n","<div #timeline class=\"x-timeline\" [ngClass]=\"classMap\">\r\n <ul>\r\n <li *ngFor=\"let node of nodes; trackBy: trackByNode\" [class.x-timeline-loading]=\"node.loading\">\r\n <div class=\"x-timeline-tail\" [class.x-timeline-tail-dashed]=\"node.dashed\"></div>\r\n <div\r\n class=\"x-timeline-icon {{ node.type ? 'x-timeline-' + node.type : '' }} {{ node.size ? 'x-timeline-' + node.size : '' }}\"\r\n [style.background-color]=\"node.color\"\r\n >\r\n <x-icon *ngIf=\"node.icon && !node.loading\" [type]=\"node.icon\"></x-icon>\r\n <x-icon *ngIf=\"node.loading\" type=\"fto-loader\" [spin]=\"true\"></x-icon>\r\n </div>\r\n <div class=\"x-timeline-wrapper\">\r\n <ng-container *xOutlet=\"wrapper; context: { $node: node }\">\r\n <div class=\"x-timeline-label\">\r\n <x-link *ngIf=\"node.label\">{{ node.label }}</x-link>\r\n <span class=\"x-timeline-time\" [title]=\"node.time | date: 'yyyy-MM-dd HH:mm:ss'\">{{ node.time | xTimeAgo }}</span>\r\n </div>\r\n <div class=\"x-timeline-content\">{{ node.content }}</div>\r\n </ng-container>\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XTimelineComponent } from './timeline.component';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XTimeAgoModule } from '@ng-nest/ui/time-ago';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XTimelineProperty } from './timeline.property';\r\n\r\n@NgModule({\r\n declarations: [XTimelineComponent, XTimelineProperty],\r\n exports: [XTimelineComponent],\r\n imports: [CommonModule, XIconModule, XTimeAgoModule, XLinkModule, XOutletModule]\r\n})\r\nexport class XTimelineModule {}\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;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;KAqB1D;;iIA1BY,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,mKADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAME,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;CAAiC,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUH,UAAA,CAAA;AAA5C,IAAA,WAAW,CAAQ,aAAa,EAAE,QAAQ,CAAC;CAAc,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUP,UAAA,C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,OAAA,EAAA,CAFhB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEpE,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;oBAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,CAAC;iBACjF,CAAA;;;ACbD;;AAEG;;;;"}
@@ -18,6 +18,7 @@ export * from '@ng-nest/ui/calendar';
18
18
  export * from '@ng-nest/ui/comment';
19
19
  export * from '@ng-nest/ui/description';
20
20
  export * from '@ng-nest/ui/empty';
21
+ export * from '@ng-nest/ui/image';
21
22
  export * from '@ng-nest/ui/outlet';
22
23
  export * from '@ng-nest/ui/pagination';
23
24
  export * from '@ng-nest/ui/progress';
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui.mjs","sources":["../../../../lib/ng-nest/ui/index.ts","../../../../lib/ng-nest/ui/ng-nest-ui.ts"],"sourcesContent":["/**\r\n * Core\r\n */\r\nexport * from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Basic\r\n */\r\nexport * from '@ng-nest/ui/border';\r\nexport * from '@ng-nest/ui/button';\r\nexport * from '@ng-nest/ui/color';\r\nexport * from '@ng-nest/ui/container';\r\nexport * from '@ng-nest/ui/layout';\r\nexport * from '@ng-nest/ui/icon';\r\nexport * from '@ng-nest/ui/i18n';\r\nexport * from '@ng-nest/ui/link';\r\nexport * from '@ng-nest/ui/theme';\r\nexport * from '@ng-nest/ui/typography';\r\n\r\n/**\r\n * Data\r\n */\r\nexport * from '@ng-nest/ui/avatar';\r\nexport * from '@ng-nest/ui/badge';\r\nexport * from '@ng-nest/ui/card';\r\nexport * from '@ng-nest/ui/carousel';\r\nexport * from '@ng-nest/ui/collapse';\r\nexport * from '@ng-nest/ui/calendar';\r\nexport * from '@ng-nest/ui/comment';\r\nexport * from '@ng-nest/ui/description';\r\nexport * from '@ng-nest/ui/empty';\r\nexport * from '@ng-nest/ui/outlet';\r\nexport * from '@ng-nest/ui/pagination';\r\nexport * from '@ng-nest/ui/progress';\r\nexport * from '@ng-nest/ui/ripple';\r\nexport * from '@ng-nest/ui/resizable';\r\nexport * from '@ng-nest/ui/statistic';\r\nexport * from '@ng-nest/ui/table';\r\nexport * from '@ng-nest/ui/tag';\r\nexport * from '@ng-nest/ui/text-retract';\r\nexport * from '@ng-nest/ui/time-ago';\r\nexport * from '@ng-nest/ui/time-range';\r\nexport * from '@ng-nest/ui/timeline';\r\nexport * from '@ng-nest/ui/tree';\r\nexport * from '@ng-nest/ui/tree-file';\r\n\r\n/**\r\n * Feedback\r\n */\r\nexport * from '@ng-nest/ui/alert';\r\nexport * from '@ng-nest/ui/dialog';\r\nexport * from '@ng-nest/ui/drawer';\r\nexport * from '@ng-nest/ui/loading';\r\nexport * from '@ng-nest/ui/message';\r\nexport * from '@ng-nest/ui/message-box';\r\nexport * from '@ng-nest/ui/notification';\r\nexport * from '@ng-nest/ui/popconfirm';\r\nexport * from '@ng-nest/ui/popover';\r\nexport * from '@ng-nest/ui/result';\r\nexport * from '@ng-nest/ui/skeleton';\r\nexport * from '@ng-nest/ui/tooltip';\r\n\r\n/**\r\n * Form\r\n */\r\nexport * from '@ng-nest/ui/auto-complete';\r\nexport * from '@ng-nest/ui/base-form';\r\nexport * from '@ng-nest/ui/cascade';\r\nexport * from '@ng-nest/ui/checkbox';\r\nexport * from '@ng-nest/ui/color-picker';\r\nexport * from '@ng-nest/ui/date-picker';\r\nexport * from '@ng-nest/ui/form';\r\nexport * from '@ng-nest/ui/find';\r\nexport * from '@ng-nest/ui/input';\r\nexport * from '@ng-nest/ui/input-number';\r\nexport * from '@ng-nest/ui/list';\r\nexport * from '@ng-nest/ui/radio';\r\nexport * from '@ng-nest/ui/rate';\r\nexport * from '@ng-nest/ui/select';\r\nexport * from '@ng-nest/ui/slider-select';\r\nexport * from '@ng-nest/ui/switch';\r\nexport * from '@ng-nest/ui/time-picker';\r\nexport * from '@ng-nest/ui/transfer';\r\nexport * from '@ng-nest/ui/textarea';\r\nexport * from '@ng-nest/ui/upload';\r\n\r\n/**\r\n * Navigation\r\n */\r\nexport * from '@ng-nest/ui/affix';\r\nexport * from '@ng-nest/ui/anchor';\r\nexport * from '@ng-nest/ui/back-top';\r\nexport * from '@ng-nest/ui/crumb';\r\nexport * from '@ng-nest/ui/dropdown';\r\nexport * from '@ng-nest/ui/menu';\r\nexport * from '@ng-nest/ui/page-header';\r\nexport * from '@ng-nest/ui/steps';\r\nexport * from '@ng-nest/ui/tabs';\r\n\r\n/**\r\n * Others\r\n */\r\nexport * from '@ng-nest/ui/doc';\r\nexport * from '@ng-nest/ui/examples';\r\nexport * from '@ng-nest/ui/api';\r\nexport * from '@ng-nest/ui/pattern';\r\nexport * from '@ng-nest/ui/slider';\r\nexport * from '@ng-nest/ui/highlight';\r\nexport * from '@ng-nest/ui/inner';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
1
+ {"version":3,"file":"ng-nest-ui.mjs","sources":["../../../../lib/ng-nest/ui/index.ts","../../../../lib/ng-nest/ui/ng-nest-ui.ts"],"sourcesContent":["/**\r\n * Core\r\n */\r\nexport * from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Basic\r\n */\r\nexport * from '@ng-nest/ui/border';\r\nexport * from '@ng-nest/ui/button';\r\nexport * from '@ng-nest/ui/color';\r\nexport * from '@ng-nest/ui/container';\r\nexport * from '@ng-nest/ui/layout';\r\nexport * from '@ng-nest/ui/icon';\r\nexport * from '@ng-nest/ui/i18n';\r\nexport * from '@ng-nest/ui/link';\r\nexport * from '@ng-nest/ui/theme';\r\nexport * from '@ng-nest/ui/typography';\r\n\r\n/**\r\n * Data\r\n */\r\nexport * from '@ng-nest/ui/avatar';\r\nexport * from '@ng-nest/ui/badge';\r\nexport * from '@ng-nest/ui/card';\r\nexport * from '@ng-nest/ui/carousel';\r\nexport * from '@ng-nest/ui/collapse';\r\nexport * from '@ng-nest/ui/calendar';\r\nexport * from '@ng-nest/ui/comment';\r\nexport * from '@ng-nest/ui/description';\r\nexport * from '@ng-nest/ui/empty';\r\nexport * from '@ng-nest/ui/image';\r\nexport * from '@ng-nest/ui/outlet';\r\nexport * from '@ng-nest/ui/pagination';\r\nexport * from '@ng-nest/ui/progress';\r\nexport * from '@ng-nest/ui/ripple';\r\nexport * from '@ng-nest/ui/resizable';\r\nexport * from '@ng-nest/ui/statistic';\r\nexport * from '@ng-nest/ui/table';\r\nexport * from '@ng-nest/ui/tag';\r\nexport * from '@ng-nest/ui/text-retract';\r\nexport * from '@ng-nest/ui/time-ago';\r\nexport * from '@ng-nest/ui/time-range';\r\nexport * from '@ng-nest/ui/timeline';\r\nexport * from '@ng-nest/ui/tree';\r\nexport * from '@ng-nest/ui/tree-file';\r\n\r\n/**\r\n * Feedback\r\n */\r\nexport * from '@ng-nest/ui/alert';\r\nexport * from '@ng-nest/ui/dialog';\r\nexport * from '@ng-nest/ui/drawer';\r\nexport * from '@ng-nest/ui/loading';\r\nexport * from '@ng-nest/ui/message';\r\nexport * from '@ng-nest/ui/message-box';\r\nexport * from '@ng-nest/ui/notification';\r\nexport * from '@ng-nest/ui/popconfirm';\r\nexport * from '@ng-nest/ui/popover';\r\nexport * from '@ng-nest/ui/result';\r\nexport * from '@ng-nest/ui/skeleton';\r\nexport * from '@ng-nest/ui/tooltip';\r\n\r\n/**\r\n * Form\r\n */\r\nexport * from '@ng-nest/ui/auto-complete';\r\nexport * from '@ng-nest/ui/base-form';\r\nexport * from '@ng-nest/ui/cascade';\r\nexport * from '@ng-nest/ui/checkbox';\r\nexport * from '@ng-nest/ui/color-picker';\r\nexport * from '@ng-nest/ui/date-picker';\r\nexport * from '@ng-nest/ui/form';\r\nexport * from '@ng-nest/ui/find';\r\nexport * from '@ng-nest/ui/input';\r\nexport * from '@ng-nest/ui/input-number';\r\nexport * from '@ng-nest/ui/list';\r\nexport * from '@ng-nest/ui/radio';\r\nexport * from '@ng-nest/ui/rate';\r\nexport * from '@ng-nest/ui/select';\r\nexport * from '@ng-nest/ui/slider-select';\r\nexport * from '@ng-nest/ui/switch';\r\nexport * from '@ng-nest/ui/time-picker';\r\nexport * from '@ng-nest/ui/transfer';\r\nexport * from '@ng-nest/ui/textarea';\r\nexport * from '@ng-nest/ui/upload';\r\n\r\n/**\r\n * Navigation\r\n */\r\nexport * from '@ng-nest/ui/affix';\r\nexport * from '@ng-nest/ui/anchor';\r\nexport * from '@ng-nest/ui/back-top';\r\nexport * from '@ng-nest/ui/crumb';\r\nexport * from '@ng-nest/ui/dropdown';\r\nexport * from '@ng-nest/ui/menu';\r\nexport * from '@ng-nest/ui/page-header';\r\nexport * from '@ng-nest/ui/steps';\r\nexport * from '@ng-nest/ui/tabs';\r\n\r\n/**\r\n * Others\r\n */\r\nexport * from '@ng-nest/ui/doc';\r\nexport * from '@ng-nest/ui/examples';\r\nexport * from '@ng-nest/ui/api';\r\nexport * from '@ng-nest/ui/pattern';\r\nexport * from '@ng-nest/ui/slider';\r\nexport * from '@ng-nest/ui/highlight';\r\nexport * from '@ng-nest/ui/inner';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
@@ -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:.3125rem;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 });
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:.3125rem;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"] }]
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;QACM,IAAK,CAAA,KAAA,GAAY,EAAE,CAA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/C,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
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;QACM,IAAK,CAAA,KAAA,GAAY,EAAE,CAAC;AAC7B;;;AAGG;QACM,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAC;AAM3C,KAAA;;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;AAAmB,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKpD,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;AAAe,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA,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AA;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;AACxB,iBAAA,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') {
@@ -173,10 +186,10 @@ class XCalendarComponent extends XCalendarProperty {
173
186
  }
174
187
  }
175
188
  /** @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 });
176
- /** @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 });
189
+ /** @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 });
177
190
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XCalendarComponent, decorators: [{
178
191
  type: Component,
179
- 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"] }]
192
+ 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"] }]
180
193
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.DatePipe }, { type: i1.LowerCasePipe }, { type: i2.XConfigService }, { type: i3.XI18nService }]; } });
181
194
 
182
195
  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":";;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAE5C;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,SAAS,CAAA;AADhD,IAAA,WAAA,GAAA;;AAOE;;;AAGG;QACM,IAAK,CAAA,KAAA,GAAmB,OAAO,CAAC;AACzC;;;AAGG;AACO,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAQ,CAAC;AAChD;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;AACpD,KAAA;;iIArBY,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,wLADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FACZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;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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;QACM,IAAK,CAAA,KAAA,GAAmB,OAAO,CAAC;AACzC;;;AAGG;QACM,IAAW,CAAA,WAAA,GAAkB,UAAU,CAAC;AAMjD;;;AAGG;AACO,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAQ,CAAC;AAChD;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;AACpD,KAAA;;iIA/BY,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,sPADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FACZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;8BAMhB,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBAKG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBAKG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAKG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAKI,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBA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,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;AAC/H,iBAAA,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 () { return [{ type: XCollapseComponent, decorators: [{
180
185
  type: Optional
181
186
  }, {