@3t-transform/threeteeui 0.1.62 → 0.1.64
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-dialog-box.cjs.entry.js +9 -7
- package/dist/cjs/tttx-select-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +27 -43
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +12 -12
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.css +7 -1
- package/dist/components/tttx-dialog-box.js +11 -10
- package/dist/components/tttx-select-box.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-dialog-box.entry.js +9 -7
- package/dist/esm/tttx-select-box.entry.js +1 -1
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-6cdbc7b5.entry.js +1 -0
- package/dist/tttx/{p-f94b26dc.entry.js → p-ff38d9f3.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/tttx/p-58ee3f50.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"
|
|
17
|
+
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,6 +15,7 @@ const TttxDialogBox = class {
|
|
|
15
15
|
this.buttonClick = index.createEvent(this, "buttonClick", 7);
|
|
16
16
|
this.data = undefined;
|
|
17
17
|
this.size = 'regular';
|
|
18
|
+
this.open = false;
|
|
18
19
|
this.elementSize = undefined;
|
|
19
20
|
}
|
|
20
21
|
handleResize() {
|
|
@@ -25,18 +26,19 @@ const TttxDialogBox = class {
|
|
|
25
26
|
this.elementSize = this.size;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
+
componentDidRender() {
|
|
29
30
|
if (!this.dialog())
|
|
30
31
|
return;
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
async close() {
|
|
34
|
-
if (!this.dialog())
|
|
32
|
+
if (!this.open) {
|
|
33
|
+
this.dialog().close();
|
|
35
34
|
return;
|
|
36
|
-
|
|
35
|
+
}
|
|
36
|
+
// istanbul ignore next
|
|
37
|
+
if (!this.dialog().open)
|
|
38
|
+
this.dialog().showModal();
|
|
37
39
|
}
|
|
38
40
|
onCloseClickHandler() {
|
|
39
|
-
this.
|
|
41
|
+
this.open = false;
|
|
40
42
|
this.closeButtonClick.emit({ close: true });
|
|
41
43
|
}
|
|
42
44
|
onButtonClickHandler(index) {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-43af0e62.js');
|
|
|
6
6
|
const domsanitiser_options = require('./domsanitiser.options-1dfa7205.js');
|
|
7
7
|
require('./_commonjsHelpers-537d719a.js');
|
|
8
8
|
|
|
9
|
-
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border:
|
|
9
|
+
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:8px 8px 8px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-body{display:flex;width:inherit;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;top:42px}.dropdown-body.search{max-height:410px}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:8px 8px 8px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110D}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 0 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}";
|
|
10
10
|
|
|
11
11
|
const TttxSelectBox = class {
|
|
12
12
|
constructor(hostRef) {
|
package/dist/cjs/tttx.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"
|
|
20
|
+
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -6,6 +6,7 @@ export class TttxDialogBox {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.data = undefined;
|
|
8
8
|
this.size = 'regular';
|
|
9
|
+
this.open = false;
|
|
9
10
|
this.elementSize = undefined;
|
|
10
11
|
}
|
|
11
12
|
handleResize() {
|
|
@@ -16,18 +17,19 @@ export class TttxDialogBox {
|
|
|
16
17
|
this.elementSize = this.size;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
componentDidRender() {
|
|
20
21
|
if (!this.dialog())
|
|
21
22
|
return;
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
async close() {
|
|
25
|
-
if (!this.dialog())
|
|
23
|
+
if (!this.open) {
|
|
24
|
+
this.dialog().close();
|
|
26
25
|
return;
|
|
27
|
-
|
|
26
|
+
}
|
|
27
|
+
// istanbul ignore next
|
|
28
|
+
if (!this.dialog().open)
|
|
29
|
+
this.dialog().showModal();
|
|
28
30
|
}
|
|
29
31
|
onCloseClickHandler() {
|
|
30
|
-
this.
|
|
32
|
+
this.open = false;
|
|
31
33
|
this.closeButtonClick.emit({ close: true });
|
|
32
34
|
}
|
|
33
35
|
onButtonClickHandler(index) {
|
|
@@ -133,6 +135,24 @@ export class TttxDialogBox {
|
|
|
133
135
|
"attribute": "size",
|
|
134
136
|
"reflect": false,
|
|
135
137
|
"defaultValue": "'regular'"
|
|
138
|
+
},
|
|
139
|
+
"open": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"mutable": true,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "boolean",
|
|
144
|
+
"resolved": "boolean",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"attribute": "open",
|
|
154
|
+
"reflect": false,
|
|
155
|
+
"defaultValue": "false"
|
|
136
156
|
}
|
|
137
157
|
};
|
|
138
158
|
}
|
|
@@ -174,42 +194,6 @@ export class TttxDialogBox {
|
|
|
174
194
|
}
|
|
175
195
|
}];
|
|
176
196
|
}
|
|
177
|
-
static get methods() {
|
|
178
|
-
return {
|
|
179
|
-
"open": {
|
|
180
|
-
"complexType": {
|
|
181
|
-
"signature": "() => Promise<void>",
|
|
182
|
-
"parameters": [],
|
|
183
|
-
"references": {
|
|
184
|
-
"Promise": {
|
|
185
|
-
"location": "global"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"return": "Promise<void>"
|
|
189
|
-
},
|
|
190
|
-
"docs": {
|
|
191
|
-
"text": "",
|
|
192
|
-
"tags": []
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"close": {
|
|
196
|
-
"complexType": {
|
|
197
|
-
"signature": "() => Promise<void>",
|
|
198
|
-
"parameters": [],
|
|
199
|
-
"references": {
|
|
200
|
-
"Promise": {
|
|
201
|
-
"location": "global"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"return": "Promise<void>"
|
|
205
|
-
},
|
|
206
|
-
"docs": {
|
|
207
|
-
"text": "",
|
|
208
|
-
"tags": []
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
197
|
static get elementRef() { return "el"; }
|
|
214
198
|
static get listeners() {
|
|
215
199
|
return [{
|
|
@@ -21,7 +21,7 @@ const TttxDialogBoxStory = ({ data }) => `
|
|
|
21
21
|
if(!openDialog) {
|
|
22
22
|
function openDialog() {
|
|
23
23
|
const dialogBox = document.getElementById('dialogBox');
|
|
24
|
-
dialogBox.open
|
|
24
|
+
dialogBox.open = true;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
dialogBox.data = ${JSON.stringify(data)};
|
|
@@ -60,7 +60,7 @@ const TttxDialogBoxMobile = ({ data }) => `
|
|
|
60
60
|
if(!openDialogMobile) {
|
|
61
61
|
function openDialogMobile() {
|
|
62
62
|
const dialogBox = document.getElementById('dialogBoxMobile');
|
|
63
|
-
dialogBox.open
|
|
63
|
+
dialogBox.open = true;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
dialogBoxMobile.data = ${JSON.stringify(data)};
|
|
@@ -100,7 +100,7 @@ const TttxDialogBoxSmall = ({ data }) => `
|
|
|
100
100
|
if(!openDialogSmall) {
|
|
101
101
|
function openDialogSmall() {
|
|
102
102
|
const dialogBox = document.getElementById('dialogBoxSmall');
|
|
103
|
-
dialogBox.open
|
|
103
|
+
dialogBox.open = true;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
dialogBoxSmall.data = ${JSON.stringify(data)};
|
|
@@ -140,7 +140,7 @@ const TttxDialogBoxLarge = ({ data }) => `
|
|
|
140
140
|
if(!openDialogLarge) {
|
|
141
141
|
function openDialogLarge() {
|
|
142
142
|
const dialogBox = document.getElementById('dialogBoxLarge');
|
|
143
|
-
dialogBox.open
|
|
143
|
+
dialogBox.open = true;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
dialogBoxLarge.data = ${JSON.stringify(data)};
|
|
@@ -180,7 +180,7 @@ const TttxDialogBoxWithoutCloseButton = ({ data }) => `
|
|
|
180
180
|
if(!openDialogNoClose) {
|
|
181
181
|
function openDialogNoClose() {
|
|
182
182
|
const dialogBox = document.getElementById('dialogBoxNoClose');
|
|
183
|
-
dialogBox.open
|
|
183
|
+
dialogBox.open = true;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
dialogBoxNoClose.data = ${JSON.stringify(data)};
|
|
@@ -219,7 +219,7 @@ const TttxDialogBoxWithIcon = ({ data }) => `
|
|
|
219
219
|
if(!openDialogIcon) {
|
|
220
220
|
function openDialogIcon() {
|
|
221
221
|
const dialogBox = document.getElementById('dialogBoxIcon');
|
|
222
|
-
dialogBox.open
|
|
222
|
+
dialogBox.open = true;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
dialogBoxIcon.data = ${JSON.stringify(data)};
|
|
@@ -260,7 +260,7 @@ const TttxDialogBoxInfo = ({ data }) => `
|
|
|
260
260
|
if(!openDialogInfo) {
|
|
261
261
|
function openDialogInfo() {
|
|
262
262
|
const dialogBox = document.getElementById('dialogBoxInfo');
|
|
263
|
-
dialogBox.open
|
|
263
|
+
dialogBox.open = true;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
dialogBoxInfo.data = ${JSON.stringify(data)};
|
|
@@ -302,7 +302,7 @@ const TttxDialogBoxSuccess = ({ data }) => `
|
|
|
302
302
|
if(!openDialogSuccess) {
|
|
303
303
|
function openDialogSuccess() {
|
|
304
304
|
const dialogBox = document.getElementById('dialogBoxSuccess');
|
|
305
|
-
dialogBox.open
|
|
305
|
+
dialogBox.open = true;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
dialogBoxSuccess.data = ${JSON.stringify(data)};
|
|
@@ -344,7 +344,7 @@ const TttxDialogBoxWarning = ({ data }) => `
|
|
|
344
344
|
if(!openDialogWarning) {
|
|
345
345
|
function openDialogWarning() {
|
|
346
346
|
const dialogBox = document.getElementById('dialogBoxWarning');
|
|
347
|
-
dialogBox.open
|
|
347
|
+
dialogBox.open = true;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
dialogBoxWarning.data = ${JSON.stringify(data)};
|
|
@@ -386,7 +386,7 @@ const TttxDialogBoxCritical = ({ data }) => `
|
|
|
386
386
|
if(!openDialogCritical) {
|
|
387
387
|
function openDialogCritical() {
|
|
388
388
|
const dialogBox = document.getElementById('dialogBoxCritical');
|
|
389
|
-
dialogBox.open
|
|
389
|
+
dialogBox.open = true;
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
dialogBoxCritical.data = ${JSON.stringify(data)};
|
|
@@ -428,7 +428,7 @@ const TttxDialogBoxHTML = ({ data }) => `
|
|
|
428
428
|
if(!openDialogHTML) {
|
|
429
429
|
function openDialogHTML() {
|
|
430
430
|
const dialogBox = document.getElementById('dialogBoxHTML');
|
|
431
|
-
dialogBox.open
|
|
431
|
+
dialogBox.open = true;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
dialogBoxHTML.data = ${JSON.stringify(data)};
|
|
@@ -468,7 +468,7 @@ const TttxDialogBoxOverflow = ({ data }) => `
|
|
|
468
468
|
if(!openDialogOverflow) {
|
|
469
469
|
function openDialogOverflow() {
|
|
470
470
|
const dialogBox = document.getElementById('dialogBoxOverflow');
|
|
471
|
-
dialogBox.open
|
|
471
|
+
dialogBox.open = true;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
dialogBoxOverflow.data = ${JSON.stringify(data)};
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.dropdown-container {
|
|
19
|
+
position: relative;
|
|
19
20
|
display: flex;
|
|
20
21
|
flex-direction: column;
|
|
21
22
|
width: 100%;
|
|
@@ -29,8 +30,8 @@
|
|
|
29
30
|
|
|
30
31
|
.dropdown-selector, .dropdown-body {
|
|
31
32
|
display: flex;
|
|
32
|
-
border: 1px solid #d5d5d5;
|
|
33
33
|
border-radius: 4px;
|
|
34
|
+
background-color: white;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
.dropdown-selector {
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
gap: 8px;
|
|
39
40
|
padding: 8px 8px 8px 16px;
|
|
40
41
|
cursor: pointer;
|
|
42
|
+
border: 1px solid #d5d5d5;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.dropdown-selector-chevron {
|
|
@@ -47,9 +49,13 @@
|
|
|
47
49
|
|
|
48
50
|
.dropdown-body {
|
|
49
51
|
display: flex;
|
|
52
|
+
width: inherit;
|
|
53
|
+
position: absolute;
|
|
50
54
|
flex-direction: column;
|
|
51
55
|
box-shadow: 0px 1px 5px #1111114D;
|
|
52
56
|
padding-bottom: 8px;
|
|
57
|
+
border: 1px solid #d5d5d5;
|
|
58
|
+
top: 42px;
|
|
53
59
|
}
|
|
54
60
|
.dropdown-body.search {
|
|
55
61
|
max-height: 410px;
|
|
@@ -14,6 +14,7 @@ const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
14
14
|
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
15
15
|
this.data = undefined;
|
|
16
16
|
this.size = 'regular';
|
|
17
|
+
this.open = false;
|
|
17
18
|
this.elementSize = undefined;
|
|
18
19
|
}
|
|
19
20
|
handleResize() {
|
|
@@ -24,18 +25,19 @@ const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
24
25
|
this.elementSize = this.size;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
componentDidRender() {
|
|
28
29
|
if (!this.dialog())
|
|
29
30
|
return;
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
async close() {
|
|
33
|
-
if (!this.dialog())
|
|
31
|
+
if (!this.open) {
|
|
32
|
+
this.dialog().close();
|
|
34
33
|
return;
|
|
35
|
-
|
|
34
|
+
}
|
|
35
|
+
// istanbul ignore next
|
|
36
|
+
if (!this.dialog().open)
|
|
37
|
+
this.dialog().showModal();
|
|
36
38
|
}
|
|
37
39
|
onCloseClickHandler() {
|
|
38
|
-
this.
|
|
40
|
+
this.open = false;
|
|
39
41
|
this.closeButtonClick.emit({ close: true });
|
|
40
42
|
}
|
|
41
43
|
onButtonClickHandler(index) {
|
|
@@ -93,9 +95,8 @@ const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
93
95
|
}, [1, "tttx-dialog-box", {
|
|
94
96
|
"data": [1025],
|
|
95
97
|
"size": [1],
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"close": [64]
|
|
98
|
+
"open": [1028],
|
|
99
|
+
"elementSize": [32]
|
|
99
100
|
}, [[9, "resize", "handleResize"]]]);
|
|
100
101
|
function defineCustomElement$1() {
|
|
101
102
|
if (typeof customElements === "undefined") {
|
|
@@ -3,7 +3,7 @@ import { p as purify, d as domSanitiserOptions } from './domsanitiser.options.js
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './tttx-icon2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './tttx-standalone-input2.js';
|
|
5
5
|
|
|
6
|
-
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border:
|
|
6
|
+
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:8px 8px 8px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-body{display:flex;width:inherit;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;top:42px}.dropdown-body.search{max-height:410px}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:8px 8px 8px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110D}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 0 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}";
|
|
7
7
|
|
|
8
8
|
const TttxSelectBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
9
|
constructor() {
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"
|
|
14
|
+
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -11,6 +11,7 @@ const TttxDialogBox = class {
|
|
|
11
11
|
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
12
12
|
this.data = undefined;
|
|
13
13
|
this.size = 'regular';
|
|
14
|
+
this.open = false;
|
|
14
15
|
this.elementSize = undefined;
|
|
15
16
|
}
|
|
16
17
|
handleResize() {
|
|
@@ -21,18 +22,19 @@ const TttxDialogBox = class {
|
|
|
21
22
|
this.elementSize = this.size;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
componentDidRender() {
|
|
25
26
|
if (!this.dialog())
|
|
26
27
|
return;
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
async close() {
|
|
30
|
-
if (!this.dialog())
|
|
28
|
+
if (!this.open) {
|
|
29
|
+
this.dialog().close();
|
|
31
30
|
return;
|
|
32
|
-
|
|
31
|
+
}
|
|
32
|
+
// istanbul ignore next
|
|
33
|
+
if (!this.dialog().open)
|
|
34
|
+
this.dialog().showModal();
|
|
33
35
|
}
|
|
34
36
|
onCloseClickHandler() {
|
|
35
|
-
this.
|
|
37
|
+
this.open = false;
|
|
36
38
|
this.closeButtonClick.emit({ close: true });
|
|
37
39
|
}
|
|
38
40
|
onButtonClickHandler(index) {
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-97a33389.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
|
-
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border:
|
|
5
|
+
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:8px 8px 8px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-body{display:flex;width:inherit;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;top:42px}.dropdown-body.search{max-height:410px}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:8px 8px 8px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110D}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 0 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}";
|
|
6
6
|
|
|
7
7
|
const TttxSelectBox = class {
|
|
8
8
|
constructor(hostRef) {
|
package/dist/esm/tttx.js
CHANGED
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"
|
|
17
|
+
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
|
|
18
18
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as i,h as t,g as d}from"./p-c544551b.js";import{p as l,d as e}from"./p-5ed38d61.js";import"./p-112455b1.js";const a=class{constructor(t){o(this,t),this.closeButtonClick=i(this,"closeButtonClick",6),this.buttonClick=i(this,"buttonClick",7),this.data=void 0,this.size="regular",this.open=!1,this.elementSize=void 0}handleResize(){this.elementSize=window.innerWidth<698?"mobile":this.size}componentDidRender(){this.dialog()&&(this.open?this.dialog().open||this.dialog().showModal():this.dialog().close())}onCloseClickHandler(){this.open=!1,this.closeButtonClick.emit({close:!0})}onButtonClickHandler(o){this.buttonClick.emit({buttonNumber:o,buttonClicked:!0})}dialog(){return this.el.shadowRoot.querySelector("dialog")}renderHeader(o){const i=o.title,d=!!o.hasClose;return t("div",{class:"dialog-box-header"},!!o.hasIcon&&t("tttx-icon",{class:"dialog-box-icon",icon:o.iconName,color:o.iconColor}),t("h3",{class:"dialog-box-title"},i),d&&t("div",{class:"dialog-box-align-right close-button",onClick:()=>this.onCloseClickHandler()},t("tttx-icon",{class:"dialog-box-icon-close dialog-box-clickable",icon:"close",color:"black"})))}renderContent(o){if(o.isCustomHtml){const i=l.sanitize(o.customHtml,e);return t("div",{class:"dialog-box-body"},t("div",{innerHTML:i}))}return t("div",{class:"dialog-box-body"},t("span",{class:"dialog-box-content"},o.contentText))}renderFooter(o){const i=o.buttons,d=i.length>0,l=i.length>1,e="mobile"===this.elementSize;return t("div",{class:"dialog-box-footer"},t("div",{class:"dialog-box-align-right"},3==i.length&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(3),design:i[2].type,notext:e,icon:i[2].icon},!e&&i[2].name),l&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(2),design:i[1].type,icon:i[1].icon},i[1].name),d&&t("tttx-button",{onClick:()=>this.onButtonClickHandler(1),design:i[0].type,icon:i[0].icon},i[0].name)))}componentWillLoad(){this.elementSize=window.innerWidth<698?"mobile":this.size}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,t("dialog",{class:`dialog-box ${this.elementSize}`},t("div",{class:`dialog-box-padding dialog-box-header-box ${this._data.type||""}`},this.renderHeader(this._data.header)),t("div",{class:"dialog-box-padding dialog-box-body-box"},this.renderContent(this._data.body)),t("div",{class:"dialog-box-padding dialog-box-footer-box"},this.renderFooter(this._data.footer)))}get el(){return d(this)}};a.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}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}dialog::backdrop{background-color:#75757580}.dialog-box.small{width:400px;min-height:200px}.dialog-box.regular{width:600px;min-height:200px}.dialog-box.large{width:900px;min-height:200px}.dialog-box.mobile{max-width:424px;width:calc(100vw - 20px)}.dialog-box-clickable{cursor:pointer}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:500;font-family:"Roboto", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:"Roboto", serif}.dialog-box-body{overflow:hidden;text-overflow:ellipsis}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}';export{a as tttx_dialog_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as t,h as i,H as s,g as e}from"./p-c544551b.js";import{p as d,d as n}from"./p-5ed38d61.js";import"./p-112455b1.js";const r=class{constructor(i){o(this,i),this.selectItemEvent=t(this,"selectItemEvent",3),this.toggleOpen=t(this,"toggleOpen",3),this.optionsData=null,this.label=void 0,this.inline=void 0,this.placeholder="",this.searchEnabled=void 0,this.open=!1,this.selectedItem=void 0,this.searchTerm=""}handleCloseSelectBox(){this.open=!1}handleBlur(){this.open=!1,this.toggleOpen.emit(!1)}onDropdownClicked(){this.open=!this.open,this.searchTerm="",this.toggleOpen.emit(this.open)}onItemSelected(o){this.selectedItem=o,this.selectItemEvent.emit(this.selectedItem),this.el.blur()}dropdownSelectorContent(){return this.selectedItem?i("div",null,this.selectedItem.label):i("div",{class:"placeholder"},this.placeholder)}dropdownOption(o){const t=this.searchEnabled&&-1===o.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()),s=this.selectedItem&&o.value===this.selectedItem.value;if(o.html){const e=d.sanitize(o.html,n);return i("div",{class:`dropdown-option ${t?"hidden":""} ${s?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label,innerHTML:e})}return i("div",{class:`dropdown-option ${t?"hidden":""} ${s?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label},o.label)}handleSearchInput(o){this.searchTerm=o.target.value}render(){if(!this.optionsData)return;const o="string"==typeof this.optionsData?JSON.parse(this.optionsData):this.optionsData,t=this.open?"expand_less":"expand_more";return i(s,{class:this.inline?"inline":"block"},this.label&&i("div",{class:"label"},this.label),i("div",{tabindex:"0",class:"dropdown-container"},i("div",{class:"dropdown-selector",onClick:this.onDropdownClicked.bind(this)},this.dropdownSelectorContent(),i("div",{class:"dropdown-selector-chevron"},i("tttx-icon",{icon:t,color:"black"}))),this.open&&i("div",{class:"dropdown-body"},this.searchEnabled&&i("div",{class:"searchbox"},i("tttx-standalone-input",{type:"text",label:"",required:!0,showerrorbubble:!1,iconleft:"search",onInput:this.handleSearchInput.bind(this)})),i("div",{class:"dropdown-options-list"},o.map((o=>this.dropdownOption(o)))))))}get el(){return e(this)}};r.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border:
|
|
1
|
+
import{r as o,c as t,h as i,H as s,g as e}from"./p-c544551b.js";import{p as d,d as n}from"./p-5ed38d61.js";import"./p-112455b1.js";const r=class{constructor(i){o(this,i),this.selectItemEvent=t(this,"selectItemEvent",3),this.toggleOpen=t(this,"toggleOpen",3),this.optionsData=null,this.label=void 0,this.inline=void 0,this.placeholder="",this.searchEnabled=void 0,this.open=!1,this.selectedItem=void 0,this.searchTerm=""}handleCloseSelectBox(){this.open=!1}handleBlur(){this.open=!1,this.toggleOpen.emit(!1)}onDropdownClicked(){this.open=!this.open,this.searchTerm="",this.toggleOpen.emit(this.open)}onItemSelected(o){this.selectedItem=o,this.selectItemEvent.emit(this.selectedItem),this.el.blur()}dropdownSelectorContent(){return this.selectedItem?i("div",null,this.selectedItem.label):i("div",{class:"placeholder"},this.placeholder)}dropdownOption(o){const t=this.searchEnabled&&-1===o.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()),s=this.selectedItem&&o.value===this.selectedItem.value;if(o.html){const e=d.sanitize(o.html,n);return i("div",{class:`dropdown-option ${t?"hidden":""} ${s?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label,innerHTML:e})}return i("div",{class:`dropdown-option ${t?"hidden":""} ${s?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label},o.label)}handleSearchInput(o){this.searchTerm=o.target.value}render(){if(!this.optionsData)return;const o="string"==typeof this.optionsData?JSON.parse(this.optionsData):this.optionsData,t=this.open?"expand_less":"expand_more";return i(s,{class:this.inline?"inline":"block"},this.label&&i("div",{class:"label"},this.label),i("div",{tabindex:"0",class:"dropdown-container"},i("div",{class:"dropdown-selector",onClick:this.onDropdownClicked.bind(this)},this.dropdownSelectorContent(),i("div",{class:"dropdown-selector-chevron"},i("tttx-icon",{icon:t,color:"black"}))),this.open&&i("div",{class:"dropdown-body"},this.searchEnabled&&i("div",{class:"searchbox"},i("tttx-standalone-input",{type:"text",label:"",required:!0,showerrorbubble:!1,iconleft:"search",onInput:this.handleSearchInput.bind(this)})),i("div",{class:"dropdown-options-list"},o.map((o=>this.dropdownOption(o)))))))}get el(){return e(this)}};r.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:flex;gap:4px}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:8px 8px 8px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-body{display:flex;width:inherit;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;top:42px}.dropdown-body.search{max-height:410px}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:8px 8px 8px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110D}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 0 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}';export{r as tttx_select_box}
|
package/dist/tttx/tttx.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-c544551b.js";export{s as setNonce}from"./p-c544551b.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-
|
|
1
|
+
import{p as e,b as t}from"./p-c544551b.js";export{s as setNonce}from"./p-c544551b.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-6cdbc7b5",[[1,"tttx-dialog-box",{data:[1025],size:[1],open:[1028],elementSize:[32]},[[9,"resize","handleResize"]]]]],["p-ff38d9f3",[[1,"tttx-select-box",{optionsData:[1,"options-data"],label:[1],inline:[4],placeholder:[1],searchEnabled:[4,"search-enabled"],open:[32],selectedItem:[32],searchTerm:[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["p-2f066b53",[[1,"tttx-tree-view",{data:[1040],treeData:[32]}]]],["p-a658e1ac",[[1,"tttx-filter",{filterKey:[1,"filter-key"],filterOptions:[1,"filter-options"],showSelectAll:[4,"show-select-all"],showSearchField:[4,"show-search-field"],showOptionIcons:[4,"show-option-icons"],filterButtonStyle:[1,"filter-button-style"],filterHeader:[1,"filter-header"],defaultFilterOptions:[1,"default-filter-options"],popoverWidth:[1,"popover-width"],showPopover:[32],displayedFilterSettings:[32],selectedFilters:[32],filterSearchTerm:[32],allSelected:[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["p-cec36804",[[1,"tttx-list",{data:[1025],name:[1]}]]],["p-225e6fa6",[[1,"tttx-sorter",{sorterKey:[1,"sorter-key"],defaultSortDirection:[1,"default-sort-direction"],fieldOptionsData:[1,"field-options-data"],defaultOption:[1,"default-option"],selectedField:[32],sortDirection:[32],dropdownExpand:[32],dropdownOptions:[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["p-57621fdb",[[1,"tttx-form",{formschema:[1032],data:[1032],submit:[64]}]]],["p-f80ab1d8",[[1,"tttx-keyvalue-block",{keyvalues:[8],horizontal:[4]}]]],["p-3467c62e",[[1,"tttx-loading-spinner",{loadingMessage:[1028,"loading-message"],size:[1025]}]]],["p-cff962bf",[[1,"tttx-qrcode",{link:[1025],size:[1026]}]]],["p-4879a614",[[1,"tttx-toolbar",{border:[4]}]]],["p-53fa8b4d",[[1,"tttx-icon",{icon:[1],color:[1]}]]],["p-e6bbdae3",[[2,"tttx-standalone-input",{label:[1],secondarylabel:[1],showerrormsg:[4],showerrorbubble:[4],errormsg:[1],iconleft:[1],iconleftcolor:[1],iconright:[1],iconrightcolor:[1],inputicon:[1],inputiconcolor:[1],inline:[4],inputautocapitalize:[1],inputautofocus:[4],inputkeyhint:[1],inputindex:[8],inputtitle:[1],autocomplete:[1],checked:[4],disabled:[4],max:[8],maxlength:[8],min:[8],minlength:[8],name:[1],pattern:[1],placeholder:[1],readonly:[8],required:[4],step:[8],type:[1],value:[1032]}]]],["p-3c7e11d9",[[1,"tttx-button",{notext:[4],icon:[1],iconposition:[1],iconcolor:[1025],design:[1]}]]]],e)));
|
|
@@ -3,14 +3,14 @@ import { DialogItems } from './interfaces';
|
|
|
3
3
|
export declare class TttxDialogBox {
|
|
4
4
|
data: string | DialogItems;
|
|
5
5
|
size: 'regular' | 'mobile' | 'large' | 'small';
|
|
6
|
+
open: boolean;
|
|
6
7
|
elementSize: 'regular' | 'mobile' | 'large' | 'small';
|
|
7
8
|
el: any;
|
|
8
9
|
private _data;
|
|
9
10
|
closeButtonClick: EventEmitter;
|
|
10
11
|
buttonClick: EventEmitter;
|
|
11
12
|
handleResize(): void;
|
|
12
|
-
|
|
13
|
-
close(): Promise<void>;
|
|
13
|
+
componentDidRender(): void;
|
|
14
14
|
onCloseClickHandler(): void;
|
|
15
15
|
onButtonClickHandler(index: number): void;
|
|
16
16
|
dialog(): any;
|
|
@@ -21,9 +21,8 @@ export namespace Components {
|
|
|
21
21
|
"notext": boolean;
|
|
22
22
|
}
|
|
23
23
|
interface TttxDialogBox {
|
|
24
|
-
"close": () => Promise<void>;
|
|
25
24
|
"data": string | DialogItems;
|
|
26
|
-
"open":
|
|
25
|
+
"open": boolean;
|
|
27
26
|
"size": 'regular' | 'mobile' | 'large' | 'small';
|
|
28
27
|
}
|
|
29
28
|
interface TttxFilter {
|
|
@@ -273,6 +272,7 @@ declare namespace LocalJSX {
|
|
|
273
272
|
"data"?: string | DialogItems;
|
|
274
273
|
"onButtonClick"?: (event: TttxDialogBoxCustomEvent<any>) => void;
|
|
275
274
|
"onCloseButtonClick"?: (event: TttxDialogBoxCustomEvent<any>) => void;
|
|
275
|
+
"open"?: boolean;
|
|
276
276
|
"size"?: 'regular' | 'mobile' | 'large' | 'small';
|
|
277
277
|
}
|
|
278
278
|
interface TttxFilter {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as i,h as t,g as d}from"./p-c544551b.js";import{p as l,d as a}from"./p-5ed38d61.js";import"./p-112455b1.js";const e=class{constructor(t){o(this,t),this.closeButtonClick=i(this,"closeButtonClick",6),this.buttonClick=i(this,"buttonClick",7),this.data=void 0,this.size="regular",this.elementSize=void 0}handleResize(){this.elementSize=window.innerWidth<698?"mobile":this.size}async open(){this.dialog()&&this.dialog().showModal()}async close(){this.dialog()&&this.dialog().close()}onCloseClickHandler(){this.el.shadowRoot.querySelector("dialog").close(),this.closeButtonClick.emit({close:!0})}onButtonClickHandler(o){this.buttonClick.emit({buttonNumber:o,buttonClicked:!0})}dialog(){return this.el.shadowRoot.querySelector("dialog")}renderHeader(o){const i=o.title,d=!!o.hasClose;return t("div",{class:"dialog-box-header"},!!o.hasIcon&&t("tttx-icon",{class:"dialog-box-icon",icon:o.iconName,color:o.iconColor}),t("h3",{class:"dialog-box-title"},i),d&&t("div",{class:"dialog-box-align-right close-button",onClick:()=>this.onCloseClickHandler()},t("tttx-icon",{class:"dialog-box-icon-close dialog-box-clickable",icon:"close",color:"black"})))}renderContent(o){if(o.isCustomHtml){const i=l.sanitize(o.customHtml,a);return t("div",{class:"dialog-box-body"},t("div",{innerHTML:i}))}return t("div",{class:"dialog-box-body"},t("span",{class:"dialog-box-content"},o.contentText))}renderFooter(o){const i=o.buttons,d=i.length>0,l=i.length>1,a="mobile"===this.elementSize;return t("div",{class:"dialog-box-footer"},t("div",{class:"dialog-box-align-right"},3==i.length&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(3),design:i[2].type,notext:a,icon:i[2].icon},!a&&i[2].name),l&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(2),design:i[1].type,icon:i[1].icon},i[1].name),d&&t("tttx-button",{onClick:()=>this.onButtonClickHandler(1),design:i[0].type,icon:i[0].icon},i[0].name)))}componentWillLoad(){this.elementSize=window.innerWidth<698?"mobile":this.size}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,t("dialog",{class:`dialog-box ${this.elementSize}`},t("div",{class:`dialog-box-padding dialog-box-header-box ${this._data.type||""}`},this.renderHeader(this._data.header)),t("div",{class:"dialog-box-padding dialog-box-body-box"},this.renderContent(this._data.body)),t("div",{class:"dialog-box-padding dialog-box-footer-box"},this.renderFooter(this._data.footer)))}get el(){return d(this)}};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}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}dialog::backdrop{background-color:#75757580}.dialog-box.small{width:400px;min-height:200px}.dialog-box.regular{width:600px;min-height:200px}.dialog-box.large{width:900px;min-height:200px}.dialog-box.mobile{max-width:424px;width:calc(100vw - 20px)}.dialog-box-clickable{cursor:pointer}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:500;font-family:"Roboto", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:"Roboto", serif}.dialog-box-body{overflow:hidden;text-overflow:ellipsis}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}';export{e as tttx_dialog_box}
|