@koobiq/components 21.0.0 → 21.0.1

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 (222) hide show
  1. package/fesm2022/koobiq-components-code-block.mjs +45 -17
  2. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  3. package/fesm2022/koobiq-components-core.mjs +1 -1
  4. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  5. package/fesm2022/koobiq-components-filter-bar.mjs +9 -5
  6. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  7. package/fesm2022/koobiq-components-icon.mjs +37 -16
  8. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  9. package/fesm2022/koobiq-components-tree-select.mjs +20 -5
  10. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  11. package/fesm2022/koobiq-components-tree.mjs +218 -83
  12. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  13. package/package.json +3 -3
  14. package/schematics/collection.json +94 -89
  15. package/schematics/migrations/accordion-state-saving-default/{index.js → index.cjs} +5 -4
  16. package/schematics/migrations/actions-panel-overlay-container/{index.js → index.cjs} +5 -4
  17. package/schematics/migrations/alert-signals/{index.js → index.cjs} +14 -13
  18. package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
  19. package/schematics/migrations/app-switcher-signals/{index.js → index.cjs} +7 -6
  20. package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
  21. package/schematics/migrations/autocomplete-signals/{index.js → index.cjs} +7 -6
  22. package/schematics/migrations/badge-signals/{index.js → index.cjs} +7 -6
  23. package/schematics/migrations/button-state-and-styles/{index.js → index.cjs} +7 -6
  24. package/schematics/migrations/button-supported-colors/{index.js → index.cjs} +7 -6
  25. package/schematics/migrations/button-toggle-signals-and-aria/{index.js → index.cjs} +7 -6
  26. package/schematics/migrations/button-truncation/{index.js → index.cjs} +7 -6
  27. package/schematics/migrations/checkbox-signals/{index.js → index.cjs} +9 -8
  28. package/schematics/migrations/clamped-text-disclosure/{index.js → index.cjs} +5 -4
  29. package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
  30. package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
  31. package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
  32. package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
  33. package/schematics/migrations/code-block-signals/{index.js → index.cjs} +7 -6
  34. package/schematics/migrations/color-signals/index.cjs +20 -0
  35. package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
  36. package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
  37. package/schematics/migrations/datepicker-signals/index.cjs +18 -0
  38. package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +8 -7
  39. package/schematics/migrations/design-tokens-v4/{index.js → index.cjs} +3 -2
  40. package/schematics/migrations/divider-signals-and-aria/{index.js → index.cjs} +5 -4
  41. package/schematics/migrations/dl-attribute-coercion/{index.js → index.cjs} +7 -6
  42. package/schematics/migrations/dl-standalone-names/{index.js → index.cjs} +11 -10
  43. package/schematics/migrations/dropdown-demote-overlay/{index.js → index.cjs} +7 -6
  44. package/schematics/migrations/dropdown-signals/index.cjs +20 -0
  45. package/schematics/migrations/empty-state-error-color/{index.js → index.cjs} +5 -4
  46. package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
  47. package/schematics/migrations/file-upload-cva-and-primitives/{index.js → index.cjs} +5 -4
  48. package/schematics/migrations/file-upload-deprecated-outputs/{index.js → index.cjs} +5 -4
  49. package/schematics/migrations/filter-bar-rename-action/{index.js → index.cjs} +5 -4
  50. package/schematics/migrations/filter-bar-signals/{index.js → index.cjs} +16 -15
  51. package/schematics/migrations/filter-bar-state-saving-default/{index.js → index.cjs} +5 -4
  52. package/schematics/migrations/flag-inner-html/{index.js → index.cjs} +5 -4
  53. package/schematics/migrations/form-field-signals/{index.js → index.cjs} +18 -17
  54. package/schematics/migrations/icon-semantics-and-api/{data.js → data.cjs} +4 -4
  55. package/schematics/migrations/icon-semantics-and-api/{index.js → index.cjs} +6 -5
  56. package/schematics/migrations/icons-replacement/{index.js → index.cjs} +4 -3
  57. package/schematics/migrations/inline-edit-a11y-and-types/{index.js → index.cjs} +5 -4
  58. package/schematics/migrations/input-number-surface/{index.js → index.cjs} +5 -4
  59. package/schematics/migrations/input-signals/index.cjs +18 -0
  60. package/schematics/migrations/link-deprecated-path/{index.js → index.cjs} +4 -3
  61. package/schematics/migrations/link-signals/{index.js → index.cjs} +5 -4
  62. package/schematics/migrations/list-signals/index.cjs +18 -0
  63. package/schematics/migrations/list-tree-multiple-input/{index.js → index.cjs} +7 -6
  64. package/schematics/migrations/loader-overlay-signals/{index.js → index.cjs} +7 -6
  65. package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
  66. package/schematics/migrations/locale-configuration-providers/{index.js → index.cjs} +5 -4
  67. package/schematics/migrations/mandatory-peer-dependencies/{index.js → index.cjs} +3 -2
  68. package/schematics/migrations/markdown-signals/{index.js → index.cjs} +7 -6
  69. package/schematics/migrations/modal-dialog-semantics/{index.js → index.cjs} +5 -4
  70. package/schematics/migrations/modal-signals/index.cjs +20 -0
  71. package/schematics/migrations/navbar-signals-and-aria/{index.js → index.cjs} +7 -6
  72. package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +8 -7
  73. package/schematics/migrations/notification-center-signals/{index.js → index.cjs} +5 -4
  74. package/schematics/migrations/option-signals/index.cjs +20 -0
  75. package/schematics/migrations/popover-leave-delay/{index.js → index.cjs} +5 -4
  76. package/schematics/migrations/progress-bar-percentage-and-aria/{index.js → index.cjs} +5 -4
  77. package/schematics/migrations/progress-spinner-signals/{index.js → index.cjs} +7 -6
  78. package/schematics/migrations/query-list-signals/index.cjs +18 -0
  79. package/schematics/migrations/radio-signals-and-aria/{index.js → index.cjs} +9 -8
  80. package/schematics/migrations/read-state-dwell-handlers/{index.js → index.cjs} +5 -4
  81. package/schematics/migrations/scrollbar-deprecated-path/{index.js → index.cjs} +4 -3
  82. package/schematics/migrations/select-signal-inputs/{index.js → index.cjs} +5 -4
  83. package/schematics/migrations/sidepanel-non-modal-behavior/{index.js → index.cjs} +5 -4
  84. package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
  85. package/schematics/migrations/split-button-optional-disabled/{index.js → index.cjs} +5 -4
  86. package/schematics/migrations/splitter-deprecated-path/{index.js → index.cjs} +4 -3
  87. package/schematics/migrations/state-saving-default/{index.js → index.cjs} +5 -4
  88. package/schematics/migrations/table-cell-content/{index.js → index.cjs} +5 -4
  89. package/schematics/migrations/tabs-signals-and-aria/{index.js → index.cjs} +5 -4
  90. package/schematics/migrations/tag-list-cleaner/{index.js → index.cjs} +7 -6
  91. package/schematics/migrations/tag-slots/{index.js → index.cjs} +6 -5
  92. package/schematics/migrations/tags-signals/{index.js → index.cjs} +7 -6
  93. package/schematics/migrations/textarea-signals/{index.js → index.cjs} +7 -6
  94. package/schematics/migrations/time-range-title-for/{index.js → index.cjs} +5 -4
  95. package/schematics/migrations/timepicker-signals/{index.js → index.cjs} +7 -6
  96. package/schematics/migrations/timezone-grouping-utils/{index.js → index.cjs} +5 -4
  97. package/schematics/migrations/title-encapsulation/{index.js → index.cjs} +5 -4
  98. package/schematics/migrations/toast-stack-and-defaults/{index.js → index.cjs} +5 -4
  99. package/schematics/migrations/tooltip-pointer-events-and-types/{index.js → index.cjs} +5 -4
  100. package/schematics/migrations/top-bar-container-selectors/{index.js → index.cjs} +5 -4
  101. package/schematics/migrations/tree-select-signals/{index.js → index.cjs} +5 -4
  102. package/schematics/migrations/tree-signals/{index.js → index.cjs} +5 -4
  103. package/schematics/migrations/tree-state-saving-default/{index.js → index.cjs} +5 -4
  104. package/schematics/migrations/username-pipe-injection/{index.js → index.cjs} +5 -4
  105. package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +7 -7
  106. package/schematics/migrations/v20-upgrade/index.cjs +19 -0
  107. package/schematics/migrations/v21-upgrade/{data.js → data.cjs} +22 -22
  108. package/schematics/migrations/v21-upgrade/{index.js → index.cjs} +11 -10
  109. package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
  110. package/schematics/migrations.json +87 -82
  111. package/schematics/ng-add/{index.js → index.cjs} +12 -286
  112. package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
  113. package/schematics/utils/{deprecated-path-migration.js → deprecated-path-migration.cjs} +4 -3
  114. package/schematics/utils/html-config.cjs +148 -0
  115. package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
  116. package/schematics/utils/list-item-pattern.cjs +16 -0
  117. package/schematics/utils/package-config.cjs +80 -0
  118. package/schematics/utils/project-files.cjs +25 -0
  119. package/schematics/utils/replacement-driver.cjs +337 -0
  120. package/schematics/utils/safe-rule.cjs +23 -0
  121. package/schematics/utils/signal-members-migration.cjs +779 -0
  122. package/schematics/utils/tag-patterns.cjs +21 -0
  123. package/schematics/utils/template-ref-access.cjs +155 -0
  124. package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
  125. package/schematics/utils/warn-only-migration.cjs +52 -0
  126. package/schematics/utils/workspace-styles.cjs +123 -0
  127. package/types/koobiq-components-code-block.d.ts +38 -11
  128. package/types/koobiq-components-filter-bar.d.ts +2 -2
  129. package/types/koobiq-components-tree-select.d.ts +11 -8
  130. package/types/koobiq-components-tree.d.ts +108 -59
  131. package/schematics/migrations/angular-animations-removal/index.js +0 -20
  132. package/schematics/migrations/color-signals/index.js +0 -19
  133. package/schematics/migrations/core-mixins-removal/index.js +0 -17
  134. package/schematics/migrations/datepicker-signals/index.js +0 -17
  135. package/schematics/migrations/dropdown-signals/index.js +0 -19
  136. package/schematics/migrations/input-signals/index.js +0 -17
  137. package/schematics/migrations/list-signals/index.js +0 -17
  138. package/schematics/migrations/modal-signals/index.js +0 -19
  139. package/schematics/migrations/option-signals/index.js +0 -19
  140. package/schematics/migrations/query-list-signals/index.js +0 -17
  141. package/schematics/migrations/signal-inputs-subclasses/index.js +0 -17
  142. package/schematics/migrations/v20-upgrade/index.js +0 -18
  143. package/schematics/migrations/zoneless-change-detection/index.js +0 -20
  144. package/schematics/utils/package-config.js +0 -13
  145. /package/schematics/migrations/accordion-state-saving-default/{data.js → data.cjs} +0 -0
  146. /package/schematics/migrations/actions-panel-overlay-container/{data.js → data.cjs} +0 -0
  147. /package/schematics/migrations/alert-signals/{data.js → data.cjs} +0 -0
  148. /package/schematics/migrations/angular-animations-removal/{data.js → data.cjs} +0 -0
  149. /package/schematics/migrations/app-switcher-signals/{data.js → data.cjs} +0 -0
  150. /package/schematics/migrations/autocomplete-signals/{data.js → data.cjs} +0 -0
  151. /package/schematics/migrations/badge-signals/{data.js → data.cjs} +0 -0
  152. /package/schematics/migrations/button-state-and-styles/{data.js → data.cjs} +0 -0
  153. /package/schematics/migrations/button-supported-colors/{data.js → data.cjs} +0 -0
  154. /package/schematics/migrations/button-toggle-signals-and-aria/{data.js → data.cjs} +0 -0
  155. /package/schematics/migrations/button-truncation/{data.js → data.cjs} +0 -0
  156. /package/schematics/migrations/checkbox-signals/{data.js → data.cjs} +0 -0
  157. /package/schematics/migrations/clamped-text-disclosure/{data.js → data.cjs} +0 -0
  158. /package/schematics/migrations/code-block-signals/{data.js → data.cjs} +0 -0
  159. /package/schematics/migrations/color-signals/{data.js → data.cjs} +0 -0
  160. /package/schematics/migrations/core-mixins-removal/{data.js → data.cjs} +0 -0
  161. /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
  162. /package/schematics/migrations/datepicker-signals/{data.js → data.cjs} +0 -0
  163. /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
  164. /package/schematics/migrations/divider-signals-and-aria/{data.js → data.cjs} +0 -0
  165. /package/schematics/migrations/dl-attribute-coercion/{data.js → data.cjs} +0 -0
  166. /package/schematics/migrations/dl-standalone-names/{data.js → data.cjs} +0 -0
  167. /package/schematics/migrations/dropdown-demote-overlay/{data.js → data.cjs} +0 -0
  168. /package/schematics/migrations/dropdown-signals/{data.js → data.cjs} +0 -0
  169. /package/schematics/migrations/empty-state-error-color/{data.js → data.cjs} +0 -0
  170. /package/schematics/migrations/file-upload-cva-and-primitives/{data.js → data.cjs} +0 -0
  171. /package/schematics/migrations/file-upload-deprecated-outputs/{data.js → data.cjs} +0 -0
  172. /package/schematics/migrations/filter-bar-rename-action/{data.js → data.cjs} +0 -0
  173. /package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +0 -0
  174. /package/schematics/migrations/filter-bar-state-saving-default/{data.js → data.cjs} +0 -0
  175. /package/schematics/migrations/flag-inner-html/{data.js → data.cjs} +0 -0
  176. /package/schematics/migrations/form-field-signals/{data.js → data.cjs} +0 -0
  177. /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
  178. /package/schematics/migrations/inline-edit-a11y-and-types/{data.js → data.cjs} +0 -0
  179. /package/schematics/migrations/input-number-surface/{data.js → data.cjs} +0 -0
  180. /package/schematics/migrations/input-signals/{data.js → data.cjs} +0 -0
  181. /package/schematics/migrations/link-signals/{data.js → data.cjs} +0 -0
  182. /package/schematics/migrations/list-signals/{data.js → data.cjs} +0 -0
  183. /package/schematics/migrations/list-tree-multiple-input/{data.js → data.cjs} +0 -0
  184. /package/schematics/migrations/loader-overlay-signals/{data.js → data.cjs} +0 -0
  185. /package/schematics/migrations/locale-configuration-providers/{data.js → data.cjs} +0 -0
  186. /package/schematics/migrations/markdown-signals/{data.js → data.cjs} +0 -0
  187. /package/schematics/migrations/modal-dialog-semantics/{data.js → data.cjs} +0 -0
  188. /package/schematics/migrations/modal-signals/{data.js → data.cjs} +0 -0
  189. /package/schematics/migrations/navbar-signals-and-aria/{data.js → data.cjs} +0 -0
  190. /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
  191. /package/schematics/migrations/notification-center-signals/{data.js → data.cjs} +0 -0
  192. /package/schematics/migrations/option-signals/{data.js → data.cjs} +0 -0
  193. /package/schematics/migrations/popover-leave-delay/{data.js → data.cjs} +0 -0
  194. /package/schematics/migrations/progress-bar-percentage-and-aria/{data.js → data.cjs} +0 -0
  195. /package/schematics/migrations/progress-spinner-signals/{data.js → data.cjs} +0 -0
  196. /package/schematics/migrations/query-list-signals/{data.js → data.cjs} +0 -0
  197. /package/schematics/migrations/radio-signals-and-aria/{data.js → data.cjs} +0 -0
  198. /package/schematics/migrations/read-state-dwell-handlers/{data.js → data.cjs} +0 -0
  199. /package/schematics/migrations/select-signal-inputs/{data.js → data.cjs} +0 -0
  200. /package/schematics/migrations/sidepanel-non-modal-behavior/{data.js → data.cjs} +0 -0
  201. /package/schematics/migrations/signal-inputs-subclasses/{data.js → data.cjs} +0 -0
  202. /package/schematics/migrations/split-button-optional-disabled/{data.js → data.cjs} +0 -0
  203. /package/schematics/migrations/state-saving-default/{data.js → data.cjs} +0 -0
  204. /package/schematics/migrations/table-cell-content/{data.js → data.cjs} +0 -0
  205. /package/schematics/migrations/tabs-signals-and-aria/{data.js → data.cjs} +0 -0
  206. /package/schematics/migrations/tag-list-cleaner/{data.js → data.cjs} +0 -0
  207. /package/schematics/migrations/tags-signals/{data.js → data.cjs} +0 -0
  208. /package/schematics/migrations/textarea-signals/{data.js → data.cjs} +0 -0
  209. /package/schematics/migrations/time-range-title-for/{data.js → data.cjs} +0 -0
  210. /package/schematics/migrations/timepicker-signals/{data.js → data.cjs} +0 -0
  211. /package/schematics/migrations/timezone-grouping-utils/{data.js → data.cjs} +0 -0
  212. /package/schematics/migrations/title-encapsulation/{data.js → data.cjs} +0 -0
  213. /package/schematics/migrations/toast-stack-and-defaults/{data.js → data.cjs} +0 -0
  214. /package/schematics/migrations/tooltip-pointer-events-and-types/{data.js → data.cjs} +0 -0
  215. /package/schematics/migrations/top-bar-container-selectors/{data.js → data.cjs} +0 -0
  216. /package/schematics/migrations/tree-select-signals/{data.js → data.cjs} +0 -0
  217. /package/schematics/migrations/tree-signals/{data.js → data.cjs} +0 -0
  218. /package/schematics/migrations/tree-state-saving-default/{data.js → data.cjs} +0 -0
  219. /package/schematics/migrations/username-pipe-injection/{data.js → data.cjs} +0 -0
  220. /package/schematics/migrations/zoneless-change-detection/{data.js → data.cjs} +0 -0
  221. /package/schematics/utils/{ast.js → ast.cjs} +0 -0
  222. /package/schematics/utils/{messages.js → messages.cjs} +0 -0
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ // RegExp sources the template rewrites of v20-upgrade and v21-upgrade build on. They live here rather than in a
4
+ // `data.ts`: v21-upgrade's `data.ts` imports every area module, so an area that read them from there would get
5
+ // `undefined` under CommonJS.
6
+ /**
7
+ * One step inside an opening tag: a quoted value is taken whole, so neither `>` nor an attribute-like word inside
8
+ * it counts.
9
+ */
10
+ const TAG_BODY = `(?:[^<>"']|"[^"]*"|'[^']*')`;
11
+ /**
12
+ * The start of an attribute on an opening `<kbq-code-block>` tag that does not bind `name` itself, captured as
13
+ * `$1` together with a `[` that opens a binding.
14
+ */
15
+ const codeBlockTagWithout = (name) => String.raw `(<kbq-code-block(?![\w-])(?!${TAG_BODY}*[\s\[]${name}[\]\s=/>])${TAG_BODY}*?\s\[?)`;
16
+ /** An opening `<kbq-code-block>` tag that binds both `first` and `second`. */
17
+ const codeBlockTagWith = (first, second) => String.raw `<kbq-code-block(?![\w-])(?=${TAG_BODY}*[\s\[]${first}[\]\s=/>])(?=${TAG_BODY}*[\s\[]${second}[\]\s=/>])`;
18
+
19
+ exports.TAG_BODY = TAG_BODY;
20
+ exports.codeBlockTagWith = codeBlockTagWith;
21
+ exports.codeBlockTagWithout = codeBlockTagWithout;
@@ -0,0 +1,155 @@
1
+ 'use strict';
2
+
3
+ var utils_ast = require('./ast.cjs');
4
+ var utils_signalMembersMigration = require('./signal-members-migration.cjs');
5
+ require('typescript');
6
+ require('./messages.cjs');
7
+ require('./package-config.cjs');
8
+ require('@angular-devkit/schematics');
9
+ require('@schematics/angular/utility');
10
+ require('./project-files.cjs');
11
+ require('./typescript.cjs');
12
+
13
+ /** A compound assignment (`+=`, `??=`, …) or a postfix `++` / `--` at the start of what follows an access. */
14
+ const COMPOUND_WRITE_AFTER = /^\s*(?:\+\+|--|(?:\*\*|>>>|<<|>>|&&|\|\||\?\?|[-+*/%&|^])=(?!=))/;
15
+ /** A prefix `++` / `--` at the end of what precedes an access. */
16
+ const INCREMENT_BEFORE = /(?:\+\+|--)\s*$/;
17
+ function escapeRegExp(value) {
18
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19
+ }
20
+ /** `<ref>.<member> =`, but not `==` / `===`: the lookbehind matches the one `memberAccessPattern` uses. */
21
+ function assignmentPattern(ref, members) {
22
+ const names = members.map(escapeRegExp).join('|');
23
+ return new RegExp(`(?<![\\w$.])(${escapeRegExp(ref)}\\s*\\.\\s*(${names}))\\b(\\s*=(?!=)\\s*)`, 'g');
24
+ }
25
+ /** `<ref>.<member>` in any form, the optional chain included. */
26
+ function anyAccessPattern(ref, members) {
27
+ return new RegExp(`(?<![\\w$.])${escapeRegExp(ref)}\\s*\\??\\.\\s*(${members.map(escapeRegExp).join('|')})\\b`, 'g');
28
+ }
29
+ /** End of the assigned expression that starts at `from`: the next top-level `;`, or the end of the statement list. */
30
+ function assignedExpressionEnd(template, from, limit) {
31
+ let depth = 0;
32
+ let quote;
33
+ let end = limit;
34
+ for (let i = from; i < limit && end === limit; i++) {
35
+ const char = template[i];
36
+ if (quote) {
37
+ if (char === '\\')
38
+ i++;
39
+ else if (char === quote)
40
+ quote = undefined;
41
+ }
42
+ else if (char === "'" || char === '"' || char === '`') {
43
+ quote = char;
44
+ }
45
+ else if ('([{'.includes(char)) {
46
+ depth++;
47
+ }
48
+ else if (')]}'.includes(char)) {
49
+ if (depth === 0)
50
+ end = i;
51
+ else
52
+ depth--;
53
+ }
54
+ else if (char === ';' && depth === 0) {
55
+ end = i;
56
+ }
57
+ }
58
+ while (end > from && /\s/.test(template[end - 1]))
59
+ end--;
60
+ return end;
61
+ }
62
+ /**
63
+ * Rewrites reads and writes of the members reachable through the refs in `template`, whose HTML AST is
64
+ * `rootNodes`. `policyOf` tells what a `#ref` on an element is bound to, or `undefined` when it is not one of
65
+ * the migrated types.
66
+ */
67
+ function rewriteRefAccesses(template, rootNodes, policyOf) {
68
+ const scanner = new utils_signalMembersMigration.TemplateScanner(template, policyOf);
69
+ const result = {
70
+ content: template,
71
+ readOnlyWrites: new Set(),
72
+ compoundWrites: new Set(),
73
+ reported: new Set()
74
+ };
75
+ const writeEdits = [];
76
+ const readEdits = [];
77
+ // The end of each access already handled: a ref redeclared in a nested view reaches it twice.
78
+ const seen = new Set();
79
+ utils_ast.visitAll(scanner, rootNodes);
80
+ const rewriteWrites = (expression, name, policy) => {
81
+ const source = template.slice(expression.start, expression.end);
82
+ for (const match of source.matchAll(assignmentPattern(name, policy.members))) {
83
+ const [, target, member, operator] = match;
84
+ const targetEnd = expression.start + match.index + target.length;
85
+ if (seen.has(targetEnd))
86
+ continue;
87
+ seen.add(targetEnd);
88
+ if (!policy.writable.has(member)) {
89
+ result.readOnlyWrites.add(member);
90
+ continue;
91
+ }
92
+ // Outside a statement an assignment is no valid template to begin with.
93
+ if (expression.kind !== 'statement')
94
+ continue;
95
+ const valueStart = targetEnd + operator.length;
96
+ const valueEnd = assignedExpressionEnd(template, valueStart, expression.end);
97
+ if (valueEnd === valueStart)
98
+ continue;
99
+ writeEdits.push({ start: targetEnd, end: valueStart, text: '.set(' });
100
+ writeEdits.push({ start: valueEnd, end: valueEnd, text: ')' });
101
+ }
102
+ };
103
+ const rewriteReads = (expression, name, policy) => {
104
+ const source = template.slice(expression.start, expression.end);
105
+ for (const match of source.matchAll(utils_signalMembersMigration.memberAccessPattern(name, policy.members))) {
106
+ const start = expression.start + match.index;
107
+ const end = start + match[0].length;
108
+ const member = match[2];
109
+ if (seen.has(end))
110
+ continue;
111
+ seen.add(end);
112
+ // `(click)="ref.value += 1"`, `ref.value++`, `--ref.value`: a call there is no valid template.
113
+ if (expression.kind === 'statement' &&
114
+ (COMPOUND_WRITE_AFTER.test(template.slice(end, expression.end)) ||
115
+ INCREMENT_BEFORE.test(template.slice(expression.start, start)))) {
116
+ (policy.writable.has(member) ? result.compoundWrites : result.readOnlyWrites).add(member);
117
+ continue;
118
+ }
119
+ // `[(ngModel)]="ref.value"` writes through the binding: a writable signal fills it as it is.
120
+ if (expression.kind === 'twoWay' &&
121
+ !template.slice(expression.start, start).trim() &&
122
+ !template.slice(end, expression.end).trim()) {
123
+ if (!policy.writable.has(member))
124
+ result.readOnlyWrites.add(member);
125
+ continue;
126
+ }
127
+ readEdits.push({ start: end, end, text: '()' });
128
+ }
129
+ };
130
+ for (const { name, type: policy, ...view } of scanner.unambiguousRefs()) {
131
+ for (const expression of scanner.expressions) {
132
+ if (expression.start < view.start || expression.end > view.end)
133
+ continue;
134
+ if (policy.members.length > 0) {
135
+ rewriteWrites(expression, name, policy);
136
+ rewriteReads(expression, name, policy);
137
+ }
138
+ if (policy.reported?.length) {
139
+ const source = template.slice(expression.start, expression.end);
140
+ for (const [, member] of source.matchAll(anyAccessPattern(name, policy.reported))) {
141
+ result.reported.add(member);
142
+ }
143
+ }
144
+ }
145
+ }
146
+ // Applied right to left. The sort is stable, so where a read ends an assigned value, the `)` closing
147
+ // `.set(` goes in first and the read's `()` lands in front of it.
148
+ const edits = [...writeEdits, ...readEdits].sort((a, b) => b.start - a.start || b.end - a.end);
149
+ for (const { start, end, text } of edits) {
150
+ result.content = result.content.slice(0, start) + text + result.content.slice(end);
151
+ }
152
+ return result;
153
+ }
154
+
155
+ exports.rewriteRefAccesses = rewriteRefAccesses;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var ts = require('typescript');
4
- var utils_ast = require('./ast.js');
4
+ var utils_ast = require('./ast.cjs');
5
5
 
