@clr/angular 12.0.10 → 12.0.13

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 (577) hide show
  1. package/README.md +0 -12
  2. package/bundles/clr-angular.umd.js +742 -605
  3. package/bundles/clr-angular.umd.js.map +1 -1
  4. package/clr-angular.metadata.json +1 -1
  5. package/data/stack-view/stack-block.d.ts +11 -0
  6. package/data/stack-view/stack-input.d.ts +0 -6
  7. package/data/stack-view/stack-select.d.ts +0 -5
  8. package/data/stack-view/stack-view-custom-tags.d.ts +10 -0
  9. package/esm2015/accordion/accordion-content.js +2 -2
  10. package/esm2015/accordion/accordion-description.js +2 -2
  11. package/esm2015/accordion/accordion-panel.js +3 -3
  12. package/esm2015/accordion/accordion-title.js +2 -2
  13. package/esm2015/accordion/accordion.js +2 -2
  14. package/esm2015/accordion/accordion.module.js +2 -2
  15. package/esm2015/accordion/chocolate/accordion-oompa-loompa.js +2 -2
  16. package/esm2015/accordion/chocolate/accordion-willy-wonka.js +2 -2
  17. package/esm2015/accordion/enums/accordion-status.enum.js +2 -2
  18. package/esm2015/accordion/enums/accordion-strategy.enum.js +2 -2
  19. package/esm2015/accordion/index.js +2 -2
  20. package/esm2015/accordion/models/accordion.model.js +2 -2
  21. package/esm2015/accordion/providers/accordion.service.js +2 -2
  22. package/esm2015/accordion/stepper/chocolate/stepper-oompa-loompa.js +2 -2
  23. package/esm2015/accordion/stepper/chocolate/stepper-willy-wonka.js +2 -2
  24. package/esm2015/accordion/stepper/index.js +2 -2
  25. package/esm2015/accordion/stepper/models/stepper.model.js +2 -2
  26. package/esm2015/accordion/stepper/providers/stepper.service.js +2 -2
  27. package/esm2015/accordion/stepper/step-button.js +2 -2
  28. package/esm2015/accordion/stepper/stepper-panel.js +3 -3
  29. package/esm2015/accordion/stepper/stepper.js +2 -2
  30. package/esm2015/accordion/stepper/stepper.module.js +2 -2
  31. package/esm2015/accordion/utils/animation.js +2 -2
  32. package/esm2015/button/button-group/button-group.js +2 -2
  33. package/esm2015/button/button-group/button-group.module.js +2 -2
  34. package/esm2015/button/button-group/button.js +2 -2
  35. package/esm2015/button/button-group/index.js +2 -2
  36. package/esm2015/button/button-loading/index.js +2 -2
  37. package/esm2015/button/button-loading/loading-button.js +2 -2
  38. package/esm2015/button/button-loading/loading-button.module.js +2 -2
  39. package/esm2015/button/button.module.js +2 -2
  40. package/esm2015/button/index.js +2 -2
  41. package/esm2015/button/providers/button-in-group.service.js +2 -2
  42. package/esm2015/clr-angular.module.js +2 -2
  43. package/esm2015/data/data.module.js +2 -2
  44. package/esm2015/data/datagrid/built-in/comparators/datagrid-property-comparator.js +6 -1
  45. package/esm2015/data/datagrid/built-in/filters/datagrid-numeric-filter-impl.js +2 -2
  46. package/esm2015/data/datagrid/built-in/filters/datagrid-numeric-filter.js +2 -2
  47. package/esm2015/data/datagrid/built-in/filters/datagrid-property-numeric-filter.js +6 -1
  48. package/esm2015/data/datagrid/built-in/filters/datagrid-property-string-filter.js +6 -1
  49. package/esm2015/data/datagrid/built-in/filters/datagrid-string-filter-impl.js +2 -2
  50. package/esm2015/data/datagrid/built-in/filters/datagrid-string-filter.js +2 -2
  51. package/esm2015/data/datagrid/built-in/nested-property.js +2 -2
  52. package/esm2015/data/datagrid/chocolate/actionable-oompa-loompa.js +2 -2
  53. package/esm2015/data/datagrid/chocolate/datagrid-willy-wonka.js +2 -2
  54. package/esm2015/data/datagrid/chocolate/expandable-oompa-loompa.js +2 -2
  55. package/esm2015/data/datagrid/datagrid-action-bar.js +2 -2
  56. package/esm2015/data/datagrid/datagrid-action-overflow.js +2 -2
  57. package/esm2015/data/datagrid/datagrid-cell.js +2 -2
  58. package/esm2015/data/datagrid/datagrid-column-separator.js +2 -2
  59. package/esm2015/data/datagrid/datagrid-column-toggle-button.js +2 -2
  60. package/esm2015/data/datagrid/datagrid-column-toggle-title.js +2 -2
  61. package/esm2015/data/datagrid/datagrid-column-toggle.js +2 -2
  62. package/esm2015/data/datagrid/datagrid-column.js +2 -2
  63. package/esm2015/data/datagrid/datagrid-detail-body.js +2 -2
  64. package/esm2015/data/datagrid/datagrid-detail-header.js +2 -2
  65. package/esm2015/data/datagrid/datagrid-detail-registerer.js +2 -2
  66. package/esm2015/data/datagrid/datagrid-detail.js +2 -2
  67. package/esm2015/data/datagrid/datagrid-filter.js +2 -2
  68. package/esm2015/data/datagrid/datagrid-footer.js +2 -2
  69. package/esm2015/data/datagrid/datagrid-hideable-column.js +2 -2
  70. package/esm2015/data/datagrid/datagrid-if-detail.js +2 -2
  71. package/esm2015/data/datagrid/datagrid-if-expanded.service.js +2 -2
  72. package/esm2015/data/datagrid/datagrid-items-trackby.js +2 -2
  73. package/esm2015/data/datagrid/datagrid-items.js +2 -2
  74. package/esm2015/data/datagrid/datagrid-page-size.js +2 -2
  75. package/esm2015/data/datagrid/datagrid-pagination.js +2 -2
  76. package/esm2015/data/datagrid/datagrid-placeholder.js +2 -2
  77. package/esm2015/data/datagrid/datagrid-row-detail.js +9 -5
  78. package/esm2015/data/datagrid/datagrid-row.js +2 -2
  79. package/esm2015/data/datagrid/datagrid.js +2 -2
  80. package/esm2015/data/datagrid/datagrid.module.js +2 -2
  81. package/esm2015/data/datagrid/enums/column-changes.enum.js +2 -2
  82. package/esm2015/data/datagrid/enums/display-mode.enum.js +2 -2
  83. package/esm2015/data/datagrid/enums/render-step.enum.js +2 -2
  84. package/esm2015/data/datagrid/enums/selection-type.js +2 -2
  85. package/esm2015/data/datagrid/enums/sort-order.enum.js +2 -2
  86. package/esm2015/data/datagrid/index.js +2 -2
  87. package/esm2015/data/datagrid/interfaces/column-state.interface.js +6 -1
  88. package/esm2015/data/datagrid/interfaces/comparator.interface.js +6 -1
  89. package/esm2015/data/datagrid/interfaces/filter.interface.js +6 -1
  90. package/esm2015/data/datagrid/interfaces/numeric-filter.interface.js +6 -1
  91. package/esm2015/data/datagrid/interfaces/state.interface.js +6 -1
  92. package/esm2015/data/datagrid/interfaces/string-filter.interface.js +6 -1
  93. package/esm2015/data/datagrid/providers/column-resizer.service.js +2 -2
  94. package/esm2015/data/datagrid/providers/column-state.provider.js +2 -2
  95. package/esm2015/data/datagrid/providers/columns.service.js +2 -2
  96. package/esm2015/data/datagrid/providers/custom-filter.js +2 -2
  97. package/esm2015/data/datagrid/providers/detail.service.js +2 -2
  98. package/esm2015/data/datagrid/providers/display-mode.service.js +2 -2
  99. package/esm2015/data/datagrid/providers/filters.js +2 -2
  100. package/esm2015/data/datagrid/providers/global-expandable-rows.js +2 -2
  101. package/esm2015/data/datagrid/providers/items.js +2 -2
  102. package/esm2015/data/datagrid/providers/page.js +2 -2
  103. package/esm2015/data/datagrid/providers/row-action-service.js +2 -2
  104. package/esm2015/data/datagrid/providers/selection.js +2 -2
  105. package/esm2015/data/datagrid/providers/sort.js +2 -2
  106. package/esm2015/data/datagrid/providers/state-debouncer.provider.js +2 -2
  107. package/esm2015/data/datagrid/providers/state.provider.js +2 -2
  108. package/esm2015/data/datagrid/providers/table-size.service.js +2 -2
  109. package/esm2015/data/datagrid/render/cell-renderer.js +2 -2
  110. package/esm2015/data/datagrid/render/constants.js +2 -2
  111. package/esm2015/data/datagrid/render/header-renderer.js +2 -2
  112. package/esm2015/data/datagrid/render/main-renderer.js +2 -2
  113. package/esm2015/data/datagrid/render/noop-dom-adapter.js +2 -2
  114. package/esm2015/data/datagrid/render/render-organizer.js +2 -2
  115. package/esm2015/data/datagrid/render/row-renderer.js +2 -2
  116. package/esm2015/data/datagrid/utils/datagrid-filter-registrar.js +2 -2
  117. package/esm2015/data/datagrid/wrapped-cell.js +2 -2
  118. package/esm2015/data/datagrid/wrapped-column.js +2 -2
  119. package/esm2015/data/datagrid/wrapped-row.js +2 -2
  120. package/esm2015/data/index.js +2 -2
  121. package/esm2015/data/stack-view/index.js +2 -2
  122. package/esm2015/data/stack-view/stack-block.js +27 -9
  123. package/esm2015/data/stack-view/stack-content-input.js +2 -2
  124. package/esm2015/data/stack-view/stack-control.js +2 -2
  125. package/esm2015/data/stack-view/stack-header.js +2 -2
  126. package/esm2015/data/stack-view/stack-input.js +2 -2
  127. package/esm2015/data/stack-view/stack-select.js +2 -2
  128. package/esm2015/data/stack-view/stack-view-custom-tags.js +45 -4
  129. package/esm2015/data/stack-view/stack-view.js +2 -2
  130. package/esm2015/data/stack-view/stack-view.module.js +4 -3
  131. package/esm2015/data/tree-view/index.js +2 -2
  132. package/esm2015/data/tree-view/models/async-array.js +2 -2
  133. package/esm2015/data/tree-view/models/declarative-tree-node.model.js +2 -2
  134. package/esm2015/data/tree-view/models/recursive-tree-node.model.js +2 -2
  135. package/esm2015/data/tree-view/models/selected-state.enum.js +2 -2
  136. package/esm2015/data/tree-view/models/tree-node.model.js +2 -2
  137. package/esm2015/data/tree-view/recursive-children.js +2 -2
  138. package/esm2015/data/tree-view/recursive-for-of.js +2 -2
  139. package/esm2015/data/tree-view/tree-features.service.js +2 -2
  140. package/esm2015/data/tree-view/tree-focus-manager.service.js +2 -2
  141. package/esm2015/data/tree-view/tree-node-link.js +2 -2
  142. package/esm2015/data/tree-view/tree-node.js +2 -3
  143. package/esm2015/data/tree-view/tree-view.module.js +2 -2
  144. package/esm2015/data/tree-view/tree.js +2 -2
  145. package/esm2015/emphasis/alert/alert-item.js +4 -3
  146. package/esm2015/emphasis/alert/alert-text.js +2 -2
  147. package/esm2015/emphasis/alert/alert.js +2 -2
  148. package/esm2015/emphasis/alert/alert.module.js +2 -2
  149. package/esm2015/emphasis/alert/alerts-pager.js +2 -2
  150. package/esm2015/emphasis/alert/alerts.js +2 -2
  151. package/esm2015/emphasis/alert/index.js +2 -2
  152. package/esm2015/emphasis/alert/providers/icon-and-types.service.js +2 -2
  153. package/esm2015/emphasis/alert/providers/multi-alert.service.js +2 -2
  154. package/esm2015/emphasis/alert/utils/alert-info-object.js +2 -2
  155. package/esm2015/emphasis/alert/utils/alert-types.js +2 -2
  156. package/esm2015/emphasis/emphasis.module.js +2 -2
  157. package/esm2015/emphasis/index.js +2 -2
  158. package/esm2015/forms/checkbox/checkbox-container.js +3 -3
  159. package/esm2015/forms/checkbox/checkbox-wrapper.js +3 -3
  160. package/esm2015/forms/checkbox/checkbox.js +3 -3
  161. package/esm2015/forms/checkbox/checkbox.module.js +3 -3
  162. package/esm2015/forms/checkbox/index.js +2 -2
  163. package/esm2015/forms/combobox/combobox-container.js +3 -3
  164. package/esm2015/forms/combobox/combobox.js +3 -3
  165. package/esm2015/forms/combobox/combobox.module.js +3 -3
  166. package/esm2015/forms/combobox/index.js +2 -2
  167. package/esm2015/forms/combobox/model/combobox.model.js +3 -3
  168. package/esm2015/forms/combobox/model/multi-select-combobox.model.js +3 -3
  169. package/esm2015/forms/combobox/model/pseudo-focus.model.js +3 -3
  170. package/esm2015/forms/combobox/model/single-select-combobox.model.js +3 -3
  171. package/esm2015/forms/combobox/option-items.directive.js +2 -2
  172. package/esm2015/forms/combobox/option-selected.directive.js +2 -2
  173. package/esm2015/forms/combobox/option.js +3 -3
  174. package/esm2015/forms/combobox/options.js +3 -3
  175. package/esm2015/forms/combobox/providers/combobox-container.service.js +2 -2
  176. package/esm2015/forms/combobox/providers/combobox-focus-handler.service.js +2 -2
  177. package/esm2015/forms/combobox/providers/option-selection.service.js +2 -2
  178. package/esm2015/forms/common/abstract-container.js +3 -3
  179. package/esm2015/forms/common/abstract-control.js +3 -3
  180. package/esm2015/forms/common/common.module.js +3 -3
  181. package/esm2015/forms/common/control-container.js +3 -3
  182. package/esm2015/forms/common/control.js +2 -2
  183. package/esm2015/forms/common/error.js +3 -3
  184. package/esm2015/forms/common/form.js +3 -3
  185. package/esm2015/forms/common/helper.js +3 -3
  186. package/esm2015/forms/common/if-control-state/abstract-if-state.js +2 -2
  187. package/esm2015/forms/common/if-control-state/if-control-state.service.js +2 -2
  188. package/esm2015/forms/common/if-control-state/if-error.js +2 -2
  189. package/esm2015/forms/common/if-control-state/if-success.js +2 -2
  190. package/esm2015/forms/common/index.js +2 -2
  191. package/esm2015/forms/common/label.js +2 -2
  192. package/esm2015/forms/common/layout.js +3 -3
  193. package/esm2015/forms/common/providers/container-id.service.js +6 -1
  194. package/esm2015/forms/common/providers/control-class.service.js +2 -2
  195. package/esm2015/forms/common/providers/control-id.service.js +2 -2
  196. package/esm2015/forms/common/providers/focus.service.js +2 -2
  197. package/esm2015/forms/common/providers/layout.service.js +2 -2
  198. package/esm2015/forms/common/providers/mark-control.service.js +2 -2
  199. package/esm2015/forms/common/providers/ng-control.service.js +2 -2
  200. package/esm2015/forms/common/success.js +3 -3
  201. package/esm2015/forms/common/wrapped-control.js +3 -3
  202. package/esm2015/forms/datalist/datalist-container.js +3 -3
  203. package/esm2015/forms/datalist/datalist-input.js +3 -3
  204. package/esm2015/forms/datalist/datalist.js +2 -2
  205. package/esm2015/forms/datalist/datalist.module.js +2 -2
  206. package/esm2015/forms/datalist/index.js +2 -2
  207. package/esm2015/forms/datalist/providers/datalist-id.service.js +2 -2
  208. package/esm2015/forms/datepicker/calendar.js +2 -2
  209. package/esm2015/forms/datepicker/date-container.js +36 -6
  210. package/esm2015/forms/datepicker/date-input.js +2 -2
  211. package/esm2015/forms/datepicker/datepicker-view-manager.js +8 -3
  212. package/esm2015/forms/datepicker/datepicker.module.js +2 -2
  213. package/esm2015/forms/datepicker/day.js +3 -2
  214. package/esm2015/forms/datepicker/daypicker.js +2 -2
  215. package/esm2015/forms/datepicker/index.js +2 -2
  216. package/esm2015/forms/datepicker/interfaces/date-range.interface.js +2 -2
  217. package/esm2015/forms/datepicker/interfaces/day-of-week.interface.js +2 -2
  218. package/esm2015/forms/datepicker/model/calendar-view.model.js +2 -2
  219. package/esm2015/forms/datepicker/model/calendar.model.js +2 -2
  220. package/esm2015/forms/datepicker/model/day-view.model.js +2 -2
  221. package/esm2015/forms/datepicker/model/day.model.js +2 -2
  222. package/esm2015/forms/datepicker/model/year-range.model.js +2 -2
  223. package/esm2015/forms/datepicker/monthpicker.js +2 -2
  224. package/esm2015/forms/datepicker/providers/date-form-control.service.js +2 -2
  225. package/esm2015/forms/datepicker/providers/date-io.service.js +2 -2
  226. package/esm2015/forms/datepicker/providers/date-navigation.service.js +2 -2
  227. package/esm2015/forms/datepicker/providers/datepicker-enabled.service.js +2 -2
  228. package/esm2015/forms/datepicker/providers/datepicker-focus.service.js +2 -2
  229. package/esm2015/forms/datepicker/providers/locale-helper.service.js +2 -2
  230. package/esm2015/forms/datepicker/providers/view-manager.service.js +2 -2
  231. package/esm2015/forms/datepicker/utils/constants.js +2 -2
  232. package/esm2015/forms/datepicker/utils/date-utils.js +2 -2
  233. package/esm2015/forms/datepicker/yearpicker.js +2 -2
  234. package/esm2015/forms/forms.module.js +2 -2
  235. package/esm2015/forms/index.js +2 -2
  236. package/esm2015/forms/input/index.js +2 -2
  237. package/esm2015/forms/input/input-container.js +3 -3
  238. package/esm2015/forms/input/input.js +3 -3
  239. package/esm2015/forms/input/input.module.js +3 -3
  240. package/esm2015/forms/password/index.js +2 -2
  241. package/esm2015/forms/password/password-container.js +3 -3
  242. package/esm2015/forms/password/password.js +3 -3
  243. package/esm2015/forms/password/password.module.js +3 -3
  244. package/esm2015/forms/radio/index.js +2 -2
  245. package/esm2015/forms/radio/radio-container.js +3 -3
  246. package/esm2015/forms/radio/radio-wrapper.js +3 -3
  247. package/esm2015/forms/radio/radio.js +3 -3
  248. package/esm2015/forms/radio/radio.module.js +3 -3
  249. package/esm2015/forms/range/index.js +2 -2
  250. package/esm2015/forms/range/range-container.js +3 -3
  251. package/esm2015/forms/range/range.js +3 -3
  252. package/esm2015/forms/range/range.module.js +3 -3
  253. package/esm2015/forms/select/index.js +2 -2
  254. package/esm2015/forms/select/select-container.js +3 -3
  255. package/esm2015/forms/select/select.js +3 -3
  256. package/esm2015/forms/select/select.module.js +3 -3
  257. package/esm2015/forms/textarea/index.js +2 -2
  258. package/esm2015/forms/textarea/textarea-container.js +3 -3
  259. package/esm2015/forms/textarea/textarea.js +3 -3
  260. package/esm2015/forms/textarea/textarea.module.js +3 -3
  261. package/esm2015/icon/icon.js +2 -2
  262. package/esm2015/icon/icon.module.js +2 -2
  263. package/esm2015/icon/index.js +2 -2
  264. package/esm2015/index.js +2 -2
  265. package/esm2015/layout/index.js +2 -2
  266. package/esm2015/layout/layout.module.js +2 -2
  267. package/esm2015/layout/main-container/index.js +2 -2
  268. package/esm2015/layout/main-container/main-container.js +2 -2
  269. package/esm2015/layout/main-container/main-container.module.js +2 -2
  270. package/esm2015/layout/nav/chocolate/index.js +2 -2
  271. package/esm2015/layout/nav/chocolate/main-container-willy-wonka.js +2 -2
  272. package/esm2015/layout/nav/chocolate/nav-detection-oompa-loompa.js +2 -2
  273. package/esm2015/layout/nav/header.js +2 -2
  274. package/esm2015/layout/nav/index.js +2 -2
  275. package/esm2015/layout/nav/nav-level.js +2 -2
  276. package/esm2015/layout/nav/navigation.module.js +2 -2
  277. package/esm2015/layout/nav/providers/responsive-navigation.service.js +2 -2
  278. package/esm2015/layout/nav/responsive-nav-codes.js +2 -2
  279. package/esm2015/layout/nav/responsive-nav-control-message.js +2 -2
  280. package/esm2015/layout/tabs/chocolate/active-oompa-loompa.js +2 -2
  281. package/esm2015/layout/tabs/chocolate/tabs-willy-wonka.js +2 -2
  282. package/esm2015/layout/tabs/enums/tabs-layout.enum.js +2 -2
  283. package/esm2015/layout/tabs/index.js +2 -2
  284. package/esm2015/layout/tabs/providers/tabs.service.js +2 -2
  285. package/esm2015/layout/tabs/tab-content.js +2 -3
  286. package/esm2015/layout/tabs/tab-link.directive.js +2 -3
  287. package/esm2015/layout/tabs/tab-overflow-content.js +2 -2
  288. package/esm2015/layout/tabs/tab.js +2 -2
  289. package/esm2015/layout/tabs/tabs-id.provider.js +2 -2
  290. package/esm2015/layout/tabs/tabs.js +2 -2
  291. package/esm2015/layout/tabs/tabs.module.js +2 -2
  292. package/esm2015/layout/vertical-nav/index.js +2 -2
  293. package/esm2015/layout/vertical-nav/providers/vertical-nav-group-registration.service.js +2 -2
  294. package/esm2015/layout/vertical-nav/providers/vertical-nav-group.service.js +2 -2
  295. package/esm2015/layout/vertical-nav/providers/vertical-nav-icon.service.js +2 -2
  296. package/esm2015/layout/vertical-nav/providers/vertical-nav.service.js +2 -2
  297. package/esm2015/layout/vertical-nav/vertical-nav-group-children.js +2 -2
  298. package/esm2015/layout/vertical-nav/vertical-nav-group.js +5 -3
  299. package/esm2015/layout/vertical-nav/vertical-nav-icon.js +2 -2
  300. package/esm2015/layout/vertical-nav/vertical-nav-link.js +2 -2
  301. package/esm2015/layout/vertical-nav/vertical-nav.js +2 -2
  302. package/esm2015/layout/vertical-nav/vertical-nav.module.js +2 -2
  303. package/esm2015/modal/index.js +2 -2
  304. package/esm2015/modal/modal.js +3 -3
  305. package/esm2015/modal/modal.module.js +2 -2
  306. package/esm2015/popover/common/abstract-popover.js +2 -2
  307. package/esm2015/popover/common/popover-host-anchor.token.js +2 -2
  308. package/esm2015/popover/common/popover-options.interface.js +2 -2
  309. package/esm2015/popover/common/popover.js +2 -2
  310. package/esm2015/popover/dropdown/dropdown-item.js +2 -2
  311. package/esm2015/popover/dropdown/dropdown-menu.js +2 -2
  312. package/esm2015/popover/dropdown/dropdown-trigger.js +2 -2
  313. package/esm2015/popover/dropdown/dropdown.js +2 -2
  314. package/esm2015/popover/dropdown/dropdown.module.js +2 -2
  315. package/esm2015/popover/dropdown/index.js +2 -2
  316. package/esm2015/popover/dropdown/menu-positions.js +2 -2
  317. package/esm2015/popover/dropdown/providers/dropdown-focus-handler.service.js +2 -2
  318. package/esm2015/popover/dropdown/providers/dropdown.service.js +2 -2
  319. package/esm2015/popover/index.js +2 -2
  320. package/esm2015/popover/popover.module.js +2 -2
  321. package/esm2015/popover/signpost/index.js +2 -2
  322. package/esm2015/popover/signpost/providers/signpost-focus-manager.service.js +2 -2
  323. package/esm2015/popover/signpost/providers/signpost-id.service.js +2 -3
  324. package/esm2015/popover/signpost/signpost-content.js +2 -2
  325. package/esm2015/popover/signpost/signpost-positions.js +2 -2
  326. package/esm2015/popover/signpost/signpost-trigger.js +2 -2
  327. package/esm2015/popover/signpost/signpost.js +2 -2
  328. package/esm2015/popover/signpost/signpost.module.js +2 -2
  329. package/esm2015/popover/tooltip/index.js +2 -2
  330. package/esm2015/popover/tooltip/providers/tooltip-id.service.js +2 -2
  331. package/esm2015/popover/tooltip/tooltip-content.js +2 -2
  332. package/esm2015/popover/tooltip/tooltip-trigger.js +2 -2
  333. package/esm2015/popover/tooltip/tooltip.js +2 -2
  334. package/esm2015/popover/tooltip/tooltip.module.js +2 -2
  335. package/esm2015/progress/progress-bars/index.js +2 -2
  336. package/esm2015/progress/progress-bars/progress-bar.js +2 -2
  337. package/esm2015/progress/progress-bars/progress-bar.module.js +2 -2
  338. package/esm2015/progress/spinner/index.js +2 -2
  339. package/esm2015/progress/spinner/spinner.js +2 -2
  340. package/esm2015/progress/spinner/spinner.module.js +2 -2
  341. package/esm2015/public-api.js +2 -2
  342. package/esm2015/timeline/enums/timeline-layout.enum.js +2 -2
  343. package/esm2015/timeline/enums/timeline-step-state.enum.js +2 -2
  344. package/esm2015/timeline/index.js +2 -2
  345. package/esm2015/timeline/interface/icon-attribute.interface.js +2 -2
  346. package/esm2015/timeline/providers/timeline-icon-attribute.service.js +2 -2
  347. package/esm2015/timeline/timeline-step-description.js +2 -2
  348. package/esm2015/timeline/timeline-step-header.js +2 -2
  349. package/esm2015/timeline/timeline-step-title.js +2 -2
  350. package/esm2015/timeline/timeline-step.js +2 -2
  351. package/esm2015/timeline/timeline.js +2 -2
  352. package/esm2015/timeline/timeline.module.js +2 -2
  353. package/esm2015/utils/a11y/aria-live.service.js +2 -2
  354. package/esm2015/utils/a11y/index.js +2 -2
  355. package/esm2015/utils/animations/collapse/collapse.js +2 -2
  356. package/esm2015/utils/animations/collapse/index.js +2 -2
  357. package/esm2015/utils/animations/constants.js +2 -2
  358. package/esm2015/utils/animations/expandable-animation/expandable-animation.js +2 -2
  359. package/esm2015/utils/animations/expandable-animation/expandable-animation.module.js +2 -2
  360. package/esm2015/utils/animations/expandable-animation/index.js +6 -1
  361. package/esm2015/utils/animations/fade/fade.js +2 -2
  362. package/esm2015/utils/animations/fade/index.js +2 -2
  363. package/esm2015/utils/animations/fade-slide/fade-slide.js +2 -2
  364. package/esm2015/utils/animations/fade-slide/index.js +2 -2
  365. package/esm2015/utils/animations/index.js +2 -2
  366. package/esm2015/utils/animations/slide/index.js +2 -2
  367. package/esm2015/utils/animations/slide/slide.js +2 -2
  368. package/esm2015/utils/aria/aria.service.js +2 -2
  369. package/esm2015/utils/breakpoints/breakpoints.js +2 -2
  370. package/esm2015/utils/chocolate/oompa-loompa.js +2 -2
  371. package/esm2015/utils/chocolate/willy-wonka.js +2 -2
  372. package/esm2015/utils/component/is-boolean-attribute-set.js +2 -2
  373. package/esm2015/utils/conditional/conditional.module.js +2 -2
  374. package/esm2015/utils/conditional/if-active.directive.js +2 -2
  375. package/esm2015/utils/conditional/if-active.service.js +2 -2
  376. package/esm2015/utils/conditional/if-expanded.directive.js +2 -2
  377. package/esm2015/utils/conditional/if-expanded.service.js +2 -2
  378. package/esm2015/utils/conditional/if-open.directive.js +2 -2
  379. package/esm2015/utils/conditional/index.js +2 -2
  380. package/esm2015/utils/dom-adapter/dom-adapter.js +2 -2
  381. package/esm2015/utils/drag-and-drop/drag-and-drop.module.js +2 -2
  382. package/esm2015/utils/drag-and-drop/drag-event.js +6 -1
  383. package/esm2015/utils/drag-and-drop/drag-handle.js +2 -2
  384. package/esm2015/utils/drag-and-drop/draggable/draggable.js +2 -2
  385. package/esm2015/utils/drag-and-drop/draggable-ghost.js +2 -2
  386. package/esm2015/utils/drag-and-drop/droppable/droppable.js +2 -2
  387. package/esm2015/utils/drag-and-drop/if-dragged.js +2 -2
  388. package/esm2015/utils/drag-and-drop/index.js +2 -2
  389. package/esm2015/utils/drag-and-drop/interfaces/drag-event.interface.js +2 -2
  390. package/esm2015/utils/drag-and-drop/interfaces/drop-tolerance.interface.js +6 -1
  391. package/esm2015/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.js +2 -2
  392. package/esm2015/utils/drag-and-drop/providers/drag-event-listener.service.js +3 -3
  393. package/esm2015/utils/drag-and-drop/providers/drag-handle-registrar.service.js +2 -2
  394. package/esm2015/utils/drag-and-drop/providers/draggable-snapshot.service.js +2 -2
  395. package/esm2015/utils/drag-and-drop/providers/global-drag-mode.service.js +2 -2
  396. package/esm2015/utils/enums/key-codes.enum.js +2 -2
  397. package/esm2015/utils/focus/arrow-key-direction.enum.js +2 -2
  398. package/esm2015/utils/focus/focus-on-view-init/focus-on-view-init.js +2 -2
  399. package/esm2015/utils/focus/focus-on-view-init/focus-on-view-init.module.js +2 -2
  400. package/esm2015/utils/focus/focus-on-view-init/focus-on-view-init.provider.js +2 -2
  401. package/esm2015/utils/focus/focus-on-view-init/index.js +2 -2
  402. package/esm2015/utils/focus/focus.service.js +2 -2
  403. package/esm2015/utils/focus/focusable-item/basic-focusable-item.service.js +2 -2
  404. package/esm2015/utils/focus/focusable-item/custom-focusable-item-provider.js +2 -2
  405. package/esm2015/utils/focus/focusable-item/focusable-item.js +2 -2
  406. package/esm2015/utils/focus/focusable-item/linkers.js +2 -2
  407. package/esm2015/utils/focus/key-focus/enums/focus-direction.enum.js +2 -2
  408. package/esm2015/utils/focus/key-focus/interfaces.js +2 -2
  409. package/esm2015/utils/focus/key-focus/key-focus-item.js +2 -2
  410. package/esm2015/utils/focus/key-focus/key-focus.js +2 -2
  411. package/esm2015/utils/focus/key-focus/key-focus.module.js +2 -2
  412. package/esm2015/utils/focus/key-focus/roving-tabindex.js +2 -2
  413. package/esm2015/utils/focus/key-focus/util.js +2 -2
  414. package/esm2015/utils/focus/wrap-observable.js +2 -2
  415. package/esm2015/utils/focus-trap/focus-trap-config.interface.js +2 -2
  416. package/esm2015/utils/focus-trap/focus-trap-tracker.service.js +2 -2
  417. package/esm2015/utils/focus-trap/focus-trap.directive.js +2 -2
  418. package/esm2015/utils/focus-trap/focus-trap.module.js +2 -2
  419. package/esm2015/utils/focus-trap/index.js +2 -2
  420. package/esm2015/utils/forms/validation.js +2 -2
  421. package/esm2015/utils/host-wrapping/dynamic-wrapper.js +3 -3
  422. package/esm2015/utils/host-wrapping/empty-anchor.js +3 -3
  423. package/esm2015/utils/host-wrapping/host-wrapper.js +3 -3
  424. package/esm2015/utils/host-wrapping/host-wrapping.module.js +3 -3
  425. package/esm2015/utils/i18n/common-strings.default.js +9 -6
  426. package/esm2015/utils/i18n/common-strings.interface.js +6 -1
  427. package/esm2015/utils/i18n/common-strings.service.js +2 -2
  428. package/esm2015/utils/i18n/index.js +2 -2
  429. package/esm2015/utils/id-generator/id-generator.service.js +2 -2
  430. package/esm2015/utils/index.js +2 -2
  431. package/esm2015/utils/key-codes/key-codes.js +2 -2
  432. package/esm2015/utils/loading/index.js +2 -2
  433. package/esm2015/utils/loading/loading-listener.js +2 -2
  434. package/esm2015/utils/loading/loading.js +2 -2
  435. package/esm2015/utils/loading/loading.module.js +2 -2
  436. package/esm2015/utils/outside-click/index.js +6 -1
  437. package/esm2015/utils/outside-click/outside-click.js +2 -2
  438. package/esm2015/utils/outside-click/outside-click.module.js +2 -2
  439. package/esm2015/utils/popover/enums/alignment.enum.js +2 -3
  440. package/esm2015/utils/popover/enums/axis.enum.js +2 -3
  441. package/esm2015/utils/popover/enums/positions.enum.js +2 -3
  442. package/esm2015/utils/popover/enums/side.enum.js +2 -3
  443. package/esm2015/utils/popover/enums/viewport-violation.enum.js +2 -3
  444. package/esm2015/utils/popover/index.js +2 -3
  445. package/esm2015/utils/popover/interfaces/popover-content-offset.interface.js +2 -3
  446. package/esm2015/utils/popover/interfaces/popover-position.interface.js +2 -3
  447. package/esm2015/utils/popover/interfaces/visibility-coords.interface.js +2 -3
  448. package/esm2015/utils/popover/popover-anchor.js +2 -3
  449. package/esm2015/utils/popover/popover-close-button.js +2 -3
  450. package/esm2015/utils/popover/popover-content.js +2 -3
  451. package/esm2015/utils/popover/popover-open-close-button.js +2 -3
  452. package/esm2015/utils/popover/popover.module.js +2 -3
  453. package/esm2015/utils/popover/position-operators.js +2 -3
  454. package/esm2015/utils/popover/providers/popover-events.service.js +2 -3
  455. package/esm2015/utils/popover/providers/popover-position.service.js +2 -3
  456. package/esm2015/utils/popover/providers/popover-toggle.service.js +2 -3
  457. package/esm2015/utils/scrolling/scrolling-service.js +2 -2
  458. package/esm2015/utils/template-ref/index.js +6 -1
  459. package/esm2015/utils/template-ref/template-ref-container.js +2 -2
  460. package/esm2015/utils/template-ref/template-ref.module.js +2 -2
  461. package/esm2015/wizard/index.js +2 -2
  462. package/esm2015/wizard/providers/button-hub.service.js +2 -2
  463. package/esm2015/wizard/providers/header-actions.service.js +2 -2
  464. package/esm2015/wizard/providers/page-collection.service.js +2 -2
  465. package/esm2015/wizard/providers/wizard-navigation.service.js +2 -2
  466. package/esm2015/wizard/wizard-button.js +2 -2
  467. package/esm2015/wizard/wizard-custom-tags.js +2 -2
  468. package/esm2015/wizard/wizard-header-action.js +2 -2
  469. package/esm2015/wizard/wizard-page-buttons.js +2 -2
  470. package/esm2015/wizard/wizard-page-header-actions.js +2 -2
  471. package/esm2015/wizard/wizard-page-navtitle.js +2 -2
  472. package/esm2015/wizard/wizard-page-title.js +2 -2
  473. package/esm2015/wizard/wizard-page.js +2 -2
  474. package/esm2015/wizard/wizard-stepnav-item.js +2 -2
  475. package/esm2015/wizard/wizard-stepnav.js +2 -2
  476. package/esm2015/wizard/wizard.js +2 -2
  477. package/esm2015/wizard/wizard.module.js +2 -2
  478. package/fesm2015/clr-angular.js +707 -543
  479. package/fesm2015/clr-angular.js.map +1 -1
  480. package/forms/checkbox/checkbox-container.d.ts +0 -5
  481. package/forms/checkbox/checkbox-wrapper.d.ts +0 -5
  482. package/forms/checkbox/checkbox.d.ts +0 -5
  483. package/forms/checkbox/checkbox.module.d.ts +0 -5
  484. package/forms/combobox/combobox-container.d.ts +0 -5
  485. package/forms/combobox/combobox.d.ts +0 -5
  486. package/forms/combobox/combobox.module.d.ts +0 -5
  487. package/forms/combobox/model/combobox.model.d.ts +0 -5
  488. package/forms/combobox/model/multi-select-combobox.model.d.ts +0 -5
  489. package/forms/combobox/model/pseudo-focus.model.d.ts +0 -5
  490. package/forms/combobox/model/single-select-combobox.model.d.ts +0 -5
  491. package/forms/combobox/option.d.ts +0 -5
  492. package/forms/combobox/options.d.ts +0 -5
  493. package/forms/common/abstract-container.d.ts +0 -5
  494. package/forms/common/abstract-control.d.ts +0 -5
  495. package/forms/common/common.module.d.ts +0 -5
  496. package/forms/common/control-container.d.ts +0 -5
  497. package/forms/common/error.d.ts +0 -5
  498. package/forms/common/form.d.ts +0 -5
  499. package/forms/common/helper.d.ts +0 -5
  500. package/forms/common/layout.d.ts +0 -5
  501. package/forms/common/success.d.ts +0 -5
  502. package/forms/common/wrapped-control.d.ts +0 -5
  503. package/forms/datalist/datalist-container.d.ts +0 -5
  504. package/forms/datalist/datalist-input.d.ts +0 -5
  505. package/forms/datepicker/date-container.d.ts +11 -2
  506. package/forms/datepicker/datepicker-view-manager.d.ts +3 -1
  507. package/forms/input/input-container.d.ts +0 -5
  508. package/forms/input/input.d.ts +0 -5
  509. package/forms/input/input.module.d.ts +0 -5
  510. package/forms/password/password-container.d.ts +0 -5
  511. package/forms/password/password.d.ts +0 -5
  512. package/forms/password/password.module.d.ts +0 -5
  513. package/forms/radio/radio-container.d.ts +0 -5
  514. package/forms/radio/radio-wrapper.d.ts +0 -5
  515. package/forms/radio/radio.d.ts +0 -5
  516. package/forms/radio/radio.module.d.ts +0 -5
  517. package/forms/range/range-container.d.ts +0 -5
  518. package/forms/range/range.d.ts +0 -5
  519. package/forms/range/range.module.d.ts +0 -5
  520. package/forms/select/select-container.d.ts +0 -5
  521. package/forms/select/select.d.ts +0 -5
  522. package/forms/select/select.module.d.ts +0 -5
  523. package/forms/textarea/textarea-container.d.ts +0 -5
  524. package/forms/textarea/textarea.d.ts +0 -5
  525. package/forms/textarea/textarea.module.d.ts +0 -5
  526. package/layout/vertical-nav/vertical-nav-group.d.ts +1 -0
  527. package/package.json +5 -15
  528. package/utils/host-wrapping/dynamic-wrapper.d.ts +0 -5
  529. package/utils/host-wrapping/empty-anchor.d.ts +0 -5
  530. package/utils/host-wrapping/host-wrapper.d.ts +0 -5
  531. package/utils/host-wrapping/host-wrapping.module.d.ts +0 -5
  532. package/utils/i18n/common-strings.interface.d.ts +19 -0
  533. package/schematics/add/index.js +0 -123
  534. package/schematics/add/index.js.map +0 -1
  535. package/schematics/add/index.spec.js +0 -114
  536. package/schematics/add/index.spec.js.map +0 -1
  537. package/schematics/add/schema.json +0 -18
  538. package/schematics/collection.json +0 -10
  539. package/schematics/migration-collection.json +0 -20
  540. package/schematics/update/update-0.13.0.js +0 -147
  541. package/schematics/update/update-0.13.0.js.map +0 -1
  542. package/schematics/update/update-3.0.0.js +0 -89
  543. package/schematics/update/update-3.0.0.js.map +0 -1
  544. package/schematics/update/update-5.0.0.js +0 -37
  545. package/schematics/update/update-5.0.0.js.map +0 -1
  546. package/schematics/update/update-5.0.0.spec.js +0 -71
  547. package/schematics/update/update-5.0.0.spec.js.map +0 -1
  548. package/schematics/utility/add-assets-to-config-file.js +0 -25
  549. package/schematics/utility/add-assets-to-config-file.js.map +0 -1
  550. package/schematics/utility/add-module-import-to-module.js +0 -36
  551. package/schematics/utility/add-module-import-to-module.js.map +0 -1
  552. package/schematics/utility/angular-config-filename.js +0 -10
  553. package/schematics/utility/angular-config-filename.js.map +0 -1
  554. package/schematics/utility/compare-versions.js +0 -30
  555. package/schematics/utility/compare-versions.js.map +0 -1
  556. package/schematics/utility/config.js +0 -32
  557. package/schematics/utility/config.js.map +0 -1
  558. package/schematics/utility/find-app-module.js +0 -17
  559. package/schematics/utility/find-app-module.js.map +0 -1
  560. package/schematics/utility/get-file-content.js +0 -12
  561. package/schematics/utility/get-file-content.js.map +0 -1
  562. package/schematics/utility/get-index-html-path.js +0 -14
  563. package/schematics/utility/get-index-html-path.js.map +0 -1
  564. package/schematics/utility/get-json-file.js +0 -25
  565. package/schematics/utility/get-json-file.js.map +0 -1
  566. package/schematics/utility/get-main-path.js +0 -14
  567. package/schematics/utility/get-main-path.js.map +0 -1
  568. package/schematics/utility/get-typescript-source-file.js +0 -26
  569. package/schematics/utility/get-typescript-source-file.js.map +0 -1
  570. package/schematics/utility/ng-add-options.js +0 -8
  571. package/schematics/utility/ng-add-options.js.map +0 -1
  572. package/schematics/utility/run-npm-install.js +0 -14
  573. package/schematics/utility/run-npm-install.js.map +0 -1
  574. package/schematics/utility/setup-project.js +0 -37
  575. package/schematics/utility/setup-project.js.map +0 -1
  576. package/schematics/utility/update-json-file.js +0 -17
  577. package/schematics/utility/update-json-file.js.map +0 -1
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
4
- * This software is released under MIT license.
5
- * The full license information can be found in LICENSE in the root directory of this project.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.getVersion = void 0;
9
- const schematics_1 = require("@angular-devkit/schematics");
10
- const fs_1 = require("fs");
11
- const path_1 = require("path");
12
- const get_json_file_1 = require("../utility/get-json-file");
13
- const update_json_file_1 = require("../utility/update-json-file");
14
- const find_app_module_1 = require("../utility/find-app-module");
15
- const add_module_import_to_module_1 = require("../utility/add-module-import-to-module");
16
- const run_npm_install_1 = require("../utility/run-npm-install");
17
- const add_assets_to_config_file_1 = require("../utility/add-assets-to-config-file");
18
- const angular_config_filename_1 = require("../utility/angular-config-filename");
19
- let projectSettings = {};
20
- // TODO: Stop using fs, keep the version somewhere else
21
- // Determine where to load the package.json, if doing local dev or not
22
- let corePackage;
23
- if (fs_1.existsSync(path_1.join(__dirname, '../../package.json'))) {
24
- corePackage = require('../../package.json');
25
- }
26
- else {
27
- corePackage = require('../../../../package.json');
28
- }
29
- function setProjectSettings(options) {
30
- return (host) => {
31
- if (!host.exists(angular_config_filename_1.configFileName)) {
32
- throw new schematics_1.SchematicsException('Could not install Clarity, requires Angular and Angular CLI version 6 or greater');
33
- }
34
- projectSettings = Object.assign({}, options);
35
- const config = get_json_file_1.getJsonFile(host, angular_config_filename_1.configFileName);
36
- if (!options.project) {
37
- if (!config.defaultProject) {
38
- throw new schematics_1.SchematicsException('Could not find a default project, please specify --project PROJECT_NAME');
39
- }
40
- projectSettings.project = config.defaultProject;
41
- }
42
- projectSettings.module = find_app_module_1.findAppModule(host, config, projectSettings.project || '');
43
- };
44
- }
45
- // Checks if a version of Angular is compatible with current or next
46
- function getVersion(ngVersion, clrVersion) {
47
- const majorNgVersion = Number.parseInt(ngVersion.split('.')[0].replace(/\D/g, ''));
48
- if (majorNgVersion >= 12) {
49
- return getVersionsAfterTwelve(ngVersion, clrVersion);
50
- }
51
- else {
52
- // Otherwise, just link to installed version for latest or next releases
53
- return getVersionsBeforeTwelve(ngVersion, clrVersion);
54
- }
55
- }
56
- exports.getVersion = getVersion;
57
- function getVersionsAfterTwelve(ngVersion, clrVersion) {
58
- const majorNgVersion = Number.parseInt(ngVersion.split('.')[0].replace(/\D/g, ''));
59
- const majorClrVersion = Number.parseInt(clrVersion.split('.')[0].replace(/\D/g, ''));
60
- if (majorNgVersion === majorClrVersion) {
61
- return clrVersion;
62
- }
63
- else {
64
- // Otherwise, just link to installed version for latest or next releases
65
- throw new schematics_1.SchematicsException(`Clarity ${majorClrVersion} doesn't support Angular ${majorNgVersion}`);
66
- }
67
- }
68
- function getVersionsBeforeTwelve(ngVersion, clrVersion) {
69
- const diff = 6; // Number disparity between Angular and Clarity, this works as long as we stay in sync with versioning
70
- const majorNgVersion = Number.parseInt(ngVersion.split('.')[0].replace(/\D/g, ''));
71
- const majorClrVersion = Number.parseInt(clrVersion.split('.')[0].replace(/\D/g, ''));
72
- if (majorNgVersion - majorClrVersion < diff) {
73
- return `^${majorNgVersion - diff}.0.0`;
74
- }
75
- else {
76
- // Otherwise, just link to installed version for latest or next releases
77
- return clrVersion;
78
- }
79
- }
80
- function addClarityDependencies(host) {
81
- update_json_file_1.updateJsonFile(host, 'package.json', json => {
82
- const version = getVersion(json.dependencies['@angular/core'], corePackage.version);
83
- json.dependencies['@clr/angular'] = version;
84
- json.dependencies['@clr/ui'] = version;
85
- json.dependencies['@cds/core'] = '^5.0.0';
86
- });
87
- }
88
- function addAssetsToConfigFile(host, context) {
89
- update_json_file_1.updateJsonFile(host, angular_config_filename_1.configFileName, json => {
90
- const project = Object.keys(json.projects).find(key => key === projectSettings.project);
91
- if (!project) {
92
- context.logger.warn(`Could not update CLI config file to add styles. You'll have to add them manually.`);
93
- return;
94
- }
95
- const target = json.projects[project].targets || json.projects[project].architect;
96
- const pathPrefix = json.apps ? '../' : '';
97
- add_assets_to_config_file_1.updateStyleAssets(target, pathPrefix, ['node_modules/@clr/ui/clr-ui.min.css']);
98
- });
99
- }
100
- function importClarityModule() {
101
- return (host) => add_module_import_to_module_1.addModuleImportToModule(host, 'ClarityModule', '@clr/angular', projectSettings.module || '');
102
- }
103
- function importBrowserAnimationsModule() {
104
- return (host) => add_module_import_to_module_1.addModuleImportToModule(host, 'BrowserAnimationsModule', '@angular/platform-browser/animations', projectSettings.module || '');
105
- }
106
- // Chain a series of tasks to setup Clarity
107
- // 1. Add Clarity dependencies
108
- // 2. Add style assets to angular.json
109
- // 3. Add ClarityModule to NgModule
110
- // 4. Add BrowserAnimationsModule to NgModule
111
- // 5. Run npm install
112
- function default_1(options) {
113
- return schematics_1.chain([
114
- setProjectSettings(options),
115
- addClarityDependencies,
116
- addAssetsToConfigFile,
117
- importClarityModule,
118
- importBrowserAnimationsModule,
119
- run_npm_install_1.runNpmInstall,
120
- ]);
121
- }
122
- exports.default = default_1;
123
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/schematics/src/add/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,2DAAsG;AACtG,2BAAgC;AAChC,+BAA4B;AAC5B,4DAAuD;AACvD,kEAA6D;AAC7D,gEAA2D;AAC3D,wFAAiF;AACjF,gEAA2D;AAC3D,oFAAyE;AACzE,gFA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AI,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,6BAA6B;IACpC,OAAO,CAAC,IAAU,EAAQ,EAAE,CAC1B,qDAAuB,CACrB,IAAI,EACJ,yBAAyB,EACzB,sCAAsC,EACtC,eAAe,CAAC,MAAM,IAAI,EAAE,CAC7B,CAAC;AACN,CAAC;AAED,2CAA2C;AAC3C,8BAA8B;AAC9B,sCAAsC;AACtC,mCAAmC;AACnC,6CAA6C;AAC7C,qBAAqB;AACrB,mBAAyB,OAAqB;IAC5C,OAAO,kBAAK,CAAC;QACX,kBAAkB,CAAC,OAAO,CAAC;QAC3B,sBAAsB;QACtB,qBAAqB;QACrB,mBAAmB;QACnB,6BAA6B;QAC7B,+BAAa;KACd,CAAC,CAAC;AACL,CAAC;AATD,4BASC"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
4
- * This software is released under MIT license.
5
- * The full license information can be found in LICENSE in the root directory of this project.
6
- */
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const schematics_1 = require("@angular-devkit/schematics");
18
- const testing_1 = require("@angular-devkit/schematics/testing");
19
- const path_1 = require("path");
20
- const _1 = require(".");
21
- const get_file_content_1 = require("../utility/get-file-content");
22
- const setup_project_1 = require("../utility/setup-project");
23
- const PROJECT_NAME = 'foo';
24
- const collectionPath = path_1.join(__dirname, '../collection.json');
25
- describe('ng add @clr/angular', () => {
26
- it('should print an error if executed in an empty directory', () => __awaiter(void 0, void 0, void 0, function* () {
27
- const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
28
- try {
29
- yield runner.runSchematicAsync('ng-add', { module: 'app' }, schematics_1.Tree.empty()).toPromise();
30
- fail('expected to throw');
31
- }
32
- catch (e) {
33
- expect(e instanceof schematics_1.SchematicsException);
34
- expect(e.message).toEqual('Could not install Clarity, requires Angular and Angular CLI version 6 or greater');
35
- }
36
- }));
37
- describe('in a new Angular workspace', () => __awaiter(void 0, void 0, void 0, function* () {
38
- let runner;
39
- let workspaceTree;
40
- beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
41
- runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
42
- workspaceTree = yield setup_project_1.setupProject(new testing_1.UnitTestTree(new schematics_1.HostTree()), runner, PROJECT_NAME);
43
- }));
44
- it('should add dependencies to Clarity packages', () => __awaiter(void 0, void 0, void 0, function* () {
45
- const tree = yield runner.runSchematicAsync('ng-add', {}, workspaceTree).toPromise();
46
- const packageJsonPath = '/package.json';
47
- expect(tree.files).toContain(packageJsonPath);
48
- const { dependencies } = JSON.parse(get_file_content_1.getFileContent(tree, packageJsonPath));
49
- expect(dependencies).toBeDefined();
50
- expect(dependencies['@clr/angular']).toBeDefined();
51
- expect(dependencies['@clr/ui']).toBeDefined();
52
- expect(dependencies['@cds/core']).toBeDefined();
53
- }));
54
- it('should add Clarity assets in the configuration file', () => __awaiter(void 0, void 0, void 0, function* () {
55
- const tree = yield runner.runSchematicAsync('ng-add', {}, workspaceTree).toPromise();
56
- const configFilePath = '/angular.json';
57
- expect(tree.files).toContain(configFilePath);
58
- const configFile = JSON.parse(get_file_content_1.getFileContent(tree, configFilePath));
59
- const styles = configFile.projects[PROJECT_NAME].architect.build.options.styles;
60
- expect(styles.includes('node_modules/@clr/ui/clr-ui.min.css')).toBeTruthy();
61
- }));
62
- it('should add return Clarity version as correct', () => __awaiter(void 0, void 0, void 0, function* () {
63
- const correct = _1.getVersion('^12.0.0', '12.0.0-next.0');
64
- expect(correct).toEqual('12.0.0-next.0');
65
- }));
66
- it('should throw a not support message', () => __awaiter(void 0, void 0, void 0, function* () {
67
- try {
68
- _1.getVersion('^12.0.0', '13.0.0');
69
- }
70
- catch (e) {
71
- expect(e.message).toEqual(`Clarity 13 doesn't support Angular 12`);
72
- }
73
- }));
74
- it('should return Clarity version 5', () => __awaiter(void 0, void 0, void 0, function* () {
75
- const correct = _1.getVersion('^11.0.0', '12.0.0');
76
- expect(correct).toEqual('^5.0.0');
77
- }));
78
- it('should return Clarity version 4', () => __awaiter(void 0, void 0, void 0, function* () {
79
- const correct = _1.getVersion('^10.0.0', '12.0.0');
80
- expect(correct).toEqual('^4.0.0');
81
- }));
82
- it('should return Clarity version 3', () => __awaiter(void 0, void 0, void 0, function* () {
83
- const correct = _1.getVersion('^9.0.0', '12.0.0');
84
- expect(correct).toEqual('^3.0.0');
85
- }));
86
- it('should not add Clarity assets in the configuration file if they are already present', () => __awaiter(void 0, void 0, void 0, function* () {
87
- const configFilePath = '/angular.json';
88
- const configFile = JSON.parse(get_file_content_1.getFileContent(workspaceTree, configFilePath));
89
- const styles = configFile.projects[PROJECT_NAME].architect.build.options.styles || [];
90
- styles.push('node_modules/@clr/ui/clr-ui');
91
- configFile.projects[PROJECT_NAME].architect.build.options.styles = styles;
92
- workspaceTree.overwrite(configFilePath, JSON.stringify(configFile, null, 2));
93
- const tree = yield runner.runSchematicAsync('ng-add', {}, workspaceTree).toPromise();
94
- expect(tree.files).toContain(configFilePath);
95
- const updatedConfigFile = JSON.parse(get_file_content_1.getFileContent(tree, configFilePath));
96
- const updatedStyles = updatedConfigFile.projects[PROJECT_NAME].architect.build.options.styles;
97
- expect(updatedStyles.includes('node_modules/@clr/ui/clr-ui.min.css')).toBeFalsy();
98
- expect(updatedStyles.includes('node_modules/@clr/icons/clr-icons.min.css')).toBeFalsy();
99
- }));
100
- it('should import ClarityModule to the root module', () => __awaiter(void 0, void 0, void 0, function* () {
101
- const tree = yield runner.runSchematicAsync('ng-add', {}, workspaceTree).toPromise();
102
- const rootModulePath = '/src/app/app.module.ts';
103
- const content = get_file_content_1.getFileContent(tree, rootModulePath);
104
- expect(content).toMatch(/import { ClarityModule } from '@clr\/angular'/);
105
- }));
106
- it('should import BrowserAnimationsModule to the root module', () => __awaiter(void 0, void 0, void 0, function* () {
107
- const tree = yield runner.runSchematicAsync('ng-add', {}, workspaceTree).toPromise();
108
- const rootModulePath = '/src/app/app.module.ts';
109
- const content = get_file_content_1.getFileContent(tree, rootModulePath);
110
- expect(content).toMatch(/import { BrowserAnimationsModule } from '@angular\/platform-browser\/animations'/);
111
- }));
112
- }));
113
- });
114
- //# sourceMappingURL=index.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../projects/schematics/src/add/index.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;AAEH,2DAAiF;AACjF,gEAAuF;AACvF,+BAA4B;AAC5B,wBAA+B;AAC/B,kEAA6D;AAC7D,4DAAwD;AAExD,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,cAAc,GAAG,WAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAE7D,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,yDAAyD,EAAE,GAAS,EAAE;QACvE,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,IAAI;YACF,MAAM,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;YACtF,IAAI,CAAC,mBAAmB,CAAC,CAAC;SAC3B;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CA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
2
- "$schema": "http://json-schema.org/schema",
3
- "id": "SchematicsClarityAdd",
4
- "title": "Clarity Add Options Schema",
5
- "type": "object",
6
- "properties": {
7
- "project": {
8
- "type": "string",
9
- "description": "The project to add Clarity to."
10
- },
11
- "module": {
12
- "type": "string",
13
- "description": "The module file to add Clarity to, should be relative to project source directory.",
14
- "alias": "m",
15
- "default": "app/app.module.ts"
16
- }
17
- }
18
- }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "ng-add": {
5
- "description": "Add Clarity to your project",
6
- "factory": "./add",
7
- "schema": "./add/schema.json"
8
- }
9
- }
10
- }
@@ -1,20 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "migration-0001": {
5
- "version": "0.13.0-rc.1",
6
- "factory": "./update/update-0.13.0",
7
- "description": "Updates for Clarity 0.13.0"
8
- },
9
- "migration-0002": {
10
- "version": "3.0.0",
11
- "factory": "./update/update-3.0.0",
12
- "description": "Updates for Clarity 3.0.0"
13
- },
14
- "migration-5.0": {
15
- "version": "5.0.0",
16
- "factory": "./update/update-5.0.0",
17
- "description": "Updates for Clarity 5.0.0"
18
- }
19
- }
20
- }
@@ -1,147 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
4
- * This software is released under MIT license.
5
- * The full license information can be found in LICENSE in the root directory of this project.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- function default_1() {
9
- return (tree, _context) => {
10
- _context.logger.info(`---------------------------
11
- Start changes for Clarity 0.13.0
12
- ---------------------------`);
13
- const root = 'src';
14
- const messageFlags = {};
15
- function logMessage(type, message, filePath, version) {
16
- if (!messageFlags[message]) {
17
- _context.logger[type](`${message} (${filePath}) More info at https://vmware.github.io/clarity/news/${version}`);
18
- }
19
- messageFlags[message] = true;
20
- }
21
- function getNewClassname(oldClassname) {
22
- switch (oldClassname) {
23
- case 'Comparator':
24
- return 'ClrDatagridComparatorInterface';
25
- case 'Filter':
26
- return 'ClrDatagridFilterInterface';
27
- case 'SortOrder':
28
- return 'ClrDatagridSortOrder';
29
- case 'State':
30
- return 'ClrDatagridStateInterface';
31
- case 'StringFilter':
32
- return 'ClrDatagridStringFilterInterface';
33
- case 'Checkbox':
34
- return 'ClrCheckboxDeprecated';
35
- case 'DatagridHideableColumnDirective':
36
- return 'ClrDatagridHideableColumn';
37
- case 'NavLevelDirective':
38
- return 'ClrNavLevel';
39
- case 'TabLinkDirective':
40
- return 'clrTabLink';
41
- case 'WizardPageButtonsDirective':
42
- return 'ClrWizardPageButtons';
43
- case 'WizardPageHeaderActionsDirective':
44
- return 'ClrWizardPageHeaderActions';
45
- case 'WizardPageNavTitleDirective':
46
- return 'ClrWizardPageNavTitle';
47
- case 'WizardPageTitleDirective':
48
- return 'ClrWizardPageTitle';
49
- default:
50
- return 'Clr' + oldClassname;
51
- }
52
- }
53
- // Recurse through the directory scanning and changing text as we go
54
- function replaceContent(path) {
55
- const dir = tree.getDir(path);
56
- if (dir.subfiles.length) {
57
- dir.subfiles.forEach(file => {
58
- // Only care about typescript and html files
59
- if (!file.endsWith('.ts') && !file.endsWith('.html')) {
60
- return;
61
- }
62
- const filePath = path + '/' + file;
63
- const buffer = tree.read(filePath);
64
- if (!buffer) {
65
- return;
66
- }
67
- const content = buffer.toString('utf-8');
68
- let updated = content;
69
- // Remove forRoot and forChild usage (https://github.com/vmware/clarity/pull/2526)
70
- if (updated.search(/ClarityModule.forChild/g) > -1 || updated.search(/ClarityModule.forRoot/g) > -1) {
71
- logMessage('info', 'UPDATED: ClarityModule.forChild() and .forRoot() have been updated to just ClarityModule', filePath, '0.13.0-beta.1');
72
- updated = updated.replace('ClarityModule.forChild()', 'ClarityModule');
73
- updated = updated.replace('ClarityModule.forRoot()', 'ClarityModule');
74
- }
75
- // Check for deprecated classes and update if possible
76
- const reg = /import\s*{([^}]*)}\s*from\s*['"]@clr\/angular['"]/g;
77
- let result = reg.exec(updated);
78
- while (result !== null) {
79
- // We are using Cl instead of Clr in the regex for simplicity, because we export
80
- // `ClarityModule,` which would be covered by this regex.
81
- const classRegex = /\b(?!Cl)\w+\b/g;
82
- let importedClass = classRegex.exec(result[1]);
83
- while (importedClass !== null) {
84
- // prefix the directives that don't start with `CLR_`
85
- if (importedClass[0].search(/\b(?!CLR_)\w+_DIRECTIVES\b/g) > -1) {
86
- const re = new RegExp(importedClass[0], 'g');
87
- updated = updated.replace(re, 'CLR_$&');
88
- }
89
- // output error for classes that we are no longer formally exporting
90
- else if (importedClass[0].search(/menuPositions/g) > -1) {
91
- logMessage('error', 'ACTION REQUIRED: Clarity has removed `menuPositions`, you need to either remove all uses or follow migration instructions.', filePath, '0.13.0-beta.2');
92
- }
93
- // If the importedClass name doesn't follow any of the above, we add the `Clr` prefix.
94
- // We look up to see if there's a new name for it and change it to that. If there isn't,
95
- // we simply prepend `Clr` to it.
96
- else {
97
- const re = new RegExp(importedClass[0], 'g');
98
- updated = updated.replace(re, getNewClassname(importedClass[0]));
99
- }
100
- // update to next class name for the while loop
101
- importedClass = classRegex.exec(result[1]);
102
- }
103
- result = reg.exec(updated);
104
- }
105
- // Alert to using ClrCodeHighlight
106
- if (updated.search(/ClrCodeHighlight/g) > -1 ||
107
- updated.search(/clr-code-highlight/g) > -1 ||
108
- updated.search(/ClrCodeModule/g) > -1 ||
109
- updated.search(/ClrSyntaxHighlightModule/g) > -1) {
110
- logMessage('error', 'ACTION REQUIRED: Clarity has removed ClrCodeHighlight component and ClrCodeModule, you need either remove all uses or follow migration instructions.', filePath, '0.13.0-beta.2');
111
- }
112
- // Alert to wizard ghost pages (https://github.com/vmware/clarity/pull/2531)
113
- if (updated.search(/clrWizardShowGhostPages/g) > -1) {
114
- logMessage('error', 'ACTION REQUIRED: Clarity has removed ghost pages from the Wizard component, please update your wizards accordingly.', filePath, '0.13.0-beta.2');
115
- }
116
- // Alert to using clrType in hide/show panel in datagrid (https://github.com/vmware/clarity/pull/2546)
117
- if (updated.search(/clrType=['|"]selectAll|ok['|"]/g) > -1) {
118
- logMessage('warn', 'WARNING: Clarity has removed the ok button (clrType="ok") from the column hide/show panel in datagrid. Any custom <clr-dg-column-toggle-button> component will now default to clrType="selectAll" without needing the attribute. Please remove any custom ok button in the column hide/show panel, and also remove the clrType attributes for buttons with clrType="selectAll"', filePath, '0.13.0-beta.2');
119
- }
120
- // Alert to using bootstrap's push / pull in Clarity grid
121
- if (updated.search(/(push|pull)-(xs|sm|md|lg|xl)-([0-9])/g) > -1) {
122
- logMessage('error', 'ACTION REQUIRED: Clarity has removed push and pull support in its grid system, you need either remove all uses or follow migration instructions.', filePath, '0.13.0-beta.2');
123
- }
124
- // Alert to using deprecated icons
125
- if (updated.search(/shape=['"](angle-double|bar-chart|collapse|line-chart|wand)['"]/g) > -1) {
126
- logMessage('info', 'INFO: The following icons have been deprecated in its respective set and have been moved to another set: \n`angle-double`, `bar-chart`, `collapse`, `line-chart`, `wand`\nPlease check that they are being imported from the correct set.', filePath, '0.13.0-rc.1');
127
- }
128
- if (content !== updated) {
129
- tree.overwrite(filePath, updated);
130
- }
131
- });
132
- }
133
- if (dir.subdirs.length) {
134
- dir.subdirs.forEach(d => {
135
- replaceContent(path + '/' + d);
136
- });
137
- }
138
- }
139
- replaceContent(root);
140
- _context.logger.info(`---------------------------
141
- End changes for Clarity 0.13.0
142
- ---------------------------`);
143
- return tree;
144
- };
145
- }
146
- exports.default = default_1;
147
- //# sourceMappingURL=update-0.13.0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-0.13.0.js","sourceRoot":"","sources":["../../../../projects/schematics/src/update/update-0.13.0.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAIH;IACE,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;;4BAEG,CAAC,CAAC;QAE1B,MAAM,IAAI,GAA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;AACJ,CAAC;AAlMD,4BAkMC"}
@@ -1,89 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
4
- * This software is released under MIT license.
5
- * The full license information can be found in LICENSE in the root directory of this project.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const schematics_1 = require("@angular-devkit/schematics");
9
- const tasks_1 = require("@angular-devkit/schematics/tasks");
10
- const fs = require("fs");
11
- // Read a file
12
- function readJsonFile(path) {
13
- return JSON.parse(fs.readFileSync(path, 'utf-8'));
14
- }
15
- // Writes changes to a JSON file
16
- function updateJsonFile(path, callback) {
17
- const json = readJsonFile(path);
18
- callback(json);
19
- fs.writeFileSync(path, JSON.stringify(json, null, 2));
20
- }
21
- function default_1(options) {
22
- return (host, context) => {
23
- const configFile = 'angular.json';
24
- if (!fs.existsSync(configFile)) {
25
- console.error('Could not install Clarity, requires Angular and Angular CLI version 6 or greater');
26
- return;
27
- }
28
- const config = readJsonFile(configFile);
29
- if (!options.project) {
30
- if (!config.defaultProject) {
31
- console.error('Could not find a default project, please specify --project PROJECT_NAME');
32
- return;
33
- }
34
- options.project = config.defaultProject;
35
- }
36
- // Add Clarity packages to package.json, if not found
37
- updateJsonFile('package.json', json => {
38
- const packages = Object.keys(json.dependencies);
39
- if (!packages.includes('@webcomponents/webcomponentsjs')) {
40
- json.dependencies['@webcomponents/webcomponentsjs'] = '^2.0.0';
41
- }
42
- if (packages.includes('@webcomponents/custom-elements')) {
43
- delete json.dependencies['@webcomponents/custom-elements'];
44
- }
45
- });
46
- // Add Clarity assets to .angular.json, if not found
47
- updateJsonFile(configFile, json => {
48
- const projects = Object.keys(json.projects);
49
- const project = projects.find(key => {
50
- if (key === options.project) {
51
- return true;
52
- }
53
- return false;
54
- });
55
- if (!project) {
56
- console.info(`Could not update CLI config file to add scripts and styles. You'll have to add them manually.`);
57
- return;
58
- }
59
- const target = json.projects[project].targets ? json.projects[project].targets : json.projects[project].architect;
60
- const scripts = target.build.options.scripts;
61
- const scriptsSearch = scripts.join('|');
62
- const pathPrefix = json.apps ? '../' : '';
63
- if (scriptsSearch.search('node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js') < 0) {
64
- // Want this second
65
- scripts.unshift(pathPrefix + 'node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js');
66
- }
67
- if (scriptsSearch.search('node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') < 0) {
68
- // Want this first
69
- scripts.unshift(pathPrefix + 'node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js');
70
- }
71
- // Remove old polyfill
72
- const old = scripts.findIndex((file) => file === pathPrefix + 'node_modules/@webcomponents/custom-elements/custom-elements.min.js');
73
- if (old > -1) {
74
- scripts.splice(old, 1);
75
- }
76
- });
77
- // Chain a series of tasks to setup Clarity
78
- // 1. Add ClarityModule to NgModule
79
- // 2. Add BrowserAnimationsModule to NgModule
80
- // 3. Run npm install
81
- return schematics_1.chain([
82
- (_tree, context) => {
83
- context.addTask(new tasks_1.NodePackageInstallTask());
84
- },
85
- ])(host, context);
86
- };
87
- }
88
- exports.default = default_1;
89
- //# sourceMappingURL=update-3.0.0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-3.0.0.js","sourceRoot":"","sources":["../../../../projects/schematics/src/update/update-3.0.0.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH,2DAAiF;AACjF,4DAA0E;AAC1E,yBAAyB;AAEzB,cAAc;AACd,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,gCAAgC;AAChC,SAAS,cAAc,CAAC,IAAY,EAAE,QAAyB;IAC7D,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACf,EAAE,CAAC,aAA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CAAC;aACxB;QACH,CAAC,CAAC,CAAC;QAEH,2CAA2C;QAC3C,mCAAmC;QACnC,6CAA6C;QAC7C,qBAAqB;QACrB,OAAO,kBAAK,CAAC;YACX,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;gBACzC,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;YAChD,CAAC;SACF,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AA/ED,4BA+EC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
4
- * This software is released under MIT license.
5
- * The full license information can be found in LICENSE in the root directory of this project.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const tasks_1 = require("@angular-devkit/schematics/tasks");
9
- const update_json_file_1 = require("../utility/update-json-file");
10
- const clarityCorePackageName = '@cds/core';
11
- const clarityAngularPackageName = '@clr/angular';
12
- const clarityCorePackageUpdateVersion = '^5.0.0';
13
- function default_1() {
14
- return (host, context) => {
15
- update_json_file_1.updateJsonFile(host, 'package.json', json => {
16
- // Do nothing if @cds/core is already a dependency
17
- const deps = (json === null || json === void 0 ? void 0 : json.dependencies) || {};
18
- if (Object.keys(deps).includes(clarityCorePackageName)) {
19
- return;
20
- }
21
- if (!json.dependencies) {
22
- json.dependencies = {};
23
- }
24
- const clarityAngularVersion = json.dependencies[clarityAngularPackageName];
25
- // Do nothing if @clr/angular is not a dependency
26
- if (!clarityAngularVersion) {
27
- return;
28
- }
29
- // Add the same version of @cds/core as
30
- // the version of @clr/angular that's in the package.json
31
- json.dependencies[clarityCorePackageName] = clarityCorePackageUpdateVersion;
32
- });
33
- context.addTask(new tasks_1.NodePackageInstallTask());
34
- };
35
- }
36
- exports.default = default_1;
37
- //# sourceMappingURL=update-5.0.0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-5.0.0.js","sourceRoot":"","sources":["../../../../projects/schematics/src/update/update-5.0.0.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAGH,4DAA0E;AAC1E,kEAA6D;AAE7D,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C,MAAM,yBAAyB,GAAG,cAAc,CAAC;AACjD,MAAM,+BAA+B,GAAG,QAAQ,CAAC;AAEjD;IACE,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAQ,EAAE;QACrD,iCAAc,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;YAC1C,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,KAAI,EAAE,CAAC;YACtC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE;gBACtD,OAAO;aACR;YAED,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;gBACtB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;aACxB;YACD,MAAM,qBAAqB,GAAG,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;YAC3E,iDAAiD;YACjD,IAAI,CAAC,qBAAqB,EAAE;gBAC1B,OAAO;aACR;YACD,uCAAuC;YACvC,yDAAyD;YACzD,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,GAAG,+BAA+B,CAAC;QAC9E,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAxBD,4BAwBC"}