ngwr 7.2.0 → 8.0.0

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 (275) hide show
  1. package/README.md +8 -7
  2. package/alert/styles/_index.scss +44 -17
  3. package/avatar/styles/_index.scss +2 -2
  4. package/badge/styles/_index.scss +11 -7
  5. package/badge/styles/_tag.scss +1 -1
  6. package/bar-chart/styles/_index.scss +1 -2
  7. package/breadcrumbs/styles/_index.scss +4 -2
  8. package/burger/styles/_index.scss +2 -2
  9. package/button/styles/_index.scss +30 -20
  10. package/calendar/styles/_index.scss +11 -9
  11. package/calendar-heatmap/styles/_index.scss +2 -0
  12. package/card/styles/_index.scss +1 -1
  13. package/carousel/styles/_index.scss +3 -1
  14. package/cascader/styles/_index.scss +54 -14
  15. package/checkbox/styles/_index.scss +21 -4
  16. package/collapse/styles/_index.scss +1 -1
  17. package/color-picker/styles/_index.scss +18 -12
  18. package/command-palette/styles/_index.scss +3 -3
  19. package/compare/styles/_index.scss +3 -3
  20. package/context-menu/styles/_index.scss +1 -1
  21. package/date-picker/styles/_index.scss +5 -6
  22. package/density/styles/_index.scss +13 -3
  23. package/dialog/styles/_index.scss +3 -3
  24. package/divider/styles/_index.scss +1 -1
  25. package/drawer/styles/_index.scss +13 -11
  26. package/dropdown/styles/_index.scss +2 -2
  27. package/fesm2022/ngwr-affix.mjs +3 -3
  28. package/fesm2022/ngwr-alert.mjs +22 -10
  29. package/fesm2022/ngwr-alert.mjs.map +1 -1
  30. package/fesm2022/ngwr-anchor.mjs +3 -3
  31. package/fesm2022/ngwr-aurora.mjs +3 -3
  32. package/fesm2022/ngwr-avatar.mjs +3 -3
  33. package/fesm2022/ngwr-back-top.mjs +3 -3
  34. package/fesm2022/ngwr-badge.mjs +6 -6
  35. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  36. package/fesm2022/ngwr-blur-text.mjs +3 -3
  37. package/fesm2022/ngwr-border-glow.mjs +3 -3
  38. package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
  39. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  40. package/fesm2022/ngwr-burger.mjs +3 -3
  41. package/fesm2022/ngwr-button.mjs +6 -6
  42. package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
  43. package/fesm2022/ngwr-calendar.mjs +4 -4
  44. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  45. package/fesm2022/ngwr-card.mjs +10 -10
  46. package/fesm2022/ngwr-card.mjs.map +1 -1
  47. package/fesm2022/ngwr-carousel.mjs +50 -9
  48. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  49. package/fesm2022/ngwr-cascader.mjs +12 -35
  50. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  51. package/fesm2022/ngwr-checkbox.mjs +13 -30
  52. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  53. package/fesm2022/ngwr-circular-text.mjs +3 -3
  54. package/fesm2022/ngwr-click-spark.mjs +25 -6
  55. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  56. package/fesm2022/ngwr-clipboard.mjs +27 -6
  57. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  58. package/fesm2022/ngwr-collapse.mjs +9 -9
  59. package/fesm2022/ngwr-color-picker.mjs +7 -7
  60. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngwr-command-palette.mjs +3 -3
  62. package/fesm2022/ngwr-compare.mjs +3 -3
  63. package/fesm2022/ngwr-confetti.mjs +3 -3
  64. package/fesm2022/ngwr-context-menu.mjs +39 -15
  65. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  66. package/fesm2022/ngwr-cookie.mjs +3 -3
  67. package/fesm2022/ngwr-counter.mjs +12 -8
  68. package/fesm2022/ngwr-counter.mjs.map +1 -1
  69. package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
  70. package/fesm2022/ngwr-date-adapter-luxon.mjs +3 -3
  71. package/fesm2022/ngwr-date-adapter.mjs +3 -3
  72. package/fesm2022/ngwr-date-picker.mjs +25 -11
  73. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  74. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  75. package/fesm2022/ngwr-density.mjs +14 -14
  76. package/fesm2022/ngwr-density.mjs.map +1 -1
  77. package/fesm2022/ngwr-descriptions.mjs +6 -6
  78. package/fesm2022/ngwr-dialog.mjs +15 -15
  79. package/fesm2022/ngwr-directives.mjs +15 -87
  80. package/fesm2022/ngwr-directives.mjs.map +1 -1
  81. package/fesm2022/ngwr-divider.mjs +3 -3
  82. package/fesm2022/ngwr-donut-chart.mjs +10 -4
  83. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-drag-drop.mjs +18 -8
  85. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  86. package/fesm2022/ngwr-drawer.mjs +80 -19
  87. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  88. package/fesm2022/ngwr-dropdown.mjs +9 -9
  89. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  90. package/fesm2022/ngwr-empty.mjs +3 -3
  91. package/fesm2022/ngwr-falling-text.mjs +3 -3
  92. package/fesm2022/ngwr-file-upload.mjs +3 -3
  93. package/fesm2022/ngwr-form.mjs +9 -9
  94. package/fesm2022/ngwr-fuzzy-text.mjs +8 -7
  95. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  96. package/fesm2022/ngwr-gauge.mjs +3 -3
  97. package/fesm2022/ngwr-glitch-text.mjs +15 -7
  98. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  99. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  100. package/fesm2022/ngwr-hotkey.mjs +6 -6
  101. package/fesm2022/ngwr-i18n.mjs +9 -9
  102. package/fesm2022/ngwr-icon.mjs +3 -3
  103. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  104. package/fesm2022/ngwr-input-number.mjs +4 -4
  105. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  106. package/fesm2022/ngwr-input-otp.mjs +10 -4
  107. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  108. package/fesm2022/ngwr-input.mjs +25 -16
  109. package/fesm2022/ngwr-input.mjs.map +1 -1
  110. package/fesm2022/ngwr-keyboard.mjs +3 -3
  111. package/fesm2022/ngwr-knob.mjs +3 -3
  112. package/fesm2022/ngwr-layout.mjs +15 -15
  113. package/fesm2022/ngwr-lightbox.mjs +60 -5
  114. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  115. package/fesm2022/ngwr-line-chart.mjs +3 -3
  116. package/fesm2022/ngwr-list.mjs +7 -7
  117. package/fesm2022/ngwr-list.mjs.map +1 -1
  118. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  119. package/fesm2022/ngwr-marquee.mjs +3 -3
  120. package/fesm2022/ngwr-media.mjs +3 -3
  121. package/fesm2022/ngwr-mention.mjs +6 -6
  122. package/fesm2022/ngwr-meta.mjs +6 -6
  123. package/fesm2022/ngwr-meter-group.mjs +3 -3
  124. package/fesm2022/ngwr-overlay.mjs +3 -3
  125. package/fesm2022/ngwr-page-header.mjs +3 -3
  126. package/fesm2022/ngwr-pagination.mjs +14 -16
  127. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  128. package/fesm2022/ngwr-pipes.mjs +21 -21
  129. package/fesm2022/ngwr-platform.mjs +3 -3
  130. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  131. package/fesm2022/ngwr-popover.mjs +6 -6
  132. package/fesm2022/ngwr-progress.mjs +3 -3
  133. package/fesm2022/ngwr-qr.mjs +3 -3
  134. package/fesm2022/ngwr-radio.mjs +28 -26
  135. package/fesm2022/ngwr-radio.mjs.map +1 -1
  136. package/fesm2022/ngwr-rating.mjs +12 -23
  137. package/fesm2022/ngwr-rating.mjs.map +1 -1
  138. package/fesm2022/ngwr-result.mjs +12 -12
  139. package/fesm2022/ngwr-rotating-text.mjs +18 -7
  140. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  141. package/fesm2022/ngwr-scroll.mjs +3 -3
  142. package/fesm2022/ngwr-segmented.mjs +10 -22
  143. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  144. package/fesm2022/ngwr-select.mjs +26 -13
  145. package/fesm2022/ngwr-select.mjs.map +1 -1
  146. package/fesm2022/ngwr-shiny-text.mjs +6 -6
  147. package/fesm2022/ngwr-sidebar.mjs +3 -3
  148. package/fesm2022/ngwr-skeleton.mjs +3 -3
  149. package/fesm2022/ngwr-slider.mjs +3 -3
  150. package/fesm2022/ngwr-sparkline.mjs +3 -3
  151. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  152. package/fesm2022/ngwr-spinner.mjs +3 -3
  153. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  154. package/fesm2022/ngwr-split-text.mjs +3 -3
  155. package/fesm2022/ngwr-splitter.mjs +3 -3
  156. package/fesm2022/ngwr-spotlight-card.mjs +8 -8
  157. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  158. package/fesm2022/ngwr-squircle.mjs +6 -6
  159. package/fesm2022/ngwr-star-border.mjs +3 -3
  160. package/fesm2022/ngwr-statistic.mjs +79 -10
  161. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  162. package/fesm2022/ngwr-stepper.mjs +6 -6
  163. package/fesm2022/ngwr-storage.mjs +3 -3
  164. package/fesm2022/ngwr-switch.mjs +10 -14
  165. package/fesm2022/ngwr-switch.mjs.map +1 -1
  166. package/fesm2022/ngwr-table.mjs +20 -14
  167. package/fesm2022/ngwr-table.mjs.map +1 -1
  168. package/fesm2022/ngwr-tabs.mjs +45 -11
  169. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  170. package/fesm2022/ngwr-textarea.mjs +84 -25
  171. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  172. package/fesm2022/ngwr-theme.mjs +3 -3
  173. package/fesm2022/ngwr-tilt-card.mjs +6 -6
  174. package/fesm2022/ngwr-timeline.mjs +6 -6
  175. package/fesm2022/ngwr-toast.mjs +99 -25
  176. package/fesm2022/ngwr-toast.mjs.map +1 -1
  177. package/fesm2022/ngwr-toolbar.mjs +13 -6
  178. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  179. package/fesm2022/ngwr-tree.mjs +3 -3
  180. package/fesm2022/ngwr-typewriter.mjs +3 -3
  181. package/fesm2022/ngwr-typography.mjs +3 -3
  182. package/fesm2022/ngwr-validators.mjs +41 -3
  183. package/fesm2022/ngwr-validators.mjs.map +1 -1
  184. package/fesm2022/ngwr-version.mjs +1 -1
  185. package/fesm2022/ngwr-version.mjs.map +1 -1
  186. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  187. package/fesm2022/ngwr-waves.mjs +3 -3
  188. package/fesm2022/ngwr-window.mjs +12 -12
  189. package/file-upload/styles/_index.scss +3 -3
  190. package/form/styles/_index.scss +5 -5
  191. package/glitch-text/styles/_index.scss +3 -6
  192. package/image-cropper/styles/_index.scss +3 -3
  193. package/input/styles/_index.scss +26 -7
  194. package/input-otp/styles/_index.scss +23 -5
  195. package/keyboard/styles/_index.scss +6 -4
  196. package/knob/styles/_index.scss +1 -1
  197. package/lightbox/styles/_index.scss +31 -10
  198. package/list/styles/_index.scss +3 -3
  199. package/llms-full.txt +668 -0
  200. package/llms.txt +106 -0
  201. package/mention/styles/_index.scss +2 -2
  202. package/overlay/styles/_index.scss +1 -1
  203. package/package.json +1 -6
  204. package/pagination/styles/_index.scss +36 -25
  205. package/popconfirm/styles/_index.scss +1 -1
  206. package/popover/styles/_index.scss +2 -2
  207. package/radio/styles/_index.scss +20 -5
  208. package/rating/styles/_index.scss +12 -1
  209. package/schematics/migrations/v8/index.js +122 -0
  210. package/schematics/migrations.json +5 -0
  211. package/schematics/ng-add/index.js +3 -3
  212. package/schematics/ng-add/schema.json +6 -6
  213. package/schematics/provider/schema.json +1 -1
  214. package/schematics/use/symbol-map.json +11 -2
  215. package/segmented/styles/_index.scss +31 -8
  216. package/select/styles/_index.scss +73 -25
  217. package/sidebar/styles/_index.scss +3 -3
  218. package/slider/styles/_index.scss +5 -3
  219. package/speed-dial/styles/_index.scss +1 -0
  220. package/splitter/styles/_index.scss +7 -4
  221. package/spotlight-card/styles/_index.scss +8 -4
  222. package/stepper/styles/_index.scss +4 -4
  223. package/styles/_animations.scss +0 -23
  224. package/styles.scss +0 -1
  225. package/switch/styles/_index.scss +25 -6
  226. package/table/styles/_index.scss +69 -8
  227. package/tabs/styles/_index.scss +46 -3
  228. package/textarea/styles/_index.scss +59 -4
  229. package/theme/styles/_colors.scss +57 -0
  230. package/theme/styles/_dark.scss +22 -8
  231. package/theme/styles/_focus.scss +5 -0
  232. package/theme/styles/_variables.scss +24 -0
  233. package/timeline/styles/_index.scss +11 -2
  234. package/toast/styles/_index.scss +15 -5
  235. package/toolbar/styles/_index.scss +30 -1
  236. package/tree/styles/_index.scss +18 -17
  237. package/types/ngwr-alert.d.ts +16 -6
  238. package/types/ngwr-carousel.d.ts +8 -1
  239. package/types/ngwr-cascader.d.ts +5 -2
  240. package/types/ngwr-checkbox.d.ts +5 -2
  241. package/types/ngwr-click-spark.d.ts +13 -1
  242. package/types/ngwr-clipboard.d.ts +12 -1
  243. package/types/ngwr-context-menu.d.ts +20 -3
  244. package/types/ngwr-date-picker.d.ts +3 -0
  245. package/types/ngwr-density.d.ts +7 -7
  246. package/types/ngwr-directives.d.ts +17 -49
  247. package/types/ngwr-drag-drop.d.ts +13 -1
  248. package/types/ngwr-drawer.d.ts +11 -3
  249. package/types/ngwr-fuzzy-text.d.ts +1 -1
  250. package/types/ngwr-glitch-text.d.ts +9 -3
  251. package/types/ngwr-input-otp.d.ts +6 -2
  252. package/types/ngwr-input.d.ts +27 -13
  253. package/types/ngwr-lightbox.d.ts +14 -1
  254. package/types/ngwr-pagination.d.ts +10 -10
  255. package/types/ngwr-radio.d.ts +14 -3
  256. package/types/ngwr-rating.d.ts +5 -1
  257. package/types/ngwr-rotating-text.d.ts +1 -0
  258. package/types/ngwr-segmented.d.ts +5 -2
  259. package/types/ngwr-select.d.ts +6 -2
  260. package/types/ngwr-spotlight-card.d.ts +1 -1
  261. package/types/ngwr-statistic.d.ts +35 -1
  262. package/types/ngwr-switch.d.ts +5 -1
  263. package/types/ngwr-table.d.ts +7 -1
  264. package/types/ngwr-tabs.d.ts +6 -0
  265. package/types/ngwr-textarea.d.ts +25 -3
  266. package/types/ngwr-toast.d.ts +7 -1
  267. package/types/ngwr-toolbar.d.ts +7 -1
  268. package/types/ngwr-validators.d.ts +3 -1
  269. package/types/ngwr-version.d.ts +1 -1
  270. package/window/styles/_index.scss +8 -8
  271. package/fesm2022/ngwr-scramble-text.mjs +0 -165
  272. package/fesm2022/ngwr-scramble-text.mjs.map +0 -1
  273. package/scramble-text/scramble-text.scss +0 -1
  274. package/scramble-text/styles/_index.scss +0 -8
  275. package/types/ngwr-scramble-text.d.ts +0 -49
