@ng-nest/ui 15.0.0 → 15.0.2

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 (212) hide show
  1. package/checkbox/checkbox.component.d.ts +2 -0
  2. package/checkbox/checkbox.property.d.ts +21 -1
  3. package/esm2020/anchor/anchor.component.mjs +1 -2
  4. package/esm2020/checkbox/checkbox.component.mjs +10 -4
  5. package/esm2020/checkbox/checkbox.property.mjs +6 -2
  6. package/esm2020/icon/icon.module.mjs +4 -5
  7. package/esm2020/icon/icon.service.mjs +10 -4
  8. package/esm2020/input/input.property.mjs +6 -2
  9. package/esm2020/radio/radio.component.mjs +11 -4
  10. package/esm2020/radio/radio.module.mjs +5 -4
  11. package/esm2020/radio/radio.property.mjs +6 -2
  12. package/esm2020/tree-file/tree-file.component.mjs +9 -4
  13. package/esm2020/tree-file/tree-file.module.mjs +4 -5
  14. package/esm2020/upload/upload.component.mjs +9 -4
  15. package/fesm2015/ng-nest-ui-affix.mjs +1 -0
  16. package/fesm2015/ng-nest-ui-alert.mjs +1 -0
  17. package/fesm2015/ng-nest-ui-anchor.mjs +0 -1
  18. package/fesm2015/ng-nest-ui-anchor.mjs.map +1 -1
  19. package/fesm2015/ng-nest-ui-api.mjs +1 -0
  20. package/fesm2015/ng-nest-ui-auto-complete.mjs +1 -0
  21. package/fesm2015/ng-nest-ui-avatar.mjs +1 -0
  22. package/fesm2015/ng-nest-ui-back-top.mjs +1 -0
  23. package/fesm2015/ng-nest-ui-badge.mjs +1 -0
  24. package/fesm2015/ng-nest-ui-base-form.mjs +1 -0
  25. package/fesm2015/ng-nest-ui-border.mjs +1 -0
  26. package/fesm2015/ng-nest-ui-button.mjs +1 -0
  27. package/fesm2015/ng-nest-ui-calendar.mjs +1 -0
  28. package/fesm2015/ng-nest-ui-card.mjs +1 -0
  29. package/fesm2015/ng-nest-ui-carousel.mjs +1 -0
  30. package/fesm2015/ng-nest-ui-cascade.mjs +1 -0
  31. package/fesm2015/ng-nest-ui-checkbox.mjs +14 -4
  32. package/fesm2015/ng-nest-ui-checkbox.mjs.map +1 -1
  33. package/fesm2015/ng-nest-ui-collapse.mjs +1 -0
  34. package/fesm2015/ng-nest-ui-color-picker.mjs +1 -0
  35. package/fesm2015/ng-nest-ui-color.mjs +1 -0
  36. package/fesm2015/ng-nest-ui-comment.mjs +1 -0
  37. package/fesm2015/ng-nest-ui-container.mjs +1 -0
  38. package/fesm2015/ng-nest-ui-core.mjs +1 -0
  39. package/fesm2015/ng-nest-ui-crumb.mjs +1 -0
  40. package/fesm2015/ng-nest-ui-date-picker.mjs +1 -0
  41. package/fesm2015/ng-nest-ui-description.mjs +1 -0
  42. package/fesm2015/ng-nest-ui-dialog.mjs +1 -0
  43. package/fesm2015/ng-nest-ui-doc.mjs +1 -0
  44. package/fesm2015/ng-nest-ui-drawer.mjs +1 -0
  45. package/fesm2015/ng-nest-ui-dropdown.mjs +1 -0
  46. package/fesm2015/ng-nest-ui-empty.mjs +1 -0
  47. package/fesm2015/ng-nest-ui-examples.mjs +1 -0
  48. package/fesm2015/ng-nest-ui-find.mjs +1 -0
  49. package/fesm2015/ng-nest-ui-form.mjs +1 -0
  50. package/fesm2015/ng-nest-ui-highlight.mjs +1 -0
  51. package/fesm2015/ng-nest-ui-i18n.mjs +1 -0
  52. package/fesm2015/ng-nest-ui-icon.mjs +13 -7
  53. package/fesm2015/ng-nest-ui-icon.mjs.map +1 -1
  54. package/fesm2015/ng-nest-ui-image.mjs +1 -0
  55. package/fesm2015/ng-nest-ui-inner.mjs +1 -0
  56. package/fesm2015/ng-nest-ui-input-number.mjs +1 -0
  57. package/fesm2015/ng-nest-ui-input.mjs +5 -1
  58. package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
  59. package/fesm2015/ng-nest-ui-keyword.mjs +1 -0
  60. package/fesm2015/ng-nest-ui-layout.mjs +1 -0
  61. package/fesm2015/ng-nest-ui-link.mjs +1 -0
  62. package/fesm2015/ng-nest-ui-list.mjs +1 -0
  63. package/fesm2015/ng-nest-ui-loading.mjs +1 -0
  64. package/fesm2015/ng-nest-ui-menu.mjs +1 -0
  65. package/fesm2015/ng-nest-ui-message-box.mjs +1 -0
  66. package/fesm2015/ng-nest-ui-message.mjs +1 -0
  67. package/fesm2015/ng-nest-ui-notification.mjs +1 -0
  68. package/fesm2015/ng-nest-ui-outlet.mjs +1 -0
  69. package/fesm2015/ng-nest-ui-page-header.mjs +1 -0
  70. package/fesm2015/ng-nest-ui-pagination.mjs +1 -0
  71. package/fesm2015/ng-nest-ui-pattern.mjs +1 -0
  72. package/fesm2015/ng-nest-ui-popconfirm.mjs +1 -0
  73. package/fesm2015/ng-nest-ui-popover.mjs +1 -0
  74. package/fesm2015/ng-nest-ui-portal.mjs +1 -0
  75. package/fesm2015/ng-nest-ui-progress.mjs +1 -0
  76. package/fesm2015/ng-nest-ui-radio.mjs +19 -7
  77. package/fesm2015/ng-nest-ui-radio.mjs.map +1 -1
  78. package/fesm2015/ng-nest-ui-rate.mjs +1 -0
  79. package/fesm2015/ng-nest-ui-resizable.mjs +1 -0
  80. package/fesm2015/ng-nest-ui-result.mjs +1 -0
  81. package/fesm2015/ng-nest-ui-ripple.mjs +1 -0
  82. package/fesm2015/ng-nest-ui-select.mjs +1 -0
  83. package/fesm2015/ng-nest-ui-skeleton.mjs +1 -0
  84. package/fesm2015/ng-nest-ui-slider-select.mjs +1 -0
  85. package/fesm2015/ng-nest-ui-slider.mjs +1 -0
  86. package/fesm2015/ng-nest-ui-statistic.mjs +1 -0
  87. package/fesm2015/ng-nest-ui-steps.mjs +1 -0
  88. package/fesm2015/ng-nest-ui-switch.mjs +1 -0
  89. package/fesm2015/ng-nest-ui-table.mjs +1 -0
  90. package/fesm2015/ng-nest-ui-tabs.mjs +1 -0
  91. package/fesm2015/ng-nest-ui-tag.mjs +1 -0
  92. package/fesm2015/ng-nest-ui-text-retract.mjs +1 -0
  93. package/fesm2015/ng-nest-ui-textarea.mjs +1 -0
  94. package/fesm2015/ng-nest-ui-theme.mjs +1 -0
  95. package/fesm2015/ng-nest-ui-time-ago.mjs +1 -0
  96. package/fesm2015/ng-nest-ui-time-picker.mjs +1 -0
  97. package/fesm2015/ng-nest-ui-time-range.mjs +1 -0
  98. package/fesm2015/ng-nest-ui-timeline.mjs +1 -0
  99. package/fesm2015/ng-nest-ui-tooltip.mjs +1 -0
  100. package/fesm2015/ng-nest-ui-transfer.mjs +1 -0
  101. package/fesm2015/ng-nest-ui-tree-file.mjs +13 -7
  102. package/fesm2015/ng-nest-ui-tree-file.mjs.map +1 -1
  103. package/fesm2015/ng-nest-ui-tree-select.mjs +1 -0
  104. package/fesm2015/ng-nest-ui-tree.mjs +1 -0
  105. package/fesm2015/ng-nest-ui-typography.mjs +1 -0
  106. package/fesm2015/ng-nest-ui-upload.mjs +10 -3
  107. package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
  108. package/fesm2015/ng-nest-ui.mjs +1 -0
  109. package/fesm2020/ng-nest-ui-affix.mjs +1 -0
  110. package/fesm2020/ng-nest-ui-alert.mjs +1 -0
  111. package/fesm2020/ng-nest-ui-anchor.mjs +0 -1
  112. package/fesm2020/ng-nest-ui-anchor.mjs.map +1 -1
  113. package/fesm2020/ng-nest-ui-api.mjs +1 -0
  114. package/fesm2020/ng-nest-ui-auto-complete.mjs +1 -0
  115. package/fesm2020/ng-nest-ui-avatar.mjs +1 -0
  116. package/fesm2020/ng-nest-ui-back-top.mjs +1 -0
  117. package/fesm2020/ng-nest-ui-badge.mjs +1 -0
  118. package/fesm2020/ng-nest-ui-base-form.mjs +1 -0
  119. package/fesm2020/ng-nest-ui-border.mjs +1 -0
  120. package/fesm2020/ng-nest-ui-button.mjs +1 -0
  121. package/fesm2020/ng-nest-ui-calendar.mjs +1 -0
  122. package/fesm2020/ng-nest-ui-card.mjs +1 -0
  123. package/fesm2020/ng-nest-ui-carousel.mjs +1 -0
  124. package/fesm2020/ng-nest-ui-cascade.mjs +1 -0
  125. package/fesm2020/ng-nest-ui-checkbox.mjs +14 -4
  126. package/fesm2020/ng-nest-ui-checkbox.mjs.map +1 -1
  127. package/fesm2020/ng-nest-ui-collapse.mjs +1 -0
  128. package/fesm2020/ng-nest-ui-color-picker.mjs +1 -0
  129. package/fesm2020/ng-nest-ui-color.mjs +1 -0
  130. package/fesm2020/ng-nest-ui-comment.mjs +1 -0
  131. package/fesm2020/ng-nest-ui-container.mjs +1 -0
  132. package/fesm2020/ng-nest-ui-core.mjs +1 -0
  133. package/fesm2020/ng-nest-ui-crumb.mjs +1 -0
  134. package/fesm2020/ng-nest-ui-date-picker.mjs +1 -0
  135. package/fesm2020/ng-nest-ui-description.mjs +1 -0
  136. package/fesm2020/ng-nest-ui-dialog.mjs +1 -0
  137. package/fesm2020/ng-nest-ui-doc.mjs +1 -0
  138. package/fesm2020/ng-nest-ui-drawer.mjs +1 -0
  139. package/fesm2020/ng-nest-ui-dropdown.mjs +1 -0
  140. package/fesm2020/ng-nest-ui-empty.mjs +1 -0
  141. package/fesm2020/ng-nest-ui-examples.mjs +1 -0
  142. package/fesm2020/ng-nest-ui-find.mjs +1 -0
  143. package/fesm2020/ng-nest-ui-form.mjs +1 -0
  144. package/fesm2020/ng-nest-ui-highlight.mjs +1 -0
  145. package/fesm2020/ng-nest-ui-i18n.mjs +1 -0
  146. package/fesm2020/ng-nest-ui-icon.mjs +11 -7
  147. package/fesm2020/ng-nest-ui-icon.mjs.map +1 -1
  148. package/fesm2020/ng-nest-ui-image.mjs +1 -0
  149. package/fesm2020/ng-nest-ui-inner.mjs +1 -0
  150. package/fesm2020/ng-nest-ui-input-number.mjs +1 -0
  151. package/fesm2020/ng-nest-ui-input.mjs +5 -1
  152. package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
  153. package/fesm2020/ng-nest-ui-keyword.mjs +1 -0
  154. package/fesm2020/ng-nest-ui-layout.mjs +1 -0
  155. package/fesm2020/ng-nest-ui-link.mjs +1 -0
  156. package/fesm2020/ng-nest-ui-list.mjs +1 -0
  157. package/fesm2020/ng-nest-ui-loading.mjs +1 -0
  158. package/fesm2020/ng-nest-ui-menu.mjs +1 -0
  159. package/fesm2020/ng-nest-ui-message-box.mjs +1 -0
  160. package/fesm2020/ng-nest-ui-message.mjs +1 -0
  161. package/fesm2020/ng-nest-ui-notification.mjs +1 -0
  162. package/fesm2020/ng-nest-ui-outlet.mjs +1 -0
  163. package/fesm2020/ng-nest-ui-page-header.mjs +1 -0
  164. package/fesm2020/ng-nest-ui-pagination.mjs +1 -0
  165. package/fesm2020/ng-nest-ui-pattern.mjs +1 -0
  166. package/fesm2020/ng-nest-ui-popconfirm.mjs +1 -0
  167. package/fesm2020/ng-nest-ui-popover.mjs +1 -0
  168. package/fesm2020/ng-nest-ui-portal.mjs +1 -0
  169. package/fesm2020/ng-nest-ui-progress.mjs +1 -0
  170. package/fesm2020/ng-nest-ui-radio.mjs +19 -7
  171. package/fesm2020/ng-nest-ui-radio.mjs.map +1 -1
  172. package/fesm2020/ng-nest-ui-rate.mjs +1 -0
  173. package/fesm2020/ng-nest-ui-resizable.mjs +1 -0
  174. package/fesm2020/ng-nest-ui-result.mjs +1 -0
  175. package/fesm2020/ng-nest-ui-ripple.mjs +1 -0
  176. package/fesm2020/ng-nest-ui-select.mjs +1 -0
  177. package/fesm2020/ng-nest-ui-skeleton.mjs +1 -0
  178. package/fesm2020/ng-nest-ui-slider-select.mjs +1 -0
  179. package/fesm2020/ng-nest-ui-slider.mjs +1 -0
  180. package/fesm2020/ng-nest-ui-statistic.mjs +1 -0
  181. package/fesm2020/ng-nest-ui-steps.mjs +1 -0
  182. package/fesm2020/ng-nest-ui-switch.mjs +1 -0
  183. package/fesm2020/ng-nest-ui-table.mjs +1 -0
  184. package/fesm2020/ng-nest-ui-tabs.mjs +1 -0
  185. package/fesm2020/ng-nest-ui-tag.mjs +1 -0
  186. package/fesm2020/ng-nest-ui-text-retract.mjs +1 -0
  187. package/fesm2020/ng-nest-ui-textarea.mjs +1 -0
  188. package/fesm2020/ng-nest-ui-theme.mjs +1 -0
  189. package/fesm2020/ng-nest-ui-time-ago.mjs +1 -0
  190. package/fesm2020/ng-nest-ui-time-picker.mjs +1 -0
  191. package/fesm2020/ng-nest-ui-time-range.mjs +1 -0
  192. package/fesm2020/ng-nest-ui-timeline.mjs +1 -0
  193. package/fesm2020/ng-nest-ui-tooltip.mjs +1 -0
  194. package/fesm2020/ng-nest-ui-transfer.mjs +1 -0
  195. package/fesm2020/ng-nest-ui-tree-file.mjs +11 -7
  196. package/fesm2020/ng-nest-ui-tree-file.mjs.map +1 -1
  197. package/fesm2020/ng-nest-ui-tree-select.mjs +1 -0
  198. package/fesm2020/ng-nest-ui-tree.mjs +1 -0
  199. package/fesm2020/ng-nest-ui-typography.mjs +1 -0
  200. package/fesm2020/ng-nest-ui-upload.mjs +8 -3
  201. package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
  202. package/fesm2020/ng-nest-ui.mjs +1 -0
  203. package/icon/icon.module.d.ts +1 -2
  204. package/icon/icon.service.d.ts +1 -1
  205. package/input/input.property.d.ts +11 -1
  206. package/package.json +1 -1
  207. package/radio/radio.component.d.ts +2 -0
  208. package/radio/radio.module.d.ts +3 -2
  209. package/radio/radio.property.d.ts +22 -2
  210. package/tree-file/tree-file.component.d.ts +1 -1
  211. package/tree-file/tree-file.module.d.ts +7 -8
  212. package/upload/upload.component.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
