@3t-transform/threeteeui 0.0.21 → 0.0.23

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 (101) hide show
  1. package/dist/cjs/{index-bf777121.js → index-2943e8f8.js} +1 -122
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/tttx-button.cjs.entry.js +1 -1
  4. package/dist/cjs/tttx-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +8 -5
  6. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
  7. package/dist/cjs/tttx-standalone-input.cjs.entry.js +6 -4
  8. package/dist/cjs/tttx.cjs.js +2 -2
  9. package/dist/collection/collection-manifest.json +1 -7
  10. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +7 -4
  11. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +28 -9
  12. package/dist/components/index.d.ts +0 -6
  13. package/dist/components/index.js +0 -6
  14. package/dist/components/tttx-button.js +54 -1
  15. package/dist/components/tttx-keyvalue-block.js +7 -4
  16. package/dist/components/tttx-loading-spinner.js +38 -1
  17. package/dist/components/tttx-standalone-input.js +8 -5
  18. package/dist/esm/{index-a05bd606.js → index-058a3cd0.js} +2 -122
  19. package/dist/esm/loader.js +3 -3
  20. package/dist/esm/tttx-button.entry.js +1 -1
  21. package/dist/esm/tttx-icon.entry.js +1 -1
  22. package/dist/esm/tttx-keyvalue-block.entry.js +8 -5
  23. package/dist/esm/tttx-loading-spinner.entry.js +1 -1
  24. package/dist/esm/tttx-standalone-input.entry.js +6 -4
  25. package/dist/esm/tttx.js +3 -3
  26. package/dist/tttx/{p-68ff0f39.entry.js → p-046868d9.entry.js} +1 -1
  27. package/dist/tttx/{p-93763d3c.entry.js → p-1adb2b75.entry.js} +1 -1
  28. package/dist/tttx/{p-a5808741.entry.js → p-495cf4b3.entry.js} +1 -1
  29. package/dist/tttx/p-a4d9929a.entry.js +1 -0
  30. package/dist/tttx/p-ad637dde.entry.js +1 -0
  31. package/dist/tttx/p-bbb7dbf7.js +2 -0
  32. package/dist/tttx/tttx.esm.js +1 -1
  33. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +3 -2
  34. package/dist/types/components.d.ts +6 -140
  35. package/package.json +2 -2
  36. package/dist/cjs/tttx-checkbox.cjs.entry.js +0 -28
  37. package/dist/cjs/tttx-form.cjs.entry.js +0 -374
  38. package/dist/cjs/tttx-input-calendar.cjs.entry.js +0 -125
  39. package/dist/cjs/tttx-list.cjs.entry.js +0 -198
  40. package/dist/cjs/tttx-popover-content.cjs.entry.js +0 -23
  41. package/dist/cjs/tttx-table.cjs.entry.js +0 -60
  42. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +0 -30
  43. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +0 -97
  44. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +0 -23
  45. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +0 -181
  46. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +0 -102
  47. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +0 -13
  48. package/dist/collection/components/molecules/tttx-form/tttx-form.css +0 -314
  49. package/dist/collection/components/molecules/tttx-form/tttx-form.js +0 -452
  50. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +0 -109
  51. package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.css +0 -93
  52. package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.js +0 -174
  53. package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js +0 -27
  54. package/dist/collection/components/molecules/tttx-list/tttx-list.css +0 -56
  55. package/dist/collection/components/molecules/tttx-list/tttx-list.js +0 -312
  56. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +0 -37
  57. package/dist/collection/components/molecules/tttx-table/tttx-table.css +0 -166
  58. package/dist/collection/components/molecules/tttx-table/tttx-table.js +0 -174
  59. package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +0 -81
  60. package/dist/components/tttx-button2.js +0 -56
  61. package/dist/components/tttx-checkbox.d.ts +0 -11
  62. package/dist/components/tttx-checkbox.js +0 -46
  63. package/dist/components/tttx-form.d.ts +0 -11
  64. package/dist/components/tttx-form.js +0 -391
  65. package/dist/components/tttx-input-calendar.d.ts +0 -11
  66. package/dist/components/tttx-input-calendar.js +0 -157
  67. package/dist/components/tttx-list.d.ts +0 -11
  68. package/dist/components/tttx-list.js +0 -225
  69. package/dist/components/tttx-loading-spinner2.js +0 -40
  70. package/dist/components/tttx-popover-content.d.ts +0 -11
  71. package/dist/components/tttx-popover-content.js +0 -6
  72. package/dist/components/tttx-popover-content2.js +0 -39
  73. package/dist/components/tttx-table.d.ts +0 -11
  74. package/dist/components/tttx-table.js +0 -91
  75. package/dist/esm/tttx-checkbox.entry.js +0 -24
  76. package/dist/esm/tttx-form.entry.js +0 -370
  77. package/dist/esm/tttx-input-calendar.entry.js +0 -121
  78. package/dist/esm/tttx-list.entry.js +0 -194
  79. package/dist/esm/tttx-popover-content.entry.js +0 -19
  80. package/dist/esm/tttx-table.entry.js +0 -56
  81. package/dist/tttx/p-037d286f.entry.js +0 -1
  82. package/dist/tttx/p-07b134af.js +0 -2
  83. package/dist/tttx/p-1b63f16a.entry.js +0 -1
  84. package/dist/tttx/p-45afb84c.entry.js +0 -1
  85. package/dist/tttx/p-74061060.entry.js +0 -1
  86. package/dist/tttx/p-9536b8c4.entry.js +0 -1
  87. package/dist/tttx/p-a92ca87e.entry.js +0 -1
  88. package/dist/tttx/p-a96ca037.entry.js +0 -1
  89. package/dist/tttx/p-f579ed1e.entry.js +0 -1
  90. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +0 -7
  91. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +0 -18
  92. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +0 -9
  93. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +0 -6
  94. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +0 -134
  95. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -12
  96. package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.d.ts +0 -19
  97. package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.d.ts +0 -26
  98. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +0 -51
  99. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -13
  100. package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +0 -15
  101. package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +0 -21
