@3t-transform/threeteeui 0.1.59 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tttx-button.cjs.entry.js +5 -3
  3. package/dist/cjs/tttx-form.cjs.entry.js +1 -1
  4. package/dist/cjs/tttx-tree-view.cjs.entry.js +92 -0
  5. package/dist/cjs/tttx.cjs.js +1 -1
  6. package/dist/collection/collection-manifest.json +2 -1
  7. package/dist/collection/components/atoms/tttx-button/tttx-button.css +20 -0
  8. package/dist/collection/components/atoms/tttx-button/tttx-button.js +22 -2
  9. package/dist/collection/components/molecules/tttx-form/tttx-form.css +20 -0
  10. package/dist/collection/components/molecules/tttx-tree-view/helper/helper.js +1 -0
  11. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.css +72 -0
  12. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +140 -0
  13. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +698 -0
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/index.js +1 -0
  16. package/dist/components/tttx-button2.js +6 -3
  17. package/dist/components/tttx-form.js +1 -1
  18. package/dist/components/tttx-tree-view.d.ts +11 -0
  19. package/dist/components/tttx-tree-view.js +120 -0
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/tttx-button.entry.js +5 -3
  22. package/dist/esm/tttx-form.entry.js +1 -1
  23. package/dist/esm/tttx-tree-view.entry.js +88 -0
  24. package/dist/esm/tttx.js +1 -1
  25. package/dist/tttx/p-2f066b53.entry.js +1 -0
  26. package/dist/tttx/p-3c7e11d9.entry.js +1 -0
  27. package/dist/tttx/{p-5a4eacd9.entry.js → p-57621fdb.entry.js} +1 -1
  28. package/dist/tttx/tttx.esm.js +1 -1
  29. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +1 -0
  30. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +1 -1
  31. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -1
  32. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +1 -1
  33. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +1 -1
  34. package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +14 -0
  35. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +14 -0
  36. package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +20 -0
  37. package/dist/types/components.d.ts +23 -0
  38. package/package.json +1 -1
  39. package/dist/tttx/p-28d80500.entry.js +0 -1