+ import { Component, Input, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i1 from '@ng-nest/ui/core';
5
5
  import { XDataConvert, XInputBoolean, XWithConfig, XIsChange, XClearClass, XSetData } from '@ng-nest/ui/core';
@@ -9,6 +9,8 @@ import * as i2 from '@angular/common';
9
9
  import { CommonModule } from '@angular/common';
10
10
  import * as i3 from '@ng-nest/ui/button';
11
11
  import { XButtonModule } from '@ng-nest/ui/button';
12
+ import * as i4 from '@ng-nest/ui/outlet';
13
+ import { XOutletModule } from '@ng-nest/ui/outlet';
12
14
  import { FormsModule } from '@angular/forms';
13
15
 
14
16
  /**
@@ -37,7 +39,7 @@ class XRadioProperty extends XControlValueAccessor {
37
39
  }
38
40
  }
39
41
  /** @nocollapse */ XRadioProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
40
- /** @nocollapse */ XRadioProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XRadioProperty, selector: "ng-component", inputs: { data: "data", button: "button", icon: "icon", size: "size", type: "type" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
42
+ /** @nocollapse */ XRadioProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XRadioProperty, selector: "ng-component", inputs: { data: "data", button: "button", icon: "icon", size: "size", type: "type", before: "before", after: "after" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
41
43
  __decorate([
42
44
  XDataConvert()
43
45
  ], XRadioProperty.prototype, "data", void 0);
@@ -63,6 +65,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
63
65
  type: Input
64
66
  }], type: [{
65
67
  type: Input
68
+ }], before: [{
69
+ type: Input
70
+ }], after: [{
71
+ type: Input
66
72
  }] } });
