@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
@@ -67,3 +67,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
67
67
 
68
68
  export { XAffixComponent, XAffixModule, XAffixPrefix, XAffixProperty };
69
69
  //# sourceMappingURL=ng-nest-ui-affix.mjs.map
70
+ //# sourceMappingURL=ng-nest-ui-affix.mjs.map
@@ -245,3 +245,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
245
245
 
246
246
  export { XAlertComponent, XAlertModule, XAlertPrefix, XAlertProperty };
247
247
  //# sourceMappingURL=ng-nest-ui-alert.mjs.map
248
+ //# sourceMappingURL=ng-nest-ui-alert.mjs.map
@@ -131,7 +131,6 @@ class XAnchorComponent extends XAnchorProperty {
131
131
  }
132
132
  ];
133
133
  });
134
- console.log(list);
135
134
  this.sliderData = list;
136
135
  }
137
136
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-anchor.mjs","sources":["../../../../lib/ng-nest/ui/anchor/anchor.property.ts","../../../../lib/ng-nest/ui/anchor/anchor.component.ts","../../../../lib/ng-nest/ui/anchor/anchor.component.html","../../../../lib/ng-nest/ui/anchor/anchor.module.ts","../../../../lib/ng-nest/ui/anchor/ng-nest-ui-anchor.ts"],"sourcesContent":["import { XIdentityProperty, XProperty, XJustify, XWithConfig, XPositionLeftRight } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Anchor\r\n * @selector x-anchor\r\n * @decorator component\r\n */\r\nexport const XAnchorPrefix = 'x-anchor';\r\nconst X_CONFIG_NAME = 'anchor';\r\n\r\n/**\r\n * Anchor Property\r\n */\r\n@Component({ template: '' })\r\nexport class XAnchorProperty extends XProperty {\r\n /**\r\n * @zh_CN 滚动区域对象\r\n * @en_US Scroll area object\r\n */\r\n @Input() scroll!: HTMLElement;\r\n /**\r\n * @zh_CN 顶部距离\r\n * @en_US Top distance\r\n */\r\n @Input() @XWithConfig<string>(X_CONFIG_NAME, '0') affixTop!: string;\r\n /**\r\n * @zh_CN 导航相对内容位置\r\n * @en_US Navigation relative content position\r\n */\r\n @Input() @XWithConfig<XAnchorLayout>(X_CONFIG_NAME, 'right') layout!: XAnchorLayout;\r\n /**\r\n * @zh_CN 对齐方式\r\n * @en_US Alignment\r\n */\r\n @Input() @XWithConfig<XJustify>(X_CONFIG_NAME, 'start') justify!: XJustify;\r\n}\r\n\r\n/**\r\n * Anchor Node\r\n */\r\nexport interface XAnchorNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 左内边距,用来显示层级\r\n * @en_US Left inner margin, used to display hierarchy\r\n */\r\n left?: number;\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 Anchor link\r\n */\r\n link?: string;\r\n}\r\n\r\n/**\r\n * @zh_CN 布局方式,相对内容的位置\r\n * @en_US Layout method, relative content position\r\n */\r\nexport type XAnchorLayout = XPositionLeftRight;\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n AfterViewInit,\r\n Inject,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XAnchorPrefix, XAnchorNode, XAnchorProperty } from './anchor.property';\r\nimport { computedStyle, XIsEmpty, reqAnimFrame, XIsNumber, XIsUndefined, XConfigService } from '@ng-nest/ui/core';\r\nimport { XSliderNode } from '@ng-nest/ui/slider';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { throttleTime, takeUntil } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XAnchorPrefix}`,\r\n templateUrl: './anchor.component.html',\r\n styleUrls: ['./anchor.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XAnchorComponent extends XAnchorProperty implements OnInit, AfterViewInit, OnDestroy {\r\n @ViewChild('anchor', { static: true }) anchor!: ElementRef;\r\n @ViewChild('content', { static: true }) content!: ElementRef;\r\n hElements: HTMLElement[] = [];\r\n sliderData: XSliderNode[] = [];\r\n activatedIndex: number = 0;\r\n sliderHeight?: number;\r\n document: Document;\r\n private _scrolling = false;\r\n private _fontSize: number;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n @Inject(DOCUMENT) doc: any,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n this.document = doc;\r\n this._fontSize = parseFloat(computedStyle(this.document.documentElement, 'font-size'));\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n this.setSliderData();\r\n this.setHeight();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.setScroll();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n activatedChange(index: number) {\r\n if (XIsEmpty(this.hElements) || XIsUndefined(this.scroll)) return;\r\n\r\n this._scrolling = true;\r\n const hElement = this.hElements[index];\r\n let scrollTop = hElement.offsetTop - this.anchor.nativeElement.offsetTop - parseFloat(computedStyle(hElement, 'margin-top'));\r\n let maxScrollTop = this.scroll.scrollHeight - this.scroll.clientHeight;\r\n if (scrollTop > maxScrollTop) scrollTop = maxScrollTop;\r\n this.scrollTo(this.scroll, parseInt(`${scrollTop}`), 150);\r\n }\r\n\r\n private setClassMap() {\r\n this.classMap[`${XAnchorPrefix}-${this.layout}`] = !XIsEmpty(this.layout);\r\n }\r\n\r\n private setScroll() {\r\n fromEvent(this.scroll ? this.scroll : window, 'scroll')\r\n .pipe(throttleTime(10), takeUntil(this._unSubject))\r\n .subscribe(() => {\r\n if (this._scrolling) return;\r\n this.setActivatedByScroll();\r\n });\r\n if (!this.scroll) {\r\n this.scroll = this.document.documentElement;\r\n }\r\n }\r\n\r\n private setActivatedByScroll() {\r\n let now = 0;\r\n this.hElements.forEach((h, index) => {\r\n let distance = this.scroll.scrollTop + this.anchor.nativeElement.offsetTop;\r\n if (distance >= h.offsetTop) {\r\n now = index;\r\n return;\r\n }\r\n });\r\n this.activatedIndex = now;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n private setSliderData() {\r\n this.hElements = this.content.nativeElement.querySelectorAll(':scope> h1,:scope> h2,:scope> h3,:scope> h4,:scope> h5');\r\n if (this.hElements.length > 0) {\r\n let list: XAnchorNode[] = [];\r\n this.hElements.forEach((x: HTMLElement, i: number) => {\r\n const link = `x-anchor-${i}`;\r\n const left = this.setLeft(x);\r\n this.renderer.setAttribute(x, 'id', link);\r\n list = [\r\n ...list,\r\n {\r\n id: i,\r\n label: x.innerText,\r\n left: left,\r\n link: link\r\n }\r\n ];\r\n });\r\n console.log(list)\r\n this.sliderData = list;\r\n }\r\n }\r\n\r\n private setLeft(element: HTMLElement): number {\r\n const eles = ['H1', 'H2', 'H3', 'H4', 'H5'];\r\n const index = eles.indexOf(element.tagName);\r\n return index + 1;\r\n }\r\n\r\n private setHeight() {\r\n if (this.scroll) {\r\n let height = this.scroll.offsetHeight;\r\n let top = parseFloat(computedStyle(this.scroll, 'padding-top'));\r\n let borderTop = parseFloat(computedStyle(this.scroll, 'border-top'));\r\n let bottom = parseFloat(computedStyle(this.scroll, 'padding-bottom'));\r\n let borderBottom = parseFloat(computedStyle(this.scroll, 'border-bottom'));\r\n this.sliderHeight = height - top - bottom - borderTop - borderBottom - this.getTop();\r\n }\r\n }\r\n\r\n private getTop() {\r\n if (this.affixTop === '0') return 0;\r\n if (XIsNumber(this.affixTop)) return Number(this.affixTop);\r\n else if (this.affixTop.indexOf('rem') !== -1) return Number(this.affixTop.replace(/rem/g, '')) * this._fontSize;\r\n else if (this.affixTop.indexOf('px') !== -1) return Number(this.affixTop.replace(/px/g, ''));\r\n return 0;\r\n }\r\n\r\n private scrollTo(element: HTMLElement, to: number, duration: number) {\r\n const difference = to - element.scrollTop;\r\n const perTick = (difference / duration) * 10;\r\n reqAnimFrame(() => {\r\n element.scrollTop = element.scrollTop + perTick;\r\n if (element.scrollTop === to || duration <= 0) {\r\n setTimeout(() => (this._scrolling = false), 20);\r\n return;\r\n } else {\r\n this.scrollTo(element, to, duration - 10);\r\n }\r\n });\r\n }\r\n}\r\n","<div #anchor class=\"x-anchor\" [ngClass]=\"classMap\">\r\n <div #content class=\"x-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <x-affix class=\"x-anchor-affix\" [top]=\"affixTop\">\r\n <div class=\"x-anchor-slider\" [style.height.px]=\"sliderHeight\">\r\n <x-slider\r\n [data]=\"sliderData\"\r\n layout=\"column\"\r\n [activatedIndex]=\"activatedIndex\"\r\n [nodeJustify]=\"justify\"\r\n [nodeTpl]=\"sliderNodeTpl\"\r\n [showAnchor]=\"true\"\r\n (indexChange)=\"activatedChange($event)\"\r\n ></x-slider>\r\n </div>\r\n </x-affix>\r\n</div>\r\n\r\n<ng-template #sliderNodeTpl let-node=\"$node\">\r\n <span [style.padding-left.rem]=\"node.left - 1\">{{ node.label }}</span>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XAnchorComponent } from './anchor.component';\r\nimport { XAffixModule } from '@ng-nest/ui/affix';\r\nimport { XSliderModule } from '@ng-nest/ui/slider';\r\nimport { XAnchorProperty } from './anchor.property';\r\n\r\n@NgModule({\r\n declarations: [XAnchorComponent, XAnchorProperty],\r\n exports: [XAnchorComponent],\r\n imports: [CommonModule, XAffixModule, XSliderModule]\r\n})\r\nexport class XAnchorModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AAEG,MAAO,eAAgB,SAAQ,SAAS,CAAA;;+HAAjC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,qKADL,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAW2B,UAAA,CAAA;AAAxC,IAAA,WAAW,CAAS,aAAa,EAAE,GAAG,CAAC;CAAmB,EAA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EAAA,aAAa,EAFd,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAExC,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;oBACjD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;iBACrD,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-anchor.mjs","sources":["../../../../lib/ng-nest/ui/anchor/anchor.property.ts","../../../../lib/ng-nest/ui/anchor/anchor.component.ts","../../../../lib/ng-nest/ui/anchor/anchor.component.html","../../../../lib/ng-nest/ui/anchor/anchor.module.ts","../../../../lib/ng-nest/ui/anchor/ng-nest-ui-anchor.ts"],"sourcesContent":["import { XIdentityProperty, XProperty, XJustify, XWithConfig, XPositionLeftRight } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\n\r\n/**\r\n * Anchor\r\n * @selector x-anchor\r\n * @decorator component\r\n */\r\nexport const XAnchorPrefix = 'x-anchor';\r\nconst X_CONFIG_NAME = 'anchor';\r\n\r\n/**\r\n * Anchor Property\r\n */\r\n@Component({ template: '' })\r\nexport class XAnchorProperty extends XProperty {\r\n /**\r\n * @zh_CN 滚动区域对象\r\n * @en_US Scroll area object\r\n */\r\n @Input() scroll!: HTMLElement;\r\n /**\r\n * @zh_CN 顶部距离\r\n * @en_US Top distance\r\n */\r\n @Input() @XWithConfig<string>(X_CONFIG_NAME, '0') affixTop!: string;\r\n /**\r\n * @zh_CN 导航相对内容位置\r\n * @en_US Navigation relative content position\r\n */\r\n @Input() @XWithConfig<XAnchorLayout>(X_CONFIG_NAME, 'right') layout!: XAnchorLayout;\r\n /**\r\n * @zh_CN 对齐方式\r\n * @en_US Alignment\r\n */\r\n @Input() @XWithConfig<XJustify>(X_CONFIG_NAME, 'start') justify!: XJustify;\r\n}\r\n\r\n/**\r\n * Anchor Node\r\n */\r\nexport interface XAnchorNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 左内边距,用来显示层级\r\n * @en_US Left inner margin, used to display hierarchy\r\n */\r\n left?: number;\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 Anchor link\r\n */\r\n link?: string;\r\n}\r\n\r\n/**\r\n * @zh_CN 布局方式,相对内容的位置\r\n * @en_US Layout method, relative content position\r\n */\r\nexport type XAnchorLayout = XPositionLeftRight;\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n AfterViewInit,\r\n Inject,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XAnchorPrefix, XAnchorNode, XAnchorProperty } from './anchor.property';\r\nimport { computedStyle, XIsEmpty, reqAnimFrame, XIsNumber, XIsUndefined, XConfigService } from '@ng-nest/ui/core';\r\nimport { XSliderNode } from '@ng-nest/ui/slider';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { throttleTime, takeUntil } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XAnchorPrefix}`,\r\n templateUrl: './anchor.component.html',\r\n styleUrls: ['./anchor.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XAnchorComponent extends XAnchorProperty implements OnInit, AfterViewInit, OnDestroy {\r\n @ViewChild('anchor', { static: true }) anchor!: ElementRef;\r\n @ViewChild('content', { static: true }) content!: ElementRef;\r\n hElements: HTMLElement[] = [];\r\n sliderData: XSliderNode[] = [];\r\n activatedIndex: number = 0;\r\n sliderHeight?: number;\r\n document: Document;\r\n private _scrolling = false;\r\n private _fontSize: number;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n @Inject(DOCUMENT) doc: any,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n this.document = doc;\r\n this._fontSize = parseFloat(computedStyle(this.document.documentElement, 'font-size'));\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n this.setSliderData();\r\n this.setHeight();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.setScroll();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n activatedChange(index: number) {\r\n if (XIsEmpty(this.hElements) || XIsUndefined(this.scroll)) return;\r\n\r\n this._scrolling = true;\r\n const hElement = this.hElements[index];\r\n let scrollTop = hElement.offsetTop - this.anchor.nativeElement.offsetTop - parseFloat(computedStyle(hElement, 'margin-top'));\r\n let maxScrollTop = this.scroll.scrollHeight - this.scroll.clientHeight;\r\n if (scrollTop > maxScrollTop) scrollTop = maxScrollTop;\r\n this.scrollTo(this.scroll, parseInt(`${scrollTop}`), 150);\r\n }\r\n\r\n private setClassMap() {\r\n this.classMap[`${XAnchorPrefix}-${this.layout}`] = !XIsEmpty(this.layout);\r\n }\r\n\r\n private setScroll() {\r\n fromEvent(this.scroll ? this.scroll : window, 'scroll')\r\n .pipe(throttleTime(10), takeUntil(this._unSubject))\r\n .subscribe(() => {\r\n if (this._scrolling) return;\r\n this.setActivatedByScroll();\r\n });\r\n if (!this.scroll) {\r\n this.scroll = this.document.documentElement;\r\n }\r\n }\r\n\r\n private setActivatedByScroll() {\r\n let now = 0;\r\n this.hElements.forEach((h, index) => {\r\n let distance = this.scroll.scrollTop + this.anchor.nativeElement.offsetTop;\r\n if (distance >= h.offsetTop) {\r\n now = index;\r\n return;\r\n }\r\n });\r\n this.activatedIndex = now;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n private setSliderData() {\r\n this.hElements = this.content.nativeElement.querySelectorAll(':scope> h1,:scope> h2,:scope> h3,:scope> h4,:scope> h5');\r\n if (this.hElements.length > 0) {\r\n let list: XAnchorNode[] = [];\r\n this.hElements.forEach((x: HTMLElement, i: number) => {\r\n const link = `x-anchor-${i}`;\r\n const left = this.setLeft(x);\r\n this.renderer.setAttribute(x, 'id', link);\r\n list = [\r\n ...list,\r\n {\r\n id: i,\r\n label: x.innerText,\r\n left: left,\r\n link: link\r\n }\r\n ];\r\n });\r\n this.sliderData = list;\r\n }\r\n }\r\n\r\n private setLeft(element: HTMLElement): number {\r\n const eles = ['H1', 'H2', 'H3', 'H4', 'H5'];\r\n const index = eles.indexOf(element.tagName);\r\n return index + 1;\r\n }\r\n\r\n private setHeight() {\r\n if (this.scroll) {\r\n let height = this.scroll.offsetHeight;\r\n let top = parseFloat(computedStyle(this.scroll, 'padding-top'));\r\n let borderTop = parseFloat(computedStyle(this.scroll, 'border-top'));\r\n let bottom = parseFloat(computedStyle(this.scroll, 'padding-bottom'));\r\n let borderBottom = parseFloat(computedStyle(this.scroll, 'border-bottom'));\r\n this.sliderHeight = height - top - bottom - borderTop - borderBottom - this.getTop();\r\n }\r\n }\r\n\r\n private getTop() {\r\n if (this.affixTop === '0') return 0;\r\n if (XIsNumber(this.affixTop)) return Number(this.affixTop);\r\n else if (this.affixTop.indexOf('rem') !== -1) return Number(this.affixTop.replace(/rem/g, '')) * this._fontSize;\r\n else if (this.affixTop.indexOf('px') !== -1) return Number(this.affixTop.replace(/px/g, ''));\r\n return 0;\r\n }\r\n\r\n private scrollTo(element: HTMLElement, to: number, duration: number) {\r\n const difference = to - element.scrollTop;\r\n const perTick = (difference / duration) * 10;\r\n reqAnimFrame(() => {\r\n element.scrollTop = element.scrollTop + perTick;\r\n if (element.scrollTop === to || duration <= 0) {\r\n setTimeout(() => (this._scrolling = false), 20);\r\n return;\r\n } else {\r\n this.scrollTo(element, to, duration - 10);\r\n }\r\n });\r\n }\r\n}\r\n","<div #anchor class=\"x-anchor\" [ngClass]=\"classMap\">\r\n <div #content class=\"x-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <x-affix class=\"x-anchor-affix\" [top]=\"affixTop\">\r\n <div class=\"x-anchor-slider\" [style.height.px]=\"sliderHeight\">\r\n <x-slider\r\n [data]=\"sliderData\"\r\n layout=\"column\"\r\n [activatedIndex]=\"activatedIndex\"\r\n [nodeJustify]=\"justify\"\r\n [nodeTpl]=\"sliderNodeTpl\"\r\n [showAnchor]=\"true\"\r\n (indexChange)=\"activatedChange($event)\"\r\n ></x-slider>\r\n </div>\r\n </x-affix>\r\n</div>\r\n\r\n<ng-template #sliderNodeTpl let-node=\"$node\">\r\n <span [style.padding-left.rem]=\"node.left - 1\">{{ node.label }}</span>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XAnchorComponent } from './anchor.component';\r\nimport { XAffixModule } from '@ng-nest/ui/affix';\r\nimport { XSliderModule } from '@ng-nest/ui/slider';\r\nimport { XAnchorProperty } from './anchor.property';\r\n\r\n@NgModule({\r\n declarations: [XAnchorComponent, XAnchorProperty],\r\n exports: [XAnchorComponent],\r\n imports: [CommonModule, XAffixModule, XSliderModule]\r\n})\r\nexport class XAnchorModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AAEG,MAAO,eAAgB,SAAQ,SAAS,CAAA;;+HAAjC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QA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AA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAFd,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAExC,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;oBACjD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;iBACrD,CAAA;;;ACXD;;AAEG;;;;"}
@@ -45,3 +45,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
45
45
 
46
46
  export { XApiComponent, XApiModule, XApiPrefix };
47
47
  //# sourceMappingURL=ng-nest-ui-api.mjs.map
48
+ //# sourceMappingURL=ng-nest-ui-api.mjs.map
@@ -488,3 +488,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
488
488
 
489
489
  export { XAutoCompleteComponent, XAutoCompleteModule, XAutoCompletePortalComponent, XAutoCompletePortalPrefix, XAutoCompletePrefix, XAutoCompleteProperty };
490
490
  //# sourceMappingURL=ng-nest-ui-auto-complete.mjs.map
491
+ //# sourceMappingURL=ng-nest-ui-auto-complete.mjs.map
@@ -226,3 +226,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
226
226
 
227
227
  export { XAvatarComponent, XAvatarGroupComponent, XAvatarGroupPrefix, XAvatarGroupProperty, XAvatarModule, XAvatarPrefix, XAvatarProperty };
228
228
  //# sourceMappingURL=ng-nest-ui-avatar.mjs.map
229
+ //# sourceMappingURL=ng-nest-ui-avatar.mjs.map
@@ -182,3 +182,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
182
182
 
183
183
  export { XBackTopComponent, XBackTopModule, XBackTopPrefix, XBackTopProperty };
184
184
  //# sourceMappingURL=ng-nest-ui-back-top.mjs.map
185
+ //# sourceMappingURL=ng-nest-ui-back-top.mjs.map
@@ -149,3 +149,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
149
149
 
150
150
  export { XBadgeComponent, XBadgeModule, XBadgePrefix, XBadgeProperty };
151
151
  //# sourceMappingURL=ng-nest-ui-badge.mjs.map
152
+ //# sourceMappingURL=ng-nest-ui-badge.mjs.map
@@ -232,3 +232,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
232
232
 
233
233
  export { XBaseFormModule, XControlValueAccessor, XFormInputValidator, XFormProp, XValueAccessor };
234
234
  //# sourceMappingURL=ng-nest-ui-base-form.mjs.map
235
+ //# sourceMappingURL=ng-nest-ui-base-form.mjs.map
@@ -43,3 +43,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
43
43
 
44
44
  export { XBorderComponent, XBorderModule, XBorderPrefix };
45
45
  //# sourceMappingURL=ng-nest-ui-border.mjs.map
46
+ //# sourceMappingURL=ng-nest-ui-border.mjs.map
@@ -260,3 +260,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
260
260
 
261
261
  export { XButtonComponent, XButtonModule, XButtonPrefix, XButtonProperty, XButtonsComponent, XButtonsPrefix, XButtonsProperty };
262
262
  //# sourceMappingURL=ng-nest-ui-button.mjs.map
263
+ //# sourceMappingURL=ng-nest-ui-button.mjs.map
@@ -213,3 +213,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
213
213
 
214
214
  export { XCalendarComponent, XCalendarModule, XCalendarPrefix, XCalendarProperty };
215
215
  //# sourceMappingURL=ng-nest-ui-calendar.mjs.map
216
+ //# sourceMappingURL=ng-nest-ui-calendar.mjs.map
@@ -89,3 +89,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
89
89
 
90
90
  export { XCardComponent, XCardModule, XCardPrefix, XCardProperty };
91
91
  //# sourceMappingURL=ng-nest-ui-card.mjs.map
92
+ //# sourceMappingURL=ng-nest-ui-card.mjs.map
@@ -345,3 +345,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
345
345
 
346
346
  export { XCarouselComponent, XCarouselModule, XCarouselPanelComponent, XCarouselPanelPrefix, XCarouselPanelProperty, XCarouselPrefix, XCarouselProperty };
347
347
  //# sourceMappingURL=ng-nest-ui-carousel.mjs.map
348
+ //# sourceMappingURL=ng-nest-ui-carousel.mjs.map
@@ -453,3 +453,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
453
453
 
454
454
  export { XCascadeComponent, XCascadeModule, XCascadePortalComponent, XCascadePortalPrefix, XCascadePrefix, XCascadeProperty };
455
455
  //# sourceMappingURL=ng-nest-ui-cascade.mjs.map
456
+ //# sourceMappingURL=ng-nest-ui-cascade.mjs.map
@@ -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';
@@ -34,7 +34,7 @@ class XCheckboxProperty extends XControlValueAccessor {
34
34
  }
35
35
  }
