@zanichelli/albe-web-components 18.1.0 → 18.1.1-rc2

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 (37) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/web-components-library.cjs.js +1 -1
  3. package/dist/cjs/z-file-upload.cjs.entry.js +3 -2
  4. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/file-upload/z-file-upload/index.js +5 -3
  6. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  7. package/dist/collection/utils/storybook-utils.js +35 -20
  8. package/dist/collection/utils/storybook-utils.js.map +1 -1
  9. package/dist/components/z-file-upload.js +4 -2
  10. package/dist/components/z-file-upload.js.map +1 -1
  11. package/dist/docs/themes/index.stories.js +58 -33
  12. package/dist/docs/themes/index.stories.js.map +1 -1
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/web-components-library.js +1 -1
  15. package/dist/esm/z-file-upload.entry.js +3 -2
  16. package/dist/esm/z-file-upload.entry.js.map +1 -1
  17. package/dist/types/components/file-upload/z-file-upload/index.d.ts +2 -1
  18. package/dist/types/utils/storybook-utils.d.ts +4 -9
  19. package/dist/web-components-library/p-2726182b.entry.js +2 -0
  20. package/dist/web-components-library/p-2726182b.entry.js.map +1 -0
  21. package/dist/web-components-library/web-components-library.css +47 -24
  22. package/dist/web-components-library/web-components-library.esm.js +1 -1
  23. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  24. package/package.json +1 -1
  25. package/www/build/p-2726182b.entry.js +2 -0
  26. package/www/build/p-2726182b.entry.js.map +1 -0
  27. package/www/build/{p-f4f746f6.css → p-4f4ec223.css} +47 -24
  28. package/www/build/p-8e38aa9e.js +2 -0
  29. package/www/build/web-components-library.css +47 -24
  30. package/www/build/web-components-library.esm.js +1 -1
  31. package/www/build/web-components-library.esm.js.map +1 -1
  32. package/www/index.html +1 -1
  33. package/dist/web-components-library/p-99a6c92f.entry.js +0 -2
  34. package/dist/web-components-library/p-99a6c92f.entry.js.map +0 -1
  35. package/www/build/p-99a6c92f.entry.js +0 -2
  36. package/www/build/p-99a6c92f.entry.js.map +0 -1
  37. package/www/build/p-f1ea92e3.js +0 -2
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy(JSON.parse("[[\"z-app-header_12.cjs\",[[1,\"z-app-header\",{\"stuck\":[516],\"enableOffcanvas\":[1540,\"enable-offcanvas\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"enableZLogo\":[516,\"enable-z-logo\"],\"drawerOpen\":[1028,\"drawer-open\"],\"_stuck\":[32],\"menuLength\":[32],\"isMobile\":[32],\"isTablet\":[32]},[[5,\"focusin\",\"manageMenus\"],[5,\"click\",\"manageMenus\"],[1,\"keydown\",\"handleKeydown\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckChange\"]}],[1,\"z-searchbar\",{\"htmlid\":[513],\"preventSubmit\":[4,\"prevent-submit\"],\"value\":[1],\"placeholder\":[1],\"autocomplete\":[4],\"autocompleteMinChars\":[2,\"autocomplete-min-chars\"],\"resultsCount\":[2,\"results-count\"],\"searchHelperLabel\":[1,\"search-helper-label\"],\"resultsItems\":[1,\"results-items\"],\"sortResultsItems\":[4,\"sort-results-items\"],\"showSearchButton\":[4,\"show-search-button\"],\"searchButtonIconOnly\":[4,\"search-button-icon-only\"],\"size\":[1],\"variant\":[1],\"searchString\":[32],\"currResultsCount\":[32],\"showResults\":[32],\"isMobile\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"resultsItems\":[\"watchItems\"],\"resultsCount\":[\"watchResultsCount\"],\"value\":[\"watchValue\"],\"searchString\":[\"watchSearchString\"],\"showResults\":[\"watchShowResults\"]}],[6,\"z-offcanvas\",{\"variant\":[513],\"open\":[1540],\"transitiondirection\":[513],\"skipLoadAnimation\":[4,\"skip-load-animation\"],\"skipAnimation\":[32]},[[2,\"click\",\"stopEvent\"],[2,\"focusin\",\"stopEvent\"]],{\"variant\":[\"handlePageOverflow\"],\"open\":[\"onOpenChanged\"]}],[6,\"z-tag\",{\"icon\":[1],\"expandable\":[4]}],[1,\"z-list\",{\"size\":[513],\"listType\":[513,\"list-type\"],\"role\":[513]}],[1,\"z-list-element\",{\"alignButton\":[513,\"align-button\"],\"clickable\":[516],\"dividerColor\":[1,\"divider-color\"],\"dividerType\":[1,\"divider-type\"],\"dividerSize\":[1,\"divider-size\"],\"expandable\":[516],\"expandableStyle\":[1,\"expandable-style\"],\"listElementId\":[514,\"list-element-id\"],\"size\":[513],\"color\":[513],\"disabled\":[516],\"listElementPosition\":[513,\"list-element-position\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"role\":[513],\"htmlTabindex\":[2,\"html-tabindex\"],\"showInnerContent\":[32]},[[4,\"accessibleFocus\",\"accessibleFocusHandler\"]]],[1,\"z-list-group\",{\"size\":[513],\"dividerType\":[513,\"divider-type\"],\"dividerSize\":[513,\"divider-size\"],\"dividerColor\":[513,\"divider-color\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"]}],[2,\"z-input\",{\"htmlid\":[1],\"type\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaControls\":[1,\"aria-controls\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"ariaActivedescendant\":[1,\"aria-activedescendant\"],\"value\":[1025],\"disabled\":[516],\"readonly\":[4],\"required\":[4],\"checked\":[1028],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"labelPosition\":[1,\"label-position\"],\"autocomplete\":[1],\"role\":[1],\"hasclearicon\":[4],\"icon\":[1],\"min\":[2],\"minlength\":[2],\"max\":[2],\"maxlength\":[2],\"step\":[2],\"pattern\":[1],\"size\":[513],\"isTyping\":[32],\"passwordHidden\":[32],\"isChecked\":[64]},[[4,\"inputCheck\",\"inputCheckListener\"]]],[2,\"z-divider\",{\"size\":[1],\"color\":[1],\"orientation\":[1]}],[1,\"z-input-message\",{\"message\":[1],\"status\":[513],\"disabled\":[516],\"statusRole\":[32]},null,{\"message\":[\"onMessageChange\"],\"status\":[\"onMessageChange\"]}],[6,\"z-button\",{\"ariaLabel\":[513,\"aria-label\"],\"role\":[1],\"htmlrole\":[1],\"href\":[1],\"target\":[1],\"htmlid\":[1],\"name\":[1],\"disabled\":[516],\"type\":[1],\"variant\":[513],\"icon\":[1],\"size\":[513]}],[1,\"z-icon\",{\"name\":[1],\"height\":[2],\"width\":[2],\"iconid\":[1],\"fill\":[1]}]]],[\"z-app-header-deprecated.cjs\",[[1,\"z-app-header-deprecated\",{\"stuck\":[516],\"hero\":[1],\"overlay\":[516],\"flow\":[513],\"drawerOpen\":[516,\"drawer-open\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"_stuck\":[32],\"currentViewport\":[32],\"menuLength\":[32]},[[9,\"resize\",\"evaluateViewport\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckMode\"]}]]],[\"z-select.cjs\",[[2,\"z-select\",{\"htmlid\":[1],\"items\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"autocomplete\":[4],\"noresultslabel\":[1],\"hasGroupItems\":[4,\"has-group-items\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"isfixed\":[4],\"resetItem\":[1,\"reset-item\"],\"size\":[1],\"isOpen\":[32],\"selectedItem\":[32],\"focusedItemId\":[32],\"searchString\":[32],\"flattenedList\":[32],\"getSelectedItem\":[64],\"getValue\":[64],\"setValue\":[64]},[[0,\"ariaDescendantFocus\",\"getFocusedItemHandler\"]],{\"items\":[\"watchItems\"]}]]],[\"z-breadcrumb.cjs\",[[1,\"z-breadcrumb\",{\"pathStyle\":[513,\"path-style\"],\"homepageVariant\":[1,\"homepage-variant\"],\"maxNodesToShow\":[2,\"max-nodes-to-show\"],\"preventFollowUrl\":[4,\"prevent-follow-url\"],\"overflowMenuItemRows\":[2,\"overflow-menu-item-rows\"],\"truncateChar\":[2,\"truncate-char\"],\"viewPortWidth\":[32],\"hasOverflow\":[32],\"popoverEllipsisOpen\":[32]},[[9,\"resize\",\"handleResize\"]],{\"maxNodesToShow\":[\"handlePropChange\"],\"viewPortWidth\":[\"handleResizeUp\"]}]]],[\"z-combobox.cjs\",[[1,\"z-combobox\",{\"inputid\":[1],\"items\":[1],\"label\":[1],\"disabled\":[516],\"hassearch\":[4],\"searchlabel\":[1],\"searchplaceholder\":[1],\"searchtitle\":[1],\"noresultslabel\":[1],\"isopen\":[1028],\"isfixed\":[4],\"closesearchtext\":[1],\"hascheckall\":[4],\"checkalltext\":[1],\"uncheckalltext\":[1],\"maxcheckableitems\":[2],\"hasgroupitems\":[4],\"size\":[1],\"searchValue\":[32],\"selectedCounter\":[32],\"renderItemsList\":[32],\"focusedItemId\":[32],\"checkboxes\":[32]},null,{\"items\":[\"watchItems\"],\"searchValue\":[\"watchSearchValue\"],\"checkboxes\":[\"watchCheckboxes\"]}]]],[\"z-myz-card-dictionary.cjs\",[[1,\"z-myz-card-dictionary\",{\"name\":[1],\"cover\":[1],\"disabled\":[4],\"flipped\":[1028],\"flipbuttonlabel\":[1],\"hideinfobtn\":[4]},[[0,\"flipCard\",\"handleFlipCard\"]]]]],[\"z-file-upload.cjs\",[[6,\"z-file-upload\",{\"type\":[513],\"buttonVariant\":[1,\"button-variant\"],\"acceptedFormat\":[1,\"accepted-format\"],\"fileMaxSize\":[2,\"file-max-size\"],\"mainTitle\":[1,\"main-title\"],\"description\":[1],\"uploadBtnLabel\":[1,\"upload-btn-label\"],\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"allowedFilesMessage\":[1,\"allowed-files-message\"],\"uploadClickableMessage\":[1,\"upload-clickable-message\"],\"uploadMessage\":[1,\"upload-message\"],\"errorModalTitle\":[1,\"error-modal-title\"],\"errorModalMessage\":[1,\"error-modal-message\"],\"uploadedFilesLabel\":[1,\"uploaded-files-label\"],\"hasFileSection\":[4,\"has-file-section\"],\"inputName\":[1,\"input-name\"],\"showErrors\":[4,\"show-errors\"],\"_type\":[32],\"files\":[32],\"invalidFiles\":[32],\"getFiles\":[64],\"removeFile\":[64]},[[0,\"removeFile\",\"onFileRemoved\"],[0,\"fileDropped\",\"fileDroppedListener\"]]]]],[\"z-pagination.cjs\",[[0,\"z-pagination\",{\"label\":[1],\"navArrows\":[4,\"nav-arrows\"],\"totalPages\":[2,\"total-pages\"],\"skip\":[2],\"edges\":[4],\"split\":[2],\"visiblePages\":[2,\"visible-pages\"],\"currentPage\":[1026,\"current-page\"],\"goToPage\":[4,\"go-to-page\"],\"_visiblePages\":[32],\"isMobile\":[32],\"goToPageValue\":[32]},[[9,\"resize\",\"onResize\"]],{\"_visiblePages\":[\"setPagesContainerWidth\"],\"visiblePages\":[\"setVisiblePages\"],\"currentPage\":[\"onPageChanged\"],\"split\":[\"onSplitChanged\"]}]]],[\"z-carousel.cjs\",[[1,\"z-carousel\",{\"isLoading\":[4,\"is-loading\"],\"label\":[1],\"single\":[516],\"arrowsPosition\":[513,\"arrows-position\"],\"progressMode\":[1,\"progress-mode\"],\"fixedArrows\":[516,\"fixed-arrows\"],\"ghostLoadingHeight\":[2,\"ghost-loading-height\"],\"infinite\":[4],\"current\":[32],\"items\":[32],\"highlightedIndicator\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},null,{\"current\":[\"onIndexChange\"],\"single\":[\"onSingleModeChange\"],\"infinite\":[\"onInfiniteModeChange\"]}]]],[\"z-date-picker.cjs\",[[4,\"z-date-picker\",{\"datePickerId\":[1,\"date-picker-id\"],\"ariaLabel\":[1,\"aria-label\"],\"label\":[1],\"mode\":[1],\"name\":[1],\"value\":[1],\"flatpickrPosition\":[32],\"inputError\":[32]},[[18,\"keydown\",\"handleKeyDown\"]],{\"mode\":[\"setupPickers\"]}]]],[\"z-file.cjs\",[[2,\"z-file\",{\"fileNumber\":[2,\"file-number\"],\"fileName\":[1,\"file-name\"],\"allowPopover\":[32],\"popoverVisible\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"interactiveIconClick\",\"onInteractiveIconClick\"]]]]],[\"z-range-picker.cjs\",[[0,\"z-range-picker\",{\"rangePickerId\":[1,\"range-picker-id\"],\"firstAriaLabel\":[1,\"first-aria-label\"],\"firstLabel\":[1,\"first-label\"],\"secondAriaLabel\":[1,\"second-aria-label\"],\"secondLabel\":[1,\"second-label\"],\"mode\":[1],\"firstPickerReadOnly\":[4,\"first-picker-read-only\"],\"lastPickerReadOnly\":[4,\"last-picker-read-only\"],\"firstPickerPlaceholder\":[1,\"first-picker-placeholder\"],\"lastPickerPlaceholder\":[1,\"last-picker-placeholder\"],\"flatpickrPosition\":[32],\"activeInput\":[32],\"firstInputError\":[32],\"lastInputError\":[32]},[[18,\"click\",\"handleClick\"],[18,\"keyup\",\"handleKeyDown\"]],{\"firstPickerReadOnly\":[\"setupFirstPickersReadOnly\"],\"lastPickerReadOnly\":[\"setupLastPickersReadOnly\"],\"mode\":[\"setupPickers\"]}]]],[\"z-td.cjs\",[[1,\"z-td\",{\"colspan\":[2],\"sticky\":[516],\"showMenu\":[513,\"show-menu\"],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-th.cjs\",[[1,\"z-th\",{\"colspan\":[2],\"showMenu\":[513,\"show-menu\"],\"showSorting\":[513,\"show-sorting\"],\"sticky\":[516],\"sortDirection\":[1025,\"sort-direction\"],\"sorted\":[1540],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-anchor-navigation.cjs\",[[4,\"z-anchor-navigation\",{\"hideUnselected\":[516,\"hide-unselected\"],\"autoCurrent\":[4,\"auto-current\"],\"collapsed\":[32]}]]],[\"z-book-card.cjs\",[[1,\"z-book-card\",{\"variant\":[513],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"year\":[1],\"ebookUrl\":[1,\"ebook-url\"],\"fallbackCover\":[1,\"fallback-cover\"],\"titleHtmlTag\":[1,\"title-html-tag\"]}]]],[\"z-book-card-app.cjs\",[[1,\"z-book-card-app\",{\"logo\":[1],\"name\":[1],\"link\":[1],\"laz\":[4],\"info\":[1]}]]],[\"z-myz-card-alert.cjs\",[[1,\"z-myz-card-alert\",{\"iconname\":[1],\"contenttext\":[1],\"actiontext\":[1],\"type\":[1]}]]],[\"z-myz-card-info.cjs\",[[1,\"z-myz-card-info\",{\"data\":[1],\"htmltabindex\":[2],\"hiddenContent\":[32],\"tooltip\":[32]}]]],[\"z-myz-list.cjs\",[[1,\"z-myz-list\",{\"inputrawdata\":[1],\"list\":[1040]},null,{\"inputrawdata\":[\"oninputrawdataChange\"]}]]],[\"z-otp.cjs\",[[1,\"z-otp\",{\"inputNum\":[2,\"input-num\"],\"status\":[1],\"message\":[1]}]]],[\"z-accordion.cjs\",[[1,\"z-accordion\",{\"label\":[1],\"icon\":[1],\"size\":[513],\"isDisabled\":[516,\"is-disabled\"],\"open\":[1540],\"highlight\":[516],\"variant\":[513],\"shadow\":[516]},null,{\"isDisabled\":[\"onDisabledChange\"]}]]],[\"z-book-card-deprecated.cjs\",[[1,\"z-book-card-deprecated\",{\"variant\":[1],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"ribbon\":[1],\"ribbonIcon\":[1,\"ribbon-icon\"],\"ribbonInteractive\":[4,\"ribbon-interactive\"],\"borderless\":[4],\"fallbackCover\":[1,\"fallback-cover\"],\"operaTitleTag\":[1,\"opera-title-tag\"],\"isMobile\":[32],\"hasResources\":[32],\"showResources\":[32]}]]],[\"z-button-sort.cjs\",[[1,\"z-button-sort\",{\"buttonid\":[1],\"label\":[1],\"desclabel\":[1],\"counter\":[2],\"sortlabelasc\":[1],\"sortlabeldesc\":[1],\"isselected\":[1028],\"sortasc\":[1028],\"allowTooltip\":[32]}]]],[\"z-card.cjs\",[[1,\"z-card\",{\"variant\":[513],\"coverIcon\":[1,\"cover-icon\"],\"showShadow\":[516,\"show-shadow\"],\"clickable\":[516],\"hasCoverImage\":[32]}]]],[\"z-info-box.cjs\",[[1,\"z-info-box\",{\"boxid\":[1],\"isclosable\":[4]}]]],[\"z-menu.cjs\",[[1,\"z-menu\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"htmlTabindex\":[2,\"html-tabindex\"],\"hasHeader\":[32],\"hasContent\":[32],\"setFocus\":[64],\"focusLastItem\":[64]},[[4,\"click\",\"onItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChanged\"],\"htmlTabindex\":[\"setLabelA11yAttrs\"]}]]],[\"z-menu-deprecated.cjs\",[[1,\"z-menu-deprecated\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"hasHeader\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]],{\"open\":[\"onOpenChanged\"]}]]],[\"z-menu-section.cjs\",[[1,\"z-menu-section\",{\"active\":[516],\"htmlTabindex\":[2,\"html-tabindex\"],\"open\":[1028],\"hasItems\":[32],\"items\":[32],\"focusLastItem\":[64],\"setFocus\":[64]},[[0,\"keydown\",\"onItemsKeydown\"]],{\"open\":[\"onOpenChange\"],\"htmlTabindex\":[\"onTabindexChange\"]}]]],[\"z-menu-section-deprecated.cjs\",[[1,\"z-menu-section-deprecated\",{\"active\":[516],\"open\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]]]]],[\"z-myz-card-icon.cjs\",[[1,\"z-myz-card-icon\",{\"icon\":[1],\"isdisabled\":[4],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-navigation-tabs.cjs\",[[4,\"z-navigation-tabs\",{\"ariaLabel\":[1,\"aria-label\"],\"orientation\":[513],\"size\":[513],\"selectedTab\":[1026,\"selected-tab\"],\"canNavigate\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},[[0,\"click\",\"handleTabClick\"],[0,\"focusin\",\"onTabFocusIn\"],[0,\"keydown\",\"navigateThroughTabs\"],[0,\"focusout\",\"onTabFocusOut\"]],{\"canNavigate\":[\"checkScrollEnabled\"],\"selectedTab\":[\"onTabSelected\"]}]]],[\"z-notification.cjs\",[[1,\"z-notification\",{\"contenticonname\":[1],\"actiontext\":[1],\"type\":[513],\"showclose\":[4],\"showshadow\":[516],\"sticky\":[516]}]]],[\"z-panel-elem.cjs\",[[6,\"z-panel-elem\",{\"elemid\":[1],\"imgurl\":[1],\"imgalt\":[1],\"linkicon\":[1],\"linklabel\":[1],\"url\":[1],\"target\":[1],\"isdisabled\":[4],\"descrSlotName\":[1,\"descr-slot-name\"]}]]],[\"z-section-title.cjs\",[[1,\"z-section-title\",{\"dividerPosition\":[1,\"divider-position\"],\"uppercase\":[516]}]]],[\"z-slideshow.cjs\",[[1,\"z-slideshow\",{\"slideshowid\":[1],\"data\":[1],\"device\":[32],\"currentSlide\":[32]},null,{\"data\":[\"watchData\"]}]]],[\"z-stepper-item.cjs\",[[1,\"z-stepper-item\",{\"index\":[2],\"href\":[1],\"pressed\":[4],\"checked\":[4],\"disabled\":[4]}]]],[\"z-toast-notification.cjs\",[[1,\"z-toast-notification\",{\"heading\":[1],\"message\":[1],\"closebutton\":[4],\"autoclose\":[2],\"pauseonfocusloss\":[4],\"type\":[1],\"isdraggable\":[4],\"draggablepercentage\":[2],\"transition\":[1],\"percentage\":[32]},null,{\"isdraggable\":[\"watchPropIsdraggable\"],\"autoclose\":[\"watchPropAutoclose\"],\"pauseonfocusloss\":[\"watchPropPauseonfocusloss\"]}]]],[\"z-toggle-button.cjs\",[[1,\"z-toggle-button\",{\"label\":[1],\"isdisabled\":[4],\"avoidclick\":[4],\"opened\":[1028],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-toggle-switch.cjs\",[[6,\"z-toggle-switch\",{\"disabled\":[516],\"labelPosition\":[513,\"label-position\"],\"checked\":[1028],\"htmlid\":[1]}]]],[\"z-tooltip.cjs\",[[1,\"z-tooltip\",{\"position\":[513],\"dark\":[516],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"closable\":[4]},[[0,\"openChange\",\"onPopoverOpenChange\"]]]]],[\"z-tr.cjs\",[[1,\"z-tr\",{\"expandable\":[516],\"expanded\":[32],\"expandableContentId\":[32]},[[0,\"colspanchange\",\"updateColumns\"]],{\"expandable\":[\"updateColumns\"]}]]],[\"z-aria-alert.cjs\",[[4,\"z-aria-alert\",{\"mode\":[1]}]]],[\"z-avatar.cjs\",[[1,\"z-avatar\",{\"size\":[1],\"text\":[1],\"textColor\":[1,\"text-color\"],\"backgroundColor\":[1,\"background-color\"],\"image\":[1025]}]]],[\"z-cover-hero.cjs\",[[1,\"z-cover-hero\",{\"variant\":[513],\"contentPosition\":[513,\"content-position\"],\"preserveAspectRatio\":[516,\"preserve-aspect-ratio\"]},[[2,\"load\",\"onImgLoad\"]]]]],[\"z-logo.cjs\",[[1,\"z-logo\",{\"width\":[2],\"height\":[2],\"imageAlt\":[1,\"image-alt\"],\"link\":[1],\"targetBlank\":[4,\"target-blank\"],\"mobileLogo\":[4,\"mobile-logo\"]}]]],[\"z-myz-card-footer.cjs\",[[1,\"z-myz-card-footer\",{\"titolo\":[1],\"autori\":[1],\"isbn\":[1],\"faded\":[4],\"cardtype\":[1],\"opened\":[4],\"customContent\":[4,\"custom-content\"],\"isOpen\":[32],\"allowTooltipAuthors\":[32]},[[0,\"toggleClick\",\"handleToggle\"]]]]],[\"z-myz-card-footer-sections.cjs\",[[1,\"z-myz-card-footer-sections\"]]],[\"z-myz-card-list.cjs\",[[1,\"z-myz-card-list\",{\"listdata\":[1]}]]],[\"z-skip-to-content.cjs\",[[2,\"z-skip-to-content\",{\"variant\":[513],\"links\":[1025],\"visible\":[32],\"visibleLink\":[32]},[[4,\"focusout\",\"handleFocusOutSkipToContent\"],[4,\"focusin\",\"handleFocusSkipToContent\"]]]]],[\"z-stepper.cjs\",[[1,\"z-stepper\"]]],[\"z-table.cjs\",[[1,\"z-table\",{\"bordered\":[516],\"expandable\":[32]}]]],[\"z-tbody.cjs\",[[1,\"z-tbody\"]]],[\"z-tfoot.cjs\",[[1,\"z-tfoot\",{\"sticky\":[516]}]]],[\"z-thead.cjs\",[[1,\"z-thead\",{\"sticky\":[516]}]]],[\"z-toast-notification-list.cjs\",[[1,\"z-toast-notification-list\",{\"position\":[513],\"newestontop\":[4]},null,{\"newestontop\":[\"watchPropNewestontop\"]}]]],[\"z-visually-hidden.cjs\",[[1,\"z-visually-hidden\"]]],[\"z-chip.cjs\",[[6,\"z-chip\",{\"icon\":[1],\"type\":[513],\"interactiveIcon\":[513,\"interactive-icon\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-info-reveal.cjs\",[[1,\"z-info-reveal\",{\"icon\":[1],\"position\":[513],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[513],\"open\":[32]},[[9,\"resize\",\"adjustPanelPosition\"],[10,\"keydown\",\"handleEscapeKey\"]],{\"position\":[\"adjustPanelPosition\"],\"open\":[\"adjustPanelPosition\"]}]]],[\"z-myz-list-item.cjs\",[[1,\"z-myz-list-item\",{\"text\":[1],\"link\":[1],\"linktarget\":[1],\"icon\":[1],\"listitemid\":[1],\"action\":[1],\"underlined\":[4]}]]],[\"z-alert.cjs\",[[1,\"z-alert\",{\"type\":[1]}]]],[\"z-ghost-loading.cjs\",[[1,\"z-ghost-loading\"]]],[\"z-dragdrop-area_2.cjs\",[[1,\"z-dragdrop-area\",{\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"dragging\":[32]}],[1,\"z-modal\",{\"modalid\":[1],\"modaltitle\":[1],\"modalsubtitle\":[1],\"closeButtonLabel\":[1,\"close-button-label\"],\"alertdialog\":[4],\"closable\":[4],\"scrollInside\":[4,\"scroll-inside\"],\"lockPageScroll\":[4,\"lock-page-scroll\"],\"open\":[64],\"close\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"z-myz-card_4.cjs\",[[1,\"z-myz-card\",{\"faded\":[4],\"cardtype\":[1],\"ispressed\":[4],\"ishighlighted\":[4]}],[1,\"z-myz-card-body\"],[1,\"z-myz-card-cover\",{\"img\":[1],\"titolo\":[1],\"faded\":[4],\"defaultimg\":[1]}],[1,\"z-myz-card-header\",{\"titolo\":[1],\"faded\":[4],\"cardtype\":[1],\"allowTooltip\":[32]}]]],[\"z-popover.cjs\",[[1,\"z-popover\",{\"position\":[513],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"showArrow\":[516,\"show-arrow\"],\"center\":[516],\"closable\":[4],\"currentPosition\":[32]},[[8,\"keyup\",\"closePopoverWithKeyboard\"],[18,\"click\",\"handleOutsideClick\"]],{\"position\":[\"validatePosition\"],\"open\":[\"onOpen\"]}]]]]"), options);
11
+ return index.bootstrapLazy(JSON.parse("[[\"z-app-header_12.cjs\",[[1,\"z-app-header\",{\"stuck\":[516],\"enableOffcanvas\":[1540,\"enable-offcanvas\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"enableZLogo\":[516,\"enable-z-logo\"],\"drawerOpen\":[1028,\"drawer-open\"],\"_stuck\":[32],\"menuLength\":[32],\"isMobile\":[32],\"isTablet\":[32]},[[5,\"focusin\",\"manageMenus\"],[5,\"click\",\"manageMenus\"],[1,\"keydown\",\"handleKeydown\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckChange\"]}],[1,\"z-searchbar\",{\"htmlid\":[513],\"preventSubmit\":[4,\"prevent-submit\"],\"value\":[1],\"placeholder\":[1],\"autocomplete\":[4],\"autocompleteMinChars\":[2,\"autocomplete-min-chars\"],\"resultsCount\":[2,\"results-count\"],\"searchHelperLabel\":[1,\"search-helper-label\"],\"resultsItems\":[1,\"results-items\"],\"sortResultsItems\":[4,\"sort-results-items\"],\"showSearchButton\":[4,\"show-search-button\"],\"searchButtonIconOnly\":[4,\"search-button-icon-only\"],\"size\":[1],\"variant\":[1],\"searchString\":[32],\"currResultsCount\":[32],\"showResults\":[32],\"isMobile\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"resultsItems\":[\"watchItems\"],\"resultsCount\":[\"watchResultsCount\"],\"value\":[\"watchValue\"],\"searchString\":[\"watchSearchString\"],\"showResults\":[\"watchShowResults\"]}],[6,\"z-offcanvas\",{\"variant\":[513],\"open\":[1540],\"transitiondirection\":[513],\"skipLoadAnimation\":[4,\"skip-load-animation\"],\"skipAnimation\":[32]},[[2,\"click\",\"stopEvent\"],[2,\"focusin\",\"stopEvent\"]],{\"variant\":[\"handlePageOverflow\"],\"open\":[\"onOpenChanged\"]}],[6,\"z-tag\",{\"icon\":[1],\"expandable\":[4]}],[1,\"z-list\",{\"size\":[513],\"listType\":[513,\"list-type\"],\"role\":[513]}],[1,\"z-list-element\",{\"alignButton\":[513,\"align-button\"],\"clickable\":[516],\"dividerColor\":[1,\"divider-color\"],\"dividerType\":[1,\"divider-type\"],\"dividerSize\":[1,\"divider-size\"],\"expandable\":[516],\"expandableStyle\":[1,\"expandable-style\"],\"listElementId\":[514,\"list-element-id\"],\"size\":[513],\"color\":[513],\"disabled\":[516],\"listElementPosition\":[513,\"list-element-position\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"role\":[513],\"htmlTabindex\":[2,\"html-tabindex\"],\"showInnerContent\":[32]},[[4,\"accessibleFocus\",\"accessibleFocusHandler\"]]],[1,\"z-list-group\",{\"size\":[513],\"dividerType\":[513,\"divider-type\"],\"dividerSize\":[513,\"divider-size\"],\"dividerColor\":[513,\"divider-color\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"]}],[2,\"z-input\",{\"htmlid\":[1],\"type\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaControls\":[1,\"aria-controls\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"ariaActivedescendant\":[1,\"aria-activedescendant\"],\"value\":[1025],\"disabled\":[516],\"readonly\":[4],\"required\":[4],\"checked\":[1028],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"labelPosition\":[1,\"label-position\"],\"autocomplete\":[1],\"role\":[1],\"hasclearicon\":[4],\"icon\":[1],\"min\":[2],\"minlength\":[2],\"max\":[2],\"maxlength\":[2],\"step\":[2],\"pattern\":[1],\"size\":[513],\"isTyping\":[32],\"passwordHidden\":[32],\"isChecked\":[64]},[[4,\"inputCheck\",\"inputCheckListener\"]]],[2,\"z-divider\",{\"size\":[1],\"color\":[1],\"orientation\":[1]}],[1,\"z-input-message\",{\"message\":[1],\"status\":[513],\"disabled\":[516],\"statusRole\":[32]},null,{\"message\":[\"onMessageChange\"],\"status\":[\"onMessageChange\"]}],[6,\"z-button\",{\"ariaLabel\":[513,\"aria-label\"],\"role\":[1],\"htmlrole\":[1],\"href\":[1],\"target\":[1],\"htmlid\":[1],\"name\":[1],\"disabled\":[516],\"type\":[1],\"variant\":[513],\"icon\":[1],\"size\":[513]}],[1,\"z-icon\",{\"name\":[1],\"height\":[2],\"width\":[2],\"iconid\":[1],\"fill\":[1]}]]],[\"z-app-header-deprecated.cjs\",[[1,\"z-app-header-deprecated\",{\"stuck\":[516],\"hero\":[1],\"overlay\":[516],\"flow\":[513],\"drawerOpen\":[516,\"drawer-open\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"_stuck\":[32],\"currentViewport\":[32],\"menuLength\":[32]},[[9,\"resize\",\"evaluateViewport\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckMode\"]}]]],[\"z-select.cjs\",[[2,\"z-select\",{\"htmlid\":[1],\"items\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"autocomplete\":[4],\"noresultslabel\":[1],\"hasGroupItems\":[4,\"has-group-items\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"isfixed\":[4],\"resetItem\":[1,\"reset-item\"],\"size\":[1],\"isOpen\":[32],\"selectedItem\":[32],\"focusedItemId\":[32],\"searchString\":[32],\"flattenedList\":[32],\"getSelectedItem\":[64],\"getValue\":[64],\"setValue\":[64]},[[0,\"ariaDescendantFocus\",\"getFocusedItemHandler\"]],{\"items\":[\"watchItems\"]}]]],[\"z-breadcrumb.cjs\",[[1,\"z-breadcrumb\",{\"pathStyle\":[513,\"path-style\"],\"homepageVariant\":[1,\"homepage-variant\"],\"maxNodesToShow\":[2,\"max-nodes-to-show\"],\"preventFollowUrl\":[4,\"prevent-follow-url\"],\"overflowMenuItemRows\":[2,\"overflow-menu-item-rows\"],\"truncateChar\":[2,\"truncate-char\"],\"viewPortWidth\":[32],\"hasOverflow\":[32],\"popoverEllipsisOpen\":[32]},[[9,\"resize\",\"handleResize\"]],{\"maxNodesToShow\":[\"handlePropChange\"],\"viewPortWidth\":[\"handleResizeUp\"]}]]],[\"z-combobox.cjs\",[[1,\"z-combobox\",{\"inputid\":[1],\"items\":[1],\"label\":[1],\"disabled\":[516],\"hassearch\":[4],\"searchlabel\":[1],\"searchplaceholder\":[1],\"searchtitle\":[1],\"noresultslabel\":[1],\"isopen\":[1028],\"isfixed\":[4],\"closesearchtext\":[1],\"hascheckall\":[4],\"checkalltext\":[1],\"uncheckalltext\":[1],\"maxcheckableitems\":[2],\"hasgroupitems\":[4],\"size\":[1],\"searchValue\":[32],\"selectedCounter\":[32],\"renderItemsList\":[32],\"focusedItemId\":[32],\"checkboxes\":[32]},null,{\"items\":[\"watchItems\"],\"searchValue\":[\"watchSearchValue\"],\"checkboxes\":[\"watchCheckboxes\"]}]]],[\"z-myz-card-dictionary.cjs\",[[1,\"z-myz-card-dictionary\",{\"name\":[1],\"cover\":[1],\"disabled\":[4],\"flipped\":[1028],\"flipbuttonlabel\":[1],\"hideinfobtn\":[4]},[[0,\"flipCard\",\"handleFlipCard\"]]]]],[\"z-file-upload.cjs\",[[6,\"z-file-upload\",{\"type\":[513],\"buttonVariant\":[1,\"button-variant\"],\"acceptedFormat\":[1,\"accepted-format\"],\"fileMaxSize\":[2,\"file-max-size\"],\"mainTitle\":[1,\"main-title\"],\"description\":[1],\"uploadBtnLabel\":[1,\"upload-btn-label\"],\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"allowedFilesMessage\":[1,\"allowed-files-message\"],\"uploadClickableMessage\":[1,\"upload-clickable-message\"],\"uploadMessage\":[1,\"upload-message\"],\"errorModalTitle\":[1,\"error-modal-title\"],\"errorModalMessage\":[1,\"error-modal-message\"],\"uploadedFilesLabel\":[1,\"uploaded-files-label\"],\"hasFileSection\":[4,\"has-file-section\"],\"inputName\":[1,\"input-name\"],\"showErrors\":[4,\"show-errors\"],\"_type\":[32],\"files\":[32],\"invalidFiles\":[32],\"input\":[32],\"getFiles\":[64],\"removeFile\":[64]},[[0,\"removeFile\",\"onFileRemoved\"],[0,\"fileDropped\",\"fileDroppedListener\"]]]]],[\"z-pagination.cjs\",[[0,\"z-pagination\",{\"label\":[1],\"navArrows\":[4,\"nav-arrows\"],\"totalPages\":[2,\"total-pages\"],\"skip\":[2],\"edges\":[4],\"split\":[2],\"visiblePages\":[2,\"visible-pages\"],\"currentPage\":[1026,\"current-page\"],\"goToPage\":[4,\"go-to-page\"],\"_visiblePages\":[32],\"isMobile\":[32],\"goToPageValue\":[32]},[[9,\"resize\",\"onResize\"]],{\"_visiblePages\":[\"setPagesContainerWidth\"],\"visiblePages\":[\"setVisiblePages\"],\"currentPage\":[\"onPageChanged\"],\"split\":[\"onSplitChanged\"]}]]],[\"z-carousel.cjs\",[[1,\"z-carousel\",{\"isLoading\":[4,\"is-loading\"],\"label\":[1],\"single\":[516],\"arrowsPosition\":[513,\"arrows-position\"],\"progressMode\":[1,\"progress-mode\"],\"fixedArrows\":[516,\"fixed-arrows\"],\"ghostLoadingHeight\":[2,\"ghost-loading-height\"],\"infinite\":[4],\"current\":[32],\"items\":[32],\"highlightedIndicator\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},null,{\"current\":[\"onIndexChange\"],\"single\":[\"onSingleModeChange\"],\"infinite\":[\"onInfiniteModeChange\"]}]]],[\"z-date-picker.cjs\",[[4,\"z-date-picker\",{\"datePickerId\":[1,\"date-picker-id\"],\"ariaLabel\":[1,\"aria-label\"],\"label\":[1],\"mode\":[1],\"name\":[1],\"value\":[1],\"flatpickrPosition\":[32],\"inputError\":[32]},[[18,\"keydown\",\"handleKeyDown\"]],{\"mode\":[\"setupPickers\"]}]]],[\"z-file.cjs\",[[2,\"z-file\",{\"fileNumber\":[2,\"file-number\"],\"fileName\":[1,\"file-name\"],\"allowPopover\":[32],\"popoverVisible\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"interactiveIconClick\",\"onInteractiveIconClick\"]]]]],[\"z-range-picker.cjs\",[[0,\"z-range-picker\",{\"rangePickerId\":[1,\"range-picker-id\"],\"firstAriaLabel\":[1,\"first-aria-label\"],\"firstLabel\":[1,\"first-label\"],\"secondAriaLabel\":[1,\"second-aria-label\"],\"secondLabel\":[1,\"second-label\"],\"mode\":[1],\"firstPickerReadOnly\":[4,\"first-picker-read-only\"],\"lastPickerReadOnly\":[4,\"last-picker-read-only\"],\"firstPickerPlaceholder\":[1,\"first-picker-placeholder\"],\"lastPickerPlaceholder\":[1,\"last-picker-placeholder\"],\"flatpickrPosition\":[32],\"activeInput\":[32],\"firstInputError\":[32],\"lastInputError\":[32]},[[18,\"click\",\"handleClick\"],[18,\"keyup\",\"handleKeyDown\"]],{\"firstPickerReadOnly\":[\"setupFirstPickersReadOnly\"],\"lastPickerReadOnly\":[\"setupLastPickersReadOnly\"],\"mode\":[\"setupPickers\"]}]]],[\"z-td.cjs\",[[1,\"z-td\",{\"colspan\":[2],\"sticky\":[516],\"showMenu\":[513,\"show-menu\"],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-th.cjs\",[[1,\"z-th\",{\"colspan\":[2],\"showMenu\":[513,\"show-menu\"],\"showSorting\":[513,\"show-sorting\"],\"sticky\":[516],\"sortDirection\":[1025,\"sort-direction\"],\"sorted\":[1540],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-anchor-navigation.cjs\",[[4,\"z-anchor-navigation\",{\"hideUnselected\":[516,\"hide-unselected\"],\"autoCurrent\":[4,\"auto-current\"],\"collapsed\":[32]}]]],[\"z-book-card.cjs\",[[1,\"z-book-card\",{\"variant\":[513],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"year\":[1],\"ebookUrl\":[1,\"ebook-url\"],\"fallbackCover\":[1,\"fallback-cover\"],\"titleHtmlTag\":[1,\"title-html-tag\"]}]]],[\"z-book-card-app.cjs\",[[1,\"z-book-card-app\",{\"logo\":[1],\"name\":[1],\"link\":[1],\"laz\":[4],\"info\":[1]}]]],[\"z-myz-card-alert.cjs\",[[1,\"z-myz-card-alert\",{\"iconname\":[1],\"contenttext\":[1],\"actiontext\":[1],\"type\":[1]}]]],[\"z-myz-card-info.cjs\",[[1,\"z-myz-card-info\",{\"data\":[1],\"htmltabindex\":[2],\"hiddenContent\":[32],\"tooltip\":[32]}]]],[\"z-myz-list.cjs\",[[1,\"z-myz-list\",{\"inputrawdata\":[1],\"list\":[1040]},null,{\"inputrawdata\":[\"oninputrawdataChange\"]}]]],[\"z-otp.cjs\",[[1,\"z-otp\",{\"inputNum\":[2,\"input-num\"],\"status\":[1],\"message\":[1]}]]],[\"z-accordion.cjs\",[[1,\"z-accordion\",{\"label\":[1],\"icon\":[1],\"size\":[513],\"isDisabled\":[516,\"is-disabled\"],\"open\":[1540],\"highlight\":[516],\"variant\":[513],\"shadow\":[516]},null,{\"isDisabled\":[\"onDisabledChange\"]}]]],[\"z-book-card-deprecated.cjs\",[[1,\"z-book-card-deprecated\",{\"variant\":[1],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"ribbon\":[1],\"ribbonIcon\":[1,\"ribbon-icon\"],\"ribbonInteractive\":[4,\"ribbon-interactive\"],\"borderless\":[4],\"fallbackCover\":[1,\"fallback-cover\"],\"operaTitleTag\":[1,\"opera-title-tag\"],\"isMobile\":[32],\"hasResources\":[32],\"showResources\":[32]}]]],[\"z-button-sort.cjs\",[[1,\"z-button-sort\",{\"buttonid\":[1],\"label\":[1],\"desclabel\":[1],\"counter\":[2],\"sortlabelasc\":[1],\"sortlabeldesc\":[1],\"isselected\":[1028],\"sortasc\":[1028],\"allowTooltip\":[32]}]]],[\"z-card.cjs\",[[1,\"z-card\",{\"variant\":[513],\"coverIcon\":[1,\"cover-icon\"],\"showShadow\":[516,\"show-shadow\"],\"clickable\":[516],\"hasCoverImage\":[32]}]]],[\"z-info-box.cjs\",[[1,\"z-info-box\",{\"boxid\":[1],\"isclosable\":[4]}]]],[\"z-menu.cjs\",[[1,\"z-menu\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"htmlTabindex\":[2,\"html-tabindex\"],\"hasHeader\":[32],\"hasContent\":[32],\"setFocus\":[64],\"focusLastItem\":[64]},[[4,\"click\",\"onItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChanged\"],\"htmlTabindex\":[\"setLabelA11yAttrs\"]}]]],[\"z-menu-deprecated.cjs\",[[1,\"z-menu-deprecated\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"hasHeader\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]],{\"open\":[\"onOpenChanged\"]}]]],[\"z-menu-section.cjs\",[[1,\"z-menu-section\",{\"active\":[516],\"htmlTabindex\":[2,\"html-tabindex\"],\"open\":[1028],\"hasItems\":[32],\"items\":[32],\"focusLastItem\":[64],\"setFocus\":[64]},[[0,\"keydown\",\"onItemsKeydown\"]],{\"open\":[\"onOpenChange\"],\"htmlTabindex\":[\"onTabindexChange\"]}]]],[\"z-menu-section-deprecated.cjs\",[[1,\"z-menu-section-deprecated\",{\"active\":[516],\"open\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]]]]],[\"z-myz-card-icon.cjs\",[[1,\"z-myz-card-icon\",{\"icon\":[1],\"isdisabled\":[4],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-navigation-tabs.cjs\",[[4,\"z-navigation-tabs\",{\"ariaLabel\":[1,\"aria-label\"],\"orientation\":[513],\"size\":[513],\"selectedTab\":[1026,\"selected-tab\"],\"canNavigate\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},[[0,\"click\",\"handleTabClick\"],[0,\"focusin\",\"onTabFocusIn\"],[0,\"keydown\",\"navigateThroughTabs\"],[0,\"focusout\",\"onTabFocusOut\"]],{\"canNavigate\":[\"checkScrollEnabled\"],\"selectedTab\":[\"onTabSelected\"]}]]],[\"z-notification.cjs\",[[1,\"z-notification\",{\"contenticonname\":[1],\"actiontext\":[1],\"type\":[513],\"showclose\":[4],\"showshadow\":[516],\"sticky\":[516]}]]],[\"z-panel-elem.cjs\",[[6,\"z-panel-elem\",{\"elemid\":[1],\"imgurl\":[1],\"imgalt\":[1],\"linkicon\":[1],\"linklabel\":[1],\"url\":[1],\"target\":[1],\"isdisabled\":[4],\"descrSlotName\":[1,\"descr-slot-name\"]}]]],[\"z-section-title.cjs\",[[1,\"z-section-title\",{\"dividerPosition\":[1,\"divider-position\"],\"uppercase\":[516]}]]],[\"z-slideshow.cjs\",[[1,\"z-slideshow\",{\"slideshowid\":[1],\"data\":[1],\"device\":[32],\"currentSlide\":[32]},null,{\"data\":[\"watchData\"]}]]],[\"z-stepper-item.cjs\",[[1,\"z-stepper-item\",{\"index\":[2],\"href\":[1],\"pressed\":[4],\"checked\":[4],\"disabled\":[4]}]]],[\"z-toast-notification.cjs\",[[1,\"z-toast-notification\",{\"heading\":[1],\"message\":[1],\"closebutton\":[4],\"autoclose\":[2],\"pauseonfocusloss\":[4],\"type\":[1],\"isdraggable\":[4],\"draggablepercentage\":[2],\"transition\":[1],\"percentage\":[32]},null,{\"isdraggable\":[\"watchPropIsdraggable\"],\"autoclose\":[\"watchPropAutoclose\"],\"pauseonfocusloss\":[\"watchPropPauseonfocusloss\"]}]]],[\"z-toggle-button.cjs\",[[1,\"z-toggle-button\",{\"label\":[1],\"isdisabled\":[4],\"avoidclick\":[4],\"opened\":[1028],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-toggle-switch.cjs\",[[6,\"z-toggle-switch\",{\"disabled\":[516],\"labelPosition\":[513,\"label-position\"],\"checked\":[1028],\"htmlid\":[1]}]]],[\"z-tooltip.cjs\",[[1,\"z-tooltip\",{\"position\":[513],\"dark\":[516],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"closable\":[4]},[[0,\"openChange\",\"onPopoverOpenChange\"]]]]],[\"z-tr.cjs\",[[1,\"z-tr\",{\"expandable\":[516],\"expanded\":[32],\"expandableContentId\":[32]},[[0,\"colspanchange\",\"updateColumns\"]],{\"expandable\":[\"updateColumns\"]}]]],[\"z-aria-alert.cjs\",[[4,\"z-aria-alert\",{\"mode\":[1]}]]],[\"z-avatar.cjs\",[[1,\"z-avatar\",{\"size\":[1],\"text\":[1],\"textColor\":[1,\"text-color\"],\"backgroundColor\":[1,\"background-color\"],\"image\":[1025]}]]],[\"z-cover-hero.cjs\",[[1,\"z-cover-hero\",{\"variant\":[513],\"contentPosition\":[513,\"content-position\"],\"preserveAspectRatio\":[516,\"preserve-aspect-ratio\"]},[[2,\"load\",\"onImgLoad\"]]]]],[\"z-logo.cjs\",[[1,\"z-logo\",{\"width\":[2],\"height\":[2],\"imageAlt\":[1,\"image-alt\"],\"link\":[1],\"targetBlank\":[4,\"target-blank\"],\"mobileLogo\":[4,\"mobile-logo\"]}]]],[\"z-myz-card-footer.cjs\",[[1,\"z-myz-card-footer\",{\"titolo\":[1],\"autori\":[1],\"isbn\":[1],\"faded\":[4],\"cardtype\":[1],\"opened\":[4],\"customContent\":[4,\"custom-content\"],\"isOpen\":[32],\"allowTooltipAuthors\":[32]},[[0,\"toggleClick\",\"handleToggle\"]]]]],[\"z-myz-card-footer-sections.cjs\",[[1,\"z-myz-card-footer-sections\"]]],[\"z-myz-card-list.cjs\",[[1,\"z-myz-card-list\",{\"listdata\":[1]}]]],[\"z-skip-to-content.cjs\",[[2,\"z-skip-to-content\",{\"variant\":[513],\"links\":[1025],\"visible\":[32],\"visibleLink\":[32]},[[4,\"focusout\",\"handleFocusOutSkipToContent\"],[4,\"focusin\",\"handleFocusSkipToContent\"]]]]],[\"z-stepper.cjs\",[[1,\"z-stepper\"]]],[\"z-table.cjs\",[[1,\"z-table\",{\"bordered\":[516],\"expandable\":[32]}]]],[\"z-tbody.cjs\",[[1,\"z-tbody\"]]],[\"z-tfoot.cjs\",[[1,\"z-tfoot\",{\"sticky\":[516]}]]],[\"z-thead.cjs\",[[1,\"z-thead\",{\"sticky\":[516]}]]],[\"z-toast-notification-list.cjs\",[[1,\"z-toast-notification-list\",{\"position\":[513],\"newestontop\":[4]},null,{\"newestontop\":[\"watchPropNewestontop\"]}]]],[\"z-visually-hidden.cjs\",[[1,\"z-visually-hidden\"]]],[\"z-chip.cjs\",[[6,\"z-chip\",{\"icon\":[1],\"type\":[513],\"interactiveIcon\":[513,\"interactive-icon\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-info-reveal.cjs\",[[1,\"z-info-reveal\",{\"icon\":[1],\"position\":[513],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[513],\"open\":[32]},[[9,\"resize\",\"adjustPanelPosition\"],[10,\"keydown\",\"handleEscapeKey\"]],{\"position\":[\"adjustPanelPosition\"],\"open\":[\"adjustPanelPosition\"]}]]],[\"z-myz-list-item.cjs\",[[1,\"z-myz-list-item\",{\"text\":[1],\"link\":[1],\"linktarget\":[1],\"icon\":[1],\"listitemid\":[1],\"action\":[1],\"underlined\":[4]}]]],[\"z-alert.cjs\",[[1,\"z-alert\",{\"type\":[1]}]]],[\"z-ghost-loading.cjs\",[[1,\"z-ghost-loading\"]]],[\"z-dragdrop-area_2.cjs\",[[1,\"z-dragdrop-area\",{\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"dragging\":[32]}],[1,\"z-modal\",{\"modalid\":[1],\"modaltitle\":[1],\"modalsubtitle\":[1],\"closeButtonLabel\":[1,\"close-button-label\"],\"alertdialog\":[4],\"closable\":[4],\"scrollInside\":[4,\"scroll-inside\"],\"lockPageScroll\":[4,\"lock-page-scroll\"],\"open\":[64],\"close\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"z-myz-card_4.cjs\",[[1,\"z-myz-card\",{\"faded\":[4],\"cardtype\":[1],\"ispressed\":[4],\"ishighlighted\":[4]}],[1,\"z-myz-card-body\"],[1,\"z-myz-card-cover\",{\"img\":[1],\"titolo\":[1],\"faded\":[4],\"defaultimg\":[1]}],[1,\"z-myz-card-header\",{\"titolo\":[1],\"faded\":[4],\"cardtype\":[1],\"allowTooltip\":[32]}]]],[\"z-popover.cjs\",[[1,\"z-popover\",{\"position\":[513],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"showArrow\":[516,\"show-arrow\"],\"center\":[516],\"closable\":[4],\"currentPosition\":[32]},[[8,\"keyup\",\"closePopoverWithKeyboard\"],[18,\"click\",\"handleOutsideClick\"]],{\"position\":[\"validatePosition\"],\"open\":[\"onOpen\"]}]]]]"), options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -40,7 +40,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
40
40
 