67
73
 
68
74
  class XRadioComponent extends XRadioProperty {
@@ -75,6 +81,12 @@ class XRadioComponent extends XRadioProperty {
75
81
  this.nodes = [];
76
82
  this._unSubject = new Subject();
77
83
  }
84
+ get beforeIsTemplate() {
85
+ return this.before instanceof TemplateRef;
86
+ }
87
+ get afterIsTemplate() {
88
+ return this.after instanceof TemplateRef;
89
+ }
78
90
  ngOnInit() {
79
91
  this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);
80
92
  this.setClassMap();
@@ -121,10 +133,10 @@ class XRadioComponent extends XRadioProperty {
121
133
  }
122
134
  }
123
135
  /** @nocollapse */ XRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
124
- /** @nocollapse */ XRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XRadioComponent, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div class=\"x-radio-row\">\r\n <div\r\n class=\"x-radio-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-item:hover{color:var(--x-primary)}.x-radio-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-item:last-child{margin-right:0}.x-radio-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: 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.XButtonComponent, selector: "x-button" }, { kind: "component", type: i3.XButtonsComponent, selector: "x-buttons" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
136
+ /** @nocollapse */ XRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XRadioComponent, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\">\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: 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.XButtonComponent, selector: "x-button" }, { kind: "component", type: i3.XButtonsComponent, selector: "x-buttons" }, { kind: "directive", type: i4.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
125
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioComponent, decorators: [{
126
138
  type: Component,
127
- args: [{ selector: `${XRadioPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div class=\"x-radio-row\">\r\n <div\r\n class=\"x-radio-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-item:hover{color:var(--x-primary)}.x-radio-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-item:last-child{margin-right:0}.x-radio-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
139
+ args: [{ selector: `${XRadioPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\">\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
128
140
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; }, propDecorators: { radio: [{
129
141
  type: ViewChild,
130
142
  args: ['radio', { static: true }]
@@ -133,14 +145,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
133
145
  class XRadioModule {
134
146
  }
135
147
  /** @nocollapse */ XRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
136
- /** @nocollapse */ XRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, declarations: [XRadioComponent, XRadioProperty], imports: [CommonModule, FormsModule, XButtonModule, XBaseFormModule], exports: [XRadioComponent] });
137
- /** @nocollapse */ XRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, imports: [CommonModule, FormsModule, XButtonModule, XBaseFormModule] });
148
+ /** @nocollapse */ XRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, declarations: [XRadioComponent, XRadioProperty], imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseFormModule], exports: [XRadioComponent] });
149
+ /** @nocollapse */ XRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseFormModule] });
138
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XRadioModule, decorators: [{
139
151
  type: NgModule,
140
152
  args: [{
141
153
  declarations: [XRadioComponent, XRadioProperty],
142
154
  exports: [XRadioComponent],
143
- imports: [CommonModule, FormsModule, XButtonModule, XBaseFormModule]
155
+ imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseFormModule]
144
156
  }]
145
157
  }] });
