@zanichelli/albe-web-components 13.2.0-rc1 → 13.3.0

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 (130) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +16 -12
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-carousel.cjs.entry.js +3 -2
  7. package/dist/cjs/z-carousel.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-combobox.cjs.entry.js +38 -145
  9. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-file-upload.cjs.entry.js +25 -14
  11. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  12. package/dist/cjs/z-popover.cjs.entry.js +3 -3
  13. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +3 -2
  15. package/dist/cjs/z-table.cjs.entry.js.map +1 -1
  16. package/dist/collection/components/file-upload/z-file-upload/index.js +63 -13
  17. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  18. package/dist/collection/components/file-upload/z-file-upload/styles.css +12 -0
  19. package/dist/collection/components/icons/icons.js +10 -0
  20. package/dist/collection/components/icons/icons.js.map +1 -1
  21. package/dist/collection/components/inputs/z-combobox/index.js +41 -149
  22. package/dist/collection/components/inputs/z-combobox/index.js.map +1 -1
  23. package/dist/collection/components/inputs/z-combobox/index.spec.js +155 -185
  24. package/dist/collection/components/inputs/z-combobox/index.spec.js.map +1 -1
  25. package/dist/collection/components/inputs/z-combobox/styles.css +10 -10
  26. package/dist/collection/components/inputs/z-input/index.js +5 -41
  27. package/dist/collection/components/inputs/z-input/index.js.map +1 -1
  28. package/dist/collection/components/list/z-list-element/index.js +1 -20
  29. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  30. package/dist/collection/components/table/z-table/index.js +3 -2
  31. package/dist/collection/components/table/z-table/index.js.map +1 -1
  32. package/dist/collection/components/z-carousel/index.js +3 -1
  33. package/dist/collection/components/z-carousel/index.js.map +1 -1
  34. package/dist/collection/components/z-carousel/styles.css +3 -0
  35. package/dist/collection/components/z-popover/index.js +4 -4
  36. package/dist/collection/components/z-popover/index.js.map +1 -1
  37. package/dist/components/icons.js +10 -0
  38. package/dist/components/icons.js.map +1 -1
  39. package/dist/components/index10.js +5 -11
  40. package/dist/components/index10.js.map +1 -1
  41. package/dist/components/index13.js +1 -3
  42. package/dist/components/index13.js.map +1 -1
  43. package/dist/components/index25.js +3 -3
  44. package/dist/components/index25.js.map +1 -1
  45. package/dist/components/z-carousel.js +3 -2
  46. package/dist/components/z-carousel.js.map +1 -1
  47. package/dist/components/z-combobox.js +49 -163
  48. package/dist/components/z-combobox.js.map +1 -1
  49. package/dist/components/z-file-upload.js +28 -15
  50. package/dist/components/z-file-upload.js.map +1 -1
  51. package/dist/components/z-table.js +3 -2
  52. package/dist/components/z-table.js.map +1 -1
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/esm/web-components-library.js +1 -1
  55. package/dist/esm/z-app-header_12.entry.js +16 -12
  56. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  57. package/dist/esm/z-carousel.entry.js +3 -2
  58. package/dist/esm/z-carousel.entry.js.map +1 -1
  59. package/dist/esm/z-combobox.entry.js +40 -147
  60. package/dist/esm/z-combobox.entry.js.map +1 -1
  61. package/dist/esm/z-file-upload.entry.js +25 -14
  62. package/dist/esm/z-file-upload.entry.js.map +1 -1
  63. package/dist/esm/z-popover.entry.js +3 -3
  64. package/dist/esm/z-popover.entry.js.map +1 -1
  65. package/dist/esm/z-table.entry.js +3 -2
  66. package/dist/esm/z-table.entry.js.map +1 -1
  67. package/dist/types/components/file-upload/z-file-upload/index.d.ts +5 -0
  68. package/dist/types/components/icons/icons.d.ts +20 -0
  69. package/dist/types/components/inputs/z-combobox/index.d.ts +1 -14
  70. package/dist/types/components/inputs/z-input/index.d.ts +0 -5
  71. package/dist/types/components/list/z-list-element/index.d.ts +0 -2
  72. package/dist/types/components/z-carousel/index.d.ts +1 -0
  73. package/dist/types/components/z-popover/index.d.ts +1 -0
  74. package/dist/types/components.d.ts +18 -23
  75. package/dist/web-components-library/{p-158b6dda.entry.js → p-3796ca7c.entry.js} +2 -2
  76. package/dist/web-components-library/p-3796ca7c.entry.js.map +1 -0
  77. package/dist/web-components-library/p-9b52dea5.entry.js +2 -0
  78. package/dist/web-components-library/p-9b52dea5.entry.js.map +1 -0
  79. package/dist/web-components-library/p-aa0f32d7.entry.js +2 -0
  80. package/dist/web-components-library/p-aa0f32d7.entry.js.map +1 -0
  81. package/dist/web-components-library/p-ba8e67ee.entry.js +2 -0
  82. package/dist/web-components-library/p-ba8e67ee.entry.js.map +1 -0
  83. package/dist/web-components-library/p-ed1a5ee3.entry.js +2 -0
  84. package/dist/web-components-library/p-ed1a5ee3.entry.js.map +1 -0
  85. package/{www/build/p-2637ab23.entry.js → dist/web-components-library/p-f7607ce7.entry.js} +2 -2
  86. package/dist/web-components-library/p-f7607ce7.entry.js.map +1 -0
  87. package/dist/web-components-library/web-components-library.css +1 -1
  88. package/dist/web-components-library/web-components-library.esm.js +1 -1
  89. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  90. package/package.json +2 -2
  91. package/www/build/p-22cc270c.css +3 -0
  92. package/www/build/{p-158b6dda.entry.js → p-3796ca7c.entry.js} +2 -2
  93. package/www/build/p-3796ca7c.entry.js.map +1 -0
  94. package/www/build/p-9b52dea5.entry.js +2 -0
  95. package/www/build/p-9b52dea5.entry.js.map +1 -0
  96. package/www/build/p-aa0f32d7.entry.js +2 -0
  97. package/www/build/p-aa0f32d7.entry.js.map +1 -0
  98. package/www/build/p-ba8e67ee.entry.js +2 -0
  99. package/www/build/p-ba8e67ee.entry.js.map +1 -0
  100. package/www/build/p-ddd9a0ea.js +2 -0
  101. package/www/build/p-ed1a5ee3.entry.js +2 -0
  102. package/www/build/p-ed1a5ee3.entry.js.map +1 -0
  103. package/{dist/web-components-library/p-2637ab23.entry.js → www/build/p-f7607ce7.entry.js} +2 -2
  104. package/www/build/p-f7607ce7.entry.js.map +1 -0
  105. package/www/build/web-components-library.css +1 -1
  106. package/www/build/web-components-library.esm.js +1 -1
  107. package/www/build/web-components-library.esm.js.map +1 -1
  108. package/www/index.html +1 -1
  109. package/dist/web-components-library/p-158b6dda.entry.js.map +0 -1
  110. package/dist/web-components-library/p-2637ab23.entry.js.map +0 -1
  111. package/dist/web-components-library/p-2b2cb566.entry.js +0 -2
  112. package/dist/web-components-library/p-2b2cb566.entry.js.map +0 -1
  113. package/dist/web-components-library/p-2df884ef.entry.js +0 -2
  114. package/dist/web-components-library/p-2df884ef.entry.js.map +0 -1
  115. package/dist/web-components-library/p-5023f7d5.entry.js +0 -2
  116. package/dist/web-components-library/p-5023f7d5.entry.js.map +0 -1
  117. package/dist/web-components-library/p-93cb103f.entry.js +0 -2
  118. package/dist/web-components-library/p-93cb103f.entry.js.map +0 -1
  119. package/www/build/p-158b6dda.entry.js.map +0 -1
  120. package/www/build/p-2637ab23.entry.js.map +0 -1
  121. package/www/build/p-2b2cb566.entry.js +0 -2
  122. package/www/build/p-2b2cb566.entry.js.map +0 -1
  123. package/www/build/p-2df884ef.entry.js +0 -2
  124. package/www/build/p-2df884ef.entry.js.map +0 -1
  125. package/www/build/p-32cd9d9b.js +0 -2
  126. package/www/build/p-36aea196.css +0 -3
  127. package/www/build/p-5023f7d5.entry.js +0 -2
  128. package/www/build/p-5023f7d5.entry.js.map +0 -1
  129. package/www/build/p-93cb103f.entry.js +0 -2
  130. package/www/build/p-93cb103f.entry.js.map +0 -1
