@3t-transform/threeteeui 0.1.61 → 0.1.62
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 +17 -2
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.css +4 -2
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +52 -1
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +96 -1
- package/dist/components/tttx-dialog-box.js +20 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-dialog-box.entry.js +18 -3
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-58ee3f50.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +4 -0
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
- package/dist/tttx/p-5fcac0c3.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],"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);
|
|
17
|
+
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32],"open":[64],"close":[64]},[[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
|
|
|
@@ -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 tttxDialogBoxCss = ".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;
|
|
9
|
+
const tttxDialogBoxCss = ".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}";
|
|
10
10
|
|
|
11
11
|
const TttxDialogBox = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -25,12 +25,26 @@ const TttxDialogBox = class {
|
|
|
25
25
|
this.elementSize = this.size;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
async open() {
|
|
29
|
+
if (!this.dialog())
|
|
30
|
+
return;
|
|
31
|
+
this.dialog().showModal();
|
|
32
|
+
}
|
|
33
|
+
async close() {
|
|
34
|
+
if (!this.dialog())
|
|
35
|
+
return;
|
|
36
|
+
this.dialog().close();
|
|
37
|
+
}
|
|
28
38
|
onCloseClickHandler() {
|
|
39
|
+
this.el.shadowRoot.querySelector('dialog').close();
|
|
29
40
|
this.closeButtonClick.emit({ close: true });
|
|
30
41
|
}
|
|
31
42
|
onButtonClickHandler(index) {
|
|
32
43
|
this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
|
|
33
44
|
}
|
|
45
|
+
dialog() {
|
|
46
|
+
return this.el.shadowRoot.querySelector('dialog');
|
|
47
|
+
}
|
|
34
48
|
renderHeader(header) {
|
|
35
49
|
const title = header.title;
|
|
36
50
|
const iconName = header.iconName;
|
|
@@ -73,8 +87,9 @@ const TttxDialogBox = class {
|
|
|
73
87
|
else {
|
|
74
88
|
this._data = this.data;
|
|
75
89
|
}
|
|
76
|
-
return (index.h("
|
|
90
|
+
return (index.h("dialog", { class: `dialog-box ${this.elementSize}` }, index.h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), index.h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), index.h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
|
|
77
91
|
}
|
|
92
|
+
get el() { return index.getElement(this); }
|
|
78
93
|
};
|
|
79
94
|
TttxDialogBox.style = tttxDialogBoxCss;
|
|
80
95
|
|
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],"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);
|
|
20
|
+
return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32],"open":[64],"close":[64]},[[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;
|
|
@@ -26,13 +26,15 @@ h3 {
|
|
|
26
26
|
|
|
27
27
|
.dialog-box {
|
|
28
28
|
background-color: #ffffff;
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
29
|
border: 1px solid #d5d5d5;
|
|
32
30
|
border-radius: 4px;
|
|
33
31
|
box-shadow: 0px 1px 5px #1111114d;
|
|
34
32
|
}
|
|
35
33
|
|
|
34
|
+
dialog::backdrop {
|
|
35
|
+
background-color: #75757580;
|
|
36
|
+
}
|
|
37
|
+
|
|
36
38
|
.dialog-box.small {
|
|
37
39
|
width: 400px;
|
|
38
40
|
min-height: 200px;
|
|
@@ -16,12 +16,26 @@ export class TttxDialogBox {
|
|
|
16
16
|
this.elementSize = this.size;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
async open() {
|
|
20
|
+
if (!this.dialog())
|
|
21
|
+
return;
|
|
22
|
+
this.dialog().showModal();
|
|
23
|
+
}
|
|
24
|
+
async close() {
|
|
25
|
+
if (!this.dialog())
|
|
26
|
+
return;
|
|
27
|
+
this.dialog().close();
|
|
28
|
+
}
|
|
19
29
|
onCloseClickHandler() {
|
|
30
|
+
this.el.shadowRoot.querySelector('dialog').close();
|
|
20
31
|
this.closeButtonClick.emit({ close: true });
|
|
21
32
|
}
|
|
22
33
|
onButtonClickHandler(index) {
|
|
23
34
|
this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
|
|
24
35
|
}
|
|
36
|
+
dialog() {
|
|
37
|
+
return this.el.shadowRoot.querySelector('dialog');
|
|
38
|
+
}
|
|
25
39
|
renderHeader(header) {
|
|
26
40
|
const title = header.title;
|
|
27
41
|
const iconName = header.iconName;
|
|
@@ -64,7 +78,7 @@ export class TttxDialogBox {
|
|
|
64
78
|
else {
|
|
65
79
|
this._data = this.data;
|
|
66
80
|
}
|
|
67
|
-
return (h("
|
|
81
|
+
return (h("dialog", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
|
|
68
82
|
}
|
|
69
83
|
static get is() { return "tttx-dialog-box"; }
|
|
70
84
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,6 +174,43 @@ export class TttxDialogBox {
|
|
|
160
174
|
}
|
|
161
175
|
}];
|
|
162
176
|
}
|
|
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
|
+
static get elementRef() { return "el"; }
|
|
163
214
|
static get listeners() {
|
|
164
215
|
return [{
|
|
165
216
|
"name": "resize",
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
const TttxDialogBoxStory = ({ data }) => `
|
|
13
|
+
<button onclick="openDialog()">Open</button>
|
|
13
14
|
<tttx-dialog-box
|
|
14
15
|
id='dialogBox'
|
|
15
16
|
></tttx-dialog-box>
|
|
@@ -17,6 +18,12 @@ const TttxDialogBoxStory = ({ data }) => `
|
|
|
17
18
|
if(!dialogBox) {
|
|
18
19
|
const dialogBox = document.getElementById('dialogBox');
|
|
19
20
|
}
|
|
21
|
+
if(!openDialog) {
|
|
22
|
+
function openDialog() {
|
|
23
|
+
const dialogBox = document.getElementById('dialogBox');
|
|
24
|
+
dialogBox.open();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
20
27
|
dialogBox.data = ${JSON.stringify(data)};
|
|
21
28
|
</script>
|
|
22
29
|
`;
|
|
@@ -42,6 +49,7 @@ Default.args = {
|
|
|
42
49
|
},
|
|
43
50
|
};
|
|
44
51
|
const TttxDialogBoxMobile = ({ data }) => `
|
|
52
|
+
<button onclick="openDialogMobile()">Open</button>
|
|
45
53
|
<tttx-dialog-box
|
|
46
54
|
id='dialogBoxMobile'
|
|
47
55
|
></tttx-dialog-box>
|
|
@@ -49,6 +57,12 @@ const TttxDialogBoxMobile = ({ data }) => `
|
|
|
49
57
|
if(!dialogBoxMobile) {
|
|
50
58
|
const dialogBoxMobile = document.getElementById('dialogBoxMobile');
|
|
51
59
|
}
|
|
60
|
+
if(!openDialogMobile) {
|
|
61
|
+
function openDialogMobile() {
|
|
62
|
+
const dialogBox = document.getElementById('dialogBoxMobile');
|
|
63
|
+
dialogBox.open();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
52
66
|
dialogBoxMobile.data = ${JSON.stringify(data)};
|
|
53
67
|
dialogBoxMobile.size = "mobile"
|
|
54
68
|
</script>
|
|
@@ -75,6 +89,7 @@ Mobile.args = {
|
|
|
75
89
|
},
|
|
76
90
|
};
|
|
77
91
|
const TttxDialogBoxSmall = ({ data }) => `
|
|
92
|
+
<button onclick="openDialogSmall()">Open</button>
|
|
78
93
|
<tttx-dialog-box
|
|
79
94
|
id='dialogBoxSmall'
|
|
80
95
|
></tttx-dialog-box>
|
|
@@ -82,6 +97,12 @@ const TttxDialogBoxSmall = ({ data }) => `
|
|
|
82
97
|
if(!dialogBoxSmall) {
|
|
83
98
|
const dialogBoxSmall = document.getElementById('dialogBoxSmall');
|
|
84
99
|
}
|
|
100
|
+
if(!openDialogSmall) {
|
|
101
|
+
function openDialogSmall() {
|
|
102
|
+
const dialogBox = document.getElementById('dialogBoxSmall');
|
|
103
|
+
dialogBox.open();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
85
106
|
dialogBoxSmall.data = ${JSON.stringify(data)};
|
|
86
107
|
dialogBoxSmall.size = "small"
|
|
87
108
|
</script>
|
|
@@ -108,6 +129,7 @@ Small.args = {
|
|
|
108
129
|
},
|
|
109
130
|
};
|
|
110
131
|
const TttxDialogBoxLarge = ({ data }) => `
|
|
132
|
+
<button onclick="openDialogLarge()">Open</button>
|
|
111
133
|
<tttx-dialog-box
|
|
112
134
|
id='dialogBoxLarge'
|
|
113
135
|
></tttx-dialog-box>
|
|
@@ -115,6 +137,12 @@ const TttxDialogBoxLarge = ({ data }) => `
|
|
|
115
137
|
if(!dialogBoxLarge) {
|
|
116
138
|
const dialogBoxLarge = document.getElementById('dialogBoxLarge');
|
|
117
139
|
}
|
|
140
|
+
if(!openDialogLarge) {
|
|
141
|
+
function openDialogLarge() {
|
|
142
|
+
const dialogBox = document.getElementById('dialogBoxLarge');
|
|
143
|
+
dialogBox.open();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
118
146
|
dialogBoxLarge.data = ${JSON.stringify(data)};
|
|
119
147
|
dialogBoxLarge.size = "large"
|
|
120
148
|
</script>
|
|
@@ -141,6 +169,7 @@ Large.args = {
|
|
|
141
169
|
},
|
|
142
170
|
};
|
|
143
171
|
const TttxDialogBoxWithoutCloseButton = ({ data }) => `
|
|
172
|
+
<button onclick="openDialogNoClose()">Open</button>
|
|
144
173
|
<tttx-dialog-box
|
|
145
174
|
id='dialogBoxNoClose'
|
|
146
175
|
></tttx-dialog-box>
|
|
@@ -148,6 +177,12 @@ const TttxDialogBoxWithoutCloseButton = ({ data }) => `
|
|
|
148
177
|
if(!dialogBoxNoClose) {
|
|
149
178
|
const dialogBoxNoClose = document.getElementById('dialogBoxNoClose');
|
|
150
179
|
}
|
|
180
|
+
if(!openDialogNoClose) {
|
|
181
|
+
function openDialogNoClose() {
|
|
182
|
+
const dialogBox = document.getElementById('dialogBoxNoClose');
|
|
183
|
+
dialogBox.open();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
151
186
|
dialogBoxNoClose.data = ${JSON.stringify(data)};
|
|
152
187
|
</script>
|
|
153
188
|
`;
|
|
@@ -173,6 +208,7 @@ closeDisabled.args = {
|
|
|
173
208
|
},
|
|
174
209
|
};
|
|
175
210
|
const TttxDialogBoxWithIcon = ({ data }) => `
|
|
211
|
+
<button onclick="openDialogIcon()">Open</button>
|
|
176
212
|
<tttx-dialog-box
|
|
177
213
|
id='dialogBoxIcon'
|
|
178
214
|
></tttx-dialog-box>
|
|
@@ -180,6 +216,12 @@ const TttxDialogBoxWithIcon = ({ data }) => `
|
|
|
180
216
|
if(!dialogBoxIcon) {
|
|
181
217
|
const dialogBoxIcon = document.getElementById('dialogBoxIcon');
|
|
182
218
|
}
|
|
219
|
+
if(!openDialogIcon) {
|
|
220
|
+
function openDialogIcon() {
|
|
221
|
+
const dialogBox = document.getElementById('dialogBoxIcon');
|
|
222
|
+
dialogBox.open();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
183
225
|
dialogBoxIcon.data = ${JSON.stringify(data)};
|
|
184
226
|
</script>
|
|
185
227
|
`;
|
|
@@ -207,6 +249,7 @@ Icon.args = {
|
|
|
207
249
|
},
|
|
208
250
|
};
|
|
209
251
|
const TttxDialogBoxInfo = ({ data }) => `
|
|
252
|
+
<button onclick="openDialogInfo()">Open</button>
|
|
210
253
|
<tttx-dialog-box
|
|
211
254
|
id='dialogBoxInfo'
|
|
212
255
|
></tttx-dialog-box>
|
|
@@ -214,6 +257,12 @@ const TttxDialogBoxInfo = ({ data }) => `
|
|
|
214
257
|
if(!dialogBoxInfo) {
|
|
215
258
|
const dialogBoxInfo = document.getElementById('dialogBoxInfo');
|
|
216
259
|
}
|
|
260
|
+
if(!openDialogInfo) {
|
|
261
|
+
function openDialogInfo() {
|
|
262
|
+
const dialogBox = document.getElementById('dialogBoxInfo');
|
|
263
|
+
dialogBox.open();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
217
266
|
dialogBoxInfo.data = ${JSON.stringify(data)};
|
|
218
267
|
</script>
|
|
219
268
|
`;
|
|
@@ -242,6 +291,7 @@ Info.args = {
|
|
|
242
291
|
},
|
|
243
292
|
};
|
|
244
293
|
const TttxDialogBoxSuccess = ({ data }) => `
|
|
294
|
+
<button onclick="openDialogSuccess()">Open</button>
|
|
245
295
|
<tttx-dialog-box
|
|
246
296
|
id='dialogBoxSuccess'
|
|
247
297
|
></tttx-dialog-box>
|
|
@@ -249,6 +299,12 @@ const TttxDialogBoxSuccess = ({ data }) => `
|
|
|
249
299
|
if(!dialogBoxSuccess) {
|
|
250
300
|
const dialogBoxSuccess = document.getElementById('dialogBoxSuccess');
|
|
251
301
|
}
|
|
302
|
+
if(!openDialogSuccess) {
|
|
303
|
+
function openDialogSuccess() {
|
|
304
|
+
const dialogBox = document.getElementById('dialogBoxSuccess');
|
|
305
|
+
dialogBox.open();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
252
308
|
dialogBoxSuccess.data = ${JSON.stringify(data)};
|
|
253
309
|
</script>
|
|
254
310
|
`;
|
|
@@ -277,6 +333,7 @@ Success.args = {
|
|
|
277
333
|
},
|
|
278
334
|
};
|
|
279
335
|
const TttxDialogBoxWarning = ({ data }) => `
|
|
336
|
+
<button onclick="openDialogWarning()">Open</button>
|
|
280
337
|
<tttx-dialog-box
|
|
281
338
|
id='dialogBoxWarning'
|
|
282
339
|
></tttx-dialog-box>
|
|
@@ -284,6 +341,12 @@ const TttxDialogBoxWarning = ({ data }) => `
|
|
|
284
341
|
if(!dialogBoxWarning) {
|
|
285
342
|
const dialogBoxWarning = document.getElementById('dialogBoxWarning');
|
|
286
343
|
}
|
|
344
|
+
if(!openDialogWarning) {
|
|
345
|
+
function openDialogWarning() {
|
|
346
|
+
const dialogBox = document.getElementById('dialogBoxWarning');
|
|
347
|
+
dialogBox.open();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
287
350
|
dialogBoxWarning.data = ${JSON.stringify(data)};
|
|
288
351
|
</script>
|
|
289
352
|
`;
|
|
@@ -312,6 +375,7 @@ Warning.args = {
|
|
|
312
375
|
},
|
|
313
376
|
};
|
|
314
377
|
const TttxDialogBoxCritical = ({ data }) => `
|
|
378
|
+
<button onclick="openDialogCritical()">Open</button>
|
|
315
379
|
<tttx-dialog-box
|
|
316
380
|
id='dialogBoxCritical'
|
|
317
381
|
></tttx-dialog-box>
|
|
@@ -319,6 +383,12 @@ const TttxDialogBoxCritical = ({ data }) => `
|
|
|
319
383
|
if(!dialogBoxCritical) {
|
|
320
384
|
const dialogBoxCritical = document.getElementById('dialogBoxCritical');
|
|
321
385
|
}
|
|
386
|
+
if(!openDialogCritical) {
|
|
387
|
+
function openDialogCritical() {
|
|
388
|
+
const dialogBox = document.getElementById('dialogBoxCritical');
|
|
389
|
+
dialogBox.open();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
322
392
|
dialogBoxCritical.data = ${JSON.stringify(data)};
|
|
323
393
|
</script>
|
|
324
394
|
`;
|
|
@@ -347,6 +417,7 @@ Critical.args = {
|
|
|
347
417
|
},
|
|
348
418
|
};
|
|
349
419
|
const TttxDialogBoxHTML = ({ data }) => `
|
|
420
|
+
<button onclick="openDialogHTML()">Open</button>
|
|
350
421
|
<tttx-dialog-box
|
|
351
422
|
id='dialogBoxHTML'
|
|
352
423
|
></tttx-dialog-box>
|
|
@@ -354,6 +425,12 @@ const TttxDialogBoxHTML = ({ data }) => `
|
|
|
354
425
|
if(!dialogBoxHTML) {
|
|
355
426
|
const dialogBoxHTML = document.getElementById('dialogBoxHTML');
|
|
356
427
|
}
|
|
428
|
+
if(!openDialogHTML) {
|
|
429
|
+
function openDialogHTML() {
|
|
430
|
+
const dialogBox = document.getElementById('dialogBoxHTML');
|
|
431
|
+
dialogBox.open();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
357
434
|
dialogBoxHTML.data = ${JSON.stringify(data)};
|
|
358
435
|
</script>
|
|
359
436
|
`;
|
|
@@ -379,7 +456,25 @@ CustomHTML.args = {
|
|
|
379
456
|
},
|
|
380
457
|
};
|
|
381
458
|
const link = 'https://uat.3tplatform.com/U2FsdGVkX18l6CTkVQIEFERL%2FnhogHPK3H4e%2FKrELJcM6Jg2cFG6MDMRpJnhzg%2FnNx0cNFOn5IqC8PchiG%2BIded4%2B%2Foe2u%2BPeGnMmrhU38kPG8y2EHRrAXfHe24dNz0vZYauMC7I88j1SHCI%2F564ZkSDjIeqQJ2KBuVpNRFvNnyjfL0ENeiQqvPTCz%2ByCjexJ9bREgkeHDfvMplRI8CH92m%2B1rwWdoQbD09qb4w1wWiJE7MhLhBuXe6OeP1vNheORIeZObDC1KgAluvtbSDbGuSVGTkBgCZv2%2FD%2BIHbEMOQwjO7V7fHp0hNlb%2BPdc0Qg9RUOn%2BcVQiz4SEWBsRr1PF%2BXRIW736L8udcse%2FJYrkkq15ilKYhSwEmm7RdIxxgTTUyOanmYJBXONn0zbYDlRQ%3D%3D';
|
|
382
|
-
|
|
459
|
+
const TttxDialogBoxOverflow = ({ data }) => `
|
|
460
|
+
<button onclick="openDialogOverflow()">Open</button>
|
|
461
|
+
<tttx-dialog-box
|
|
462
|
+
id='dialogBoxOverflow'
|
|
463
|
+
></tttx-dialog-box>
|
|
464
|
+
<script>
|
|
465
|
+
if(!dialogBoxOverflow) {
|
|
466
|
+
const dialogBoxOverflow = document.getElementById('dialogBoxOverflow');
|
|
467
|
+
}
|
|
468
|
+
if(!openDialogOverflow) {
|
|
469
|
+
function openDialogOverflow() {
|
|
470
|
+
const dialogBox = document.getElementById('dialogBoxOverflow');
|
|
471
|
+
dialogBox.open();
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
dialogBoxOverflow.data = ${JSON.stringify(data)};
|
|
475
|
+
</script>
|
|
476
|
+
`;
|
|
477
|
+
export const OverflowingText = TttxDialogBoxOverflow.bind({});
|
|
383
478
|
OverflowingText.args = {
|
|
384
479
|
data: {
|
|
385
480
|
header: {
|
|
@@ -3,7 +3,7 @@ import { p as purify, d as domSanitiserOptions } from './domsanitiser.options.js
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './tttx-button2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
5
5
|
|
|
6
|
-
const tttxDialogBoxCss = ".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;
|
|
6
|
+
const tttxDialogBoxCss = ".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}";
|
|
7
7
|
|
|
8
8
|
const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
@@ -24,12 +24,26 @@ const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
24
24
|
this.elementSize = this.size;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
async open() {
|
|
28
|
+
if (!this.dialog())
|
|
29
|
+
return;
|
|
30
|
+
this.dialog().showModal();
|
|
31
|
+
}
|
|
32
|
+
async close() {
|
|
33
|
+
if (!this.dialog())
|
|
34
|
+
return;
|
|
35
|
+
this.dialog().close();
|
|
36
|
+
}
|
|
27
37
|
onCloseClickHandler() {
|
|
38
|
+
this.el.shadowRoot.querySelector('dialog').close();
|
|
28
39
|
this.closeButtonClick.emit({ close: true });
|
|
29
40
|
}
|
|
30
41
|
onButtonClickHandler(index) {
|
|
31
42
|
this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
|
|
32
43
|
}
|
|
44
|
+
dialog() {
|
|
45
|
+
return this.el.shadowRoot.querySelector('dialog');
|
|
46
|
+
}
|
|
33
47
|
renderHeader(header) {
|
|
34
48
|
const title = header.title;
|
|
35
49
|
const iconName = header.iconName;
|
|
@@ -72,13 +86,16 @@ const TttxDialogBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
72
86
|
else {
|
|
73
87
|
this._data = this.data;
|
|
74
88
|
}
|
|
75
|
-
return (h("
|
|
89
|
+
return (h("dialog", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
|
|
76
90
|
}
|
|
91
|
+
get el() { return this; }
|
|
77
92
|
static get style() { return tttxDialogBoxCss; }
|
|
78
93
|
}, [1, "tttx-dialog-box", {
|
|
79
94
|
"data": [1025],
|
|
80
95
|
"size": [1],
|
|
81
|
-
"elementSize": [32]
|
|
96
|
+
"elementSize": [32],
|
|
97
|
+
"open": [64],
|
|
98
|
+
"close": [64]
|
|
82
99
|
}, [[9, "resize", "handleResize"]]]);
|
|
83
100
|
function defineCustomElement$1() {
|
|
84
101
|
if (typeof customElements === "undefined") {
|
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],"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);
|
|
14
|
+
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32],"open":[64],"close":[64]},[[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
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-1c711ead.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-1c711ead.js';
|
|
2
2
|
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-97a33389.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
|
-
const tttxDialogBoxCss = ".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;
|
|
5
|
+
const tttxDialogBoxCss = ".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}";
|
|
6
6
|
|
|
7
7
|
const TttxDialogBox = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -21,12 +21,26 @@ const TttxDialogBox = class {
|
|
|
21
21
|
this.elementSize = this.size;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
async open() {
|
|
25
|
+
if (!this.dialog())
|
|
26
|
+
return;
|
|
27
|
+
this.dialog().showModal();
|
|
28
|
+
}
|
|
29
|
+
async close() {
|
|
30
|
+
if (!this.dialog())
|
|
31
|
+
return;
|
|
32
|
+
this.dialog().close();
|
|
33
|
+
}
|
|
24
34
|
onCloseClickHandler() {
|
|
35
|
+
this.el.shadowRoot.querySelector('dialog').close();
|
|
25
36
|
this.closeButtonClick.emit({ close: true });
|
|
26
37
|
}
|
|
27
38
|
onButtonClickHandler(index) {
|
|
28
39
|
this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
|
|
29
40
|
}
|
|
41
|
+
dialog() {
|
|
42
|
+
return this.el.shadowRoot.querySelector('dialog');
|
|
43
|
+
}
|
|
30
44
|
renderHeader(header) {
|
|
31
45
|
const title = header.title;
|
|
32
46
|
const iconName = header.iconName;
|
|
@@ -69,8 +83,9 @@ const TttxDialogBox = class {
|
|
|
69
83
|
else {
|
|
70
84
|
this._data = this.data;
|
|
71
85
|
}
|
|
72
|
-
return (h("
|
|
86
|
+
return (h("dialog", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
|
|
73
87
|
}
|
|
88
|
+
get el() { return getElement(this); }
|
|
74
89
|
};
|
|
75
90
|
TttxDialogBox.style = tttxDialogBoxCss;
|
|
76
91
|
|
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],"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);
|
|
17
|
+
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32],"open":[64],"close":[64]},[[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 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}
|
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-58ee3f50",[[1,"tttx-dialog-box",{data:[1025],size:[1],elementSize:[32],open:[64],close:[64]},[[9,"resize","handleResize"]]]]],["p-f94b26dc",[[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)));
|
|
@@ -4,12 +4,16 @@ export declare class TttxDialogBox {
|
|
|
4
4
|
data: string | DialogItems;
|
|
5
5
|
size: 'regular' | 'mobile' | 'large' | 'small';
|
|
6
6
|
elementSize: 'regular' | 'mobile' | 'large' | 'small';
|
|
7
|
+
el: any;
|
|
7
8
|
private _data;
|
|
8
9
|
closeButtonClick: EventEmitter;
|
|
9
10
|
buttonClick: EventEmitter;
|
|
10
11
|
handleResize(): void;
|
|
12
|
+
open(): Promise<void>;
|
|
13
|
+
close(): Promise<void>;
|
|
11
14
|
onCloseClickHandler(): void;
|
|
12
15
|
onButtonClickHandler(index: number): void;
|
|
16
|
+
dialog(): any;
|
|
13
17
|
renderHeader(header: any): any;
|
|
14
18
|
renderContent(content: any): any;
|
|
15
19
|
renderFooter(footer: any): any;
|
|
@@ -21,7 +21,9 @@ export namespace Components {
|
|
|
21
21
|
"notext": boolean;
|
|
22
22
|
}
|
|
23
23
|
interface TttxDialogBox {
|
|
24
|
+
"close": () => Promise<void>;
|
|
24
25
|
"data": string | DialogItems;
|
|
26
|
+
"open": () => Promise<void>;
|
|
25
27
|
"size": 'regular' | 'mobile' | 'large' | 'small';
|
|
26
28
|
}
|
|
27
29
|
interface TttxFilter {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as i,h as t}from"./p-c544551b.js";import{p as d,d as l}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}onCloseClickHandler(){this.closeButtonClick.emit({close:!0})}onButtonClickHandler(o){this.buttonClick.emit({buttonNumber:o,buttonClicked:!0})}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=d.sanitize(o.customHtml,l);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("div",{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)))}};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;display:flex;flex-direction:column;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}.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}
|