146
158
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\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 Take effect when button style\r\n */\r\n type?: XButtonType;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef;\r\n nodes: XRadioNode[] = [];\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 override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || node.id === this.value) return;\r\n this.formControlValidator();\r\n this.value = node.id;\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div class=\"x-radio-row\">\r\n <div\r\n class=\"x-radio-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRadioComponent } from './radio.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioProperty } from './radio.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XRadioComponent, XRadioProperty],\r\n exports: [XRadioComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XBaseFormModule]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,qBAA0B,CAAA;AAD9D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAsB,EAAE,CAAC;AAgBtD;;;AAGG;AACM,QAAA,IAAI,CAAA,IAAA,GAAgB,SAAS,CAAC;KACxC;;8HA1BY,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,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AAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEZzB,YAAY,CAAA;;4HAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAZ,mBAAA,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,EAJR,YAAA,EAAA,CAAA,eAAe,EAAE,cAAc,CAEpC,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,aADzD,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,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAExD,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,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,CAAC;iBACrE,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig, XTemplate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n @Input() override before!: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n @Input() override after!: XTemplate;\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\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 Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef;\r\n nodes: XRadioNode[] = [];\r\n private _unSubject = new Subject<void>();\r\n\r\n get beforeIsTemplate() {\r\n return this.before instanceof TemplateRef;\r\n }\r\n\r\n get afterIsTemplate() {\r\n return this.after instanceof TemplateRef;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || node.id === this.value) return;\r\n this.formControlValidator();\r\n this.value = node.id;\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\">\r\n <ng-container *ngIf=\"button || icon; else default\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #default>\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRadioComponent } from './radio.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioProperty } from './radio.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\n\r\n@NgModule({\r\n declarations: [XRadioComponent, XRadioProperty],\r\n exports: [XRadioComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseF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AAA,EAAA,IAAA,EAAA,YAAY,EAJR,YAAA,EAAA,CAAA,eAAe,EAAE,cAAc,aAEpC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,aADxE,eAAe,CAAA,EAAA,CAAA,CAAA;6HAGd,YAAY,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAEvE,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,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAC;iBACpF,CAAA;;;ACbD;;AAEG;;;;"}
@@ -184,3 +184,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
184
184
 
185
185
  export { XRateComponent, XRateModule, XRatePrefix, XRateProperty };
186
186
  //# sourceMappingURL=ng-nest-ui-rate.mjs.map
187
+ //# sourceMappingURL=ng-nest-ui-rate.mjs.map
@@ -377,3 +377,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
377
377
 
378
378
  export { XResizableDirective, XResizableModule, XResizablePrefix, XResizableProperty };
379
379
  //# sourceMappingURL=ng-nest-ui-resizable.mjs.map
380
+ //# sourceMappingURL=ng-nest-ui-resizable.mjs.map
@@ -88,3 +88,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
88
88
 
89
89
  export { XResultComponent, XResultModule, XResultPrefix, XResultProperty };
90
90
  //# sourceMappingURL=ng-nest-ui-result.mjs.map
91
+ //# sourceMappingURL=ng-nest-ui-result.mjs.map
@@ -118,3 +118,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
118
118
 
119
119
  export { XRippleDirective, XRippleModule, XRipplePrefix, XRippleProperty };
120
120
  //# sourceMappingURL=ng-nest-ui-ripple.mjs.map
121
+ //# sourceMappingURL=ng-nest-ui-ripple.mjs.map
@@ -872,3 +872,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
872
872
 
873
873
  export { XSelectComponent, XSelectModule, XSelectPortalComponent, XSelectPortalPrefix, XSelectPrefix, XSelectProperty };
874
874
  //# sourceMappingURL=ng-nest-ui-select.mjs.map
875
+ //# sourceMappingURL=ng-nest-ui-select.mjs.map
@@ -106,3 +106,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
106
106
 
107
107
  export { XSkeletonComponent, XSkeletonModule, XSkeletonPrefix, XSkeletonProperty };
108
108
  //# sourceMappingURL=ng-nest-ui-skeleton.mjs.map
109
+ //# sourceMappingURL=ng-nest-ui-skeleton.mjs.map
@@ -279,3 +279,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
279
279
 
280
280
  export { XSliderSelectComponent, XSliderSelectModule, XSliderSelectPrefix, XSliderSelectProperty };
281
281
  //# sourceMappingURL=ng-nest-ui-slider-select.mjs.map
282
+ //# sourceMappingURL=ng-nest-ui-slider-select.mjs.map
@@ -374,3 +374,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
374
374
 
375
375
  export { XSliderComponent, XSliderModule, XSliderPrefix, XSliderProperty };
376
376
  //# sourceMappingURL=ng-nest-ui-slider.mjs.map
377
+ //# sourceMappingURL=ng-nest-ui-slider.mjs.map
@@ -186,3 +186,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
186
186
 
187
187
  export { XCountdownComponent, XCountdownPrefix, XCountdownProperty, XStatisticComponent, XStatisticModule, XStatisticPrefix, XStatisticProperty };
188
188
  //# sourceMappingURL=ng-nest-ui-statistic.mjs.map
189
+ //# sourceMappingURL=ng-nest-ui-statistic.mjs.map
@@ -173,3 +173,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
173
173
 
174
174
  export { XStepsComponent, XStepsModule, XStepsPrefix, XStepsProperty };
175
175
  //# sourceMappingURL=ng-nest-ui-steps.mjs.map
176
+ //# sourceMappingURL=ng-nest-ui-steps.mjs.map
@@ -87,3 +87,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
87
87
 
88
88
  export { XSwitchComponent, XSwitchModule, XSwitchPrefix, XSwitchProperty };
89
89
  //# sourceMappingURL=ng-nest-ui-switch.mjs.map
90
+ //# sourceMappingURL=ng-nest-ui-switch.mjs.map
@@ -1338,3 +1338,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1338
1338
 
1339
1339
  export { XDragDirective, XTableBodyComponent, XTableBodyPrefix, XTableBodyProperty, XTableComponent, XTableFootComponent, XTableFootPrefix, XTableFootProperty, XTableHeadComponent, XTableHeadPrefix, XTableHeadProperty, XTableModule, XTablePrefix, XTableProperty };
1340
1340
  //# sourceMappingURL=ng-nest-ui-table.mjs.map
1341
+ //# sourceMappingURL=ng-nest-ui-table.mjs.map
@@ -462,3 +462,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
462
462
 