@@ -17,6 +17,7 @@ export declare class ZPopover {
17
17
  open: boolean;
18
18
  /**
19
19
  * The selector or the element bound with the popover.
20
+ * If string css selector is provided make sure to use a valid selector.
20
21
  */
21
22
  bindTo?: string | HTMLElement;
22
23
  /**
@@ -402,6 +402,7 @@ export namespace Components {
402
402
  /**
403
403
  * ZCarousel component.
404
404
  * @cssprop --z-carousel-gutter - The gutter between items.
405
+ * @cssprop --z-carousel-items-shadow - The shadow around the items.
405
406
  */
406
407
  interface ZCarousel {
407
408
  /**
@@ -627,10 +628,18 @@ export namespace Components {
627
628
  * get array of uploaded files
628
629
  */
629
630
  "getFiles": () => Promise<File[]>;
631
+ /**
632
+ * uploaded files history rendering
633
+ */
634
+ "hasFileSection"?: boolean;
630
635
  /**
631
636
  * Title
632
637
  */
633
638
  "mainTitle"?: string;
639
+ /**
640
+ * remove file from the array
641
+ */
642
+ "removeFile": (fileName: string) => Promise<void>;
634
643
  /**
635
644
  * Prop indicating the file upload type - can be default or dragdrop
636
645
  */
@@ -737,10 +746,6 @@ export namespace Components {
737
746
  * render icon (optional): available for text
738
747
  */
739
748
  "icon"?: string;
740
- /**
741
- * set tabindex to input tag (optional). Defaults to native behaviour.
742
- */
743
- "innerTabIndex"?: number;
744
749
  /**
745
750
  * get checked status
746
751
  */
@@ -932,10 +937,6 @@ export namespace Components {
932
937
  * [optional] Sets expandable style to element.
933
938
  */
934
939
  "expandableStyle"?: ExpandableListStyle;
935
- /**
936
- * set tabindex to Host tag (optional). Defaults to 0.
937
- */
938
- "htmlTabindex"?: number | null;
939
940
  /**
940
941
  * [optional] List element id.
941
942
  */
@@ -1496,7 +1497,7 @@ export namespace Components {
1496
1497
  */
1497
1498
  interface ZPopover {
1498
1499
  /**
1499
- * The selector or the element bound with the popover.
1500
+ * The selector or the element bound with the popover. If string css selector is provided make sure to use a valid selector.
1500
1501
  */
1501
1502
  "bindTo"?: string | HTMLElement;
1502
1503
  /**
@@ -2369,6 +2370,7 @@ declare global {
2369
2370
  /**
2370
2371
  * ZCarousel component.
2371
2372
  * @cssprop --z-carousel-gutter - The gutter between items.
2373
+ * @cssprop --z-carousel-items-shadow - The shadow around the items.
2372
2374
  */
2373
2375
  interface HTMLZCarouselElement extends Components.ZCarousel, HTMLStencilElement {
2374
2376
  addEventListener<K extends keyof HTMLZCarouselElementEventMap>(type: K, listener: (this: HTMLZCarouselElement, ev: ZCarouselCustomEvent<HTMLZCarouselElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2545,7 +2547,6 @@ declare global {
2545
2547
  "startTyping": any;
2546
2548
  "stopTyping": any;
2547
2549
  "inputCheck": any;
2548
- "ariaDescendantFocus": string;
2549
2550
  }
2550
2551
  interface HTMLZInputElement extends Components.ZInput, HTMLStencilElement {
2551
2552
  addEventListener<K extends keyof HTMLZInputElementEventMap>(type: K, listener: (this: HTMLZInputElement, ev: ZInputCustomEvent<HTMLZInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -3769,6 +3770,7 @@ declare namespace LocalJSX {
3769
3770
  /**
3770
3771
  * ZCarousel component.
3771
3772
  * @cssprop --z-carousel-gutter - The gutter between items.
3773
+ * @cssprop --z-carousel-items-shadow - The shadow around the items.
3772
3774
  */
3773
3775
  interface ZCarousel {
3774
3776
  /**
@@ -4014,6 +4016,10 @@ declare namespace LocalJSX {
4014
4016
  * Max file dimension in Megabyte
4015
4017
  */
4016
4018
  "fileMaxSize"?: number;
4019
+ /**
4020
+ * uploaded files history rendering
4021
+ */
4022
+ "hasFileSection"?: boolean;
4017
4023
  /**
4018
4024
  * Title
4019
4025
  */
@@ -4132,10 +4138,6 @@ declare namespace LocalJSX {
4132
4138
  * render icon (optional): available for text
4133
4139
  */
4134
4140
  "icon"?: string;
4135
- /**
4136
- * set tabindex to input tag (optional). Defaults to native behaviour.
4137
- */
4138
- "innerTabIndex"?: number;
4139
4141
  /**
4140
4142
  * the input label
4141
4143
  */
@@ -4168,10 +4170,6 @@ declare namespace LocalJSX {
4168
4170
  * the input name
4169
4171
  */
4170
4172
  "name"?: string;
4171
- /**
4172
- * set parent aria-activedescendant on focus event, returns filterid
4173
- */
4174
- "onAriaDescendantFocus"?: (event: ZInputCustomEvent<string>) => void;
4175
4173
  /**
4176
4174
  * Emitted on input value change, returns value, validity
4177
4175
  */
@@ -4347,10 +4345,6 @@ declare namespace LocalJSX {
4347
4345
  * [optional] Sets expandable style to element.
4348
4346
  */
4349
4347
  "expandableStyle"?: ExpandableListStyle;
4350
- /**
4351
- * set tabindex to Host tag (optional). Defaults to 0.
4352
- */
4353
- "htmlTabindex"?: number | null;
4354
4348
  /**
4355
4349
  * [optional] List element id.
4356
4350
  */
@@ -4991,7 +4985,7 @@ declare namespace LocalJSX {
4991
4985
  */
4992
4986
  interface ZPopover {
4993
4987
  /**
4994
- * The selector or the element bound with the popover.
4988
+ * The selector or the element bound with the popover. If string css selector is provided make sure to use a valid selector.
4995
4989
  */
4996
4990
  "bindTo"?: string | HTMLElement;
4997
4991
  /**
@@ -5721,6 +5715,7 @@ declare module "@stencil/core" {
5721
5715
  /**
5722
5716
  * ZCarousel component.
5723
5717
  * @cssprop --z-carousel-gutter - The gutter between items.
5718
+ * @cssprop --z-carousel-items-shadow - The shadow around the items.
5724
5719
  */
5725
5720
  "z-carousel": LocalJSX.ZCarousel & JSXBase.HTMLAttributes<HTMLZCarouselElement>;
5726
5721
  "z-chip": LocalJSX.ZChip & JSXBase.HTMLAttributes<HTMLZChipElement>;
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,a,g as s}from"./p-10bb4f4b.js";import"./p-04fdb6fa.js";import"./p-2aa42d09.js";import"./p-f76d0247.js";import"./p-ac768eff.js";import"./p-955da62e.js";import"./p-025f494e.js";import"./p-2c886e8b.js";import"./p-88cf27cf.js";import"./p-c0bfa87d.js";const r=":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}.table{min-width:max-content}";const o=r;const i=class{constructor(t){e(this,t);this.bordered=false;this.expandable=false}updateExpandable(){this.expandable=this.host.querySelectorAll("z-tr[expandable]").length>0}componentWillLoad(){this.expandableMutationObserver=new MutationObserver((()=>{this.updateExpandable()}));this.expandableMutationObserver.observe(this.host,{childList:true,subtree:true,attributes:true,attributeFilter:["expandable"],attributeOldValue:false})}disconnectedCallback(){this.expandableMutationObserver.disconnect()}render(){return t(a,{key:"4c33beca2ea12f899450df4a244ea271ea30c018",expandable:this.expandable},t("div",{key:"e5f6e45535e0251091d58b9784cfbe0b9bfc8f7e",class:"table",role:"table"},t("slot",{key:"d244f077dd25df7f2189f5b5f4b6f89e69db4768"})))}get host(){return s(this)}};i.style=o;export{i as z_table};
2
- //# sourceMappingURL=p-158b6dda.entry.js.map
1
+ import{r as t,h as e,a,g as s}from"./p-10bb4f4b.js";import"./p-04fdb6fa.js";import"./p-2aa42d09.js";import"./p-f76d0247.js";import"./p-ac768eff.js";import"./p-955da62e.js";import"./p-025f494e.js";import"./p-2c886e8b.js";import"./p-88cf27cf.js";import"./p-c0bfa87d.js";const o=":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}.table{min-width:max-content}";const r=o;const i=class{constructor(e){t(this,e);this.bordered=false;this.expandable=false}updateExpandable(){this.expandable=this.host.querySelectorAll("z-tr[expandable]").length>0}componentWillLoad(){this.expandableMutationObserver=new MutationObserver((()=>{this.updateExpandable()}));this.expandableMutationObserver.observe(this.host,{childList:true,subtree:true,attributes:true,attributeFilter:["expandable"],attributeOldValue:false})}disconnectedCallback(){var t;(t=this.expandableMutationObserver)===null||t===void 0?void 0:t.disconnect()}render(){return e(a,{key:"d404e04cce15f5c9c01d1d90477b0b073ce4fb18",expandable:this.expandable},e("div",{key:"093877b6d4f94257a4178c2d0647107a91cd782b",class:"table",role:"table"},e("slot",{key:"19e147c5cb2e20287208e39085e816cfc62f3f5e"})))}get host(){return s(this)}};i.style=r;export{i as z_table};
2
+ //# sourceMappingURL=p-3796ca7c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZTableStyle0","ZTable","updateExpandable","this","expandable","host","querySelectorAll","length","componentWillLoad","expandableMutationObserver","MutationObserver","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","disconnectedCallback","_a","disconnect","render","h","Host","key","class","role"],"sources":["src/components/table/z-table/styles.css?tag=z-table&encapsulation=shadow","src/components/table/z-table/index.tsx"],"sourcesContent":[":host {\n --z-table--cells-padding: calc(var(--space-unit) * 2);\n\n position: relative;\n display: block;\n overflow: auto;\n max-width: 100%;\n box-sizing: border-box;\n background-color: var(--color-surface01);\n}\n\n:host([expandable]) {\n --z-table--expand-button-size: 40px;\n}\n\n:host([bordered]) {\n --z-table--cell-left-border: 1px solid var(--color-surface03);\n}\n\n.table {\n min-width: max-content;\n}\n","import {Component, Element, Host, Prop, State, h} from \"@stencil/core\";\nimport \"../z-thead/index\";\nimport \"../z-tbody/index\";\nimport \"../z-tr/index\";\nimport \"../z-tfoot/index\";\n\n/**\n * ZTable component.\n * @slot - Table content (`z-thead`, `z-tbody`, `z-tfoot`, `z-tr`).\n * @cssprop --z-table--cells-padding - Padding of the cells.\n */\n@Component({\n tag: \"z-table\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTable {\n @Element() host: HTMLZTableElement;\n\n /**\n * Whether the table cells should show a border between them.\n */\n @Prop({reflect: true})\n bordered = false;\n\n /**\n * Whether the table contains some expandable rows.\n */\n @State()\n expandable = false;\n\n private updateExpandable(): void {\n this.expandable = this.host.querySelectorAll(\"z-tr[expandable]\").length > 0;\n }\n\n private expandableMutationObserver: MutationObserver;\n\n /**\n * Setup the table creating a mutation observer for the expandable attribute.\n */\n componentWillLoad(): void {\n this.expandableMutationObserver = new MutationObserver(() => {\n this.updateExpandable();\n });\n this.expandableMutationObserver.observe(this.host, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"expandable\"],\n attributeOldValue: false,\n });\n }\n\n disconnectedCallback(): void {\n this.expandableMutationObserver?.disconnect();\n }\n\n render(): HTMLZTableElement {\n return (\n <Host expandable={this.expandable}>\n <div\n class=\"table\"\n role=\"table\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"4QAAA,MAAMA,EAAY,4VAClB,MAAAC,EAAeD,E,MCeFE,EAAM,M,uCAON,M,gBAME,K,CAEL,gBAAAC,GACNC,KAAKC,WAAaD,KAAKE,KAAKC,iBAAiB,oBAAoBC,OAAS,C,CAQ5E,iBAAAC,GACEL,KAAKM,2BAA6B,IAAIC,kBAAiB,KACrDP,KAAKD,kBAAkB,IAEzBC,KAAKM,2BAA2BE,QAAQR,KAAKE,KAAM,CACjDO,UAAW,KACXC,QAAS,KACTC,WAAY,KACZC,gBAAiB,CAAC,cAClBC,kBAAmB,O,CAIvB,oBAAAC,G,OACEC,EAAAf,KAAKM,8BAA0B,MAAAS,SAAA,SAAAA,EAAEC,Y,CAGnC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACnB,WAAYD,KAAKC,YACrBiB,EAAA,OAAAE,IAAA,2CACEC,MAAM,QACNC,KAAK,SAELJ,EAAA,QAAAE,IAAA,8C"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as t,h as e}from"./p-10bb4f4b.js";import{I as s,e as r,K as o,l as a}from"./p-025f494e.js";import{a as n}from"./p-955da62e.js";import"./p-2c886e8b.js";const h=':host{display:block}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-surface04);margin:0;background-color:var(--color-input-field01);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header p.body-3{padding:calc(var(--space-unit) * 0.5) 0}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}:host>div.open>div.header:focus:focus-visible{box-shadow:none}:host>div>div.header:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>p.body-3{padding:var(--space-unit) 0;margin:0;color:var(--color-text01)}:host>div>.header>p.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-icon02);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-primary01);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-disabled01);fill:var(--color-disabled01)}:host>div.disabled .header>p.body-3{color:var(--color-disabled02)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-disabled01)}:host>div.open>.header>z-icon{fill:var(--color-icon02);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--color-input-field01);border-radius:0}:host>div.open>div.open-combo-data>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-primary01)}:host>div.open>div.open-combo-data>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div.search>div>a{display:inline-block;height:44px;color:var(--color-primary01);cursor:pointer;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';const d=h;const l=class{watchItems(){this.itemsList=typeof this.items==="string"?JSON.parse(this.items):this.items;this.selectedCounter=this.itemsList.filter((i=>i.checked)).length;this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}inputCheckListener(i){const t=i.detail.id.replace(`combo-checkbox-${this.inputid}-`,"");if(t==="check-all"&&(!this.maxcheckableitems||this.maxcheckableitems>=this.itemsList.length)){return this.checkAll(i.detail.checked)}this.itemsList=this.itemsList.map((e=>{if(e.id===t){e.checked=i.detail.checked}return e}));this.updateRenderItemsList();this.emitComboboxChange()}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}constructor(e){i(this,e);this.comboboxChange=t(this,"comboboxChange",7);this.itemsList=[];this.inputType=s.TEXT;this.inputid=undefined;this.items=undefined;this.label=undefined;this.disabled=false;this.hassearch=false;this.searchlabel=undefined;this.searchplaceholder=undefined;this.searchtitle=undefined;this.noresultslabel="Nessun risultato";this.isopen=false;this.isfixed=false;this.closesearchtext="Chiudi";this.hascheckall=false;this.checkalltext="Seleziona tutti";this.uncheckalltext="Deseleziona tutti";this.maxcheckableitems=0;this.hasgroupitems=undefined;this.size=r.BIG;this.searchValue=undefined;this.selectedCounter=undefined;this.renderItemsList=[];this.toggleComboBox=this.toggleComboBox.bind(this);this.closeFilterItems=this.closeFilterItems.bind(this)}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((i=>i.checked)).length}updateRenderItemsList(){if(this.searchValue){this.filterItems(this.searchValue)}else{this.resetRenderItemsList()}}resetRenderItemsList(){const i=[];this.itemsList.forEach((t=>{i.push(Object.assign({},t))}));this.renderItemsList=i}filterItems(i){if(!i){return this.closeFilterItems()}this.resetRenderItemsList();this.renderItemsList=this.renderItemsList.filter((t=>{const e=t.name.toUpperCase().indexOf(i.toUpperCase());const s=e+i.length;const r=t.name.substring(0,e)+t.name.substring(e,s).bold()+t.name.substring(s,t.name.length);t.name=r;return e>=0}))}checkAll(i=true){this.itemsList=this.itemsList.map((t=>Object.assign(Object.assign({},t),{checked:i})));this.resetRenderItemsList();this.emitComboboxChange()}closeFilterItems(){this.searchValue="";this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:i=>{if(i.keyCode===o.SPACE){i.preventDefault()}},onKeyUp:i=>n(i,this.toggleComboBox),role:"button",tabindex:0},e("p",{class:"body-3"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",class:this.size}))}renderContent(){if(!this.isopen){return}return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),this.hascheckall&&this.renderCheckAll(),this.renderItems())}renderItems(){if(!this.isopen){return}return e("div",{class:this.searchValue&&"search",tabindex:-1},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderItem(i,t,o){return e("z-myz-list-item",{id:i.id,listitemid:i.id,action:`combo-li-${this.inputid}`,underlined:t!==o-1,class:this.size},e("z-input",{type:s.CHECKBOX,checked:i.checked,htmlid:`combo-checkbox-${this.inputid}-${i.id}`,label:i.name,disabled:!i.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter,size:this.size===r.X_SMALL?r.SMALL:this.size}))}renderList(i){if(!i){return}if(!i.length&&this.searchValue){return this.renderNoSearchResults()}if(this.hasgroupitems){return this.renderGroups(this.itemsList)}return e("ul",null,i.map(((t,e)=>this.renderItem(t,e,i.length))))}renderGroups(i){const t=i.reduce(((t,e,s)=>{var r;const{category:o}=e;const a=this.renderItem(e,s,i.length);t[o]=(r=t[o])!==null&&r!==void 0?r:[];t[o].push(a);return t}),{});const s=Object.entries(t).map((([i,t])=>e("z-list-group",{"divider-type":a.ELEMENT},e("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},i),t.map((i=>i)))));return e("ul",null,s)}renderNoSearchResults(){return e("ul",null,e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle",class:this.size}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:i=>n(i,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}renderSearchInput(){if(!this.isopen){return}return e("z-input",{htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:false,size:this.size,onInputChange:i=>{if(i.detail.keycode===27){return this.closeFilterItems()}this.searchValue=i.detail.value}})}renderCheckAll(){if(this.searchValue){return}const i=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:s.CHECKBOX,checked:i,htmlid:`combo-checkbox-${this.inputid}-check-all`,label:i?this.uncheckalltext:this.checkalltext,disabled:this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length,size:this.size===r.X_SMALL?r.SMALL:this.size}))}render(){return e("div",{key:"60fd65ff74672014003f4f0bfe8187a3b9688e72","data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}static get watchers(){return{items:["watchItems"],searchValue:["watchSearchValue"]}}};l.style=d;export{l as z_combobox};
2
+ //# sourceMappingURL=p-9b52dea5.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stylesCss","ZComboboxStyle0","ZCombobox","watchItems","this","itemsList","items","JSON","parse","selectedCounter","filter","item","checked","length","updateRenderItemsList","watchSearchValue","filterItems","searchValue","inputCheckListener","e","id","detail","replace","inputid","maxcheckableitems","checkAll","map","emitComboboxChange","comboboxChange","emit","constructor","hostRef","inputType","InputType","TEXT","ControlSize","BIG","toggleComboBox","bind","closeFilterItems","componentWillLoad","componentWillRender","resetRenderItemsList","renderItemsList","forEach","push","Object","assign","value","start","name","toUpperCase","indexOf","end","newName","substring","bold","isopen","renderHeader","h","class","onClick","onKeyDown","ev","keyCode","KeyboardKeyCode","SPACE","preventDefault","onKeyUp","handleKeyboardSubmit","role","tabindex","label","size","renderContent","hassearch","renderSearchInput","hascheckall","renderCheckAll","renderItems","renderList","renderCloseButton","renderItem","index","listitemid","action","underlined","type","CHECKBOX","htmlid","disabled","X_SMALL","SMALL","renderNoSearchResults","hasgroupitems","renderGroups","i","newData","reduce","group","category","zListItem","_a","listGroups","entries","key","ListDividerType","ELEMENT","slot","text","noresultslabel","icon","closesearchtext","searchlabel","placeholder","searchplaceholder","htmltitle","searchtitle","message","onInputChange","keycode","allChecked","uncheckalltext","checkalltext","render","open","fixed","isfixed"],"sources":["src/components/inputs/z-combobox/styles.css?tag=z-combobox&encapsulation=shadow","src/components/inputs/z-combobox/index.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n:host > div.fixed {\n position: relative;\n}\n\n:host > div > .header {\n position: relative;\n z-index: 10;\n display: flex;\n min-height: 42px;\n align-items: center;\n justify-content: space-between;\n padding: 0 calc(var(--space-unit) * 1.5);\n border: var(--border-size-small) solid var(--color-surface04);\n margin: 0;\n background-color: var(--color-input-field01);\n border-radius: var(--border-radius-small);\n cursor: pointer;\n}\n\n:host([size=\"small\"]) > div > .header {\n min-height: 34px;\n font-size: var(--font-size-2);\n}\n\n:host([size=\"x-small\"]) > div > .header {\n min-height: 30px;\n font-size: var(--font-size-2);\n}\n\n:host([size=\"x-small\"]) > div > .header p.body-3 {\n padding: calc(var(--space-unit) * 0.5) 0;\n}\n\n:host > div > .header:hover {\n outline: var(--border-size-medium) solid var(--color-surface04);\n outline-offset: -2px;\n}\n\n:host > div.open > div.header:focus:focus-visible {\n box-shadow: none;\n}\n\n:host > div > div.header:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host > div > .header > p.body-3 {\n padding: var(--space-unit) 0;\n margin: 0;\n color: var(--color-text01);\n}\n\n:host > div > .header > p.body-3 > span {\n font-weight: var(--font-sb);\n}\n\n:host > div > .header > z-icon {\n fill: var(--color-icon02);\n transform: rotate(360deg);\n transition: all 200ms linear;\n}\n\n:host > div > .header > z-icon.small,\n:host > div > .header > z-icon.x-small {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host > div.open > .header {\n border: var(--border-size-small) solid var(--color-primary01);\n border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;\n}\n\n:host > div.disabled {\n pointer-events: none;\n}\n\n:host > div.disabled .header {\n border-color: var(--color-disabled01);\n fill: var(--color-disabled01);\n}\n\n:host > div.disabled .header > p.body-3 {\n color: var(--color-disabled02);\n}\n\n:host > div.disabled .header > z-icon:last-child {\n fill: var(--color-disabled01);\n}\n\n:host > div.open > .header > z-icon {\n fill: var(--color-icon02);\n transform: rotate(180deg);\n transition: all 200ms linear;\n}\n\n:host > div.open > div.open-combo-data {\n position: relative;\n z-index: 12;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n border: var(--border-size-small) solid var(--gray200);\n border-top: 0;\n background-color: var(--color-input-field01);\n border-radius: 0;\n}\n\n:host > div.open > div.open-combo-data > div {\n overflow: auto;\n max-height: 235px;\n padding: 0;\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n:host > div.open > div.open-combo-data > z-input {\n width: 100%;\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > div.open > div.open-combo-data > div > ul {\n max-height: 235px;\n padding: 0 3px; /* needed for checkbox focus shadow */\n margin: 0;\n}\n\n::-webkit-scrollbar {\n width: 10px;\n background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);\n border-radius: var(--border-radius);\n}\n\n::-webkit-scrollbar-thumb {\n width: 10px;\n background-color: var(--color-primary01);\n}\n\n:host > div.open > z-input {\n position: relative;\n z-index: 1;\n width: 238px;\n margin: 0 calc(var(--space-unit) * 2);\n color: var(--color-primary01);\n}\n\n:host > div.open > div.open-combo-data > div.search {\n overflow: hidden;\n max-height: auto;\n margin-top: 0;\n box-shadow: 1px 1px 4px 2px rgb(217 222 227 / 50%);\n}\n\n:host > div.open > div.open-combo-data > div.search > ul {\n overflow: auto;\n max-height: 180px;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n:host > div.open > div.open-combo-data > div.search > div {\n display: flex;\n justify-content: center;\n}\n\n:host > div.open > div.open-combo-data > div.search > div > a {\n display: inline-block;\n height: 44px;\n color: var(--color-primary01);\n cursor: pointer;\n font-family: var(--font-family-sans);\n font-size: 14px;\n font-weight: var(--font-sb);\n line-height: 44px;\n text-align: center;\n text-transform: uppercase;\n}\n\n:host > div.open > div.open-combo-data > div.check-all-wrapper {\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);\n border-bottom: var(--border-size-small) solid var(--gray800);\n margin-bottom: var(--space-unit);\n text-align: left;\n}\n\n:host([size=\"small\"]) > div.open > div.open-combo-data > div.check-all-wrapper {\n padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);\n}\n\n:host([size=\"x-small\"]) > div.open > div.open-combo-data > div.check-all-wrapper {\n padding: var(--space-unit) calc(var(--space-unit) * 0.5);\n}\n","import {Component, Prop, h, State, Listen, Watch, Event, EventEmitter} from \"@stencil/core\";\nimport {ComboItem, InputType, KeyboardKeyCode, ListDividerType, ControlSize} from \"../../../beans\";\nimport {ZInput} from \"../z-input\";\nimport {handleKeyboardSubmit} from \"../../../utils/utils\";\nimport {ZMyzListItem} from \"../../../snowflakes/myz/list/z-myz-list-item\";\n\n@Component({\n tag: \"z-combobox\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZCombobox {\n /** input unique id */\n @Prop()\n inputid: string;\n\n /** list items array */\n @Prop()\n items: ComboItem[] | string;\n\n /** label text */\n @Prop()\n label: string;\n\n /** the combobox is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** show search input flag (optional) */\n @Prop()\n hassearch?: boolean = false;\n\n /** search input label text (optional) */\n @Prop()\n searchlabel?: string;\n\n /** search input placeholder text (optional) */\n @Prop()\n searchplaceholder?: string;\n\n /** search input title text (optional) */\n @Prop()\n searchtitle?: string;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** toggle combo list opening flag */\n @Prop({mutable: true})\n isopen = false;\n\n /** fixed style flag */\n @Prop()\n isfixed = false;\n\n /** close combobox list text */\n @Prop()\n closesearchtext?: string = \"Chiudi\";\n\n /** show \"check all\" checkbox (optional) */\n @Prop()\n hascheckall?: boolean = false;\n\n /** check all label (optional) */\n @Prop()\n checkalltext?: string = \"Seleziona tutti\";\n\n /** uncheck all label (optional) */\n @Prop()\n uncheckalltext?: string = \"Deseleziona tutti\";\n\n /** max number of checkable items (0 = unlimited) */\n @Prop()\n maxcheckableitems = 0;\n\n /** group items by category */\n @Prop()\n hasgroupitems?: boolean;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n searchValue: string;\n\n @State()\n selectedCounter: number;\n\n @State()\n renderItemsList: ComboItem[] = []; // used for render only\n\n private itemsList: ComboItem[] = [];\n\n private inputType: InputType = InputType.TEXT;\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n this.updateRenderItemsList();\n }\n\n @Watch(\"searchValue\")\n watchSearchValue(): void {\n this.filterItems(this.searchValue);\n }\n\n @Listen(\"inputCheck\")\n inputCheckListener(e: CustomEvent): void {\n const id = e.detail.id.replace(`combo-checkbox-${this.inputid}-`, \"\");\n\n if (id === \"check-all\" && (!this.maxcheckableitems || this.maxcheckableitems >= this.itemsList.length)) {\n return this.checkAll(e.detail.checked);\n }\n\n this.itemsList = this.itemsList.map((item: ComboItem) => {\n if (item.id === id) {\n item.checked = e.detail.checked;\n }\n\n return item;\n });\n this.updateRenderItemsList();\n this.emitComboboxChange();\n }\n\n /** Emitted when value is checked/unchecked. Returns id, items. */\n @Event()\n comboboxChange: EventEmitter;\n\n private emitComboboxChange(): void {\n this.comboboxChange.emit({id: this.inputid, items: this.itemsList});\n }\n\n constructor() {\n this.toggleComboBox = this.toggleComboBox.bind(this);\n this.closeFilterItems = this.closeFilterItems.bind(this);\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n }\n\n private updateRenderItemsList(): void {\n if (this.searchValue) {\n this.filterItems(this.searchValue);\n } else {\n this.resetRenderItemsList();\n }\n }\n\n private resetRenderItemsList(): void {\n const renderItemsList = [];\n this.itemsList.forEach((item: ComboItem) => {\n renderItemsList.push({...item});\n });\n this.renderItemsList = renderItemsList;\n }\n\n private filterItems(value: string): void {\n if (!value) {\n return this.closeFilterItems();\n }\n\n this.resetRenderItemsList();\n this.renderItemsList = this.renderItemsList.filter((item) => {\n const start = item.name.toUpperCase().indexOf(value.toUpperCase());\n const end = start + value.length;\n const newName =\n item.name.substring(0, start) +\n item.name.substring(start, end).bold() +\n item.name.substring(end, item.name.length);\n\n item.name = newName;\n\n return start >= 0;\n });\n }\n\n private checkAll(checked = true): void {\n this.itemsList = this.itemsList.map((item: ComboItem) => ({\n ...item,\n checked: checked,\n }));\n this.resetRenderItemsList();\n this.emitComboboxChange();\n }\n\n private closeFilterItems(): void {\n this.searchValue = \"\";\n this.resetRenderItemsList();\n }\n\n private toggleComboBox(): void {\n this.isopen = !this.isopen;\n }\n\n private renderHeader(): HTMLDivElement {\n return (\n <div\n class=\"header\"\n onClick={() => this.toggleComboBox()}\n onKeyDown={(ev: KeyboardEvent) => {\n if (ev.keyCode === KeyboardKeyCode.SPACE) {\n ev.preventDefault();\n }\n }}\n onKeyUp={(ev: KeyboardEvent) => handleKeyboardSubmit(ev, this.toggleComboBox)}\n role=\"button\"\n tabindex={0}\n >\n <p class=\"body-3\">\n {this.label}\n <span>{this.selectedCounter > 0 && ` (${this.selectedCounter})`}</span>\n </p>\n <z-icon\n name=\"caret-down\"\n class={this.size}\n />\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n if (!this.isopen) {\n return;\n }\n\n return (\n <div class=\"open-combo-data\">\n {this.hassearch && this.renderSearchInput()}\n {this.hascheckall && this.renderCheckAll()}\n {this.renderItems()}\n </div>\n );\n }\n\n private renderItems(): HTMLDivElement {\n if (!this.isopen) {\n return;\n }\n\n return (\n <div\n class={this.searchValue && \"search\"}\n tabindex={-1}\n >\n {this.renderList(this.renderItemsList)}\n {this.searchValue && this.renderCloseButton()}\n </div>\n );\n }\n\n private renderItem(item: ComboItem, index: number, length: number): ZMyzListItem {\n return (\n <z-myz-list-item\n id={item.id}\n listitemid={item.id}\n action={`combo-li-${this.inputid}`}\n underlined={index !== length - 1}\n class={this.size}\n >\n <z-input\n type={InputType.CHECKBOX}\n checked={item.checked}\n htmlid={`combo-checkbox-${this.inputid}-${item.id}`}\n label={item.name}\n disabled={!item.checked && this.maxcheckableitems && this.maxcheckableitems === this.selectedCounter}\n size={this.size === ControlSize.X_SMALL ? ControlSize.SMALL : this.size}\n />\n </z-myz-list-item>\n );\n }\n\n private renderList(items: ComboItem[]): HTMLUListElement {\n if (!items) {\n return;\n }\n if (!items.length && this.searchValue) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasgroupitems) {\n return this.renderGroups(this.itemsList);\n }\n\n return (\n <ul>\n {items.map((item, i) => {\n return this.renderItem(item, i, items.length);\n })}\n </ul>\n );\n }\n\n private renderGroups(items: ComboItem[]): HTMLUListElement {\n const newData = items.reduce((group, item, index) => {\n const {category} = item;\n const zListItem = this.renderItem(item, index, items.length);\n\n group[category] = group[category] ?? [];\n group[category].push(zListItem);\n\n return group;\n }, {});\n\n const listGroups = Object.entries(newData as {[key: string]: HTMLZListElementElement[]}).map(([key, value]) => {\n return (\n <z-list-group divider-type={ListDividerType.ELEMENT}>\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n >\n {key}\n </span>\n {value.map((item) => item)}\n </z-list-group>\n );\n });\n\n return <ul>{listGroups}</ul>;\n }\n\n private renderNoSearchResults(): HTMLUListElement {\n return (\n <ul>\n <z-myz-list-item\n id=\"no-results\"\n text={this.noresultslabel}\n listitemid=\"no-results\"\n icon=\"multiply-circle\"\n class={this.size}\n />\n </ul>\n );\n }\n\n private renderCloseButton(): HTMLDivElement {\n return (\n <div>\n <a\n onClick={() => this.closeFilterItems()}\n onKeyUp={(e: KeyboardEvent) => handleKeyboardSubmit(e, this.closeFilterItems)}\n role=\"button\"\n tabindex={0}\n >\n {this.closesearchtext}\n </a>\n </div>\n );\n }\n\n private renderSearchInput(): ZInput {\n if (!this.isopen) {\n return;\n }\n\n return (\n <z-input\n htmlid={`${this.inputid}_search`}\n label={this.searchlabel}\n placeholder={this.searchplaceholder}\n htmltitle={this.searchtitle}\n type={this.inputType}\n value={this.searchValue}\n message={false}\n size={this.size}\n onInputChange={(e: CustomEvent) => {\n if (e.detail.keycode === 27) {\n return this.closeFilterItems();\n }\n this.searchValue = e.detail.value;\n }}\n />\n );\n }\n\n private renderCheckAll(): HTMLDivElement {\n if (this.searchValue) {\n return;\n }\n\n const allChecked = this.selectedCounter === this.itemsList.length;\n\n return (\n <div class=\"check-all-wrapper\">\n <z-input\n type={InputType.CHECKBOX}\n checked={allChecked}\n htmlid={`combo-checkbox-${this.inputid}-check-all`}\n label={allChecked ? this.uncheckalltext : this.checkalltext}\n disabled={this.maxcheckableitems && this.maxcheckableitems < this.itemsList.length}\n size={this.size === ControlSize.X_SMALL ? ControlSize.SMALL : this.size}\n />\n </div>\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div\n data-action={`combo-${this.inputid}`}\n class={{open: this.isopen, fixed: this.isfixed, disabled: this.disabled}}\n id={this.inputid}\n >\n {this.renderHeader()}\n {!this.disabled && this.renderContent()}\n </div>\n );\n }\n}\n"],"mappings":"uKAAA,MAAMA,EAAY,6zHAClB,MAAAC,EAAeD,E,MCUFE,EAAS,MAuFpB,UAAAC,GACEC,KAAKC,iBAAmBD,KAAKE,QAAU,SAAWC,KAAKC,MAAMJ,KAAKE,OAASF,KAAKE,MAChFF,KAAKK,gBAAkBL,KAAKC,UAAUK,QAAQC,GAASA,EAAKC,UAASC,OACrET,KAAKU,uB,CAIP,gBAAAC,GACEX,KAAKY,YAAYZ,KAAKa,Y,CAIxB,kBAAAC,CAAmBC,GACjB,MAAMC,EAAKD,EAAEE,OAAOD,GAAGE,QAAQ,kBAAkBlB,KAAKmB,WAAY,IAElE,GAAIH,IAAO,eAAiBhB,KAAKoB,mBAAqBpB,KAAKoB,mBAAqBpB,KAAKC,UAAUQ,QAAS,CACtG,OAAOT,KAAKqB,SAASN,EAAEE,OAAOT,Q,CAGhCR,KAAKC,UAAYD,KAAKC,UAAUqB,KAAKf,IACnC,GAAIA,EAAKS,KAAOA,EAAI,CAClBT,EAAKC,QAAUO,EAAEE,OAAOT,O,CAG1B,OAAOD,CAAI,IAEbP,KAAKU,wBACLV,KAAKuB,oB,CAOC,kBAAAA,GACNvB,KAAKwB,eAAeC,KAAK,CAACT,GAAIhB,KAAKmB,QAASjB,MAAOF,KAAKC,W,CAG1D,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