@3t-transform/threeteeui 1.2.0 → 1.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 (210) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{tttx-button_1_2_0.cjs.entry.js → tttx-button_1_3_0.cjs.entry.js} +2 -2
  3. package/dist/cjs/{tttx-checkbox-group-caption_1_2_0.cjs.entry.js → tttx-checkbox-group-caption_1_3_0.cjs.entry.js} +1 -1
  4. package/dist/cjs/{tttx-checkbox-group-heading_1_2_0.cjs.entry.js → tttx-checkbox-group-heading_1_3_0.cjs.entry.js} +1 -1
  5. package/dist/cjs/{tttx-checkbox-group_1_2_0.cjs.entry.js → tttx-checkbox-group_1_3_0.cjs.entry.js} +1 -1
  6. package/dist/cjs/{tttx-checkbox_1_2_0.cjs.entry.js → tttx-checkbox_1_3_0.cjs.entry.js} +2 -2
  7. package/dist/cjs/{tttx-data-pattern_1_2_0.cjs.entry.js → tttx-data-pattern_1_3_0.cjs.entry.js} +2 -2
  8. package/dist/cjs/{tttx-dialog-box_1_2_0.cjs.entry.js → tttx-dialog-box_1_3_0.cjs.entry.js} +3 -3
  9. package/dist/cjs/{tttx-dialog_1_2_0.cjs.entry.js → tttx-dialog_1_3_0.cjs.entry.js} +2 -2
  10. package/dist/cjs/{tttx-expander_1_2_0.cjs.entry.js → tttx-expander_1_3_0.cjs.entry.js} +2 -2
  11. package/dist/cjs/{tttx-filter_1_2_0_4.cjs.entry.js → tttx-filter_1_3_0_4.cjs.entry.js} +17 -10
  12. package/dist/cjs/{tttx-form_1_2_0.cjs.entry.js → tttx-form_1_3_0.cjs.entry.js} +159 -127
  13. package/dist/cjs/{tttx-icon_1_2_0.cjs.entry.js → tttx-icon_1_3_0.cjs.entry.js} +1 -1
  14. package/dist/cjs/{tttx-keyvalue-block_1_2_0.cjs.entry.js → tttx-keyvalue-block_1_3_0.cjs.entry.js} +1 -1
  15. package/dist/cjs/{tttx-loading-spinner_1_2_0.cjs.entry.js → tttx-loading-spinner_1_3_0.cjs.entry.js} +1 -1
  16. package/dist/cjs/{tttx-multiselect-box_1_2_0.cjs.entry.js → tttx-multiselect-box_1_3_0.cjs.entry.js} +6 -6
  17. package/dist/cjs/{tttx-percentage-bar_1_2_0.cjs.entry.js → tttx-percentage-bar_1_3_0.cjs.entry.js} +2 -2
  18. package/dist/cjs/{tttx-qrcode_1_2_0.cjs.entry.js → tttx-qrcode_1_3_0.cjs.entry.js} +1 -1
  19. package/dist/cjs/{tttx-select-box_1_2_0.cjs.entry.js → tttx-select-box_1_3_0.cjs.entry.js} +3 -3
  20. package/dist/cjs/tttx-standalone-input_1_3_0.cjs.entry.js +94 -0
  21. package/dist/cjs/{tttx-tabs_1_2_0.cjs.entry.js → tttx-tabs_1_3_0.cjs.entry.js} +4 -4
  22. package/dist/cjs/{tttx-tag_1_2_0.cjs.entry.js → tttx-tag_1_3_0.cjs.entry.js} +1 -1
  23. package/dist/cjs/{tttx-textarea_1_2_0.cjs.entry.js → tttx-textarea_1_3_0.cjs.entry.js} +2 -2
  24. package/dist/cjs/{tttx-tree-view_1_2_0.cjs.entry.js → tttx-tree-view_1_3_0.cjs.entry.js} +3 -3
  25. package/dist/cjs/tttx.cjs.js +1 -1
  26. package/dist/collection/collection-manifest.json +1 -1
  27. package/dist/collection/components/atoms/tttx-button/tttx-button.js +2 -2
  28. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +20 -20
  29. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +2 -2
  30. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +1 -1
  31. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +1 -1
  32. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +1 -1
  33. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +1 -1
  34. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +6 -6
  35. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +1 -1
  36. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
  37. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +1 -1
  38. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +5 -5
  39. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +1 -1
  40. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +1 -1
  41. package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +1 -1
  42. package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +6 -6
  43. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +1 -1
  44. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +1 -1
  45. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +1 -1
  46. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +10 -10
  47. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +2 -2
  48. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +6 -6
  49. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +3 -3
  50. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +24 -24
  51. package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +2 -2
  52. package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +9 -9
  53. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +3 -3
  54. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +2 -2
  55. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +0 -1
  56. package/dist/collection/components/molecules/tttx-form/lib/timecomparatorChecks.js +64 -0
  57. package/dist/collection/components/molecules/tttx-form/tttx-form.js +103 -129
  58. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +5 -5
  59. package/dist/collection/components/molecules/tttx-list/tttx-list.js +11 -4
  60. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +46 -46
  61. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +6 -6
  62. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +33 -33
  63. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +3 -3
  64. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +16 -16
  65. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +2 -2
  66. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +1 -1
  67. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +4 -4
  68. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +1 -1
  69. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +3 -3
  70. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +4 -4
  71. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +3 -3
  72. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +1 -1
  73. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +1 -1
  74. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +37 -37
  75. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +3 -3
  76. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +8 -8
  77. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +2 -2
  78. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +5 -5
  79. package/dist/components/index.d.ts +26 -26
  80. package/dist/components/index.js +26 -26
  81. package/dist/components/tttx-button.js +5 -5
  82. package/dist/components/{tttx-button_1_2_0.d.ts → tttx-button_1_3_0.d.ts} +4 -4
  83. package/dist/components/{tttx-button_1_2_0.js → tttx-button_1_3_0.js} +2 -2
  84. package/dist/components/tttx-checkbox-group-caption_1_3_0.d.ts +11 -0
  85. package/dist/components/{tttx-checkbox-group-caption_1_2_0.js → tttx-checkbox-group-caption_1_3_0.js} +5 -5
  86. package/dist/components/tttx-checkbox-group-heading_1_3_0.d.ts +11 -0
  87. package/dist/components/{tttx-checkbox-group-heading_1_2_0.js → tttx-checkbox-group-heading_1_3_0.js} +5 -5
  88. package/dist/components/tttx-checkbox-group_1_3_0.d.ts +11 -0
  89. package/dist/components/{tttx-checkbox-group_1_2_0.js → tttx-checkbox-group_1_3_0.js} +5 -5
  90. package/dist/components/{tttx-textarea_1_2_0.d.ts → tttx-checkbox_1_3_0.d.ts} +4 -4
  91. package/dist/components/{tttx-checkbox_1_2_0.js → tttx-checkbox_1_3_0.js} +7 -7
  92. package/dist/components/tttx-data-pattern_1_3_0.d.ts +11 -0
  93. package/dist/components/{tttx-data-pattern_1_2_0.js → tttx-data-pattern_1_3_0.js} +13 -13
  94. package/dist/components/{tttx-dialog-box_1_2_0.d.ts → tttx-dialog-box_1_3_0.d.ts} +4 -4
  95. package/dist/components/{tttx-dialog-box_1_2_0.js → tttx-dialog-box_1_3_0.js} +9 -9
  96. package/dist/components/{tttx-filter_1_2_0.d.ts → tttx-dialog_1_3_0.d.ts} +4 -4
  97. package/dist/components/{tttx-dialog_1_2_0.js → tttx-dialog_1_3_0.js} +8 -8
  98. package/dist/components/{tttx-expander_1_2_0.d.ts → tttx-expander_1_3_0.d.ts} +4 -4
  99. package/dist/components/{tttx-expander_1_2_0.js → tttx-expander_1_3_0.js} +7 -7
  100. package/dist/components/tttx-filter.js +6 -6
  101. package/dist/components/{tttx-qrcode_1_2_0.d.ts → tttx-filter_1_3_0.d.ts} +4 -4
  102. package/dist/components/{tttx-filter_1_2_0.js → tttx-filter_1_3_0.js} +2 -2
  103. package/dist/components/{tttx-icon_1_2_0.d.ts → tttx-form_1_3_0.d.ts} +4 -4
  104. package/dist/components/{tttx-form_1_2_0.js → tttx-form_1_3_0.js} +166 -134
  105. package/dist/components/tttx-icon.js +3 -3
  106. package/dist/components/{tttx-list_1_2_0.d.ts → tttx-icon_1_3_0.d.ts} +4 -4
  107. package/dist/components/{tttx-icon_1_2_0.js → tttx-icon_1_3_0.js} +2 -2
  108. package/dist/components/tttx-keyvalue-block_1_3_0.d.ts +11 -0
  109. package/dist/components/{tttx-keyvalue-block_1_2_0.js → tttx-keyvalue-block_1_3_0.js} +5 -5
  110. package/dist/components/tttx-list.js +14 -7
  111. package/dist/components/{tttx-form_1_2_0.d.ts → tttx-list_1_3_0.d.ts} +4 -4
  112. package/dist/components/{tttx-list_1_2_0.js → tttx-list_1_3_0.js} +2 -2
  113. package/dist/components/tttx-loading-spinner_1_3_0.d.ts +11 -0
  114. package/dist/components/{tttx-loading-spinner_1_2_0.js → tttx-loading-spinner_1_3_0.js} +5 -5
  115. package/dist/components/tttx-multiselect-box_1_3_0.d.ts +11 -0
  116. package/dist/components/{tttx-multiselect-box_1_2_0.js → tttx-multiselect-box_1_3_0.js} +13 -13
  117. package/dist/components/tttx-percentage-bar_1_3_0.d.ts +11 -0
  118. package/dist/components/{tttx-percentage-bar_1_2_0.js → tttx-percentage-bar_1_3_0.js} +6 -6
  119. package/dist/components/{tttx-dialog_1_2_0.d.ts → tttx-qrcode_1_3_0.d.ts} +4 -4
  120. package/dist/components/{tttx-qrcode_1_2_0.js → tttx-qrcode_1_3_0.js} +5 -5
  121. package/dist/components/tttx-select-box.js +7 -7
  122. package/dist/components/tttx-select-box_1_3_0.d.ts +11 -0
  123. package/dist/components/{tttx-select-box_1_2_0.js → tttx-select-box_1_3_0.js} +2 -2
  124. package/dist/components/tttx-sorter.js +5 -5
  125. package/dist/components/tttx-sorter_1_3_0.d.ts +11 -0
  126. package/dist/components/{tttx-sorter_1_2_0.js → tttx-sorter_1_3_0.js} +2 -2
  127. package/dist/components/tttx-standalone-input.js +6 -6
  128. package/dist/components/tttx-standalone-input_1_3_0.d.ts +11 -0
  129. package/dist/components/{tttx-standalone-input_1_2_0.js → tttx-standalone-input_1_3_0.js} +2 -2
  130. package/dist/components/{tttx-tabs_1_2_0.d.ts → tttx-tabs_1_3_0.d.ts} +4 -4
  131. package/dist/components/{tttx-tabs_1_2_0.js → tttx-tabs_1_3_0.js} +9 -9
  132. package/dist/components/{tttx-tag_1_2_0.d.ts → tttx-tag_1_3_0.d.ts} +4 -4
  133. package/dist/components/{tttx-tag_1_2_0.js → tttx-tag_1_3_0.js} +5 -5
  134. package/dist/components/{tttx-checkbox_1_2_0.d.ts → tttx-textarea_1_3_0.d.ts} +4 -4
  135. package/dist/components/{tttx-textarea_1_2_0.js → tttx-textarea_1_3_0.js} +6 -6
  136. package/dist/components/tttx-toolbar.js +3 -3
  137. package/dist/components/{tttx-toolbar_1_2_0.d.ts → tttx-toolbar_1_3_0.d.ts} +4 -4
  138. package/dist/components/{tttx-toolbar_1_2_0.js → tttx-toolbar_1_3_0.js} +2 -2
  139. package/dist/components/{tttx-tree-view_1_2_0.d.ts → tttx-tree-view_1_3_0.d.ts} +4 -4
  140. package/dist/components/{tttx-tree-view_1_2_0.js → tttx-tree-view_1_3_0.js} +9 -9
  141. package/dist/esm/loader.js +1 -1
  142. package/dist/esm/{tttx-button_1_2_0.entry.js → tttx-button_1_3_0.entry.js} +2 -2
  143. package/dist/esm/{tttx-checkbox-group-caption_1_2_0.entry.js → tttx-checkbox-group-caption_1_3_0.entry.js} +1 -1
  144. package/dist/esm/{tttx-checkbox-group-heading_1_2_0.entry.js → tttx-checkbox-group-heading_1_3_0.entry.js} +1 -1
  145. package/dist/esm/{tttx-checkbox-group_1_2_0.entry.js → tttx-checkbox-group_1_3_0.entry.js} +1 -1
  146. package/dist/esm/{tttx-checkbox_1_2_0.entry.js → tttx-checkbox_1_3_0.entry.js} +2 -2
  147. package/dist/esm/{tttx-data-pattern_1_2_0.entry.js → tttx-data-pattern_1_3_0.entry.js} +2 -2
  148. package/dist/esm/{tttx-dialog-box_1_2_0.entry.js → tttx-dialog-box_1_3_0.entry.js} +3 -3
  149. package/dist/esm/{tttx-dialog_1_2_0.entry.js → tttx-dialog_1_3_0.entry.js} +2 -2
  150. package/dist/esm/{tttx-expander_1_2_0.entry.js → tttx-expander_1_3_0.entry.js} +2 -2
  151. package/dist/esm/{tttx-filter_1_2_0_4.entry.js → tttx-filter_1_3_0_4.entry.js} +14 -7
  152. package/dist/esm/{tttx-form_1_2_0.entry.js → tttx-form_1_3_0.entry.js} +159 -127
  153. package/dist/esm/{tttx-icon_1_2_0.entry.js → tttx-icon_1_3_0.entry.js} +1 -1
  154. package/dist/esm/{tttx-keyvalue-block_1_2_0.entry.js → tttx-keyvalue-block_1_3_0.entry.js} +1 -1
  155. package/dist/esm/{tttx-loading-spinner_1_2_0.entry.js → tttx-loading-spinner_1_3_0.entry.js} +1 -1
  156. package/dist/esm/{tttx-multiselect-box_1_2_0.entry.js → tttx-multiselect-box_1_3_0.entry.js} +6 -6
  157. package/dist/esm/{tttx-percentage-bar_1_2_0.entry.js → tttx-percentage-bar_1_3_0.entry.js} +2 -2
  158. package/dist/esm/{tttx-qrcode_1_2_0.entry.js → tttx-qrcode_1_3_0.entry.js} +1 -1
  159. package/dist/esm/{tttx-select-box_1_2_0.entry.js → tttx-select-box_1_3_0.entry.js} +3 -3
  160. package/dist/esm/tttx-standalone-input_1_3_0.entry.js +90 -0
  161. package/dist/esm/{tttx-tabs_1_2_0.entry.js → tttx-tabs_1_3_0.entry.js} +4 -4
  162. package/dist/esm/{tttx-tag_1_2_0.entry.js → tttx-tag_1_3_0.entry.js} +1 -1
  163. package/dist/esm/{tttx-textarea_1_2_0.entry.js → tttx-textarea_1_3_0.entry.js} +2 -2
  164. package/dist/esm/{tttx-tree-view_1_2_0.entry.js → tttx-tree-view_1_3_0.entry.js} +3 -3
  165. package/dist/esm/tttx.js +1 -1
  166. package/dist/tttx/p-0e515960.entry.js +1 -1
  167. package/dist/tttx/p-1e5ff5f8.entry.js +1 -1
  168. package/dist/tttx/p-23f45005.entry.js +1 -1
  169. package/dist/tttx/p-3676cddd.entry.js +1 -0
  170. package/dist/tttx/p-56c8c353.entry.js +1 -1
  171. package/dist/tttx/p-59c7b049.entry.js +1 -1
  172. package/dist/tttx/p-5d2706b1.entry.js +1 -1
  173. package/dist/tttx/p-63ad6fb7.entry.js +1 -1
  174. package/dist/tttx/p-6b1c7a21.entry.js +1 -1
  175. package/dist/tttx/p-6deb8699.entry.js +1 -1
  176. package/dist/tttx/p-796f699a.entry.js +1 -1
  177. package/dist/tttx/p-81aaafa0.entry.js +1 -1
  178. package/dist/tttx/p-822ec9dc.entry.js +1 -0
  179. package/dist/tttx/p-884f37d3.entry.js +1 -1
  180. package/dist/tttx/p-9434561e.entry.js +1 -1
  181. package/dist/tttx/p-983d63ff.entry.js +1 -1
  182. package/dist/tttx/p-a01e679a.entry.js +1 -1
  183. package/dist/tttx/p-a8e76e78.entry.js +1 -1
  184. package/dist/tttx/p-c170e3b8.entry.js +1 -1
  185. package/dist/tttx/p-ee358ce4.entry.js +1 -1
  186. package/dist/tttx/p-f374e293.entry.js +1 -1
  187. package/dist/tttx/p-f4db1cf2.entry.js +1 -1
  188. package/dist/tttx/p-fe967031.entry.js +1 -1
  189. package/dist/tttx/tttx.esm.js +1 -1
  190. package/dist/types/components/molecules/tttx-form/lib/timecomparatorChecks.d.ts +4 -0
  191. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +35 -14
  192. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +2 -2
  193. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +2 -2
  194. package/dist/types/components.d.ts +305 -304
  195. package/package.json +2 -1
  196. package/dist/cjs/tttx-standalone-input_1_2_0.cjs.entry.js +0 -94
  197. package/dist/components/tttx-checkbox-group-caption_1_2_0.d.ts +0 -11
  198. package/dist/components/tttx-checkbox-group-heading_1_2_0.d.ts +0 -11
  199. package/dist/components/tttx-checkbox-group_1_2_0.d.ts +0 -11
  200. package/dist/components/tttx-data-pattern_1_2_0.d.ts +0 -11
  201. package/dist/components/tttx-keyvalue-block_1_2_0.d.ts +0 -11
  202. package/dist/components/tttx-loading-spinner_1_2_0.d.ts +0 -11
  203. package/dist/components/tttx-multiselect-box_1_2_0.d.ts +0 -11
  204. package/dist/components/tttx-percentage-bar_1_2_0.d.ts +0 -11
  205. package/dist/components/tttx-select-box_1_2_0.d.ts +0 -11
  206. package/dist/components/tttx-sorter_1_2_0.d.ts +0 -11
  207. package/dist/components/tttx-standalone-input_1_2_0.d.ts +0 -11
  208. package/dist/esm/tttx-standalone-input_1_2_0.entry.js +0 -90
  209. package/dist/tttx/p-34be6c6d.entry.js +0 -1
  210. package/dist/tttx/p-c8589436.entry.js +0 -1