@@ -1,194 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a05bd606.js';
2
-
3
- const tttxListCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.tttx-list__row{min-height:52px;line-height:36px;padding:8px;display:flex;flex-direction:row;align-items:center;cursor:pointer;border-bottom:1px solid #d5d5d5}.tttx-list__row .generic-template__content{width:100%;display:flex;align-items:center;gap:8px}.tttx-list__row:first-of-type{border-top:1px solid #d5d5d5}.tttx-list__row:focus,.tttx-list__row:active{background-color:#e6e6e6}.tttx-list__row.selected{background-color:#e7f1f9}.load-indicator{display:flex;justify-content:center}";
4
-
5
- const TttxList = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.listPaginate = createEvent(this, "listPaginate", 7);
9
- this.listSelectedEvent = createEvent(this, "listSelectedEvent", 7);
10
- this.listItemClick = createEvent(this, "listItemClick", 7);
11
- this.rowCount = 0;
12
- this.name = undefined;
13
- this.selectable = undefined;
14
- this.items = [];
15
- this.selectedIds = [];
16
- this.loading = true;
17
- this.lastPage = false;
18
- }
19
- listLoadHandler(event) {
20
- if (event.detail.name !== this.name)
21
- return;
22
- this.items = [...this.items, ...event.detail.items];
23
- this.loading = false;
24
- this.lastPage = event.detail.lastPage;
25
- this.renderRows(event.detail.items);
26
- if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
27
- this.listPaginateHandler();
28
- }
29
- listPaginateHandler() {
30
- // We don't want to emit an event to load the next page if this is the last page, or if we're already loading
31
- if (this.lastPage || this.loading)
32
- return;
33
- this.loading = true;
34
- this.listPaginate.emit({ name: this.name });
35
- }
36
- listClearDataCacheHandler(event) {
37
- if (event.detail.name !== this.name)
38
- return;
39
- this.items = [];
40
- this.selectedIds = [];
41
- this.listItemContainer()
42
- .querySelectorAll('.tttx-list__row')
43
- .forEach((node) => {
44
- node.remove();
45
- });
46
- this.rowCount = 0;
47
- this.lastPage = false;
48
- this.loading = false;
49
- }
50
- listActionSelectedEventHandler(event) {
51
- if (event.detail.name !== this.name || !this.selectable || this.selectedIds.length === 0)
52
- return;
53
- const selectedRows = this.selectedIds.map(id => {
54
- return this.items[id];
55
- });
56
- if (event.detail.removeRows)
57
- this.removeSelectedRows();
58
- this.listSelectedEvent.emit({
59
- name: this.name,
60
- eventName: event.detail.eventName,
61
- selectedRows,
62
- });
63
- }
64
- removeSelectedRows() {
65
- const orderedSelectedIds = [...this.selectedIds].sort((a, b) => {
66
- return b - a;
67
- });
68
- orderedSelectedIds.forEach(itemIndex => {
69
- this.items.splice(itemIndex, 1);
70
- this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${itemIndex}"]`));
71
- // If this removes the scrollbar and we're not on the last page, load in a new page
72
- if (this.scrollableParent.clientHeight === this.scrollableParent.scrollHeight)
73
- this.listPaginateHandler();
74
- });
75
- // Empty selected ids with mutation rather than assignment to avoid unecessary component rerender
76
- this.selectedIds.splice(0, this.selectedIds.length);
77
- }
78
- listItemClickHandler(itemData) {
79
- if (this.selectedIds.length !== 0)
80
- return;
81
- this.listItemClick.emit({ itemData, name: this.name });
82
- }
83
- componentWillLoad() {
84
- this.template = this.host.querySelector('template');
85
- this.scrollableParent = this.getScrollableParent(this.host);
86
- const scrollableContext = this.scrollableParent === document.scrollingElement ? document : this.scrollableParent;
87
- scrollableContext.addEventListener('scroll', this.scrollHandler.bind(this));
88
- window.addEventListener('resize', this.scrollHandler.bind(this));
89
- }
90
- componentDidLoad() {
91
- // Emit event to load first page
92
- this.listPaginate.emit({ name: this.name });
93
- }
94
- listItemContainer() {
95
- return this.host.shadowRoot.querySelector('.list-item-container');
96
- }
97
- async scrollHandler() {
98
- const { clientHeight, scrollTop, scrollHeight } = this.scrollableParent;
99
- if (Math.abs(scrollHeight - clientHeight - scrollTop) < 26)
100
- this.listPaginateHandler();
101
- }
102
- isScrollable(node) {
103
- const hasScrollbar = ['scroll', 'auto'].includes(node.style.overflowY);
104
- return hasScrollbar;
105
- }
106
- getScrollableParent(node) {
107
- if (!node || node === document.body) {
108
- return document.scrollingElement;
109
- }
110
- else {
111
- return this.isScrollable(node) ? node : this.getScrollableParent(node.parentElement);
112
- }
113
- }
114
- appendRowCheckbox(rowContainer) {
115
- if (!this.selectable)
116
- return;
117
- const rowId = this.rowCount;
118
- const checkbox = document.createElement('input');
119
- checkbox.setAttribute('type', 'checkbox');
120
- checkbox.addEventListener('click', e => {
121
- e.stopPropagation();
122
- if (e.target.checked) {
123
- this.selectedIds = [...this.selectedIds, rowId];
124
- rowContainer.classList.add('selected');
125
- }
126
- else {
127
- this.selectedIds = this.selectedIds.filter(id => {
128
- return id !== rowId;
129
- });
130
- rowContainer.classList.remove('selected');
131
- }
132
- });
133
- rowContainer.setAttribute('data-row-id', `${rowId}`);
134
- this.rowCount++;
135
- rowContainer.appendChild(checkbox);
136
- }
137
- appendSeededTemplate(rowData, rowContainer) {
138
- this.template.childNodes.forEach(child => {
139
- const clone = child.cloneNode(false);
140
- if (clone.getAttribute('data-fields')) {
141
- const fields = clone.getAttribute('data-fields').replace(/\s/g, '').split(',');
142
- const filteredRowData = Object.fromEntries(fields.map((field) => {
143
- return [field, rowData[field]];
144
- }));
145
- clone.setAttribute('row-data', JSON.stringify(filteredRowData));
146
- }
147
- else {
148
- clone.setAttribute('row-data', JSON.stringify(rowData));
149
- }
150
- rowContainer.appendChild(clone);
151
- });
152
- }
153
- appendGenericTemplate(rowData, rowContainer) {
154
- const row = document.createElement('div');
155
- row.classList.add('generic-template__content');
156
- row.textContent = rowData.text;
157
- rowContainer.appendChild(row);
158
- if (!rowData.icon)
159
- return;
160
- const icon = document.createElement('span');
161
- icon.classList.add('material-symbols-rounded');
162
- icon.textContent = rowData.icon;
163
- if (rowData.iconColor)
164
- icon.style['color'] = rowData.iconColor;
165
- row.prepend(icon);
166
- }
167
- row(rowData) {
168
- const rowContainer = document.createElement('div');
169
- rowContainer.classList.add('tttx-list__row');
170
- rowContainer.addEventListener('click', () => {
171
- this.listItemClickHandler(rowData);
172
- });
173
- this.appendRowCheckbox(rowContainer);
174
- this.template ? this.appendSeededTemplate(rowData, rowContainer) : this.appendGenericTemplate(rowData, rowContainer);
175
- return rowContainer;
176
- }
177
- renderRows(batchData) {
178
- batchData.forEach(rowData => {
179
- this.listItemContainer().appendChild(this.row(rowData));
180
- });
181
- }
182
- loadIndicator() {
183
- if (!this.loading)
184
- return;
185
- return h("div", { class: "load-indicator" }, h("tttx-loading-spinner", { size: 'large' }));
186
- }
187
- render() {
188
- return (h(Host, null, h("div", { class: "list-item-container", tabindex: "0" }, !this.loading && this.items.length === 0 ? 'No data to display' : undefined), this.loadIndicator()));
189
- }
190
- get host() { return getElement(this); }
191
- };
192
- TttxList.style = tttxListCss;
193
-
194
- export { TttxList as tttx_list };
@@ -1,19 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-a05bd606.js';
2
-
3
- const tttxPopoverContentCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:block;max-width:400px}h4{margin:0;font-size:15px;font-weight:700;color:black;margin-bottom:4px}p{margin:0;font-size:14px;font-weight:normal;color:black;margin-bottom:4px}.linky{color:#1479c6;text-decoration:none;cursor:pointer}";
4
-
5
- const TttxPopoverContent = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.header = undefined;
9
- this.body = undefined;
10
- this.linkcontext = undefined;
11
- this.linktext = undefined;
12
- }
13
- render() {
14
- return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && (h("span", { class: "linky", onClick: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
15
- }
16
- };
17
- TttxPopoverContent.style = tttxPopoverContentCss;
18
-
19
- export { TttxPopoverContent as tttx_popover_content };
@@ -1,56 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-a05bd606.js';
2
-
3
- const tttxTableCss = "// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";
4
-
5
- const TttxTable = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.rowSelected = createEvent(this, "rowSelected", 7);
9
- this.headerClicked = createEvent(this, "headerClicked", 7);
10
- this.headers = [];
11
- this.data = [];
12
- this.loading = false;
13
- this.selected = -1;
14
- }
15
- handleKeyDown(ev) {
16
- if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp') {
17
- this.updateSelectedIndex(ev.key);
18
- this.emitRowSelected();
19
- }
20
- }
21
- updateSelectedIndex(key) {
22
- if (this.selected === -1) {
23
- this.selected = 0;
24
- }
25
- else {
26
- const isArrowDown = key === 'ArrowDown';
27
- const isArrowUp = key === 'ArrowUp';
28
- if (isArrowDown && this.selected < this.data.length - 1) {
29
- this.selected++;
30
- }
31
- else if (isArrowUp && this.selected > 0) {
32
- this.selected--;
33
- }
34
- }
35
- }
36
- emitRowSelected() {
37
- this.rowSelected.emit(this.data[this.selected]);
38
- }
39
- rowSelectedHandler(row) {
40
- this.rowSelected.emit(row);
41
- this.selected = this.data.findIndex((item) => item === row);
42
- }
43
- headerClickedHandler(key) {
44
- this.headerClicked.emit(key);
45
- }
46
- render() {
47
- return (h(Host, null, h("table", null, h("thead", null, h("tr", null, this.loading ?
48
- [1, 2, 3].map(() => (h("th", null, h("div", { class: "skeleton" })))) :
49
- this.headers && this.headers.map((header) => (h("th", { scope: "col", onClick: () => this.headerClickedHandler(header.key) }, header.label))))), h("tbody", null, this.loading ?
50
- [1, 2, 3].map(() => (h("tr", null, h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" })), h("td", null, h("div", { class: "skeleton" }))))) :
51
- Object.keys(this.data).map((key, index) => (h("tr", { class: index === this.selected ? 'selected' : '', onClick: () => this.rowSelectedHandler(this.data[key]) }, this.headers.map((header) => (h("td", null, this.data[key][header.key], " ", header.actions && h("tttx-icon", { class: "align-right", icon: "more_vert" }, h("div", { slot: "popover" }, h("tttx-popover-content", { header: "The humble egg", body: "Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.", linkcontext: "Wikipedia_egg", linktext: "Learn more about eggs" })))))))))))));
52
- }
53
- };
54
- TttxTable.style = tttxTableCss;
55
-
56
- export { TttxTable as tttx_table };
@@ -1 +0,0 @@
1
- import{r as o,h as t,H as i}from"./p-07b134af.js";const s=class{constructor(t){o(this,t),this.header=void 0,this.body=void 0,this.linkcontext=void 0,this.linktext=void 0}render(){return t(i,null,this.header&&t("h4",null,this.header),this.body&&t("p",null,this.body),this.linkcontext&&t("span",{class:"linky",onClick:o=>console.log(this.linkcontext,o)},this.linktext||"More Information"))}};s.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:block;max-width:400px}h4{margin:0;font-size:15px;font-weight:700;color:black;margin-bottom:4px}p{margin:0;font-size:14px;font-weight:normal;color:black;margin-bottom:4px}.linky{color:#1479c6;text-decoration:none;cursor:pointer}';export{s as tttx_popover_content}
@@ -1,2 +0,0 @@
1
- let e,n,t=!1;const l={},o=e=>"object"==(e=typeof e)||"function"===e;function s(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,s=!1,c=!1;const r=[],u=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(t),n){const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}const a=i(e,null);return a.l=n,r.length>0&&(a.o=r),a},i=(e,n)=>({i:0,u:e,t:n,m:null,o:null,l:null}),r={},u=e=>V(e).p,a=(e,n,t)=>{const l=u(e);return{emit:e=>f(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},f=(e,n,t)=>{const l=Y.ce(n,t);return e.dispatchEvent(l),l},d=new WeakMap,m=e=>"sc-"+e.h,p=(e,n,t,l,s,c)=>{if(t!==l){let i=B(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,o=y(t),s=y(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("ref"===n)l&&l(e);else if(i||"o"!==n[0]||"n"!==n[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?i=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!i||4&c||s)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):B(Q,r)?r.slice(2):r[2]+n.slice(3),t&&Y.rel(e,n,t,!1),l&&Y.ael(e,n,l,!1)}},h=/\s/,y=e=>e?e.split(h):[],$=(e,n,t,o)=>{const s=11===n.m.nodeType&&n.m.host?n.m.host:n.m,c=e&&e.l||l,i=n.l||l;for(o in c)o in i||p(s,o,c[o],void 0,t,n.i);for(o in i)p(s,o,c[o],i[o],t,n.i)},b=(n,t,l)=>{const o=t.o[l];let s,c,i=0;if(null!==o.t)s=o.m=X.createTextNode(o.t);else if(s=o.m=X.createElement(o.u),$(null,o,!1),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.o)for(i=0;i<o.o.length;++i)c=b(n,o,i),c&&s.appendChild(c);return s},w=(e,t,l,o,s,c)=>{let i,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=b(null,l,s),i&&(o[s].m=i,r.insertBefore(i,t)))},v=(e,n,t,l,o)=>{for(;n<=t;++n)(l=e[n])&&(o=l.m,j(l),o.remove())},S=(e,n)=>e.u===n.u,g=(e,n)=>{const t=n.m=e.m,l=e.o,o=n.o,s=n.t;null===s?("slot"===n.u||$(e,n,!1),null!==l&&null!==o?((e,n,t,l)=>{let o,s=0,c=0,i=n.length-1,r=n[0],u=n[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=n[++s]:null==u?u=n[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=n[++s],f=l[++c]):S(u,d)?(g(u,d),u=n[--i],d=l[--a]):S(r,d)?(g(r,d),e.insertBefore(r.m,u.m.nextSibling),r=n[++s],d=l[--a]):S(u,f)?(g(u,f),e.insertBefore(u.m,r.m),u=n[--i],f=l[++c]):(o=b(n&&n[c],t,c),f=l[++c],o&&r.m.parentNode.insertBefore(o,r.m));s>i?w(e,null==l[a+1]?null:l[a+1].m,t,l,c,a):c>a&&v(n,s,i)})(t,l,n,o):null!==o?(null!==e.t&&(t.textContent=""),w(t,null,n,o,0,o.length-1)):null!==l&&v(l,0,l.length-1)):e.t!==s&&(t.data=s)},j=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(j)},M=(e,n)=>{n&&!e.$&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.$=n)))},k=(e,n)=>{if(e.i|=16,!(4&e.i))return M(e,e.v),ie((()=>C(e,n)));e.i|=512},C=(e,n)=>{const t=e.S;let l;return n&&(e.i|=256,e.g&&(e.g.map((([e,n])=>R(t,e,n))),e.g=null),l=R(t,"componentWillLoad")),l=W(l,(()=>R(t,"componentWillRender"))),W(l,(()=>O(e,t,n)))},O=async(e,n,t)=>{const l=e.p,o=l["s-rc"];t&&(e=>{const n=e.j,t=e.p,l=n.i,o=((e,n)=>{var t;let l=m(n);const o=K.get(l);if(e=11===e.nodeType?e:X,o)if("string"==typeof o){let n,c=d.get(e=e.head||e);if(c||d.set(e,c=new Set),!c.has(l)){{n=X.createElement("style"),n.innerHTML=o;const l=null!==(t=Y.M)&&void 0!==t?t:s(X);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}c&&c.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"),2&l&&t.classList.add(o+"-s"))})(e);x(e,n),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const n=l["s-p"],t=()=>L(e);0===n.length?t():(Promise.all(n).then(t),e.i|=4,n.length=0)}},x=(t,l)=>{try{l=l.render(),t.i&=-17,t.i|=2,((t,l)=>{const o=t.p,s=t.k||i(null,null),u=(e=>e&&e.u===r)(l)?l:c(null,null,l);n=o.tagName,u.u=null,u.i|=4,t.k=u,u.m=s.m=o.shadowRoot||o,e=o["s-sc"],g(s,u)})(t,l)}catch(e){G(e,t.p)}return null},L=e=>{const n=e.p,t=e.S,l=e.v;R(t,"componentDidRender"),64&e.i||(e.i|=64,E(n),R(t,"componentDidLoad"),e.C(n),l||P()),e.$&&(e.$(),e.$=void 0),512&e.i&&ce((()=>k(e,!1))),e.i&=-517},P=()=>{E(X.documentElement),ce((()=>f(Q,"appload",{detail:{namespace:"tttx"}})))},R=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){G(e)}},W=(e,n)=>e&&e.then?e.then(n):n(),E=e=>e.classList.add("hydrated"),N=(e,n,t)=>{if(n.O){e.watchers&&(n.L=e.watchers);const l=Object.entries(n.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(s,e,{get(){return((e,n)=>V(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=V(e),c=s.p,i=s.P.get(n),r=s.i,u=s.S;if(t=((e,n)=>null==e||o(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.O[n][0]),(!(8&r)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(s.P.set(n,t),u)){if(l.L&&128&r){const e=l.L[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){G(e,c)}}))}2==(18&r)&&k(s,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const n=new Map;s.attributeChangedCallback=function(e,t,l){Y.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,t])=>{const l=t[1]||e;return n.set(l,e),l}))}}return e},T=(e,n={})=>{var t;const l=[],o=n.exclude||[],c=Q.customElements,i=X.head,r=i.querySelector("meta[charset]"),u=X.createElement("style"),a=[];let f,d=!0;Object.assign(Y,n),Y.R=new URL(n.resourcesUrl||"./",X.baseURI).href,e.map((e=>{e[1].map((n=>{const t={i:n[0],h:n[1],O:n[2],W:n[3]};t.O=n[2],t.W=n[3],t.L={};const s=t.h,i=class extends HTMLElement{constructor(e){super(e),z(e=this,t),1&t.i&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Y.jmp((()=>(e=>{if(0==(1&Y.i)){const n=V(e),t=n.j,l=()=>{};if(1&n.i)A(e,n,t.W);else{n.i|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){M(n,n.v=t);break}}t.O&&Object.entries(t.O).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,o)=>{if(0==(32&n.i)){{if(n.i|=32,(o=J(t)).then){const e=()=>{};o=await o,e()}o.isProxied||(t.L=o.watchers,N(o,t,2),o.isProxied=!0);const e=()=>{};n.i|=8;try{new o(n)}catch(e){G(e)}n.i&=-9,n.i|=128,e()}if(o.style){let e=o.style;const n=m(t);if(!K.has(n)){const l=()=>{};((e,n,t)=>{let l=K.get(e);ee&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,K.set(e,l)})(n,e,!!(1&t.i)),l()}}}const s=n.v,c=()=>k(n,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,n,t)}l()}})(this)))}disconnectedCallback(){Y.jmp((()=>(()=>{if(0==(1&Y.i)){const e=V(this),n=e.S;e.N&&(e.N.map((e=>e())),e.N=void 0),R(n,"disconnectedCallback")}})()))}componentOnReady(){return V(this).T}};t.A=e[0],o.includes(s)||c.get(s)||(l.push(s),c.define(s,N(i,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=Y.M)&&void 0!==t?t:s(X);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):Y.jmp((()=>f=setTimeout(P,30)))},A=(e,n,t)=>{t&&t.map((([t,l,o])=>{const s=F(e,t),c=D(n,o),i=H(t);Y.ael(s,l,c,i),(n.N=n.N||[]).push((()=>Y.rel(s,l,c,i)))}))},D=(e,n)=>t=>{try{256&e.i?e.S[n](t):(e.g=e.g||[]).push([n,t])}catch(e){G(e)}},F=(e,n)=>4&n?X:e,H=e=>0!=(2&e),U=e=>Y.M=e,q=new WeakMap,V=e=>q.get(e),_=(e,n)=>q.set(n.S=e,n),z=(e,n)=>{const t={i:0,p:e,j:n,P:new Map};return t.T=new Promise((e=>t.C=e)),e["s-p"]=[],e["s-rc"]=[],A(e,t,n.W),q.set(e,t)},B=(e,n)=>n in e,G=(e,n)=>(0,console.error)(e,n),I=new Map,J=e=>{const n=e.h.replace(/-/g,"_"),t=e.A,l=I.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(I.set(t,e),e[n])),G)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},K=new Map,Q="undefined"!=typeof window?window:{},X=Q.document||{head:{}},Y={i:0,R:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},Z=e=>Promise.resolve(e),ee=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ne=[],te=[],le=(e,n)=>l=>{e.push(l),t||(t=!0,n&&4&Y.i?ce(se):Y.raf(se))},oe=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){G(e)}e.length=0},se=()=>{oe(ne),oe(te),(t=ne.length>0)&&Y.raf(se)},ce=e=>Z().then(e),ie=le(te,!0);export{r as H,T as b,a as c,u as g,c as h,Z as p,_ as r,U as s}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as o,H as e}from"./p-07b134af.js";const n=class{constructor(o){t(this,o),this.dataSubmitted=i(this,"dataSubmitted",7),this.dataChanged=i(this,"dataChanged",7),this.template=document.createElement("template"),this.formschema=void 0,this.submitValue=void 0}onFormSchemaChange(t){this._formSchema="string"==typeof t?JSON.parse(t):t}fieldChanged(t){this.dataChanged.emit({name:t.target.name,value:t.target.value})}validityCheck(t){var i,o,e,n;t.preventDefault();const r=t.target;let a=!0,s="";switch(!0){case r.validity.valueMissing:s=null!==(i=r.dataset.required)&&void 0!==i?i:"This field is required";break;case r.validity.patternMismatch:s=null!==(o=r.dataset.pattern)&&void 0!==o?o:"Incorrect format";break;case r.validity.badInput:s=null!==(e=r.dataset.badinput)&&void 0!==e?e:"Wrong input type";break;case r.validity.rangeOverflow||r.validity.rangeUnderflow:s=null!==(n=r.dataset.range)&&void 0!==n?n:"Invalid value";break;default:a=!1}this.setErrorState(r,a,s)}setErrorState(t,i,o){const e=t.parentElement.querySelector(".errorBubble");if(i){t.className="invalid";const i=this.createErrorIcon();e.replaceChildren(i,o)}else t.className="",e.replaceChildren()}createErrorIcon(){const t=document.createElement("span");return t.className="material-symbols-rounded",t.textContent="warning",t}doSubmit(t){t.preventDefault();const i=new FormData(t.target);this.dataSubmitted.emit(i)}componentWillLoad(){this.onFormSchemaChange(this.formschema)}componentWillRender(){this.template=document.createElement("template"),this.populateFormFromSchema()}createInput(t,i){var o;const e=document.createElement("input");return e.name=t,e.type=i.type,e.placeholder=null!==(o=i.placeholder)&&void 0!==o?o:"",e.autocomplete="off",e.autocapitalize="off",e}applyValidation(t,i){var o,e;i.required&&(t.setAttribute("required",""),t.setAttribute("data-required",null!==(o=i.required.message)&&void 0!==o?o:"")),i.pattern&&(t.setAttribute("pattern",i.pattern.pattern),t.setAttribute("data-pattern",null!==(e=i.pattern.message)&&void 0!==e?e:"")),i.badInput&&t.setAttribute("data-badinput",i.badInput.message),i.minmax&&(t.setAttribute("min",i.minmax.min),t.setAttribute("max",i.minmax.max),t.setAttribute("data-range",i.minmax.message)),i.maxlength&&t.setAttribute("maxlength",i.maxlength)}createErrorBubble(){const t=document.createElement("div");return t.className="errorBubble",t}createLabel(t,i,o){const e=document.createElement("label");if(e.className="inputBlock",e.innerText=t.label,!t.validation){const t=document.createElement("span");t.className="optional",t.innerHTML="&nbsp;(optional)",e.appendChild(t)}return e.appendChild(i),e.appendChild(o),e}createSubmitButton(){const t=document.createElement("input");return t.type="submit",t.className="button primary-blue",t.value="Save",t}populateFormFromSchema(){if(!this._formSchema)return;const t=this._formSchema.properties;Object.keys(t).forEach((i=>{const o=t[i].form,e=this.createInput(i,o);o.validation&&this.applyValidation(e,o.validation);const n=this.createErrorBubble(),r=this.createLabel(o,e,n);this.template.content.append(r)}));const i=this.createSubmitButton();this.template.content.append(i)}componentDidRender(){if(!this._formSchema)return;const t=this.template.content.cloneNode(!0);Object.keys(this._formSchema.properties).forEach((i=>{const o=t.querySelector(`[name=${i}]`);o.oninvalid=this.validityCheck.bind(this),o.onblur=this.validityCheck.bind(this),o.onkeyup=this.fieldChanged.bind(this),o.onchange=this.fieldChanged.bind(this)})),this.fieldset.appendChild(t)}render(){return o(e,null,o("form",{onSubmit:this.doSubmit.bind(this)},o("fieldset",{ref:t=>this.fieldset=t})))}static get watchers(){return{formschema:["onFormSchemaChange"]}}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:block}fieldset{margin:0;padding:0;border:none}input[type=submit]{margin-left:auto}';export{n as tttx_form}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as a,g as i}from"./p-07b134af.js";const s=class{constructor(e){t(this,e),this.monthNames=Array.from({length:12},((t,e)=>e+1)).map((t=>{const e=new Date(0);return e.setUTCMonth(t-1),e.toLocaleString("default",{month:"long"})})),this.onClickOutside=t=>{!this.el.contains(t.target)&&this.showCalendar&&(this.showCalendar=!1)},this.onFocusIn=t=>{!this.el.contains(t.target)&&this.showCalendar&&(this.showCalendar=!1)},this.previousHandler=()=>{1===this.selectedMonth?(this.selectedMonth=12,this.selectedYear--):this.selectedMonth--},this.nextHandler=()=>{12===this.selectedMonth?(this.selectedMonth=1,this.selectedYear++):this.selectedMonth++},this.months=!1,this.years=!1,this.showCalendar=!1,this.selectedYear=(new Date).getFullYear(),this.selectedMonth=(new Date).getMonth()+1}componentDidLoad(){const t=this.el.shadowRoot.querySelector("slot");if(t){const e=t.assignedElements();e[0]&&e[0].addEventListener("click",(t=>{t.preventDefault(),this.showCalendar=!this.showCalendar}))}document.addEventListener("click",this.onClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.onClickOutside)}getDaysAndDates(t,e){const a=new Date(t,e-1,1),i=new Date(t,e,0),s=[];for(let t=a;t<=i;t.setDate(t.getDate()+1)){const e=t.getDay(),a=t.getDate();s.push({day:e,date:a})}return s}clickDateHandler(t){const{year:e,month:a,day:i}=t,s=new Date(e,a-1,i+1);this.inputElement.valueAsDate=s,this.showCalendar=!1}render(){const t=this.getDaysAndDates(this.selectedYear,this.selectedMonth),i=(new Date).getFullYear(),s=Array.from({length:11},((t,e)=>i-5+e)),n=[];let l=[];for(let a=0;a<t[0].day;a++)l.push(e("td",null));if(t.forEach((({day:t,date:a})=>{l.push(e("td",null,e("span",{onClick:()=>this.clickDateHandler({year:this.selectedYear,month:this.selectedMonth,day:a})},a))),6===t&&(n.push(e("tr",null,l)),l=[])})),l.length>0){for(;l.length<7;)l.push(e("td",null));n.push(e("tr",null,l))}return e(a,null,e("div",{class:"calcontainer"},e("slot",null),e("div",{class:"calendar "+(this.showCalendar?"calendar-visible":"")},e("div",{class:"calendar-header"},e("tttx-button",{onClick:this.previousHandler,design:"borderless",icon:"chevron_left",notext:!0}),this.months&&e("select",{id:"month-select",onInput:t=>{this.selectedMonth=parseInt(t.target.value)}},Array.from({length:12},((t,e)=>e+1)).map((t=>e("option",{value:t,selected:t===this.selectedMonth},this.monthNames[t-1])))),this.years&&e("select",{id:"year-select",onInput:t=>{this.selectedYear=parseInt(t.target.value)}},s.map((t=>e("option",{value:t,selected:t===this.selectedYear},t)))),e("div",{class:"date-display"},this.monthNames[this.selectedMonth-1]," ",this.selectedYear),e("tttx-button",{onClick:this.nextHandler,design:"borderless",icon:"chevron_right",notext:!0})),e("table",{class:"calendar-table"},e("thead",null,e("tr",null,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((t=>e("th",null,t))))),e("tbody",null,n)))))}get el(){return i(this)}};s.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:block;--border-radius:4px;position:relative}.calcontainer{-webkit-perspective:500px;perspective:500px}.lefty{float:left}.righty{float:right}.calendar{display:none;position:absolute;box-sizing:border-box;width:312px;height:332px;background-color:white;padding:16px;box-shadow:0px 1px 5px rgba(17, 17, 17, 0.3);border-radius:var(--border-radius)}.calendar-header{display:flex;justify-content:space-between;margin-bottom:8px}.date-display{margin-top:8px}.calendar-header select{border:none;padding:5px}.calendar-table{width:100%;border-collapse:collapse}.calendar-table th{text-align:center;padding:4px;text-transform:uppercase;font-size:14px;color:#757575;border-bottom:1px solid #d5d5d5;margin-bottom:8px}.calendar .calendar-table td{padding:0;margin:0;width:14.2%;text-align:center;height:36px;line-height:36px}.calendar .calendar-table td span:hover{background-color:#f0f0f0}.calendar .calendar-table td span{display:block;text-align:center;padding:4px;cursor:pointer;border-radius:var(--border-radius)}.calendar-visible{display:block}.calendar-table thead tr{border-bottom:1px solid #d5d5d5}';export{s as tttx_input_calendar}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as n,H as s}from"./p-07b134af.js";const o=class{constructor(n){t(this,n),this.valueChanged=i(this,"valueChanged",7),this.focusChanged=i(this,"focusChanged",7),this.blurChanged=i(this,"blurChanged",7),this.invalidChanged=i(this,"invalidChanged",7),this.label=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.iconleft=void 0,this.iconright=void 0,this.autocapitalize=void 0,this.autofocus=void 0,this.inputKeyhint=void 0,this.inputIndex=void 0,this.autocomplete=void 0,this.checked=void 0,this.disabled=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.step=void 0,this.type="text",this.value=void 0}handleChange(t){const i=t.target;this.value=i.value,this.valueChanged.emit(i.value)}handleFocus(t){this.focusChanged.emit(t.target.value)}handleBlur(t){this.blurChanged.emit(t.target.value)}handleInvalid(t){this.invalidChanged.emit(t.target.value)}render(){const t=["standalone",this.showerrormsg?"invalid":""].join(" ");return n(s,null,n("label",{class:"inputBlock"},this.label,this.required?"":n("span",{class:"optional"}," (optional)"),this.iconleft&&n("div",{class:"icon-left"},n("tttx-icon",{icon:this.iconleft,color:"grey"})),n("input",{class:t,autocapitalize:this.autocapitalize,autofocus:this.autofocus,enterkeyhint:this.inputKeyhint,tabindex:this.inputIndex,autocomplete:this.autocomplete,checked:this.checked,disabled:this.disabled,max:this.max,maxlength:this.maxlength,min:this.min,minlength:this.minlength,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readonly:this.readonly,required:this.required,step:this.step,type:this.type,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this),onInvalid:this.handleInvalid.bind(this)}),this.iconright&&n("div",{class:"icon-right"},n("tttx-icon",{icon:this.iconright,color:"grey"})),n("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},n("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};o.style='.material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px;margin-right:4px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.focused.sc-tttx-standalone-input{border-color:#1479c6}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.sc-tttx-standalone-input{font-weight:500;font-size:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){visibility:hidden}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input.sc-tttx-standalone-input:focus{border-color:#1479c6}.sc-tttx-standalone-input-h{display:block}';export{o as tttx_standalone_input}
@@ -1 +0,0 @@
1
- import{r as t,h as l,H as i}from"./p-07b134af.js";const d=class{constructor(l){t(this,l),this.keyvalues=void 0,this.horizontal=void 0}renderSingleElements(t){const i=Object.keys(t),d=[];for(let o=0;o<i.length;o++)this.horizontal?d.push(l("div",null,l("dt",null,i[o]),l("dd",null,t[i[o]]))):(d.push(l("dt",null,i[o])),d.push(l("dd",null,t[i[o]])));return d}renderArrayElements(t){const i=[];for(let d=0;d<t.length;d++){const o=t[d];this.horizontal?i.push(l("div",null,l("dt",{class:"mainTitle"},o.title),l("dt",{class:"subTitle"},o.subTitle),l("dd",null,o.data))):(i.push(l("dt",{class:"mainTitle"},o.title)),i.push(l("dt",{class:"subTitle"},o.subTitle)),i.push(l("dd",null,o.data)))}return i}render(){let t,d;return t="string"==typeof this.keyvalues?JSON.parse(this.keyvalues):this.keyvalues,d=Array.isArray(t)?this.renderArrayElements(t):this.renderSingleElements(t),l(i,null,l("dl",{class:this.horizontal?"horizontal":null},d))}};d.style=':host{display:block}dl{margin:0;padding:0;font-family:"Roboto", sans-serif;cursor:default}dt{font-weight:400;line-height:21px;font-size:16px}dt,dt.subTitle{color:#757575}dt.mainTitle{color:#212121}dd{margin:0;font-weight:400;font-size:16px;color:#212121;line-height:21px;margin-bottom:18px}dl.horizontal{display:flex;flex-direction:row;width:100%}dl.horizontal div{flex-grow:1}@media (max-width: 769px){dl.horizontal{flex-wrap:wrap}dl.horizontal div{width:50%}}@media (max-width: 600px){dl.horizontal div{width:100%}}';export{d as tttx_keyvalue_block}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,H as e,g as o}from"./p-07b134af.js";const n=class{constructor(s){t(this,s),this.listPaginate=i(this,"listPaginate",7),this.listSelectedEvent=i(this,"listSelectedEvent",7),this.listItemClick=i(this,"listItemClick",7),this.rowCount=0,this.name=void 0,this.selectable=void 0,this.items=[],this.selectedIds=[],this.loading=!0,this.lastPage=!1}listLoadHandler(t){t.detail.name===this.name&&(this.items=[...this.items,...t.detail.items],this.loading=!1,this.lastPage=t.detail.lastPage,this.renderRows(t.detail.items),this.scrollableParent.clientHeight===this.scrollableParent.scrollHeight&&this.listPaginateHandler())}listPaginateHandler(){this.lastPage||this.loading||(this.loading=!0,this.listPaginate.emit({name:this.name}))}listClearDataCacheHandler(t){t.detail.name===this.name&&(this.items=[],this.selectedIds=[],this.listItemContainer().querySelectorAll(".tttx-list__row").forEach((t=>{t.remove()})),this.rowCount=0,this.lastPage=!1,this.loading=!1)}listActionSelectedEventHandler(t){if(t.detail.name!==this.name||!this.selectable||0===this.selectedIds.length)return;const i=this.selectedIds.map((t=>this.items[t]));t.detail.removeRows&&this.removeSelectedRows(),this.listSelectedEvent.emit({name:this.name,eventName:t.detail.eventName,selectedRows:i})}removeSelectedRows(){[...this.selectedIds].sort(((t,i)=>i-t)).forEach((t=>{this.items.splice(t,1),this.listItemContainer().removeChild(this.listItemContainer().querySelector(`[data-row-id="${t}"]`)),this.scrollableParent.clientHeight===this.scrollableParent.scrollHeight&&this.listPaginateHandler()})),this.selectedIds.splice(0,this.selectedIds.length)}listItemClickHandler(t){0===this.selectedIds.length&&this.listItemClick.emit({itemData:t,name:this.name})}componentWillLoad(){this.template=this.host.querySelector("template"),this.scrollableParent=this.getScrollableParent(this.host),(this.scrollableParent===document.scrollingElement?document:this.scrollableParent).addEventListener("scroll",this.scrollHandler.bind(this)),window.addEventListener("resize",this.scrollHandler.bind(this))}componentDidLoad(){this.listPaginate.emit({name:this.name})}listItemContainer(){return this.host.shadowRoot.querySelector(".list-item-container")}async scrollHandler(){const{clientHeight:t,scrollTop:i,scrollHeight:s}=this.scrollableParent;Math.abs(s-t-i)<26&&this.listPaginateHandler()}isScrollable(t){return["scroll","auto"].includes(t.style.overflowY)}getScrollableParent(t){return t&&t!==document.body?this.isScrollable(t)?t:this.getScrollableParent(t.parentElement):document.scrollingElement}appendRowCheckbox(t){if(!this.selectable)return;const i=this.rowCount,s=document.createElement("input");s.setAttribute("type","checkbox"),s.addEventListener("click",(s=>{s.stopPropagation(),s.target.checked?(this.selectedIds=[...this.selectedIds,i],t.classList.add("selected")):(this.selectedIds=this.selectedIds.filter((t=>t!==i)),t.classList.remove("selected"))})),t.setAttribute("data-row-id",`${i}`),this.rowCount++,t.appendChild(s)}appendSeededTemplate(t,i){this.template.childNodes.forEach((s=>{const e=s.cloneNode(!1);if(e.getAttribute("data-fields")){const i=e.getAttribute("data-fields").replace(/\s/g,"").split(","),s=Object.fromEntries(i.map((i=>[i,t[i]])));e.setAttribute("row-data",JSON.stringify(s))}else e.setAttribute("row-data",JSON.stringify(t));i.appendChild(e)}))}appendGenericTemplate(t,i){const s=document.createElement("div");if(s.classList.add("generic-template__content"),s.textContent=t.text,i.appendChild(s),!t.icon)return;const e=document.createElement("span");e.classList.add("material-symbols-rounded"),e.textContent=t.icon,t.iconColor&&(e.style.color=t.iconColor),s.prepend(e)}row(t){const i=document.createElement("div");return i.classList.add("tttx-list__row"),i.addEventListener("click",(()=>{this.listItemClickHandler(t)})),this.appendRowCheckbox(i),this.template?this.appendSeededTemplate(t,i):this.appendGenericTemplate(t,i),i}renderRows(t){t.forEach((t=>{this.listItemContainer().appendChild(this.row(t))}))}loadIndicator(){if(this.loading)return s("div",{class:"load-indicator"},s("tttx-loading-spinner",{size:"large"}))}render(){return s(e,null,s("div",{class:"list-item-container",tabindex:"0"},this.loading||0!==this.items.length?void 0:"No data to display"),this.loadIndicator())}get host(){return o(this)}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.tttx-list__row{min-height:52px;line-height:36px;padding:8px;display:flex;flex-direction:row;align-items:center;cursor:pointer;border-bottom:1px solid #d5d5d5}.tttx-list__row .generic-template__content{width:100%;display:flex;align-items:center;gap:8px}.tttx-list__row:first-of-type{border-top:1px solid #d5d5d5}.tttx-list__row:focus,.tttx-list__row:active{background-color:#e6e6e6}.tttx-list__row.selected{background-color:#e7f1f9}.load-indicator{display:flex;justify-content:center}';export{n as tttx_list}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-07b134af.js";const r=class{constructor(i){e(this,i),this.rowSelected=t(this,"rowSelected",7),this.headerClicked=t(this,"headerClicked",7),this.headers=[],this.data=[],this.loading=!1,this.selected=-1}handleKeyDown(e){"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(this.updateSelectedIndex(e.key),this.emitRowSelected())}updateSelectedIndex(e){if(-1===this.selected)this.selected=0;else{const t="ArrowUp"===e;"ArrowDown"===e&&this.selected<this.data.length-1?this.selected++:t&&this.selected>0&&this.selected--}}emitRowSelected(){this.rowSelected.emit(this.data[this.selected])}rowSelectedHandler(e){this.rowSelected.emit(e),this.selected=this.data.findIndex((t=>t===e))}headerClickedHandler(e){this.headerClicked.emit(e)}render(){return i(s,null,i("table",null,i("thead",null,i("tr",null,this.loading?[1,2,3].map((()=>i("th",null,i("div",{class:"skeleton"})))):this.headers&&this.headers.map((e=>i("th",{scope:"col",onClick:()=>this.headerClickedHandler(e.key)},e.label))))),i("tbody",null,this.loading?[1,2,3].map((()=>i("tr",null,i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"})),i("td",null,i("div",{class:"skeleton"}))))):Object.keys(this.data).map(((e,t)=>i("tr",{class:t===this.selected?"selected":"",onClick:()=>this.rowSelectedHandler(this.data[e])},this.headers.map((t=>i("td",null,this.data[e][t.key]," ",t.actions&&i("tttx-icon",{class:"align-right",icon:"more_vert"},i("div",{slot:"popover"},i("tttx-popover-content",{header:"The humble egg",body:"Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not.",linkcontext:"Wikipedia_egg",linktext:"Learn more about eggs"}))))))))))))}};r.style="// SPACING $spacing-unit: 4px; // REGULAR $horizontal-spacing: $spacing-unit * 4; $vertical-spacing: $spacing-unit * 2; $base-padding: $vertical-spacing $horizontal-spacing; $base-height: $spacing-unit * 9; $component-spacing: $spacing-unit * 4; // SMALL $horizontal-spacing-sm: $spacing-unit * 2; $vertical-spacing-sm: $spacing-unit * 1; $base-padding-sm: $vertical-spacing-sm $horizontal-spacing-sm; $base-height-sm: $spacing-unit * 7; // COLOURS $grey-0: #212121; $grey-1: #363636; $grey-2: #4c4c4c; $grey-3: #636363; $grey-4: #757575; $grey-5: #9e9e9e; $grey-6: #aeaeae; $grey-7: #c8c8c8; $grey-8: #e3e3e3; $grey-9: #f0f0f0; $white: white; $black: $grey-0; $transparent: transparent; $blue-0: #00187c; $blue-1: #032e8c; $blue-2: #0849a3; $blue-3: #0951a8; $blue-4: #1169ba; $blue-5: #1479c6; $blue-6: #5194d2; $blue-7: #7aacdd; $blue-8: #b9d5ed; $blue-9: #e7f1f9; $red-0: #7c0000; $red-1: #8c0000; $red-2: #a30000; $red-3: #a80000; $red-4: #ba0000; $red-5: #dc0000; $red-6: #d25151; $red-7: #dd7a7a; $red-8: #edc1c1; $red-9: #f9e7e7; $black-1: #e6e6e6; $brand: $blue-0; $accent: $blue-5; $accent-selected: $blue-9; $error: $red-5; $severity-critical: #dc0000; $severity-warning: #f59500; $severity-success: #a2bb31; $severity-info: $accent; $ui-primary: $black; $ui-secondary: $grey-4; $ui-disabled: $grey-2; $ui-placeholder: $grey-5; $ui-background: $grey-9; $ui-sheet: $white; $ui-border: #d5d5d5; // BORDERS $ui-border-radius: 4px; $ui-border-width: 1px; // TYPOGRAPHY $font-size-default: 16px; $font-size-small: 14px; .material-symbols-rounded{font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.skeleton{animation:skeleton-loading 1s linear infinite alternate;border-radius:4px;width:100%}@keyframes skeleton-loading{0%{background-color:hsl(200, 20%, 80%)}100%{background-color:hsl(200, 20%, 95%)}}:host{display:block}table{box-sizing:border-box;width:100%;border-collapse:collapse;border-spacing:0;border:1px solid #ddd;border-bottom:none}thead tr{height:52px;color:#757575}tbody tr{height:48px;color:#212121}tr{font-family:'Roboto', sans-serif;font-weight:400;font-size:16px;display:flex;align-items:center;border-bottom:1px solid #ddd}.selected{background-color:#F0F0F0}.checked{background-color:#e7f1f9}td,th{min-width:300px;margin-left:16px;display:flex;align-items:left}.skeleton{height:24px;display:block}.align-right{margin-left:auto}";export{r as tttx_table}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as o,H as n}from"./p-07b134af.js";const e=class{constructor(o){i(this,o),this.valueChanged=t(this,"valueChanged",7),this.value=void 0,this.label=void 0,this.required=void 0}handleClick(i){const t=i.target;this.value=t.checked,this.valueChanged.emit(t.checked)}render(){return o(n,null,o("div",{class:"field spacing"},this.label&&o("label",{class:"label"},this.label,this.required?"":o("span",{class:"optional"}," (optional)")),o("input",{type:"checkbox",class:"input",onChange:i=>this.handleClick(i),checked:this.value})))}};e.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}';export{e as tttx_checkbox}
@@ -1,7 +0,0 @@
1
- export declare class TttxPopoverContent {
2
- header: string;
3
- body: string;
4
- linkcontext: string;
5
- linktext: string;
6
- render(): any;
7
- }
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- argTypes: {
5
- header: {
6
- control: {
7
- type: string;
8
- };
9
- };
10
- body: {
11
- control: {
12
- type: string;
13
- };
14
- };
15
- };
16
- };
17
- export default _default;
18
- export declare const Basic: any;
@@ -1,9 +0,0 @@
1
- import { EventEmitter } from '../../../stencil-public-runtime';
2
- export declare class TttxCheckbox {
3
- value: boolean;
4
- label: string;
5
- required: boolean;
6
- valueChanged: EventEmitter<boolean>;
7
- handleClick(event: Event): void;
8
- render(): any;
9
- }
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- };
5
- export default _default;
6
- export declare const Default: any;
@@ -1,134 +0,0 @@
1
- import { EventEmitter } from '../../../stencil-public-runtime';
2
- export declare class TttxForm {
3
- private fieldset;
4
- private template;
5
- private _formSchema;
6
- formschema: any;
7
- submitValue: any;
8
- dataSubmitted: EventEmitter<FormData>;
9
- dataChanged: EventEmitter<{
10
- name: string;
11
- value: any;
12
- }>;
13
- onFormSchemaChange(newValue: any): void;
14
- /**
15
- * Handles the focus event for a form field and emits a "dataChanged" event
16
- * to the parent component with the field name and its new value.
17
- *
18
- * @param {FocusEvent} event - The focus event triggered by the field.
19
- * @return {void}
20
- */
21
- fieldChanged(event: FocusEvent): void;
22
- /**
23
- * Validates the input field on focusout event by checking its validity state,
24
- * sets an error message if there's an issue, and emits a "dataChanged" event to
25
- * the parent component with the field name and its new value.
26
- *
27
- * @param {FocusEvent} event - The focusout event triggered by the input field.
28
- * @return {void}
29
- */
30
- validityCheck(event: FocusEvent): void;
31
- /**
32
- * Sets the error state of an input field by updating its class and error message.
33
- * If an error was detected, it sets the input field's class to "invalid" and
34
- * displays the error message in an error bubble. If no error was detected,
35
- * it removes the "invalid" class from the input field and clears the error bubble.
36
- *
37
- * @param {HTMLInputElement} target - The input field to update.
38
- * @param {boolean} hasError - Whether an error was detected in the field.
39
- * @param {string} errorMessage - The error message to display (if any).
40
- * @return {void}
41
- */
42
- setErrorState(target: any, hasError: any, errorMessage: any): void;
43
- createErrorIcon(): HTMLSpanElement;
44
- /**
45
- * Submits the form data to the server.
46
- *
47
- * @param {SubmitEvent} event - The event object for the form submission.
48
- * @returns {void}
49
- *
50
- * @example
51
- * const form = document.getElementById('myForm');
52
- * form.addEventListener('submit', (event) => {
53
- * doSubmit(event);
54
- * });
55
- */
56
- doSubmit(event: SubmitEvent): void;
57
- componentWillLoad(): void;
58
- componentWillRender(): void;
59
- /**
60
- * Creates a new HTMLInputElement with the specified name, type, and placeholder (if any),
61
- * and sets its autocomplete and autocapitalization properties to off.
62
- *
63
- * @param {string} formKey - The name of the input field, as specified in the form schema.
64
- * @param {Object} formProperties - An object containing additional properties for the input field, such as its type and placeholder value.
65
- * @param {string} formProperties.type - The type of the input field (e.g., "text", "email", "number", etc.).
66
- * @param {string} [formProperties.placeholder] - An optional placeholder value to display in the input field.
67
- * @return {HTMLInputElement} - The new input element.
68
- */
69
- createInput(formKey: any, formProperties: any): HTMLInputElement;
70
- /**
71
- * Applies validation attributes to an input element based on the specified validation object.
72
- * If a certain property is present in the object, it will set the corresponding attribute on
73
- * the input element (e.g., "required" will set the "required" and "data-required" attributes,
74
- * "pattern" will set the "pattern" and "data-pattern" attributes, etc.).
75
- *
76
- * @param {HTMLInputElement} input - The input element to apply validation attributes to.
77
- * @param {Object} validation - An object containing the validation rules for the input field.
78
- * @param {Object} [validation.required] - An object containing a "message" property to display if the field is required.
79
- * @param {Object} [validation.pattern] - An object containing a "pattern" property to match against the field value, and a "message" property to display if the pattern doesn't match.
80
- * @param {Object} [validation.badInput] - An object containing a "message" property to display if the field value is invalid.
81
- * @param {Object} [validation.minmax] - An object containing "min" and "max" properties to validate the field value against, and a "message" property to display if the value is out of range.
82
- * @param {string} [validation.maxlength] - The maximum length of the input field.
83
- * @return {void}
84
- */
85
- applyValidation(input: any, validation: any): void;
86
- createErrorBubble(): HTMLDivElement;
87
- /**
88
- * Creates a new <label> element with the "inputBlock" class and the specified label text,
89
- * and appends the input element and error bubble element to it. If the form property has
90
- * no validation object, it adds an "optional" span element to the label.
91
- *
92
- * @param {Object} formProperties - An object containing properties for the form field, including its label text and validation rules.
93
- * @param {HTMLInputElement} input - The input element to associate with the label.
94
- * @param {HTMLDivElement} errorBubble - The error bubble element to display error messages in.
95
- * @return {HTMLLabelElement} - The new label element.
96
- */
97
- createLabel(formProperties: any, input: any, errorBubble: any): HTMLLabelElement;
98
- /**
99
- * Creates a new <input> element with the "submit" type, the "primary-blue" class, and the
100
- * specified label text (i.e., "Save" by default), and returns the new submit button element.
101
- *
102
- * @return {HTMLInputElement} - The new submit button element.
103
- */
104
- createSubmitButton(): HTMLInputElement;
105
- /**
106
- * Populates the form template with input fields and labels based on the properties of the
107
- * current form schema. For each property in the schema, it creates an input element, applies
108
- * any validation rules to it, creates an error bubble and label element, and appends them
109
- * to the form template. Finally, it creates and appends a submit button element to the form.
110
- *
111
- * @return {void}
112
- */
113
- populateFormFromSchema(): void;
114
- /**
115
- * Clones the form template and binds event listeners to its input elements. First, it checks if
116
- * there is a form schema present. If so, it clones the template's content, binds events to form
117
- * input elements, and appends the cloned form elements to the fieldset. The event listeners include
118
- * "oninvalid" (to check input validity on submit), "onblur" (to check input validity on blur),
119
- * "onkeyup" (to handle changes in input fields), and "onchange" (to handle changes in select fields).
120
- *
121
- * @return {void}
122
- */
123
- componentDidRender(): void;
124
- /**
125
- * Renders the component's template as a form element with a fieldset container. The form's
126
- * "onSubmit" event is bound to the "doSubmit" function, which handles the form submission
127
- * and emits a "dataSubmitted" event with the form data. The fieldset element is assigned
128
- * to the "fieldset" instance variable using a ref, so it can be populated with form elements
129
- * later on.
130
- *
131
- * @return {JSX.Element} - The rendered form template as a JSX element.
132
- */
133
- render(): any;
134
- }
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- parameters: {
5
- actions: {
6
- handles: string[];
7
- };
8
- };
9
- decorators: import("@storybook/types").Addon_DecoratorFunction<unknown>[];
10
- };
11
- export default _default;
12
- export declare const ExampleFormFromJSON: () => string;
@@ -1,19 +0,0 @@
1
- export declare class TttxInputCalendar {
2
- months: boolean;
3
- years: boolean;
4
- showCalendar: boolean;
5
- selectedYear: number;
6
- selectedMonth: number;
7
- el: HTMLElement;
8
- inputElement: HTMLInputElement;
9
- monthNames: string[];
10
- componentDidLoad(): void;
11
- disconnectedCallback(): void;
12
- onClickOutside: (event: MouseEvent) => void;
13
- onFocusIn: (event: FocusEvent) => void;
14
- getDaysAndDates(year: number, month: number): any[];
15
- clickDateHandler(event: any): void;
16
- previousHandler: () => void;
17
- nextHandler: () => void;
18
- render(): any;
19
- }
@@ -1,26 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- argTypes: {
5
- required: {
6
- control: {
7
- type: string;
8
- };
9
- };
10
- };
11
- parameters: {
12
- actions: {
13
- handles: string[];
14
- };
15
- };
16
- decorators: import("@storybook/types").Addon_DecoratorFunction<unknown>[];
17
- };
18
- export default _default;
19
- export declare const BasicCalendar: {
20
- ({ required }: {
21
- required: any;
22
- }): string;
23
- args: {
24
- required: boolean;
25
- };
26
- };