@sankhyalabs/ezui 7.1.0-dev.1 → 7.1.0-dev.10

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 (65) hide show
  1. package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-form.cjs.entry.js +110 -38
  4. package/dist/cjs/ez-grid.cjs.entry.js +3 -3
  5. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -11
  6. package/dist/cjs/ez-popup.cjs.entry.js +9 -6
  7. package/dist/cjs/ez-tree.cjs.entry.js +154 -7
  8. package/dist/cjs/ezui.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{purify-47a2f27b.js → purify-453a8028.js} +35 -12
  11. package/dist/cjs/{search-column-9aa090ec.js → search-column-8bfee733.js} +1 -1
  12. package/dist/collection/components/ez-dialog/ez-dialog.css +6 -1
  13. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
  14. package/dist/collection/components/ez-modal-container/ez-modal-container.css +3 -9
  15. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -10
  16. package/dist/collection/components/ez-popup/ez-popup.css +3 -2
  17. package/dist/collection/components/ez-popup/ez-popup.js +9 -6
  18. package/dist/collection/components/ez-tree/ez-tree.css +4 -0
  19. package/dist/collection/components/ez-tree/ez-tree.js +185 -6
  20. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +4 -1
  21. package/dist/collection/components/ez-tree/types/Node.js +7 -0
  22. package/dist/collection/components/ez-tree/types/Tree.js +19 -0
  23. package/dist/collection/components/ez-tree/types/UpdateItemConfig.js +1 -0
  24. package/dist/collection/utils/form/DataBinder.js +1 -1
  25. package/dist/collection/utils/form/FormMetadata.js +109 -37
  26. package/dist/custom-elements/index.js +313 -77
  27. package/dist/esm/ez-combo-box-list_4.entry.js +1 -1
  28. package/dist/esm/ez-dialog.entry.js +1 -1
  29. package/dist/esm/ez-form.entry.js +110 -38
  30. package/dist/esm/ez-grid.entry.js +3 -3
  31. package/dist/esm/ez-modal-container.entry.js +2 -11
  32. package/dist/esm/ez-popup.entry.js +9 -6
  33. package/dist/esm/ez-tree.entry.js +154 -7
  34. package/dist/esm/ezui.js +1 -1
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/{purify-dc6814bf.js → purify-003c47e2.js} +35 -12
  37. package/dist/esm/{search-column-83562552.js → search-column-c00119ae.js} +1 -1
  38. package/dist/ezui/ezui.esm.js +1 -1
  39. package/dist/ezui/p-294f54fe.entry.js +1 -0
  40. package/dist/ezui/p-4f0632b4.js +1 -0
  41. package/dist/ezui/{p-d66bf34e.entry.js → p-8c57ffa4.entry.js} +2 -2
  42. package/dist/ezui/p-ae5f64cd.entry.js +1 -0
  43. package/dist/ezui/p-bb409cba.js +3 -0
  44. package/dist/ezui/p-c82acfc6.entry.js +1 -0
  45. package/dist/ezui/{p-c943f7c4.entry.js → p-e03b2f19.entry.js} +1 -1
  46. package/dist/ezui/p-e77610ef.entry.js +1 -0
  47. package/dist/ezui/p-ff4bde07.entry.js +1 -0
  48. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +0 -2
  49. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -0
  50. package/dist/types/components/ez-tree/ez-tree.d.ts +20 -1
  51. package/dist/types/components/ez-tree/types/Node.d.ts +1 -0
  52. package/dist/types/components/ez-tree/types/Tree.d.ts +1 -0
  53. package/dist/types/components/ez-tree/types/UpdateItemConfig.d.ts +4 -0
  54. package/dist/types/components.d.ts +18 -1
  55. package/dist/types/utils/form/FormMetadata.d.ts +2 -1
  56. package/dist/types/utils/form/interfaces/IFormSheetMetadata.d.ts +3 -0
  57. package/dist/types/utils/form/interfaces/ITabConfig.d.ts +3 -0
  58. package/package.json +1 -1
  59. package/dist/ezui/p-02f6e3b0.entry.js +0 -1
  60. package/dist/ezui/p-191cfbc8.entry.js +0 -1
  61. package/dist/ezui/p-228a4d2f.js +0 -3
  62. package/dist/ezui/p-2df50161.entry.js +0 -1
  63. package/dist/ezui/p-4c4f0850.entry.js +0 -1
  64. package/dist/ezui/p-623161e2.js +0 -1
  65. package/dist/ezui/p-bd6146c5.entry.js +0 -1
