@koobiq/components 20.1.0 → 20.3.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 (249) hide show
  1. package/accordion/_accordion-theme.scss +6 -2
  2. package/accordion/accordion-tokens.scss +3 -0
  3. package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
  4. package/accordion/accordion.scss +71 -0
  5. package/accordion/index.d.ts +264 -121
  6. package/actions-panel/index.d.ts +25 -13
  7. package/alert/_alert-theme.scss +14 -0
  8. package/alert/alert.component.scss +24 -13
  9. package/alert/index.d.ts +63 -29
  10. package/app-switcher/app-switcher-dropdown-app.scss +7 -5
  11. package/app-switcher/app-switcher-dropdown-site.scss +6 -4
  12. package/app-switcher/index.d.ts +41 -4
  13. package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
  14. package/autocomplete/autocomplete.scss +2 -1
  15. package/autocomplete/index.d.ts +58 -37
  16. package/badge/index.d.ts +2 -3
  17. package/breadcrumbs/index.d.ts +1 -1
  18. package/button/index.d.ts +2 -2
  19. package/button-toggle/button-toggle-tokens.scss +2 -0
  20. package/button-toggle/button-toggle.scss +9 -0
  21. package/button-toggle/index.d.ts +5 -0
  22. package/checkbox/index.d.ts +33 -29
  23. package/clamped-text/index.d.ts +3 -2
  24. package/code-block/index.d.ts +24 -19
  25. package/content-panel/index.d.ts +1 -1
  26. package/core/index.d.ts +1217 -186
  27. package/core/option/_action-container-mixins.scss +28 -0
  28. package/core/option/_option-theme.scss +24 -0
  29. package/core/option/action.scss +7 -0
  30. package/core/styles/_core.scss +2 -0
  31. package/core/styles/_koobiq-theme.scss +2 -0
  32. package/core/styles/_tokens.scss +1 -0
  33. package/core/styles/common/_animation.scss +31 -24
  34. package/core/styles/common/_connected-overlay.scss +39 -0
  35. package/core/styles/common/_select.scss +19 -2
  36. package/core/styles/common/_tokens.scss +0 -9
  37. package/core/styles/theming/_index.scss +0 -1
  38. package/core/styles/theming/_theming.scss +34 -5
  39. package/datepicker/index.d.ts +46 -15
  40. package/dl/dl.scss +26 -0
  41. package/dl/index.d.ts +8 -1
  42. package/dropdown/_dropdown-theme.scss +28 -2
  43. package/dropdown/dropdown-item.scss +29 -0
  44. package/dropdown/dropdown-tokens.scss +2 -1
  45. package/dropdown/dropdown.scss +16 -1
  46. package/dropdown/index.d.ts +331 -17
  47. package/dynamic-translation/index.d.ts +1 -1
  48. package/fesm2022/koobiq-components-accordion.mjs +480 -317
  49. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
  51. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-alert.mjs +98 -58
  53. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
  55. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
  57. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-badge.mjs +18 -17
  59. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
  61. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
  63. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-button.mjs +25 -25
  65. package/fesm2022/koobiq-components-checkbox.mjs +69 -92
  66. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
  68. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-code-block.mjs +56 -69
  70. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-content-panel.mjs +29 -29
  72. package/fesm2022/koobiq-components-core.mjs +2485 -735
  73. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-datepicker.mjs +168 -126
  75. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-divider.mjs +7 -7
  77. package/fesm2022/koobiq-components-dl.mjs +23 -15
  78. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-dropdown.mjs +814 -136
  80. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  82. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  83. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  84. package/fesm2022/koobiq-components-file-upload.mjs +74 -42
  85. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
  87. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-flag.mjs +7 -7
  89. package/fesm2022/koobiq-components-form-field.mjs +350 -162
  90. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-icon.mjs +52 -25
  92. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
  94. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-input.mjs +41 -24
  96. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-link.mjs +8 -8
  98. package/fesm2022/koobiq-components-list.mjs +657 -143
  99. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  101. package/fesm2022/koobiq-components-markdown.mjs +14 -11
  102. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-modal.mjs +59 -35
  104. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-navbar.mjs +177 -67
  106. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-notification-center.mjs +40 -24
  108. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
  110. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-popover.mjs +31 -21
  112. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  114. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  115. package/fesm2022/koobiq-components-radio.mjs +10 -10
  116. package/fesm2022/koobiq-components-resizer.mjs +33 -14
  117. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  119. package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
  120. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-select.mjs +450 -146
  122. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-sidebar.mjs +14 -14
  124. package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
  125. package/fesm2022/koobiq-components-skeleton.mjs +10 -10
  126. package/fesm2022/koobiq-components-split-button.mjs +10 -17
  127. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-splitter.mjs +17 -17
  129. package/fesm2022/koobiq-components-table.mjs +15 -13
  130. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-tabs.mjs +80 -68
  132. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-tags.mjs +283 -122
  134. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  135. package/fesm2022/koobiq-components-textarea.mjs +13 -8
  136. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  137. package/fesm2022/koobiq-components-time-range.mjs +29 -24
  138. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  139. package/fesm2022/koobiq-components-timepicker.mjs +61 -30
  140. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  141. package/fesm2022/koobiq-components-timezone.mjs +77 -42
  142. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  143. package/fesm2022/koobiq-components-title.mjs +7 -7
  144. package/fesm2022/koobiq-components-toast.mjs +51 -26
  145. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-toggle.mjs +72 -64
  147. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-tooltip.mjs +219 -28
  149. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  151. package/fesm2022/koobiq-components-tree-select.mjs +222 -80
  152. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-tree.mjs +302 -81
  154. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-username.mjs +27 -27
  156. package/file-upload/index.d.ts +25 -6
  157. package/file-upload/multiple-file-upload.component.scss +14 -0
  158. package/filter-bar/_filter-bar-theme.scss +0 -10
  159. package/filter-bar/filter-bar-tokens.scss +3 -0
  160. package/filter-bar/filters.scss +3 -2
  161. package/filter-bar/index.d.ts +281 -9
  162. package/filter-bar/pipes/base-pipe.scss +0 -11
  163. package/filter-bar/pipes/pipe-input.scss +10 -0
  164. package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
  165. package/filter-bar/pipes/pipe-multiselect.scss +0 -6
  166. package/filter-bar/pipes/pipe-tree-select.scss +0 -6
  167. package/form-field/_form-field-theme.scss +76 -20
  168. package/form-field/fieldset.scss +10 -0
  169. package/form-field/form-field-tokens.scss +15 -1
  170. package/form-field/form-field.scss +15 -19
  171. package/form-field/index.d.ts +147 -65
  172. package/icon/icon-button.scss +3 -1
  173. package/icon/index.d.ts +45 -7
  174. package/inline-edit/index.d.ts +57 -4
  175. package/inline-edit/inline-edit.scss +10 -0
  176. package/input/index.d.ts +17 -2
  177. package/list/_list-theme.scss +42 -10
  178. package/list/index.d.ts +326 -79
  179. package/list/list-tokens.scss +43 -8
  180. package/list/list.scss +186 -12
  181. package/markdown/index.d.ts +1 -1
  182. package/modal/index.d.ts +21 -4
  183. package/modal/modal-tokens.scss +1 -1
  184. package/navbar/_navbar-item_vertical.scss +7 -5
  185. package/navbar/index.d.ts +54 -5
  186. package/navbar/navbar-brand.scss +23 -7
  187. package/navbar/vertical-navbar.scss +6 -0
  188. package/notification-center/index.d.ts +2 -1
  189. package/notification-center/notification-item.scss +6 -0
  190. package/package.json +3 -6
  191. package/popover/index.d.ts +2 -2
  192. package/prebuilt-themes/dark-theme.css +1 -1
  193. package/prebuilt-themes/light-theme.css +1 -1
  194. package/prebuilt-themes/theme.css +1 -1
  195. package/resizer/index.d.ts +12 -0
  196. package/schematics/collection.json +10 -0
  197. package/schematics/migrations/alert-signals/README.md +64 -0
  198. package/schematics/migrations/alert-signals/data.js +70 -0
  199. package/schematics/migrations/alert-signals/index.js +350 -0
  200. package/schematics/migrations/alert-signals/schema.json +20 -0
  201. package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
  202. package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
  203. package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
  204. package/schematics/migrations/deprecated-icons/README.md +29 -4
  205. package/schematics/migrations/deprecated-icons/data.js +7 -0
  206. package/schematics/migrations/deprecated-icons/index.js +62 -35
  207. package/schematics/migrations/filter-bar-signals/README.md +1 -1
  208. package/schematics/migrations/new-icons-pack/README.md +37 -2
  209. package/schematics/migrations/new-icons-pack/data.js +8 -0
  210. package/schematics/migrations/new-icons-pack/index.js +144 -53
  211. package/schematics/migrations.json +11 -1
  212. package/schematics/ng-add/index.js +3 -3
  213. package/schematics/utils/angular-parsing.js +41 -14
  214. package/schematics/utils/ast.js +31 -0
  215. package/schematics/utils/icon-migration.js +530 -0
  216. package/schematics/utils/typescript.js +44 -0
  217. package/scrollbar/index.d.ts +1 -1
  218. package/search-expandable/index.d.ts +3 -0
  219. package/select/index.d.ts +212 -40
  220. package/select/select-tokens.scss +0 -1
  221. package/select/select.scss +0 -2
  222. package/splitter/index.d.ts +1 -1
  223. package/table/_table-theme.scss +4 -0
  224. package/table/index.d.ts +2 -1
  225. package/table/table.scss +8 -0
  226. package/tabs/_tabs-common.scss +60 -31
  227. package/tabs/_tabs-theme.scss +12 -0
  228. package/tabs/index.d.ts +2 -2
  229. package/tabs/tab-header.scss +14 -0
  230. package/tabs/tab-nav-bar.scss +4 -0
  231. package/tabs/tabs-tokens.scss +1 -0
  232. package/tags/index.d.ts +128 -29
  233. package/textarea/index.d.ts +5 -0
  234. package/time-range/index.d.ts +1 -1
  235. package/timepicker/index.d.ts +4 -0
  236. package/timezone/index.d.ts +10 -8
  237. package/toast/index.d.ts +26 -3
  238. package/toggle/index.d.ts +34 -14
  239. package/tooltip/index.d.ts +119 -7
  240. package/tree/_tree-theme.scss +25 -5
  241. package/tree/index.d.ts +71 -3
  242. package/tree/tree-option.scss +2 -8
  243. package/tree-select/_tree-select-theme.scss +22 -0
  244. package/tree-select/index.d.ts +127 -36
  245. package/accordion/accordion.component.scss +0 -50
  246. package/core/styles/_tokens.kbq.import.scss +0 -4
  247. package/core/styles/theming/_components-theming.scss +0 -1927
  248. package/filter-bar/pipes/pipe-select.scss +0 -5
  249. package/overflow-items/overflow-items.scss +0 -20