6
6
  const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
7
7
  function forEachClass(sourceFile, callback) {
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var utils_messages = require('./messages.cjs');
4
+ var utils_packageConfig = require('./package-config.cjs');
5
+ var utils_projectFiles = require('./project-files.cjs');
6
+ require('@angular-devkit/schematics');
7
+ require('@schematics/angular/utility');
8
+
9
+ /**
10
+ * Builds the rule of a migration that only reports: every `.ts` file of the project that matches a pattern is
11
+ * logged with its message, then the summary. Never writes.
12
+ *
13
+ * The patterns are compiled once here rather than per file. None carries the `g` flag, so a shared instance
14
+ * holds no `lastIndex`.
15
+ */
16
+ function warnOnlyRule(config, options) {
17
+ const { label, summary } = config;
18
+ const warnPatterns = config.warnPatterns.map(({ anchor, pattern, message }) => ({
19
+ anchor: anchor ? new RegExp(anchor) : null,
20
+ pattern: new RegExp(pattern),
21
+ message
22
+ }));
23
+ return async (tree, context) => {
24
+ const projectDefinition = await utils_packageConfig.setupOptions(options.project, tree);
25
+ const root = projectDefinition?.root ?? '';
26
+ let reported = 0;
27
+ utils_projectFiles.visitProjectFiles(root ? tree.getDir(root) : tree.root, (filePath, entry) => {
28
+ if (!filePath.endsWith('.ts'))
29
+ return;
30
+ const content = entry.content.toString();
31
+ if (!content)
32
+ return;
33
+ for (const { anchor, pattern, message } of warnPatterns) {
34
+ if (anchor && !anchor.test(content))
35
+ continue;
36
+ if (!pattern.test(content))
37
+ continue;
38
+ reported++;
39
+ utils_messages.logMessage(context.logger, [`${label} ${filePath}`, ` ${message}`]);
40
+ }
41
+ });
42
+ // Nothing here is affected, so the summary would only be noise.
43
+ if (reported === 0)
44
+ return;
45
+ utils_messages.logMessage(context.logger, [
46
+ `${label} processed "${root || '<workspace root>'}", ${reported} use(s) reported.`,
47
+ ...summary
48
+ ]);
49
+ };
50
+ }
51
+
52
+ exports.warnOnlyRule = warnOnlyRule;
@@ -0,0 +1,123 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Whether `project` is an application (as opposed to a library) — the same check
5
+ * `@schematics/angular` itself uses (see `utility/workspace.js`'s `createDefaultPath`), rather than
6
+ * an allowlist of builder names. A project can sit on any builder — a custom webpack wrapper, an Nx
7
+ * executor, one this schematic has never heard of — and still be a perfectly good application; only
8
+ * `projectType` reliably says so.
9
+ */
10
+ function isApplicationProject(project) {
11
+ return project.extensions['projectType'] === 'application';
12
+ }
13
+ const KOOBIQ_STATIC_STYLE_ENTRIES = [
14
+ 'node_modules/@koobiq/icons/fonts/kbq-icons.css',
15
+ 'node_modules/@koobiq/design-tokens/web/css-tokens.css',
16
+ 'node_modules/@koobiq/components/prebuilt-themes/theme.css'
17
+ ];
18
+ const THEME_TOKENS_PATTERN = /^node_modules\/@koobiq\/design-tokens\/web\/css-tokens-(light|dark)\.css$/;
19
+ /**
20
+ * The style entries documented in the installation guide, in the order they must be loaded.
21
+ * `'auto'` includes both token files, since `KbqThemeService` switches between them at runtime —
22
+ * a static `'light'`/`'dark'` choice only needs its own.
23
+ *
24
+ * `@koobiq/design-tokens` ships code-block, scrollbar and skeleton's tokens as opt-in
25
+ * `component-tokens*.css` files, but `prebuilt-themes/theme.css` already carries their values,
26
+ * baked in at `@koobiq/components`' own build time — nothing extra to wire here for them.
27
+ */
28
+ function getKoobiqStyleEntries(theme) {
29
+ const [icons, tokens, prebuiltTheme] = KOOBIQ_STATIC_STYLE_ENTRIES;
30
+ const themeTokens = theme === 'auto' ? [
31
+ 'node_modules/@koobiq/design-tokens/web/css-tokens-light.css',
32
+ 'node_modules/@koobiq/design-tokens/web/css-tokens-dark.css'
33
+ ] : [`node_modules/@koobiq/design-tokens/web/css-tokens-${theme}.css`];
34
+ return [icons, tokens, ...themeTokens, prebuiltTheme];
35
+ }
36
+ /**
37
+ * Prepends the Koobiq style entries ahead of whatever is already in `existingStyles`, matching the
38
+ * order documented in installation.md, where the app's own stylesheet comes last. Re-running with
39
+ * the same theme is a no-op; re-running with a different theme swaps the `css-tokens-*.css`
40
+ * entries instead of accumulating duplicates. Non-string entries (style-budget objects) and any
41
+ * unrelated entries are preserved, untouched, in their original order.
42
+ */
43
+ function mergeKoobiqStyles(existingStyles, theme) {
44
+ const desired = getKoobiqStyleEntries(theme);
45
+ const rest = existingStyles.filter((entry) => {
46
+ if (typeof entry !== 'string')
47
+ return true;
48
+ return (!desired.includes(entry) &&
49
+ !KOOBIQ_STATIC_STYLE_ENTRIES.includes(entry) &&
50
+ !THEME_TOKENS_PATTERN.test(entry));
51
+ });
52
+ return [...desired, ...rest];
53
+ }
54
+ /**
55
+ * Resolves the workspace-root-relative path of a project's index.html, mirroring the
56
+ * `@angular/build:application` builder's own default (`<sourceRoot>/index.html`) when the
57
+ * `index` option isn't set explicitly. `buildTarget` is `undefined` for a project with no `build`
58
+ * target at all, in which case the default is the only option available.
59
+ */
60
+ function getIndexHtmlPath(project, buildTarget) {
61
+ const indexOption = buildTarget?.options?.index;
62
+ if (typeof indexOption === 'string') {
63
+ return indexOption;
64
+ }
65
+ if (indexOption && typeof indexOption === 'object' && !Array.isArray(indexOption)) {
66
+ const input = indexOption.input;
67
+ if (typeof input === 'string') {
68
+ return input;
69
+ }
70
+ }
71
+ const sourceRoot = project.sourceRoot ?? `${project.root}/src`;
72
+ return `${sourceRoot}/index.html`;
73
+ }
74
+ /**
75
+ * Whether a `build` target's `server`/`ssr` options indicate the project renders on the server —
76
+ * `KbqThemeCookieStore` matters there, where `KbqThemeLocalStorageStore`'s default doesn't reach
77
+ * the server render.
78
+ */
79
+ function isSsrBuildTarget(buildTarget) {
80
+ const { server, ssr } = buildTarget.options ?? {};
81
+ return Boolean((typeof server === 'string' && server) || ssr === true || (ssr && typeof ssr === 'object'));
82
+ }
83
+ /**
84
+ * Mutates `workspace` in place: for every application project (optionally scoped to
85
+ * `projectName`), merges the Koobiq style entries for `theme` into its `build` target's `styles`
86
+ * array, when it has one. Returns per-project wiring info the caller uses to edit index.html and
87
+ * the project's bootstrap file afterward — for every application project, regardless of whether it
88
+ * had a `build` target to wire styles into, since the bootstrap file (and thus the theme providers)
89
+ * is resolved independently of it.
90
+ *
91
+ * Only the target literally named `build` is touched — not `test` (Karma) or `serve` — keeping the
92
+ * change's blast radius minimal.
93
+ */
94
+ function applyKoobiqWorkspaceStyles(workspace, theme, projectName) {
95
+ const wired = [];
96
+ for (const [name, project] of workspace.projects) {
97
+ if (projectName && name !== projectName)
98
+ continue;
99
+ if (!isApplicationProject(project))
100
+ continue;
101
+ const buildTarget = project.targets.get('build');
102
+ let stylesWired = false;
103
+ if (buildTarget) {
104
+ const options = buildTarget.options ?? (buildTarget.options = {});
105
+ const existingStyles = Array.isArray(options.styles) ? options.styles : [];
106
+ options.styles = mergeKoobiqStyles(existingStyles, theme);
107
+ stylesWired = true;
108
+ }
109
+ wired.push({
110
+ projectName: name,
111
+ projectRoot: project.root,
112
+ indexHtmlPath: getIndexHtmlPath(project, buildTarget),
113
+ isSsr: buildTarget ? isSsrBuildTarget(buildTarget) : false,
114
+ stylesWired
115
+ });
116
+ }
117
+ return wired;
118
+ }
119
+
120
+ exports.applyKoobiqWorkspaceStyles = applyKoobiqWorkspaceStyles;
121
+ exports.getIndexHtmlPath = getIndexHtmlPath;
122
+ exports.getKoobiqStyleEntries = getKoobiqStyleEntries;
123
+ exports.mergeKoobiqStyles = mergeKoobiqStyles;
@@ -26,10 +26,12 @@ type KbqCodeBlockFile = {
26
26
  */
27
27
  filename?: string;
28
28
  /**
29
- * File language, requires for correct syntax highlighting.
30
- * If not provided or invalid, will be set to `KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE`.
29
+ * File language, required for correct syntax highlighting. It has to be registered in `languages` of
30
+ * `KbqCodeBlockHighlightJsConfig`, unless the full bundle of highlight.js is loaded. If not provided or not
31
+ * registered, will be set to `KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE`, or to `plaintext` if that is not registered
32
+ * either.
31
33
  *
32
- * See the [list of supported languages](https://highlightjs.readthedocs.io/en/stable/supported-languages.html).
34
+ * See the [list of supported languages](https://github.com/highlightjs/highlight.js/blob/11-stable/SUPPORTED_LANGUAGES.md).
33
35
  */
34
36
  language?: string;
35
37
  /**
@@ -330,13 +332,26 @@ declare class KbqCodeBlock implements AfterViewInit {
330
332
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqCodeBlock, "kbq-code-block", ["kbqCodeBlock"], { "lineNumbers": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "filled": { "alias": "filled"; "required": false; "isSignal": true; }; "canToggleSoftWrap": { "alias": "canToggleSoftWrap"; "required": false; "isSignal": true; }; "softWrapInput": { "alias": "softWrap"; "required": false; "isSignal": true; }; "viewAllInput": { "alias": "viewAll"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "canDownloadInput": { "alias": "canDownload"; "required": false; "isSignal": true; }; "canCopy": { "alias": "canCopy"; "required": false; "isSignal": true; }; "alwaysShowActionbar": { "alias": "alwaysShowActionbar"; "required": false; "isSignal": true; }; "filesInput": { "alias": "files"; "required": false; "isSignal": true; }; "activeFileIndexInput": { "alias": "activeFileIndex"; "required": false; "isSignal": true; }; "noBorder": { "alias": "noBorder"; "required": false; "isSignal": true; }; "hideTabsInput": { "alias": "hideTabs"; "required": false; "isSignal": true; }; }, { "softWrapChange": "softWrapChange"; "viewAllChange": "viewAllChange"; "activeFileIndexChange": "activeFileIndexChange"; "hideTabsChange": "hideTabsChange"; }, ["tabLinkTemplate"], never, true, [{ directive: typeof i1.KbqLocaleOverridesDirective; inputs: { "kbqLocaleOverrides": "localeOverrides"; }; outputs: {}; }]>;
331
333
  }
332
334
 
333
- /** `highlight.js` configuration */
335
+ /**
336
+ * Configuration of highlight.js, which highlights the code of a code block: how to load it and which languages to
337
+ * register. Without a configuration, the code block loads the highlight.js core, which has no languages, and shows the
338
+ * code as plain text. Provide it with `kbqCodeBlockHighlightJsConfigProvider`.
339
+ */
334
340
  type KbqCodeBlockHighlightJsConfig = Partial<{
335
- /** Lazy loader for highlight.js core (no bundled languages). When omitted, the full bundle is loaded. */
341
+ /**
342
+ * Lazy loader for the highlight.js instance. The core has no languages: register the ones the files use in
343
+ * `languages`, or load all of them with `() => import('highlight.js')`, the full bundle of about 1 MB.
344
+ * Defaults to `() => import('highlight.js/lib/core')`.
345
+ */
336
346
  core: () => Promise<{
337
347
  default: HLJSApi;
338
348
  }>;
339
- /** Map of language name to lazy loader for that language's LanguageFn. */
349
+ /**
350
+ * Map of language name to lazy loader for that language's LanguageFn. A language of highlight.js loads from
351
+ * `highlight.js/lib/languages/<name>`, where `<name>` is the name of its file in
352
+ * [src/languages](https://github.com/highlightjs/highlight.js/tree/11-stable/src/languages). Plain text needs no
353
+ * entry: the code block registers it as the fallback language.
354
+ */
340
355
  languages: Record<string, () => Promise<{
341
356
  default: LanguageFn;
342
357
  }>>;
@@ -345,11 +360,20 @@ type KbqCodeBlockHighlightJsConfig = Partial<{
345
360
  * Injection token for configuring `KbqCodeBlockHighlightJsConfig`.
346
361
  */
347
362
  declare const KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG: InjectionToken<Partial<{
348
- /** Lazy loader for highlight.js core (no bundled languages). When omitted, the full bundle is loaded. */
363
+ /**
364
+ * Lazy loader for the highlight.js instance. The core has no languages: register the ones the files use in
365
+ * `languages`, or load all of them with `() => import('highlight.js')`, the full bundle of about 1 MB.
366
+ * Defaults to `() => import('highlight.js/lib/core')`.
367
+ */
349
368
  core: () => Promise<{
350
369
  default: HLJSApi;
351
370
  }>;
352
- /** Map of language name to lazy loader for that language's LanguageFn. */
371
+ /**
372
+ * Map of language name to lazy loader for that language's LanguageFn. A language of highlight.js loads from
373
+ * `highlight.js/lib/languages/<name>`, where `<name>` is the name of its file in
374
+ * [src/languages](https://github.com/highlightjs/highlight.js/tree/11-stable/src/languages). Plain text needs no
375
+ * entry: the code block registers it as the fallback language.
376
+ */
353
377
  languages: Record<string, () => Promise<{
354
378
  default: LanguageFn;
355
379
  }>>;
@@ -361,7 +385,6 @@ declare const KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG: InjectionToken<Partial<{
361
385
  * ```ts
362
386
  * providers: [
363
387
  * kbqCodeBlockHighlightJsConfigProvider({
364
- * core: () => import('highlight.js/lib/core'),
365
388
  * languages: {
366
389
  * typescript: () => import('highlight.js/lib/languages/typescript'),
367
390
  * css: () => import('highlight.js/lib/languages/css'),
@@ -373,9 +396,11 @@ declare const KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG: InjectionToken<Partial<{
373
396
  */
374
397
  declare const kbqCodeBlockHighlightJsConfigProvider: (options: KbqCodeBlockHighlightJsConfig) => Provider;
375
398
  /**
376
- * Fallback language for code block if language is not supported/specified.
399
+ * Fallback language for code block if language is not supported/specified. It has to be registered in `languages` of
400
+ * `KbqCodeBlockHighlightJsConfig`, unless it is plain text or the full bundle of highlight.js is loaded, or the code
401
+ * block falls back to `plaintext`.
377
402
  *
378
- * See the [list of supported languages](https://highlightjs.readthedocs.io/en/stable/supported-languages.html).
403
+ * See the [list of supported languages](https://github.com/highlightjs/highlight.js/blob/11-stable/SUPPORTED_LANGUAGES.md).
379
404
  */
380
405
  declare const KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE: InjectionToken<string>;
381
406
  /** Utility provider for `KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE`. */
@@ -408,6 +433,8 @@ declare class KbqCodeBlockHighlight {
408
433
  /** Whether to display line numbers for single line code block. */
409
434
  readonly singleLine: _angular_core.InputSignalWithTransform<boolean, unknown>;
410
435
  private highlight;
436
+ /** The fallback language, or plain text, which the loader registers on every instance, if it is unknown too. */
437
+ private fallbackLanguage;
411
438
  private warn;
412
439
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqCodeBlockHighlight, never>;
413
440
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KbqCodeBlockHighlight, "code[kbqCodeBlockHighlight]", ["kbqCodeBlockHighlight"], { "file": { "alias": "file"; "required": true; "isSignal": true; }; "startFrom": { "alias": "startFrom"; "required": false; "isSignal": true; }; "singleLine": { "alias": "singleLine"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -1232,7 +1232,7 @@ declare abstract class KbqTreeSelectPipeBase<V> extends KbqBasePipe<V> implement
1232
1232
  treeFlattener: KbqTreeFlattener<KbqTreeSelectNode, KbqTreeSelectFlatNode>;
1233
1233
  dataSource: KbqTreeFlatDataSource<KbqTreeSelectNode, KbqTreeSelectFlatNode>;
1234
1234
  /** @docs-private */
1235
- readonly select: _angular_core.Signal<KbqTreeSelect<KbqTreeSelectFlatNode>>;
1235
+ readonly select: _angular_core.Signal<KbqTreeSelect<KbqTreeSelectFlatNode, KbqTreeSelectFlatNode>>;
1236
1236
  constructor();
1237
1237
  ngOnInit(): void;
1238
1238
  ngAfterViewInit(): void;
@@ -1254,7 +1254,7 @@ declare abstract class KbqTreeSelectPipeBase<V> extends KbqBasePipe<V> implement
1254
1254
 
1255
1255
  declare class KbqPipeMultiTreeSelectComponent extends KbqTreeSelectPipeBase<KbqSelectValue[]> implements OnInit {
1256
1256
  /** @docs-private */
1257
- readonly tree: _angular_core.Signal<KbqTreeSelection<KbqTreeSelectFlatNode>>;
1257
+ readonly tree: _angular_core.Signal<KbqTreeSelection<KbqTreeSelectFlatNode, KbqTreeSelectFlatNode>>;
1258
1258
  /** selected value */
1259
1259
  get selected(): KbqSelectValue[] | null;
1260
1260
  /** Whether the current pipe is empty. */
@@ -124,7 +124,7 @@ declare class KbqTreeSelectChange<T = any> {
124
124
  /** Every option the change is about, when it covers more than one. */
125
125
  values?: unknown[] | undefined);
126
126
  }
127
- declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterViewChecked, AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<KbqTreeOption>, CanUpdateErrorState, KbqSiblingPopup {
127
+ declare class KbqTreeSelect<T = any, K = T> extends KbqAbstractSelect implements AfterViewChecked, AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<KbqTreeOption>, CanUpdateErrorState, KbqSiblingPopup {
128
128
  elementRef: ElementRef<HTMLElement>;
129
129
  protected readonly changeDetectorRef: ChangeDetectorRef;
130
130
  private readonly injector;
@@ -158,7 +158,8 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
158
158
  * Deals with the selection logic. The projected `kbq-tree-selection` shares the same instance.
159
159
  *
160
160
  * `T` is the type of the data nodes, the same as the projected tree's. A template infers it from `[clearPredicate]`
161
- * alone, apart from the tree; a query names it: `viewChild.required<KbqTreeSelect<Node>>(KbqTreeSelect)`.
161
+ * alone, apart from the tree; a query names it: `viewChild.required<KbqTreeSelect<Node>>(KbqTreeSelect)`, and a
162
+ * select whose tree control has a `trackBy` names the key type too: `KbqTreeSelect<Node, string>`.
162
163
  */
163
164
  selectionModel: SelectionModel<T>;
164
165
  /** Emits once the panel has rendered (`'showing'`) or has been removed (`'void'`). */
@@ -207,7 +208,7 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
207
208
  readonly customTrigger: _angular_core.Signal<KbqSelectTrigger | undefined>;
208
209
  readonly customMatcher: _angular_core.Signal<KbqSelectMatcher | undefined>;
209
210
  readonly customTagTemplateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
210
- readonly tree: _angular_core.Signal<KbqTreeSelection<T> | undefined>;
211
+ readonly tree: _angular_core.Signal<KbqTreeSelection<T, K> | undefined>;
211
212
  readonly search: _angular_core.Signal<KbqSelectSearch | undefined>;
212
213
  /** Message projected for an empty tree — the only thing the panel opens onto without options. */
213
214
  private readonly noOptionsMessage;
@@ -245,7 +246,7 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
245
246
  * Event emitted whenever the tree's `selectAllOptions()` runs — a click on the `selectAll` master
246
247
  * checkbox, the Ctrl/Cmd + A shortcut, or a custom `selectAllHandler` that delegates to it.
247
248
  */
248
- readonly onSelectAll: _angular_core.OutputEmitterRef<KbqSelectAllEvent<KbqTreeOption<T>, KbqTreeSelect<T>>>;
249
+ readonly onSelectAll: _angular_core.OutputEmitterRef<KbqSelectAllEvent<KbqTreeOption<T>, KbqTreeSelect<T, K>>>;
249
250
  /** Classes to be passed to the select panel. Supports the same syntax as the `[class]` binding. */
250
251
  readonly panelClass: InputSignal<string | string[] | Set<string> | {
251
252
  [key: string]: any;
@@ -342,11 +343,11 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
342
343
  private readonly resolvedTabIndex;
343
344
  private readonly resolvedAriaLabel;
344
345
  /** @docs-private */
345
- readonly selectAllHandlerInput: _angular_core.InputSignalWithTransform<((event: KeyboardEvent, select: KbqTreeSelect<T>) => void) | undefined, ((event: KeyboardEvent, select: KbqTreeSelect<T>) => void) | undefined>;
346
+ readonly selectAllHandlerInput: _angular_core.InputSignalWithTransform<((event: KeyboardEvent, select: KbqTreeSelect<T, K>) => void) | undefined, ((event: KeyboardEvent, select: KbqTreeSelect<T, K>) => void) | undefined>;
346
347
  /**
347
348
  * Function for handling the combination Ctrl + A (select all). By default, the internal handler is used.
348
349
  */
349
- get selectAllHandler(): (event: KeyboardEvent, select: KbqTreeSelect<T>) => void;
350
+ get selectAllHandler(): (event: KeyboardEvent, select: KbqTreeSelect<T, K>) => void;
350
351
  /** Function for handling the combination Ctrl + A (select all). By default, the internal handler is used. */
351
352
  private defaultSelectAllHandler;
352
353
  private readonly focusedValue;
@@ -420,6 +421,8 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
420
421
  * node inside a collapsed branch has no option to ask.
421
422
  */
422
423
  private isNodeDisabled;
424
+ /** The rendered option of each node, for asking `isNodeDisabled` about every selected node at once. */
425
+ private renderedOptionsByNode;
423
426
  /**
424
427
  * Colour of the trigger's tags and arrow.
425
428
  *
@@ -648,8 +651,8 @@ declare class KbqTreeSelect<T = any> extends KbqAbstractSelect implements AfterV
648
651
  * timer is the floor that covers that case.
649
652
  */
650
653
  private subscribeOnSearchChanges;
651
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqTreeSelect<any>, never>;
652
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelect<any>, "kbq-tree-select", ["kbqTreeSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; "isSignal": true; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "sortComparator": { "alias": "sortComparator"; "required": false; "isSignal": true; }; "clearPredicate": { "alias": "clearPredicate"; "required": false; "isSignal": true; }; "multiline": { "alias": "multiline"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "multipleInput": { "alias": "multiple"; "required": false; "isSignal": true; }; "autoSelectInput": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; "isSignal": true; }; "idInput": { "alias": "id"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "tabIndexInput": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectAllHandlerInput": { "alias": "selectAllHandler"; "required": false; "isSignal": true; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; "isSignal": true; }; "searchMinOptionsThresholdInput": { "alias": "searchMinOptionsThreshold"; "required": false; "isSignal": true; }; }, { "openedChangeOutput": "openedChange"; "openedOutput": "opened"; "closedOutput": "closed"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search", "noOptionsMessage"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-select-no-options, [kbq-select-no-options]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], true, [{ directive: typeof i4.KbqLocaleOverridesDirective; inputs: { "kbqLocaleOverrides": "localeOverrides"; }; outputs: {}; }]>;
654
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqTreeSelect<any, any>, never>;
655
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelect<any, any>, "kbq-tree-select", ["kbqTreeSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; "isSignal": true; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "sortComparator": { "alias": "sortComparator"; "required": false; "isSignal": true; }; "clearPredicate": { "alias": "clearPredicate"; "required": false; "isSignal": true; }; "multiline": { "alias": "multiline"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "multipleInput": { "alias": "multiple"; "required": false; "isSignal": true; }; "autoSelectInput": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; "isSignal": true; }; "idInput": { "alias": "id"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "tabIndexInput": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectAllHandlerInput": { "alias": "selectAllHandler"; "required": false; "isSignal": true; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; "isSignal": true; }; "searchMinOptionsThresholdInput": { "alias": "searchMinOptionsThreshold"; "required": false; "isSignal": true; }; }, { "openedChangeOutput": "openedChange"; "openedOutput": "opened"; "closedOutput": "closed"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search", "noOptionsMessage"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-select-no-options, [kbq-select-no-options]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], true, [{ directive: typeof i4.KbqLocaleOverridesDirective; inputs: { "kbqLocaleOverrides": "localeOverrides"; }; outputs: {}; }]>;
653
656
  }
654
657
 
655
658
  /**