@@ -3,7 +3,7 @@ import { ElementIDUtils, ObjectUtils, HTMLBuilder, StringUtils, KeyboardManager
3
3
  import { i as initI18n } from './index-62fc771e.js';
4
4
  import { C as CustomEditorSource } from './FormLayout-071d324c.js';
5
5
  import { R as RICH_TOOLBAR_FORMAT_TAGS, a as RICH_TOOLBAR_COMMANDS } from './RichToolbarHelper-f3a149c4.js';
6
- import { p as purify } from './purify-dc6814bf.js';
6
+ import { p as purify } from './purify-003c47e2.js';
7
7
  import { A as ApplicationUtils } from './ApplicationUtils-12768f5a.js';
8
8
  import './DialogType-54a62731.js';
9
9
  import './CheckMode-bdb2ec19.js';
@@ -4,7 +4,7 @@ import { FloatingManager, ElementIDUtils, KeyboardManager } from '@sankhyalabs/c
4
4
  import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
5
5
  import { i as initI18n } from './index-62fc771e.js';
6
6
 
7
- const ezDialogCss = ":host{--dialog__container-padding:var(--space--md, 20px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"Roboto\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"Roboto\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--medium, 12px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:var(--space--medium);overflow-y:auto}.changeable__icon__container{background:var(--dialog__warning--background-color);display:flex;justify-content:center;align-items:center;min-width:26px;min-height:26px;border-radius:50%}.changeable__icon{--ez-icon--color:var(--dialog__icon--color)}.changeable__icon__container.title-icon--critical{background-color:var(--dialog__critical--background-color)}.changeable__icon__container.title-icon--success{background-color:var(--dialog__success--background-color)}.changeable__icon__container.title-icon--warn{background-color:var(--dialog__warning--background-color)}.changeable__icon__container.title-icon--warn ez-icon{transform:translateY(-1px)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
7
+ const ezDialogCss = ":host{--dialog__container-padding:var(--space--md, 20px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--8, 8px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__btn__min-width:80px;--dialog__title--font-pattern:var(--font-pattern, \"Roboto\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"Roboto\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--medium, 12px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:var(--space--medium);overflow-y:auto}.changeable__icon__container{background:var(--dialog__warning--background-color);display:flex;justify-content:center;align-items:center;min-width:26px;min-height:26px;border-radius:50%}.changeable__icon{--ez-icon--color:var(--dialog__icon--color)}.changeable__icon__container.title-icon--critical{background-color:var(--dialog__critical--background-color)}.changeable__icon__container.title-icon--success{background-color:var(--dialog__success--background-color)}.changeable__icon__container.title-icon--warn{background-color:var(--dialog__warning--background-color)}.changeable__icon__container.title-icon--warn ez-icon{transform:translateY(-1px)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right);--ez-button--min-width:var(--dialog__btn__min-width)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted);--ez-button--min-width:var(--dialog__btn__min-width)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted);--ez-button--min-width:var(--dialog__btn__min-width)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
8
8
 