36
36
  /** @nocollapse */ XCheckboxProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XCheckboxProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
37
- /** @nocollapse */ XCheckboxProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XCheckboxProperty, selector: "ng-component", inputs: { data: "data", button: "button", icon: "icon", indeterminate: "indeterminate", size: "size" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
37
+ /** @nocollapse */ XCheckboxProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XCheckboxProperty, selector: "ng-component", inputs: { data: "data", button: "button", icon: "icon", indeterminate: "indeterminate", size: "size", before: "before", after: "after" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
38
38
  __decorate([
39
39
  XDataConvert()
40
40
  ], XCheckboxProperty.prototype, "data", void 0);
@@ -63,6 +63,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
63
63
  type: Input
64
64
  }], size: [{
65
65
  type: Input
66
+ }], before: [{
67
+ type: Input
68
+ }], after: [{
69
+ type: Input
66
70
  }] } });
67
71
 
68
72
  class XCheckboxComponent extends XCheckboxProperty {
@@ -80,6 +84,12 @@ class XCheckboxComponent extends XCheckboxProperty {
80
84
  this.value = value;
81
85
  this.cdr.detectChanges();
82
86
  }
87
+ get beforeIsTemplate() {
88
+ return this.before instanceof TemplateRef;
89
+ }
90
+ get afterIsTemplate() {
91
+ return this.after instanceof TemplateRef;
92
+ }
83
93
  getDisabled(disabled) {
84
94
  return (this.disabled || disabled);
85
95
  }
@@ -144,10 +154,10 @@ class XCheckboxComponent extends XCheckboxProperty {
144
154
  }
145
155
  }