@@ -50,10 +50,10 @@ class WrDescriptions {
50
50
  return parts.join(' ');
51
51
  }, /* @ts-ignore */
52
52
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
53
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDescriptions, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: WrDescriptions, isStandalone: true, selector: "wr-descriptions", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "@if (title()) {\n <div class=\"wr-descriptions__title\">{{ title() }}</div>\n}\n<dl class=\"wr-descriptions__list\">\n <ng-content />\n</dl>\n", encapsulation: i0.ViewEncapsulation.None });
53
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDescriptions, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrDescriptions, isStandalone: true, selector: "wr-descriptions", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "@if (title()) {\n <div class=\"wr-descriptions__title\">{{ title() }}</div>\n}\n<dl class=\"wr-descriptions__list\">\n <ng-content />\n</dl>\n", encapsulation: i0.ViewEncapsulation.None });
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDescriptions, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDescriptions, decorators: [{
57
57
  type: Component,
58
58
  args: [{ selector: 'wr-descriptions', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "@if (title()) {\n <div class=\"wr-descriptions__title\">{{ title() }}</div>\n}\n<dl class=\"wr-descriptions__list\">\n <ng-content />\n</dl>\n" }]
59
59
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }] } });
@@ -71,10 +71,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
71
71
  class WrDescriptionItem {
72
72
  label = input('', /* @ts-ignore */
73
73
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
74
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDescriptionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: WrDescriptionItem, isStandalone: true, selector: "wr-description-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-descriptions__row" }, ngImport: i0, template: '<dt class="wr-descriptions__label">{{ label() }}</dt><dd class="wr-descriptions__value"><ng-content /></dd>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
74
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDescriptionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrDescriptionItem, isStandalone: true, selector: "wr-description-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-descriptions__row" }, ngImport: i0, template: '<dt class="wr-descriptions__label">{{ label() }}</dt><dd class="wr-descriptions__value"><ng-content /></dd>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDescriptionItem, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDescriptionItem, decorators: [{
78
78
  type: Component,