9
9
  class Message {
10
10
  constructor(title, message, dialogType, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack, beforeClose) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-baa5e267.js';
2
2
  import { DateUtils, ApplicationContext, Action, StringUtils, KeyboardManager, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
3
- import { b as buildFieldMetadata, a as buildFieldSearch, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, D as DataBinder } from './search-column-83562552.js';
3
+ import { b as buildFieldMetadata, a as buildFieldSearch, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, D as DataBinder } from './search-column-c00119ae.js';
4
4
  import { g as getI18n, i as initI18n } from './index-62fc771e.js';
5
5
  import { F as FormLayout } from './FormLayout-071d324c.js';
6
6
  import './ApplicationUtils-12768f5a.js';
@@ -78,28 +78,59 @@ const buildFormConfigFromDataUnit = (dataUnit) => {
78
78
  .filter(descriptor => descriptor.visible !== false)
79
79
  .map(descriptor => { return { name: descriptor.name, defaultValue: descriptor.defaultValue }; });
80
80
  }
81
- const config = { emptyConfig: false, fields };
82
- return config;
81
+ return { emptyConfig: false, fields };
83
82
  };
84
- const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
85
- var _a, _b;
86
- if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
87
- config = buildFormConfigFromDataUnit(dataUnit);
88
- }
89
- const sheets = new Map();
90
- const hiddenTabs = new Map();
91
- const requiredFields = [];
92
- const cleanOnCopyFields = [];
93
- const defaultValues = {};
94
- (_a = config === null || config === void 0 ? void 0 : config.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
95
- if (!hiddenTabs.has(tab.label) && tab.visible === false) {
96
- hiddenTabs.set(tab.label, tab);
83
+ function handleDetailTabs(dataUnit, config, sheets) {
84
+ const unitMD = dataUnit.metadata;
85
+ if (unitMD === undefined || unitMD.children === undefined)
86
+ return;
87
+ unitMD.children.forEach((child) => {
88
+ const tabConfig = getTabFromConfig(child.label, config);
89
+ if (tabConfig) {
90
+ sheets.set(Object.assign(tabConfig, { name: buildChildName(child), isDetail: true }), []);
91
+ return;
97
92
  }
93
+ const { label, name, fields } = buildDetailSheet(child);
94
+ sheets.set({ name, label, isDetail: true }, fields);
98
95
  });
99
- (_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
96
+ }
97
+ function handleCustomTabs(customGuides, config, sheets) {
98
+ customGuides.forEach((guide) => {
99
+ const tabConfig = getTabFromConfig(guide.label, config);
100
+ const ctxProps = {};
101
+ Object.entries(guide).forEach(([key, value]) => {
102
+ if (!isReservedKey(key)) {
103
+ ctxProps[key] = value;
104
+ }
105
+ });
106
+ if (tabConfig) {
107
+ sheets.set(Object.assign(tabConfig, { name: guide.id, isCustom: true, ctxProps }), []);
108
+ return;
109
+ }
110
+ const sheet = { label: guide.label, name: guide.id, isCustom: true, visible: true, ctxProps };
111
+ sheets.set(sheet, []);
112
+ });
113
+ }
114
+ function isReservedKey(key) {
115
+ return ['id', 'label'].includes(key);
116
+ }
117
+ function parseTabToFormSheet(key, fields) {
118
+ const i18n = getI18n();
119
+ return {
120
+ label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
121
+ name: key.name || key.label,
122
+ isCustom: key.isCustom,
123
+ isDetail: key.isDetail,
124
+ ctxProps: key.ctxProps,
125
+ fields
126
+ };
127
+ }
128
+ function handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues) {
129
+ var _a;
130
+ (_a = config === null || config === void 0 ? void 0 : config.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
100
131
  var _a, _b, _c;
101
132
  if (field.visible !== false) {
102
- const tabConfig = getTabConfig(field.tab || "__main", sheets);
133
+ const tabConfig = getTabConfig(field.tab || "__main", sheets, config);
103
134
  if (hiddenTabs.has(tabConfig.label)) {
104
135
  return;
105
136
  }
@@ -135,7 +166,8 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
135
166
  defaultValue = value;
136
167
  }
137
168
  }
138
- catch (_d) { }
169
+ catch (_d) {
170
+ }
139
171
  }
140
172
  }
141
173
  defaultValues[field.name] = defaultValue;
@@ -143,42 +175,82 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
143
175
  }
144
176
  }
145
177
  });
178
+ }
179
+ const buildFormMetadata = (config, dataUnit, includeDetails = false, customGuides) => {
180
+ var _a;
181
+ if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
182
+ config = buildFormConfigFromDataUnit(dataUnit);
183
+ }
184
+ const sheets = new Map();
185
+ const hiddenTabs = new Map();
186
+ const requiredFields = [];
187
+ const cleanOnCopyFields = [];
188
+ const defaultValues = {};
189
+ const tabs = (_a = config === null || config === void 0 ? void 0 : config.tabs) !== null && _a !== void 0 ? _a : [];
190
+ tabs.forEach((tab) => {
191
+ if (!hiddenTabs.has(tab.label) && tab.visible === false) {
192
+ hiddenTabs.set(tab.label, tab);
193
+ }
194
+ });
195
+ handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues);
146
196
  const metadata = new FormMetadata();