41
41
  patchBrowser().then(async (options) => {
42
42
  await appGlobals.globalScripts();
43
- return index.bootstrapLazy(JSON.parse("[[\"z-app-header_12.cjs\",[[1,\"z-app-header\",{\"stuck\":[516],\"enableOffcanvas\":[1540,\"enable-offcanvas\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"enableZLogo\":[516,\"enable-z-logo\"],\"drawerOpen\":[1028,\"drawer-open\"],\"_stuck\":[32],\"menuLength\":[32],\"isMobile\":[32],\"isTablet\":[32]},[[5,\"focusin\",\"manageMenus\"],[5,\"click\",\"manageMenus\"],[1,\"keydown\",\"handleKeydown\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckChange\"]}],[1,\"z-searchbar\",{\"htmlid\":[513],\"preventSubmit\":[4,\"prevent-submit\"],\"value\":[1],\"placeholder\":[1],\"autocomplete\":[4],\"autocompleteMinChars\":[2,\"autocomplete-min-chars\"],\"resultsCount\":[2,\"results-count\"],\"searchHelperLabel\":[1,\"search-helper-label\"],\"resultsItems\":[1,\"results-items\"],\"sortResultsItems\":[4,\"sort-results-items\"],\"showSearchButton\":[4,\"show-search-button\"],\"searchButtonIconOnly\":[4,\"search-button-icon-only\"],\"size\":[1],\"variant\":[1],\"searchString\":[32],\"currResultsCount\":[32],\"showResults\":[32],\"isMobile\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"resultsItems\":[\"watchItems\"],\"resultsCount\":[\"watchResultsCount\"],\"value\":[\"watchValue\"],\"searchString\":[\"watchSearchString\"],\"showResults\":[\"watchShowResults\"]}],[6,\"z-offcanvas\",{\"variant\":[513],\"open\":[1540],\"transitiondirection\":[513],\"skipLoadAnimation\":[4,\"skip-load-animation\"],\"skipAnimation\":[32]},[[2,\"click\",\"stopEvent\"],[2,\"focusin\",\"stopEvent\"]],{\"variant\":[\"handlePageOverflow\"],\"open\":[\"onOpenChanged\"]}],[6,\"z-tag\",{\"icon\":[1],\"expandable\":[4]}],[1,\"z-list\",{\"size\":[513],\"listType\":[513,\"list-type\"],\"role\":[513]}],[1,\"z-list-element\",{\"alignButton\":[513,\"align-button\"],\"clickable\":[516],\"dividerColor\":[1,\"divider-color\"],\"dividerType\":[1,\"divider-type\"],\"dividerSize\":[1,\"divider-size\"],\"expandable\":[516],\"expandableStyle\":[1,\"expandable-style\"],\"listElementId\":[514,\"list-element-id\"],\"size\":[513],\"color\":[513],\"disabled\":[516],\"listElementPosition\":[513,\"list-element-position\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"role\":[513],\"htmlTabindex\":[2,\"html-tabindex\"],\"showInnerContent\":[32]},[[4,\"accessibleFocus\",\"accessibleFocusHandler\"]]],[1,\"z-list-group\",{\"size\":[513],\"dividerType\":[513,\"divider-type\"],\"dividerSize\":[513,\"divider-size\"],\"dividerColor\":[513,\"divider-color\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"]}],[2,\"z-input\",{\"htmlid\":[1],\"type\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaControls\":[1,\"aria-controls\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"ariaActivedescendant\":[1,\"aria-activedescendant\"],\"value\":[1025],\"disabled\":[516],\"readonly\":[4],\"required\":[4],\"checked\":[1028],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"labelPosition\":[1,\"label-position\"],\"autocomplete\":[1],\"role\":[1],\"hasclearicon\":[4],\"icon\":[1],\"min\":[2],\"minlength\":[2],\"max\":[2],\"maxlength\":[2],\"step\":[2],\"pattern\":[1],\"size\":[513],\"isTyping\":[32],\"passwordHidden\":[32],\"isChecked\":[64]},[[4,\"inputCheck\",\"inputCheckListener\"]]],[2,\"z-divider\",{\"size\":[1],\"color\":[1],\"orientation\":[1]}],[1,\"z-input-message\",{\"message\":[1],\"status\":[513],\"disabled\":[516],\"statusRole\":[32]},null,{\"message\":[\"onMessageChange\"],\"status\":[\"onMessageChange\"]}],[6,\"z-button\",{\"ariaLabel\":[513,\"aria-label\"],\"role\":[1],\"htmlrole\":[1],\"href\":[1],\"target\":[1],\"htmlid\":[1],\"name\":[1],\"disabled\":[516],\"type\":[1],\"variant\":[513],\"icon\":[1],\"size\":[513]}],[1,\"z-icon\",{\"name\":[1],\"height\":[2],\"width\":[2],\"iconid\":[1],\"fill\":[1]}]]],[\"z-app-header-deprecated.cjs\",[[1,\"z-app-header-deprecated\",{\"stuck\":[516],\"hero\":[1],\"overlay\":[516],\"flow\":[513],\"drawerOpen\":[516,\"drawer-open\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"_stuck\":[32],\"currentViewport\":[32],\"menuLength\":[32]},[[9,\"resize\",\"evaluateViewport\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckMode\"]}]]],[\"z-select.cjs\",[[2,\"z-select\",{\"htmlid\":[1],\"items\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"autocomplete\":[4],\"noresultslabel\":[1],\"hasGroupItems\":[4,\"has-group-items\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"isfixed\":[4],\"resetItem\":[1,\"reset-item\"],\"size\":[1],\"isOpen\":[32],\"selectedItem\":[32],\"focusedItemId\":[32],\"searchString\":[32],\"flattenedList\":[32],\"getSelectedItem\":[64],\"getValue\":[64],\"setValue\":[64]},[[0,\"ariaDescendantFocus\",\"getFocusedItemHandler\"]],{\"items\":[\"watchItems\"]}]]],[\"z-breadcrumb.cjs\",[[1,\"z-breadcrumb\",{\"pathStyle\":[513,\"path-style\"],\"homepageVariant\":[1,\"homepage-variant\"],\"maxNodesToShow\":[2,\"max-nodes-to-show\"],\"preventFollowUrl\":[4,\"prevent-follow-url\"],\"overflowMenuItemRows\":[2,\"overflow-menu-item-rows\"],\"truncateChar\":[2,\"truncate-char\"],\"viewPortWidth\":[32],\"hasOverflow\":[32],\"popoverEllipsisOpen\":[32]},[[9,\"resize\",\"handleResize\"]],{\"maxNodesToShow\":[\"handlePropChange\"],\"viewPortWidth\":[\"handleResizeUp\"]}]]],[\"z-combobox.cjs\",[[1,\"z-combobox\",{\"inputid\":[1],\"items\":[1],\"label\":[1],\"disabled\":[516],\"hassearch\":[4],\"searchlabel\":[1],\"searchplaceholder\":[1],\"searchtitle\":[1],\"noresultslabel\":[1],\"isopen\":[1028],\"isfixed\":[4],\"closesearchtext\":[1],\"hascheckall\":[4],\"checkalltext\":[1],\"uncheckalltext\":[1],\"maxcheckableitems\":[2],\"hasgroupitems\":[4],\"size\":[1],\"searchValue\":[32],\"selectedCounter\":[32],\"renderItemsList\":[32],\"focusedItemId\":[32],\"checkboxes\":[32]},null,{\"items\":[\"watchItems\"],\"searchValue\":[\"watchSearchValue\"],\"checkboxes\":[\"watchCheckboxes\"]}]]],[\"z-myz-card-dictionary.cjs\",[[1,\"z-myz-card-dictionary\",{\"name\":[1],\"cover\":[1],\"disabled\":[4],\"flipped\":[1028],\"flipbuttonlabel\":[1],\"hideinfobtn\":[4]},[[0,\"flipCard\",\"handleFlipCard\"]]]]],[\"z-file-upload.cjs\",[[6,\"z-file-upload\",{\"type\":[513],\"buttonVariant\":[1,\"button-variant\"],\"acceptedFormat\":[1,\"accepted-format\"],\"fileMaxSize\":[2,\"file-max-size\"],\"mainTitle\":[1,\"main-title\"],\"description\":[1],\"uploadBtnLabel\":[1,\"upload-btn-label\"],\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"allowedFilesMessage\":[1,\"allowed-files-message\"],\"uploadClickableMessage\":[1,\"upload-clickable-message\"],\"uploadMessage\":[1,\"upload-message\"],\"errorModalTitle\":[1,\"error-modal-title\"],\"errorModalMessage\":[1,\"error-modal-message\"],\"uploadedFilesLabel\":[1,\"uploaded-files-label\"],\"hasFileSection\":[4,\"has-file-section\"],\"inputName\":[1,\"input-name\"],\"showErrors\":[4,\"show-errors\"],\"_type\":[32],\"files\":[32],\"invalidFiles\":[32],\"getFiles\":[64],\"removeFile\":[64]},[[0,\"removeFile\",\"onFileRemoved\"],[0,\"fileDropped\",\"fileDroppedListener\"]]]]],[\"z-pagination.cjs\",[[0,\"z-pagination\",{\"label\":[1],\"navArrows\":[4,\"nav-arrows\"],\"totalPages\":[2,\"total-pages\"],\"skip\":[2],\"edges\":[4],\"split\":[2],\"visiblePages\":[2,\"visible-pages\"],\"currentPage\":[1026,\"current-page\"],\"goToPage\":[4,\"go-to-page\"],\"_visiblePages\":[32],\"isMobile\":[32],\"goToPageValue\":[32]},[[9,\"resize\",\"onResize\"]],{\"_visiblePages\":[\"setPagesContainerWidth\"],\"visiblePages\":[\"setVisiblePages\"],\"currentPage\":[\"onPageChanged\"],\"split\":[\"onSplitChanged\"]}]]],[\"z-carousel.cjs\",[[1,\"z-carousel\",{\"isLoading\":[4,\"is-loading\"],\"label\":[1],\"single\":[516],\"arrowsPosition\":[513,\"arrows-position\"],\"progressMode\":[1,\"progress-mode\"],\"fixedArrows\":[516,\"fixed-arrows\"],\"ghostLoadingHeight\":[2,\"ghost-loading-height\"],\"infinite\":[4],\"current\":[32],\"items\":[32],\"highlightedIndicator\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},null,{\"current\":[\"onIndexChange\"],\"single\":[\"onSingleModeChange\"],\"infinite\":[\"onInfiniteModeChange\"]}]]],[\"z-date-picker.cjs\",[[4,\"z-date-picker\",{\"datePickerId\":[1,\"date-picker-id\"],\"ariaLabel\":[1,\"aria-label\"],\"label\":[1],\"mode\":[1],\"name\":[1],\"value\":[1],\"flatpickrPosition\":[32],\"inputError\":[32]},[[18,\"keydown\",\"handleKeyDown\"]],{\"mode\":[\"setupPickers\"]}]]],[\"z-file.cjs\",[[2,\"z-file\",{\"fileNumber\":[2,\"file-number\"],\"fileName\":[1,\"file-name\"],\"allowPopover\":[32],\"popoverVisible\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"interactiveIconClick\",\"onInteractiveIconClick\"]]]]],[\"z-range-picker.cjs\",[[0,\"z-range-picker\",{\"rangePickerId\":[1,\"range-picker-id\"],\"firstAriaLabel\":[1,\"first-aria-label\"],\"firstLabel\":[1,\"first-label\"],\"secondAriaLabel\":[1,\"second-aria-label\"],\"secondLabel\":[1,\"second-label\"],\"mode\":[1],\"firstPickerReadOnly\":[4,\"first-picker-read-only\"],\"lastPickerReadOnly\":[4,\"last-picker-read-only\"],\"firstPickerPlaceholder\":[1,\"first-picker-placeholder\"],\"lastPickerPlaceholder\":[1,\"last-picker-placeholder\"],\"flatpickrPosition\":[32],\"activeInput\":[32],\"firstInputError\":[32],\"lastInputError\":[32]},[[18,\"click\",\"handleClick\"],[18,\"keyup\",\"handleKeyDown\"]],{\"firstPickerReadOnly\":[\"setupFirstPickersReadOnly\"],\"lastPickerReadOnly\":[\"setupLastPickersReadOnly\"],\"mode\":[\"setupPickers\"]}]]],[\"z-td.cjs\",[[1,\"z-td\",{\"colspan\":[2],\"sticky\":[516],\"showMenu\":[513,\"show-menu\"],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-th.cjs\",[[1,\"z-th\",{\"colspan\":[2],\"showMenu\":[513,\"show-menu\"],\"showSorting\":[513,\"show-sorting\"],\"sticky\":[516],\"sortDirection\":[1025,\"sort-direction\"],\"sorted\":[1540],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-anchor-navigation.cjs\",[[4,\"z-anchor-navigation\",{\"hideUnselected\":[516,\"hide-unselected\"],\"autoCurrent\":[4,\"auto-current\"],\"collapsed\":[32]}]]],[\"z-book-card.cjs\",[[1,\"z-book-card\",{\"variant\":[513],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"year\":[1],\"ebookUrl\":[1,\"ebook-url\"],\"fallbackCover\":[1,\"fallback-cover\"],\"titleHtmlTag\":[1,\"title-html-tag\"]}]]],[\"z-book-card-app.cjs\",[[1,\"z-book-card-app\",{\"logo\":[1],\"name\":[1],\"link\":[1],\"laz\":[4],\"info\":[1]}]]],[\"z-myz-card-alert.cjs\",[[1,\"z-myz-card-alert\",{\"iconname\":[1],\"contenttext\":[1],\"actiontext\":[1],\"type\":[1]}]]],[\"z-myz-card-info.cjs\",[[1,\"z-myz-card-info\",{\"data\":[1],\"htmltabindex\":[2],\"hiddenContent\":[32],\"tooltip\":[32]}]]],[\"z-myz-list.cjs\",[[1,\"z-myz-list\",{\"inputrawdata\":[1],\"list\":[1040]},null,{\"inputrawdata\":[\"oninputrawdataChange\"]}]]],[\"z-otp.cjs\",[[1,\"z-otp\",{\"inputNum\":[2,\"input-num\"],\"status\":[1],\"message\":[1]}]]],[\"z-accordion.cjs\",[[1,\"z-accordion\",{\"label\":[1],\"icon\":[1],\"size\":[513],\"isDisabled\":[516,\"is-disabled\"],\"open\":[1540],\"highlight\":[516],\"variant\":[513],\"shadow\":[516]},null,{\"isDisabled\":[\"onDisabledChange\"]}]]],[\"z-book-card-deprecated.cjs\",[[1,\"z-book-card-deprecated\",{\"variant\":[1],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"ribbon\":[1],\"ribbonIcon\":[1,\"ribbon-icon\"],\"ribbonInteractive\":[4,\"ribbon-interactive\"],\"borderless\":[4],\"fallbackCover\":[1,\"fallback-cover\"],\"operaTitleTag\":[1,\"opera-title-tag\"],\"isMobile\":[32],\"hasResources\":[32],\"showResources\":[32]}]]],[\"z-button-sort.cjs\",[[1,\"z-button-sort\",{\"buttonid\":[1],\"label\":[1],\"desclabel\":[1],\"counter\":[2],\"sortlabelasc\":[1],\"sortlabeldesc\":[1],\"isselected\":[1028],\"sortasc\":[1028],\"allowTooltip\":[32]}]]],[\"z-card.cjs\",[[1,\"z-card\",{\"variant\":[513],\"coverIcon\":[1,\"cover-icon\"],\"showShadow\":[516,\"show-shadow\"],\"clickable\":[516],\"hasCoverImage\":[32]}]]],[\"z-info-box.cjs\",[[1,\"z-info-box\",{\"boxid\":[1],\"isclosable\":[4]}]]],[\"z-menu.cjs\",[[1,\"z-menu\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"htmlTabindex\":[2,\"html-tabindex\"],\"hasHeader\":[32],\"hasContent\":[32],\"setFocus\":[64],\"focusLastItem\":[64]},[[4,\"click\",\"onItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChanged\"],\"htmlTabindex\":[\"setLabelA11yAttrs\"]}]]],[\"z-menu-deprecated.cjs\",[[1,\"z-menu-deprecated\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"hasHeader\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]],{\"open\":[\"onOpenChanged\"]}]]],[\"z-menu-section.cjs\",[[1,\"z-menu-section\",{\"active\":[516],\"htmlTabindex\":[2,\"html-tabindex\"],\"open\":[1028],\"hasItems\":[32],\"items\":[32],\"focusLastItem\":[64],\"setFocus\":[64]},[[0,\"keydown\",\"onItemsKeydown\"]],{\"open\":[\"onOpenChange\"],\"htmlTabindex\":[\"onTabindexChange\"]}]]],[\"z-menu-section-deprecated.cjs\",[[1,\"z-menu-section-deprecated\",{\"active\":[516],\"open\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]]]]],[\"z-myz-card-icon.cjs\",[[1,\"z-myz-card-icon\",{\"icon\":[1],\"isdisabled\":[4],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-navigation-tabs.cjs\",[[4,\"z-navigation-tabs\",{\"ariaLabel\":[1,\"aria-label\"],\"orientation\":[513],\"size\":[513],\"selectedTab\":[1026,\"selected-tab\"],\"canNavigate\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},[[0,\"click\",\"handleTabClick\"],[0,\"focusin\",\"onTabFocusIn\"],[0,\"keydown\",\"navigateThroughTabs\"],[0,\"focusout\",\"onTabFocusOut\"]],{\"canNavigate\":[\"checkScrollEnabled\"],\"selectedTab\":[\"onTabSelected\"]}]]],[\"z-notification.cjs\",[[1,\"z-notification\",{\"contenticonname\":[1],\"actiontext\":[1],\"type\":[513],\"showclose\":[4],\"showshadow\":[516],\"sticky\":[516]}]]],[\"z-panel-elem.cjs\",[[6,\"z-panel-elem\",{\"elemid\":[1],\"imgurl\":[1],\"imgalt\":[1],\"linkicon\":[1],\"linklabel\":[1],\"url\":[1],\"target\":[1],\"isdisabled\":[4],\"descrSlotName\":[1,\"descr-slot-name\"]}]]],[\"z-section-title.cjs\",[[1,\"z-section-title\",{\"dividerPosition\":[1,\"divider-position\"],\"uppercase\":[516]}]]],[\"z-slideshow.cjs\",[[1,\"z-slideshow\",{\"slideshowid\":[1],\"data\":[1],\"device\":[32],\"currentSlide\":[32]},null,{\"data\":[\"watchData\"]}]]],[\"z-stepper-item.cjs\",[[1,\"z-stepper-item\",{\"index\":[2],\"href\":[1],\"pressed\":[4],\"checked\":[4],\"disabled\":[4]}]]],[\"z-toast-notification.cjs\",[[1,\"z-toast-notification\",{\"heading\":[1],\"message\":[1],\"closebutton\":[4],\"autoclose\":[2],\"pauseonfocusloss\":[4],\"type\":[1],\"isdraggable\":[4],\"draggablepercentage\":[2],\"transition\":[1],\"percentage\":[32]},null,{\"isdraggable\":[\"watchPropIsdraggable\"],\"autoclose\":[\"watchPropAutoclose\"],\"pauseonfocusloss\":[\"watchPropPauseonfocusloss\"]}]]],[\"z-toggle-button.cjs\",[[1,\"z-toggle-button\",{\"label\":[1],\"isdisabled\":[4],\"avoidclick\":[4],\"opened\":[1028],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-toggle-switch.cjs\",[[6,\"z-toggle-switch\",{\"disabled\":[516],\"labelPosition\":[513,\"label-position\"],\"checked\":[1028],\"htmlid\":[1]}]]],[\"z-tooltip.cjs\",[[1,\"z-tooltip\",{\"position\":[513],\"dark\":[516],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"closable\":[4]},[[0,\"openChange\",\"onPopoverOpenChange\"]]]]],[\"z-tr.cjs\",[[1,\"z-tr\",{\"expandable\":[516],\"expanded\":[32],\"expandableContentId\":[32]},[[0,\"colspanchange\",\"updateColumns\"]],{\"expandable\":[\"updateColumns\"]}]]],[\"z-aria-alert.cjs\",[[4,\"z-aria-alert\",{\"mode\":[1]}]]],[\"z-avatar.cjs\",[[1,\"z-avatar\",{\"size\":[1],\"text\":[1],\"textColor\":[1,\"text-color\"],\"backgroundColor\":[1,\"background-color\"],\"image\":[1025]}]]],[\"z-cover-hero.cjs\",[[1,\"z-cover-hero\",{\"variant\":[513],\"contentPosition\":[513,\"content-position\"],\"preserveAspectRatio\":[516,\"preserve-aspect-ratio\"]},[[2,\"load\",\"onImgLoad\"]]]]],[\"z-logo.cjs\",[[1,\"z-logo\",{\"width\":[2],\"height\":[2],\"imageAlt\":[1,\"image-alt\"],\"link\":[1],\"targetBlank\":[4,\"target-blank\"],\"mobileLogo\":[4,\"mobile-logo\"]}]]],[\"z-myz-card-footer.cjs\",[[1,\"z-myz-card-footer\",{\"titolo\":[1],\"autori\":[1],\"isbn\":[1],\"faded\":[4],\"cardtype\":[1],\"opened\":[4],\"customContent\":[4,\"custom-content\"],\"isOpen\":[32],\"allowTooltipAuthors\":[32]},[[0,\"toggleClick\",\"handleToggle\"]]]]],[\"z-myz-card-footer-sections.cjs\",[[1,\"z-myz-card-footer-sections\"]]],[\"z-myz-card-list.cjs\",[[1,\"z-myz-card-list\",{\"listdata\":[1]}]]],[\"z-skip-to-content.cjs\",[[2,\"z-skip-to-content\",{\"variant\":[513],\"links\":[1025],\"visible\":[32],\"visibleLink\":[32]},[[4,\"focusout\",\"handleFocusOutSkipToContent\"],[4,\"focusin\",\"handleFocusSkipToContent\"]]]]],[\"z-stepper.cjs\",[[1,\"z-stepper\"]]],[\"z-table.cjs\",[[1,\"z-table\",{\"bordered\":[516],\"expandable\":[32]}]]],[\"z-tbody.cjs\",[[1,\"z-tbody\"]]],[\"z-tfoot.cjs\",[[1,\"z-tfoot\",{\"sticky\":[516]}]]],[\"z-thead.cjs\",[[1,\"z-thead\",{\"sticky\":[516]}]]],[\"z-toast-notification-list.cjs\",[[1,\"z-toast-notification-list\",{\"position\":[513],\"newestontop\":[4]},null,{\"newestontop\":[\"watchPropNewestontop\"]}]]],[\"z-visually-hidden.cjs\",[[1,\"z-visually-hidden\"]]],[\"z-chip.cjs\",[[6,\"z-chip\",{\"icon\":[1],\"type\":[513],\"interactiveIcon\":[513,\"interactive-icon\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-info-reveal.cjs\",[[1,\"z-info-reveal\",{\"icon\":[1],\"position\":[513],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[513],\"open\":[32]},[[9,\"resize\",\"adjustPanelPosition\"],[10,\"keydown\",\"handleEscapeKey\"]],{\"position\":[\"adjustPanelPosition\"],\"open\":[\"adjustPanelPosition\"]}]]],[\"z-myz-list-item.cjs\",[[1,\"z-myz-list-item\",{\"text\":[1],\"link\":[1],\"linktarget\":[1],\"icon\":[1],\"listitemid\":[1],\"action\":[1],\"underlined\":[4]}]]],[\"z-alert.cjs\",[[1,\"z-alert\",{\"type\":[1]}]]],[\"z-ghost-loading.cjs\",[[1,\"z-ghost-loading\"]]],[\"z-dragdrop-area_2.cjs\",[[1,\"z-dragdrop-area\",{\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"dragging\":[32]}],[1,\"z-modal\",{\"modalid\":[1],\"modaltitle\":[1],\"modalsubtitle\":[1],\"closeButtonLabel\":[1,\"close-button-label\"],\"alertdialog\":[4],\"closable\":[4],\"scrollInside\":[4,\"scroll-inside\"],\"lockPageScroll\":[4,\"lock-page-scroll\"],\"open\":[64],\"close\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"z-myz-card_4.cjs\",[[1,\"z-myz-card\",{\"faded\":[4],\"cardtype\":[1],\"ispressed\":[4],\"ishighlighted\":[4]}],[1,\"z-myz-card-body\"],[1,\"z-myz-card-cover\",{\"img\":[1],\"titolo\":[1],\"faded\":[4],\"defaultimg\":[1]}],[1,\"z-myz-card-header\",{\"titolo\":[1],\"faded\":[4],\"cardtype\":[1],\"allowTooltip\":[32]}]]],[\"z-popover.cjs\",[[1,\"z-popover\",{\"position\":[513],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"showArrow\":[516,\"show-arrow\"],\"center\":[516],\"closable\":[4],\"currentPosition\":[32]},[[8,\"keyup\",\"closePopoverWithKeyboard\"],[18,\"click\",\"handleOutsideClick\"]],{\"position\":[\"validatePosition\"],\"open\":[\"onOpen\"]}]]]]"), options);
43
+ return index.bootstrapLazy(JSON.parse("[[\"z-app-header_12.cjs\",[[1,\"z-app-header\",{\"stuck\":[516],\"enableOffcanvas\":[1540,\"enable-offcanvas\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"enableZLogo\":[516,\"enable-z-logo\"],\"drawerOpen\":[1028,\"drawer-open\"],\"_stuck\":[32],\"menuLength\":[32],\"isMobile\":[32],\"isTablet\":[32]},[[5,\"focusin\",\"manageMenus\"],[5,\"click\",\"manageMenus\"],[1,\"keydown\",\"handleKeydown\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckChange\"]}],[1,\"z-searchbar\",{\"htmlid\":[513],\"preventSubmit\":[4,\"prevent-submit\"],\"value\":[1],\"placeholder\":[1],\"autocomplete\":[4],\"autocompleteMinChars\":[2,\"autocomplete-min-chars\"],\"resultsCount\":[2,\"results-count\"],\"searchHelperLabel\":[1,\"search-helper-label\"],\"resultsItems\":[1,\"results-items\"],\"sortResultsItems\":[4,\"sort-results-items\"],\"showSearchButton\":[4,\"show-search-button\"],\"searchButtonIconOnly\":[4,\"search-button-icon-only\"],\"size\":[1],\"variant\":[1],\"searchString\":[32],\"currResultsCount\":[32],\"showResults\":[32],\"isMobile\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"resultsItems\":[\"watchItems\"],\"resultsCount\":[\"watchResultsCount\"],\"value\":[\"watchValue\"],\"searchString\":[\"watchSearchString\"],\"showResults\":[\"watchShowResults\"]}],[6,\"z-offcanvas\",{\"variant\":[513],\"open\":[1540],\"transitiondirection\":[513],\"skipLoadAnimation\":[4,\"skip-load-animation\"],\"skipAnimation\":[32]},[[2,\"click\",\"stopEvent\"],[2,\"focusin\",\"stopEvent\"]],{\"variant\":[\"handlePageOverflow\"],\"open\":[\"onOpenChanged\"]}],[6,\"z-tag\",{\"icon\":[1],\"expandable\":[4]}],[1,\"z-list\",{\"size\":[513],\"listType\":[513,\"list-type\"],\"role\":[513]}],[1,\"z-list-element\",{\"alignButton\":[513,\"align-button\"],\"clickable\":[516],\"dividerColor\":[1,\"divider-color\"],\"dividerType\":[1,\"divider-type\"],\"dividerSize\":[1,\"divider-size\"],\"expandable\":[516],\"expandableStyle\":[1,\"expandable-style\"],\"listElementId\":[514,\"list-element-id\"],\"size\":[513],\"color\":[513],\"disabled\":[516],\"listElementPosition\":[513,\"list-element-position\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"role\":[513],\"htmlTabindex\":[2,\"html-tabindex\"],\"showInnerContent\":[32]},[[4,\"accessibleFocus\",\"accessibleFocusHandler\"]]],[1,\"z-list-group\",{\"size\":[513],\"dividerType\":[513,\"divider-type\"],\"dividerSize\":[513,\"divider-size\"],\"dividerColor\":[513,\"divider-color\"],\"listType\":[513,\"list-type\"],\"hasTreeItems\":[4,\"has-tree-items\"]}],[2,\"z-input\",{\"htmlid\":[1],\"type\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"ariaExpanded\":[1,\"aria-expanded\"],\"ariaControls\":[1,\"aria-controls\"],\"ariaAutocomplete\":[1,\"aria-autocomplete\"],\"ariaActivedescendant\":[1,\"aria-activedescendant\"],\"value\":[1025],\"disabled\":[516],\"readonly\":[4],\"required\":[4],\"checked\":[1028],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"labelPosition\":[1,\"label-position\"],\"autocomplete\":[1],\"role\":[1],\"hasclearicon\":[4],\"icon\":[1],\"min\":[2],\"minlength\":[2],\"max\":[2],\"maxlength\":[2],\"step\":[2],\"pattern\":[1],\"size\":[513],\"isTyping\":[32],\"passwordHidden\":[32],\"isChecked\":[64]},[[4,\"inputCheck\",\"inputCheckListener\"]]],[2,\"z-divider\",{\"size\":[1],\"color\":[1],\"orientation\":[1]}],[1,\"z-input-message\",{\"message\":[1],\"status\":[513],\"disabled\":[516],\"statusRole\":[32]},null,{\"message\":[\"onMessageChange\"],\"status\":[\"onMessageChange\"]}],[6,\"z-button\",{\"ariaLabel\":[513,\"aria-label\"],\"role\":[1],\"htmlrole\":[1],\"href\":[1],\"target\":[1],\"htmlid\":[1],\"name\":[1],\"disabled\":[516],\"type\":[1],\"variant\":[513],\"icon\":[1],\"size\":[513]}],[1,\"z-icon\",{\"name\":[1],\"height\":[2],\"width\":[2],\"iconid\":[1],\"fill\":[1]}]]],[\"z-app-header-deprecated.cjs\",[[1,\"z-app-header-deprecated\",{\"stuck\":[516],\"hero\":[1],\"overlay\":[516],\"flow\":[513],\"drawerOpen\":[516,\"drawer-open\"],\"enableSearch\":[516,\"enable-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchString\":[1025,\"search-string\"],\"searchPageUrl\":[1,\"search-page-url\"],\"_stuck\":[32],\"currentViewport\":[32],\"menuLength\":[32]},[[9,\"resize\",\"evaluateViewport\"]],{\"_stuck\":[\"onStuck\"],\"drawerOpen\":[\"setMenuFloatingMode\"],\"stuck\":[\"onStuckMode\"]}]]],[\"z-select.cjs\",[[2,\"z-select\",{\"htmlid\":[1],\"items\":[1],\"name\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[4],\"readonly\":[4],\"placeholder\":[1],\"htmltitle\":[1],\"status\":[1],\"message\":[8],\"autocomplete\":[4],\"noresultslabel\":[1],\"hasGroupItems\":[4,\"has-group-items\"],\"hasTreeItems\":[4,\"has-tree-items\"],\"isfixed\":[4],\"resetItem\":[1,\"reset-item\"],\"size\":[1],\"isOpen\":[32],\"selectedItem\":[32],\"focusedItemId\":[32],\"searchString\":[32],\"flattenedList\":[32],\"getSelectedItem\":[64],\"getValue\":[64],\"setValue\":[64]},[[0,\"ariaDescendantFocus\",\"getFocusedItemHandler\"]],{\"items\":[\"watchItems\"]}]]],[\"z-breadcrumb.cjs\",[[1,\"z-breadcrumb\",{\"pathStyle\":[513,\"path-style\"],\"homepageVariant\":[1,\"homepage-variant\"],\"maxNodesToShow\":[2,\"max-nodes-to-show\"],\"preventFollowUrl\":[4,\"prevent-follow-url\"],\"overflowMenuItemRows\":[2,\"overflow-menu-item-rows\"],\"truncateChar\":[2,\"truncate-char\"],\"viewPortWidth\":[32],\"hasOverflow\":[32],\"popoverEllipsisOpen\":[32]},[[9,\"resize\",\"handleResize\"]],{\"maxNodesToShow\":[\"handlePropChange\"],\"viewPortWidth\":[\"handleResizeUp\"]}]]],[\"z-combobox.cjs\",[[1,\"z-combobox\",{\"inputid\":[1],\"items\":[1],\"label\":[1],\"disabled\":[516],\"hassearch\":[4],\"searchlabel\":[1],\"searchplaceholder\":[1],\"searchtitle\":[1],\"noresultslabel\":[1],\"isopen\":[1028],\"isfixed\":[4],\"closesearchtext\":[1],\"hascheckall\":[4],\"checkalltext\":[1],\"uncheckalltext\":[1],\"maxcheckableitems\":[2],\"hasgroupitems\":[4],\"size\":[1],\"searchValue\":[32],\"selectedCounter\":[32],\"renderItemsList\":[32],\"focusedItemId\":[32],\"checkboxes\":[32]},null,{\"items\":[\"watchItems\"],\"searchValue\":[\"watchSearchValue\"],\"checkboxes\":[\"watchCheckboxes\"]}]]],[\"z-myz-card-dictionary.cjs\",[[1,\"z-myz-card-dictionary\",{\"name\":[1],\"cover\":[1],\"disabled\":[4],\"flipped\":[1028],\"flipbuttonlabel\":[1],\"hideinfobtn\":[4]},[[0,\"flipCard\",\"handleFlipCard\"]]]]],[\"z-file-upload.cjs\",[[6,\"z-file-upload\",{\"type\":[513],\"buttonVariant\":[1,\"button-variant\"],\"acceptedFormat\":[1,\"accepted-format\"],\"fileMaxSize\":[2,\"file-max-size\"],\"mainTitle\":[1,\"main-title\"],\"description\":[1],\"uploadBtnLabel\":[1,\"upload-btn-label\"],\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"allowedFilesMessage\":[1,\"allowed-files-message\"],\"uploadClickableMessage\":[1,\"upload-clickable-message\"],\"uploadMessage\":[1,\"upload-message\"],\"errorModalTitle\":[1,\"error-modal-title\"],\"errorModalMessage\":[1,\"error-modal-message\"],\"uploadedFilesLabel\":[1,\"uploaded-files-label\"],\"hasFileSection\":[4,\"has-file-section\"],\"inputName\":[1,\"input-name\"],\"showErrors\":[4,\"show-errors\"],\"_type\":[32],\"files\":[32],\"invalidFiles\":[32],\"input\":[32],\"getFiles\":[64],\"removeFile\":[64]},[[0,\"removeFile\",\"onFileRemoved\"],[0,\"fileDropped\",\"fileDroppedListener\"]]]]],[\"z-pagination.cjs\",[[0,\"z-pagination\",{\"label\":[1],\"navArrows\":[4,\"nav-arrows\"],\"totalPages\":[2,\"total-pages\"],\"skip\":[2],\"edges\":[4],\"split\":[2],\"visiblePages\":[2,\"visible-pages\"],\"currentPage\":[1026,\"current-page\"],\"goToPage\":[4,\"go-to-page\"],\"_visiblePages\":[32],\"isMobile\":[32],\"goToPageValue\":[32]},[[9,\"resize\",\"onResize\"]],{\"_visiblePages\":[\"setPagesContainerWidth\"],\"visiblePages\":[\"setVisiblePages\"],\"currentPage\":[\"onPageChanged\"],\"split\":[\"onSplitChanged\"]}]]],[\"z-carousel.cjs\",[[1,\"z-carousel\",{\"isLoading\":[4,\"is-loading\"],\"label\":[1],\"single\":[516],\"arrowsPosition\":[513,\"arrows-position\"],\"progressMode\":[1,\"progress-mode\"],\"fixedArrows\":[516,\"fixed-arrows\"],\"ghostLoadingHeight\":[2,\"ghost-loading-height\"],\"infinite\":[4],\"current\":[32],\"items\":[32],\"highlightedIndicator\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},null,{\"current\":[\"onIndexChange\"],\"single\":[\"onSingleModeChange\"],\"infinite\":[\"onInfiniteModeChange\"]}]]],[\"z-date-picker.cjs\",[[4,\"z-date-picker\",{\"datePickerId\":[1,\"date-picker-id\"],\"ariaLabel\":[1,\"aria-label\"],\"label\":[1],\"mode\":[1],\"name\":[1],\"value\":[1],\"flatpickrPosition\":[32],\"inputError\":[32]},[[18,\"keydown\",\"handleKeyDown\"]],{\"mode\":[\"setupPickers\"]}]]],[\"z-file.cjs\",[[2,\"z-file\",{\"fileNumber\":[2,\"file-number\"],\"fileName\":[1,\"file-name\"],\"allowPopover\":[32],\"popoverVisible\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"interactiveIconClick\",\"onInteractiveIconClick\"]]]]],[\"z-range-picker.cjs\",[[0,\"z-range-picker\",{\"rangePickerId\":[1,\"range-picker-id\"],\"firstAriaLabel\":[1,\"first-aria-label\"],\"firstLabel\":[1,\"first-label\"],\"secondAriaLabel\":[1,\"second-aria-label\"],\"secondLabel\":[1,\"second-label\"],\"mode\":[1],\"firstPickerReadOnly\":[4,\"first-picker-read-only\"],\"lastPickerReadOnly\":[4,\"last-picker-read-only\"],\"firstPickerPlaceholder\":[1,\"first-picker-placeholder\"],\"lastPickerPlaceholder\":[1,\"last-picker-placeholder\"],\"flatpickrPosition\":[32],\"activeInput\":[32],\"firstInputError\":[32],\"lastInputError\":[32]},[[18,\"click\",\"handleClick\"],[18,\"keyup\",\"handleKeyDown\"]],{\"firstPickerReadOnly\":[\"setupFirstPickersReadOnly\"],\"lastPickerReadOnly\":[\"setupLastPickersReadOnly\"],\"mode\":[\"setupPickers\"]}]]],[\"z-td.cjs\",[[1,\"z-td\",{\"colspan\":[2],\"sticky\":[516],\"showMenu\":[513,\"show-menu\"],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-th.cjs\",[[1,\"z-th\",{\"colspan\":[2],\"showMenu\":[513,\"show-menu\"],\"showSorting\":[513,\"show-sorting\"],\"sticky\":[516],\"sortDirection\":[1025,\"sort-direction\"],\"sorted\":[1540],\"popoverPosition\":[1,\"popover-position\"],\"isMenuOpen\":[32]},null,{\"colspan\":[\"updateColspan\"]}]]],[\"z-anchor-navigation.cjs\",[[4,\"z-anchor-navigation\",{\"hideUnselected\":[516,\"hide-unselected\"],\"autoCurrent\":[4,\"auto-current\"],\"collapsed\":[32]}]]],[\"z-book-card.cjs\",[[1,\"z-book-card\",{\"variant\":[513],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"year\":[1],\"ebookUrl\":[1,\"ebook-url\"],\"fallbackCover\":[1,\"fallback-cover\"],\"titleHtmlTag\":[1,\"title-html-tag\"]}]]],[\"z-book-card-app.cjs\",[[1,\"z-book-card-app\",{\"logo\":[1],\"name\":[1],\"link\":[1],\"laz\":[4],\"info\":[1]}]]],[\"z-myz-card-alert.cjs\",[[1,\"z-myz-card-alert\",{\"iconname\":[1],\"contenttext\":[1],\"actiontext\":[1],\"type\":[1]}]]],[\"z-myz-card-info.cjs\",[[1,\"z-myz-card-info\",{\"data\":[1],\"htmltabindex\":[2],\"hiddenContent\":[32],\"tooltip\":[32]}]]],[\"z-myz-list.cjs\",[[1,\"z-myz-list\",{\"inputrawdata\":[1],\"list\":[1040]},null,{\"inputrawdata\":[\"oninputrawdataChange\"]}]]],[\"z-otp.cjs\",[[1,\"z-otp\",{\"inputNum\":[2,\"input-num\"],\"status\":[1],\"message\":[1]}]]],[\"z-accordion.cjs\",[[1,\"z-accordion\",{\"label\":[1],\"icon\":[1],\"size\":[513],\"isDisabled\":[516,\"is-disabled\"],\"open\":[1540],\"highlight\":[516],\"variant\":[513],\"shadow\":[516]},null,{\"isDisabled\":[\"onDisabledChange\"]}]]],[\"z-book-card-deprecated.cjs\",[[1,\"z-book-card-deprecated\",{\"variant\":[1],\"cover\":[1],\"operaTitle\":[1,\"opera-title\"],\"volumeTitle\":[1,\"volume-title\"],\"authors\":[1],\"isbn\":[1],\"isbnLabel\":[1,\"isbn-label\"],\"ribbon\":[1],\"ribbonIcon\":[1,\"ribbon-icon\"],\"ribbonInteractive\":[4,\"ribbon-interactive\"],\"borderless\":[4],\"fallbackCover\":[1,\"fallback-cover\"],\"operaTitleTag\":[1,\"opera-title-tag\"],\"isMobile\":[32],\"hasResources\":[32],\"showResources\":[32]}]]],[\"z-button-sort.cjs\",[[1,\"z-button-sort\",{\"buttonid\":[1],\"label\":[1],\"desclabel\":[1],\"counter\":[2],\"sortlabelasc\":[1],\"sortlabeldesc\":[1],\"isselected\":[1028],\"sortasc\":[1028],\"allowTooltip\":[32]}]]],[\"z-card.cjs\",[[1,\"z-card\",{\"variant\":[513],\"coverIcon\":[1,\"cover-icon\"],\"showShadow\":[516,\"show-shadow\"],\"clickable\":[516],\"hasCoverImage\":[32]}]]],[\"z-info-box.cjs\",[[1,\"z-info-box\",{\"boxid\":[1],\"isclosable\":[4]}]]],[\"z-menu.cjs\",[[1,\"z-menu\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"htmlTabindex\":[2,\"html-tabindex\"],\"hasHeader\":[32],\"hasContent\":[32],\"setFocus\":[64],\"focusLastItem\":[64]},[[4,\"click\",\"onItemClick\"],[0,\"keydown\",\"onKeyDown\"]],{\"open\":[\"onOpenChanged\"],\"htmlTabindex\":[\"setLabelA11yAttrs\"]}]]],[\"z-menu-deprecated.cjs\",[[1,\"z-menu-deprecated\",{\"active\":[516],\"floating\":[516],\"open\":[1540],\"verticalContext\":[516,\"vertical-context\"],\"hasHeader\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]],{\"open\":[\"onOpenChanged\"]}]]],[\"z-menu-section.cjs\",[[1,\"z-menu-section\",{\"active\":[516],\"htmlTabindex\":[2,\"html-tabindex\"],\"open\":[1028],\"hasItems\":[32],\"items\":[32],\"focusLastItem\":[64],\"setFocus\":[64]},[[0,\"keydown\",\"onItemsKeydown\"]],{\"open\":[\"onOpenChange\"],\"htmlTabindex\":[\"onTabindexChange\"]}]]],[\"z-menu-section-deprecated.cjs\",[[1,\"z-menu-section-deprecated\",{\"active\":[516],\"open\":[32],\"hasContent\":[32]},[[4,\"click\",\"handleClick\"]]]]],[\"z-myz-card-icon.cjs\",[[1,\"z-myz-card-icon\",{\"icon\":[1],\"isdisabled\":[4],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-navigation-tabs.cjs\",[[4,\"z-navigation-tabs\",{\"ariaLabel\":[1,\"aria-label\"],\"orientation\":[513],\"size\":[513],\"selectedTab\":[1026,\"selected-tab\"],\"canNavigate\":[32],\"canNavigatePrev\":[32],\"canNavigateNext\":[32]},[[0,\"click\",\"handleTabClick\"],[0,\"focusin\",\"onTabFocusIn\"],[0,\"keydown\",\"navigateThroughTabs\"],[0,\"focusout\",\"onTabFocusOut\"]],{\"canNavigate\":[\"checkScrollEnabled\"],\"selectedTab\":[\"onTabSelected\"]}]]],[\"z-notification.cjs\",[[1,\"z-notification\",{\"contenticonname\":[1],\"actiontext\":[1],\"type\":[513],\"showclose\":[4],\"showshadow\":[516],\"sticky\":[516]}]]],[\"z-panel-elem.cjs\",[[6,\"z-panel-elem\",{\"elemid\":[1],\"imgurl\":[1],\"imgalt\":[1],\"linkicon\":[1],\"linklabel\":[1],\"url\":[1],\"target\":[1],\"isdisabled\":[4],\"descrSlotName\":[1,\"descr-slot-name\"]}]]],[\"z-section-title.cjs\",[[1,\"z-section-title\",{\"dividerPosition\":[1,\"divider-position\"],\"uppercase\":[516]}]]],[\"z-slideshow.cjs\",[[1,\"z-slideshow\",{\"slideshowid\":[1],\"data\":[1],\"device\":[32],\"currentSlide\":[32]},null,{\"data\":[\"watchData\"]}]]],[\"z-stepper-item.cjs\",[[1,\"z-stepper-item\",{\"index\":[2],\"href\":[1],\"pressed\":[4],\"checked\":[4],\"disabled\":[4]}]]],[\"z-toast-notification.cjs\",[[1,\"z-toast-notification\",{\"heading\":[1],\"message\":[1],\"closebutton\":[4],\"autoclose\":[2],\"pauseonfocusloss\":[4],\"type\":[1],\"isdraggable\":[4],\"draggablepercentage\":[2],\"transition\":[1],\"percentage\":[32]},null,{\"isdraggable\":[\"watchPropIsdraggable\"],\"autoclose\":[\"watchPropAutoclose\"],\"pauseonfocusloss\":[\"watchPropPauseonfocusloss\"]}]]],[\"z-toggle-button.cjs\",[[1,\"z-toggle-button\",{\"label\":[1],\"isdisabled\":[4],\"avoidclick\":[4],\"opened\":[1028],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-toggle-switch.cjs\",[[6,\"z-toggle-switch\",{\"disabled\":[516],\"labelPosition\":[513,\"label-position\"],\"checked\":[1028],\"htmlid\":[1]}]]],[\"z-tooltip.cjs\",[[1,\"z-tooltip\",{\"position\":[513],\"dark\":[516],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"closable\":[4]},[[0,\"openChange\",\"onPopoverOpenChange\"]]]]],[\"z-tr.cjs\",[[1,\"z-tr\",{\"expandable\":[516],\"expanded\":[32],\"expandableContentId\":[32]},[[0,\"colspanchange\",\"updateColumns\"]],{\"expandable\":[\"updateColumns\"]}]]],[\"z-aria-alert.cjs\",[[4,\"z-aria-alert\",{\"mode\":[1]}]]],[\"z-avatar.cjs\",[[1,\"z-avatar\",{\"size\":[1],\"text\":[1],\"textColor\":[1,\"text-color\"],\"backgroundColor\":[1,\"background-color\"],\"image\":[1025]}]]],[\"z-cover-hero.cjs\",[[1,\"z-cover-hero\",{\"variant\":[513],\"contentPosition\":[513,\"content-position\"],\"preserveAspectRatio\":[516,\"preserve-aspect-ratio\"]},[[2,\"load\",\"onImgLoad\"]]]]],[\"z-logo.cjs\",[[1,\"z-logo\",{\"width\":[2],\"height\":[2],\"imageAlt\":[1,\"image-alt\"],\"link\":[1],\"targetBlank\":[4,\"target-blank\"],\"mobileLogo\":[4,\"mobile-logo\"]}]]],[\"z-myz-card-footer.cjs\",[[1,\"z-myz-card-footer\",{\"titolo\":[1],\"autori\":[1],\"isbn\":[1],\"faded\":[4],\"cardtype\":[1],\"opened\":[4],\"customContent\":[4,\"custom-content\"],\"isOpen\":[32],\"allowTooltipAuthors\":[32]},[[0,\"toggleClick\",\"handleToggle\"]]]]],[\"z-myz-card-footer-sections.cjs\",[[1,\"z-myz-card-footer-sections\"]]],[\"z-myz-card-list.cjs\",[[1,\"z-myz-card-list\",{\"listdata\":[1]}]]],[\"z-skip-to-content.cjs\",[[2,\"z-skip-to-content\",{\"variant\":[513],\"links\":[1025],\"visible\":[32],\"visibleLink\":[32]},[[4,\"focusout\",\"handleFocusOutSkipToContent\"],[4,\"focusin\",\"handleFocusSkipToContent\"]]]]],[\"z-stepper.cjs\",[[1,\"z-stepper\"]]],[\"z-table.cjs\",[[1,\"z-table\",{\"bordered\":[516],\"expandable\":[32]}]]],[\"z-tbody.cjs\",[[1,\"z-tbody\"]]],[\"z-tfoot.cjs\",[[1,\"z-tfoot\",{\"sticky\":[516]}]]],[\"z-thead.cjs\",[[1,\"z-thead\",{\"sticky\":[516]}]]],[\"z-toast-notification-list.cjs\",[[1,\"z-toast-notification-list\",{\"position\":[513],\"newestontop\":[4]},null,{\"newestontop\":[\"watchPropNewestontop\"]}]]],[\"z-visually-hidden.cjs\",[[1,\"z-visually-hidden\"]]],[\"z-chip.cjs\",[[6,\"z-chip\",{\"icon\":[1],\"type\":[513],\"interactiveIcon\":[513,\"interactive-icon\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"z-info-reveal.cjs\",[[1,\"z-info-reveal\",{\"icon\":[1],\"position\":[513],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[513],\"open\":[32]},[[9,\"resize\",\"adjustPanelPosition\"],[10,\"keydown\",\"handleEscapeKey\"]],{\"position\":[\"adjustPanelPosition\"],\"open\":[\"adjustPanelPosition\"]}]]],[\"z-myz-list-item.cjs\",[[1,\"z-myz-list-item\",{\"text\":[1],\"link\":[1],\"linktarget\":[1],\"icon\":[1],\"listitemid\":[1],\"action\":[1],\"underlined\":[4]}]]],[\"z-alert.cjs\",[[1,\"z-alert\",{\"type\":[1]}]]],[\"z-ghost-loading.cjs\",[[1,\"z-ghost-loading\"]]],[\"z-dragdrop-area_2.cjs\",[[1,\"z-dragdrop-area\",{\"dragAndDropLabel\":[1,\"drag-and-drop-label\"],\"dragging\":[32]}],[1,\"z-modal\",{\"modalid\":[1],\"modaltitle\":[1],\"modalsubtitle\":[1],\"closeButtonLabel\":[1,\"close-button-label\"],\"alertdialog\":[4],\"closable\":[4],\"scrollInside\":[4,\"scroll-inside\"],\"lockPageScroll\":[4,\"lock-page-scroll\"],\"open\":[64],\"close\":[64]},[[0,\"keydown\",\"handleKeyDown\"]]]]],[\"z-myz-card_4.cjs\",[[1,\"z-myz-card\",{\"faded\":[4],\"cardtype\":[1],\"ispressed\":[4],\"ishighlighted\":[4]}],[1,\"z-myz-card-body\"],[1,\"z-myz-card-cover\",{\"img\":[1],\"titolo\":[1],\"faded\":[4],\"defaultimg\":[1]}],[1,\"z-myz-card-header\",{\"titolo\":[1],\"faded\":[4],\"cardtype\":[1],\"allowTooltip\":[32]}]]],[\"z-popover.cjs\",[[1,\"z-popover\",{\"position\":[513],\"open\":[1540],\"bindTo\":[1,\"bind-to\"],\"showArrow\":[516,\"show-arrow\"],\"center\":[516],\"closable\":[4],\"currentPosition\":[32]},[[8,\"keyup\",\"closePopoverWithKeyboard\"],[18,\"click\",\"handleOutsideClick\"]],{\"position\":[\"validatePosition\"],\"open\":[\"onOpen\"]}]]]]"), options);
44
44
  });