@@ -10,23 +10,17 @@ var utils_typescript = require('./typescript.js');
10
10
  * @param tree
11
11
  * @param filePaths
12
12
  * @param context
13
- * @param migrationData
13
+ * @param transform
14
14
  */
15
- async function migrateTemplate(tree, filePaths, context, migrationData) {
15
+ async function migrateTemplateWithTransform(tree, filePaths, context, transform) {
16
16
  for (const templatePath of filePaths) {
17
17
  const parsedFilePath = `.${templatePath}`;
18
- let res = Promise.resolve({
19
- fileContent: '',
20
- changed: false,
21
- errors: []
22
- });
23
18
  const template = tree.read(parsedFilePath)?.toString();
24
19
  if (!template) {
25
20
  context.logger.error(`Cannot read "${parsedFilePath}" because it does not exist.`);
26
21
  continue;
27
22
  }
28
- res = transformTemplateAttributes(template, parsedFilePath, migrationData);
29
- const { fileContent, changed, errors } = await res;
23
+ const { fileContent, changed, errors } = await transform(template, parsedFilePath);
30
24
  if (changed) {
31
25
  tree.overwrite(templatePath, fileContent);
32
26
  }
@@ -35,15 +29,25 @@ async function migrateTemplate(tree, filePaths, context, migrationData) {
35
29
  }
36
30
  }
37
31
  }
32
+ /**
33
+ * Update separate html file
34
+ * @param tree
35
+ * @param filePaths
36
+ * @param context
37
+ * @param migrationData
38
+ */
39
+ async function migrateTemplate(tree, filePaths, context, migrationData) {
40
+ return migrateTemplateWithTransform(tree, filePaths, context, (template, fileName) => transformTemplateAttributes(template, fileName, migrationData));
41
+ }
38
42
  /**
39
43
  * Update typescript file if classes with @Component decorator and `template` property exists
40
44
  * @param tree
41
45
  * @param sourceFiles
42
46
  * @param basePath
43
47
  * @param context
44
- * @param migrationData
48
+ * @param transform
45
49
  */
46
- async function migrateTs(tree, sourceFiles, basePath, context, migrationData) {
50
+ async function migrateTsWithTransform(tree, sourceFiles, basePath, context, transform) {
47
51
  // run and track changed components
48
52
  const analysis = new Map();
49
53
  for (const sourceFile of sourceFiles) {
@@ -61,7 +65,7 @@ async function migrateTs(tree, sourceFiles, basePath, context, migrationData) {
61
65
  for (const { start, end } of ranges) {
62
66
  const template = content.slice(start, end);
63
67
  const length = (end ?? content.length) - start;
64
- const { fileContent, changed, errors } = await transformTemplateAttributes(template, relativePath, migrationData);
68
+ const { fileContent, changed, errors } = await transform(template, relativePath);
65
69
  if (changed) {
66
70
  update.remove(start, length);
67
71
  update.insertLeft(start, fileContent);
@@ -73,6 +77,17 @@ async function migrateTs(tree, sourceFiles, basePath, context, migrationData) {
73
77
  tree.commitUpdate(update);
74
78
  }
75
79
  }
80
+ /**
81
+ * Update typescript file if classes with @Component decorator and `template` property exists
82
+ * @param tree
83
+ * @param sourceFiles
84
+ * @param basePath
85
+ * @param context
86
+ * @param migrationData
87
+ */
88
+ async function migrateTs(tree, sourceFiles, basePath, context, migrationData) {
89
+ return migrateTsWithTransform(tree, sourceFiles, basePath, context, (template, fileName) => transformTemplateAttributes(template, fileName, migrationData));
90
+ }
76
91
  /**
77
92
  * Analyzes the decorators of a given class declaration to find and save
78
93
  * inline `template` metadata within `@Component` decorators.
@@ -122,6 +137,7 @@ async function transformTemplateAttributes(template, fileName, migrationData) {
122
137
  if (parsed.tree !== undefined) {
123
138
  const visitor = new utils_typescript.ElementCollector(migrationData, fileName);
124
139
  utils_ast.visitAll(visitor, parsed.tree.rootNodes);
140
+ let didReplace = false;
125
141
  for (const el of visitor.elementsToMigrate) {
126
142
  const migrationAttr = el.attrs.find((attr) => utils_ast.getSimpleAttributeName(attr.name) === migrationData.attrs.key.from);
127
143
  let updatedAttrValue;
@@ -132,7 +148,14 @@ async function transformTemplateAttributes(template, fileName, migrationData) {
132
148
  updatedAttrValue = replacement.to;
133
149
  }
134
150
  else {
135
- console.warn(`Element is using dynamic value. Check the code and change value on your own.${(fileName && ' File: ' + fileName) || ''}`);
151
+ // A bound attribute (`[panelWidth]="..."`) whose value isn't a quoted string
152
+ // literal is a genuine runtime expression and can't be resolved statically. A
153
+ // plain attribute, or a bound attribute holding a quoted literal, has a known
154
+ // value at migration time — it's just one the replacement table doesn't cover.
155
+ const isDynamicExpression = migrationAttr.name.startsWith('[') && !/^\s*['"].*['"]\s*$/.test(migrationAttr.value);
156
+ console.warn(isDynamicExpression
157
+ ? `Element is using a dynamic value. Check the code and change value on your own.${(fileName && ' File: ' + fileName) || ''}`
158
+ : `Element has value "${cleanAttrValue}" with no matching replacement. Check the code and change value on your own.${(fileName && ' File: ' + fileName) || ''}`);
136
159
  continue;
137
160
  }
138
161
  updatedTemplate =
@@ -141,13 +164,17 @@ async function transformTemplateAttributes(template, fileName, migrationData) {
141
164
  updatedTemplate.slice(migrationAttr.valueSpan.end.offset + 1 - offset, updatedTemplate.length);
142
165
  offset += migrationAttr.name.length - migrationData.attrs.key.to.length;
143
166
  offset += migrationAttr.value.length - updatedAttrValue.length;
167
+ didReplace = true;
144
168
  }
145
169
  }
146
- return { fileContent: updatedTemplate, changed: visitor.elementsToMigrate.length > 0, errors: parsed.errors };
170
+ return { fileContent: updatedTemplate, changed: didReplace, errors: parsed.errors };
147
171
  }
148
172
  return { fileContent: updatedTemplate, changed: undefined, errors: parsed.errors };
149
173
  }
150
174
 
151
175
  exports.analyzeDecorators = analyzeDecorators;
152
176
  exports.migrateTemplate = migrateTemplate;
177
+ exports.migrateTemplateWithTransform = migrateTemplateWithTransform;
153
178
  exports.migrateTs = migrateTs;
179
+ exports.migrateTsWithTransform = migrateTsWithTransform;
180
+ exports.transformTemplateAttributes = transformTemplateAttributes;
@@ -22,7 +22,38 @@ function getSimpleAttributeName(attrName) {
22
22
  function getSimpleAttributeValue(attrValue) {
23
23
  return attrValue.replace(/[{}']/g, '');
24
24
  }
25
+ /**
26
+ * Splits a whitespace-separated token list (an HTML `class` attribute value, or a bare
27
+ * `'custom-icons word-wrap_16'`-style string), replacing only tokens for which `lookup` returns a
28
+ * value. A `''`/`null` result drops the token; `undefined` leaves it untouched. Tokens are
29
+ * rejoined with single spaces. Returns `undefined` if no token was touched.
30
+ */
31
+ function replaceTokenList(value, lookup) {
32
+ const tokens = value.split(/\s+/).filter(Boolean);
33
+ let changed = false;
34
+ const result = tokens
35
+ .map((token) => {
36
+ const replacement = lookup(token);
37
+ if (replacement === undefined) {
38
+ return token;
39
+ }
40
+ changed = true;
41
+ return replacement;
42
+ })
43
+ .filter((token) => !!token);
44
+ return changed ? result.join(' ') : undefined;
45
+ }
46
+ /**
47
+ * If `simpleAttrName` (already stripped of `[`/`]` binding brackets via `getSimpleAttributeName`)
48
+ * is a `class.<token>` binding, returns `<token>`; otherwise `undefined`.
49
+ */
50
+ function getClassBindingToken(simpleAttrName) {
51
+ const match = /^class\.(.+)$/.exec(simpleAttrName);
52
+ return match ? match[1] : undefined;
53
+ }
25
54
 
55
+ exports.getClassBindingToken = getClassBindingToken;
26
56
  exports.getSimpleAttributeName = getSimpleAttributeName;
27
57
  exports.getSimpleAttributeValue = getSimpleAttributeValue;
58
+ exports.replaceTokenList = replaceTokenList;
28
59
  exports.visitAll = visitAll;