@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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tttx-button_1_2_0.cjs.entry.js → tttx-button_1_3_0.cjs.entry.js} +2 -2
- 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
- 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
- package/dist/cjs/{tttx-checkbox-group_1_2_0.cjs.entry.js → tttx-checkbox-group_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-checkbox_1_2_0.cjs.entry.js → tttx-checkbox_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-data-pattern_1_2_0.cjs.entry.js → tttx-data-pattern_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-dialog-box_1_2_0.cjs.entry.js → tttx-dialog-box_1_3_0.cjs.entry.js} +3 -3
- package/dist/cjs/{tttx-dialog_1_2_0.cjs.entry.js → tttx-dialog_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-expander_1_2_0.cjs.entry.js → tttx-expander_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-filter_1_2_0_4.cjs.entry.js → tttx-filter_1_3_0_4.cjs.entry.js} +17 -10
- package/dist/cjs/{tttx-form_1_2_0.cjs.entry.js → tttx-form_1_3_0.cjs.entry.js} +159 -127
- package/dist/cjs/{tttx-icon_1_2_0.cjs.entry.js → tttx-icon_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-keyvalue-block_1_2_0.cjs.entry.js → tttx-keyvalue-block_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-loading-spinner_1_2_0.cjs.entry.js → tttx-loading-spinner_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-multiselect-box_1_2_0.cjs.entry.js → tttx-multiselect-box_1_3_0.cjs.entry.js} +6 -6
- package/dist/cjs/{tttx-percentage-bar_1_2_0.cjs.entry.js → tttx-percentage-bar_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-qrcode_1_2_0.cjs.entry.js → tttx-qrcode_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-select-box_1_2_0.cjs.entry.js → tttx-select-box_1_3_0.cjs.entry.js} +3 -3
- package/dist/cjs/tttx-standalone-input_1_3_0.cjs.entry.js +94 -0
- package/dist/cjs/{tttx-tabs_1_2_0.cjs.entry.js → tttx-tabs_1_3_0.cjs.entry.js} +4 -4
- package/dist/cjs/{tttx-tag_1_2_0.cjs.entry.js → tttx-tag_1_3_0.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-textarea_1_2_0.cjs.entry.js → tttx-textarea_1_3_0.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-tree-view_1_2_0.cjs.entry.js → tttx-tree-view_1_3_0.cjs.entry.js} +3 -3
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +2 -2
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +20 -20
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +2 -2
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +1 -1
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +1 -1
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +6 -6
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +1 -1
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +1 -1
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +5 -5
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +1 -1
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +1 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +6 -6
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +10 -10
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +2 -2
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +6 -6
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +3 -3
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +24 -24
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +2 -2
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +9 -9
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +3 -3
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +2 -2
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +0 -1
- package/dist/collection/components/molecules/tttx-form/lib/timecomparatorChecks.js +64 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +103 -129
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +5 -5
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +11 -4
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +46 -46
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +6 -6
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +33 -33
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +3 -3
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +16 -16
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +2 -2
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +4 -4
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +3 -3
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +4 -4
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +3 -3
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +1 -1
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +37 -37
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +3 -3
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +8 -8
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +2 -2
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +5 -5
- package/dist/components/index.d.ts +26 -26
- package/dist/components/index.js +26 -26
- package/dist/components/tttx-button.js +5 -5
- package/dist/components/{tttx-button_1_2_0.d.ts → tttx-button_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-button_1_2_0.js → tttx-button_1_3_0.js} +2 -2
- package/dist/components/tttx-checkbox-group-caption_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-caption_1_2_0.js → tttx-checkbox-group-caption_1_3_0.js} +5 -5
- package/dist/components/tttx-checkbox-group-heading_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-heading_1_2_0.js → tttx-checkbox-group-heading_1_3_0.js} +5 -5
- package/dist/components/tttx-checkbox-group_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group_1_2_0.js → tttx-checkbox-group_1_3_0.js} +5 -5
- package/dist/components/{tttx-textarea_1_2_0.d.ts → tttx-checkbox_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-checkbox_1_2_0.js → tttx-checkbox_1_3_0.js} +7 -7
- package/dist/components/tttx-data-pattern_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-data-pattern_1_2_0.js → tttx-data-pattern_1_3_0.js} +13 -13
- package/dist/components/{tttx-dialog-box_1_2_0.d.ts → tttx-dialog-box_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-dialog-box_1_2_0.js → tttx-dialog-box_1_3_0.js} +9 -9
- package/dist/components/{tttx-filter_1_2_0.d.ts → tttx-dialog_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-dialog_1_2_0.js → tttx-dialog_1_3_0.js} +8 -8
- package/dist/components/{tttx-expander_1_2_0.d.ts → tttx-expander_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-expander_1_2_0.js → tttx-expander_1_3_0.js} +7 -7
- package/dist/components/tttx-filter.js +6 -6
- package/dist/components/{tttx-qrcode_1_2_0.d.ts → tttx-filter_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-filter_1_2_0.js → tttx-filter_1_3_0.js} +2 -2
- package/dist/components/{tttx-icon_1_2_0.d.ts → tttx-form_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-form_1_2_0.js → tttx-form_1_3_0.js} +166 -134
- package/dist/components/tttx-icon.js +3 -3
- package/dist/components/{tttx-list_1_2_0.d.ts → tttx-icon_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-icon_1_2_0.js → tttx-icon_1_3_0.js} +2 -2
- package/dist/components/tttx-keyvalue-block_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-keyvalue-block_1_2_0.js → tttx-keyvalue-block_1_3_0.js} +5 -5
- package/dist/components/tttx-list.js +14 -7
- package/dist/components/{tttx-form_1_2_0.d.ts → tttx-list_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-list_1_2_0.js → tttx-list_1_3_0.js} +2 -2
- package/dist/components/tttx-loading-spinner_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-loading-spinner_1_2_0.js → tttx-loading-spinner_1_3_0.js} +5 -5
- package/dist/components/tttx-multiselect-box_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-multiselect-box_1_2_0.js → tttx-multiselect-box_1_3_0.js} +13 -13
- package/dist/components/tttx-percentage-bar_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-percentage-bar_1_2_0.js → tttx-percentage-bar_1_3_0.js} +6 -6
- package/dist/components/{tttx-dialog_1_2_0.d.ts → tttx-qrcode_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-qrcode_1_2_0.js → tttx-qrcode_1_3_0.js} +5 -5
- package/dist/components/tttx-select-box.js +7 -7
- package/dist/components/tttx-select-box_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-select-box_1_2_0.js → tttx-select-box_1_3_0.js} +2 -2
- package/dist/components/tttx-sorter.js +5 -5
- package/dist/components/tttx-sorter_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-sorter_1_2_0.js → tttx-sorter_1_3_0.js} +2 -2
- package/dist/components/tttx-standalone-input.js +6 -6
- package/dist/components/tttx-standalone-input_1_3_0.d.ts +11 -0
- package/dist/components/{tttx-standalone-input_1_2_0.js → tttx-standalone-input_1_3_0.js} +2 -2
- package/dist/components/{tttx-tabs_1_2_0.d.ts → tttx-tabs_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-tabs_1_2_0.js → tttx-tabs_1_3_0.js} +9 -9
- package/dist/components/{tttx-tag_1_2_0.d.ts → tttx-tag_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-tag_1_2_0.js → tttx-tag_1_3_0.js} +5 -5
- package/dist/components/{tttx-checkbox_1_2_0.d.ts → tttx-textarea_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-textarea_1_2_0.js → tttx-textarea_1_3_0.js} +6 -6
- package/dist/components/tttx-toolbar.js +3 -3
- package/dist/components/{tttx-toolbar_1_2_0.d.ts → tttx-toolbar_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-toolbar_1_2_0.js → tttx-toolbar_1_3_0.js} +2 -2
- package/dist/components/{tttx-tree-view_1_2_0.d.ts → tttx-tree-view_1_3_0.d.ts} +4 -4
- package/dist/components/{tttx-tree-view_1_2_0.js → tttx-tree-view_1_3_0.js} +9 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tttx-button_1_2_0.entry.js → tttx-button_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-checkbox-group-caption_1_2_0.entry.js → tttx-checkbox-group-caption_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox-group-heading_1_2_0.entry.js → tttx-checkbox-group-heading_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox-group_1_2_0.entry.js → tttx-checkbox-group_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox_1_2_0.entry.js → tttx-checkbox_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-data-pattern_1_2_0.entry.js → tttx-data-pattern_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-dialog-box_1_2_0.entry.js → tttx-dialog-box_1_3_0.entry.js} +3 -3
- package/dist/esm/{tttx-dialog_1_2_0.entry.js → tttx-dialog_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-expander_1_2_0.entry.js → tttx-expander_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-filter_1_2_0_4.entry.js → tttx-filter_1_3_0_4.entry.js} +14 -7
- package/dist/esm/{tttx-form_1_2_0.entry.js → tttx-form_1_3_0.entry.js} +159 -127
- package/dist/esm/{tttx-icon_1_2_0.entry.js → tttx-icon_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-keyvalue-block_1_2_0.entry.js → tttx-keyvalue-block_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-loading-spinner_1_2_0.entry.js → tttx-loading-spinner_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-multiselect-box_1_2_0.entry.js → tttx-multiselect-box_1_3_0.entry.js} +6 -6
- package/dist/esm/{tttx-percentage-bar_1_2_0.entry.js → tttx-percentage-bar_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-qrcode_1_2_0.entry.js → tttx-qrcode_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-select-box_1_2_0.entry.js → tttx-select-box_1_3_0.entry.js} +3 -3
- package/dist/esm/tttx-standalone-input_1_3_0.entry.js +90 -0
- package/dist/esm/{tttx-tabs_1_2_0.entry.js → tttx-tabs_1_3_0.entry.js} +4 -4
- package/dist/esm/{tttx-tag_1_2_0.entry.js → tttx-tag_1_3_0.entry.js} +1 -1
- package/dist/esm/{tttx-textarea_1_2_0.entry.js → tttx-textarea_1_3_0.entry.js} +2 -2
- package/dist/esm/{tttx-tree-view_1_2_0.entry.js → tttx-tree-view_1_3_0.entry.js} +3 -3
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-0e515960.entry.js +1 -1
- package/dist/tttx/p-1e5ff5f8.entry.js +1 -1
- package/dist/tttx/p-23f45005.entry.js +1 -1
- package/dist/tttx/p-3676cddd.entry.js +1 -0
- package/dist/tttx/p-56c8c353.entry.js +1 -1
- package/dist/tttx/p-59c7b049.entry.js +1 -1
- package/dist/tttx/p-5d2706b1.entry.js +1 -1
- package/dist/tttx/p-63ad6fb7.entry.js +1 -1
- package/dist/tttx/p-6b1c7a21.entry.js +1 -1
- package/dist/tttx/p-6deb8699.entry.js +1 -1
- package/dist/tttx/p-796f699a.entry.js +1 -1
- package/dist/tttx/p-81aaafa0.entry.js +1 -1
- package/dist/tttx/p-822ec9dc.entry.js +1 -0
- package/dist/tttx/p-884f37d3.entry.js +1 -1
- package/dist/tttx/p-9434561e.entry.js +1 -1
- package/dist/tttx/p-983d63ff.entry.js +1 -1
- package/dist/tttx/p-a01e679a.entry.js +1 -1
- package/dist/tttx/p-a8e76e78.entry.js +1 -1
- package/dist/tttx/p-c170e3b8.entry.js +1 -1
- package/dist/tttx/p-ee358ce4.entry.js +1 -1
- package/dist/tttx/p-f374e293.entry.js +1 -1
- package/dist/tttx/p-f4db1cf2.entry.js +1 -1
- package/dist/tttx/p-fe967031.entry.js +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-form/lib/timecomparatorChecks.d.ts +4 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +35 -14
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +2 -2
- package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +2 -2
- package/dist/types/components.d.ts +305 -304
- package/package.json +2 -1
- package/dist/cjs/tttx-standalone-input_1_2_0.cjs.entry.js +0 -94
- package/dist/components/tttx-checkbox-group-caption_1_2_0.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-heading_1_2_0.d.ts +0 -11
- package/dist/components/tttx-checkbox-group_1_2_0.d.ts +0 -11
- package/dist/components/tttx-data-pattern_1_2_0.d.ts +0 -11
- package/dist/components/tttx-keyvalue-block_1_2_0.d.ts +0 -11
- package/dist/components/tttx-loading-spinner_1_2_0.d.ts +0 -11
- package/dist/components/tttx-multiselect-box_1_2_0.d.ts +0 -11
- package/dist/components/tttx-percentage-bar_1_2_0.d.ts +0 -11
- package/dist/components/tttx-select-box_1_2_0.d.ts +0 -11
- package/dist/components/tttx-sorter_1_2_0.d.ts +0 -11
- package/dist/components/tttx-standalone-input_1_2_0.d.ts +0 -11
- package/dist/esm/tttx-standalone-input_1_2_0.entry.js +0 -90
- package/dist/tttx/p-34be6c6d.entry.js +0 -1
- 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
|
-
|
|
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',
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
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
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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", {
|
|
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-
|
|
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:
|
|
755
|
-
"resolved": "{ name: string; value:
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
44
|
-
|
|
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 &&
|
|
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-
|
|
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-
|
|
13
|
+
<tttx-list_1_3_0
|
|
14
14
|
data='${JSON.stringify(data)}'
|
|
15
15
|
id='list'
|
|
16
16
|
name='stringList'
|
|
17
|
-
></tttx-
|
|
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-
|
|
23
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
24
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
25
|
-
{ element: '<span><tttx-
|
|
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-
|
|
29
|
+
<tttx-list_1_3_0
|
|
30
30
|
id='objectList'
|
|
31
31
|
name='objectList'
|
|
32
|
-
></tttx-
|
|
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-
|
|
44
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
45
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
46
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
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-
|
|
50
|
+
<tttx-list_1_3_0
|
|
51
51
|
id='clickableList'
|
|
52
52
|
name='clickableList'
|
|
53
|
-
></tttx-
|
|
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-
|
|
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-
|
|
71
|
-
{ clickable: true, icon: 'chevron_right', element: '<span><tttx-
|
|
72
|
-
{ clickable: true, icon: 'chevron_right', element: '<span><tttx-
|
|
73
|
-
{ clickable: false, icon: 'chevron_right', element: '<span><tttx-
|
|
74
|
-
{ icon: 'chevron_right', element: '<span><tttx-
|
|
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-
|
|
78
|
+
<tttx-list_1_3_0
|
|
79
79
|
id='workersList'
|
|
80
80
|
name='workersList'
|
|
81
|
-
></tttx-
|
|
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-
|
|
111
|
-
<tttx-
|
|
112
|
-
<tttx-
|
|
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-
|
|
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-
|
|
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-
|
|
149
|
-
<tttx-
|
|
150
|
-
<tttx-
|
|
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-
|
|
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-
|
|
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-
|
|
188
|
-
<tttx-
|
|
189
|
-
<tttx-
|
|
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-
|
|
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-
|
|
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-
|
|
228
|
-
<tttx-
|
|
229
|
-
<tttx-
|
|
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-
|
|
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-
|
|
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-
|
|
252
|
+
<span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span>
|
|
253
253
|
Qualification row
|
|
254
|
-
<tttx-
|
|
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-
|
|
266
|
+
<span><tttx-icon_1_3_0 icon="check_circle" color="green" /></span>
|
|
267
267
|
Qualification row
|
|
268
|
-
<tttx-
|
|
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>
|