45
45
 
46
46
  exports.setNonce = index.setNonce;
@@ -33,10 +33,11 @@ const ZFileUpload = class {
33
33
  this._type = this.type;
34
34
  this.files = [];
35
35
  this.invalidFiles = new Map();
36
+ this.input = undefined;
36
37
  }
37
38
  /** Listen `removeFile` event sent from z-file component */
38
39
  onFileRemoved(e) {
39
- this.removeFile(e.detail);
40
+ this.removeFile(e.detail.fileName);
40
41
  }
41
42
  /** Listen fileDropped event sent from z-dragdrop-area component */
42
43
  fileDroppedListener(e) {
@@ -180,7 +181,7 @@ const ZFileUpload = class {
180
181
  });
181
182
  }
182
183
  render() {
183
- return (index.h(index.Host, { key: 'ea57cc0462e4358d04bfc8f5709b61be50947e7a' }, this.mainTitle && (index.h("div", { key: '59e23f66172333b963922832782a8ac89611acb9', id: "title", class: "heading-3-sb" }, this.mainTitle)), this._type == index$1.ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode(), !!this.invalidFiles.size && this.showErrors && (index.h("z-modal", { key: '64cb55a1c0fb491a9dd5b414a309b284e4f2d24e', modalid: `file-upload-${this.type}-error-modal`, ref: (val) => (this.errorModal = val), modaltitle: this.errorModalTitle, onModalClose: () => this.resetErrors(), onModalBackgroundClick: () => this.resetErrors() }, index.h("div", { key: '255cf2140f1ca881f90df6952965abc8f364f4d0', slot: "modalContent" }, index.h("div", { key: '03638b6b970c72c73ac7014f0c7848a032029963', class: "modal-wrapper body-3" }, this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()))))));
184
+ return (index.h(index.Host, { key: '13ada780c37ca16c2153f8c1177864932fe299dd' }, this.mainTitle && (index.h("div", { key: 'dcf55ac93e6959136262d0422272ab4902c3cbed', id: "title", class: "heading-3-sb" }, this.mainTitle)), this._type == index$1.ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode(), !!this.invalidFiles.size && this.showErrors && (index.h("z-modal", { key: 'e7d8c001c513ab498779c752dc195ab03ec81a80', modalid: `file-upload-${this.type}-error-modal`, ref: (val) => (this.errorModal = val), modaltitle: this.errorModalTitle, onModalClose: () => this.resetErrors(), onModalBackgroundClick: () => this.resetErrors() }, index.h("div", { key: 'e5262f2f8b42dfe38ad4b794b08b4bf6b83b4a7a', slot: "modalContent" }, index.h("div", { key: '5e50b460de47813678ea1e2d3a2a3e0e76d0a6d0', class: "modal-wrapper body-3" }, this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()))))));
184
185
  }