@@ -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-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-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-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-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
17
+ return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["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-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-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-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-43af0e62.js');
6
6
 
7
- const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
7
+ const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
8
8
 
9
9
  const TttxButton = class {
10
10
  constructor(hostRef) {
@@ -13,19 +13,21 @@ const TttxButton = class {
13
13
  this.notext = undefined;
14
14
  this.icon = undefined;
15
15
  this.iconposition = 'left';
16
+ this.iconcolor = 'black';
16
17
  this.design = 'default';
17
18
  }
18
19
  componentWillLoad() {
19
20
  this._design = this.design;
20
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
21
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless', 'borderless-circle'];
21
22
  if (!designs.includes(this.design)) {
22
23
  this._design = 'default';
23
24
  }
24
25
  if (this._design === 'primary' || this._design === 'danger') {
25
- this._iconcolor = 'white';
26
+ this.iconcolor = 'white';
26
27
  }
27
28
  }
28
29
  render() {
30
+ this._iconcolor = this.iconcolor;
29
31
  return (index.h(index.Host, null, index.h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && index.h("div", { class: "button-content" }, index.h("slot", null)), this.icon && this.iconposition === 'right' && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
30
32
  }
31
33
  };
@@ -104,7 +104,7 @@ function setErrorState(target, hasError, errorMessage) {
104
104
  }
105
105
  }
106
106
 
107
- const tttxFormCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.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:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.input-icon{position:absolute;margin-top:9px;margin-left:4px}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;line-height:16px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;line-height:19px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label.inputInline{display:flex;white-space:nowrap;align-items:center}label.inputInline .input-container{margin:0 4px;width:100%;display:flex;align-items:center;gap:4px;position:relative}label{font-weight:500;font-size:16px;line-height:19px;margin-bottom:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}@media (max-width: 600px){input[type=date]{padding-top:6px}}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}.input-icon~input{padding:0 32px}input~.errorBubble{position:relative;font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}input~.errorBubble:not(.visible){display:none}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000}input:focus{border-color:#1479c6}input:focus-visible{outline:none}.secondarylabel{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}input[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:block}fieldset{margin:0;padding:0;border:none}label.inputBlock.inlineBlock{display:inline-block}.inlineLabel{font-weight:400;display:inline-block;vertical-align:top;padding-top:4px}input[type=checkbox]{width:18px;height:18px}input~label{font-weight:400}select{font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}.placeholder{color:#9e9e9e}.placeholder option{color:initial}select.invalid:invalid{border:1px solid #dc0000}select~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}select~.errorBubble:not(.visible){visibility:hidden}select~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}select.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}select:focus{border-color:#1479c6}select:focus-visible{outline:none}.button{padding:0 16px}.footer{display:flex;gap:16px;flex-direction:row-reverse}";
107
+ const tttxFormCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.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:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.input-icon{position:absolute;margin-top:9px;margin-left:4px}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;line-height:16px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;line-height:19px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label.inputInline{display:flex;white-space:nowrap;align-items:center}label.inputInline .input-container{margin:0 4px;width:100%;display:flex;align-items:center;gap:4px;position:relative}label{font-weight:500;font-size:16px;line-height:19px;margin-bottom:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}@media (max-width: 600px){input[type=date]{padding-top:6px}}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}.input-icon~input{padding:0 32px}input~.errorBubble{position:relative;font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}input~.errorBubble:not(.visible){display:none}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000}input:focus{border-color:#1479c6}input:focus-visible{outline:none}.secondarylabel{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}input[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:block}fieldset{margin:0;padding:0;border:none}label.inputBlock.inlineBlock{display:inline-block}.inlineLabel{font-weight:400;display:inline-block;vertical-align:top;padding-top:4px}input[type=checkbox]{width:18px;height:18px}input~label{font-weight:400}select{font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}.placeholder{color:#9e9e9e}.placeholder option{color:initial}select.invalid:invalid{border:1px solid #dc0000}select~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}select~.errorBubble:not(.visible){visibility:hidden}select~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}select.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}select:focus{border-color:#1479c6}select:focus-visible{outline:none}.button{padding:0 16px}.footer{display:flex;gap:16px;flex-direction:row-reverse}";
108
108
 
109
109
  const TttxForm = class {
110
110
  constructor(hostRef) {
@@ -0,0 +1,92 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-43af0e62.js');
6
+ const domsanitiser_options = require('./domsanitiser.options-1dfa7205.js');
7
+ require('./_commonjsHelpers-537d719a.js');
8
+
9
+ const tttxTreeViewCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.tree-view-element{margin-left:-50px}.inline-tree-item{display:flex;align-items:center}.element{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%}.element-row{min-height:36px;font-family:\"Roboto\", serif;font-size:16px;padding:8px 0px;border-bottom:1px solid #d5d5d5}.rowHover{cursor:pointer}li{list-style-type:none}.toggleNode{padding-right:3px}.padding-icon{padding:6px 6px;height:24px;width:24px;display:flex;align-items:center;justify-content:center}.treeNode{font-weight:500}.treeLeaf{font-weight:400}.right-buttons-container{margin-left:auto;display:flex}.borderless:active{outline-style:none}@media (hover: hover){.rowHover:hover{background-color:rgba(17, 17, 17, 0.05)}}";
10
+
11
+ const TttxTreeView = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.clickEvent = index.createEvent(this, "clickEvent", 7);
15
+ this.data = undefined;
16
+ this.treeData = undefined;
17
+ }
18
+ onClickHandler(clickName, event, node) {
19
+ event.stopPropagation();
20
+ const returnJsonObject = JSON.stringify(node);
21
+ this.clickEvent.emit({ eventName: clickName, returnJsonObject });
22
+ }
23
+ toggleNode(node, event) {
24
+ event.stopPropagation();
25
+ node.isOpen = !node.isOpen;
26
+ this.treeData = [...this.treeData];
27
+ }
28
+ handleCheckboxChange(node, event) {
29
+ event.stopPropagation();
30
+ node.checked = !node.checked;
31
+ this.updateChildrenCheckStatus(node);
32
+ this.treeData = [...this.treeData];
33
+ }
34
+ updateChildrenCheckStatus(node) {
35
+ if (node.child) {
36
+ node.child.forEach(childNode => {
37
+ childNode.checked = node.checked;
38
+ this.updateChildrenCheckStatus(childNode);
39
+ });
40
+ }
41
+ }
42
+ renderNode(node) {
43
+ let checkboxIcon, checkboxColor;
44
+ if (node.checked) {
45
+ checkboxIcon = 'check_box';
46
+ checkboxColor = 'blue';
47
+ }
48
+ else {
49
+ checkboxIcon = 'check_box_outline_blank';
50
+ checkboxColor = 'grey';
51
+ }
52
+ const rowHoverActive = node.chevronActive ? 'rowHover' : '';
53
+ const expanderIcon = node.isOpen ? 'arrow_drop_down' : 'arrow_right';
54
+ if (node.child && node.child.length > 0) {
55
+ return (index.h("li", null, index.h("div", { class: `inline-tree-item element-row ${rowHoverActive}`, onClick: (event) => {
56
+ if (node.chevronActive) {
57
+ event.stopPropagation();
58
+ this.onClickHandler('row', event, node);
59
+ }
60
+ } }, index.h("tttx-button", { class: "toggleNode", design: "borderless-circle", notext: true, icon: expanderIcon, color: "black", onClick: event => this.toggleNode(node, event) }), this.htmlcode('treeNode', node, checkboxIcon, checkboxColor)), node.isOpen ? (index.h("ul", null, index.h("div", { class: "child-node" }, node.child.map(childNode => {
61
+ return this.renderNode(childNode);
62
+ })))) : null));
63
+ }
64
+ else {
65
+ return (index.h("li", null, index.h("div", { class: `inline-tree-item element-row ${rowHoverActive}`, onClick: (event) => {
66
+ if (node.chevronActive) {
67
+ event.stopPropagation();
68
+ this.onClickHandler('row', event, node);
69
+ }
70
+ } }, this.htmlcode('treeLeaf', node, checkboxIcon, checkboxColor))));
71
+ }
72
+ }
73
+ htmlcode(type, node, check_box, check_boxColor) {
74
+ const htmlcode = (index.h("div", { class: 'inline-tree-item element' }, node.hasCheckbox && (index.h("tttx-button", { design: "borderless-circle", notext: true, icon: check_box, iconcolor: check_boxColor, class: "padding-icon checkbox", onClick: event => this.handleCheckboxChange(node, event) })), !node.html && node.hasIcon && index.h("tttx-icon", { icon: node.icon, color: node.iconColor, class: "padding-icon" }), !node.html && index.h("div", { class: type }, node.title), node.html && index.h("div", { class: type, innerHTML: domsanitiser_options.purify.sanitize(node.html, domsanitiser_options.domSanitiserOptions) }), (node.menuActive || node.chevronActive) && (index.h("div", { class: "right-buttons-container" }, node.menuActive && (index.h("tttx-button", { design: "borderless-circle", notext: true, icon: "more_vert", color: "black", class: "padding-icon menu-button", onClick: (event) => {
75
+ event.stopPropagation();
76
+ this.onClickHandler('menu', event, node);
77
+ } })), node.chevronActive && (index.h("tttx-icon", { icon: "chevron_right", color: "black", class: "padding-icon chevron-button", onClick: (event) => {
78
+ event.stopPropagation();
79
+ this.onClickHandler('chevron', event, node);
80
+ } }))))));
81
+ return htmlcode;
82
+ }
83
+ render() {
84
+ if (!this.data)
85
+ return;
86
+ this.treeData = typeof this.data === 'string' ? JSON.parse(this.data) : this.data;
87
+ return (index.h("div", { class: "tree-view-element" }, index.h("ul", null, this.treeData.map((node) => this.renderNode(node)))));
88
+ }
89
+ };
90
+ TttxTreeView.style = tttxTreeViewCss;
91
+
92
+ exports.tttx_tree_view = TttxTreeView;
@@ -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-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-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-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-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
20
+ return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["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-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-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-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;
@@ -11,7 +11,8 @@
11
11
  "./components/molecules/tttx-form/tttx-form.js",
12
12
  "./components/molecules/tttx-list/tttx-list.js",
13
13
  "./components/molecules/tttx-sorter/tttx-sorter.js",
14
- "./components/molecules/tttx-toolbar/tttx-toolbar.js"
14
+ "./components/molecules/tttx-toolbar/tttx-toolbar.js",
15
+ "./components/molecules/tttx-tree-view/tttx-tree-view.js"
15
16
  ],
16
17
  "compiler": {
17
18
  "name": "@stencil/core",
@@ -82,6 +82,21 @@ button {
82
82
  border: none;
83
83
  }
84
84
 
85
+ .borderless-circle {
86
+ background: transparent;
87
+ border: none;
88
+ color: #212121;
89
+ border-radius: 50%;
90
+ }
91
+
92
+ .borderless-circle:active {
93
+ border: none;
94
+ }
95
+
96
+ .borderless-circle:focus {
97
+ border-color: transparent;
98
+ }
99
+
85
100
  .danger {
86
101
  background: #dc0000;
87
102
  border: 1px solid #dc0000;
@@ -123,6 +138,11 @@ button {
123
138
  border: none;
124
139
  }
125
140
 
141
+ .borderless-circle:hover {
142
+ background: rgba(17, 17, 17, 0.1);
143
+ border: none;
144
+ }
145
+
126
146
  .danger:hover {
127
147
  background: #c60000;
128
148
  border: 1px solid #c60000;
@@ -6,19 +6,21 @@ export class TttxButton {
6
6
  this.notext = undefined;
7
7
  this.icon = undefined;
8
8
  this.iconposition = 'left';
9
+ this.iconcolor = 'black';
9
10
  this.design = 'default';
10
11
  }
11
12
  componentWillLoad() {
12
13
  this._design = this.design;
13
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
14
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless', 'borderless-circle'];
14
15
  if (!designs.includes(this.design)) {
15
16
  this._design = 'default';
16
17
  }
17
18
  if (this._design === 'primary' || this._design === 'danger') {
18
- this._iconcolor = 'white';
19
+ this.iconcolor = 'white';
19
20
  }
20
21
  }
21
22
  render() {
23
+ this._iconcolor = this.iconcolor;
22
24
  return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
23
25
  }
24
26
  static get is() { return "tttx-button"; }
@@ -87,6 +89,24 @@ export class TttxButton {
87
89
  "reflect": false,
88
90
  "defaultValue": "'left'"
89
91
  },
92
+ "iconcolor": {
93
+ "type": "string",
94
+ "mutable": true,
95
+ "complexType": {
96
+ "original": "string",
97
+ "resolved": "string",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": false,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": ""
105
+ },
106
+ "attribute": "iconcolor",
107
+ "reflect": false,
108
+ "defaultValue": "'black'"
109
+ },
90
110
  "design": {
91
111
  "type": "string",
92
112
  "mutable": false,
@@ -311,6 +311,21 @@ button {
311
311
  border: none;
312
312
  }
313
313
 
314
+ .borderless-circle {
315
+ background: transparent;
316
+ border: none;
317
+ color: #212121;
318
+ border-radius: 50%;
319
+ }
320
+
321
+ .borderless-circle:active {
322
+ border: none;
323
+ }
324
+
325
+ .borderless-circle:focus {
326
+ border-color: transparent;
327
+ }
328
+
314
329
  .danger {
315
330
  background: #dc0000;
316
331
  border: 1px solid #dc0000;
@@ -352,6 +367,11 @@ button {
352
367
  border: none;
353
368
  }
354
369
 
370
+ .borderless-circle:hover {
371
+ background: rgba(17, 17, 17, 0.1);
372
+ border: none;
373
+ }
374
+
355
375
  .danger:hover {
356
376
  background: #c60000;
357
377
  border: 1px solid #c60000;
@@ -0,0 +1,72 @@
1
+ .material-symbols-rounded {
2
+ font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
3
+ }
4
+
5
+ .tree-view-element {
6
+ margin-left: -50px;
7
+ }
8
+
9
+ .inline-tree-item {
10
+ display: flex;
11
+ align-items: center;
12
+ }
13
+
14
+ .element {
15
+ display: flex;
16
+ flex-flow: row nowrap;
17
+ justify-content: flex-start;
18
+ align-items: center;
19
+ width: 100%;
20
+ }
21
+
22
+ .element-row {
23
+ min-height: 36px;
24
+ font-family: "Roboto", serif;
25
+ font-size: 16px;
26
+ padding: 8px 0px;
27
+ border-bottom: 1px solid #d5d5d5;
28
+ }
29
+
30
+ .rowHover {
31
+ cursor: pointer;
32
+ }
33
+
34
+ li {
35
+ list-style-type: none;
36
+ }
37
+
38
+ .toggleNode {
39
+ padding-right: 3px;
40
+ }
41
+
42
+ .padding-icon {
43
+ padding: 6px 6px;
44
+ height: 24px;
45
+ width: 24px;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ }
50
+
51
+ .treeNode {
52
+ font-weight: 500;
53
+ }
54
+
55
+ .treeLeaf {
56
+ font-weight: 400;
57
+ }
58
+
59
+ .right-buttons-container {
60
+ margin-left: auto;
61
+ display: flex;
62
+ }
63
+
64
+ .borderless:active {
65
+ outline-style: none;
66
+ }
67
+
68
+ @media (hover: hover) {
69
+ .rowHover:hover {
70
+ background-color: rgba(17, 17, 17, 0.05);
71
+ }
72
+ }
@@ -0,0 +1,140 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { h } from '@stencil/core';
3
+ import * as DOMPurify from 'dompurify';
4
+ import domSanitiserOptions from '../../../shared/domsanitiser.options';
5
+ export class TttxTreeView {
6
+ constructor() {
7
+ this.data = undefined;
8
+ this.treeData = undefined;
9
+ }
10
+ onClickHandler(clickName, event, node) {
11
+ event.stopPropagation();
12
+ const returnJsonObject = JSON.stringify(node);
13
+ this.clickEvent.emit({ eventName: clickName, returnJsonObject });
14
+ }
15
+ toggleNode(node, event) {
16
+ event.stopPropagation();
17
+ node.isOpen = !node.isOpen;
18
+ this.treeData = [...this.treeData];
19
+ }
20
+ handleCheckboxChange(node, event) {
21
+ event.stopPropagation();
22
+ node.checked = !node.checked;
23
+ this.updateChildrenCheckStatus(node);
24
+ this.treeData = [...this.treeData];
25
+ }
26
+ updateChildrenCheckStatus(node) {
27
+ if (node.child) {
28
+ node.child.forEach(childNode => {
29
+ childNode.checked = node.checked;
30
+ this.updateChildrenCheckStatus(childNode);
31
+ });
32
+ }
33
+ }
34
+ renderNode(node) {
35
+ let checkboxIcon, checkboxColor;
36
+ if (node.checked) {
37
+ checkboxIcon = 'check_box';
38
+ checkboxColor = 'blue';
39
+ }
40
+ else {
41
+ checkboxIcon = 'check_box_outline_blank';
42
+ checkboxColor = 'grey';
43
+ }
44
+ const rowHoverActive = node.chevronActive ? 'rowHover' : '';
45
+ const expanderIcon = node.isOpen ? 'arrow_drop_down' : 'arrow_right';
46
+ if (node.child && node.child.length > 0) {
47
+ return (h("li", null, h("div", { class: `inline-tree-item element-row ${rowHoverActive}`, onClick: (event) => {
48
+ if (node.chevronActive) {
49
+ event.stopPropagation();
50
+ this.onClickHandler('row', event, node);
51
+ }
52
+ } }, h("tttx-button", { class: "toggleNode", design: "borderless-circle", notext: true, icon: expanderIcon, color: "black", onClick: event => this.toggleNode(node, event) }), this.htmlcode('treeNode', node, checkboxIcon, checkboxColor)), node.isOpen ? (h("ul", null, h("div", { class: "child-node" }, node.child.map(childNode => {
53
+ return this.renderNode(childNode);
54
+ })))) : null));
55
+ }
56
+ else {
57
+ return (h("li", null, h("div", { class: `inline-tree-item element-row ${rowHoverActive}`, onClick: (event) => {
58
+ if (node.chevronActive) {
59
+ event.stopPropagation();
60
+ this.onClickHandler('row', event, node);
61
+ }
62
+ } }, this.htmlcode('treeLeaf', node, checkboxIcon, checkboxColor))));
63
+ }
64
+ }
65
+ htmlcode(type, node, check_box, check_boxColor) {
66
+ const htmlcode = (h("div", { class: 'inline-tree-item element' }, node.hasCheckbox && (h("tttx-button", { design: "borderless-circle", notext: true, icon: check_box, iconcolor: check_boxColor, class: "padding-icon checkbox", onClick: event => this.handleCheckboxChange(node, event) })), !node.html && node.hasIcon && h("tttx-icon", { icon: node.icon, color: node.iconColor, class: "padding-icon" }), !node.html && h("div", { class: type }, node.title), node.html && h("div", { class: type, innerHTML: DOMPurify.sanitize(node.html, domSanitiserOptions) }), (node.menuActive || node.chevronActive) && (h("div", { class: "right-buttons-container" }, node.menuActive && (h("tttx-button", { design: "borderless-circle", notext: true, icon: "more_vert", color: "black", class: "padding-icon menu-button", onClick: (event) => {
67
+ event.stopPropagation();
68
+ this.onClickHandler('menu', event, node);
69
+ } })), node.chevronActive && (h("tttx-icon", { icon: "chevron_right", color: "black", class: "padding-icon chevron-button", onClick: (event) => {
70
+ event.stopPropagation();
71
+ this.onClickHandler('chevron', event, node);
72
+ } }))))));
73
+ return htmlcode;
74
+ }
75
+ render() {
76
+ if (!this.data)
77
+ return;
78
+ this.treeData = typeof this.data === 'string' ? JSON.parse(this.data) : this.data;
79
+ return (h("div", { class: "tree-view-element" }, h("ul", null, this.treeData.map((node) => this.renderNode(node)))));
80
+ }
81
+ static get is() { return "tttx-tree-view"; }
82
+ static get encapsulation() { return "shadow"; }
83
+ static get originalStyleUrls() {
84
+ return {
85
+ "$": ["tttx-tree-view.scss"]
86
+ };
87
+ }
88
+ static get styleUrls() {
89
+ return {
90
+ "$": ["tttx-tree-view.css"]
91
+ };
92
+ }
93
+ static get properties() {
94
+ return {
95
+ "data": {
96
+ "type": "unknown",
97
+ "mutable": true,
98
+ "complexType": {
99
+ "original": "TreeViewItem[]",
100
+ "resolved": "TreeViewItem[]",
101
+ "references": {
102
+ "TreeViewItem": {
103
+ "location": "import",
104
+ "path": "./helper/helper"
105
+ }
106
+ }
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": ""
113
+ }
114
+ }
115
+ };
116
+ }
117
+ static get states() {
118
+ return {
119
+ "treeData": {}
120
+ };
121
+ }
122
+ static get events() {
123
+ return [{
124
+ "method": "clickEvent",
125
+ "name": "clickEvent",
126
+ "bubbles": true,
127
+ "cancelable": true,
128
+ "composed": true,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": ""
132
+ },
133
+ "complexType": {
134
+ "original": "any",
135
+ "resolved": "any",
136
+ "references": {}
137
+ }
138
+ }];
139
+ }
140
+ }