463
463
  export { XTabComponent, XTabContentComponent, XTabLinkDirective, XTabLinkTemplateDirective, XTabPrefix, XTabProperty, XTabsComponent, XTabsModule, XTabsPrefix, XTabsProperty };
464
464
  //# sourceMappingURL=ng-nest-ui-tabs.mjs.map
465
+ //# sourceMappingURL=ng-nest-ui-tabs.mjs.map
@@ -171,3 +171,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
171
171
 
172
172
  export { XTagComponent, XTagModule, XTagPrefix, XTagProperty };
173
173
  //# sourceMappingURL=ng-nest-ui-tag.mjs.map
174
+ //# sourceMappingURL=ng-nest-ui-tag.mjs.map
@@ -112,3 +112,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
112
112
 
113
113
  export { XTextRetractComponent, XTextRetractModule, XTextRetractPrefix, XTextRetractProperty };
114
114
  //# sourceMappingURL=ng-nest-ui-text-retract.mjs.map
115
+ //# sourceMappingURL=ng-nest-ui-text-retract.mjs.map
@@ -194,3 +194,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
194
194
 
195
195
  export { XTextareaComponent, XTextareaModule, XTextareaPrefix, XTextareaProperty };
196
196
  //# sourceMappingURL=ng-nest-ui-textarea.mjs.map
197
+ //# sourceMappingURL=ng-nest-ui-textarea.mjs.map
@@ -283,3 +283,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
283
283
 
284
284
  export { XThemeAmounts, XThemeComponent, XThemeModule, XThemePrefix, XThemeProperty };
285
285
  //# sourceMappingURL=ng-nest-ui-theme.mjs.map
286
+ //# sourceMappingURL=ng-nest-ui-theme.mjs.map
@@ -95,3 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
95
95
 
96
96
  export { XTimeAgoModule, XTimeAgoPipe, XTimeAgoPrefix };
97
97
  //# sourceMappingURL=ng-nest-ui-time-ago.mjs.map
98
+ //# sourceMappingURL=ng-nest-ui-time-ago.mjs.map
@@ -534,3 +534,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
534
534
 
535
535
  export { XTimePickerComponent, XTimePickerFrameComponent, XTimePickerFramePrefix, XTimePickerModule, XTimePickerPortalComponent, XTimePickerPortalPrefix, XTimePickerPrefix, XTimePickerProperty };
536
536
  //# sourceMappingURL=ng-nest-ui-time-picker.mjs.map
537
+ //# sourceMappingURL=ng-nest-ui-time-picker.mjs.map
@@ -68,3 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
68
68
 
69
69
  export { XTimeRangeModule, XTimeRangePipe, XTimeRangePrefix, timeUnits };
70
70
  //# sourceMappingURL=ng-nest-ui-time-range.mjs.map
71
+ //# sourceMappingURL=ng-nest-ui-time-range.mjs.map
@@ -142,3 +142,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
142
142
 
143
143
  export { XTimelineComponent, XTimelineModule, XTimelinePrefix, XTimelineProperty };
144
144
  //# sourceMappingURL=ng-nest-ui-timeline.mjs.map
145
+ //# sourceMappingURL=ng-nest-ui-timeline.mjs.map
@@ -325,3 +325,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
325
325
 
326
326
  export { XTooltipDirective, XTooltipModule, XTooltipPortalComponent, XTooltipPortalPrefix, XTooltipPrefix, XTooltipProperty };
327
327
  //# sourceMappingURL=ng-nest-ui-tooltip.mjs.map
328
+ //# sourceMappingURL=ng-nest-ui-tooltip.mjs.map
@@ -650,3 +650,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
650
650
 
651
651
  export { XTransferComponent, XTransferModule, XTransferPrefix, XTransferProperty };
652
652
  //# sourceMappingURL=ng-nest-ui-transfer.mjs.map
653
+ //# sourceMappingURL=ng-nest-ui-transfer.mjs.map
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
+ import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, Optional, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i2 from '@ng-nest/ui/core';
5
5
  import { XDataConvert, XInputBoolean, XWithConfig, XInputNumber, XIsEmpty } from '@ng-nest/ui/core';
@@ -7,7 +7,6 @@ import * as i4 from '@ng-nest/ui/tree';
7
7
  import { XTreeProperty, XTreeModule } from '@ng-nest/ui/tree';
8
8
  import { delay } from 'rxjs/operators';
9
9
  import * as i1 from '@angular/common/http';
10
- import { HttpClientModule } from '@angular/common/http';
11
10
  import * as i3 from '@angular/common';
12
11
  import { CommonModule } from '@angular/common';
13
12
  import * as i5 from '@ng-nest/ui/link';