185
186
  get host() { return index.getElement(this); }
186
187
  };
@@ -1 +1 @@
1
- {"file":"z-file-upload.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,6rEAA6rE,CAAC;AAChtE,0BAAe,SAAS;;MCUX,WAAW;;;;;oBAGEA,uBAAe,CAAC,OAAO;;;;;;8BAwBrB,QAAQ;gCAIN,+CAA+C;;sCAQzC,QAAQ;6BAIjB,6BAA6B;+BAI3B,uBAAuB;;kCAQpB,sBAAsB;8BAIzB,IAAI;yBAIlB,eAAe;0BAOf,IAAI;qBAIgB,IAAI,CAAC,IAAI;qBAI1B,EAAE;4BAI8B,IAAI,GAAG,EAA8B;;;IAqBrF,aAAa,CAAC,CAAc;QAC1B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;KAC3B;;IAID,mBAAmB,CAAC,CAAc;QAChC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC3C;;IAID,MAAM,QAAQ;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;;IAID,MAAM,UAAU,CAAC,QAAgB;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QAChE,IAAI,KAAK,IAAI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kB,EAAE,EAC5F,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,KAC1CC,sEACE,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,cAAc,EAC/C,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,sBAAsB,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhDA,kEAAK,IAAI,EAAC,cAAc,IACtBA,kEAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,CACtE,CACF,CACE,CACX,CACI,EACP;KACH;;;;;;;","names":["ZFileUploadType","h","Host"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=scoped","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host .modal-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-text-link-blue);\n cursor: pointer;\n text-decoration: underline;\n}\n\n:host .text-container .upload-link:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\n:host input[type=\"file\"] {\n display: none;\n}\n\n:host #title + #description {\n margin-top: var(--space-unit);\n}\n\n:host > * + z-button,\n:host > .files-container + *,\n:host > .files-container:not(:first-child) {\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .files-container.hidden {\n display: none;\n}\n\n:host > .files-container > .uploaded-files-label {\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n/* Tablet breakpoint */\n@media (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, ZFileUploadType} from \"../../../beans\";\n\nexport type ZFileUploadError = {cause: \"format\" | \"size\"; message: string};\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** Value to set on the file input's `name` attribute (for use with forms) */\n @Prop()\n inputName? = \"z-file-upload\";\n\n /**\n * Whether to show errors in the internal modal or leave the handling to the app.\n * Errors will still be emitted.\n */\n @Prop()\n showErrors = true;\n\n /** Internal store of the component type. It will change when viewport goes from desktop to tablet/mobile and vice versa */\n @State()\n private _type: ZFileUploadType = this.type;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** Map of files whose upload caused an error and the relative errors, with the cause and a message */\n @State()\n invalidFiles: Map<string, ZFileUploadError[]> = new Map<string, ZFileUploadError[]>();\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter<File>;\n\n /**\n * Emits an array of error messages related to one or more files not allowed.\n * Emitted when some file is dropped or selected.\n */\n @Event()\n fileError: EventEmitter<{file: string; errors: ZFileUploadError[]}>;\n\n @Element() host: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private errorModal: HTMLZModalElement;\n\n /** Listen `removeFile` event sent from z-file component */\n @Listen(\"removeFile\")\n onFileRemoved(e: CustomEvent): void {\n this.removeFile(e.detail);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.checkFilesValidity(this.input.files);\n }\n\n /** Get the list of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** Remove a previously uploaded file */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n const files = this.files;\n const index = files.findIndex((file) => file.name === fileName);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n\n private checkFilesValidity(files: FileList): Map<string, string[]> {\n if (!files.length) {\n return;\n }\n\n Array.from(files).forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk && !this.files.find((f) => f.name === file.name)) {\n this.files = [...this.files, file];\n this.fileInput.emit(file);\n this.input.value = \"\";\n\n return;\n }\n\n const sizeError = `Il file ${file.name} supera il limite di ${this.fileMaxSize}MB`;\n const formatError = `Il file ${file.name} ha un formato non supportato`;\n const errors = [\n !fileSizeOk && {cause: \"size\" as const, message: sizeError},\n !fileFormatOk && {cause: \"format\" as const, message: formatError},\n ].filter(Boolean);\n this.invalidFiles.set(file.name, errors);\n this.invalidFiles = new Map(this.invalidFiles); // trigger state update\n this.fileError.emit({file: file.name, errors});\n });\n }\n\n private resetErrors(): void {\n this.invalidFiles = new Map<string, ZFileUploadError[]>();\n }\n\n private onFilesChange(e: Event): void {\n this.checkFilesValidity((e.target as HTMLInputElement).files);\n }\n\n componentWillLoad(): void {\n // force default type on mobile and tablet viewport\n const mql = window.matchMedia(\"(max-width: 1151px)\");\n this._type = mql.matches ? ZFileUploadType.DEFAULT : this.type;\n mql.addEventListener(\"change\", (e) => {\n this._type = e.matches ? ZFileUploadType.DEFAULT : this.type;\n });\n }\n\n componentDidUpdate(): void {\n if (!this.showErrors || !this.invalidFiles.size) {\n return;\n }\n\n this.errorModal.open();\n }\n\n private renderDescription(cssClass): HTMLElement | undefined {\n if (!this.description) {\n return;\n }\n\n return (\n <span\n id=\"description\"\n class={cssClass}\n >\n {this.description}\n </span>\n );\n }\n\n private renderAllowedFilesMessage(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const defaultMessage =\n fileFormatString || fileWeightString ? `Puoi allegare file${fileFormatString}${fileWeightString}.` : undefined;\n\n if (!this.allowedFilesMessage && !defaultMessage) {\n return;\n }\n\n return <span class=\"allowed-files-message body-3\">{this.allowedFilesMessage || defaultMessage}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={{\"files-container\": true, \"hidden\": !this.files.length}}>\n <div class=\"uploaded-files-label heading-3-sb\">{this.uploadedFilesLabel}</div>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n type=\"file\"\n name={this.inputName}\n multiple\n onChange={(e) => this.onFilesChange(e)}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n >\n {this.uploadBtnLabel}\n </z-button>,\n this.renderInput(),\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFilesMessage(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFilesMessage()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private renderFileErrors(): HTMLElement[] {\n return Array.from(this.invalidFiles).map(([fileName, errors]) => {\n const prefix = `Il file ${fileName}`;\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"body-3-sb\">{fileName}</span>\n {errors.map(({message}) => message.replace(prefix, \"\")).join(\" e \")}.\n </span>\n );\n });\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n {this.mainTitle && (\n <div\n id=\"title\"\n class=\"heading-3-sb\"\n >\n {this.mainTitle}\n </div>\n )}\n {this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n {!!this.invalidFiles.size && this.showErrors && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => this.resetErrors()}\n onModalBackgroundClick={() => this.resetErrors()}\n >\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper body-3\">\n {this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()}\n </div>\n </div>\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"z-file-upload.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,6rEAA6rE,CAAC;AAChtE,0BAAe,SAAS;;MCUX,WAAW;;;;;oBAGEA,uBAAe,CAAC,OAAO;;;;;;8BAwBrB,QAAQ;gCAIN,+CAA+C;;sCAQzC,QAAQ;6BAIjB,6BAA6B;+BAI3B,uBAAuB;;kCAQpB,sBAAsB;8BAIzB,IAAI;yBAIlB,eAAe;0BAOf,IAAI;qBAIgB,IAAI,CAAC,IAAI;qBAI1B,EAAE;4BAI8B,IAAI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AC;YAC1D,MAAM,MAAM,GAAG,WAAW,QAAQ,EAAE,CAAC;YAErC,QACEA,kBAAM,KAAK,EAAC,eAAe,gBACjBA,kBAAM,KAAK,EAAC,WAAW,IAAE,QAAQ,CAAQ,EAChD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAC,OAAO,EAAC,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAC9D,EACP;SACH,CAAC,CAAC;KACJ;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,uDACF,IAAI,CAAC,SAAS,KACbD,kEACE,EAAE,EAAC,OAAO,EACV,KAAK,EAAC,cAAc,IAEnB,IAAI,CAAC,SAAS,CACX,CACP,EACA,IAAI,CAAC,KAAK,IAAID,uBAAe,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAC5F,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,KAC1CC,sEACE,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,cAAc,EAC/C,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,sBAAsB,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhDA,kEAAK,IAAI,EAAC,cAAc,IACtBA,kEAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,CACtE,CACF,CACE,CACX,CACI,EACP;KACH;;;;;;;","names":["ZFileUploadType","h","Host"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=scoped","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host .modal-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-text-link-blue);\n cursor: pointer;\n text-decoration: underline;\n}\n\n:host .text-container .upload-link:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none !important;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\n:host input[type=\"file\"] {\n display: none;\n}\n\n:host #title + #description {\n margin-top: var(--space-unit);\n}\n\n:host > * + z-button,\n:host > .files-container + *,\n:host > .files-container:not(:first-child) {\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .files-container.hidden {\n display: none;\n}\n\n:host > .files-container > .uploaded-files-label {\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n/* Tablet breakpoint */\n@media (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, ZFileUploadType} from \"../../../beans\";\n\nexport type ZFileUploadError = {cause: \"format\" | \"size\"; message: string};\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** Value to set on the file input's `name` attribute (for use with forms) */\n @Prop()\n inputName? = \"z-file-upload\";\n\n /**\n * Whether to show errors in the internal modal or leave the handling to the app.\n * Errors will still be emitted.\n */\n @Prop()\n showErrors = true;\n\n /** Internal store of the component type. It will change when viewport goes from desktop to tablet/mobile and vice versa */\n @State()\n private _type: ZFileUploadType = this.type;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** Map of files whose upload caused an error and the relative errors, with the cause and a message */\n @State()\n invalidFiles: Map<string, ZFileUploadError[]> = new Map<string, ZFileUploadError[]>();\n\n /** Input ref */\n @State()\n private input: HTMLInputElement;\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter<File>;\n\n /**\n * Emits an array of error messages related to one or more files not allowed.\n * Emitted when some file is dropped or selected.\n */\n @Event()\n fileError: EventEmitter<{file: string; errors: ZFileUploadError[]}>;\n\n @Element() host: HTMLZFileUploadElement;\n\n private errorModal: HTMLZModalElement;\n\n /** Listen `removeFile` event sent from z-file component */\n @Listen(\"removeFile\")\n onFileRemoved(e: CustomEvent): void {\n this.removeFile(e.detail.fileName);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.checkFilesValidity(this.input.files);\n }\n\n /** Get the list of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** Remove a previously uploaded file */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n const files = this.files;\n const index = files.findIndex((file) => file.name === fileName);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n\n private checkFilesValidity(files: FileList): Map<string, string[]> {\n if (!files.length) {\n return;\n }\n\n Array.from(files).forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk && !this.files.find((f) => f.name === file.name)) {\n this.files = [...this.files, file];\n this.fileInput.emit(file);\n this.input.value = \"\";\n\n return;\n }\n\n const sizeError = `Il file ${file.name} supera il limite di ${this.fileMaxSize}MB`;\n const formatError = `Il file ${file.name} ha un formato non supportato`;\n const errors = [\n !fileSizeOk && {cause: \"size\" as const, message: sizeError},\n !fileFormatOk && {cause: \"format\" as const, message: formatError},\n ].filter(Boolean);\n this.invalidFiles.set(file.name, errors);\n this.invalidFiles = new Map(this.invalidFiles); // trigger state update\n this.fileError.emit({file: file.name, errors});\n });\n }\n\n private resetErrors(): void {\n this.invalidFiles = new Map<string, ZFileUploadError[]>();\n }\n\n private onFilesChange(e: Event): void {\n this.checkFilesValidity((e.target as HTMLInputElement).files);\n }\n\n componentWillLoad(): void {\n // force default type on mobile and tablet viewport\n const mql = window.matchMedia(\"(max-width: 1151px)\");\n this._type = mql.matches ? ZFileUploadType.DEFAULT : this.type;\n mql.addEventListener(\"change\", (e) => {\n this._type = e.matches ? ZFileUploadType.DEFAULT : this.type;\n });\n }\n\n componentDidUpdate(): void {\n if (!this.showErrors || !this.invalidFiles.size) {\n return;\n }\n\n this.errorModal.open();\n }\n\n private renderDescription(cssClass): HTMLElement | undefined {\n if (!this.description) {\n return;\n }\n\n return (\n <span\n id=\"description\"\n class={cssClass}\n >\n {this.description}\n </span>\n );\n }\n\n private renderAllowedFilesMessage(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const defaultMessage =\n fileFormatString || fileWeightString ? `Puoi allegare file${fileFormatString}${fileWeightString}.` : undefined;\n\n if (!this.allowedFilesMessage && !defaultMessage) {\n return;\n }\n\n return <span class=\"allowed-files-message body-3\">{this.allowedFilesMessage || defaultMessage}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={{\"files-container\": true, \"hidden\": !this.files.length}}>\n <div class=\"uploaded-files-label heading-3-sb\">{this.uploadedFilesLabel}</div>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n type=\"file\"\n name={this.inputName}\n multiple\n onChange={(e) => this.onFilesChange(e)}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n >\n {this.uploadBtnLabel}\n </z-button>,\n this.renderInput(),\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFilesMessage(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFilesMessage()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private renderFileErrors(): HTMLElement[] {\n return Array.from(this.invalidFiles).map(([fileName, errors]) => {\n const prefix = `Il file ${fileName}`;\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"body-3-sb\">{fileName}</span>\n {errors.map(({message}) => message.replace(prefix, \"\")).join(\" e \")}.\n </span>\n );\n });\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n {this.mainTitle && (\n <div\n id=\"title\"\n class=\"heading-3-sb\"\n >\n {this.mainTitle}\n </div>\n )}\n {this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n {!!this.invalidFiles.size && this.showErrors && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => this.resetErrors()}\n onModalBackgroundClick={() => this.resetErrors()}\n >\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper body-3\">\n {this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()}\n </div>\n </div>\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -22,10 +22,11 @@ export class ZFileUpload {
22
22
  this._type = this.type;
23
23
  this.files = [];
24
24
  this.invalidFiles = new Map();
25
+ this.input = undefined;
25
26
  }
