@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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AiB,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;AACjF,iBAAA,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;QACsB,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;AAqB1D,KAAA;;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;AAAiC,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUH,UAAA,CAAA;AAA5C,IAAA,WAAW,CAAQ,aAAa,EAAE,QAAQ,CAAC;AAAc,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUP,UAAA,C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E,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;AACjF,iBAAA,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"}
@@ -13,6 +13,7 @@ export interface XI18nProperty {
13
13
  calendar?: XI18nCalendar;
14
14
  datePicker?: XI18nDatePicker;
15
15
  empty?: XI18nEmpty;
16
+ image?: XI18nImage;
16
17
  pagination?: XI18nPagination;
17
18
  textRetract?: XI18nTextRetract;
18
19
  timeAgo?: XI18nTimeAgo;
@@ -87,6 +88,9 @@ export interface XI18nDatePicker {
87
88
  export interface XI18nEmpty {
88
89
  noData?: string;
89
90
  }
91
+ export interface XI18nImage {
92
+ previewText?: string;
93
+ }
90
94
  export interface XI18nPagination {
91
95
  previous?: string;
92
96
  next?: string;
@@ -127,6 +131,8 @@ export interface XI18nSelect {
127
131
  }
128
132
  export interface XI18nList {
129
133
  selectAllText?: string;
134
+ loadMoreText?: string;
135
+ loadingMoreText?: string;
130
136
  }
131
137
  export interface XI18nForm {
132
138
  required?: string;
@@ -71,6 +71,9 @@ declare const _default: {
71
71
  empty: {
72
72
  noData: string;
73
73
  };
74
+ image: {
75
+ previewText: string;
76
+ };
74
77
  pagination: {
75
78
  previous: string;
76
79
  next: string;
@@ -111,6 +114,8 @@ declare const _default: {
111
114
  };
112
115
  list: {
113
116
  selectAllText: string;
117
+ loadMoreText: string;
118
+ loadingMoreText: string;
114
119
  };
115
120
  select: {
116
121
  selectAllText: string;
@@ -70,6 +70,9 @@ declare const _default: {
70
70
  empty: {
71
71
  noData: string;
72
72
  };
73
+ image: {
74
+ previewText: string;
75
+ };
73
76
  pagination: {
74
77
  previous: string;
75
78
  next: string;
@@ -110,6 +113,8 @@ declare const _default: {
110
113
  };
111
114
  list: {
112
115
  selectAllText: string;
116
+ loadMoreText: string;
117
+ loadingMoreText: string;
113
118
  };
114
119
  select: {
115
120
  selectAllText: string;
@@ -70,6 +70,9 @@ declare const _default: {
70
70
  empty: {
71
71
  noData: string;
72
72
  };
73
+ image: {
74
+ previewText: string;
75
+ };
73
76
  pagination: {
74
77
  previous: string;
75
78
  next: string;
@@ -110,6 +113,8 @@ declare const _default: {
110
113
  };
111
114
  list: {
112
115
  selectAllText: string;
116
+ loadMoreText: string;
117
+ loadingMoreText: string;
113
118
  };
114
119
  select: {
115
120
  selectAllText: string;
@@ -0,0 +1,4 @@
1
+ ---
2
+ order: 1
3
+ label: 'Base'
4
+ ---
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 1
3
+ label: 'Base'
4
+ ---
5
+
6
+ Use the `src` to set the picture address.
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 2
3
+ label: 'Fallback'
4
+ ---
5
+
6
+ Use the `fallback` to set the picture displayed after loading.
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 3
3
+ label: 'Multiple'
4
+ ---
5
+
6
+ Use the `x-image-group` structure to achieve multiple pictures previews.
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 4
3
+ label: 'Placeholder'
4
+ ---
5
+
6
+ Use the `placeholder` to display the picture before loading.
@@ -0,0 +1,4 @@
1
+ ---
2
+ order: 1
3
+ label: '基础用法'
4
+ ---
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 1
3
+ label: '基本'
4
+ ---
5
+
6
+ 使用 `src` 来设置图片地址。
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 2
3
+ label: '容错处理'
4
+ ---
5
+
6
+ 使用 `fallback` 来设置加载失败后显示的图片。
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 3
3
+ label: '多张图片'
4
+ ---
5
+
6
+ 使用 `x-image-group` 来实现多张图片预览。
@@ -0,0 +1,6 @@
1
+ ---
2
+ order: 4
3
+ label: '渐进加载'
4
+ ---
5
+
6
+ 使用 `placeholder` 来显示加载完成前的图片。
@@ -0,0 +1,8 @@
1
+ import { XImageComponent } from './image.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class XImageGroupComponent {
4
+ images: XImageComponent[];
5
+ addImage(image: XImageComponent): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImageGroupComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<XImageGroupComponent, "x-image-group", never, {}, {}, never, ["*"], false>;
8
+ }
@@ -0,0 +1,39 @@
1
+ import { Renderer2, ElementRef, ChangeDetectorRef, OnChanges } from '@angular/core';
2
+ import { XImageNode, XImagePreviewProperty } from './image.property';
3
+ import { XConfigService } from '@ng-nest/ui/core';
4
+ import * as i0 from "@angular/core";
5
+ export declare class XImagePreviewComponent extends XImagePreviewProperty implements OnChanges {
6
+ renderer: Renderer2;
7
+ elementRef: ElementRef;
8
+ cdr: ChangeDetectorRef;
9
+ configService: XConfigService;
10
+ data: XImageNode[];
11
+ imgScale3d: {
12
+ x: number;
13
+ y: number;
14
+ z: number;
15
+ };
16
+ rotate: number;
17
+ position: {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ activated?: XImageNode;
22
+ total: number;
23
+ current: number;
24
+ get getWrapperTransform(): string;
25
+ get getImgTransform(): string;
26
+ imageRef: ElementRef<HTMLImageElement>;
27
+ constructor(renderer: Renderer2, elementRef: ElementRef, cdr: ChangeDetectorRef, configService: XConfigService, data: XImageNode[]);
28
+ ngOnInit(): void;
29
+ ngOnChanges(): void;
30
+ initialization(): void;
31
+ setActivated(): void;
32
+ onCurrentChange(num: number): void;
33
+ onRotate(deg: number): void;
34
+ onScale(zoom: number): void;
35
+ onDragReleased(): void;
36
+ fitPoint(start: number, size: number, clientSize: number): number | null;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImagePreviewComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<XImagePreviewComponent, "x-image-preview", never, {}, {}, never, never, false>;
39
+ }
@@ -0,0 +1,29 @@
1
+ import { Renderer2, ElementRef, ChangeDetectorRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { XImageProperty } from './image.property';
3
+ import { XConfigService } from '@ng-nest/ui/core';
4
+ import { XDialogService } from '@ng-nest/ui/dialog';
5
+ import { XI18nImage, XI18nService } from '@ng-nest/ui/i18n';
6
+ import { XImageGroupComponent } from './image-group.component';
7
+ import * as i0 from "@angular/core";
8
+ export declare class XImageComponent extends XImageProperty implements OnInit, OnChanges {
9
+ renderer: Renderer2;
10
+ elementRef: ElementRef;
11
+ cdr: ChangeDetectorRef;
12
+ configService: XConfigService;
13
+ dialog: XDialogService;
14
+ i18n: XI18nService;
15
+ group: XImageGroupComponent;
16
+ locale: XI18nImage;
17
+ isError: boolean;
18
+ isLoaded: boolean;
19
+ private _unSubject;
20
+ get getPreviewText(): string | undefined;
21
+ constructor(renderer: Renderer2, elementRef: ElementRef, cdr: ChangeDetectorRef, configService: XConfigService, dialog: XDialogService, i18n: XI18nService, group: XImageGroupComponent);
22
+ ngOnInit(): void;
23
+ ngOnChanges(changes: SimpleChanges): void;
24
+ onPreview(): void;
25
+ onError(): void;
26
+ onLoad(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImageComponent, [null, null, null, null, null, null, { optional: true; }]>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<XImageComponent, "x-image", never, {}, {}, never, never, false>;
29
+ }
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./image.component";
3
+ import * as i2 from "./image.property";
4
+ import * as i3 from "./image-preview.component";
5
+ import * as i4 from "./image-group.component";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "@ng-nest/ui/icon";
8
+ import * as i7 from "@ng-nest/ui/dialog";
9
+ import * as i8 from "@ng-nest/ui/button";
10
+ import * as i9 from "@ng-nest/ui/i18n";
11
+ import * as i10 from "@angular/cdk/drag-drop";
12
+ export declare class XImageModule {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImageModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<XImageModule, [typeof i1.XImageComponent, typeof i2.XImageProperty, typeof i3.XImagePreviewComponent, typeof i2.XImagePreviewProperty, typeof i4.XImageGroupComponent], [typeof i5.CommonModule, typeof i6.XIconModule, typeof i7.XDialogModule, typeof i8.XButtonModule, typeof i9.XI18nModule, typeof i10.DragDropModule], [typeof i1.XImageComponent, typeof i3.XImagePreviewComponent, typeof i4.XImageGroupComponent]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<XImageModule>;
16
+ }
@@ -0,0 +1,96 @@
1
+ import { XProperty } from '@ng-nest/ui/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Image
5
+ * @selector x-image
6
+ * @decorator component
7
+ */
8
+ export declare const XImagePrefix = "x-image";
9
+ /**
10
+ * Image Property
11
+ */
12
+ export declare class XImageProperty extends XProperty {
13
+ /**
14
+ * @zh_CN 图片显示地址
15
+ * @en_US Picture display address
16
+ */
17
+ src: string;
18
+ /**
19
+ * @zh_CN 图片宽度
20
+ * @en_US Picture width
21
+ */
22
+ width: string;
23
+ /**
24
+ * @zh_CN 图片高度
25
+ * @en_US Picture height
26
+ */
27
+ height: string;
28
+ /**
29
+ * @zh_CN 图像描述
30
+ * @en_US Image description
31
+ */
32
+ alt: string;
33
+ /**
34
+ * @zh_CN 加载失败显示的地址
35
+ * @en_US Load fault tolerance address
36
+ */
37
+ fallback: string;
38
+ /**
39
+ * @zh_CN 预览文字
40
+ * @en_US Preview text
41
+ * @default '预览'
42
+ */
43
+ previewText?: string;
44
+ /**
45
+ * @zh_CN 渐进加载显示的图片
46
+ * @en_US Gradually loaded the display of the display
47
+ */
48
+ placeholder?: string;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImageProperty, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<XImageProperty, "ng-component", never, { "src": "src"; "width": "width"; "height": "height"; "alt": "alt"; "fallback": "fallback"; "previewText": "previewText"; "placeholder": "placeholder"; }, {}, never, never, false>;
51
+ }
52
+ /**
53
+ * @zh_CN 图片节点数据
54
+ * @en_US Image node data
55
+ */
56
+ export interface XImageNode {
57
+ /**
58
+ * @zh_CN 图片显示地址
59
+ * @en_US Picture display address
60
+ */
61
+ src?: string;
62
+ /**
63
+ * @zh_CN 图像描述
64
+ * @en_US Image description
65
+ */
66
+ alt?: string;
67
+ /**
68
+ * @zh_CN 加载失败显示的地址
69
+ * @en_US Load fault tolerance address
70
+ */
71
+ fallback?: string;
72
+ /**
73
+ * @zh_CN 当前激活的图片
74
+ * @en_US Current activated pictures
75
+ */
76
+ activated?: boolean;
77
+ }
78
+ /**
79
+ * Image Preview
80
+ * @selector x-image-preview
81
+ * @decorator component
82
+ */
83
+ export declare const XImagePreviewPrefix = "x-image-preview";
84
+ /**
85
+ * Image Preview Property
86
+ */
87
+ export declare class XImagePreviewProperty extends XProperty {
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<XImagePreviewProperty, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<XImagePreviewProperty, "ng-component", never, {}, {}, never, never, false>;
90
+ }
91
+ /**
92
+ * Image Group
93
+ * @selector x-image-group
94
+ * @decorator component
95
+ */
96
+ export declare const XImageGroupPrefix = "x-image-group";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ng-nest/ui/image" />
5
+ export * from './public-api';
@@ -0,0 +1,5 @@
1
+ export * from './image.component';
2
+ export * from './image-preview.component';
3
+ export * from './image-group.component';
4
+ export * from './image.module';
5
+ export * from './image.property';
package/index.d.ts CHANGED
@@ -27,6 +27,7 @@ export * from '@ng-nest/ui/calendar';
27
27
  export * from '@ng-nest/ui/comment';
28
28
  export * from '@ng-nest/ui/description';
29
29
  export * from '@ng-nest/ui/empty';
30
+ export * from '@ng-nest/ui/image';
30
31
  export * from '@ng-nest/ui/outlet';
31
32
  export * from '@ng-nest/ui/pagination';
32
33
  export * from '@ng-nest/ui/progress';
@@ -0,0 +1,8 @@
1
+ ---
2
+ order: 3
3
+ label: 'Load more'
4
+ ---
5
+
6
+ - Use the `loadMore` property to enable and load more. The `data` is set to a function with a return value to `Observable`.
7
+ - Use `loadMoreText` to set more text.
8
+ - Use the `loadingMoreText` to set the text that is loading.
@@ -0,0 +1,8 @@
1
+ ---
2
+ order: 4
3
+ label: 'Virtual Scroll'
4
+ ---
5
+
6
+ - Use the `virtualScroll` to enable the function of virtual rolling. The function of dragging nodes up and down will fail.
7
+ - Use the `scrollHeight` to set the height of the virtual rolling area.
8
+ - Use the `heightAdaption` to from the high change of the specified object from the specified object.
@@ -0,0 +1,8 @@
1
+ ---
2
+ order: 3
3
+ label: '加载更多'
4
+ ---
5
+
6
+ 使用 `loadMore` 属性来启用加载更多,`data` 设置成一个返回值为 `Observable` 的函数。
7
+ 使用 `loadMoreText` 可以设置 `加载更多` 的文字。
8
+ 使用 `loadingMoreText` 可以设置 `正在加载的` 的文字。
@@ -0,0 +1,8 @@
1
+ ---
2
+ order: 4
3
+ label: '虚拟滚动'
4
+ ---
5
+
6
+ - 使用 `virtualScroll` 这个来启用虚拟滚动的功能,上下拖动节点的功能将失效。
7
+ - 使用 `scrollHeight` 这个来设置虚拟滚动区域的高度。
8
+ - 使用 `heightAdaption` 这个来自适应滚动区域,跟随指定对象的高度变化。