@@ -127,6 +126,9 @@ class XTreeFileComponent extends XTreeFileProperty {
127
126
  this.configService = configService;
128
127
  this.loading = false;
129
128
  this.timeout = 200;
129
+ if (!http) {
130
+ throw new Error(`${XTreeFilePrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);
131
+ }
130
132
  }
131
133
  get catalogHeight() {
132
134
  return Number(this.maxHeight);
@@ -204,24 +206,28 @@ class XTreeFileComponent extends XTreeFileProperty {
204
206
  this.cdr.detectChanges();
205
207
  }
206
208
  }
207
- /** @nocollapse */ XTreeFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.HttpClient }, { token: i2.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
209
+ /** @nocollapse */ XTreeFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.HttpClient, optional: true }, { token: i2.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
208
210
  /** @nocollapse */ XTreeFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTreeFileComponent, selector: "x-tree-file", usesInheritance: true, ngImport: i0, template: "<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-tree-file{margin:0;padding:0;display:flex;background-color:var(--x-background);border-radius:var(--x-border-radius);border:var(--x-border-width) var(--x-border-style) var(--x-border);color:var(--x-text)}.x-tree-file-catalog{width:0;overflow:auto;opacity:0;font-size:.8125rem;transition:var(--x-animation-duration-slow)}.x-tree-file-catalog .x-tree{padding:.5rem}.x-tree-file-catalog .x-tree-node-content{height:1.375rem}.x-tree-file-catalog .x-tree-node-content:hover,.x-tree-file-catalog .x-tree-node-content.x-activated{background-color:var(--x-border)}.x-tree-file-body{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative}.x-tree-file-crumb{background-color:var(--x-background);display:flex}.x-tree-file-crumb>x-link{line-height:1.5rem;height:1.5rem;transition:var(--x-animation-duration-base)}.x-tree-file-crumb>x-link>a{padding:0 .5rem}.x-tree-file-crumb>x-crumb{flex:1}.x-tree-file-crumb>x-crumb>.x-crumb{padding:0 .5rem;color:var(--x-text-300)}.x-tree-file-crumb>x-crumb>.x-crumb .x-crumb-separator{margin:0 .125rem}.x-tree-file-content{flex:1;overflow:auto;transition:var(--x-animation-duration-slow);display:flex;min-height:3rem}.x-tree-file-content>x-highlight{border:none}.x-tree-file-content>x-highlight>pre{overflow:inherit}.x-tree-file-content>.x-tree-file-img{margin:auto;padding:1.5rem;display:flex;align-items:center}.x-tree-file-content>.x-tree-file-img>img{max-width:100%;height:auto;margin:auto;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border-radius:var(--x-border-radius);background-color:var(--x-background-a100)}.x-tree-file-toggle>.x-tree-file-catalog{width:16rem;opacity:1;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.XTreeComponent, selector: "x-tree" }, { kind: "component", type: i5.XLinkComponent, selector: "x-link" }, { kind: "component", type: i6.XCrumbComponent, selector: "x-crumb" }, { kind: "component", type: i7.XIconComponent, selector: "x-icon" }, { kind: "component", type: i8.XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "component", type: i9.XHighlightComponent, selector: "x-highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
209
211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileComponent, decorators: [{
210
212
  type: Component,
211
213
  args: [{ selector: `${XTreeFilePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-tree-file{margin:0;padding:0;display:flex;background-color:var(--x-background);border-radius:var(--x-border-radius);border:var(--x-border-width) var(--x-border-style) var(--x-border);color:var(--x-text)}.x-tree-file-catalog{width:0;overflow:auto;opacity:0;font-size:.8125rem;transition:var(--x-animation-duration-slow)}.x-tree-file-catalog .x-tree{padding:.5rem}.x-tree-file-catalog .x-tree-node-content{height:1.375rem}.x-tree-file-catalog .x-tree-node-content:hover,.x-tree-file-catalog .x-tree-node-content.x-activated{background-color:var(--x-border)}.x-tree-file-body{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative}.x-tree-file-crumb{background-color:var(--x-background);display:flex}.x-tree-file-crumb>x-link{line-height:1.5rem;height:1.5rem;transition:var(--x-animation-duration-base)}.x-tree-file-crumb>x-link>a{padding:0 .5rem}.x-tree-file-crumb>x-crumb{flex:1}.x-tree-file-crumb>x-crumb>.x-crumb{padding:0 .5rem;color:var(--x-text-300)}.x-tree-file-crumb>x-crumb>.x-crumb .x-crumb-separator{margin:0 .125rem}.x-tree-file-content{flex:1;overflow:auto;transition:var(--x-animation-duration-slow);display:flex;min-height:3rem}.x-tree-file-content>x-highlight{border:none}.x-tree-file-content>x-highlight>pre{overflow:inherit}.x-tree-file-content>.x-tree-file-img{margin:auto;padding:1.5rem;display:flex;align-items:center}.x-tree-file-content>.x-tree-file-img>img{max-width:100%;height:auto;margin:auto;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border-radius:var(--x-border-radius);background-color:var(--x-background-a100)}.x-tree-file-toggle>.x-tree-file-catalog{width:16rem;opacity:1;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}\n"] }]
212
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.HttpClient }, { type: i2.XConfigService }]; } });
214
+ }], ctorParameters: function () {
215
+ return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.HttpClient, decorators: [{
216
+ type: Optional
217
+ }] }, { type: i2.XConfigService }];
218
+ } });
213
219
 
214
220
  class XTreeFileModule {
215
221
  }
216
222
  /** @nocollapse */ XTreeFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
217
- /** @nocollapse */ XTreeFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, declarations: [XTreeFileComponent, XTreeFileProperty], imports: [CommonModule, HttpClientModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule], exports: [XTreeFileComponent] });
218
- /** @nocollapse */ XTreeFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, imports: [CommonModule, HttpClientModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule] });
223
+ /** @nocollapse */ XTreeFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, declarations: [XTreeFileComponent, XTreeFileProperty], imports: [CommonModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule], exports: [XTreeFileComponent] });
224
+ /** @nocollapse */ XTreeFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, imports: [CommonModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule] });
219
225
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTreeFileModule, decorators: [{
220
226
  type: NgModule,
221
227
  args: [{
222
228
  declarations: [XTreeFileComponent, XTreeFileProperty],
223
229
  exports: [XTreeFileComponent],
224
- imports: [CommonModule, HttpClientModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]
230
+ imports: [CommonModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]
225
231
  }]
226
232
  }] });