26
27
  /** Listen `removeFile` event sent from z-file component */
27
28
  onFileRemoved(e) {
28
- this.removeFile(e.detail);
29
+ this.removeFile(e.detail.fileName);
29
30
  }
30
31
  /** Listen fileDropped event sent from z-dragdrop-area component */
31
32
  fileDroppedListener(e) {
@@ -169,7 +170,7 @@ export class ZFileUpload {
169
170
  });
170
171
  }
171
172
  render() {
172
- return (h(Host, { key: 'ea57cc0462e4358d04bfc8f5709b61be50947e7a' }, this.mainTitle && (h("div", { key: '59e23f66172333b963922832782a8ac89611acb9', id: "title", class: "heading-3-sb" }, this.mainTitle)), this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode(), !!this.invalidFiles.size && this.showErrors && (h("z-modal", { key: '64cb55a1c0fb491a9dd5b414a309b284e4f2d24e', modalid: `file-upload-${this.type}-error-modal`, ref: (val) => (this.errorModal = val), modaltitle: this.errorModalTitle, onModalClose: () => this.resetErrors(), onModalBackgroundClick: () => this.resetErrors() }, h("div", { key: '255cf2140f1ca881f90df6952965abc8f364f4d0', slot: "modalContent" }, h("div", { key: '03638b6b970c72c73ac7014f0c7848a032029963', class: "modal-wrapper body-3" }, this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()))))));
173
+ return (h(Host, { key: '13ada780c37ca16c2153f8c1177864932fe299dd' }, this.mainTitle && (h("div", { key: 'dcf55ac93e6959136262d0422272ab4902c3cbed', id: "title", class: "heading-3-sb" }, this.mainTitle)), this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode(), !!this.invalidFiles.size && this.showErrors && (h("z-modal", { key: 'e7d8c001c513ab498779c752dc195ab03ec81a80', modalid: `file-upload-${this.type}-error-modal`, ref: (val) => (this.errorModal = val), modaltitle: this.errorModalTitle, onModalClose: () => this.resetErrors(), onModalBackgroundClick: () => this.resetErrors() }, h("div", { key: 'e5262f2f8b42dfe38ad4b794b08b4bf6b83b4a7a', slot: "modalContent" }, h("div", { key: '5e50b460de47813678ea1e2d3a2a3e0e76d0a6d0', class: "modal-wrapper body-3" }, this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()))))));
173
174
  }