@@ -3,6 +3,7 @@ import * as DOMPurify from 'dompurify';
3
3
  import domSanitiserOptions from '../../../shared/domsanitiser.options';
4
4
  import validityCheck from './lib/validityCheck';
5
5
  import setErrorState from './lib/setErrorState';
6
+ import { endDateComparisonValidator, startEndTimeComparator, startDateComparisonValidator } from './lib/timecomparatorChecks';
6
7
  export class TttxForm {
7
8
  constructor() {
8
9
  // Create a new template element using the HTMLTemplateElement interface.
@@ -12,13 +13,6 @@ export class TttxForm {
12
13
  }
13
14
  // This method is called whenever the "formschema" property changes
14
15
  onFormSchemaChange(newValue) {
15
- // If the formSchema changes and the form data is uncontrolled, store the data since the fields will be removed to avoid form duplication
16
- if (!this.data && this.form && this._formSchema) {
17
- const formData = new FormData(this.form);
18
- this._data = Object.fromEntries(Object.keys(this._formSchema.properties).map(formKey => {
19
- return [formKey, formData.get(formKey)];
20
- }));
21
- }
22
16
  // Check if the new value is a string, indicating that it needs to be parsed
23
17
  if (typeof newValue === 'string') {
24
18
  // Parse the string and set the "_formSchema" property
@@ -28,6 +22,7 @@ export class TttxForm {
28
22
  // If the new value is already an object, set the "_formSchema" property directly
29
23
  this._formSchema = newValue;
30
24
  }
25
+ return this._formSchema;
31
26
  }
32
27
  onDataChange(newValue) {
33
28
  if (typeof newValue === 'string') {
@@ -36,6 +31,7 @@ export class TttxForm {
36
31
  else {
37
32
  this._data = newValue;
38
33
  }
34
+ return this._data;
39
35
  }
40
36
  /**
41
37
  * Handles the focus event for a form field and emits a "dataChanged" event
@@ -75,7 +71,6 @@ export class TttxForm {
75
71
  }
76
72
  select.replaceChildren(fragment);
77
73
  tttxSelect.optionsData = options;
78
- //await tttxSelect.setOptionsData(options);
79
74
  await tttxSelect.setSelectedItem(options[0].value);
80
75
  }
81
76
  /**
@@ -133,9 +128,10 @@ export class TttxForm {
133
128
  formProperties.options.forEach(optionProperties => {
134
129
  this.appendOption(select, optionProperties);
135
130
  });
136
- if ((_a = this._data) === null || _a === void 0 ? void 0 : _a[formKey])
131
+ if ((_a = this._data) === null || _a === void 0 ? void 0 : _a[formKey]) {
137
132
  select.classList.remove('placeholder');
138
- const tttxSelect = document.createElement('tttx-select-box_1_2_0');
133
+ }
134
+ const tttxSelect = document.createElement('tttx-select-box_1_3_0');
139
135
  tttxSelect.optionsData = (_b = formProperties.options) === null || _b === void 0 ? void 0 : _b.filter(o => !o.placeholder);
140
136
  tttxSelect.placeholder = (_d = (_c = formProperties.options) === null || _c === void 0 ? void 0 : _c.filter(o => o.placeholder)[0]) === null || _d === void 0 ? void 0 : _d.label;
141
137
  tttxSelect.inline = false;
@@ -146,13 +142,18 @@ export class TttxForm {
146
142
  const fragment = document.createDocumentFragment();
147
143
  fragment.append(tttxSelect);
148
144
  select.style.display = 'none';
149
- tttxSelect.addEventListener('selectItemEvent', function (ev) {
150
- select.value = ev.detail.value;
151
- select.onblur({ target: select }); // triggers validator
152
- select.onchange({ target: select }); // triggers dataChanged event
153
- });
145
+ tttxSelect.addEventListener('selectItemEvent', this.selectItemEventCallback.bind(select));
154
146
  return { input: select, overlay: fragment };
155
147
  }
148
+ selectItemEventCallback(ev) {
149
+ // this function MUST be bound to a HTMLSelectElement
150
+ // 'this' will be the select element
151
+ // the function was split out for testing
152
+ const select = this;
153
+ select.value = ev.detail.value;
154
+ select.onblur({ target: select }); // triggers validator
155
+ select.onchange({ target: select }); // triggers dataChanged event
156
+ }
156
157
  /**
157
158
  * Appends an option to a select element
158
159
  *
@@ -383,7 +384,7 @@ export class TttxForm {
383
384
  * @param {HTMLDivElement} errorBubble - The error bubble element to display error messages in.
384
385
  * @return {HTMLLabelElement} - The new label element.
385
386
  */
386
- createLabel(formProperties, input, overlay, errorBubble) {
387
+ createLabel(formProperties, input, overlay = null, errorBubble) {
387
388
  var _a;
388
389
  const outerContainer = document.createElement('div');
389
390
  let outerContainerClassName = 'outer-container inputBlock';
@@ -434,7 +435,7 @@ export class TttxForm {
434
435
  */
435
436
  createRadio(formKey, formProperties) {
436
437
  var _a, _b;
437
- const fragment = new DocumentFragment();
438
+ const fragment = document.createDocumentFragment();
438
439
  for (const optionProperties of formProperties.options) {
439
440
  // Create a new <input> element with the specified name and type
440
441
  const input = document.createElement('input');
@@ -464,8 +465,9 @@ export class TttxForm {
464
465
  populateFormFromSchema() {
465
466
  var _a;
466
467
  // If there is no form schema, return early
467
- if (!this._formSchema)
468
+ if (!this._formSchema) {
468
469
  return;
470
+ }
469
471
  // Get the properties of the form schema and their keys
470
472
  const properties = this._formSchema.properties;
471
473
  const propertyKeys = Object.keys(properties);
@@ -533,129 +535,97 @@ export class TttxForm {
533
535
  const properties = this._formSchema.properties;
534
536
  const propertyKeys = Object.keys(properties);
535
537
  for (const formKey of propertyKeys) {
536
- const formItemsByKey = formItems.querySelectorAll(`[name^=${formKey}]`);
537
- for (const formInput of formItemsByKey) {
538
- // Bind events to form input elements
539
- formInput.oninvalid = this.validityCheckWrapper.bind(this);
540
- formInput.onblur = this.validityCheckWrapper.bind(this);
541
- formInput.onkeyup = this.fieldChanged.bind(this);
542
- formInput.onchange = this.fieldChanged.bind(this);
543
- if (properties[formKey].form.type === 'select' && formInput.classList.contains('placeholder')) {
544
- formInput.addEventListener('change', () => {
545
- formInput.classList.remove('placeholder');
546
- });
547
- }
548
- if (properties[formKey].form.type === 'startenddate' && formInput.hasAttribute('data-compare-with')) {
549
- formInput.oninvalid = this.endDateComparisonValidator.bind(this);
550
- formInput.onblur = this.endDateComparisonValidator.bind(this);
551
- }
552
- if (properties[formKey].form.type === 'startenddate' && formInput.type === 'time') {
553
- formInput.oninvalid = this.startEndTimeComparitor.bind(this);
554
- formInput.onblur = this.startEndTimeComparitor.bind(this);
555
- }
556
- if (properties[formKey].form.type === 'startenddate' && formInput.hasAttribute('data-compare-to')) {
557
- formInput.oninvalid = this.startDateComparisonValidator.bind(this);
558
- formInput.onblur = this.startDateComparisonValidator.bind(this);
559
- }
560
- }
538
+ this.applyValidationFunctionsToFormElement(formItems, formKey, properties);
561
539
  }
562
540
  // populate with existing form data if available
563
- if (this._data && Object.keys(this._data).length > 0) {
564
- const dataKeys = Object.keys(this._data);
565
- for (const key of dataKeys) {
566
- const formItemsByKey = formItems.querySelectorAll(`[name=${key}]`);
567
- for (const formItem of formItemsByKey) {
568
- switch (formItem.type) {
569
- case 'checkbox':
570
- if (this._data[key] === 'on') {
571
- formItem.checked = true;
572
- }
573
- break;
574
- case 'radio':
575
- if (formItem.value === this._data[key]) {
576
- formItem.checked = true;
577
- }
578
- break;
579
- case 'select':
580
- case 'select-one':
581
- formItems.querySelector(`[name=overlay-${key}]`).selectedValue = this._data[key];
582
- formItem.value = this._data[key];
583
- break;
584
- default:
585
- formItem.value = this._data[key];
586
- }
587
- }
588
- }
541
+ if ((this._data && Object.keys(this._data).length > 0)) {
542
+ this.populateFormWithExistingData(formItems);
589
543
  }
590
544
  // Append the cloned form elements to the fieldset
591
545
  this.fieldset.replaceChildren(formItems);
592
546
  }
593
- startEndTimeComparitor(event) {
594
- var _a, _b;
595
- const target = event.target;
596
- const formKey = target.getAttribute('data-formkey');
597
- const timeFields = Array.from(target.parentElement.parentElement.parentElement.querySelectorAll(`[data-formkey=${formKey}]`));
598
- if (timeFields.length === 4) {
599
- const startTime = timeFields.find(t => t.name.endsWith('starttime'));
600
- const endTime = timeFields.find(t => t.name.endsWith('endtime'));
601
- const startDate = timeFields.find(t => t.name.endsWith('startdate'));
602
- const endDate = timeFields.find(t => t.name.endsWith('enddate'));
603
- if (startTime.valueAsNumber >= endTime.valueAsNumber && ((_a = startDate.valueAsDate) === null || _a === void 0 ? void 0 : _a.valueOf()) === ((_b = endDate.valueAsDate) === null || _b === void 0 ? void 0 : _b.valueOf())) {
604
- setErrorState(endTime, true, 'End time cannot be the same or before the start time');
605
- if (target.name.endsWith('starttime')) {
606
- this.validityCheckWrapper(event);
607
- }
547
+ /**
548
+ * Assign validation events to a given form item
549
+ * @param formItems The document fragment template of form items to be rendered
550
+ * @param formKey The key of the form item to bind events too
551
+ * @param properties The form item's properties, such as type and name
552
+ */
553
+ applyValidationFunctionsToFormElement(formItems, formKey, properties) {
554
+ const formItemsByKey = formItems.querySelectorAll(`[name^=${formKey}]`);
555
+ for (const formInput of formItemsByKey) {
556
+ // Bind events to form input elements
557
+ formInput.oninvalid = this.validityCheckWrapper.bind(this);
558
+ formInput.onblur = this.validityCheckWrapper.bind(this);
559
+ formInput.onkeyup = this.fieldChanged.bind(this);
560
+ formInput.onchange = this.fieldChanged.bind(this);
561
+ if (properties[formKey].form.type === 'select' && formInput.classList.contains('placeholder')) {
562
+ formInput.addEventListener('change', this.selectRemovePlaceholderCallback.bind(formInput));
608
563
  }
609
- else {
610
- // clear any end time comparitor errors and perform the standard validity check on the event
611
- endTime.setCustomValidity('');
612
- setErrorState(endTime, false, null);
613
- this.validityCheckWrapper(event);
564
+ if (properties[formKey].form.type === 'startenddate' && formInput.hasAttribute('data-compare-with')) {
565
+ formInput.oninvalid = endDateComparisonValidator.bind(this);
566
+ formInput.onblur = endDateComparisonValidator.bind(this);
567
+ }
568
+ if (properties[formKey].form.type === 'startenddate' && formInput.type === 'time') {
569
+ formInput.oninvalid = startEndTimeComparator.bind(this);
570
+ formInput.onblur = startEndTimeComparator.bind(this);
571
+ }
572
+ if (properties[formKey].form.type === 'startenddate' && formInput.hasAttribute('data-compare-to')) {
573
+ formInput.oninvalid = startDateComparisonValidator.bind(this);
574
+ formInput.onblur = startDateComparisonValidator.bind(this);
614
575
  }
615
576
  }
616
577
  }
617
- clearTimeComparitor(event) {
618
- const target = event.target;
619
- const formKey = target.getAttribute('data-formkey');
620
- const timeFields = Array.from(target.parentElement.parentElement.parentElement.querySelectorAll(`[type=time][data-formkey=${formKey}]`));
621
- if (timeFields.length) {
622
- const endTime = timeFields.find(t => t.name.endsWith('endtime'));
623
- endTime.setCustomValidity('');
624
- setErrorState(endTime, false, null);
625
- }
626
- }
627
- startDateComparisonValidator(event) {
628
- const startDate = event.target;
629
- const compareToName = startDate.getAttribute('data-compare-to');
630
- const endDate = startDate.parentElement.parentElement.parentElement.querySelector(`[name=${compareToName}]`);
631
- this.endDateComparisonValidator({ target: endDate }, true);
632
- this.validityCheckWrapper(event);
633
- }
634
- endDateComparisonValidator(event, triggeredByStartDate = false) {
635
- var _a, _b, _c, _d;
636
- const endDate = event.target;
637
- if (!endDate.value && triggeredByStartDate)
638
- return;
639
- const compareWithName = endDate.getAttribute('data-compare-with');
640
- const startDate = endDate.parentElement.parentElement.parentElement.querySelector(`[name=${compareWithName}]`);
641
- if (((_a = endDate.valueAsDate) === null || _a === void 0 ? void 0 : _a.valueOf()) < ((_b = startDate.valueAsDate) === null || _b === void 0 ? void 0 : _b.valueOf())) {
642
- endDate.setCustomValidity(endDate.getAttribute('data-compare'));
643
- setErrorState(endDate, true, endDate.getAttribute('data-compare'));
644
- }
645
- else if (((_c = endDate.valueAsDate) === null || _c === void 0 ? void 0 : _c.valueOf()) === ((_d = startDate.valueAsDate) === null || _d === void 0 ? void 0 : _d.valueOf())) {
646
- endDate.setCustomValidity('');
647
- this.validityCheckWrapper(event);
648
- this.startEndTimeComparitor(event);
649
- }
650
- else {
651
- this.clearTimeComparitor(event);
652
- this.validityCheckWrapper(event);
578
+ /**
579
+ * If data exists, set form input values before rendering
580
+ * @param formItems The document fragment template of form items to be rendered
581
+ */
582
+ populateFormWithExistingData(formItems) {
583
+ const dataKeys = Object.keys(this._data);
584
+ for (const key of dataKeys) {
585
+ const formItemsByKey = formItems.querySelectorAll(`[name=${key}]`);
586
+ for (const formItem of formItemsByKey) {
587
+ switch (formItem.type) {
588
+ case 'checkbox':
589
+ if (this._data[key] === 'on') {
590
+ formItem.checked = true;
591
+ }
592
+ break;
593
+ case 'radio':
594
+ if (formItem.value === this._data[key]) {
595
+ formItem.checked = true;
596
+ }
597
+ break;
598
+ case 'select':
599
+ case 'select-one':
600
+ formItems.querySelector(`[name=overlay-${key}]`)['selectedValue'] = this._data[key];
601
+ formItem.value = this._data[key];
602
+ break;
603
+ default:
604
+ formItem.value = this._data[key];
605
+ }
606
+ }
653
607
  }
654
608
  }
609
+ /**
610
+ * Remove the placeholder class on the bound THIS select element
611
+ */
612
+ selectRemovePlaceholderCallback() {
613
+ const select = this;
614
+ select.classList.remove('placeholder');
615
+ }
616
+ /**
617
+ * A wrapper around validity check and set error state
618
+ */
655
619
  validityCheckWrapper(event) {
656
620
  const { target, hasError, errorMessage } = validityCheck(event);
657
621
  setErrorState(target, hasError, errorMessage);
658
622
  }
623
+ assignFieldsetReference(el) {
624
+ this.fieldset = el;
625
+ }
626
+ assignButtonReference(el) {
627
+ this.submitButton = el;
628
+ }
659
629
  /**
660
630
  * Renders the component's template as a form element with a fieldset container. The form's
661
631
  * "onSubmit" event is bound to the "doSubmit" function, which handles the form submission
@@ -664,9 +634,9 @@ export class TttxForm {
664
634
  * later on.
665
635
  */
666
636
  render() {
667
- return (h(Host, null, h("form", { ref: el => (this.form = el), onSubmit: this.doSubmit.bind(this) }, h("fieldset", { ref: el => (this.fieldset = el) }), h("input", { type: "submit", ref: el => (this.submitButton = el), style: { display: 'none' } }))));
637
+ return (h(Host, null, h("form", { onSubmit: this.doSubmit.bind(this) }, h("fieldset", { ref: this.assignFieldsetReference.bind(this) }), h("input", { type: "submit", ref: this.assignButtonReference.bind(this), style: { display: 'none' } }))));
668
638
  }
669
- static get is() { return "tttx-form_1_2_0"; }
639
+ static get is() { return "tttx-form_1_3_0"; }
670
640
  static get encapsulation() { return "shadow"; }
671
641
  static get originalStyleUrls() {
672
642
  return {
@@ -751,8 +721,8 @@ export class TttxForm {
751
721
  "text": ""
752
722
  },
753
723
  "complexType": {
754
- "original": "{ name: string; value: any }",
755
- "resolved": "{ name: string; value: any; }",
724
+ "original": "{ name: string; value: string }",
725
+ "resolved": "{ name: string; value: string; }",
756
726
  "references": {}
757
727
  }
758
728
  }];
@@ -794,6 +764,10 @@ export class TttxForm {
794
764
  "references": {
795
765
  "Promise": {
796
766
  "location": "global"
767
+ },
768
+ "TttxSelectBox": {
769
+ "location": "import",
770
+ "path": "../tttx-select-box/tttx-select-box"
797
771
  }
798
772
  },
799
773
  "return": "Promise<void>"
@@ -169,7 +169,7 @@ const formSchema = {
169
169
  }
170
170
  },
171
171
  };
172
- export const SingleFormItem = args => `<tttx-form_1_2_0 formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_2_0>`;
172
+ export const SingleFormItem = args => `<tttx-form_1_3_0 formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_3_0>`;
173
173
  SingleFormItem.args = {
174
174
  formSchema: {
175
175
  properties: {
@@ -192,7 +192,7 @@ SingleFormItem.args = {
192
192
  },
193
193
  },
194
194
  };
195
- export const StartAndEndDateWithoutTime = args => `<tttx-form_1_2_0 formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_2_0>`;
195
+ export const StartAndEndDateWithoutTime = args => `<tttx-form_1_3_0 formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_3_0>`;
196
196
  StartAndEndDateWithoutTime.args = {
197
197
  formSchema: {
198
198
  properties: {
@@ -207,7 +207,7 @@ StartAndEndDateWithoutTime.args = {
207
207
  },
208
208
  },
209
209
  };
210
- export const ExampleFormFromJSON = args => `<tttx-form_1_2_0 id='form' formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_2_0>
210
+ export const ExampleFormFromJSON = args => `<tttx-form_1_3_0 id='form' formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_3_0>
211
211
  <hr/>
212
212
  <button type='button' id='button'>Submit Form</button>
213
213
  <script>
@@ -408,7 +408,7 @@ const data = {
408
408
  'startend-endtime': '17:00',
409
409
  notes: 'Some notes that were entered into this box.'
410
410
  };
411
- export const PrePopulateForm = args => `<tttx-form_1_2_0 id='form' formSchema='${JSON.stringify(args.formSchema)}' data='${JSON.stringify(args.data)}'></tttx-form_1_2_0>
411
+ export const PrePopulateForm = args => `<tttx-form_1_3_0 id='form' formSchema='${JSON.stringify(args.formSchema)}' data='${JSON.stringify(args.data)}'></tttx-form_1_3_0>
412
412
  <hr/>
413
413
  <button type='button' id='button'>Submit Form</button>
414
414
  <script>
@@ -483,7 +483,7 @@ const radioFormSchema = {
483
483
  },
484
484
  },
485
485
  };
486
- export const FormWithRadio = args => `<tttx-form_1_2_0 id='form' formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_2_0>
486
+ export const FormWithRadio = args => `<tttx-form_1_3_0 id='form' formSchema='${JSON.stringify(args.formSchema)}'></tttx-form_1_3_0>
487
487
  <hr/>
488
488
  <button type='button' id='button'>Submit Form</button>
489
489
  <script>
@@ -40,10 +40,17 @@ export class TttxList {
40
40
  this.rowClick.emit({ key: item.key, name: this.name, data: item.rowData });
41
41
  }
42
42
  renderListItem(item) {
43
- const cleanHTML = DOMPurify.sanitize(item.element, domSanitiserOptions);
44
- return (h(Fragment, null, item.hasCheckbox && (h("div", { class: "checkbox" }, h("tttx-icon_1_2_0", { icon: item.checked ? 'check_box' : 'check_box_outline_blank', color: item.checked ? 'blue' : 'grey', onClick: event => {
43
+ let element;
44
+ if (typeof item.element === 'string') {
45
+ const cleanHTML = DOMPurify.sanitize(item.element, domSanitiserOptions);
46
+ element = h("span", { class: "item-content", innerHTML: cleanHTML });
47
+ }
48
+ else {
49
+ element = h("span", { class: "item-content" }, item.element);
50
+ }
51
+ return (h(Fragment, null, item.hasCheckbox && (h("div", { class: "checkbox" }, h("tttx-icon_1_3_0", { icon: item.checked ? 'check_box' : 'check_box_outline_blank', color: item.checked ? 'blue' : 'grey', onClick: event => {
45
52
  this.onRowCheckboxHandler(event, item);
46
- } }))), item.element && h("span", { class: "item-content", innerHTML: cleanHTML }), item.icon && (h("span", { class: "icons" }, h("tttx-icon_1_2_0", { class: "align-right", icon: item.icon, color: 'black' })))));
53
+ } }))), item.element && element, item.icon && (h("span", { class: "icons" }, h("tttx-icon_1_3_0", { class: "align-right", icon: item.icon, color: 'black' })))));
47
54
  }
48
55
  render() {
49
56
  if (!this._data)
@@ -56,7 +63,7 @@ export class TttxList {
56
63
  this.onRowClickHandler(item);
57
64
  } }, this.renderListItem(item))))));
58
65
  }
59
- static get is() { return "tttx-list_1_2_0"; }
66
+ static get is() { return "tttx-list_1_3_0"; }
60
67
  static get encapsulation() { return "shadow"; }
61
68
  static get originalStyleUrls() {
62
69
  return {
@@ -10,26 +10,26 @@ export default {
10
10
  decorators: [withActions],
11
11
  };
12
12
  const TemplateStringList = ({ data }) => `
13
- <tttx-list_1_2_0
13
+ <tttx-list_1_3_0
14
14
  data='${JSON.stringify(data)}'
15
15
  id='list'
16
16
  name='stringList'
17
- ></tttx-list_1_2_0>
17
+ ></tttx-list_1_3_0>
18
18
  `;
19
19
  export const BasicStringList = TemplateStringList.bind({});
20
20
  BasicStringList.args = {
21
21
  data: [
22
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="green" /></span> Demulon 1,000,000' },
23
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="green" /></span> Patrick' },
24
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="orange" /></span> Lee', clickable: true },
25
- { element: '<span><tttx-icon_1_2_0 icon="egg" color="red" /></span> Ben' },
22
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="green" /></span> Demulon 1,000,000' },
23
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="green" /></span> Patrick' },
24
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="orange" /></span> Lee', clickable: true },
25
+ { element: '<span><tttx-icon_1_3_0 icon="egg" color="red" /></span> Ben' },
26
26
  ],
27
27
  };
28
28
  const TemplateObjectList = ({ data }) => `
29
- <tttx-list_1_2_0
29
+ <tttx-list_1_3_0
30
30
  id='objectList'
31
31
  name='objectList'
32
- ></tttx-list_1_2_0>
32
+ ></tttx-list_1_3_0>
33
33
  <script>
34
34
  if(!objectList) {
35
35
  const objectList = document.getElementId('objectList');
@@ -40,17 +40,17 @@ const TemplateObjectList = ({ data }) => `
40
40
  export const BasicObjectList = TemplateObjectList.bind({});
41
41
  BasicObjectList.args = {
42
42
  data: [
43
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" /></span> Demulon 1,000,000' },
44
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="red" /></span> Patrick' },
45
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="add" /></span> Lee' },
46
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" /></span> Ben' },
43
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" /></span> Demulon 1,000,000' },
44
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="red" /></span> Patrick' },
45
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="add" /></span> Lee' },
46
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" /></span> Ben' },
47
47
  ],
48
48
  };
49
49
  const TemplateClickableList = ({ data }) => `
50
- <tttx-list_1_2_0
50
+ <tttx-list_1_3_0
51
51
  id='clickableList'
52
52
  name='clickableList'
53
- ></tttx-list_1_2_0>
53
+ ></tttx-list_1_3_0>
54
54
  <script>
55
55
  if(!clickableList) {
56
56
  const clickableList = document.getElementId('clickableList');
@@ -64,21 +64,21 @@ BasicClickableList.args = {
64
64
  {
65
65
  clickable: true,
66
66
  icon: 'chevron_right',
67
- element: '<span><tttx-icon_1_2_0 icon="egg" /></span> Demulon 1,000,000',
67
+ element: '<span><tttx-icon_1_3_0 icon="egg" /></span> Demulon 1,000,000',
68
68
  rowData: '[{ "name": "Demulon 1,000,000" }]',
69
69
  },
70
- { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="red" /></span> Emma', rowData: [{ name: 'Emma' }] },
71
- { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="green" /></span> Eulogio', rowData: 'Eulogio' },
72
- { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" color="red" /></span> Patrick' },
73
- { clickable: false, icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="add" /></span> Lee ' },
74
- { icon: 'chevron_right', element: '<span><tttx-icon_1_2_0 icon="egg" /></span> Ben' },
70
+ { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="red" /></span> Emma', rowData: [{ name: 'Emma' }] },
71
+ { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="green" /></span> Eulogio', rowData: 'Eulogio' },
72
+ { clickable: true, icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" color="red" /></span> Patrick' },
73
+ { clickable: false, icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="add" /></span> Lee ' },
74
+ { icon: 'chevron_right', element: '<span><tttx-icon_1_3_0 icon="egg" /></span> Ben' },
75
75
  ],
76
76
  };
77
77
  const TemplateWorkerList = ({ data }) => `
78
- <tttx-list_1_2_0
78
+ <tttx-list_1_3_0
79
79
  id='workersList'
80
80
  name='workersList'
81
- ></tttx-list_1_2_0>
81
+ ></tttx-list_1_3_0>
82
82
  <script>
83
83
  if(!workersList) {
84
84
  const workersList = document.getElementId('workersList');
@@ -107,17 +107,17 @@ WorkerList.args = {
107
107
  </li>
108
108
  <li>
109
109
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
110
- <tttx-tag_1_2_0 text="Driller" color="#F4DFFF"></tttx-tag_1_2_0>
111
- <tttx-tag_1_2_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_2_0>
112
- <tttx-tag_1_2_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_2_0>
110
+ <tttx-tag_1_3_0 text="Driller" color="#F4DFFF"></tttx-tag_1_3_0>
111
+ <tttx-tag_1_3_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_3_0>
112
+ <tttx-tag_1_3_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_3_0>
113
113
  </span>
114
114
  </li>
115
115
  <li>
116
116
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
117
- <span><tttx-icon_1_2_0 icon="school" color="gray" /></span><span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span> 80%
117
+ <span><tttx-icon_1_3_0 icon="school" color="gray" /></span><span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span> 80%
118
118
  </span>
119
119
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
120
- <span><tttx-icon_1_2_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_2_0 icon="warning" color="orange" /></span> 60%
120
+ <span><tttx-icon_1_3_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_3_0 icon="warning" color="orange" /></span> 60%
121
121
  </span>
122
122
  </li>
123
123
  </ul>
@@ -145,17 +145,17 @@ WorkerList.args = {
145
145
  </li>
146
146
  <li>
147
147
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
148
- <tttx-tag_1_2_0 text="Driller" color="#F4DFFF"></tttx-tag_1_2_0>
149
- <tttx-tag_1_2_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_2_0>
150
- <tttx-tag_1_2_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_2_0>
148
+ <tttx-tag_1_3_0 text="Driller" color="#F4DFFF"></tttx-tag_1_3_0>
149
+ <tttx-tag_1_3_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_3_0>
150
+ <tttx-tag_1_3_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_3_0>
151
151
  </span>
152
152
  </li>
153
153
  <li>
154
154
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
155
- <span><tttx-icon_1_2_0 icon="school" color="gray" /></span><span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span> 80%
155
+ <span><tttx-icon_1_3_0 icon="school" color="gray" /></span><span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span> 80%
156
156
  </span>
157
157
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
158
- <span><tttx-icon_1_2_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_2_0 icon="warning" color="orange" /></span> 60%
158
+ <span><tttx-icon_1_3_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_3_0 icon="warning" color="orange" /></span> 60%
159
159
  </span>
160
160
  </li>
161
161
  </ul>
@@ -184,17 +184,17 @@ WorkerList.args = {
184
184
  </li>
185
185
  <li>
186
186
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
187
- <tttx-tag_1_2_0 text="Driller" color="#F4DFFF"></tttx-tag_1_2_0>
188
- <tttx-tag_1_2_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_2_0>
189
- <tttx-tag_1_2_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_2_0>
187
+ <tttx-tag_1_3_0 text="Driller" color="#F4DFFF"></tttx-tag_1_3_0>
188
+ <tttx-tag_1_3_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_3_0>
189
+ <tttx-tag_1_3_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_3_0>
190
190
  </span>
191
191
  </li>
192
192
  <li>
193
193
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
194
- <span><tttx-icon_1_2_0 icon="school" color="gray" /></span><span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span> 80%
194
+ <span><tttx-icon_1_3_0 icon="school" color="gray" /></span><span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span> 80%
195
195
  </span>
196
196
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
197
- <span><tttx-icon_1_2_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_2_0 icon="warning" color="orange" /></span> 60%
197
+ <span><tttx-icon_1_3_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_3_0 icon="warning" color="orange" /></span> 60%
198
198
  </span>
199
199
  </li>
200
200
  </ul>
@@ -224,17 +224,17 @@ WorkerList.args = {
224
224
  </li>
225
225
  <li>
226
226
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
227
- <tttx-tag_1_2_0 text="Driller" color="#F4DFFF"></tttx-tag_1_2_0>
228
- <tttx-tag_1_2_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_2_0>
229
- <tttx-tag_1_2_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_2_0>
227
+ <tttx-tag_1_3_0 text="Driller" color="#F4DFFF"></tttx-tag_1_3_0>
228
+ <tttx-tag_1_3_0 text="Offshore" color="#CEF4EB"></tttx-tag_1_3_0>
229
+ <tttx-tag_1_3_0 text="3t Transform" color="#DDE6FA"></tttx-tag_1_3_0>
230
230
  </span>
231
231
  </li>
232
232
  <li>
233
233
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
234
- <span><tttx-icon_1_2_0 icon="school" color="gray" /></span><span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span> 80%
234
+ <span><tttx-icon_1_3_0 icon="school" color="gray" /></span><span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span> 80%
235
235
  </span>
236
236
  <span style="padding: 8px; display: inline-flex; align-items: center; gap: 8px;">
237
- <span><tttx-icon_1_2_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_2_0 icon="warning" color="orange" /></span> 60%
237
+ <span><tttx-icon_1_3_0 icon="verified_user" color="gray" /></span><span><tttx-icon_1_3_0 icon="warning" color="orange" /></span> 60%
238
238
  </span>
239
239
  </li>
240
240
  </ul>
@@ -249,9 +249,9 @@ WorkerList.args = {
249
249
  icon: 'chevron_right',
250
250
  element: `
251
251
  <div style="display: flex; flex-direction: row; align-items: center; gap: 8px;">
252
- <span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span>
252
+ <span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span>
253
253
  Qualification row
254
- <tttx-tag_1_2_0 text="Vantage" color="#D5D5D5"></tttx-tag_1_2_0>
254
+ <tttx-tag_1_3_0 text="Vantage" color="#D5D5D5"></tttx-tag_1_3_0>
255
255
  <span style="color: #757575;">Awarded:</span> <span style="color: #212121;">10 Jan 2022</span>
256
256
  <span style="color: #757575;">Expiry:</span> <span style="color: #212121;">10 Jan 2023</span>
257
257
  </div>
@@ -263,9 +263,9 @@ WorkerList.args = {
263
263
  icon: 'chevron_right',
264
264
  element: `
265
265
  <div style="display: flex; flex-direction: row; align-items: center; gap: 8px;">
266
- <span><tttx-icon_1_2_0 icon="check_circle" color="green" /></span>
266
+ <span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span>
267
267
  Qualification row
268
- <tttx-tag_1_2_0 text="Vantage" color="#D5D5D5"></tttx-tag_1_2_0>
268
+ <tttx-tag_1_3_0 text="Vantage" color="#D5D5D5"></tttx-tag_1_3_0>
269
269
  <span style="color: #757575;">Awarded:</span> <span style="color: #212121;">10 Jan 2022</span>
270
270
  <span style="color: #757575;">Expiry:</span> <span style="color: #212121;">10 Jan 2023</span>
271
271
  </div>