227
233
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-tree-file.mjs","sources":["../../../../lib/ng-nest/ui/tree-file/tree-file.property.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.html","../../../../lib/ng-nest/ui/tree-file/tree-file.module.ts","../../../../lib/ng-nest/ui/tree-file/ng-nest-ui-tree-file.ts"],"sourcesContent":["import { XDataConvert, XData, XInputBoolean, XBoolean, XInputNumber, XNumber, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Component, Input } from '@angular/core';\r\nimport { XTreeNode, XTreeProperty } from '@ng-nest/ui/tree';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n/**\r\n * TreeFile\r\n * @selector x-tree-file\r\n * @decorator component\r\n */\r\nexport const XTreeFilePrefix = 'x-tree-file';\r\nconst X_CONFIG_NAME = 'treeFile';\r\n\r\n/**\r\n * TreeFile Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTreeFileProperty extends XTreeProperty {\r\n /**\r\n * @zh_CN 节点数据\r\n * @en_US Node data\r\n */\r\n @Input() @XDataConvert() override data: XData<XTreeFileNode> = [];\r\n /**\r\n * @zh_CN 文件绝对路径地址前缀,为空表示取当前运行的地址\r\n * @en_US File absolute path address prefix, empty means to take the address of the current operation\r\n */\r\n @Input() domain: string = '';\r\n /**\r\n * @zh_CN 切换状态\r\n * @en_US Switch state\r\n */\r\n @Input() @XInputBoolean() toggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示切换按钮\r\n * @en_US Show toggle button\r\n */\r\n @Input() @XInputBoolean() showToggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示树,为 true 的时候隐藏切换按钮\r\n * @en_US Show the tree, hide the toggle button when true\r\n */\r\n @Input() @XInputBoolean() showTree: XBoolean = true;\r\n /**\r\n * @zh_CN 显示面包屑\r\n * @en_US Show breadcrumbs\r\n */\r\n @Input() @XInputBoolean() showCrumb: XBoolean = true;\r\n /**\r\n * @zh_CN 最大高度,单位 rem\r\n * @en_US Maximum height, unit rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 37.5) @XInputNumber() maxHeight?: XNumber;\r\n /**\r\n * @zh_CN 单位间距,这个与层级的乘积算出节点的左边距,单位 rem\r\n * @en_US Unit spacing, the product of this and the level calculates the left margin of the node, the unit is rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0.5) @XInputNumber() override spacing?: XNumber;\r\n}\r\n\r\n/**\r\n * @zh_CN TreeFile 数据对象\r\n * @en_US TreeFile data object\r\n */\r\nexport interface XTreeFileNode extends XTreeNode {\r\n /**\r\n * @zh_CN 子节点\r\n * @en_US Child node\r\n */\r\n children?: XTreeFileNode[];\r\n /**\r\n * @zh_CN 文件内容\r\n * @en_US Document content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n type?: string;\r\n /**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\n fileType?: XTreeFileType;\r\n /**\r\n * @zh_CN 文件地址,配置了地址将从 url 中加载文件内容\r\n * @en_US File address, the configured address will load the file content from url\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 文件的面包屑数据\r\n * @en_US Breadcrumb data\r\n */\r\n crumbData?: XCrumbNode[];\r\n /**\r\n * @zh_CN 文件内容已经加载过\r\n * @en_US File content has been loaded\r\n */\r\n contentLoaded?: boolean;\r\n /**\r\n * @zh_CN 行高亮着色\r\n * @en_US Line highlight coloring\r\n */\r\n highlightLines?: XHighlightLines;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\nexport type XTreeFileType = 'code' | 'img';\r\n\r\n/**\r\n * @zh_CN 支持显示的图片格式\r\n * @en_US Supported picture format\r\n */\r\nexport const XTreeFileImgs = ['webp', 'png', 'jpg', 'gif', 'jpeg', 'ico'];\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XTreeFilePrefix, XTreeFileProperty, XTreeFileNode, XTreeFileImgs } from './tree-file.property';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { XIsEmpty, XConfigService } from '@ng-nest/ui/core';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n@Component({\r\n selector: `${XTreeFilePrefix}`,\r\n templateUrl: './tree-file.component.html',\r\n styleUrls: ['./tree-file.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTreeFileComponent extends XTreeFileProperty {\r\n activatedNode?: XTreeFileNode;\r\n loading: boolean = false;\r\n time!: number;\r\n timeout: number = 200;\r\n\r\n get catalogHeight() {\r\n return Number(this.maxHeight);\r\n }\r\n\r\n get codeHeight() {\r\n return Number(this.maxHeight) - (Boolean(this.showCrumb) ? 1.5 : 0);\r\n }\r\n\r\n get getCrumbData() {\r\n return this.activatedNode?.crumbData as XCrumbNode[];\r\n }\r\n\r\n get getHighlightLines() {\r\n return this.activatedNode?.highlightLines as XHighlightLines;\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 http: HttpClient,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.showTree && this.activatedId) {\r\n this.catalogChange((this.data as XTreeFileNode[]).find((x) => x.id == this.activatedId) as XTreeFileNode);\r\n }\r\n }\r\n\r\n catalogChange(node: XTreeFileNode) {\r\n if (node?.leaf) return;\r\n if (node.url && !node.contentLoaded) {\r\n this.time = new Date().getTime();\r\n this.loading = true;\r\n this.cdr.detectChanges();\r\n this.activatedNode = node;\r\n node.fileType = XTreeFileImgs.indexOf((node.type as string).toLowerCase()) !== -1 ? 'img' : 'code';\r\n node.crumbData = this.setCurmbData(node);\r\n node.url = node.url?.indexOf(this.domain) === 0 ? node.url : `${this.domain}/${node.url}`;\r\n switch (node.fileType) {\r\n case 'code':\r\n this.http\r\n .get(node.url, { responseType: 'text' })\r\n .pipe(delay(new Date().getTime() - this.time > this.timeout ? 0 : this.timeout - new Date().getTime() + this.time))\r\n .subscribe((x) => {\r\n node.content = x;\r\n node.contentLoaded = true;\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n });\r\n break;\r\n case 'img':\r\n this.cdr.detectChanges();\r\n break;\r\n }\r\n } else {\r\n this.activatedNode = node;\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n\r\n imgOnload() {\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setCurmbData(node: XTreeFileNode) {\r\n let crumbData: XCrumbNode[] = [{ id: node.id, label: node.label }];\r\n const getParent = (child: XTreeFileNode) => {\r\n if (XIsEmpty(child.pid)) return;\r\n const parent = (this.data as XTreeFileNode[]).find((x) => x.id === child.pid) as XTreeFileNode;\r\n if (!XIsEmpty(parent)) {\r\n crumbData = [{ id: parent.id, label: parent.label }, ...crumbData];\r\n getParent(parent);\r\n }\r\n };\r\n getParent(node);\r\n\r\n return crumbData;\r\n }\r\n\r\n menuToggle() {\r\n this.toggle = !this.toggle;\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { XTreeFileComponent } from './tree-file.component';\r\nimport { XTreeFileProperty } from './tree-file.property';\r\nimport { XTreeModule } from '@ng-nest/ui/tree';\r\nimport { XHighlightModule } from '@ng-nest/ui/highlight';\r\nimport { XCrumbModule } from '@ng-nest/ui/crumb';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\n\r\n@NgModule({\r\n declarations: [XTreeFileComponent, XTreeFileProperty],\r\n exports: [XTreeFileComponent],\r\n imports: [CommonModule, HttpClientModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]\r\n})\r\nexport class XTreeFileModule {}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file.property.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.html","../../../../lib/ng-nest/ui/tree-file/tree-file.module.ts","../../../../lib/ng-nest/ui/tree-file/ng-nest-ui-tree-file.ts"],"sourcesContent":["import { XDataConvert, XData, XInputBoolean, XBoolean, XInputNumber, XNumber, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Component, Input } from '@angular/core';\r\nimport { XTreeNode, XTreeProperty } from '@ng-nest/ui/tree';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n/**\r\n * TreeFile\r\n * @selector x-tree-file\r\n * @decorator component\r\n */\r\nexport const XTreeFilePrefix = 'x-tree-file';\r\nconst X_CONFIG_NAME = 'treeFile';\r\n\r\n/**\r\n * TreeFile Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTreeFileProperty extends XTreeProperty {\r\n /**\r\n * @zh_CN 节点数据\r\n * @en_US Node data\r\n */\r\n @Input() @XDataConvert() override data: XData<XTreeFileNode> = [];\r\n /**\r\n * @zh_CN 文件绝对路径地址前缀,为空表示取当前运行的地址\r\n * @en_US File absolute path address prefix, empty means to take the address of the current operation\r\n */\r\n @Input() domain: string = '';\r\n /**\r\n * @zh_CN 切换状态\r\n * @en_US Switch state\r\n */\r\n @Input() @XInputBoolean() toggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示切换按钮\r\n * @en_US Show toggle button\r\n */\r\n @Input() @XInputBoolean() showToggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示树,为 true 的时候隐藏切换按钮\r\n * @en_US Show the tree, hide the toggle button when true\r\n */\r\n @Input() @XInputBoolean() showTree: XBoolean = true;\r\n /**\r\n * @zh_CN 显示面包屑\r\n * @en_US Show breadcrumbs\r\n */\r\n @Input() @XInputBoolean() showCrumb: XBoolean = true;\r\n /**\r\n * @zh_CN 最大高度,单位 rem\r\n * @en_US Maximum height, unit rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 37.5) @XInputNumber() maxHeight?: XNumber;\r\n /**\r\n * @zh_CN 单位间距,这个与层级的乘积算出节点的左边距,单位 rem\r\n * @en_US Unit spacing, the product of this and the level calculates the left margin of the node, the unit is rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0.5) @XInputNumber() override spacing?: XNumber;\r\n}\r\n\r\n/**\r\n * @zh_CN TreeFile 数据对象\r\n * @en_US TreeFile data object\r\n */\r\nexport interface XTreeFileNode extends XTreeNode {\r\n /**\r\n * @zh_CN 子节点\r\n * @en_US Child node\r\n */\r\n children?: XTreeFileNode[];\r\n /**\r\n * @zh_CN 文件内容\r\n * @en_US Document content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n type?: string;\r\n /**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\n fileType?: XTreeFileType;\r\n /**\r\n * @zh_CN 文件地址,配置了地址将从 url 中加载文件内容\r\n * @en_US File address, the configured address will load the file content from url\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 文件的面包屑数据\r\n * @en_US Breadcrumb data\r\n */\r\n crumbData?: XCrumbNode[];\r\n /**\r\n * @zh_CN 文件内容已经加载过\r\n * @en_US File content has been loaded\r\n */\r\n contentLoaded?: boolean;\r\n /**\r\n * @zh_CN 行高亮着色\r\n * @en_US Line highlight coloring\r\n */\r\n highlightLines?: XHighlightLines;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\nexport type XTreeFileType = 'code' | 'img';\r\n\r\n/**\r\n * @zh_CN 支持显示的图片格式\r\n * @en_US Supported picture format\r\n */\r\nexport const XTreeFileImgs = ['webp', 'png', 'jpg', 'gif', 'jpeg', 'ico'];\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy, Optional } from '@angular/core';\r\nimport { XTreeFilePrefix, XTreeFileProperty, XTreeFileNode, XTreeFileImgs } from './tree-file.property';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { XIsEmpty, XConfigService } from '@ng-nest/ui/core';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n@Component({\r\n selector: `${XTreeFilePrefix}`,\r\n templateUrl: './tree-file.component.html',\r\n styleUrls: ['./tree-file.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTreeFileComponent extends XTreeFileProperty {\r\n activatedNode?: XTreeFileNode;\r\n loading: boolean = false;\r\n time!: number;\r\n timeout: number = 200;\r\n\r\n get catalogHeight() {\r\n return Number(this.maxHeight);\r\n }\r\n\r\n get codeHeight() {\r\n return Number(this.maxHeight) - (Boolean(this.showCrumb) ? 1.5 : 0);\r\n }\r\n\r\n get getCrumbData() {\r\n return this.activatedNode?.crumbData as XCrumbNode[];\r\n }\r\n\r\n get getHighlightLines() {\r\n return this.activatedNode?.highlightLines as XHighlightLines;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n @Optional() public http: HttpClient,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n if (!http) {\r\n throw new Error(`${XTreeFilePrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.showTree && this.activatedId) {\r\n this.catalogChange((this.data as XTreeFileNode[]).find((x) => x.id == this.activatedId) as XTreeFileNode);\r\n }\r\n }\r\n\r\n catalogChange(node: XTreeFileNode) {\r\n if (node?.leaf) return;\r\n if (node.url && !node.contentLoaded) {\r\n this.time = new Date().getTime();\r\n this.loading = true;\r\n this.cdr.detectChanges();\r\n this.activatedNode = node;\r\n node.fileType = XTreeFileImgs.indexOf((node.type as string).toLowerCase()) !== -1 ? 'img' : 'code';\r\n node.crumbData = this.setCurmbData(node);\r\n node.url = node.url?.indexOf(this.domain) === 0 ? node.url : `${this.domain}/${node.url}`;\r\n switch (node.fileType) {\r\n case 'code':\r\n this.http\r\n .get(node.url, { responseType: 'text' })\r\n .pipe(delay(new Date().getTime() - this.time > this.timeout ? 0 : this.timeout - new Date().getTime() + this.time))\r\n .subscribe((x) => {\r\n node.content = x;\r\n node.contentLoaded = true;\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n });\r\n break;\r\n case 'img':\r\n this.cdr.detectChanges();\r\n break;\r\n }\r\n } else {\r\n this.activatedNode = node;\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n\r\n imgOnload() {\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setCurmbData(node: XTreeFileNode) {\r\n let crumbData: XCrumbNode[] = [{ id: node.id, label: node.label }];\r\n const getParent = (child: XTreeFileNode) => {\r\n if (XIsEmpty(child.pid)) return;\r\n const parent = (this.data as XTreeFileNode[]).find((x) => x.id === child.pid) as XTreeFileNode;\r\n if (!XIsEmpty(parent)) {\r\n crumbData = [{ id: parent.id, label: parent.label }, ...crumbData];\r\n getParent(parent);\r\n }\r\n };\r\n getParent(node);\r\n\r\n return crumbData;\r\n }\r\n\r\n menuToggle() {\r\n this.toggle = !this.toggle;\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XTreeFileComponent } from './tree-file.component';\r\nimport { XTreeFileProperty } from './tree-file.property';\r\nimport { XTreeModule } from '@ng-nest/ui/tree';\r\nimport { XHighlightModule } from '@ng-nest/ui/highlight';\r\nimport { XCrumbModule } from '@ng-nest/ui/crumb';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\n\r\n@NgModule({\r\n declarations: [XTreeFileComponent, XTreeFileProperty],\r\n exports: [XTreeFileComponent],\r\n imports: [CommonModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]\r\n})\r\nexport class XTreeFileModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,eAAe,GAAG,cA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,CAAC;iBAC/G,CAAA;;;ACfD;;AAEG;;;;"}
@@ -956,3 +956,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
956
956
 
957
957
  export { XTreeSelectComponent, XTreeSelectModule, XTreeSelectPortalComponent, XTreeSelectPortalPrefix, XTreeSelectPrefix, XTreeSelectProperty };
958
958
  //# sourceMappingURL=ng-nest-ui-tree-select.mjs.map
959
+ //# sourceMappingURL=ng-nest-ui-tree-select.mjs.map
@@ -961,3 +961,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
961
961
 
962
962
  export { XTreeComponent, XTreeModule, XTreeNodeComponent, XTreeNodePrefix, XTreeNodeProperty, XTreePrefix, XTreeProperty };
963
963
  //# sourceMappingURL=ng-nest-ui-tree.mjs.map
964
+ //# sourceMappingURL=ng-nest-ui-tree.mjs.map
@@ -74,3 +74,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
74
74
 
75
75
  export { XTypographyComponent, XTypographyModule, XTypographyPrefix, XTypographyProperty };
76
76
  //# sourceMappingURL=ng-nest-ui-typography.mjs.map
77
+ //# sourceMappingURL=ng-nest-ui-typography.mjs.map