174
175
  static get is() { return "z-file-upload"; }
175
176
  static get encapsulation() { return "scoped"; }
@@ -502,7 +503,8 @@ export class ZFileUpload {
502
503
  return {
503
504
  "_type": {},
504
505
  "files": {},
505
- "invalidFiles": {}
506
+ "invalidFiles": {},
507
+ "input": {}
506
508
  };
507
509
  }
508
510
  static get events() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/file-upload/z-file-upload/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAU9D,MAAM,OAAO,WAAW;;oBAGE,eAAe,CAAC,OAAO;;;;;;8BAwBrB,QAAQ;gCAIN,+CAA+C;;sCAQzC,QAAQ;6BAIjB,6BAA6B;+BAI3B,uBAAuB;;kCAQpB,sBAAsB;8BAIzB,IAAI;yBAIlB,eAAe;0BAOf,IAAI;qBAIgB,IAAI,CAAC,IAAI;qBAI1B,EAAE;4BAI8B,IAAI,GAAG,EAA8B;;IAmBrF,2DAA2D;IAE3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AC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,CAC9C,gEACE,OAAO,EAAE,eAAe,IAAI,CAAC,IAAI,cAAc,EAC/C,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,EACtC,sBAAsB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;gBAEhD,4DAAK,IAAI,EAAC,cAAc;oBACtB,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CACtE,CACF,CACE,CACX,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, ZFileUploadType} from \"../../../beans\";\n\nexport type ZFileUploadError = {cause: \"format\" | \"size\"; message: string};\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** Value to set on the file input's `name` attribute (for use with forms) */\n @Prop()\n inputName? = \"z-file-upload\";\n\n /**\n * Whether to show errors in the internal modal or leave the handling to the app.\n * Errors will still be emitted.\n */\n @Prop()\n showErrors = true;\n\n /** Internal store of the component type. It will change when viewport goes from desktop to tablet/mobile and vice versa */\n @State()\n private _type: ZFileUploadType = this.type;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** Map of files whose upload caused an error and the relative errors, with the cause and a message */\n @State()\n invalidFiles: Map<string, ZFileUploadError[]> = new Map<string, ZFileUploadError[]>();\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter<File>;\n\n /**\n * Emits an array of error messages related to one or more files not allowed.\n * Emitted when some file is dropped or selected.\n */\n @Event()\n fileError: EventEmitter<{file: string; errors: ZFileUploadError[]}>;\n\n @Element() host: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private errorModal: HTMLZModalElement;\n\n /** Listen `removeFile` event sent from z-file component */\n @Listen(\"removeFile\")\n onFileRemoved(e: CustomEvent): void {\n this.removeFile(e.detail);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.checkFilesValidity(this.input.files);\n }\n\n /** Get the list of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** Remove a previously uploaded file */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n const files = this.files;\n const index = files.findIndex((file) => file.name === fileName);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n\n private checkFilesValidity(files: FileList): Map<string, string[]> {\n if (!files.length) {\n return;\n }\n\n Array.from(files).forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk && !this.files.find((f) => f.name === file.name)) {\n this.files = [...this.files, file];\n this.fileInput.emit(file);\n this.input.value = \"\";\n\n return;\n }\n\n const sizeError = `Il file ${file.name} supera il limite di ${this.fileMaxSize}MB`;\n const formatError = `Il file ${file.name} ha un formato non supportato`;\n const errors = [\n !fileSizeOk && {cause: \"size\" as const, message: sizeError},\n !fileFormatOk && {cause: \"format\" as const, message: formatError},\n ].filter(Boolean);\n this.invalidFiles.set(file.name, errors);\n this.invalidFiles = new Map(this.invalidFiles); // trigger state update\n this.fileError.emit({file: file.name, errors});\n });\n }\n\n private resetErrors(): void {\n this.invalidFiles = new Map<string, ZFileUploadError[]>();\n }\n\n private onFilesChange(e: Event): void {\n this.checkFilesValidity((e.target as HTMLInputElement).files);\n }\n\n componentWillLoad(): void {\n // force default type on mobile and tablet viewport\n const mql = window.matchMedia(\"(max-width: 1151px)\");\n this._type = mql.matches ? ZFileUploadType.DEFAULT : this.type;\n mql.addEventListener(\"change\", (e) => {\n this._type = e.matches ? ZFileUploadType.DEFAULT : this.type;\n });\n }\n\n componentDidUpdate(): void {\n if (!this.showErrors || !this.invalidFiles.size) {\n return;\n }\n\n this.errorModal.open();\n }\n\n private renderDescription(cssClass): HTMLElement | undefined {\n if (!this.description) {\n return;\n }\n\n return (\n <span\n id=\"description\"\n class={cssClass}\n >\n {this.description}\n </span>\n );\n }\n\n private renderAllowedFilesMessage(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const defaultMessage =\n fileFormatString || fileWeightString ? `Puoi allegare file${fileFormatString}${fileWeightString}.` : undefined;\n\n if (!this.allowedFilesMessage && !defaultMessage) {\n return;\n }\n\n return <span class=\"allowed-files-message body-3\">{this.allowedFilesMessage || defaultMessage}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={{\"files-container\": true, \"hidden\": !this.files.length}}>\n <div class=\"uploaded-files-label heading-3-sb\">{this.uploadedFilesLabel}</div>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n type=\"file\"\n name={this.inputName}\n multiple\n onChange={(e) => this.onFilesChange(e)}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n >\n {this.uploadBtnLabel}\n </z-button>,\n this.renderInput(),\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFilesMessage(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFilesMessage()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private renderFileErrors(): HTMLElement[] {\n return Array.from(this.invalidFiles).map(([fileName, errors]) => {\n const prefix = `Il file ${fileName}`;\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"body-3-sb\">{fileName}</span>\n {errors.map(({message}) => message.replace(prefix, \"\")).join(\" e \")}.\n </span>\n );\n });\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n {this.mainTitle && (\n <div\n id=\"title\"\n class=\"heading-3-sb\"\n >\n {this.mainTitle}\n </div>\n )}\n {this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n {!!this.invalidFiles.size && this.showErrors && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => this.resetErrors()}\n onModalBackgroundClick={() => this.resetErrors()}\n >\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper body-3\">\n {this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()}\n </div>\n </div>\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/file-upload/z-file-upload/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAU9D,MAAM,OAAO,WAAW;;oBAGE,eAAe,CAAC,OAAO;;;;;;8BAwBrB,QAAQ;gCAIN,+CAA+C;;sCAQzC,QAAQ;6BAIjB,6BAA6B;+BAI3B,uBAAuB;;kCAQpB,sBAAsB;8BAIzB,IAAI;yBAIlB,eAAe;0BAOf,IAAI;qBAIgB,IAAI,CAAC,IAAI;qBAI1B,EAAE;4BAI8B,IAAI,GAAG,EAA8B;;;IAqBrF,2DAA2D;IAE3D,aAAa,CAAC,CAAc;QAC1B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,mEAAmE;IAEnE,mBAAmB,CAAC,CAAc;QAChC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,qCAAqC;IAErC,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC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,4DAAK,IAAI,EAAC,cAAc;oBACtB,4DAAK,KAAK,EAAC,sBAAsB,IAC9B,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CACtE,CACF,CACE,CACX,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h} from \"@stencil/core\";\nimport {ButtonVariant, ZFileUploadType} from \"../../../beans\";\n\nexport type ZFileUploadError = {cause: \"format\" | \"size\"; message: string};\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** allowed file message */\n @Prop()\n allowedFilesMessage?: string;\n\n /** upload clickable message */\n @Prop()\n uploadClickableMessage?: string = \"Carica\";\n\n /** upload message */\n @Prop()\n uploadMessage?: string = \"o trascina dal tuo computer\";\n\n /** error modal title */\n @Prop()\n errorModalTitle?: string = \"Errore di caricamento\";\n\n /** error modal message */\n @Prop()\n errorModalMessage?: string;\n\n /** loaded files label */\n @Prop()\n uploadedFilesLabel?: string = \"File appena caricati\";\n\n /** uploaded files history rendering */\n @Prop()\n hasFileSection?: boolean = true;\n\n /** Value to set on the file input's `name` attribute (for use with forms) */\n @Prop()\n inputName? = \"z-file-upload\";\n\n /**\n * Whether to show errors in the internal modal or leave the handling to the app.\n * Errors will still be emitted.\n */\n @Prop()\n showErrors = true;\n\n /** Internal store of the component type. It will change when viewport goes from desktop to tablet/mobile and vice versa */\n @State()\n private _type: ZFileUploadType = this.type;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** Map of files whose upload caused an error and the relative errors, with the cause and a message */\n @State()\n invalidFiles: Map<string, ZFileUploadError[]> = new Map<string, ZFileUploadError[]>();\n\n /** Input ref */\n @State()\n private input: HTMLInputElement;\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter<File>;\n\n /**\n * Emits an array of error messages related to one or more files not allowed.\n * Emitted when some file is dropped or selected.\n */\n @Event()\n fileError: EventEmitter<{file: string; errors: ZFileUploadError[]}>;\n\n @Element() host: HTMLZFileUploadElement;\n\n private errorModal: HTMLZModalElement;\n\n /** Listen `removeFile` event sent from z-file component */\n @Listen(\"removeFile\")\n onFileRemoved(e: CustomEvent): void {\n this.removeFile(e.detail.fileName);\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.checkFilesValidity(this.input.files);\n }\n\n /** Get the list of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n /** Remove a previously uploaded file */\n @Method()\n async removeFile(fileName: string): Promise<void> {\n const files = this.files;\n const index = files.findIndex((file) => file.name === fileName);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n\n private checkFilesValidity(files: FileList): Map<string, string[]> {\n if (!files.length) {\n return;\n }\n\n Array.from(files).forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk && !this.files.find((f) => f.name === file.name)) {\n this.files = [...this.files, file];\n this.fileInput.emit(file);\n this.input.value = \"\";\n\n return;\n }\n\n const sizeError = `Il file ${file.name} supera il limite di ${this.fileMaxSize}MB`;\n const formatError = `Il file ${file.name} ha un formato non supportato`;\n const errors = [\n !fileSizeOk && {cause: \"size\" as const, message: sizeError},\n !fileFormatOk && {cause: \"format\" as const, message: formatError},\n ].filter(Boolean);\n this.invalidFiles.set(file.name, errors);\n this.invalidFiles = new Map(this.invalidFiles); // trigger state update\n this.fileError.emit({file: file.name, errors});\n });\n }\n\n private resetErrors(): void {\n this.invalidFiles = new Map<string, ZFileUploadError[]>();\n }\n\n private onFilesChange(e: Event): void {\n this.checkFilesValidity((e.target as HTMLInputElement).files);\n }\n\n componentWillLoad(): void {\n // force default type on mobile and tablet viewport\n const mql = window.matchMedia(\"(max-width: 1151px)\");\n this._type = mql.matches ? ZFileUploadType.DEFAULT : this.type;\n mql.addEventListener(\"change\", (e) => {\n this._type = e.matches ? ZFileUploadType.DEFAULT : this.type;\n });\n }\n\n componentDidUpdate(): void {\n if (!this.showErrors || !this.invalidFiles.size) {\n return;\n }\n\n this.errorModal.open();\n }\n\n private renderDescription(cssClass): HTMLElement | undefined {\n if (!this.description) {\n return;\n }\n\n return (\n <span\n id=\"description\"\n class={cssClass}\n >\n {this.description}\n </span>\n );\n }\n\n private renderAllowedFilesMessage(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const defaultMessage =\n fileFormatString || fileWeightString ? `Puoi allegare file${fileFormatString}${fileWeightString}.` : undefined;\n\n if (!this.allowedFilesMessage && !defaultMessage) {\n return;\n }\n\n return <span class=\"allowed-files-message body-3\">{this.allowedFilesMessage || defaultMessage}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n if (!this.hasFileSection) {\n return;\n }\n\n return (\n <section class={{\"files-container\": true, \"hidden\": !this.files.length}}>\n <div class=\"uploaded-files-label heading-3-sb\">{this.uploadedFilesLabel}</div>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n type=\"file\"\n name={this.inputName}\n multiple\n onChange={(e) => this.onFilesChange(e)}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n >\n {this.uploadBtnLabel}\n </z-button>,\n this.renderInput(),\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n >\n {this.uploadClickableMessage}\n </span>{\" \"}\n {this.uploadMessage}\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFilesMessage(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFilesMessage()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private renderFileErrors(): HTMLElement[] {\n return Array.from(this.invalidFiles).map(([fileName, errors]) => {\n const prefix = `Il file ${fileName}`;\n\n return (\n <span class=\"error-message\">\n Il file <span class=\"body-3-sb\">{fileName}</span>\n {errors.map(({message}) => message.replace(prefix, \"\")).join(\" e \")}.\n </span>\n );\n });\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n {this.mainTitle && (\n <div\n id=\"title\"\n class=\"heading-3-sb\"\n >\n {this.mainTitle}\n </div>\n )}\n {this._type == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n {!!this.invalidFiles.size && this.showErrors && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n ref={(val) => (this.errorModal = val)}\n modaltitle={this.errorModalTitle}\n onModalClose={() => this.resetErrors()}\n onModalBackgroundClick={() => this.resetErrors()}\n >\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper body-3\">\n {this.errorModalMessage ? this.errorModalMessage : this.renderFileErrors()}\n </div>\n </div>\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"]}