79
79
  args: [{
80
80
  selector: 'wr-description-item',
@@ -212,10 +212,10 @@ class WrDialog {
212
212
  }
213
213
  return dialogRef;
214
214
  }
215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialog, deps: [], target: i0.ɵɵFactoryTarget.Service });
216
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.2", ngImport: i0, type: WrDialog });
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialog, deps: [], target: i0.ɵɵFactoryTarget.Service });
216
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.4", ngImport: i0, type: WrDialog });
217
217
  }
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialog, decorators: [{
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialog, decorators: [{
219
219
  type: Service
220
220
  }] });
221
221
 
@@ -241,10 +241,10 @@ class WrDialogTitle {
241
241
  id = `wr-dialog-title-${++uid}`;
242
242
  /** @internal */
243
243
  elementRef = inject((ElementRef));
244
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
245
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: WrDialogTitle, isStandalone: true, selector: "[wrDialogTitle]", host: { properties: { "attr.id": "id" }, classAttribute: "wr-dialog__title" }, ngImport: i0 });
244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
245
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: WrDialogTitle, isStandalone: true, selector: "[wrDialogTitle]", host: { properties: { "attr.id": "id" }, classAttribute: "wr-dialog__title" }, ngImport: i0 });
246
246
  }
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogTitle, decorators: [{
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogTitle, decorators: [{
248
248
  type: Directive,
249
249
  args: [{
250
250
  selector: '[wrDialogTitle]',
@@ -267,10 +267,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
267
267
  * ```
268
268
  */
269
269
  class WrDialogContent {
270
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
271
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: WrDialogContent, isStandalone: true, selector: "[wrDialogContent]", host: { classAttribute: "wr-dialog__content" }, ngImport: i0 });
270
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
271
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: WrDialogContent, isStandalone: true, selector: "[wrDialogContent]", host: { classAttribute: "wr-dialog__content" }, ngImport: i0 });
272
272
  }
273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogContent, decorators: [{
273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogContent, decorators: [{
274
274
  type: Directive,
275
275
  args: [{
276
276
  selector: '[wrDialogContent]',
@@ -305,10 +305,10 @@ class WrDialogFooter {
305
305
  ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
306
306
  classes = computed(() => `wr-dialog__footer wr-dialog__footer--${this.align()}`, /* @ts-ignore */
307
307
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
308
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
309
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrDialogFooter, isStandalone: true, selector: "[wrDialogFooter]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
309
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrDialogFooter, isStandalone: true, selector: "[wrDialogFooter]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0 });
310
310
  }
311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogFooter, decorators: [{
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogFooter, decorators: [{
312
312
  type: Directive,
313
313
  args: [{
314
314
  selector: '[wrDialogFooter]',
@@ -343,10 +343,10 @@ class WrDialogClose {
343
343
  onClick() {
344
344
  this.ref?.close(this.result());
345
345
  }
346
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
347
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrDialogClose, isStandalone: true, selector: "[wrDialogClose]", inputs: { result: { classPropertyName: "result", publicName: "wrDialogClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
346
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
347
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrDialogClose, isStandalone: true, selector: "[wrDialogClose]", inputs: { result: { classPropertyName: "result", publicName: "wrDialogClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
348
348
  }
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDialogClose, decorators: [{
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDialogClose, decorators: [{
350
350
  type: Directive,
351
351
  args: [{
352
352
  selector: '[wrDialogClose]',
@@ -1,7 +1,7 @@
1
1
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { input, inject, ElementRef, afterNextRender, effect, Directive, afterEveryRender, output, NgZone, DestroyRef, signal, PLATFORM_ID } from '@angular/core';
4
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
3
+ import { input, inject, ElementRef, afterNextRender, effect, Directive, afterEveryRender, output, NgZone, DestroyRef } from '@angular/core';
4
+ import { DOCUMENT } from '@angular/common';
5
5
 
6
6
  /**
7
7
  * @license
@@ -35,10 +35,10 @@ class WrAutofocus {
35
35
  }
36
36
  });
37
37
  }
38
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrAutofocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
39
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrAutofocus, isStandalone: true, selector: "[wrAutofocus]", inputs: { wrAutofocus: { classPropertyName: "wrAutofocus", publicName: "wrAutofocus", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrAutofocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
39
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrAutofocus, isStandalone: true, selector: "[wrAutofocus]", inputs: { wrAutofocus: { classPropertyName: "wrAutofocus", publicName: "wrAutofocus", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrAutofocus, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrAutofocus, decorators: [{
42
42
  type: Directive,
43
43
  args: [{ selector: '[wrAutofocus]' }]
44
44
  }], ctorParameters: () => [], propDecorators: { wrAutofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrAutofocus", required: false }] }] } });
@@ -103,10 +103,10 @@ class WrAutosize {
103
103
  node.style.height = `${next}px`;
104
104
  node.style.overflowY = node.scrollHeight + border > max ? 'auto' : 'hidden';
105
105
  }
106
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrAutosize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
107
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrAutosize, isStandalone: true, selector: "textarea[wrAutosize]", inputs: { minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()" }, styleAttribute: "overflow: hidden; resize: none;" }, ngImport: i0 });
106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrAutosize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
107
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrAutosize, isStandalone: true, selector: "textarea[wrAutosize]", inputs: { minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()" }, styleAttribute: "overflow: hidden; resize: none;" }, ngImport: i0 });
108
108
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrAutosize, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrAutosize, decorators: [{
110
110
  type: Directive,
111
111
  args: [{
112
112
  selector: 'textarea[wrAutosize]',
@@ -151,10 +151,10 @@ class WrClickOutside {
151
151
  });
152
152
  });
153
153
  }
154
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrClickOutside, deps: [], target: i0.ɵɵFactoryTarget.Directive });
155
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: WrClickOutside, isStandalone: true, selector: "[wrClickOutside]", outputs: { wrClickOutside: "wrClickOutside" }, ngImport: i0 });
154
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrClickOutside, deps: [], target: i0.ɵɵFactoryTarget.Directive });
155
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: WrClickOutside, isStandalone: true, selector: "[wrClickOutside]", outputs: { wrClickOutside: "wrClickOutside" }, ngImport: i0 });
156
156
  }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrClickOutside, decorators: [{
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrClickOutside, decorators: [{
158
158
  type: Directive,
159
159
  args: [{ selector: '[wrClickOutside]' }]
160
160
  }], ctorParameters: () => [], propDecorators: { wrClickOutside: [{ type: i0.Output, args: ["wrClickOutside"] }] } });
@@ -227,89 +227,17 @@ class WrCopyToClipboard {
227
227
  this.doc.body.removeChild(node);
228
228
  }
229
229
  }
230
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrCopyToClipboard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
231
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrCopyToClipboard, isStandalone: true, selector: "[wrCopyToClipboard]", inputs: { wrCopyToClipboard: { classPropertyName: "wrCopyToClipboard", publicName: "wrCopyToClipboard", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { copied: "copied", copyFailed: "copyFailed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrCopyToClipboard, deps: [], target: i0.ɵɵFactoryTarget.Directive });
231
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrCopyToClipboard, isStandalone: true, selector: "[wrCopyToClipboard]", inputs: { wrCopyToClipboard: { classPropertyName: "wrCopyToClipboard", publicName: "wrCopyToClipboard", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { copied: "copied", copyFailed: "copyFailed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
232
232
  }
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrCopyToClipboard, decorators: [{
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrCopyToClipboard, decorators: [{
234
234
  type: Directive,
235
235
  args: [{ selector: '[wrCopyToClipboard]', host: { '(click)': 'onClick()' } }]
236
236
  }], propDecorators: { wrCopyToClipboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrCopyToClipboard", required: true }] }], copied: [{ type: i0.Output, args: ["copied"] }], copyFailed: [{ type: i0.Output, args: ["copyFailed"] }] } });
237
237
 
238
- /**
239
- * @license
240
- *
241
- * Use of this source code is governed by an MIT-style license that can be
242
- * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
243
- */
244
- /**
245
- * Reveal-on-scroll directive. Adds the `wr-reveal` host class
246
- * immediately and flips it to `wr-reveal--visible` once the element
247
- * enters the viewport — pair with the `.wr-reveal` styles in
248
- * `ngwr/animations` for a fade-and-slide-up enter.
249
- *
250
- * SSR-safe: on the server, the host renders in the visible state so
251
- * the page isn't blank.
252
- *
253
- * @example
254
- * ```html
255
- * <h2 wrReveal>Animates in once visible</h2>
256
- * <div wrReveal threshold="0.5" rootMargin="-100px 0px">…</div>
257
- * <p wrReveal [once]="false">Re-runs every time it enters the viewport</p>
258
- * ```
259
- */
260
- class WrReveal {
261
- /** Visibility threshold passed to IntersectionObserver. @default 0.1 */
262
- threshold = input(0.1, { ...(ngDevMode ? { debugName: "threshold" } : /* istanbul ignore next */ {}), transform: (v) => Math.min(1, Math.max(0, coerceNumberProperty(v, 0.1))) });
263
- /** `rootMargin` passed to IntersectionObserver. @default '0px' */
264
- rootMargin = input('0px', /* @ts-ignore */
265
- ...(ngDevMode ? [{ debugName: "rootMargin" }] : /* istanbul ignore next */ []));
266
- /** Stop observing after the first reveal. @default true */
267
- once = input(true, { ...(ngDevMode ? { debugName: "once" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
268
- visible = signal(false, /* @ts-ignore */
269
- ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
270
- el = inject(ElementRef);
271
- destroyRef = inject(DestroyRef);
272
- isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
273
- constructor() {
274
- if (!this.isBrowser) {
275
- // SSR: render in the visible state so nothing pops in on hydration.
276
- this.visible.set(true);
277
- return;
278
- }
279
- afterNextRender(() => {
280
- const observer = new IntersectionObserver(entries => {
281
- for (const entry of entries) {
282
- if (entry.isIntersecting) {
283
- this.visible.set(true);
284
- if (this.once())
285
- observer.disconnect();
286
- }
287
- else if (!this.once()) {
288
- this.visible.set(false);
289
- }
290
- }
291
- }, { threshold: this.threshold(), rootMargin: this.rootMargin() });
292
- observer.observe(this.el.nativeElement);
293
- this.destroyRef.onDestroy(() => observer.disconnect());
294
- });
295
- }
296
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrReveal, deps: [], target: i0.ɵɵFactoryTarget.Directive });
297
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: WrReveal, isStandalone: true, selector: "[wrReveal]", inputs: { threshold: { classPropertyName: "threshold", publicName: "threshold", isSignal: true, isRequired: false, transformFunction: null }, rootMargin: { classPropertyName: "rootMargin", publicName: "rootMargin", isSignal: true, isRequired: false, transformFunction: null }, once: { classPropertyName: "once", publicName: "once", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-reveal--visible": "visible()" }, classAttribute: "wr-reveal" }, ngImport: i0 });
298
- }
299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrReveal, decorators: [{
300
- type: Directive,
301
- args: [{
302
- selector: '[wrReveal]',
303
- host: {
304
- class: 'wr-reveal',
305
- '[class.wr-reveal--visible]': 'visible()',
306
- },
307
- }]
308
- }], ctorParameters: () => [], propDecorators: { threshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "threshold", required: false }] }], rootMargin: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootMargin", required: false }] }], once: [{ type: i0.Input, args: [{ isSignal: true, alias: "once", required: false }] }] } });
309
-
310
238
  /**
311
239
  * Generated bundle index. Do not edit.
312
240
  */
313
241
 
314
- export { WrAutofocus, WrAutosize, WrClickOutside, WrCopyToClipboard, WrReveal };
242
+ export { WrAutofocus, WrAutosize, WrClickOutside, WrCopyToClipboard };
315
243
  //# sourceMappingURL=ngwr-directives.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-directives.mjs","sources":["../../../projects/lib/directives/autofocus.ts","../../../projects/lib/directives/autosize.ts","../../../projects/lib/directives/click-outside.ts","../../../projects/lib/directives/copy-to-clipboard.ts","../../../projects/lib/directives/reveal.ts","../../../projects/lib/directives/ngwr-directives.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, afterNextRender, effect, inject, input } from '@angular/core';\n\n/**\n * Focus the host element after the first render — or whenever the bound\n * expression transitions to truthy.\n *\n * @example\n * ```html\n * <input wrAutofocus />\n * <input [wrAutofocus]=\"shouldFocus()\" />\n * ```\n */\n@Directive({ selector: '[wrAutofocus]' })\nexport class WrAutofocus {\n /** Truthy = focus. Defaults to `true` so bare `wrAutofocus` works. */\n readonly wrAutofocus = input(true, { transform: coerceBooleanProperty });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n afterNextRender(() => {\n if (this.wrAutofocus()) this.el.nativeElement.focus();\n });\n effect(() => {\n if (this.wrAutofocus()) {\n // Microtask defer so view updates that flip the expression land first.\n queueMicrotask(() => this.el.nativeElement.focus());\n }\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, afterEveryRender, effect, inject, input } from '@angular/core';\n\n/**\n * Auto-grow a `<textarea>` to fit its content. Optional `minRows` /\n * `maxRows` bounds the height in rendered rows.\n *\n * @example\n * ```html\n * <textarea wrAutosize minRows=\"2\" maxRows=\"8\" [(ngModel)]=\"text\"></textarea>\n * ```\n */\n@Directive({\n selector: 'textarea[wrAutosize]',\n host: { style: 'overflow: hidden; resize: none;', '(input)': 'onInput()' },\n})\nexport class WrAutosize {\n readonly minRows = input(1, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 1)) });\n readonly maxRows = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n\n private lastValue: string | null = null;\n\n constructor() {\n // Typing fires `input`, but `[(ngModel)]` / `setValue` write the value\n // without one — a cheap per-render value check catches both, including\n // the initial write that lands after the first render.\n afterEveryRender(() => {\n const value = this.el.nativeElement.value;\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.resize();\n }\n });\n // Resize when `minRows` / `maxRows` change.\n effect(() => {\n this.minRows();\n this.maxRows();\n this.resize();\n });\n }\n\n /** @internal */\n protected onInput(): void {\n this.lastValue = this.el.nativeElement.value;\n this.resize();\n }\n\n /** Recompute height from `scrollHeight`, clamped to min/max rows. */\n private resize(): void {\n const node = this.el.nativeElement;\n const styles = getComputedStyle(node);\n // `line-height: normal` computes to the literal string — derive the\n // row height from the font size instead of guessing a fixed 20px.\n const lineHeight = parseFloat(styles.lineHeight) || parseFloat(styles.fontSize) * 1.25 || 20;\n const paddingY = parseFloat(styles.paddingTop) + parseFloat(styles.paddingBottom);\n const border = (parseFloat(styles.borderTopWidth) || 0) + (parseFloat(styles.borderBottomWidth) || 0);\n\n // Reset to a single row first so `scrollHeight` shrinks as well as grows.\n node.style.height = 'auto';\n const min = this.minRows() * lineHeight + paddingY + border;\n const max = this.maxRows() > 0 ? this.maxRows() * lineHeight + paddingY + border : Infinity;\n const next = Math.min(Math.max(node.scrollHeight + border, min), max);\n node.style.height = `${next}px`;\n node.style.overflowY = node.scrollHeight + border > max ? 'auto' : 'hidden';\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, NgZone, inject, output } from '@angular/core';\n\n/**\n * Fires `(wrClickOutside)` when a pointer event lands outside the host\n * element. Useful for closing custom poppers / menus.\n *\n * @example\n * ```html\n * <div class=\"popup\" (wrClickOutside)=\"close()\"> … </div>\n * ```\n */\n@Directive({ selector: '[wrClickOutside]' })\nexport class WrClickOutside {\n readonly wrClickOutside = output<MouseEvent>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n // Listen outside Angular to avoid CD on every page click; re-enter\n // only when the event lands outside the host.\n this.zone.runOutsideAngular(() => {\n const handler = (event: MouseEvent): void => {\n const target = event.target as Node | null;\n if (target && !this.host.nativeElement.contains(target)) {\n this.zone.run(() => this.wrClickOutside.emit(event));\n }\n };\n this.doc.addEventListener('mousedown', handler, true);\n this.destroyRef.onDestroy(() => {\n this.doc.removeEventListener('mousedown', handler, true);\n });\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport { Directive, inject, input, output } from '@angular/core';\n\n/**\n * Copy `wrCopyToClipboard` to the system clipboard on host click.\n *\n * Uses `navigator.clipboard.writeText` when available, with a hidden\n * `<textarea>` + `document.execCommand('copy')` fallback for older browsers\n * and non-secure contexts.\n *\n * @example\n * ```html\n * <button [wrCopyToClipboard]=\"value\" (copied)=\"toast('Copied!')\">Copy</button>\n * ```\n */\n@Directive({ selector: '[wrCopyToClipboard]', host: { '(click)': 'onClick()' } })\nexport class WrCopyToClipboard {\n /** The text to copy. */\n readonly wrCopyToClipboard = input.required<string>();\n\n /** Emitted with the copied text once the write succeeds. */\n readonly copied = output<string>();\n\n /** Emitted if the copy fails (denied permission, no clipboard, …). */\n readonly copyFailed = output<unknown>();\n\n private readonly doc = inject(DOCUMENT);\n\n /** @internal */\n protected async onClick(): Promise<void> {\n const text = this.wrCopyToClipboard();\n try {\n if (this.doc.defaultView?.navigator?.clipboard) {\n await this.doc.defaultView.navigator.clipboard.writeText(text);\n } else {\n this.fallback(text);\n }\n this.copied.emit(text);\n } catch (error) {\n try {\n this.fallback(text);\n this.copied.emit(text);\n } catch (fallbackError) {\n this.copyFailed.emit(fallbackError ?? error);\n }\n }\n }\n\n /** Legacy clipboard write — hidden textarea + execCommand('copy'). */\n private fallback(text: string): void {\n const node = this.doc.createElement('textarea');\n node.value = text;\n node.setAttribute('readonly', '');\n node.style.position = 'fixed';\n node.style.top = '0';\n node.style.left = '0';\n node.style.opacity = '0';\n node.style.pointerEvents = 'none';\n this.doc.body.appendChild(node);\n node.select();\n try {\n this.doc.execCommand('copy');\n } finally {\n this.doc.body.removeChild(node);\n }\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, PLATFORM_ID, afterNextRender, inject, input, signal } from '@angular/core';\n\n/**\n * Reveal-on-scroll directive. Adds the `wr-reveal` host class\n * immediately and flips it to `wr-reveal--visible` once the element\n * enters the viewport — pair with the `.wr-reveal` styles in\n * `ngwr/animations` for a fade-and-slide-up enter.\n *\n * SSR-safe: on the server, the host renders in the visible state so\n * the page isn't blank.\n *\n * @example\n * ```html\n * <h2 wrReveal>Animates in once visible</h2>\n * <div wrReveal threshold=\"0.5\" rootMargin=\"-100px 0px\">…</div>\n * <p wrReveal [once]=\"false\">Re-runs every time it enters the viewport</p>\n * ```\n */\n@Directive({\n selector: '[wrReveal]',\n host: {\n class: 'wr-reveal',\n '[class.wr-reveal--visible]': 'visible()',\n },\n})\nexport class WrReveal {\n /** Visibility threshold passed to IntersectionObserver. @default 0.1 */\n readonly threshold = input(0.1, {\n transform: (v: unknown): number => Math.min(1, Math.max(0, coerceNumberProperty(v, 0.1))),\n });\n\n /** `rootMargin` passed to IntersectionObserver. @default '0px' */\n readonly rootMargin = input<string>('0px');\n\n /** Stop observing after the first reveal. @default true */\n readonly once = input(true, { transform: coerceBooleanProperty });\n\n protected readonly visible = signal(false);\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n if (!this.isBrowser) {\n // SSR: render in the visible state so nothing pops in on hydration.\n this.visible.set(true);\n return;\n }\n\n afterNextRender(() => {\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n this.visible.set(true);\n if (this.once()) observer.disconnect();\n } else if (!this.once()) {\n this.visible.set(false);\n }\n }\n },\n { threshold: this.threshold(), rootMargin: this.rootMargin() }\n );\n observer.observe(this.el.nativeElement);\n this.destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;AASG;MAEU,WAAW,CAAA;;IAEb,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEvD,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAEjE,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;YACnB,IAAI,IAAI,CAAC,WAAW,EAAE;AA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AA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,4BAA4B,EAAE,WAAW;AAC1C,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-directives.mjs","sources":["../../../projects/lib/directives/autofocus.ts","../../../projects/lib/directives/autosize.ts","../../../projects/lib/directives/click-outside.ts","../../../projects/lib/directives/copy-to-clipboard.ts","../../../projects/lib/directives/ngwr-directives.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, afterNextRender, effect, inject, input } from '@angular/core';\n\n/**\n * Focus the host element after the first render — or whenever the bound\n * expression transitions to truthy.\n *\n * @example\n * ```html\n * <input wrAutofocus />\n * <input [wrAutofocus]=\"shouldFocus()\" />\n * ```\n */\n@Directive({ selector: '[wrAutofocus]' })\nexport class WrAutofocus {\n /** Truthy = focus. Defaults to `true` so bare `wrAutofocus` works. */\n readonly wrAutofocus = input(true, { transform: coerceBooleanProperty });\n\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n afterNextRender(() => {\n if (this.wrAutofocus()) this.el.nativeElement.focus();\n });\n effect(() => {\n if (this.wrAutofocus()) {\n // Microtask defer so view updates that flip the expression land first.\n queueMicrotask(() => this.el.nativeElement.focus());\n }\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, afterEveryRender, effect, inject, input } from '@angular/core';\n\n/**\n * Auto-grow a `<textarea>` to fit its content. Optional `minRows` /\n * `maxRows` bounds the height in rendered rows.\n *\n * @example\n * ```html\n * <textarea wrAutosize minRows=\"2\" maxRows=\"8\" [(ngModel)]=\"text\"></textarea>\n * ```\n */\n@Directive({\n selector: 'textarea[wrAutosize]',\n host: { style: 'overflow: hidden; resize: none;', '(input)': 'onInput()' },\n})\nexport class WrAutosize {\n readonly minRows = input(1, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 1)) });\n readonly maxRows = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n\n private lastValue: string | null = null;\n\n constructor() {\n // Typing fires `input`, but `[(ngModel)]` / `setValue` write the value\n // without one — a cheap per-render value check catches both, including\n // the initial write that lands after the first render.\n afterEveryRender(() => {\n const value = this.el.nativeElement.value;\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.resize();\n }\n });\n // Resize when `minRows` / `maxRows` change.\n effect(() => {\n this.minRows();\n this.maxRows();\n this.resize();\n });\n }\n\n /** @internal */\n protected onInput(): void {\n this.lastValue = this.el.nativeElement.value;\n this.resize();\n }\n\n /** Recompute height from `scrollHeight`, clamped to min/max rows. */\n private resize(): void {\n const node = this.el.nativeElement;\n const styles = getComputedStyle(node);\n // `line-height: normal` computes to the literal string — derive the\n // row height from the font size instead of guessing a fixed 20px.\n const lineHeight = parseFloat(styles.lineHeight) || parseFloat(styles.fontSize) * 1.25 || 20;\n const paddingY = parseFloat(styles.paddingTop) + parseFloat(styles.paddingBottom);\n const border = (parseFloat(styles.borderTopWidth) || 0) + (parseFloat(styles.borderBottomWidth) || 0);\n\n // Reset to a single row first so `scrollHeight` shrinks as well as grows.\n node.style.height = 'auto';\n const min = this.minRows() * lineHeight + paddingY + border;\n const max = this.maxRows() > 0 ? this.maxRows() * lineHeight + paddingY + border : Infinity;\n const next = Math.min(Math.max(node.scrollHeight + border, min), max);\n node.style.height = `${next}px`;\n node.style.overflowY = node.scrollHeight + border > max ? 'auto' : 'hidden';\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, NgZone, inject, output } from '@angular/core';\n\n/**\n * Fires `(wrClickOutside)` when a pointer event lands outside the host\n * element. Useful for closing custom poppers / menus.\n *\n * @example\n * ```html\n * <div class=\"popup\" (wrClickOutside)=\"close()\"> … </div>\n * ```\n */\n@Directive({ selector: '[wrClickOutside]' })\nexport class WrClickOutside {\n readonly wrClickOutside = output<MouseEvent>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n // Listen outside Angular to avoid CD on every page click; re-enter\n // only when the event lands outside the host.\n this.zone.runOutsideAngular(() => {\n const handler = (event: MouseEvent): void => {\n const target = event.target as Node | null;\n if (target && !this.host.nativeElement.contains(target)) {\n this.zone.run(() => this.wrClickOutside.emit(event));\n }\n };\n this.doc.addEventListener('mousedown', handler, true);\n this.destroyRef.onDestroy(() => {\n this.doc.removeEventListener('mousedown', handler, true);\n });\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport { Directive, inject, input, output } from '@angular/core';\n\n/**\n * Copy `wrCopyToClipboard` to the system clipboard on host click.\n *\n * Uses `navigator.clipboard.writeText` when available, with a hidden\n * `<textarea>` + `document.execCommand('copy')` fallback for older browsers\n * and non-secure contexts.\n *\n * @example\n * ```html\n * <button [wrCopyToClipboard]=\"value\" (copied)=\"toast('Copied!')\">Copy</button>\n * ```\n */\n@Directive({ selector: '[wrCopyToClipboard]', host: { '(click)': 'onClick()' } })\nexport class WrCopyToClipboard {\n /** The text to copy. */\n readonly wrCopyToClipboard = input.required<string>();\n\n /** Emitted with the copied text once the write succeeds. */\n readonly copied = output<string>();\n\n /** Emitted if the copy fails (denied permission, no clipboard, …). */\n readonly copyFailed = output<unknown>();\n\n private readonly doc = inject(DOCUMENT);\n\n /** @internal */\n protected async onClick(): Promise<void> {\n const text = this.wrCopyToClipboard();\n try {\n if (this.doc.defaultView?.navigator?.clipboard) {\n await this.doc.defaultView.navigator.clipboard.writeText(text);\n } else {\n this.fallback(text);\n }\n this.copied.emit(text);\n } catch (error) {\n try {\n this.fallback(text);\n this.copied.emit(text);\n } catch (fallbackError) {\n this.copyFailed.emit(fallbackError ?? error);\n }\n }\n }\n\n /** Legacy clipboard write — hidden textarea + execCommand('copy'). */\n private fallback(text: string): void {\n const node = this.doc.createElement('textarea');\n node.value = text;\n node.setAttribute('readonly', '');\n node.style.position = 'fixed';\n node.style.top = '0';\n node.style.left = '0';\n node.style.opacity = '0';\n node.style.pointerEvents = 'none';\n this.doc.body.appendChild(node);\n node.select();\n try {\n this.doc.execCommand('copy');\n } finally {\n this.doc.body.removeChild(node);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;AASG;MAEU,WAAW,CAAA;;IAEb,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEvD,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAEjE,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;YACnB,IAAI,IAAI,CAAC,WAAW,EAAE;AAAE,gBAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;AACvD,QAAA,CAAC,CAAC;QACF,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;;AAEtB,gBAAA,cAAc,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC,aAAa,C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ignore */
65
65
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
66
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: WrDivider, isStandalone: true, selector: "wr-divider", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "classes()", "style.--wr-divider-width.px": "width()" } }, ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
66
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrDivider, isStandalone: true, selector: "wr-divider", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "classes()", "style.--wr-divider-width.px": "width()" } }, ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
68
68
  }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDivider, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDivider, decorators: [{
70
70
  type: Component,
71
71
  args: [{
72
72
  selector: 'wr-divider',
@@ -47,7 +47,13 @@ class WrDonutChart {
47
47
  ...(ngDevMode ? [{ debugName: "centerLabel" }] : /* istanbul ignore next */ []));
48
48
  // Drawn in a 100×100 viewBox.
49
49
  outerR = 50;
50
- innerR = computed(() => this.outerR * (1 - this.thickness() / 100), /* @ts-ignore */
50
+ innerR = computed(() => {
51
+ const thickness = this.thickness();
52
+ // 0 = solid pie: fill all the way to the center, not a zero-width ring.
53
+ if (thickness === 0)
54
+ return 0;
55
+ return this.outerR * (1 - thickness / 100);
56
+ }, /* @ts-ignore */
51
57
  ...(ngDevMode ? [{ debugName: "innerR" }] : /* istanbul ignore next */ []));
52
58
  total = computed(() => {
53
59
  const sum = this.segments().reduce((acc, s) => acc + Math.max(0, s.value), 0);
@@ -115,10 +121,10 @@ class WrDonutChart {
115
121
  'Z',
116
122
  ].join(' ');
117
123
  }
118
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDonutChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
119
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: WrDonutChart, isStandalone: true, selector: "wr-donut-chart", inputs: { segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-donut-chart" }, ngImport: i0, template: "<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <svg viewBox=\"0 0 100 100\" aria-hidden=\"true\">\n @for (slice of slices(); track $index) {\n <path [attr.d]=\"slice.path\" [attr.fill]=\"slice.color\" />\n }\n </svg>\n @if (centerValue() || centerLabel()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend()) {\n <ul class=\"wr-donut-chart__legend\">\n @for (slice of slices(); track $index) {\n <li class=\"wr-donut-chart__legend-item\">\n <span class=\"wr-donut-chart__swatch\" [style.background]=\"slice.color\"></span>\n <span class=\"wr-donut-chart__legend-label\">{{ slice.label }}</span>\n <span class=\"wr-donut-chart__legend-value\">{{ slice.value }}</span>\n </li>\n }\n </ul>\n}\n", encapsulation: i0.ViewEncapsulation.None });
124
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDonutChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
125
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrDonutChart, isStandalone: true, selector: "wr-donut-chart", inputs: { segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-donut-chart" }, ngImport: i0, template: "<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <svg viewBox=\"0 0 100 100\" aria-hidden=\"true\">\n @for (slice of slices(); track $index) {\n <path [attr.d]=\"slice.path\" [attr.fill]=\"slice.color\" />\n }\n </svg>\n @if (centerValue() || centerLabel()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend()) {\n <ul class=\"wr-donut-chart__legend\">\n @for (slice of slices(); track $index) {\n <li class=\"wr-donut-chart__legend-item\">\n <span class=\"wr-donut-chart__swatch\" [style.background]=\"slice.color\"></span>\n <span class=\"wr-donut-chart__legend-label\">{{ slice.label }}</span>\n <span class=\"wr-donut-chart__legend-value\">{{ slice.value }}</span>\n </li>\n }\n </ul>\n}\n", encapsulation: i0.ViewEncapsulation.None });
120
126
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDonutChart, decorators: [{
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDonutChart, decorators: [{
122
128
  type: Component,
123
129
  args: [{ selector: 'wr-donut-chart', encapsulation: ViewEncapsulation.None, host: { class: 'wr-donut-chart' }, template: "<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <svg viewBox=\"0 0 100 100\" aria-hidden=\"true\">\n @for (slice of slices(); track $index) {\n <path [attr.d]=\"slice.path\" [attr.fill]=\"slice.color\" />\n }\n </svg>\n @if (centerValue() || centerLabel()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend()) {\n <ul class=\"wr-donut-chart__legend\">\n @for (slice of slices(); track $index) {\n <li class=\"wr-donut-chart__legend-item\">\n <span class=\"wr-donut-chart__swatch\" [style.background]=\"slice.color\"></span>\n <span class=\"wr-donut-chart__legend-label\">{{ slice.label }}</span>\n <span class=\"wr-donut-chart__legend-value\">{{ slice.value }}</span>\n </li>\n }\n </ul>\n}\n" }]
124
130
  }], propDecorators: { segments: [{ type: i0.Input, args: [{ isSignal: true, alias: "segments", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], centerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerValue", required: false }] }], centerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerLabel", required: false }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-donut-chart.mjs","sources":["../../../projects/lib/donut-chart/donut-chart.ts","../../../projects/lib/donut-chart/donut-chart.html","../../../projects/lib/donut-chart/ngwr-donut-chart.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrDonutSegment } from './interfaces';\n\nconst FALLBACK_COLORS = [\n 'var(--wr-color-primary)',\n 'var(--wr-color-secondary)',\n 'var(--wr-color-success)',\n 'var(--wr-color-warning)',\n 'var(--wr-color-danger)',\n 'var(--wr-color-medium)',\n];\n\n/**\n * Donut chart. Set `thickness` to 0 for a solid pie. Optional center\n * text via inputs.\n *\n * @example\n * ```html\n * <wr-donut-chart [segments]=\"[\n * { label: 'Used', value: 60 },\n * { label: 'Free', value: 40 }\n * ]\" centerLabel=\"Disk\" centerValue=\"60%\" />\n * ```\n *\n * @see https://ngwr.dev/components/donut-chart\n */\n@Component({\n selector: 'wr-donut-chart',\n templateUrl: './donut-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-donut-chart' },\n})\nexport class WrDonutChart {\n readonly segments = input<readonly WrDonutSegment[]>([]);\n\n /** Diameter in CSS pixels. @default 200 */\n readonly size = input(200, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 200)) });\n\n /** Inner-ring thickness as a percent of radius (0–100). `0` = solid pie. @default 30 */\n readonly thickness = input(30, {\n transform: (v: unknown): number => Math.min(100, Math.max(0, coerceNumberProperty(v, 30))),\n });\n\n /** Show the legend under the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /** Bold value text in the center. */\n readonly centerValue = input<string>('');\n\n /** Smaller label under the value. */\n readonly centerLabel = input<string>('');\n\n // Drawn in a 100×100 viewBox.\n private readonly outerR = 50;\n\n protected readonly innerR = computed(() => this.outerR * (1 - this.thickness() / 100));\n\n protected readonly total = computed(() => {\n const sum = this.segments().reduce((acc, s) => acc + Math.max(0, s.value), 0);\n return sum > 0 ? sum : 1;\n });\n\n /** Resolved slices ready for the template — each carries its arc path. */\n protected readonly slices = computed(() => {\n const total = this.total();\n let cumulative = 0;\n return this.segments().map((s, i) => {\n const value = Math.max(0, s.value);\n const startAngle = (cumulative / total) * Math.PI * 2;\n cumulative += value;\n const endAngle = (cumulative / total) * Math.PI * 2;\n return {\n label: s.label,\n value,\n color: s.color ?? FALLBACK_COLORS[i % FALLBACK_COLORS.length],\n path: this.arcPath(startAngle, endAngle),\n percent: (value / total) * 100,\n };\n });\n });\n\n // Helpers\n\n /** SVG path for one donut slice using outer and inner arcs. */\n private arcPath(start: number, end: number): string {\n const cx = 50;\n const cy = 50;\n const ro = this.outerR;\n const ri = this.innerR();\n const sweep = end - start;\n if (sweep <= 0) return '';\n // Full-circle slice — two halves so the arc can render.\n if (sweep >= Math.PI * 2 - 1e-6) {\n const path = [\n `M ${cx + ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx - ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx + ro} ${cy}`,\n ];\n if (ri > 0) {\n path.push(`M ${cx + ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx - ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx + ri} ${cy}`);\n }\n return path.join(' ');\n }\n const largeArc = sweep > Math.PI ? 1 : 0;\n const sox = cx + ro * Math.cos(start);\n const soy = cy + ro * Math.sin(start);\n const eox = cx + ro * Math.cos(end);\n const eoy = cy + ro * Math.sin(end);\n if (ri === 0) {\n return `M ${cx} ${cy} L ${sox.toFixed(2)} ${soy.toFixed(2)} A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)} Z`;\n }\n const eix = cx + ri * Math.cos(end);\n const eiy = cy + ri * Math.sin(end);\n const six = cx + ri * Math.cos(start);\n const siy = cy + ri * Math.sin(start);\n return [\n `M ${sox.toFixed(2)} ${soy.toFixed(2)}`,\n `A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)}`,\n `L ${eix.toFixed(2)} ${eiy.toFixed(2)}`,\n `A ${ri} ${ri} 0 ${largeArc} 0 ${six.toFixed(2)} ${siy.toFixed(2)}`,\n 'Z',\n ].join(' ');\n }\n}\n\nexport type { WrDonutSegment } from './interfaces';\n","<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <svg viewBox=\"0 0 100 100\" aria-hidden=\"true\">\n @for (slice of slices(); track $index) {\n <path [attr.d]=\"slice.path\" [attr.fill]=\"slice.color\" />\n }\n </svg>\n @if (centerValue() || centerLabel()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend()) {\n <ul class=\"wr-donut-chart__legend\">\n @for (slice of slices(); track $index) {\n <li class=\"wr-donut-chart__legend-item\">\n <span class=\"wr-donut-chart__swatch\" [style.background]=\"slice.color\"></span>\n <span class=\"wr-donut-chart__legend-label\">{{ slice.label }}</span>\n <span class=\"wr-donut-chart__legend-value\">{{ slice.value }}</span>\n </li>\n }\n </ul>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAOH,MAAM,eAAe,GAAG;IACtB,yBAAyB;IACzB,2BAA2B;IAC3B,yBAAyB;IACzB,yBAAyB;IACzB,wBAAwB;IACxB,wBAAwB;CACzB;AAED;;;;;;;;;;;;;AAaG;MAOU,YAAY,CAAA;IACd,QAAQ,GAAG,KAAK,CAA4B,EAAE;iFAAC;;IAG/C,IAAI,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAA,CAAG;;AAGpG,IAAA,SAAS,GAAG,KAAK,CAAC,EAAE,iFAC3B,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAC1F;;IAGO,UAAU,GAAG,KAAK,CAAC,IAAI,kFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAG9D,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;;IAG/B,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;;IAGvB,MAAM,GAAG,EAAE;AAET,IAAA,MAAM,GAAG,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ts","../../../projects/lib/donut-chart/donut-chart.html","../../../projects/lib/donut-chart/ngwr-donut-chart.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrDonutSegment } from './interfaces';\n\nconst FALLBACK_COLORS = [\n 'var(--wr-color-primary)',\n 'var(--wr-color-secondary)',\n 'var(--wr-color-success)',\n 'var(--wr-color-warning)',\n 'var(--wr-color-danger)',\n 'var(--wr-color-medium)',\n];\n\n/**\n * Donut chart. Set `thickness` to 0 for a solid pie. Optional center\n * text via inputs.\n *\n * @example\n * ```html\n * <wr-donut-chart [segments]=\"[\n * { label: 'Used', value: 60 },\n * { label: 'Free', value: 40 }\n * ]\" centerLabel=\"Disk\" centerValue=\"60%\" />\n * ```\n *\n * @see https://ngwr.dev/components/donut-chart\n */\n@Component({\n selector: 'wr-donut-chart',\n templateUrl: './donut-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-donut-chart' },\n})\nexport class WrDonutChart {\n readonly segments = input<readonly WrDonutSegment[]>([]);\n\n /** Diameter in CSS pixels. @default 200 */\n readonly size = input(200, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 200)) });\n\n /** Inner-ring thickness as a percent of radius (0–100). `0` = solid pie. @default 30 */\n readonly thickness = input(30, {\n transform: (v: unknown): number => Math.min(100, Math.max(0, coerceNumberProperty(v, 30))),\n });\n\n /** Show the legend under the chart. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /** Bold value text in the center. */\n readonly centerValue = input<string>('');\n\n /** Smaller label under the value. */\n readonly centerLabel = input<string>('');\n\n // Drawn in a 100×100 viewBox.\n private readonly outerR = 50;\n\n protected readonly innerR = computed(() => {\n const thickness = this.thickness();\n // 0 = solid pie: fill all the way to the center, not a zero-width ring.\n if (thickness === 0) return 0;\n return this.outerR * (1 - thickness / 100);\n });\n\n protected readonly total = computed(() => {\n const sum = this.segments().reduce((acc, s) => acc + Math.max(0, s.value), 0);\n return sum > 0 ? sum : 1;\n });\n\n /** Resolved slices ready for the template — each carries its arc path. */\n protected readonly slices = computed(() => {\n const total = this.total();\n let cumulative = 0;\n return this.segments().map((s, i) => {\n const value = Math.max(0, s.value);\n const startAngle = (cumulative / total) * Math.PI * 2;\n cumulative += value;\n const endAngle = (cumulative / total) * Math.PI * 2;\n return {\n label: s.label,\n value,\n color: s.color ?? FALLBACK_COLORS[i % FALLBACK_COLORS.length],\n path: this.arcPath(startAngle, endAngle),\n percent: (value / total) * 100,\n };\n });\n });\n\n // Helpers\n\n /** SVG path for one donut slice using outer and inner arcs. */\n private arcPath(start: number, end: number): string {\n const cx = 50;\n const cy = 50;\n const ro = this.outerR;\n const ri = this.innerR();\n const sweep = end - start;\n if (sweep <= 0) return '';\n // Full-circle slice — two halves so the arc can render.\n if (sweep >= Math.PI * 2 - 1e-6) {\n const path = [\n `M ${cx + ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx - ro} ${cy}`,\n `A ${ro} ${ro} 0 1 1 ${cx + ro} ${cy}`,\n ];\n if (ri > 0) {\n path.push(`M ${cx + ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx - ri} ${cy}`, `A ${ri} ${ri} 0 1 0 ${cx + ri} ${cy}`);\n }\n return path.join(' ');\n }\n const largeArc = sweep > Math.PI ? 1 : 0;\n const sox = cx + ro * Math.cos(start);\n const soy = cy + ro * Math.sin(start);\n const eox = cx + ro * Math.cos(end);\n const eoy = cy + ro * Math.sin(end);\n if (ri === 0) {\n return `M ${cx} ${cy} L ${sox.toFixed(2)} ${soy.toFixed(2)} A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)} Z`;\n }\n const eix = cx + ri * Math.cos(end);\n const eiy = cy + ri * Math.sin(end);\n const six = cx + ri * Math.cos(start);\n const siy = cy + ri * Math.sin(start);\n return [\n `M ${sox.toFixed(2)} ${soy.toFixed(2)}`,\n `A ${ro} ${ro} 0 ${largeArc} 1 ${eox.toFixed(2)} ${eoy.toFixed(2)}`,\n `L ${eix.toFixed(2)} ${eiy.toFixed(2)}`,\n `A ${ri} ${ri} 0 ${largeArc} 0 ${six.toFixed(2)} ${siy.toFixed(2)}`,\n 'Z',\n ].join(' ');\n }\n}\n\nexport type { WrDonutSegment } from './interfaces';\n","<div class=\"wr-donut-chart__surface\" [style.width.px]=\"size()\">\n <svg viewBox=\"0 0 100 100\" aria-hidden=\"true\">\n @for (slice of slices(); track $index) {\n <path [attr.d]=\"slice.path\" [attr.fill]=\"slice.color\" />\n }\n </svg>\n @if (centerValue() || centerLabel()) {\n <div class=\"wr-donut-chart__center\">\n @if (centerValue()) {\n <div class=\"wr-donut-chart__center-value\">{{ centerValue() }}</div>\n }\n @if (centerLabel()) {\n <div class=\"wr-donut-chart__center-label\">{{ centerLabel() }}</div>\n }\n </div>\n }\n</div>\n\n@if (showLegend()) {\n <ul class=\"wr-donut-chart__legend\">\n @for (slice of slices(); track $index) {\n <li class=\"wr-donut-chart__legend-item\">\n <span class=\"wr-donut-chart__swatch\" [style.background]=\"slice.color\"></span>\n <span class=\"wr-donut-chart__legend-label\">{{ slice.label }}</span>\n <span class=\"wr-donut-chart__legend-value\">{{ slice.value }}</span>\n </li>\n }\n </ul>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAOH,MAAM,eAAe,GAAG;IACtB,yBAAyB;IACzB,2BAA2B;IAC3B,yBAAyB;IACzB,yBAAyB;IACzB,wBAAwB;IACxB,wBAAwB;CACzB;AAED;;;;;;;;;;;;;AAaG;MAOU,YAAY,CAAA;IACd,QAAQ,GAAG,KAAK,CAA4B,EAAE;iFAAC;;IAG/C,IAAI,GAAG,KAAK,CAA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I,EAAE,MAAM,QAAQ,CAAA,GAAA,EAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAE;YACnE,GAAG;AACJ,SAAA,CAAC,IAAI,CAAC,GAAG,CAAC;IACb;uGA/FW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,u5BCzCzB,mhCA6BA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDYa,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACE,gBAAgB,EAAA,aAAA,EAEX,iBAAiB,CAAC,IAAI,QAC/B,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAA,QAAA,EAAA,mhCAAA,EAAA;;;AEvCnC;;AAEG;;;;"}
@@ -46,6 +46,16 @@ class WrSortableList {
46
46
  /** Locked axis — restrict drag movement to one axis even diagonally. */
47
47
  lockAxis = input(undefined, /* @ts-ignore */
48
48
  ...(ngDevMode ? [{ debugName: "lockAxis" }] : /* istanbul ignore next */ []));
49
+ /**
50
+ * Delay (ms) before a drag begins after the pointer goes down. The touch
51
+ * delay is the fix for the classic CDK touch snag: without it, the
52
+ * `touch-action: none` CDK puts on each item blocks scrolling the list on a
53
+ * phone. With a small touch delay, a quick swipe scrolls and a brief hold
54
+ * starts the drag; mouse stays instant. Pass a single number to apply one
55
+ * delay to both pointers. @default { touch: 150, mouse: 0 }
56
+ */
57
+ dragStartDelay = input({ touch: 150, mouse: 0 }, /* @ts-ignore */
58
+ ...(ngDevMode ? [{ debugName: "dragStartDelay" }] : /* istanbul ignore next */ []));
49
59
  /** `trackBy` for the inner `@for`. Defaults to identity. */
50
60
  trackBy = input((_, item) => item, /* @ts-ignore */
51
61
  ...(ngDevMode ? [{ debugName: "trackBy" }] : /* istanbul ignore next */ []));
@@ -65,13 +75,13 @@ class WrSortableList {
65
75
  item: next[event.currentIndex],
66
76
  });
67
77
  }
68
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrSortableList, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: WrSortableList, isStandalone: true, selector: "wr-sortable-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lockAxis: { classPropertyName: "lockAxis", publicName: "lockAxis", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", reorder: "reorder" }, host: { classAttribute: "wr-sortable-list" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], ngImport: i0, template: "<div\n cdkDropList\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div cdkDrag class=\"wr-sortable-list__item\" [cdkDragDisabled]=\"disabled()\" [cdkDragLockAxis]=\"lockAxis() ?? null\">\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n", styles: [".wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-dark-rgb),.45);transition:color .15s ease}.wr-drag-handle:hover{color:var(--wr-color-dark)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview{box-sizing:border-box;color:var(--wr-color-dark);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.cdk-drag-placeholder{opacity:.35;background:rgba(var(--wr-color-light-rgb),.6);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-dark-rgb),.25);outline-offset:-1px}.cdk-drag-animating{transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrSortableList, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrSortableList, isStandalone: true, selector: "wr-sortable-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lockAxis: { classPropertyName: "lockAxis", publicName: "lockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragStartDelay: { classPropertyName: "dragStartDelay", publicName: "dragStartDelay", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", reorder: "reorder" }, host: { classAttribute: "wr-sortable-list" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], ngImport: i0, template: "<div\n cdkDropList\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n cdkDrag\n class=\"wr-sortable-list__item\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n", styles: [".wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-dark-rgb),.45);transition:color .15s ease}.wr-drag-handle:hover{color:var(--wr-color-dark)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview{box-sizing:border-box;color:var(--wr-color-dark);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.cdk-drag-placeholder{opacity:.35;background:rgba(var(--wr-color-light-rgb),.6);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-dark-rgb),.25);outline-offset:-1px}.cdk-drag-animating{transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
70
80
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrSortableList, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrSortableList, decorators: [{
72
82
  type: Component,
73
- args: [{ selector: 'wr-sortable-list', encapsulation: ViewEncapsulation.None, imports: [CdkDropList, CdkDrag, NgTemplateOutlet], host: { class: 'wr-sortable-list' }, template: "<div\n cdkDropList\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div cdkDrag class=\"wr-sortable-list__item\" [cdkDragDisabled]=\"disabled()\" [cdkDragLockAxis]=\"lockAxis() ?? null\">\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n", styles: [".wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-dark-rgb),.45);transition:color .15s ease}.wr-drag-handle:hover{color:var(--wr-color-dark)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview{box-sizing:border-box;color:var(--wr-color-dark);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.cdk-drag-placeholder{opacity:.35;background:rgba(var(--wr-color-light-rgb),.6);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-dark-rgb),.25);outline-offset:-1px}.cdk-drag-animating{transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}\n"] }]
74
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }, { type: i0.Output, args: ["itemsChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], lockAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAxis", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], reorder: [{ type: i0.Output, args: ["reorder"] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
83
+ args: [{ selector: 'wr-sortable-list', encapsulation: ViewEncapsulation.None, imports: [CdkDropList, CdkDrag, NgTemplateOutlet], host: { class: 'wr-sortable-list' }, template: "<div\n cdkDropList\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n cdkDrag\n class=\"wr-sortable-list__item\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n", styles: [".wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-dark-rgb),.45);transition:color .15s ease}.wr-drag-handle:hover{color:var(--wr-color-dark)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview{box-sizing:border-box;color:var(--wr-color-dark);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.cdk-drag-placeholder{opacity:.35;background:rgba(var(--wr-color-light-rgb),.6);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-dark-rgb),.25);outline-offset:-1px}.cdk-drag-animating{transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s cubic-bezier(.2,.9,.3,1.1)}\n"] }]
84
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }, { type: i0.Output, args: ["itemsChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], lockAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAxis", required: false }] }], dragStartDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragStartDelay", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], reorder: [{ type: i0.Output, args: ["reorder"] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
75
85
 
76
86
  /**
77
87
  * @license
@@ -97,10 +107,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
97
107
  * ```
98
108
  */
99
109
  class WrDragHandle {
100
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDragHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
101
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: WrDragHandle, isStandalone: true, selector: "[wrDragHandle]", host: { classAttribute: "wr-drag-handle" }, hostDirectives: [{ directive: i1.CdkDragHandle }], ngImport: i0 });
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDragHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
111
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: WrDragHandle, isStandalone: true, selector: "[wrDragHandle]", host: { classAttribute: "wr-drag-handle" }, hostDirectives: [{ directive: i1.CdkDragHandle }], ngImport: i0 });
102
112
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WrDragHandle, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrDragHandle, decorators: [{
104
114
  type: Directive,
105
115
  args: [{
106
116
  selector: '[wrDragHandle]',