146
156
  /** @nocollapse */ XCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XCheckboxComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
147
- /** @nocollapse */ XCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XCheckboxComponent, selector: "x-checkbox", providers: [XValueAccessor(XCheckboxComponent)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\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-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-row\">\r\n <div\r\n class=\"x-checkbox-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-checkbox{margin:0;padding:0;width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>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-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-checkbox-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-checkbox-item:hover{color:var(--x-primary)}.x-checkbox-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-item:last-child{margin-right:0}.x-checkbox-item.x-indeterminate .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-item.x-indeterminate .x-checkbox-box:after{top:50%;left:50%;width:.5rem;height:.5rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.x-checkbox-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-item.x-checked .x-checkbox-box:after{border:.125rem solid var(--x-background-100);border-top:0;border-left:0;top:.3875rem;left:.1875rem;width:.3125rem;height:.625rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s;content:\" \"}.x-checkbox-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-item.x-disabled .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:1rem;height:1rem;border-radius:.0625rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:.125rem solid var(--x-background-a100);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .3s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-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-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.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 });
157
+ /** @nocollapse */ XCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XCheckboxComponent, selector: "x-checkbox", providers: [XValueAccessor(XCheckboxComponent)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\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-checkbox-button]=\"button\"\r\n [class.x-checkbox-icon]=\"icon\"\r\n [class.x-checkbox-after]=\"after\"\r\n [class.x-checkbox-before]=\"before\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-checkbox-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-checkbox-row\">\r\n <div class=\"x-checkbox-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-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-checkbox-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-checkbox{margin:0;padding:0;width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>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-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-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-checkbox-row .x-checkbox-row-before,.x-checkbox-row .x-checkbox-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-checkbox-row-list{position:relative;display:inline-flex;align-items:center}.x-checkbox-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-checkbox-row-item:hover{color:var(--x-primary)}.x-checkbox-row-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item:last-child{margin-right:0}.x-checkbox-row-item.x-indeterminate .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item.x-indeterminate .x-checkbox-box:after{top:50%;left:50%;width:.5rem;height:.5rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.x-checkbox-row-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-row-item.x-checked .x-checkbox-box:after{border:.125rem solid var(--x-background-100);border-top:0;border-left:0;top:.3875rem;left:.1875rem;width:.3125rem;height:.625rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s;content:\" \"}.x-checkbox-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-row-item.x-disabled .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox-row-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-button .x-checkbox-row-before,.x-checkbox-icon .x-checkbox-row-before{margin-right:0}.x-checkbox-button .x-checkbox-row-after,.x-checkbox-icon .x-checkbox-row-after{margin-left:0}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:1rem;height:1rem;border-radius:.0625rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:.125rem solid var(--x-background-a100);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .3s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-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-checkbox-before:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-before{margin-right:var(--x-padding-medium)}.x-checkbox-before.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-checkbox-before.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-before.x-checkbox-button .x-checkbox-row-before,.x-checkbox-before.x-checkbox-icon .x-checkbox-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-before-template .x-checkbox-row-before{display:contents}.x-checkbox-before-template .x-checkbox-row-list{margin-left:var(--x-padding-medium)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list{margin-left:0}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-after{margin-left:var(--x-padding-medium)}.x-checkbox-after.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-checkbox-after.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after.x-checkbox-button .x-checkbox-row-after,.x-checkbox-after.x-checkbox-icon .x-checkbox-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-after-template .x-checkbox-row-after{display:contents}.x-checkbox-after-template .x-checkbox-row-list{margin-right:var(--x-padding-medium)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list{margin-right:0}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.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 });
148
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XCheckboxComponent, decorators: [{
149
159
  type: Component,
150
- args: [{ selector: `${XCheckboxPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XCheckboxComponent)], template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\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-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-row\">\r\n <div\r\n class=\"x-checkbox-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-checkbox{margin:0;padding:0;width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>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-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-checkbox-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-checkbox-item:hover{color:var(--x-primary)}.x-checkbox-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-item:last-child{margin-right:0}.x-checkbox-item.x-indeterminate .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-item.x-indeterminate .x-checkbox-box:after{top:50%;left:50%;width:.5rem;height:.5rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.x-checkbox-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-item.x-checked .x-checkbox-box:after{border:.125rem solid var(--x-background-100);border-top:0;border-left:0;top:.3875rem;left:.1875rem;width:.3125rem;height:.625rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s;content:\" \"}.x-checkbox-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-item.x-disabled .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:1rem;height:1rem;border-radius:.0625rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:.125rem solid var(--x-background-a100);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .3s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-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-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.x-direction-column-reverse{align-items:inherit}\n"] }]
160
+ args: [{ selector: `${XCheckboxPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XCheckboxComponent)], template: "<div\r\n #checkbox\r\n class=\"x-checkbox\"\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-checkbox-button]=\"button\"\r\n [class.x-checkbox-icon]=\"icon\"\r\n [class.x-checkbox-after]=\"after\"\r\n [class.x-checkbox-before]=\"before\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-checkbox-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-checkbox-row\">\r\n <div class=\"x-checkbox-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-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-checkbox-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-checkbox{margin:0;padding:0;width:100%}.x-checkbox.x-flex{display:flex}.x-checkbox.x-justify-start{justify-content:flex-start}.x-checkbox.x-justify-center{justify-content:center}.x-checkbox.x-justify-end{justify-content:flex-end}.x-checkbox.x-justify-space-between{justify-content:space-between}.x-checkbox.x-justify-space-around{justify-content:space-around}.x-checkbox.x-align-start{align-items:flex-start}.x-checkbox.x-align-center{align-items:center}.x-checkbox.x-align-end{align-items:flex-end}.x-checkbox.x-direction-column{flex-direction:column}.x-checkbox.x-direction-column-reverse{flex-direction:column-reverse}.x-checkbox.x-direction-row{flex-direction:row}.x-checkbox.x-direction-row-reverse{flex-direction:row-reverse}.x-checkbox>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-checkbox>label.x-text-align-start{text-align:start}.x-checkbox>label.x-text-align-center{text-align:center}.x-checkbox>label.x-text-align-end{text-align:end}.x-checkbox-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-checkbox-row .x-checkbox-row-before,.x-checkbox-row .x-checkbox-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-checkbox-row-list{position:relative;display:inline-flex;align-items:center}.x-checkbox-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-checkbox-row-item:hover{color:var(--x-primary)}.x-checkbox-row-item:hover .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item:last-child{margin-right:0}.x-checkbox-row-item.x-indeterminate .x-checkbox-box{border-color:var(--x-primary)}.x-checkbox-row-item.x-indeterminate .x-checkbox-box:after{top:50%;left:50%;width:.5rem;height:.5rem;background-color:var(--x-primary);border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.x-checkbox-row-item.x-checked .x-checkbox-box{border-color:var(--x-primary);background-color:var(--x-primary)}.x-checkbox-row-item.x-checked .x-checkbox-box:after{border:.125rem solid var(--x-background-100);border-top:0;border-left:0;top:.3875rem;left:.1875rem;width:.3125rem;height:.625rem;transform:rotate(40deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s;content:\" \"}.x-checkbox-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-checkbox-row-item.x-disabled .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox-row-item.x-disabled .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox-button .x-checkbox-row-before,.x-checkbox-icon .x-checkbox-row-before{margin-right:0}.x-checkbox-button .x-checkbox-row-after,.x-checkbox-icon .x-checkbox-row-after{margin-left:0}.x-checkbox-box{border:var(--x-border-width) solid var(--x-border);width:1rem;height:1rem;border-radius:.0625rem;background-color:var(--x-background-a100);position:relative;display:inline-block;box-sizing:border-box;transition:all .3s}.x-checkbox-box:hover{border-color:var(--x-primary)}.x-checkbox-box:after{position:absolute;top:.35rem;left:.175rem;display:inline-block;width:.3rem;height:.6rem;border:.125rem solid var(--x-background-a100);border-top:0;border-left:0;transform:rotate(40deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .3s;content:\" \"}.x-checkbox-label{margin-left:.325rem;-webkit-user-select:none;user-select:none}.x-checkbox-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-checkbox-before:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-before{margin-right:var(--x-padding-medium)}.x-checkbox-before.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-checkbox-before.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-before.x-checkbox-button .x-checkbox-row-before,.x-checkbox-before.x-checkbox-icon .x-checkbox-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-before-template .x-checkbox-row-before{display:contents}.x-checkbox-before-template .x-checkbox-row-list{margin-left:var(--x-padding-medium)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list{margin-left:0}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input:focus,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:hover,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button:focus{z-index:1}.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-button .x-checkbox-row-before .x-button,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before input,.x-checkbox-before-template.x-checkbox-icon .x-checkbox-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after:not(.x-checkbox-before-template,.x-checkbox-button,.x-checkbox-icon) .x-checkbox-row-after{margin-left:var(--x-padding-medium)}.x-checkbox-after.x-checkbox-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-checkbox-after.x-checkbox-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-checkbox-after.x-checkbox-button .x-checkbox-row-after,.x-checkbox-after.x-checkbox-icon .x-checkbox-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox-after-template .x-checkbox-row-after{display:contents}.x-checkbox-after-template .x-checkbox-row-list{margin-right:var(--x-padding-medium)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list{margin-right:0}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-list .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-list .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input:focus,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:hover,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button:focus{z-index:1}.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-button .x-checkbox-row-after .x-button,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after input,.x-checkbox-after-template.x-checkbox-icon .x-checkbox-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-checkbox.x-disabled .x-checkbox-item{color:var(--x-text-400);cursor:not-allowed}.x-checkbox.x-disabled .x-checkbox-item.x-indeterminate .x-checkbox-box:after{background-color:var(--x-text-400)}.x-checkbox.x-disabled .x-checkbox-item.x-checked .x-checkbox-box:after{background-color:transparent}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-checkbox.x-disabled .x-checkbox-item .x-checkbox-box:after{border-color:var(--x-text-400);background-color:transparent}.x-checkbox.x-invalid>label,.x-checkbox.x-required>label{color:var(--x-danger)}.x-checkbox.x-direction-row>label{padding:0 .5rem 0 0}.x-checkbox.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-checkbox.x-direction-column,.x-checkbox.x-direction-column-reverse{align-items:inherit}\n"] }]
151
161
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; }, propDecorators: { checkbox: [{
152
162
  type: ViewChild,
153
163
  args: ['checkbox', { static: true }]
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-checkbox.mjs","sources":["../../../../lib/ng-nest/ui/checkbox/checkbox.property.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.html","../../../../lib/ng-nest/ui/checkbox/checkbox.module.ts","../../../../lib/ng-nest/ui/checkbox/ng-nest-ui-checkbox.ts"],"sourcesContent":["import { XData, XTemplate, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Checkbox\r\n * @selector x-checkbox\r\n * @decorator component\r\n */\r\nexport const XCheckboxPrefix = 'x-checkbox';\r\nconst X_CONFIG_NAME = 'checkbox';\r\n\r\n/**\r\n * Checkbox Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCheckboxProperty extends XControlValueAccessor<boolean | Array<any>> implements XCheckboxOption {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n @Input() @XDataConvert() data: XData<XCheckboxNode> = [];\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 Uncertain state style\r\n */\r\n @Input() @XInputBoolean() indeterminate?: 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\r\n/**\r\n * Checkbox Option\r\n * @undocument true\r\n */\r\nexport interface XCheckboxOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XCheckboxNode>;\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 Uncertain state style\r\n */\r\n indeterminate?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n}\r\n\r\n/**\r\n * @zh_CN Checkbox 数据对象\r\n * @en_US Checkbox data object\r\n */\r\nexport interface XCheckboxNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disable\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 * @zh_CN 标签文字\r\n * @en_US Label text\r\n */\r\n label?: XTemplate;\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 { XCheckboxPrefix, XCheckboxNode, XCheckboxProperty } from './checkbox.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService, XBoolean, XJustify, XAlign, XDirection } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XCheckboxPrefix}`,\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XCheckboxComponent)]\r\n})\r\nexport class XCheckboxComponent extends XCheckboxProperty implements OnChanges {\r\n @ViewChild('checkbox', { static: true }) checkbox!: ElementRef;\r\n\r\n override writeValue(value: boolean | Array<any>) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n getDisabled(disabled?: boolean) {\r\n return (this.disabled || disabled) as XBoolean;\r\n }\r\n\r\n nodes: XCheckboxNode[] = [];\r\n single: boolean = false;\r\n private _unSubject = new Subject<void>();\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.checkbox.nativeElement, this.renderer, this.justify as XJustify, this.align as XAlign, this.direction as XDirection);\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 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 checkboxClick(event: Event, node: XCheckboxNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled) return;\r\n this.formControlValidator();\r\n if (this.single) {\r\n this.value = !this.value;\r\n } else {\r\n this.value = (this.value as Array<any>) || [];\r\n let index = this.value.indexOf(node.id);\r\n if (index >= 0) {\r\n this.value.splice(index, 1);\r\n this.value = [...this.value];\r\n } else this.value = [...this.value, node.id];\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n getChecked(id: any): boolean {\r\n if (this.single) return this.value as boolean;\r\n else return Array.isArray(this.value) && this.value.includes(id);\r\n }\r\n\r\n private setData() {\r\n XSetData<XCheckboxNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.single = this.nodes.length === 1;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XCheckboxNode) {\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 #checkbox\r\n class=\"x-checkbox\"\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-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-row\">\r\n <div\r\n class=\"x-checkbox-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </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 { XCheckboxComponent } from './checkbox.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XCheckboxProperty } from './checkbox.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XCheckboxComponent, XCheckboxProperty],\r\n exports: [XCheckboxComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseFormModule]\r\n})\r\nexport class XCheckboxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,qBAA2C,CAAA;AADlF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;KAqB1D;;iIA1BY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,mBAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,mLADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAME,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;CAAiC,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK/B,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAmB,EAAA,iBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKlB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAiB,EAAA,iBAAA,CAAA,SAAA,EAAA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GjB,eAAe,EAAA,OAAA,EAAA,CAFhB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAEvE,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;oBACrD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAC;iBACpF,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-checkbox.mjs","sources":["../../../../lib/ng-nest/ui/checkbox/checkbox.property.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.ts","../../../../lib/ng-nest/ui/checkbox/checkbox.component.html","../../../../lib/ng-nest/ui/checkbox/checkbox.module.ts","../../../../lib/ng-nest/ui/checkbox/ng-nest-ui-checkbox.ts"],"sourcesContent":["import { XData, XTemplate, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Checkbox\r\n * @selector x-checkbox\r\n * @decorator component\r\n */\r\nexport const XCheckboxPrefix = 'x-checkbox';\r\nconst X_CONFIG_NAME = 'checkbox';\r\n\r\n/**\r\n * Checkbox Property\r\n */\r\n@Component({ template: '' })\r\nexport class XCheckboxProperty extends XControlValueAccessor<boolean | Array<any>> implements XCheckboxOption {\r\n /**\r\n * @zh_CN 多选框数据\r\n * @en_US Checkbox data\r\n */\r\n @Input() @XDataConvert() data: XData<XCheckboxNode> = [];\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 Uncertain state style\r\n */\r\n @Input() @XInputBoolean() indeterminate?: 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 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 * Checkbox Option\r\n * @undocument true\r\n */\r\nexport interface XCheckboxOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XCheckboxNode>;\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 Uncertain state style\r\n */\r\n indeterminate?: 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 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 Checkbox 数据对象\r\n * @en_US Checkbox data object\r\n */\r\nexport interface XCheckboxNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disable\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 * @zh_CN 标签文字\r\n * @en_US Label text\r\n */\r\n label?: XTemplate;\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 { XCheckboxPrefix, XCheckboxNode, XCheckboxProperty } from './checkbox.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService, XBoolean, XJustify, XAlign, XDirection } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XCheckboxPrefix}`,\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XCheckboxComponent)]\r\n})\r\nexport class XCheckboxComponent extends XCheckboxProperty implements OnChanges {\r\n @ViewChild('checkbox', { static: true }) checkbox!: ElementRef;\r\n\r\n override writeValue(value: boolean | Array<any>) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\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 getDisabled(disabled?: boolean) {\r\n return (this.disabled || disabled) as XBoolean;\r\n }\r\n\r\n nodes: XCheckboxNode[] = [];\r\n single: boolean = false;\r\n private _unSubject = new Subject<void>();\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.checkbox.nativeElement, this.renderer, this.justify as XJustify, this.align as XAlign, this.direction as XDirection);\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 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 checkboxClick(event: Event, node: XCheckboxNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled) return;\r\n this.formControlValidator();\r\n if (this.single) {\r\n this.value = !this.value;\r\n } else {\r\n this.value = (this.value as Array<any>) || [];\r\n let index = this.value.indexOf(node.id);\r\n if (index >= 0) {\r\n this.value.splice(index, 1);\r\n this.value = [...this.value];\r\n } else this.value = [...this.value, node.id];\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n getChecked(id: any): boolean {\r\n if (this.single) return this.value as boolean;\r\n else return Array.isArray(this.value) && this.value.includes(id);\r\n }\r\n\r\n private setData() {\r\n XSetData<XCheckboxNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.single = this.nodes.length === 1;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XCheckboxNode) {\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 #checkbox\r\n class=\"x-checkbox\"\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-checkbox-button]=\"button\"\r\n [class.x-checkbox-icon]=\"icon\"\r\n [class.x-checkbox-after]=\"after\"\r\n [class.x-checkbox-before]=\"before\"\r\n [class.x-checkbox-after-template]=\"afterIsTemplate\"\r\n [class.x-checkbox-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-checkbox-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-checkbox-row\">\r\n <div class=\"x-checkbox-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-checkbox-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 [title]=\"item.title\"\r\n [size]=\"size\"\r\n [activated]=\"getChecked(item.id)\"\r\n [disabled]=\"getDisabled(item.disabled)\"\r\n attrType=\"button\"\r\n (click)=\"checkboxClick($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-checkbox-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-checkbox-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"getChecked(item.id)\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n [class.x-indeterminate]=\"indeterminate\"\r\n (click)=\"checkboxClick($event, item)\"\r\n >\r\n <span class=\"x-checkbox-box\"></span>\r\n <span class=\"x-checkbox-label\">\r\n <ng-container *xOutlet=\"item.label; context: { $node: item }\">{{ item.label }}</ng-container>\r\n </span>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XCheckboxComponent } from './checkbox.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XCheckboxProperty } from './checkbox.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XCheckboxComponent, XCheckboxProperty],\r\n exports: [XCheckboxComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XOutletModule, XBaseFormModule]\r\n})\r\nexport class XCheckboxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG,aAAa;AAC5C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,qBAA2C,CAAA;AADlF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;KA+B1D;;iIApCY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,mBAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,qNADP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAME,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;CAAiC,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK/B,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAmB,EAAA,iBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKlB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAAiB,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKhB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAA0B,EAAA,iBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,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AAkB,EAAE,iBAAiB,aAE1C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,aADxE,kBAAkB,CAAA,EAAA,CAAA,CAAA;gIAGjB,eAAe,EAAA,OAAA,EAAA,CAFhB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAEvE,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;oBACrD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,CAAC;iBACpF,CAAA;;;ACbD;;AAEG;;;;"}
@@ -209,3 +209,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
209
209
 
210
210
  export { XCollapseComponent, XCollapseModule, XCollapsePanelComponent, XCollapsePanelPrefix, XCollapsePanelProperty, XCollapsePrefix, XCollapseProperty };
211
211
  //# sourceMappingURL=ng-nest-ui-collapse.mjs.map
212
+ //# sourceMappingURL=ng-nest-ui-collapse.mjs.map
@@ -685,3 +685,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
685
685
 
686
686
  export { XColorPickerComponent, XColorPickerModule, XColorPickerPortalComponent, XColorPickerPortalPrefix, XColorPickerPrefix, XColorPickerProperty };
687
687
  //# sourceMappingURL=ng-nest-ui-color-picker.mjs.map
688
+ //# sourceMappingURL=ng-nest-ui-color-picker.mjs.map
@@ -112,3 +112,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
112
112
 
113
113
  export { XAmounts, XColorComponent, XColorModule, XColorPrefix, XColorProperty };
114
114
  //# sourceMappingURL=ng-nest-ui-color.mjs.map
115
+ //# sourceMappingURL=ng-nest-ui-color.mjs.map
@@ -274,3 +274,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
274
274
 
275
275
  export { XCommentComponent, XCommentModule, XCommentPrefix, XCommentProperty, XCommentReplyComponent, XCommentReplyPrefix, XCommentReplyProperty };
276
276
  //# sourceMappingURL=ng-nest-ui-comment.mjs.map
277
+ //# sourceMappingURL=ng-nest-ui-comment.mjs.map
@@ -302,3 +302,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
302
302
 
303
303
  export { XAsideComponent, XAsidePrefix, XAsideProperty, XContainerComponent, XContainerModule, XContainerPrefix, XContainerProperty, XFooterComponent, XFooterPrefix, XFooterProperty, XHeaderComponent, XHeaderPrefix, XHeaderProperty, XMainComponent, XMainPrefix };
304
304
  //# sourceMappingURL=ng-nest-ui-container.mjs.map
305
+ //# sourceMappingURL=ng-nest-ui-container.mjs.map
@@ -1489,3 +1489,4 @@ function XWithConfig(componentName, innerDefaultValue) {
1489
1489
 
1490
1490
  export { XAddDays, XAddHours, XAddMinutes, XAddMonths, XAddSeconds, XAddYears, XBadgeAnimation, XBadgeStandaloneAnimation, XBaseAnimation, XClamp, XClearClass, XCloneDeep, XConfigService, XConnectAnimation, XConnectBaseAnimation, XDataConvert, XDrop, XDropAnimation, XDuration, XFadeAnimation, XGetChildren, XHasIn, XHttpService, XIdentity, XInputBoolean, XInputNumber, XInvertKeyValues, XIsArray, XIsBoolean, XIsChange, XIsDate, XIsEmpty, XIsFunction, XIsNull, XIsNumber, XIsObject, XIsObjectArray, XIsObservable, XIsRegExp, XIsString, XIsTemplateRef, XIsType, XIsUndefined, XIsValue, XIsValueArray, XIsXTemplate, XMoveAnimation, XMoveBoxAnimation, XOpacityAnimation, XOrderBy, XPreloadingStrategyService, XProperty, XRemove, XRepositoryAbstract, XRepositoryService, XResize, XReuseStrategyService, XSetData, XSlideAnimation, XSliderAnimation, XStorageService, XThemeService, XToBoolean, XToDataConvert, XToDate, XWithConfig, X_CONFIG, X_THEME, X_THEME_AMOUNTS, X_THEME_BACKGROUNDS, X_THEME_BLACK_MERGE, X_THEME_BORDERS, X_THEME_COLORS, X_THEME_COLOR_KEYS, X_THEME_DARK_COLORS, X_THEME_EXCHANGES, X_THEME_MERGE, X_THEME_PREFIX, X_THEME_TEXTS, chunk, computedStyle, fillDefault, groupBy, guid, isNil, isNotNil, mixColors, removeNgTag, reqAnimFrame, setFlex, stripTags, toHex, toRgb, warnIconTypeNotFound, warnSVGTagNotFound };
1491
1491
  //# sourceMappingURL=ng-nest-ui-core.mjs.map
1492
+ //# sourceMappingURL=ng-nest-ui-core.mjs.map
@@ -120,3 +120,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
120
120
 
121
121
  export { XCrumbComponent, XCrumbModule, XCrumbPrefix, XCrumbProperty };
122
122
  //# sourceMappingURL=ng-nest-ui-crumb.mjs.map
123
+ //# sourceMappingURL=ng-nest-ui-crumb.mjs.map
@@ -1736,3 +1736,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1736
1736
 
1737
1737
  export { XDatePickerComponent, XDatePickerModule, XDatePickerPortalComponent, XDatePickerPortalPrefix, XDatePickerPrefix, XDatePickerProperty, XDateRangeComponent, XDateRangePortalComponent, XDateRangePortalPrefix, XDateRangePrefix, XDateRangeProperty, XPickerDateComponent, XPickerDatePrefix, XPickerDateProperty, XPickerMonthComponent, XPickerMonthPrefix, XPickerMonthProperty, XPickerYearComponent, XPickerYearPrefix, XPickerYearProperty };
1738
1738
  //# sourceMappingURL=ng-nest-ui-date-picker.mjs.map
1739
+ //# sourceMappingURL=ng-nest-ui-date-picker.mjs.map
@@ -199,3 +199,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
199
199
 
200
200
  export { XDescriptionComponent, XDescriptionItemComponent, XDescriptionItemPrefix, XDescriptionItemProperty, XDescriptionModule, XDescriptionPrefix, XDescriptionProperty };
201
201
  //# sourceMappingURL=ng-nest-ui-description.mjs.map
202
+ //# sourceMappingURL=ng-nest-ui-description.mjs.map
@@ -1049,3 +1049,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1049
1049
 
1050
1050
  export { XDialogActionsDirective, XDialogCloseDirective, XDialogComponent, XDialogContainer, XDialogContainerComponent, XDialogContainerPrefix, XDialogContainerProperty, XDialogContentDirective, XDialogDragHandleDirective, XDialogFullscreenDirective, XDialogModule, XDialogPortalComponent, XDialogPrefix, XDialogProperty, XDialogRef, XDialogService, XDialogTitleDirective, X_DIALOG_CONFIG_NAME, X_DIALOG_CONTAINER, X_DIALOG_DATA };
1051
1051
  //# sourceMappingURL=ng-nest-ui-dialog.mjs.map
1052
+ //# sourceMappingURL=ng-nest-ui-dialog.mjs.map
@@ -43,3 +43,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
43
43
 
44
44
  export { XDocComponent, XDocModule, XDocPrefix };
45
45
  //# sourceMappingURL=ng-nest-ui-doc.mjs.map
46
+ //# sourceMappingURL=ng-nest-ui-doc.mjs.map
@@ -470,3 +470,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
470
470
 
471
471
  export { XDrawerCloseDirective, XDrawerComponent, XDrawerContainerComponent, XDrawerContainerPrefix, XDrawerContainerProperty, XDrawerContentDirective, XDrawerModule, XDrawerPortalComponent, XDrawerPrefix, XDrawerProperty, XDrawerRef, XDrawerService, XDrawerTitleDirective, X_DRAWER_CONFIG_NAME, X_DRAWER_CONTAINER, X_DRAWER_DATA };
472
472
  //# sourceMappingURL=ng-nest-ui-drawer.mjs.map
473
+ //# sourceMappingURL=ng-nest-ui-drawer.mjs.map
@@ -481,3 +481,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
481
481
 
482
482
  export { XDropdownComponent, XDropdownModule, XDropdownPortalComponent, XDropdownPortalPrefix, XDropdownPrefix, XDropdownProperty };
483
483
  //# sourceMappingURL=ng-nest-ui-dropdown.mjs.map
484
+ //# sourceMappingURL=ng-nest-ui-dropdown.mjs.map
@@ -83,3 +83,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
83
83
 
84
84
  export { XEmptyComponent, XEmptyModule, XEmptyPrefix, XEmptyProperty };
85
85
  //# sourceMappingURL=ng-nest-ui-empty.mjs.map
86
+ //# sourceMappingURL=ng-nest-ui-empty.mjs.map
@@ -43,3 +43,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
43
43
 
44
44
  export { XExamplesComponent, XExamplesModule, XExamplesPrefix };
45
45
  //# sourceMappingURL=ng-nest-ui-examples.mjs.map
46
+ //# sourceMappingURL=ng-nest-ui-examples.mjs.map
@@ -692,3 +692,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
692
692
 
693
693
  export { XFindComponent, XFindModule, XFindPrefix, XFindProperty };
694
694
  //# sourceMappingURL=ng-nest-ui-find.mjs.map
695
+ //# sourceMappingURL=ng-nest-ui-find.mjs.map
@@ -575,3 +575,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
575
575
 
576
576
  export { XAutoCompleteControl, XCascadeControl, XCheckboxControl, XColorPickerControl, XControl, XControlComponent, XControlPrefix, XControlProperty, XDatePickerControl, XFindControl, XFormComponent, XFormControl, XFormModule, XFormPrefix, XFormProperty, XInputControl, XInputNumberControl, XRadioControl, XRateControl, XSelectControl, XSliderSelectControl, XSwitchControl, XTextareaControl, XTimePickerControl };
577
577
  //# sourceMappingURL=ng-nest-ui-form.mjs.map
578
+ //# sourceMappingURL=ng-nest-ui-form.mjs.map
@@ -148,3 +148,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
148
148
 
149
149
  export { XHighlightComponent, XHighlightModule, XHighlightPrefix, XHighlightProperty };
150
150
  //# sourceMappingURL=ng-nest-ui-highlight.mjs.map
151
+ //# sourceMappingURL=ng-nest-ui-highlight.mjs.map
@@ -6223,3 +6223,4 @@ var zh_TW = {
6223
6223
 
6224
6224
  export { XI18nDirective, XI18nModule, XI18nPipe, XI18nPrefix, XI18nService, X_I18N, ar_EG, bg_BG, ca_ES, cs_CZ, da_DK, de_DE, el_GR, en_GB, en_US, es_ES, et_EE, fa_IR, fi_FI, fr_BE, fr_FR, he_IL, hi_IN, hr_HR, hu_HU, hy_AM, id_ID, is_IS, it_IT, ja_JP, ka_GE, kn_IN, ko_KR, ku_IQ, lv_LV, mn_MN, ms_MY, nb_NO, ne_NP, nl_BE, nl_NL, pl_PL, pt_BR, pt_PT, ro_RO, ru_RU, sk_SK, sl_SI, sr_RS, sv_SE, ta_IN, th_TH, tr_TR, uk_UA, vi_VN, zh_CN, zh_TW };
6225
6225
  //# sourceMappingURL=ng-nest-ui-i18n.mjs.map
6226
+ //# sourceMappingURL=ng-nest-ui-i18n.mjs.map