147
197
  metadata.setDefaultVars(config.defaultVars);
148
198
  if (includeDetails) {
149
- const unitMD = dataUnit.metadata;
150
- if (unitMD != undefined && unitMD.children != undefined) {
151
- unitMD.children.forEach(child => {
152
- const { label, name, fields } = buildDetailSheet(child);
153
- sheets.set({ name, label }, fields);
154
- });
155
- }
199
+ handleDetailTabs(dataUnit, config, sheets);
200
+ }
201
+ if (customGuides) {
202
+ handleCustomTabs(customGuides, config, sheets);
156
203
  }
157
- const i18n = getI18n();
158
204
  Array.from(sheets.entries())
159
205
  .sort(sortTabs)
160
- .forEach(([key, fields]) => {
161
- metadata.addSheet({
162
- label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
163
- name: key.name || key.label,
164
- fields
165
- });
206
+ .forEach(([tab, fields]) => {
207
+ if (!hiddenTabs.has(tab.label)) {
208
+ metadata.addSheet(parseTabToFormSheet(tab, fields));
209
+ }
166
210
  });
167
211
  metadata.addRequiredFields(requiredFields);
168
212
  metadata.addCleanOnCopyFields(cleanOnCopyFields);
169
213
  metadata.addDefaultValues(defaultValues);
170
214
  return metadata;
171
215
  };
172
- const getTabConfig = (tab, sheets) => {
173
- const tabConfig = (typeof tab === "string" ? Array.from(sheets.keys()).find(t => t.label === tab) : tab);
216
+ const getTabFromConfig = (tab, config) => {
217
+ var _a;
218
+ if (!config) {
219
+ return;
220
+ }
221
+ return (_a = config.tabs) === null || _a === void 0 ? void 0 : _a.find(t => t.label === tab);
222
+ };
223
+ const getTabConfig = (tab, sheets, config) => {
224
+ if (typeof tab !== "string") {
225
+ return tab;
226
+ }
227
+ if (config) {
228
+ const tabConfig = getTabFromConfig(tab, config);
229
+ if (tabConfig) {
230
+ return tabConfig;
231
+ }
232
+ }
233
+ const tabConfig = Array.from(sheets.keys()).find(t => t.label === tab);
174
234
  return tabConfig || { label: tab, visible: true };
175
235
  };
176
- const sortTabs = (a, b) => {
177
- return a[0].label == '__main' ? -1 : (a[0].order || 10000) - (b[0].order || 10000);
236
+ function sortTabs(a, b) {
237
+ var _a, _b;
238
+ if (a[0].label === '__main' && b[0].label !== '__main') {
239
+ return -1;
240
+ }
241
+ if (a[0].label !== '__main' && b[0].label === '__main') {
242
+ return 1;
243
+ }
244
+ const aOrder = (_a = a[0].order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
245
+ const bOrder = (_b = b[0].order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
246
+ return aOrder - bOrder;
247
+ }
248
+ const buildChildName = (child) => {
249
+ return `child[${child.name}]`;
178
250
  };
179
251
  const buildDetailSheet = (child) => {
180
252
  return {
181
- name: `child[${child.name}]`,
253
+ name: buildChildName(child),
182
254
  label: child.label,
183
255
  fields: []
184
256
  };
@@ -6,10 +6,10 @@ import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
7
  import { g as getI18n, i as initI18n } from './index-62fc771e.js';
8
8
  import { C as CustomEditorSource, a as CustomRenderSource } from './FormLayout-071d324c.js';
9
- import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, a as buildFieldSearch } from './search-column-83562552.js';
9
+ import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, a as buildFieldSearch } from './search-column-c00119ae.js';
10
10
  import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE, P as PRESENTATION_COL_ID_PROP_NAME, a as PRESENTATION_FROM_COL_PROP_NAME } from './constants-3fabe81e.js';
11
11
  import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
12
- import { p as purify } from './purify-dc6814bf.js';
12
+ import { p as purify } from './purify-003c47e2.js';
13
13
  import './_commonjsHelpers-9943807e.js';
14
14
 
15
15
  /**
@@ -65574,7 +65574,7 @@ class AgGridController {
65574
65574
  const colDefsWithConfigs = this.getColsDefWithConfigApplied(colDefs, this._lastColsConfig);
65575
65575
  this._gridOptions.api.setColumnDefs(colDefsWithConfigs);
65576
65576
  }
65577
- getColsDefWithConfigApplied(colDefs, colsConfig) {
65577
+ getColsDefWithConfigApplied(colDefs, colsConfig = []) {
65578
65578
  //Cria map de colunas existentes na config e seu índice
65579
65579
  const orderMap = colsConfig.reduce((map, col, index) => {
65580
65580
  map[col.name] = index;
@@ -19,7 +19,7 @@ var ModalButtonStatus;
19
19
  })(ModalButtonStatus || (ModalButtonStatus = {}));
20
20
  const ModalButtonStatus$1 = ModalButtonStatus;
21
21
 
22
- const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
22
+ const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:flex;flex-direction:column;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--8, 8px);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}";
23
23
 
24
24
  const EzModalContainer = class {
25
25
  constructor(hostRef) {
@@ -66,17 +66,8 @@ const EzModalContainer = class {
66
66
  closeModal() {
67
67
  this.ezModalAction.emit("CLOSE");
68
68
  }
69
- focusLast() {
70
- if (this._okButton == undefined) {
71
- return;
72
- }
73
- this._okButton.setFocus();
74
- }
75
- focusFirst() {
76
- this._closeButton.focus();
77
- }
78
69
  render() {
79
- return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), (this.showCloseButton && h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE), "aria-label": this.i18n("app.close") }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" })))))), h("div", { tabIndex: -1, class: "ez-modal-container__content" }, h("slot", null)), h("div", { tabIndex: -1, class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel || this.i18n("app.cancel"), enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel || this.i18n("app.ok"), enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
70
+ return (h(Host, null, h("header", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), (this.showCloseButton && h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE), "aria-label": this.i18n("app.close") }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" })))))), h("main", { tabIndex: -1, class: "ez-modal-container__content" }, h("slot", null)), h("footer", { tabIndex: -1, class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel || this.i18n("app.cancel"), isDisabled: this.cancelButtonStatus === ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel || this.i18n("app.ok"), isDisabled: this.okButtonStatus === ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) })))));
80
71
  }
81
72
  get _element() { return getElement(this); }
82
73
  };
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { KeyboardManager, FloatingManager } from '@sankhyalabs/core';
3
3
  import { i as initI18n } from './index-62fc771e.js';
4
4
 
5
- const ezPopupCss = ":host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, \"Roboto\");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset;gap:var(--space--16, 16px)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;flex:1;font-family:var(--font--pattern, \"Roboto\");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400);line-height:var(--line-height--24, 24px)}.popup__header{width:100%;display:flex;align-items:center}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
5
+ const ezPopupCss = ":host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, \"Roboto\");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset;gap:var(--space--16, 16px)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{flex-grow:1;box-sizing:border-box;width:100%;font-family:var(--font--pattern, \"Roboto\");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400)}.popup__header{flex-shrink:0;width:100%;display:flex;align-items:center}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{flex-shrink:0;display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
6
6
 
7
7
  const EzPopup = class {
8
8
  constructor(hostRef) {
@@ -14,7 +14,7 @@ const EzPopup = class {
14
14
  this.useHeader = true;
15
15
  this.heightMode = "full";
16
16
  this.ezTitle = undefined;
17
- this.enabledScroll = false;
17
+ this.enabledScroll = true;
18
18
  this.autoClose = true;
19
19
  this.footerButtons = [];
20
20
  }
@@ -84,9 +84,6 @@ const EzPopup = class {
84
84
  if (this.heightMode === 'auto') {
85
85
  className += ' popup__container--auto';
86
86
  }
87
- if (this.enabledScroll) {
88
- className += ' popup__overflow-y--auto';
89
- }
90
87
  className += ` ${this.getGridSize()}`;
91
88
  return className;
92
89
  }
@@ -147,9 +144,15 @@ const EzPopup = class {
147
144
  };
148
145
  }
149
146
  }
147
+ renderFooterButtons() {
148
+ return this.footerButtons.slice(0, 3).map((buttonProps, index) => (h("ez-button", Object.assign({ key: index }, this.handleDefaultPropsButtonsByIndex(index), buttonProps))));
149
+ }
150
150
  render() {
151
151
  return (h(Host, null, this.opened && (h("div", { class: "overlay", tabIndex: -1, onClick: this.handleAutoClose.bind(this) }, h("dialog", { ref: ref => this._popupRef = ref, class: this.getDialogClass() }, this.useHeader &&
152
- h("header", { class: "popup__header" }, !!this.ezTitle && h("h1", { class: "popup__title" }, this.ezTitle), h("ez-button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", variant: "tertiary", mode: "icon", iconName: "close", size: "small", onClick: this.closePopup.bind(this) })), h("main", { class: "popup__expandable-content" }, h("slot", null)), this.footerButtons.length > 0 && (h("footer", { class: "popup__footer" }, this.footerButtons.slice(0, 3).map((buttonProps, index) => (h("ez-button", Object.assign({ key: index }, this.handleDefaultPropsButtonsByIndex(index), buttonProps)))))))))));
152
+ h("header", { class: "popup__header" }, !!this.ezTitle && h("h1", { class: "popup__title" }, this.ezTitle), h("ez-button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", variant: "tertiary", mode: "icon", iconName: "close", size: "small", onClick: this.closePopup.bind(this) })), h("main", { class: {
153
+ "popup__expandable-content": true,
154
+ "popup__overflow-y--auto": this.enabledScroll
155
+ } }, h("slot", null)), h("footer", { class: "popup__footer" }, this.footerButtons.length > 0 && (this.renderFooterButtons()), h("slot", { name: 'footer' })))))));
153
156
  }
154
157
  get _element() { return getElement(this); }
155
158
  static get watchers() { return {
@@ -35,6 +35,9 @@ const TreeItem = (props) => {
35
35
  iconClick(treeItem);
36
36
  }
37
37
  }
38
+ function handleIconDoubleClick(event) {
39
+ event.stopPropagation();
40
+ }
38
41
  return (h("ul", { class: level === 1 ? "first-level" : undefined },
39
42
  h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem), onDblClick: () => available && itemDoubleClick(treeItem) }, {
40
43
  disabled,
@@ -43,7 +46,7 @@ const TreeItem = (props) => {
43
46
  }),
44
47
  h("div", { class: "item-label-container" },
45
48
  h("div", { class: "item-icon-box" }, expandable &&
46
- h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: (event) => handleIconClick(event) })),
49
+ h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: (event) => handleIconClick(event), onDblClick: (event) => handleIconDoubleClick(event) })),
47
50
  h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
48
51
  getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
49
52
  expanded
@@ -135,6 +138,13 @@ class Node {
135
138
  this.children.set(item.id, new Node(tree, item, this));
136
139
  }
137
140
  }
141
+ removeChild(id) {
142
+ if (this.children.has(id)) {
143
+ this.children.delete(id);
144
+ return true;
145
+ }
146
+ return false;
147
+ }
138
148
  addPlaceHolder() {
139
149
  this.children.clear();
140
150
  const id = this.item.id;
@@ -184,6 +194,8 @@ class Tree extends Node {
184
194
  async addChildAt(parentId, item) {
185
195
  const parent = this.getNode(parentId);
186
196
  if (parent == undefined) {
197
+ this.addChild(this, item);
198
+ this._changeCallback();
187
199
  return;
188
200
  }
189
201
  parent.addChild(this, item);
@@ -247,6 +259,23 @@ class Tree extends Node {
247
259
  }
248
260
  this._changeCallback();
249
261
  }
262
+ removeItem(id) {
263
+ if (!id) {
264
+ return;
265
+ }
266
+ const node = this.getNode(id);
267
+ if (!node) {
268
+ return;
269
+ }
270
+ if (node.parent) {
271
+ node.parent.removeChild(id);
272
+ }
273
+ else {
274
+ this.children.delete(id);
275
+ }
276
+ this._disabledValues.delete(id);
277
+ this._changeCallback();
278
+ }
250
279
  async open(path) {
251
280
  return new Promise(async (resolve) => {
252
281
  await this.walkPath(this, path, node => node.item.expanded = true);
@@ -370,7 +399,7 @@ class Tree extends Node {
370
399
  }
371
400
  }
372
401
 
373
- const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:0px;--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree--font-weight--bold:var(--text-weight--large, 600);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);--ez-tree__badge--icon-color--default:var(--title--primary, #2B3A54);--ez-tree__badge--icon-color--error:var(--color--error, #da4453);--ez-tree__badge--icon-color--success:var(--color-alert--success-800, #157a00);--ez-tree__badge--icon-color--warning:var(--color--warning, #f2d410);--ez-tree__badge--icon-color--disabled:var(--text--disable, #AFB6C0);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;cursor:default;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge-text{font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center;overflow:hidden}.tree-item{display:flex;align-items:center;cursor:pointer;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.item-label--bold{font-weight:var(--ez-tree--font-weight--bold)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
402
+ const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:0px;--ez-tree--user-select:auto;--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree--font-weight--bold:var(--text-weight--large, 600);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);--ez-tree__badge--icon-color--default:var(--title--primary, #2B3A54);--ez-tree__badge--icon-color--error:var(--color--error, #da4453);--ez-tree__badge--icon-color--success:var(--color-alert--success-800, #157a00);--ez-tree__badge--icon-color--warning:var(--color--warning, #f2d410);--ez-tree__badge--icon-color--disabled:var(--text--disable, #AFB6C0);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;cursor:default;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge-text{font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center;overflow:hidden}.tree-item{display:flex;align-items:center;cursor:pointer;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;user-select:var(--ez-tree--user-select);font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.item-label--bold{font-weight:var(--ez-tree--font-weight--bold)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
374
403
 
375
404
  const EzTree = class {
376
405
  constructor(hostRef) {
@@ -378,12 +407,20 @@ const EzTree = class {
378
407
  this.ezChange = createEvent(this, "ezChange", 7);
379
408
  this.ezOpenItem = createEvent(this, "ezOpenItem", 7);
380
409
  this.ezDbClickItem = createEvent(this, "ezDbClickItem", 7);
410
+ this.ezRemoveItem = createEvent(this, "ezRemoveItem", 7);
381
411
  this._onItemClick = (item) => {
382
- this._onIconClick(item);
412
+ if (!this.selectable) {
413
+ this.openClose(item);
414
+ return;
415
+ }
416
+ if (this.value && this.value.id === item.id) {
417
+ this.value = undefined;
418
+ return;
419
+ }
420
+ this.value = item;
383
421
  };
384
422
  this._onIconClick = (item) => {
385
423
  this.openClose(item);
386
- this.value = item;
387
424
  };
388
425
  this._tree = new Tree(() => forceUpdate(this));
389
426
  this._waintingForLoad = undefined;
@@ -393,6 +430,7 @@ const EzTree = class {
393
430
  this.iconResolver = defaultIconResolver;
394
431
  this.tooltipResolver = undefined;
395
432
  this.enableHierarchicalFilter = true;
433
+ this.selectable = true;
396
434
  }
397
435
  /**
398
436
  * Efetua a seleção de um item.
@@ -443,10 +481,14 @@ const EzTree = class {
443
481
  parentId = (_a = this.value) === null || _a === void 0 ? void 0 : _a.id;
444
482
  }
445
483
  this._tree.addChildAt(parentId, item);
484
+ this.addItemInIndexedList(parentId, item);
446
485
  const node = this._tree.getNode(parentId);
447
486
  if (node) {
448
487
  node.item.expanded = true;
449
488
  }
489
+ else {
490
+ this.collapseAll();
491
+ }
450
492
  }
451
493
  /**
452
494
  * Efetua a seleção de um item.
@@ -469,12 +511,48 @@ const EzTree = class {
469
511
  /**
470
512
  * Atualiza um item
471
513
  */
472
- async updateItem(item) {
473
- var _a;
474
- this._tree.updateItem(item);
514
+ async updateItem(item, config) {
515
+ var _a, _b, _c;
516
+ if (Array.isArray(item)) {
517
+ item.forEach(i => this.updateItem(i, config));
518
+ return;
519
+ }
520
+ if (config === null || config === void 0 ? void 0 : config.updatedBySelectedId) {
521
+ Object.assign(item, { id: this.selectedId });
522
+ }
523
+ this._tree.updateItem((config === null || config === void 0 ? void 0 : config.forceDefaultValues) ? this.applyDefaultValues(item) : item);
524
+ this.updateItemInIndexedList(item, config === null || config === void 0 ? void 0 : config.forceDefaultValues);
475
525
  const node = (_a = this._tree) === null || _a === void 0 ? void 0 : _a.getNode(this.selectedId);
476
526
  if (node == undefined) {
477
527
  this.value = this._visibleItems ? this._visibleItems[0] : undefined;
528
+ this._tree.collapseAll();
529
+ }
530
+ if (((_b = this.value) === null || _b === void 0 ? void 0 : _b.id) === item.id) {
531
+ this.value = item;
532
+ this.ezChange.emit(this.value);
533
+ return;
534
+ }
535
+ const childSelected = this.getItemById((_c = this.value) === null || _c === void 0 ? void 0 : _c.id, [item]);
536
+ if (childSelected) {
537
+ this.value = childSelected;
538
+ this.ezChange.emit(this.value);
539
+ }
540
+ }
541
+ /**
542
+ * Remove um item da árvore pelo seu ID.
543
+ * Se o item removido estiver selecionado, a seleção será limpa.
544
+ */
545
+ async removeItem(id) {
546
+ var _a;
547
+ id = id !== null && id !== void 0 ? id : this.selectedId;
548
+ if (!id) {
549
+ return;
550
+ }
551
+ this._tree.removeItem(id);
552
+ this.removeItemFromIndexedList(id);
553
+ this.ezRemoveItem.emit(id);
554
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.id) === id) {
555
+ this.value = undefined;
478
556
  }
479
557
  }
480
558
  /**
@@ -562,6 +640,75 @@ const EzTree = class {
562
640
  event.preventDefault();
563
641
  }
564
642
  }
643
+ getItemById(id, items) {
644
+ for (const treeItem of items) {
645
+ if (treeItem.id === id) {
646
+ return treeItem;
647
+ }
648
+ else if (treeItem.children && Array.isArray(treeItem.children)) {
649
+ const itemFound = this.getItemById(id, treeItem.children);
650
+ if (itemFound) {
651
+ return itemFound;
652
+ }
653
+ }
654
+ }
655
+ return undefined;
656
+ }
657
+ addItemInIndexedList(parentId, item, items) {
658
+ var _a, _b;
659
+ items = (_a = items !== null && items !== void 0 ? items : this.items) !== null && _a !== void 0 ? _a : [];
660
+ if (!parentId) {
661
+ items.push(item);
662
+ }
663
+ const itemFound = this.getItemById(parentId, items);
664
+ itemFound.children = ((_b = itemFound.children) !== null && _b !== void 0 ? _b : []);
665
+ itemFound.children.push(item);
666
+ itemFound.childrenCount = itemFound.children.length;
667
+ }
668
+ applyDefaultValues(item) {
669
+ if (item.disabled === undefined) {
670
+ item.disabled = false;
671
+ }
672
+ if (item.expanded === undefined) {
673
+ item.expanded = false;
674
+ }
675
+ return item;
676
+ }
677
+ updateItemInIndexedList(item, forceDefaultValues = false) {
678
+ if (!item || !this.items) {
679
+ return;
680
+ }
681
+ const itemFound = this.getItemById(item.id, this.items);
682
+ if (itemFound) {
683
+ Object.assign(itemFound, forceDefaultValues ? this.applyDefaultValues(item) : item);
684
+ }
685
+ }
686
+ removeItemFromIndexedList(id, items) {
687
+ var _a;
688
+ items = (_a = items !== null && items !== void 0 ? items : this.items) !== null && _a !== void 0 ? _a : [];
689
+ if (!id) {
690
+ return false;
691
+ }
692
+ const rootIndex = items.findIndex(item => item.id === id);
693
+ if (rootIndex !== -1) {
694
+ items.splice(rootIndex, 1);
695
+ return true;
696
+ }
697
+ for (const treeItem of items) {
698
+ if (treeItem.children && Array.isArray(treeItem.children)) {
699
+ const childIndex = treeItem.children.findIndex(child => child.id === id);
700
+ if (childIndex !== -1) {
701
+ treeItem.children.splice(childIndex, 1);
702
+ treeItem.childrenCount = treeItem.children.length;
703
+ return true;
704
+ }
705
+ if (this.removeItemFromIndexedList(id, treeItem.children)) {
706
+ return true;
707
+ }
708
+ }
709
+ }
710
+ return false;
711
+ }
565
712
  getItemPathAttrs({ id, label }) {
566
713
  return { id, label };
567
714
  }