@dso-toolkit/core 70.0.0 → 70.0.1

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.
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy(JSON.parse("[[\"dso-icon\",[[1,\"dso-icon\",{\"icon\":[1]}]]],[\"dsot-document-component-demo\",[[2,\"dsot-document-component-demo\",{\"showCanvas\":[516,\"show-canvas\"],\"jsonFile\":[1,\"json-file\"],\"openDefault\":[4,\"open-default\"],\"mode\":[513],\"response\":[32],\"document\":[32],\"openOrClosed\":[32],\"openedAnnotation\":[32],\"filtered\":[32],\"notApplicable\":[32],\"activeAnnotationSelectables\":[32]},null,{\"jsonFile\":[\"jsonFileWatcher\"],\"openDefault\":[\"openDefaultWatcher\"]}]]],[\"dso-accordion-section\",[[1,\"dso-accordion-section\",{\"handleTitle\":[1,\"handle-title\"],\"wijzigactie\":[1],\"heading\":[1],\"handleUrl\":[1,\"handle-url\"],\"status\":[1],\"attachmentCount\":[2,\"attachment-count\"],\"icon\":[1],\"statusDescription\":[1,\"status-description\"],\"open\":[516],\"hasNestedAccordion\":[516,\"has-nested-accordion\"],\"label\":[1],\"labelStatus\":[1,\"label-status\"],\"activatable\":[516],\"active\":[516],\"hover\":[32],\"focusHandle\":[64]}]]],[\"dso-annotation-activiteit\",[[1,\"dso-annotation-activiteit\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1],\"regelKwalificatie\":[1,\"regel-kwalificatie\"],\"locatieNoemers\":[16],\"regelKwalificatieVoorzetsel\":[1,\"regel-kwalificatie-voorzetsel\"]}]]],[\"dso-annotation-gebiedsaanwijzing\",[[1,\"dso-annotation-gebiedsaanwijzing\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1]}]]],[\"dso-annotation-omgevingsnormwaarde\",[[1,\"dso-annotation-omgevingsnormwaarde\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1],\"toelichting\":[1],\"waardes\":[16],\"eenheid\":[1]}]]],[\"dso-advanced-select\",[[1,\"dso-advanced-select\",{\"options\":[16],\"active\":[16],\"activeHint\":[1,\"active-hint\"],\"open\":[32]},[[8,\"keydown\",\"keyDownListener\"]]]]],[\"dso-legend-item\",[[1,\"dso-legend-item\",{\"disabled\":[516],\"disabledMessage\":[1,\"disabled-message\"],\"removable\":[4],\"showBody\":[32]}]]],[\"dso-map-base-layers\",[[1,\"dso-map-base-layers\",{\"group\":[1],\"baseLayers\":[16]}]]],[\"dso-map-overlays\",[[1,\"dso-map-overlays\",{\"group\":[1],\"overlays\":[16]}]]],[\"dso-annotation-kaart\",[[1,\"dso-annotation-kaart\",{\"wijzigactie\":[513],\"naam\":[1],\"href\":[513]}]]],[\"dso-autosuggest\",[[6,\"dso-autosuggest\",{\"suggestions\":[16],\"loading\":[4],\"loadingLabel\":[1,\"loading-label\"],\"loadingDelayed\":[2,\"loading-delayed\"],\"notFoundLabel\":[1,\"not-found-label\"],\"suggestOnFocus\":[4,\"suggest-on-focus\"],\"mark\":[16],\"showSuggestions\":[32],\"selectedSuggestion\":[32],\"selectedSuggestionGroup\":[32],\"notFound\":[32],\"showLoading\":[32],\"listItemBlockSize\":[32],\"listboxContainerMaxBlockSize\":[32]},[[4,\"click\",\"onDocumentClick\"]],{\"suggestions\":[\"suggestionsWatcher\"]}]]],[\"dso-project-item\",[[1,\"dso-project-item\",{\"label\":[1]}]]],[\"dso-header\",[[1,\"dso-header\",{\"mainMenu\":[16],\"useDropDownMenu\":[1,\"use-drop-down-menu\"],\"authStatus\":[1,\"auth-status\"],\"loginUrl\":[1,\"login-url\"],\"logoutUrl\":[1,\"logout-url\"],\"showHelp\":[4,\"show-help\"],\"helpUrl\":[1,\"help-url\"],\"userProfileName\":[1,\"user-profile-name\"],\"userProfileUrl\":[1,\"user-profile-url\"],\"userHomeUrl\":[1,\"user-home-url\"],\"userHomeActive\":[4,\"user-home-active\"],\"showDropDown\":[32],\"overflowMenuItems\":[32],\"dropdownOptionsOffset\":[32]},null,{\"useDropDownMenu\":[\"setShowDropDown\"]}]]],[\"dso-map-controls\",[[1,\"dso-map-controls\",{\"open\":[1540],\"disableZoom\":[1,\"disable-zoom\"],\"hideContent\":[32],\"toggleVisibility\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"dso-modal\",[[1,\"dso-modal\",{\"fullscreen\":[516],\"modalTitle\":[1,\"modal-title\"],\"dialogRole\":[1,\"dialog-role\"],\"returnFocus\":[4,\"return-focus\"],\"showCloseButton\":[4,\"show-close-button\"],\"ariaId\":[32]}]]],[\"dso-pagination\",[[1,\"dso-pagination\",{\"totalPages\":[2,\"total-pages\"],\"currentPage\":[2,\"current-page\"],\"formatHref\":[16],\"availablePositions\":[32]},[[0,\"dsoSizeChange\",\"sizeChangeHandler\"]]]]],[\"dso-survey-rating\",[[1,\"dso-survey-rating\"]]],[\"dso-tree-view\",[[1,\"dso-tree-view\",{\"collection\":[16],\"focusItem\":[64]}]]],[\"dso-action-list-item\",[[1,\"dso-action-list-item\",{\"step\":[2],\"itemTitle\":[1,\"item-title\"],\"flowLine\":[4,\"flow-line\"],\"warning\":[4],\"divider\":[4]}]]],[\"dso-card\",[[1,\"dso-card\",{\"href\":[513],\"mode\":[513],\"active\":[516]}]]],[\"dso-date-picker-legacy\",[[2,\"dso-date-picker-legacy\",{\"name\":[1],\"identifier\":[1],\"disabled\":[516],\"role\":[1],\"direction\":[1],\"required\":[4],\"invalid\":[516],\"describedBy\":[1,\"described-by\"],\"dsoAutofocus\":[4,\"dso-autofocus\"],\"value\":[1537],\"min\":[1],\"max\":[1],\"activeFocus\":[32],\"focusedDay\":[32],\"open\":[32],\"visible\":[32],\"setFocus\":[64],\"show\":[64],\"hide\":[64]},[[6,\"click\",\"handleDocumentClick\"]]]]],[\"dso-document-card\",[[1,\"dso-document-card\",{\"href\":[513],\"active\":[516]}]]],[\"dso-list-button\",[[1,\"dso-list-button\",{\"label\":[1],\"sublabel\":[1],\"count\":[2],\"min\":[8],\"max\":[8],\"checked\":[516],\"disabled\":[516],\"subcontentPrefix\":[1,\"subcontent-prefix\"]}]]],[\"dso-mark-bar\",[[1,\"dso-mark-bar\",{\"value\":[1],\"label\":[1],\"current\":[2],\"totalCount\":[2,\"total-count\"],\"dsoFocus\":[64]}]]],[\"dso-plekinfo-card\",[[1,\"dso-plekinfo-card\",{\"wijzigactie\":[513],\"href\":[513],\"targetBlank\":[4,\"target-blank\"],\"active\":[516]}]]],[\"dso-skiplink\",[[1,\"dso-skiplink\",{\"to\":[513],\"label\":[513]}]]],[\"dso-accordion\",[[1,\"dso-accordion\",{\"variant\":[6145],\"reverseAlign\":[6148,\"reverse-align\"],\"_getState\":[64]}]]],[\"dso-action-list\",[[1,\"dso-action-list\",{\"listTitle\":[1,\"list-title\"]}]]],[\"dso-banner\",[[1,\"dso-banner\",{\"status\":[513],\"compact\":[4],\"icon\":[516]}]]],[\"dso-card-container\",[[1,\"dso-card-container\",{\"mode\":[513]}]]],[\"dso-contact-information\",[[1,\"dso-contact-information\"]]],[\"dso-date-picker\",[[2,\"dso-date-picker\",{\"name\":[1],\"identifier\":[1],\"disabled\":[516],\"required\":[516],\"invalid\":[516],\"describedBy\":[1,\"described-by\"],\"dsoAutofocus\":[4,\"dso-autofocus\"],\"value\":[513],\"min\":[1],\"max\":[1]}]]],[\"dso-highlight-box\",[[1,\"dso-highlight-box\",{\"yellow\":[516],\"border\":[516],\"white\":[516],\"dropShadow\":[516,\"drop-shadow\"],\"step\":[514]}]]],[\"dso-input-range\",[[1,\"dso-input-range\",{\"min\":[2],\"max\":[2],\"value\":[2],\"step\":[2],\"label\":[1],\"unit\":[1],\"description\":[1]}]]],[\"dso-logo\",[[1,\"dso-logo\",{\"name\":[513],\"logoUrl\":[513,\"logo-url\"],\"label\":[513],\"labelUrl\":[513,\"label-url\"],\"ribbon\":[513]}]]],[\"dso-progress-bar\",[[1,\"dso-progress-bar\",{\"progress\":[2],\"min\":[2],\"max\":[2]}]]],[\"dso-tab\",[[1,\"dso-tab\",{\"active\":[516],\"disabled\":[516],\"href\":[1],\"_dsoFocus\":[64]}]]],[\"dso-tabs\",[[1,\"dso-tabs\"]]],[\"dso-viewer-grid\",[[1,\"dso-viewer-grid\",{\"mode\":[513],\"filterpanelTitle\":[513,\"filterpanel-title\"],\"filterpanelOpen\":[516,\"filterpanel-open\"],\"overlayOpen\":[516,\"overlay-open\"],\"documentPanelOpen\":[516,\"document-panel-open\"],\"mainSize\":[513,\"main-size\"],\"activeTab\":[1,\"active-tab\"],\"documentPanelSize\":[513,\"document-panel-size\"],\"mainPanelExpanded\":[4,\"main-panel-expanded\"],\"mainPanelHidden\":[4,\"main-panel-hidden\"],\"tabView\":[32],\"_checkMainPanelVisibility\":[64]},null,{\"documentPanelOpen\":[\"documentPanelOpenWatcher\"],\"filterpanelOpen\":[\"filterpanelOpenWatcher\"],\"overlayOpen\":[\"overlayOpenWatcher\"]}]]],[\"dso-toggletip\",[[1,\"dso-toggletip\",{\"label\":[1],\"position\":[1],\"small\":[4],\"secondary\":[4],\"active\":[32]}]]],[\"dso-dropdown-menu\",[[1,\"dso-dropdown-menu\",{\"open\":[1540],\"dropdownAlign\":[1,\"dropdown-align\"],\"dropdownOptionsOffset\":[2,\"dropdown-options-offset\"],\"checkable\":[4],\"boundary\":[1],\"placement\":[1],\"strategy\":[1]},[[8,\"click\",\"onClick\"],[8,\"keydown\",\"keyDownListener\"]],{\"placement\":[\"watchPosition\"],\"dropdownAlign\":[\"watchPosition\"],\"dropdownOptionsOffset\":[\"watchOptionsOffset\"],\"strategy\":[\"watchStrategy\"]}]]],[\"dso-annotation-locatie_2\",[[1,\"dso-document-component\",{\"heading\":[1],\"label\":[1],\"nummer\":[1],\"opschrift\":[1],\"kop\":[1],\"inhoud\":[1],\"open\":[516],\"filtered\":[516],\"notApplicable\":[516,\"not-applicable\"],\"genesteOntwerpInformatie\":[516,\"geneste-ontwerp-informatie\"],\"bevatOntwerpInformatie\":[516,\"bevat-ontwerp-informatie\"],\"annotated\":[516],\"gereserveerd\":[4],\"vervallen\":[4],\"openAnnotation\":[516,\"open-annotation\"],\"alternativeTitle\":[1,\"alternative-title\"],\"type\":[513],\"wijzigactie\":[513],\"annotationsWijzigactie\":[513,\"annotations-wijzigactie\"],\"mark\":[16],\"recursiveToggle\":[8,\"recursive-toggle\"],\"mode\":[513],\"href\":[513]}],[1,\"dso-annotation-locatie\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"locatieNoemer\":[1,\"locatie-noemer\"]}]]],[\"dso-attachments-counter_2\",[[1,\"dso-attachments-counter\",{\"count\":[2]}],[1,\"dso-expandable\",{\"open\":[516],\"enableAnimation\":[516,\"enable-animation\"],\"minimumHeight\":[2,\"minimum-height\"],\"isClosed\":[32]},[[0,\"transitionstart\",\"transitionstartHandler\"],[0,\"transitionend\",\"transitionendHandler\"]],{\"open\":[\"toggleOpen\"]}]]],[\"dso-progress-indicator\",[[1,\"dso-progress-indicator\",{\"label\":[1],\"size\":[513],\"block\":[516]}]]],[\"dso-responsive-element\",[[1,\"dso-responsive-element\",{\"sizeAlias\":[32],\"sizeWidth\":[32],\"getSize\":[64]}]]],[\"dso-scrollable\",[[1,\"dso-scrollable\",{\"scrollPosition\":[32],\"_setScrollState\":[64]}]]],[\"dso-info-button\",[[1,\"dso-info-button\",{\"active\":[1540],\"secondary\":[4],\"label\":[1],\"hover\":[32],\"setFocus\":[64]}]]],[\"dso-info_2\",[[6,\"dso-selectable\",{\"type\":[1],\"identifier\":[1],\"name\":[1],\"value\":[1],\"invalid\":[4],\"describedById\":[1,\"described-by-id\"],\"labelledById\":[1,\"labelled-by-id\"],\"disabled\":[4],\"required\":[4],\"checked\":[516],\"indeterminate\":[4],\"infoFixed\":[4,\"info-fixed\"],\"infoActive\":[32],\"keyboardFocus\":[32],\"toggleInfo\":[64]},null,{\"indeterminate\":[\"setIndeterminate\"]}],[1,\"dso-info\",{\"fixed\":[516],\"active\":[516]}]]],[\"dso-tooltip\",[[1,\"dso-tooltip\",{\"descriptive\":[516],\"position\":[1],\"strategy\":[1],\"noArrow\":[4,\"no-arrow\"],\"stateless\":[4],\"small\":[4],\"active\":[1540],\"hidden\":[32],\"activate\":[64],\"deactivate\":[64]},null,{\"position\":[\"watchPosition\"],\"strategy\":[\"watchStrategy\"],\"active\":[\"watchActive\"]}]]],[\"dso-alert_6\",[[1,\"dso-ozon-content\",{\"content\":[1],\"inline\":[516],\"addSpaceBeforeNode\":[516,\"add-space-before-node\"],\"mark\":[16],\"state\":[32]},null,{\"content\":[\"contentWatcher\"]}],[1,\"dso-alert\",{\"status\":[513],\"roleAlert\":[4,\"role-alert\"],\"compact\":[516],\"closable\":[4]}],[1,\"dso-image-overlay\",{\"wijzigactie\":[1],\"active\":[32],\"zoomable\":[32]},[[2,\"load\",\"loadListener\"]]],[1,\"dso-panel\",{\"closeButtonLabel\":[1,\"close-button-label\"],\"emphasized\":[4]}],[1,\"dso-table\",{\"noModal\":[516,\"no-modal\"],\"isResponsive\":[516,\"is-responsive\"],\"modalActive\":[32],\"placeholderHeight\":[32]}],[1,\"dso-badge\",{\"status\":[1]}]]],[\"dso-label_3\",[[1,\"dso-renvooi\",{\"value\":[1],\"mark\":[16]}],[6,\"dso-slide-toggle\",{\"checked\":[4],\"disabled\":[4],\"accessibleLabel\":[1,\"accessible-label\"],\"labelledbyId\":[1,\"labelledby-id\"],\"identifier\":[1],\"hasVisibleLabel\":[32]}],[1,\"dso-label\",{\"compact\":[4],\"removable\":[516],\"status\":[1],\"truncate\":[4],\"removeHover\":[32],\"removeFocus\":[32],\"textHover\":[32],\"textFocus\":[32],\"isTruncated\":[32],\"labelText\":[32],\"_truncateLabel\":[64]},[[4,\"keydown\",\"keyDownListener\"]],{\"removable\":[\"watchRemovable\"],\"truncate\":[\"watchTruncate\"]}]]]]"), options);
8
+ return bootstrapLazy(JSON.parse("[[\"dso-icon\",[[1,\"dso-icon\",{\"icon\":[1]}]]],[\"dsot-document-component-demo\",[[2,\"dsot-document-component-demo\",{\"showCanvas\":[516,\"show-canvas\"],\"jsonFile\":[1,\"json-file\"],\"openDefault\":[4,\"open-default\"],\"mode\":[513],\"response\":[32],\"document\":[32],\"openOrClosed\":[32],\"openedAnnotation\":[32],\"filtered\":[32],\"notApplicable\":[32],\"activeAnnotationSelectables\":[32]},null,{\"jsonFile\":[\"jsonFileWatcher\"],\"openDefault\":[\"openDefaultWatcher\"]}]]],[\"dso-accordion-section\",[[1,\"dso-accordion-section\",{\"handleTitle\":[1,\"handle-title\"],\"wijzigactie\":[1],\"heading\":[1],\"handleUrl\":[1,\"handle-url\"],\"status\":[1],\"attachmentCount\":[2,\"attachment-count\"],\"icon\":[1],\"statusDescription\":[1,\"status-description\"],\"open\":[516],\"hasNestedAccordion\":[516,\"has-nested-accordion\"],\"label\":[1],\"labelStatus\":[1,\"label-status\"],\"activatable\":[516],\"active\":[516],\"hover\":[32],\"focusHandle\":[64]}]]],[\"dso-annotation-activiteit\",[[1,\"dso-annotation-activiteit\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1],\"regelKwalificatie\":[1,\"regel-kwalificatie\"],\"locatieNoemers\":[16],\"regelKwalificatieVoorzetsel\":[1,\"regel-kwalificatie-voorzetsel\"]}]]],[\"dso-annotation-gebiedsaanwijzing\",[[1,\"dso-annotation-gebiedsaanwijzing\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1]}]]],[\"dso-annotation-omgevingsnormwaarde\",[[1,\"dso-annotation-omgevingsnormwaarde\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"naam\":[1],\"toelichting\":[1],\"waardes\":[16],\"eenheid\":[1]}]]],[\"dso-advanced-select\",[[1,\"dso-advanced-select\",{\"options\":[16],\"active\":[16],\"activeHint\":[1,\"active-hint\"],\"open\":[32]},[[8,\"keydown\",\"keyDownListener\"]]]]],[\"dso-legend-item\",[[1,\"dso-legend-item\",{\"disabled\":[516],\"disabledMessage\":[1,\"disabled-message\"],\"removable\":[4],\"showBody\":[32]}]]],[\"dso-map-base-layers\",[[1,\"dso-map-base-layers\",{\"group\":[1],\"baseLayers\":[16]}]]],[\"dso-map-overlays\",[[1,\"dso-map-overlays\",{\"group\":[1],\"overlays\":[16]}]]],[\"dso-annotation-kaart\",[[1,\"dso-annotation-kaart\",{\"wijzigactie\":[513],\"naam\":[1],\"href\":[513]}]]],[\"dso-autosuggest\",[[6,\"dso-autosuggest\",{\"suggestions\":[16],\"loading\":[4],\"loadingLabel\":[1,\"loading-label\"],\"loadingDelayed\":[2,\"loading-delayed\"],\"notFoundLabel\":[1,\"not-found-label\"],\"suggestOnFocus\":[4,\"suggest-on-focus\"],\"mark\":[16],\"showSuggestions\":[32],\"selectedSuggestion\":[32],\"selectedSuggestionGroup\":[32],\"notFound\":[32],\"showLoading\":[32],\"listboxContainerMaxBlockSize\":[32]},[[4,\"click\",\"onDocumentClick\"]],{\"suggestions\":[\"suggestionsWatcher\"]}]]],[\"dso-project-item\",[[1,\"dso-project-item\",{\"label\":[1]}]]],[\"dso-header\",[[1,\"dso-header\",{\"mainMenu\":[16],\"useDropDownMenu\":[1,\"use-drop-down-menu\"],\"authStatus\":[1,\"auth-status\"],\"loginUrl\":[1,\"login-url\"],\"logoutUrl\":[1,\"logout-url\"],\"showHelp\":[4,\"show-help\"],\"helpUrl\":[1,\"help-url\"],\"userProfileName\":[1,\"user-profile-name\"],\"userProfileUrl\":[1,\"user-profile-url\"],\"userHomeUrl\":[1,\"user-home-url\"],\"userHomeActive\":[4,\"user-home-active\"],\"showDropDown\":[32],\"overflowMenuItems\":[32],\"dropdownOptionsOffset\":[32]},null,{\"useDropDownMenu\":[\"setShowDropDown\"]}]]],[\"dso-map-controls\",[[1,\"dso-map-controls\",{\"open\":[1540],\"disableZoom\":[1,\"disable-zoom\"],\"hideContent\":[32],\"toggleVisibility\":[64]},null,{\"open\":[\"watchOpen\"]}]]],[\"dso-modal\",[[1,\"dso-modal\",{\"fullscreen\":[516],\"modalTitle\":[1,\"modal-title\"],\"dialogRole\":[1,\"dialog-role\"],\"returnFocus\":[4,\"return-focus\"],\"showCloseButton\":[4,\"show-close-button\"],\"ariaId\":[32]}]]],[\"dso-pagination\",[[1,\"dso-pagination\",{\"totalPages\":[2,\"total-pages\"],\"currentPage\":[2,\"current-page\"],\"formatHref\":[16],\"availablePositions\":[32]},[[0,\"dsoSizeChange\",\"sizeChangeHandler\"]]]]],[\"dso-survey-rating\",[[1,\"dso-survey-rating\"]]],[\"dso-tree-view\",[[1,\"dso-tree-view\",{\"collection\":[16],\"focusItem\":[64]}]]],[\"dso-action-list-item\",[[1,\"dso-action-list-item\",{\"step\":[2],\"itemTitle\":[1,\"item-title\"],\"flowLine\":[4,\"flow-line\"],\"warning\":[4],\"divider\":[4]}]]],[\"dso-card\",[[1,\"dso-card\",{\"href\":[513],\"mode\":[513],\"active\":[516]}]]],[\"dso-date-picker-legacy\",[[2,\"dso-date-picker-legacy\",{\"name\":[1],\"identifier\":[1],\"disabled\":[516],\"role\":[1],\"direction\":[1],\"required\":[4],\"invalid\":[516],\"describedBy\":[1,\"described-by\"],\"dsoAutofocus\":[4,\"dso-autofocus\"],\"value\":[1537],\"min\":[1],\"max\":[1],\"activeFocus\":[32],\"focusedDay\":[32],\"open\":[32],\"visible\":[32],\"setFocus\":[64],\"show\":[64],\"hide\":[64]},[[6,\"click\",\"handleDocumentClick\"]]]]],[\"dso-document-card\",[[1,\"dso-document-card\",{\"href\":[513],\"active\":[516]}]]],[\"dso-list-button\",[[1,\"dso-list-button\",{\"label\":[1],\"sublabel\":[1],\"count\":[2],\"min\":[8],\"max\":[8],\"checked\":[516],\"disabled\":[516],\"subcontentPrefix\":[1,\"subcontent-prefix\"]}]]],[\"dso-mark-bar\",[[1,\"dso-mark-bar\",{\"value\":[1],\"label\":[1],\"current\":[2],\"totalCount\":[2,\"total-count\"],\"dsoFocus\":[64]}]]],[\"dso-plekinfo-card\",[[1,\"dso-plekinfo-card\",{\"wijzigactie\":[513],\"href\":[513],\"targetBlank\":[4,\"target-blank\"],\"active\":[516]}]]],[\"dso-skiplink\",[[1,\"dso-skiplink\",{\"to\":[513],\"label\":[513]}]]],[\"dso-accordion\",[[1,\"dso-accordion\",{\"variant\":[6145],\"reverseAlign\":[6148,\"reverse-align\"],\"_getState\":[64]}]]],[\"dso-action-list\",[[1,\"dso-action-list\",{\"listTitle\":[1,\"list-title\"]}]]],[\"dso-banner\",[[1,\"dso-banner\",{\"status\":[513],\"compact\":[4],\"icon\":[516]}]]],[\"dso-card-container\",[[1,\"dso-card-container\",{\"mode\":[513]}]]],[\"dso-contact-information\",[[1,\"dso-contact-information\"]]],[\"dso-date-picker\",[[2,\"dso-date-picker\",{\"name\":[1],\"identifier\":[1],\"disabled\":[516],\"required\":[516],\"invalid\":[516],\"describedBy\":[1,\"described-by\"],\"dsoAutofocus\":[4,\"dso-autofocus\"],\"value\":[513],\"min\":[1],\"max\":[1]}]]],[\"dso-highlight-box\",[[1,\"dso-highlight-box\",{\"yellow\":[516],\"border\":[516],\"white\":[516],\"dropShadow\":[516,\"drop-shadow\"],\"step\":[514]}]]],[\"dso-input-range\",[[1,\"dso-input-range\",{\"min\":[2],\"max\":[2],\"value\":[2],\"step\":[2],\"label\":[1],\"unit\":[1],\"description\":[1]}]]],[\"dso-logo\",[[1,\"dso-logo\",{\"name\":[513],\"logoUrl\":[513,\"logo-url\"],\"label\":[513],\"labelUrl\":[513,\"label-url\"],\"ribbon\":[513]}]]],[\"dso-progress-bar\",[[1,\"dso-progress-bar\",{\"progress\":[2],\"min\":[2],\"max\":[2]}]]],[\"dso-tab\",[[1,\"dso-tab\",{\"active\":[516],\"disabled\":[516],\"href\":[1],\"_dsoFocus\":[64]}]]],[\"dso-tabs\",[[1,\"dso-tabs\"]]],[\"dso-viewer-grid\",[[1,\"dso-viewer-grid\",{\"mode\":[513],\"filterpanelTitle\":[513,\"filterpanel-title\"],\"filterpanelOpen\":[516,\"filterpanel-open\"],\"overlayOpen\":[516,\"overlay-open\"],\"documentPanelOpen\":[516,\"document-panel-open\"],\"mainSize\":[513,\"main-size\"],\"activeTab\":[1,\"active-tab\"],\"documentPanelSize\":[513,\"document-panel-size\"],\"mainPanelExpanded\":[4,\"main-panel-expanded\"],\"mainPanelHidden\":[4,\"main-panel-hidden\"],\"tabView\":[32],\"_checkMainPanelVisibility\":[64]},null,{\"documentPanelOpen\":[\"documentPanelOpenWatcher\"],\"filterpanelOpen\":[\"filterpanelOpenWatcher\"],\"overlayOpen\":[\"overlayOpenWatcher\"]}]]],[\"dso-toggletip\",[[1,\"dso-toggletip\",{\"label\":[1],\"position\":[1],\"small\":[4],\"secondary\":[4],\"active\":[32]}]]],[\"dso-dropdown-menu\",[[1,\"dso-dropdown-menu\",{\"open\":[1540],\"dropdownAlign\":[1,\"dropdown-align\"],\"dropdownOptionsOffset\":[2,\"dropdown-options-offset\"],\"checkable\":[4],\"boundary\":[1],\"placement\":[1],\"strategy\":[1]},[[8,\"click\",\"onClick\"],[8,\"keydown\",\"keyDownListener\"]],{\"placement\":[\"watchPosition\"],\"dropdownAlign\":[\"watchPosition\"],\"dropdownOptionsOffset\":[\"watchOptionsOffset\"],\"strategy\":[\"watchStrategy\"]}]]],[\"dso-annotation-locatie_2\",[[1,\"dso-document-component\",{\"heading\":[1],\"label\":[1],\"nummer\":[1],\"opschrift\":[1],\"kop\":[1],\"inhoud\":[1],\"open\":[516],\"filtered\":[516],\"notApplicable\":[516,\"not-applicable\"],\"genesteOntwerpInformatie\":[516,\"geneste-ontwerp-informatie\"],\"bevatOntwerpInformatie\":[516,\"bevat-ontwerp-informatie\"],\"annotated\":[516],\"gereserveerd\":[4],\"vervallen\":[4],\"openAnnotation\":[516,\"open-annotation\"],\"alternativeTitle\":[1,\"alternative-title\"],\"type\":[513],\"wijzigactie\":[513],\"annotationsWijzigactie\":[513,\"annotations-wijzigactie\"],\"mark\":[16],\"recursiveToggle\":[8,\"recursive-toggle\"],\"mode\":[513],\"href\":[513]}],[1,\"dso-annotation-locatie\",{\"wijzigactie\":[513],\"active\":[516],\"gewijzigdeLocatie\":[516,\"gewijzigde-locatie\"],\"locatieNoemer\":[1,\"locatie-noemer\"]}]]],[\"dso-attachments-counter_2\",[[1,\"dso-attachments-counter\",{\"count\":[2]}],[1,\"dso-expandable\",{\"open\":[516],\"enableAnimation\":[516,\"enable-animation\"],\"minimumHeight\":[2,\"minimum-height\"],\"isClosed\":[32]},[[0,\"transitionstart\",\"transitionstartHandler\"],[0,\"transitionend\",\"transitionendHandler\"]],{\"open\":[\"toggleOpen\"]}]]],[\"dso-progress-indicator\",[[1,\"dso-progress-indicator\",{\"label\":[1],\"size\":[513],\"block\":[516]}]]],[\"dso-responsive-element\",[[1,\"dso-responsive-element\",{\"sizeAlias\":[32],\"sizeWidth\":[32],\"getSize\":[64]}]]],[\"dso-scrollable\",[[1,\"dso-scrollable\",{\"scrollPosition\":[32],\"_setScrollState\":[64]}]]],[\"dso-info-button\",[[1,\"dso-info-button\",{\"active\":[1540],\"secondary\":[4],\"label\":[1],\"hover\":[32],\"setFocus\":[64]}]]],[\"dso-info_2\",[[6,\"dso-selectable\",{\"type\":[1],\"identifier\":[1],\"name\":[1],\"value\":[1],\"invalid\":[4],\"describedById\":[1,\"described-by-id\"],\"labelledById\":[1,\"labelled-by-id\"],\"disabled\":[4],\"required\":[4],\"checked\":[516],\"indeterminate\":[4],\"infoFixed\":[4,\"info-fixed\"],\"infoActive\":[32],\"keyboardFocus\":[32],\"toggleInfo\":[64]},null,{\"indeterminate\":[\"setIndeterminate\"]}],[1,\"dso-info\",{\"fixed\":[516],\"active\":[516]}]]],[\"dso-tooltip\",[[1,\"dso-tooltip\",{\"descriptive\":[516],\"position\":[1],\"strategy\":[1],\"noArrow\":[4,\"no-arrow\"],\"stateless\":[4],\"small\":[4],\"active\":[1540],\"hidden\":[32],\"activate\":[64],\"deactivate\":[64]},null,{\"position\":[\"watchPosition\"],\"strategy\":[\"watchStrategy\"],\"active\":[\"watchActive\"]}]]],[\"dso-alert_6\",[[1,\"dso-ozon-content\",{\"content\":[1],\"inline\":[516],\"addSpaceBeforeNode\":[516,\"add-space-before-node\"],\"mark\":[16],\"state\":[32]},null,{\"content\":[\"contentWatcher\"]}],[1,\"dso-alert\",{\"status\":[513],\"roleAlert\":[4,\"role-alert\"],\"compact\":[516],\"closable\":[4]}],[1,\"dso-image-overlay\",{\"wijzigactie\":[1],\"active\":[32],\"zoomable\":[32]},[[2,\"load\",\"loadListener\"]]],[1,\"dso-panel\",{\"closeButtonLabel\":[1,\"close-button-label\"],\"emphasized\":[4]}],[1,\"dso-table\",{\"noModal\":[516,\"no-modal\"],\"isResponsive\":[516,\"is-responsive\"],\"modalActive\":[32],\"placeholderHeight\":[32]}],[1,\"dso-badge\",{\"status\":[1]}]]],[\"dso-label_3\",[[1,\"dso-renvooi\",{\"value\":[1],\"mark\":[16]}],[6,\"dso-slide-toggle\",{\"checked\":[4],\"disabled\":[4],\"accessibleLabel\":[1,\"accessible-label\"],\"labelledbyId\":[1,\"labelledby-id\"],\"identifier\":[1],\"hasVisibleLabel\":[32]}],[1,\"dso-label\",{\"compact\":[4],\"removable\":[516],\"status\":[1],\"truncate\":[4],\"removeHover\":[32],\"removeFocus\":[32],\"textHover\":[32],\"textFocus\":[32],\"isTruncated\":[32],\"labelText\":[32],\"_truncateLabel\":[64]},[[4,\"keydown\",\"keyDownListener\"]],{\"removable\":[\"watchRemovable\"],\"truncate\":[\"watchTruncate\"]}]]]]"), options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -60,7 +60,6 @@ export declare class Autosuggest {
60
60
  selectedSuggestionGroup: SuggestionGroup | undefined;
61
61
  notFound: boolean;
62
62
  showLoading: boolean;
63
- listItemBlockSize: number;
64
63
  listboxContainerMaxBlockSize: number;
65
64
  suggestionsWatcher(): void;
66
65
  private input?;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "70.0.0",
3
+ "version": "70.0.1",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/components/index.js",
@@ -23,7 +23,7 @@
23
23
  "@stencil/core": "4.28.2",
24
24
  "@stencil/store": "^2.1.2",
25
25
  "clsx": "^2.1.1",
26
- "dso-toolkit": "^70.0.0",
26
+ "dso-toolkit": "^70.0.1",
27
27
  "escape-string-regexp": "^5.0.0",
28
28
  "focus-trap": "^7.6.4",
29
29
  "i18next": "^24.2.3",
@@ -54,7 +54,7 @@
54
54
  "typescript": "~5.6.3"
55
55
  },
56
56
  "peerDependencies": {
57
- "dso-toolkit": "70.0.0"
57
+ "dso-toolkit": "70.0.1"
58
58
  },
59
59
  "nx": {
60
60
  "includedScripts": []
@@ -1,2 +0,0 @@
1
- import{r as s,c as t,h as i,F as e,g as o}from"./p-BzEnSYbR.js";import{d as h}from"./p-DDU8nTJS.js";import{i as n}from"./p-D6dst_Em.js";import{v as r}from"./p-BF0_OXTe.js";import"./p-BFTU3MAI.js";function a(s){if(typeof s!=="string"){throw new TypeError("Expected a string")}return s.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const u={en:{"dso-autosuggest":{notFound:"{{inputValue}} was not found."}},nl:{"dso-autosuggest":{notFound:"{{inputValue}} is niet gevonden."}}};const l=".sc-dso-autosuggest-h{display:block;position:relative}.listbox-container.sc-dso-autosuggest{inset-inline:0;inset-block-start:100%;block-size:auto;max-block-size:var(--max-block-size);min-block-size:50px;overflow-y:auto;position:absolute;z-index:200}.listbox.sc-dso-autosuggest,.autosuggest-progress-box.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-block:0}.autosuggest-progress-box.sc-dso-autosuggest{padding-block:12px;padding-inline:8px}.listbox.sc-dso-autosuggest{padding-block:8px;padding-inline:0}.listbox.sc-dso-autosuggest .group.sc-dso-autosuggest:not(:first-child) .group-label.sc-dso-autosuggest{border-block-start:1px solid #b2b2b2}.listbox.sc-dso-autosuggest .group-label.sc-dso-autosuggest{color:#275937;font-weight:700;padding-block:4px;margin-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest{padding-block:4px;padding-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest .suggestion-row.sc-dso-autosuggest{display:flex;justify-content:space-between}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active{background-color:#275937}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .type.sc-dso-autosuggest,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .extra.sc-dso-autosuggest{color:#fff}.option[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#d7e7ce}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest,.extra.sc-dso-autosuggest{color:#666}.type.sc-dso-autosuggest{text-align:end}.extra.sc-dso-autosuggest{font-size:14px;line-height:21px}.extra.sc-dso-autosuggest:not(:first-child){text-align:end}";const d=10;const c=8;const g=1;const f=({id:s,mouseEnter:t,mouseLeave:e,click:o,selected:h,suggestion:n,ref:r,markedSuggestion:a})=>i("div",{class:"option",role:"option",id:s,onMouseEnter:t,onMouseLeave:e,onClick:o,"aria-selected":h,"aria-label":n.value,ref:r},i("div",{class:"suggestion-row"},i("span",{class:"value"},a.value),a.type?i("span",{class:"type"},a.type):undefined),a.extras&&a.extras.map((s=>i("div",{class:"suggestion-row"},s.map((s=>i("span",{class:"extra"},s)))))));function p(s){return!!s&&s.length>0&&s.every((s=>s!==undefined&&"groupLabel"in s&&s.groupLabel!==undefined&&"suggestions"in s&&s.suggestions.length>0))}function v(s){return!!s&&s.length>0&&s.every((s=>s!==undefined&&"value"in s&&s.value!==undefined))}const b=class{constructor(i){s(this,i);this.dsoSelect=t(this,"dsoSelect",7);this.dsoChange=t(this,"dsoChange",7);this.dsoSearch=t(this,"dsoSearch",7);this.suggestions=null;this.loading=false;this.loadingLabel="Een moment geduld.";this.suggestOnFocus=false;this.showSuggestions=false;this.notFound=false;this.showLoading=false;this.listItemBlockSize=0;this.listboxContainerMaxBlockSize=0;this.listboxItems=[];this.listboxId=r();this.inputId=r();this.labelId=r();this.resizeObserver=new ResizeObserver(h((()=>this.setListboxContainerMaxBlockSize()),150));this.debouncedEmitValue=h((s=>{this.dsoChange.emit(s);this.debouncedShowLoading()}),200);this.debouncedShowLoading=h((()=>{if(this.inputValue){this.showLoading=true}}),this.loadingDelayed);this.inputValue="";this.onInput=s=>{if(!(s.target instanceof HTMLInputElement)){return}this.showLoading=!this.loadingDelayed;this.inputValue=s.target.value;this.debouncedEmitValue(s.target.value.match(/(\S+)/g)?s.target.value:"")};this.onFocusIn=()=>{if(this.suggestOnFocus){this.openSuggestions()}};this.text=n((()=>this.host),u);this.onWindowResize=h((()=>this.setListboxContainerMaxBlockSize()),150);this.onScrollend=()=>this.setListboxContainerMaxBlockSize();this.onKeyDown=s=>{if(s.defaultPrevented||this.loading){return}switch(s.key){case"ArrowDown":if(!this.showSuggestions){this.openSuggestions("first")}else{this.selectNextSuggestion()}break;case"ArrowUp":if(!this.showSuggestions){this.openSuggestions("last")}else{this.selectPreviousSuggestion()}break;case"Tab":this.closeSuggestions();return;case"Escape":this.closeSuggestions();break;case"Enter":this.pickSelectedValue();break;default:return}s.preventDefault()}}suggestionsWatcher(){this.resetSelectedSuggestion();if((!this.showSuggestions||!this.notFound)&&this.inputValue){this.openSuggestions()}else if((this.showSuggestions||this.notFound)&&!this.inputValue){this.closeSuggestions()}}onDocumentClick(s){if((this.showSuggestions||this.notFound)&&this.listbox&&s.target instanceof Node&&!this.listbox.contains(s.target)&&this.input!==s.target){this.closeSuggestions()}}componentDidRender(){this.setListboxContainerMaxBlockSize()}connectedCallback(){setTimeout((()=>{const s=this.host.querySelector('input[type="text"]');if(!(s instanceof HTMLInputElement)){return}this.input=s;if(s.id){this.inputId=s.id}else{s.id=this.inputId}if(!this.input.labels||this.input.labels.length<1){return}const t=this.input.labels[0];if(t===null||t===void 0?void 0:t.id){this.labelId=t.id}else if(t){t.id=this.labelId}this.input.setAttribute("role","combobox");this.input.setAttribute("aria-haspopup","listbox");this.input.setAttribute("aria-expanded","false");this.input.setAttribute("autocomplete","off");this.input.setAttribute("aria-autocomplete","list");this.input.setAttribute("aria-activedescendant","");this.input.addEventListener("input",this.onInput);this.input.addEventListener("keydown",this.onKeyDown);this.input.addEventListener("focusin",this.onFocusIn);window.addEventListener("resize",this.onWindowResize);document.addEventListener("scrollend",this.onScrollend);this.resizeObserver.observe(this.host);this.setListboxContainerMaxBlockSize()}))}disconnectedCallback(){var s,t,i;(s=this.input)===null||s===void 0?void 0:s.removeEventListener("input",this.onInput);(t=this.input)===null||t===void 0?void 0:t.removeEventListener("keydown",this.onKeyDown);(i=this.input)===null||i===void 0?void 0:i.removeEventListener("focusin",this.onFocusIn);window.removeEventListener("resize",this.onWindowResize);document.removeEventListener("scrollend",this.onScrollend);this.resizeObserver.disconnect()}setListboxContainerMaxBlockSize(){if(!this.listboxContainer||!this.showSuggestions){return}if(this.listboxItems[0]&&this.showSuggestions){this.listItemBlockSize=this.listboxItems[0].getBoundingClientRect().height}const s=window.innerHeight-this.host.getBoundingClientRect().bottom;const t=this.listItemBlockSize*d+2*c+2*g;if(s>this.listItemBlockSize){if(s<t){this.listboxContainerMaxBlockSize=s-2*c}else{this.listboxContainerMaxBlockSize=t}}}showInputValueNotFound(s){var t,i;return this.processAutosuggestMarkItems(this.markTerms((i=(t=this.input)===null||t===void 0?void 0:t.value.split(" ").filter((s=>s)))!==null&&i!==void 0?i:[],s))}handleMark(s,t,i,e){var o,h;if(this.mark&&i){return this.processAutosuggestMarkItems(this.mark(s,t,i,e))}return this.processAutosuggestMarkItems(this.markTerms((h=(o=this.input)===null||o===void 0?void 0:o.value.split(" ").filter((s=>s)))!==null&&h!==void 0?h:[],t))}markTerms(s,t){if(!t||!s||s.length===0||s[0]===undefined){return[""]}const i=new RegExp(`(${a(s[0])})`,"gi");return t.split(i).reduce(((t,e)=>{if(!e){t.push(e)}else if(i.test(e)){t.push({mark:e})}else if(s.length===1){t.push(e)}else{t.push(...this.markTerms(s.slice(1),e))}return t}),[])}processAutosuggestMarkItems(s){if(s.length===0){return[""]}return s.map((s=>{if(typeof s==="object"){return i("mark",null,s.mark)}return s}))}selectSuggestion(s,t){this.selectedSuggestion=s;this.selectedSuggestionGroup=t;this.setAriaActiveDescendant()}selectFirstSuggestion(){if(!this.suggestions){return}if(p(this.suggestions)&&this.selectedSuggestionGroup){this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}else{if(v(this.suggestions)){this.selectedSuggestion=this.suggestions[0]}}this.setAriaActiveDescendant(true)}selectLastSuggestion(){if(!this.suggestions){return}if(p(this.suggestions)&&this.selectedSuggestionGroup){this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}else{if(v(this.suggestions)){this.selectedSuggestion=this.suggestions[this.suggestions.length-1]}}this.setAriaActiveDescendant(true)}selectNextSuggestion(){var s;if(!this.suggestions){return}if(p(this.suggestions)){this.selectNextGroupedSuggestion()}else{const t=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):-1;this.selectedSuggestion=(s=this.suggestions[t+1])!==null&&s!==void 0?s:this.suggestions[0]}this.setAriaActiveDescendant(true)}selectNextGroupedSuggestion(){var s;if(!this.suggestions){return}if(this.selectedSuggestionGroup){const t=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(t===this.selectedSuggestionGroup.suggestions.length-1){const t=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=(s=this.suggestionGroups[t+1])!==null&&s!==void 0?s:this.suggestionGroups[0];this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}else{this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[t+1]}}else{this.selectedSuggestionGroup=this.suggestionGroups[0];this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[0]}}selectPreviousSuggestion(){var s;if(!this.suggestions){return}if(p(this.suggestions)){this.selectPreviousGroupedSuggestion()}else{const t=this.selectedSuggestion?this.suggestions.indexOf(this.selectedSuggestion):0;this.selectedSuggestion=(s=this.suggestions[t-1])!==null&&s!==void 0?s:this.suggestions[this.suggestions.length-1]}this.setAriaActiveDescendant(true)}selectPreviousGroupedSuggestion(){var s;if(!this.suggestions){return}if(this.selectedSuggestionGroup){const t=this.selectedSuggestion?this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion):-1;if(t===0){const t=this.suggestionGroups.indexOf(this.selectedSuggestionGroup);this.selectedSuggestionGroup=(s=this.suggestionGroups[t-1])!==null&&s!==void 0?s:this.suggestionGroups[this.suggestions.length-1];this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}else{this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[t-1]}}else{this.selectedSuggestionGroup=this.suggestionGroups[this.suggestions.length-1];this.selectedSuggestion=this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length-1]}}get suggestionGroups(){return p(this.suggestions)?this.suggestions:[]}setAriaActiveDescendant(s=false){var t,i;if(this.selectedSuggestion){const e=this.selectedSuggestionGroup?this.listboxGroupedItemId(this.selectedSuggestionGroup,this.selectedSuggestion):this.listboxItemId(this.selectedSuggestion);(t=this.input)===null||t===void 0?void 0:t.setAttribute("aria-activedescendant",e);if(s){(i=document.getElementById(e))===null||i===void 0?void 0:i.scrollIntoView({block:"nearest"})}}}resetSelectedSuggestion(){var s;this.showLoading=!this.loadingDelayed;this.notFound=false;this.selectedSuggestion=undefined;this.selectedSuggestionGroup=undefined;(s=this.input)===null||s===void 0?void 0:s.setAttribute("aria-activedescendant","")}openSuggestions(s){var t,i,e,o;this.showSuggestions=(t=this.suggestions&&this.suggestions.length>0)!==null&&t!==void 0?t:false;this.notFound=(e=this.suggestions&&((i=this.suggestions)===null||i===void 0?void 0:i.length)===0)!==null&&e!==void 0?e:false;(o=this.input)===null||o===void 0?void 0:o.setAttribute("aria-expanded",(this.showSuggestions||this.notFound).toString());if(this.showSuggestions&&s==="first"){this.selectFirstSuggestion()}else if(this.showSuggestions&&s==="last"){this.selectLastSuggestion()}}closeSuggestions(){var s;this.showSuggestions=false;this.notFound=false;(s=this.input)===null||s===void 0?void 0:s.setAttribute("aria-expanded","false");this.selectFirstSuggestion()}pickSelectedValue(){var s;if(this.selectedSuggestion&&this.showSuggestions){this.dsoSelect.emit(this.selectedSuggestion)}else{this.dsoSearch.emit((s=this.input)===null||s===void 0?void 0:s.value)}this.closeSuggestions()}listboxItemId(s){if(!this.suggestions){return""}return`${this.inputId}-${v(this.suggestions)&&this.suggestions.indexOf(s)+1}`}listboxGroupedItemId(s,t){if(!this.suggestions){return""}return`${this.inputId}-${this.suggestionGroups.indexOf(s)+1}-${s.suggestions.indexOf(t)+1}`}getMarkedChunkedExtras(s,t){const i=s.reduce(((s,t,i)=>{var e;const o=Math.floor(i/2);if(!s[o]){s[o]=[]}(e=s[o])===null||e===void 0?void 0:e.push(t);return s}),[]);return i.map(((s,i)=>s.map(((s,e)=>this.handleMark(t,s,"extra",i*2+e)))))}getMarkedSuggestions(s){return{value:this.handleMark(s,s.value,"value"),type:s.type?this.handleMark(s,s.type,"type"):undefined,extras:s.extras?this.getMarkedChunkedExtras(s.extras,s):undefined}}render(){this.listboxItems=[];const s=this.showSuggestions||this.notFound;const t=p(this.suggestions);const o=v(this.suggestions);if(s&&this.input){this.input.setAttribute("aria-controls",this.listboxId)}else if(this.input){this.input.removeAttribute("aria-controls")}return i(e,null,i("slot",{key:"557d829f9238c3fa9f6082beba78381472115ccd"}),this.loading&&this.showLoading?i("div",{class:"autosuggest-progress-box"},i("dso-progress-indicator",{label:this.loadingLabel})):s&&i("dso-scrollable",{class:"listbox-container",ref:s=>this.listboxContainer=s,style:{"--max-block-size":`${this.listboxContainerMaxBlockSize}px`}},i("div",{class:"listbox",role:"listbox","aria-live":"polite",id:this.listboxId,"aria-labelledby":this.labelId,ref:s=>this.listbox=s,tabindex:"0"},o&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>i(f,{id:this.listboxItemId(s),mouseEnter:()=>this.selectSuggestion(s),mouseLeave:()=>this.resetSelectedSuggestion(),click:()=>this.pickSelectedValue(),selected:(s===this.selectedSuggestion).toString(),suggestion:s,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(s)})))||t&&this.showSuggestions&&this.suggestions&&this.suggestions.map((s=>{const t=r();return i("div",{role:"group",class:"group","aria-labelledby":t},i("div",{class:"group-label",role:"presentation",id:t},s.groupLabel),s.suggestions.map((t=>i(f,{id:this.listboxGroupedItemId(s,t),mouseEnter:()=>this.selectSuggestion(t,s),mouseLeave:()=>this.resetSelectedSuggestion(),click:()=>this.pickSelectedValue(),selected:(t===this.selectedSuggestion).toString(),suggestion:t,ref:s=>s&&this.listboxItems.push(s),markedSuggestion:this.getMarkedSuggestions(t)}))))}))||this.notFound&&i("div",{class:"option"},i("span",{class:"value"},this.notFoundLabel||this.showInputValueNotFound(this.text("notFound",{inputValue:this.inputValue})))))))}get host(){return o(this)}static get watchers(){return{suggestions:["suggestionsWatcher"]}}};b.style=l;export{b as dso_autosuggest};
2
- //# sourceMappingURL=p-63047745.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["escapeStringRegexp","string","TypeError","replace","translations","en","notFound","nl","autosuggestCss","maxSuggestionsViewable","listboxPaddingBlock","listboxBorderWidth","Option","id","mouseEnter","mouseLeave","click","selected","suggestion","ref","markedSuggestion","h","class","role","onMouseEnter","onMouseLeave","onClick","value","type","undefined","extras","map","markedChunk","extra","isGrouped","suggestions","length","every","groupLabel","isFlat","Autosuggest","constructor","hostRef","this","loading","loadingLabel","suggestOnFocus","showSuggestions","showLoading","listItemBlockSize","listboxContainerMaxBlockSize","listboxItems","listboxId","v4","inputId","labelId","resizeObserver","ResizeObserver","debounce","setListboxContainerMaxBlockSize","debouncedEmitValue","dsoChange","emit","debouncedShowLoading","inputValue","loadingDelayed","onInput","event","target","HTMLInputElement","match","onFocusIn","openSuggestions","text","i18n","host","onWindowResize","onScrollend","onKeyDown","defaultPrevented","key","selectNextSuggestion","selectPreviousSuggestion","closeSuggestions","pickSelectedValue","preventDefault","suggestionsWatcher","resetSelectedSuggestion","onDocumentClick","listbox","Node","contains","input","componentDidRender","connectedCallback","setTimeout","querySelector","labels","label","setAttribute","addEventListener","window","document","observe","disconnectedCallback","_a","removeEventListener","_b","_c","disconnect","listboxContainer","getBoundingClientRect","height","availableBlockSize","innerHeight","bottom","listboxMaxBlockSize","showInputValueNotFound","processAutosuggestMarkItems","markTerms","split","filter","t","handleMark","extraIndex","mark","terms","suggestionValue","termRegex","RegExp","reduce","total","valuePart","push","test","slice","items","item","selectSuggestion","group","selectedSuggestion","selectedSuggestionGroup","setAriaActiveDescendant","selectFirstSuggestion","selectLastSuggestion","selectNextGroupedSuggestion","index","indexOf","indexInGroup","groupIndex","suggestionGroups","selectPreviousGroupedSuggestion","scroll","listboxGroupedItemId","listboxItemId","getElementById","scrollIntoView","block","_d","toString","dsoSelect","dsoSearch","suggestionGroup","getMarkedChunkedExtras","chunkedExtras","resultArray","chunkIndex","Math","floor","chunk","c","i","getMarkedSuggestions","render","showListbox","grouped","flat","removeAttribute","Fragment","element","style","tabindex","groupLabelId","notFoundLabel"],"sources":["../../node_modules/escape-string-regexp/index.js","src/components/autosuggest/autosuggest.i18n.ts","src/components/autosuggest/autosuggest.scss?tag=dso-autosuggest&encapsulation=scoped","src/components/autosuggest/autosuggest.tsx"],"sourcesContent":["export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-autosuggest\": {\r\n notFound: \"{{inputValue}} was not found.\",\r\n },\r\n },\r\n nl: {\r\n \"dso-autosuggest\": {\r\n notFound: \"{{inputValue}} is niet gevonden.\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/scaffolding\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n\r\n@use \"autosuggest.variables\" as core-autosuggest-variables;\r\n\r\n:host {\r\n display: block;\r\n position: relative;\r\n}\r\n\r\n.listbox-container {\r\n inset-inline: 0;\r\n inset-block-start: 100%;\r\n block-size: auto;\r\n max-block-size: var(--max-block-size);\r\n min-block-size: core-autosuggest-variables.$listbox-min-block-size;\r\n overflow-y: auto;\r\n position: absolute;\r\n z-index: zindex.$autosuggest;\r\n}\r\n\r\n.listbox,\r\n.autosuggest-progress-box {\r\n background-clip: padding-box;\r\n background-color: core-autosuggest-variables.$background-color;\r\n border: core-autosuggest-variables.$listbox-border-width solid core-autosuggest-variables.$border-color;\r\n border-radius: scaffolding.$border-radius-base;\r\n box-shadow: core-autosuggest-variables.$box-shadow;\r\n list-style-type: none;\r\n margin-block: 0;\r\n}\r\n\r\n.autosuggest-progress-box {\r\n padding-block: units.$u1 * 1.5;\r\n padding-inline: units.$u1;\r\n}\r\n\r\n.listbox {\r\n padding-block: core-autosuggest-variables.$listbox-padding-block;\r\n padding-inline: 0;\r\n\r\n .group:not(:first-child) {\r\n .group-label {\r\n border-block-start: 1px solid colors.$grijs-30;\r\n }\r\n }\r\n\r\n .group-label {\r\n color: colors.$bosgroen;\r\n font-weight: 700;\r\n padding-block: core-autosuggest-variables.$list-item-padding-block;\r\n margin-inline: units.$u2;\r\n }\r\n\r\n .option {\r\n padding-block: core-autosuggest-variables.$list-item-padding-block;\r\n padding-inline: units.$u2;\r\n\r\n .suggestion-row {\r\n display: flex;\r\n justify-content: space-between;\r\n }\r\n\r\n &:active {\r\n background-color: colors.$bosgroen;\r\n\r\n &,\r\n .type,\r\n .extra {\r\n color: colors.$wit;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.option[aria-selected=\"true\"] {\r\n cursor: pointer;\r\n background-color: colors.$grasgroen-20;\r\n}\r\n\r\nmark {\r\n font-weight: 700;\r\n background-color: inherit;\r\n color: inherit;\r\n padding: 0;\r\n}\r\n\r\n.type,\r\n.extra {\r\n color: colors.$grijs-60;\r\n}\r\n\r\n.type {\r\n text-align: end;\r\n}\r\n\r\n.extra {\r\n font-size: typography.$root-font-size-small;\r\n line-height: typography.$root-font-size-small * typography.$line-height-base;\r\n\r\n &:not(:first-child) {\r\n text-align: end;\r\n }\r\n}\r\n","import {\r\n Component,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n FunctionalComponent,\r\n h,\r\n Listen,\r\n Prop,\r\n State,\r\n VNode,\r\n Watch,\r\n} from \"@stencil/core\";\r\n\r\nimport debounce from \"debounce\";\r\nimport escapeStringRegexp from \"escape-string-regexp\";\r\n\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { AutosuggestMarkFunction, AutosuggestMarkItem, Suggestion, SuggestionGroup } from \"./autosuggest.interfaces\";\r\nimport { translations } from \"./autosuggest.i18n\";\r\n\r\ninterface MarkedSuggestion {\r\n value: (VNode | string)[];\r\n type?: (VNode | string)[];\r\n extras?: (VNode | string)[][][];\r\n}\r\n\r\nconst maxSuggestionsViewable = 10;\r\nconst listboxPaddingBlock = 8;\r\nconst listboxBorderWidth = 1;\r\n\r\nconst Option: FunctionalComponent<{\r\n id: string;\r\n mouseEnter: () => void;\r\n mouseLeave: () => void;\r\n click: () => void;\r\n selected: string;\r\n suggestion: Suggestion;\r\n markedSuggestion: MarkedSuggestion;\r\n ref: (element: HTMLDivElement | undefined) => void;\r\n}> = ({ id, mouseEnter, mouseLeave, click, selected, suggestion, ref, markedSuggestion }) => (\r\n <div\r\n class=\"option\"\r\n role=\"option\"\r\n id={id}\r\n onMouseEnter={mouseEnter}\r\n onMouseLeave={mouseLeave}\r\n onClick={click}\r\n aria-selected={selected}\r\n aria-label={suggestion.value}\r\n ref={ref}\r\n >\r\n <div class=\"suggestion-row\">\r\n <span class=\"value\">{markedSuggestion.value}</span>\r\n {markedSuggestion.type ? <span class=\"type\">{markedSuggestion.type}</span> : undefined}\r\n </div>\r\n {markedSuggestion.extras &&\r\n markedSuggestion.extras.map((markedChunk) => (\r\n <div class=\"suggestion-row\">\r\n {markedChunk.map((extra) => (\r\n <span class=\"extra\">{extra}</span>\r\n ))}\r\n </div>\r\n ))}\r\n </div>\r\n);\r\n\r\nfunction isGrouped(suggestions: Suggestion[] | SuggestionGroup[] | null): suggestions is SuggestionGroup[] {\r\n return (\r\n !!suggestions &&\r\n suggestions.length > 0 &&\r\n suggestions.every(\r\n (suggestion) =>\r\n suggestion !== undefined &&\r\n \"groupLabel\" in suggestion &&\r\n suggestion.groupLabel !== undefined &&\r\n \"suggestions\" in suggestion &&\r\n suggestion.suggestions.length > 0,\r\n )\r\n );\r\n}\r\n\r\nfunction isFlat(suggestions: Suggestion[] | SuggestionGroup[] | null): suggestions is Suggestion[] {\r\n return (\r\n !!suggestions &&\r\n suggestions.length > 0 &&\r\n suggestions.every(\r\n (suggestion) => suggestion !== undefined && \"value\" in suggestion && suggestion.value !== undefined,\r\n )\r\n );\r\n}\r\n\r\n@Component({\r\n tag: \"dso-autosuggest\",\r\n styleUrl: \"autosuggest.scss\",\r\n scoped: true,\r\n})\r\nexport class Autosuggest {\r\n /**\r\n * The suggestions for the value of the slotted input element.\r\n *\r\n * This can be an array of type Suggestion or an Array of type SuggestionGroup.\r\n *\r\n * A suggestionGroup must have a `groupLabel` and `suggestions`.\r\n *\r\n * A suggestion must have a `value` and can have a `type`, an `item` or `extras`.\r\n *\r\n * The `type` is used to style the suggestion. `item` can be use to reference the original object that was used to\r\n * create the suggestion. `extras` is an array of additional strings to further specify the suggestion.\r\n *\r\n * The value should be null when no suggestions have been fetched.\r\n */\r\n @Prop()\r\n readonly suggestions: Suggestion[] | SuggestionGroup[] | null = null;\r\n\r\n /**\r\n * Shows progress indicator when fetching results.\r\n */\r\n @Prop()\r\n loading = false;\r\n\r\n /**\r\n * To override progress indicator's default loading label.\r\n */\r\n @Prop()\r\n loadingLabel?: string = \"Een moment geduld.\";\r\n\r\n /**\r\n * To delay progress indicator showing (in ms).\r\n */\r\n @Prop()\r\n loadingDelayed?: number;\r\n\r\n /**\r\n * To show text when no results are found.\r\n */\r\n @Prop()\r\n notFoundLabel?: string;\r\n\r\n /**\r\n * Whether the previous suggestions will be presented when the input gets focus again.\r\n */\r\n @Prop()\r\n suggestOnFocus = false;\r\n\r\n /**\r\n * A function provided by the consumer of the autosuggest component, that returns an array of `AutosuggestMarkItem`s\r\n */\r\n @Prop()\r\n mark?: AutosuggestMarkFunction;\r\n\r\n /**\r\n * Emitted when a suggestion is selected.\r\n * The `detail` property of the `CustomEvent` will contain the selected suggestion.\r\n */\r\n @Event()\r\n dsoSelect!: EventEmitter<Suggestion>;\r\n\r\n /**\r\n * This is emitted debounced for every change for the slotted input type=text element.\r\n */\r\n @Event()\r\n dsoChange!: EventEmitter<string>;\r\n\r\n /**\r\n * Emitted when enter is pressed.\r\n * The `detail` property of the `CustomEvent` will contain the input text.\r\n */\r\n @Event()\r\n dsoSearch!: EventEmitter<string>;\r\n\r\n @Element()\r\n host!: HTMLDsoAutosuggestElement;\r\n\r\n @State()\r\n showSuggestions = false;\r\n\r\n @State()\r\n selectedSuggestion: Suggestion | undefined;\r\n\r\n @State()\r\n selectedSuggestionGroup: SuggestionGroup | undefined;\r\n\r\n @State()\r\n notFound = false;\r\n\r\n @State()\r\n showLoading = false;\r\n\r\n @State()\r\n listItemBlockSize = 0;\r\n\r\n @State()\r\n listboxContainerMaxBlockSize = 0;\r\n\r\n @Watch(\"suggestions\")\r\n suggestionsWatcher() {\r\n this.resetSelectedSuggestion();\r\n\r\n if ((!this.showSuggestions || !this.notFound) && this.inputValue) {\r\n this.openSuggestions();\r\n } else if ((this.showSuggestions || this.notFound) && !this.inputValue) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n private input?: HTMLInputElement;\r\n\r\n private listboxContainer: HTMLDsoScrollableElement | undefined;\r\n\r\n private listbox: HTMLDivElement | undefined;\r\n\r\n private listboxItems: HTMLDivElement[] = [];\r\n\r\n private listboxId: string = v4();\r\n\r\n private inputId: string = v4();\r\n\r\n private labelId: string = v4();\r\n\r\n private resizeObserver = new ResizeObserver(debounce(() => this.setListboxContainerMaxBlockSize(), 150));\r\n\r\n private debouncedEmitValue = debounce((value: string) => {\r\n this.dsoChange.emit(value);\r\n this.debouncedShowLoading();\r\n }, 200);\r\n\r\n private debouncedShowLoading = debounce(() => {\r\n if (this.inputValue) {\r\n this.showLoading = true;\r\n }\r\n }, this.loadingDelayed);\r\n\r\n private inputValue = \"\";\r\n\r\n private onInput = (event: Event) => {\r\n if (!(event.target instanceof HTMLInputElement)) {\r\n return;\r\n // throw new Error(\"event.target is not instanceof HTMLInputElement\"); #2293\r\n }\r\n\r\n this.showLoading = !this.loadingDelayed;\r\n this.inputValue = event.target.value;\r\n this.debouncedEmitValue(event.target.value.match(/(\\S+)/g) ? event.target.value : \"\");\r\n };\r\n\r\n private onFocusIn = () => {\r\n if (this.suggestOnFocus) {\r\n this.openSuggestions();\r\n }\r\n };\r\n\r\n @Listen(\"click\", { target: \"document\" })\r\n onDocumentClick(event: MouseEvent) {\r\n if (\r\n (this.showSuggestions || this.notFound) &&\r\n this.listbox &&\r\n event.target instanceof Node &&\r\n !this.listbox.contains(event.target) &&\r\n this.input !== event.target\r\n ) {\r\n this.closeSuggestions();\r\n }\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidRender() {\r\n this.setListboxContainerMaxBlockSize();\r\n }\r\n\r\n connectedCallback() {\r\n setTimeout(() => {\r\n const input = this.host.querySelector('input[type=\"text\"]');\r\n if (!(input instanceof HTMLInputElement)) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory text input not found\"); #2293\r\n }\r\n\r\n this.input = input;\r\n if (input.id) {\r\n this.inputId = input.id;\r\n } else {\r\n input.id = this.inputId;\r\n }\r\n\r\n if (!this.input.labels || this.input.labels.length < 1) {\r\n return;\r\n // throw new ReferenceError(\"Mandatory label for text input not found\"); #2293\r\n }\r\n\r\n const label = this.input.labels[0];\r\n if (label?.id) {\r\n this.labelId = label.id;\r\n } else if (label) {\r\n label.id = this.labelId;\r\n }\r\n\r\n this.input.setAttribute(\"role\", \"combobox\");\r\n this.input.setAttribute(\"aria-haspopup\", \"listbox\");\r\n this.input.setAttribute(\"aria-expanded\", \"false\");\r\n this.input.setAttribute(\"autocomplete\", \"off\");\r\n this.input.setAttribute(\"aria-autocomplete\", \"list\");\r\n this.input.setAttribute(\"aria-activedescendant\", \"\");\r\n this.input.addEventListener(\"input\", this.onInput);\r\n this.input.addEventListener(\"keydown\", this.onKeyDown);\r\n this.input.addEventListener(\"focusin\", this.onFocusIn);\r\n\r\n window.addEventListener(\"resize\", this.onWindowResize);\r\n\r\n document.addEventListener(\"scrollend\", this.onScrollend);\r\n\r\n this.resizeObserver.observe(this.host);\r\n\r\n this.setListboxContainerMaxBlockSize();\r\n });\r\n }\r\n\r\n disconnectedCallback() {\r\n this.input?.removeEventListener(\"input\", this.onInput);\r\n this.input?.removeEventListener(\"keydown\", this.onKeyDown);\r\n this.input?.removeEventListener(\"focusin\", this.onFocusIn);\r\n\r\n window.removeEventListener(\"resize\", this.onWindowResize);\r\n\r\n document.removeEventListener(\"scrollend\", this.onScrollend);\r\n\r\n this.resizeObserver.disconnect();\r\n }\r\n\r\n private onWindowResize = debounce(() => this.setListboxContainerMaxBlockSize(), 150);\r\n\r\n private onScrollend = () => this.setListboxContainerMaxBlockSize();\r\n\r\n private setListboxContainerMaxBlockSize(): void {\r\n if (!this.listboxContainer || !this.showSuggestions) {\r\n return;\r\n }\r\n\r\n if (this.listboxItems[0] && this.showSuggestions) {\r\n this.listItemBlockSize = this.listboxItems[0].getBoundingClientRect().height;\r\n }\r\n\r\n const availableBlockSize = window.innerHeight - this.host.getBoundingClientRect().bottom;\r\n const listboxMaxBlockSize =\r\n this.listItemBlockSize * maxSuggestionsViewable + 2 * listboxPaddingBlock + 2 * listboxBorderWidth;\r\n\r\n if (availableBlockSize > this.listItemBlockSize) {\r\n if (availableBlockSize < listboxMaxBlockSize) {\r\n this.listboxContainerMaxBlockSize = availableBlockSize - 2 * listboxPaddingBlock;\r\n } else {\r\n this.listboxContainerMaxBlockSize = listboxMaxBlockSize;\r\n }\r\n }\r\n }\r\n\r\n private showInputValueNotFound(text?: string) {\r\n return this.processAutosuggestMarkItems(this.markTerms(this.input?.value.split(\" \").filter((t) => t) ?? [], text));\r\n }\r\n\r\n private handleMark(\r\n suggestion: Suggestion,\r\n text: string,\r\n type?: \"value\" | \"type\" | \"extra\",\r\n extraIndex?: number,\r\n ): (VNode | string)[] {\r\n if (this.mark && type) {\r\n return this.processAutosuggestMarkItems(this.mark(suggestion, text, type, extraIndex));\r\n }\r\n return this.processAutosuggestMarkItems(this.markTerms(this.input?.value.split(\" \").filter((t) => t) ?? [], text));\r\n }\r\n\r\n private markTerms(terms: string[], suggestionValue?: string): AutosuggestMarkItem[] {\r\n if (!suggestionValue || !terms || terms.length === 0 || terms[0] === undefined) {\r\n return [\"\"];\r\n }\r\n\r\n const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, \"gi\");\r\n\r\n return suggestionValue.split(termRegex).reduce((total: AutosuggestMarkItem[], valuePart: string) => {\r\n if (!valuePart) {\r\n total.push(valuePart);\r\n } else if (termRegex.test(valuePart)) {\r\n total.push({ mark: valuePart });\r\n } else if (terms.length === 1) {\r\n total.push(valuePart);\r\n } else {\r\n total.push(...this.markTerms(terms.slice(1), valuePart));\r\n }\r\n\r\n return total;\r\n }, []);\r\n }\r\n\r\n private processAutosuggestMarkItems(items: AutosuggestMarkItem[]): (VNode | string)[] {\r\n if (items.length === 0) {\r\n return [\"\"];\r\n }\r\n\r\n return items.map((item) => {\r\n if (typeof item === \"object\") {\r\n return <mark>{item.mark}</mark>;\r\n }\r\n return item;\r\n });\r\n }\r\n\r\n private selectSuggestion(suggestion: Suggestion, group?: SuggestionGroup) {\r\n this.selectedSuggestion = suggestion;\r\n this.selectedSuggestionGroup = group;\r\n\r\n this.setAriaActiveDescendant();\r\n }\r\n\r\n private selectFirstSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (isGrouped(this.suggestions) && this.selectedSuggestionGroup) {\r\n this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[0];\r\n } else {\r\n if (isFlat(this.suggestions)) {\r\n this.selectedSuggestion = this.suggestions[0];\r\n }\r\n }\r\n\r\n this.setAriaActiveDescendant(true);\r\n }\r\n\r\n private selectLastSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (isGrouped(this.suggestions) && this.selectedSuggestionGroup) {\r\n this.selectedSuggestion =\r\n this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length - 1];\r\n } else {\r\n if (isFlat(this.suggestions)) {\r\n this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];\r\n }\r\n }\r\n this.setAriaActiveDescendant(true);\r\n }\r\n\r\n private selectNextSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (isGrouped(this.suggestions)) {\r\n this.selectNextGroupedSuggestion();\r\n } else {\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;\r\n\r\n this.selectedSuggestion = this.suggestions[index + 1] ?? this.suggestions[0];\r\n }\r\n\r\n this.setAriaActiveDescendant(true);\r\n }\r\n\r\n private selectNextGroupedSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (this.selectedSuggestionGroup) {\r\n const indexInGroup = this.selectedSuggestion\r\n ? this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion)\r\n : -1;\r\n\r\n if (indexInGroup === this.selectedSuggestionGroup.suggestions.length - 1) {\r\n // Move to first suggestion in next or first group\r\n const groupIndex = this.suggestionGroups.indexOf(this.selectedSuggestionGroup);\r\n this.selectedSuggestionGroup = this.suggestionGroups[groupIndex + 1] ?? this.suggestionGroups[0];\r\n this.selectedSuggestion = this.selectedSuggestionGroup!.suggestions[0];\r\n } else {\r\n // Within this group\r\n this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[indexInGroup + 1];\r\n }\r\n } else {\r\n this.selectedSuggestionGroup = this.suggestionGroups[0];\r\n this.selectedSuggestion = this.selectedSuggestionGroup!.suggestions[0];\r\n }\r\n }\r\n\r\n private selectPreviousSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (isGrouped(this.suggestions)) {\r\n this.selectPreviousGroupedSuggestion();\r\n } else {\r\n const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;\r\n\r\n this.selectedSuggestion = this.suggestions[index - 1] ?? this.suggestions[this.suggestions.length - 1];\r\n }\r\n\r\n this.setAriaActiveDescendant(true);\r\n }\r\n\r\n private selectPreviousGroupedSuggestion() {\r\n if (!this.suggestions) {\r\n return;\r\n }\r\n\r\n if (this.selectedSuggestionGroup) {\r\n const indexInGroup = this.selectedSuggestion\r\n ? this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion)\r\n : -1;\r\n\r\n if (indexInGroup === 0) {\r\n // Move to last suggestion in previous or last group\r\n const groupIndex = this.suggestionGroups.indexOf(this.selectedSuggestionGroup);\r\n\r\n this.selectedSuggestionGroup =\r\n this.suggestionGroups[groupIndex - 1] ?? this.suggestionGroups[this.suggestions.length - 1];\r\n this.selectedSuggestion =\r\n this.selectedSuggestionGroup!.suggestions[this.selectedSuggestionGroup!.suggestions.length - 1];\r\n } else {\r\n // Within this group\r\n this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[indexInGroup - 1];\r\n }\r\n } else {\r\n this.selectedSuggestionGroup = this.suggestionGroups[this.suggestions.length - 1];\r\n this.selectedSuggestion =\r\n this.selectedSuggestionGroup!.suggestions[this.selectedSuggestionGroup!.suggestions.length - 1];\r\n }\r\n }\r\n\r\n private get suggestionGroups(): SuggestionGroup[] {\r\n return isGrouped(this.suggestions) ? this.suggestions : [];\r\n }\r\n\r\n private setAriaActiveDescendant(scroll = false): void {\r\n if (this.selectedSuggestion) {\r\n const id = this.selectedSuggestionGroup\r\n ? this.listboxGroupedItemId(this.selectedSuggestionGroup, this.selectedSuggestion)\r\n : this.listboxItemId(this.selectedSuggestion);\r\n this.input?.setAttribute(\"aria-activedescendant\", id);\r\n if (scroll) {\r\n document.getElementById(id)?.scrollIntoView({ block: \"nearest\" });\r\n }\r\n }\r\n }\r\n\r\n private resetSelectedSuggestion() {\r\n this.showLoading = !this.loadingDelayed;\r\n this.notFound = false;\r\n this.selectedSuggestion = undefined;\r\n this.selectedSuggestionGroup = undefined;\r\n this.input?.setAttribute(\"aria-activedescendant\", \"\");\r\n }\r\n\r\n private openSuggestions(selectSuggestion?: \"first\" | \"last\") {\r\n this.showSuggestions = (this.suggestions && this.suggestions.length > 0) ?? false;\r\n this.notFound = (this.suggestions && this.suggestions?.length === 0) ?? false;\r\n this.input?.setAttribute(\"aria-expanded\", (this.showSuggestions || this.notFound).toString());\r\n\r\n if (this.showSuggestions && selectSuggestion === \"first\") {\r\n this.selectFirstSuggestion();\r\n } else if (this.showSuggestions && selectSuggestion === \"last\") {\r\n this.selectLastSuggestion();\r\n }\r\n }\r\n\r\n private closeSuggestions() {\r\n this.showSuggestions = false;\r\n this.notFound = false;\r\n this.input?.setAttribute(\"aria-expanded\", \"false\");\r\n this.selectFirstSuggestion();\r\n }\r\n\r\n private pickSelectedValue() {\r\n if (this.selectedSuggestion && this.showSuggestions) {\r\n this.dsoSelect.emit(this.selectedSuggestion);\r\n } else {\r\n this.dsoSearch.emit(this.input?.value);\r\n }\r\n\r\n this.closeSuggestions();\r\n }\r\n\r\n private onKeyDown = (event: KeyboardEvent) => {\r\n if (event.defaultPrevented || this.loading) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"first\");\r\n } else {\r\n this.selectNextSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"ArrowUp\":\r\n if (!this.showSuggestions) {\r\n this.openSuggestions(\"last\");\r\n } else {\r\n this.selectPreviousSuggestion();\r\n }\r\n\r\n break;\r\n\r\n case \"Tab\":\r\n this.closeSuggestions();\r\n return;\r\n\r\n case \"Escape\":\r\n this.closeSuggestions();\r\n break;\r\n\r\n case \"Enter\":\r\n this.pickSelectedValue();\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n };\r\n\r\n private listboxItemId(suggestion: Suggestion): string {\r\n if (!this.suggestions) {\r\n return \"\";\r\n }\r\n return `${this.inputId}-${isFlat(this.suggestions) && this.suggestions.indexOf(suggestion) + 1}`;\r\n }\r\n\r\n private listboxGroupedItemId(suggestionGroup: SuggestionGroup, suggestion: Suggestion): string {\r\n if (!this.suggestions) {\r\n return \"\";\r\n }\r\n\r\n return `${this.inputId}-${this.suggestionGroups.indexOf(suggestionGroup) + 1}-${suggestionGroup.suggestions.indexOf(suggestion) + 1}`;\r\n }\r\n\r\n private getMarkedChunkedExtras(extras: string[], suggestion: Suggestion): (string | VNode)[][][] {\r\n const chunkedExtras = extras.reduce((resultArray: string[][], extra, index) => {\r\n const chunkIndex = Math.floor(index / 2);\r\n\r\n if (!resultArray[chunkIndex]) {\r\n resultArray[chunkIndex] = [];\r\n }\r\n resultArray[chunkIndex]?.push(extra);\r\n return resultArray;\r\n }, []);\r\n\r\n return chunkedExtras.map((chunk, index) =>\r\n chunk.map((c, i) => this.handleMark(suggestion, c, \"extra\", index * 2 + i)),\r\n );\r\n }\r\n\r\n private getMarkedSuggestions(suggestion: Suggestion): MarkedSuggestion {\r\n return {\r\n value: this.handleMark(suggestion, suggestion.value, \"value\"),\r\n type: suggestion.type ? this.handleMark(suggestion, suggestion.type, \"type\") : undefined,\r\n extras: suggestion.extras ? this.getMarkedChunkedExtras(suggestion.extras, suggestion) : undefined,\r\n };\r\n }\r\n\r\n render() {\r\n this.listboxItems = [];\r\n\r\n const showListbox = this.showSuggestions || this.notFound;\r\n\r\n const grouped = isGrouped(this.suggestions);\r\n const flat = isFlat(this.suggestions);\r\n\r\n if (showListbox && this.input) {\r\n this.input.setAttribute(\"aria-controls\", this.listboxId);\r\n } else if (this.input) {\r\n this.input.removeAttribute(\"aria-controls\");\r\n }\r\n\r\n return (\r\n <>\r\n <slot />\r\n {this.loading && this.showLoading ? (\r\n <div class=\"autosuggest-progress-box\">\r\n <dso-progress-indicator label={this.loadingLabel}></dso-progress-indicator>\r\n </div>\r\n ) : (\r\n showListbox && (\r\n <dso-scrollable\r\n class=\"listbox-container\"\r\n ref={(element) => (this.listboxContainer = element)}\r\n style={{ \"--max-block-size\": `${this.listboxContainerMaxBlockSize}px` }}\r\n >\r\n <div\r\n class=\"listbox\"\r\n role=\"listbox\"\r\n aria-live=\"polite\"\r\n id={this.listboxId}\r\n aria-labelledby={this.labelId}\r\n ref={(element) => (this.listbox = element)}\r\n tabindex=\"0\"\r\n >\r\n {(flat &&\r\n this.showSuggestions &&\r\n this.suggestions &&\r\n this.suggestions.map((suggestion) => (\r\n <Option\r\n id={this.listboxItemId(suggestion)}\r\n mouseEnter={() => this.selectSuggestion(suggestion)}\r\n mouseLeave={() => this.resetSelectedSuggestion()}\r\n click={() => this.pickSelectedValue()}\r\n selected={(suggestion === this.selectedSuggestion).toString()}\r\n suggestion={suggestion}\r\n ref={(element) => element && this.listboxItems.push(element)}\r\n markedSuggestion={this.getMarkedSuggestions(suggestion)}\r\n />\r\n ))) ||\r\n (grouped &&\r\n this.showSuggestions &&\r\n this.suggestions &&\r\n this.suggestions.map((suggestionGroup) => {\r\n const groupLabelId = v4();\r\n return (\r\n <div role=\"group\" class=\"group\" aria-labelledby={groupLabelId}>\r\n <div class=\"group-label\" role=\"presentation\" id={groupLabelId}>\r\n {suggestionGroup.groupLabel}\r\n </div>\r\n {suggestionGroup.suggestions.map((suggestion) => (\r\n <Option\r\n id={this.listboxGroupedItemId(suggestionGroup, suggestion)}\r\n mouseEnter={() => this.selectSuggestion(suggestion, suggestionGroup)}\r\n mouseLeave={() => this.resetSelectedSuggestion()}\r\n click={() => this.pickSelectedValue()}\r\n selected={(suggestion === this.selectedSuggestion).toString()}\r\n suggestion={suggestion}\r\n ref={(element) => element && this.listboxItems.push(element)}\r\n markedSuggestion={this.getMarkedSuggestions(suggestion)}\r\n />\r\n ))}\r\n </div>\r\n );\r\n })) ||\r\n (this.notFound && (\r\n <div class=\"option\">\r\n <span class=\"value\">\r\n {this.notFoundLabel ||\r\n this.showInputValueNotFound(this.text(\"notFound\", { inputValue: this.inputValue }))}\r\n </span>\r\n </div>\r\n ))}\r\n </div>\r\n </dso-scrollable>\r\n )\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"mappings":"oMAAe,SAASA,EAAmBC,GAC1C,UAAWA,IAAW,SAAU,CAC/B,MA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