@dso-toolkit/core 47.0.1 → 49.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1509 -62
- package/dist/cjs/dso-accordion.cjs.entry.js +24 -4
- package/dist/cjs/dso-autosuggest.cjs.entry.js +57 -47
- package/dist/cjs/dso-date-picker.cjs.entry.js +3 -2
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +2 -2
- package/dist/cjs/dso-modal.cjs.entry.js +4 -7
- package/dist/cjs/dso-ozon-content.cjs.entry.js +3 -3
- package/dist/cjs/dso-table.cjs.entry.js +3 -5
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +14 -22
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +8 -3
- package/dist/cjs/{focus-trap.esm-d83fd673.js → focus-trap.esm-c501d382.js} +82 -155
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/accordion/accordion.js +29 -6
- package/dist/collection/components/accordion/components/accordion-section.css +27 -4
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js +6 -0
- package/dist/collection/components/accordion/components/accordion-section.js +179 -64
- package/dist/collection/components/accordion/components/handles/element.handle.js +7 -0
- package/dist/collection/components/accordion/components/handles/heading.handle.js +14 -0
- package/dist/collection/components/accordion/components/handles/icon.handle.js +13 -0
- package/dist/collection/components/accordion/components/handles/index.js +4 -0
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js +15 -0
- package/dist/collection/components/autosuggest/autosuggest.interfaces.js +1 -0
- package/dist/collection/components/autosuggest/autosuggest.js +61 -49
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/card-container/card-container.js +1 -1
- package/dist/collection/components/date-picker/date-picker.interfaces.js +1 -0
- package/dist/collection/components/date-picker/date-picker.js +19 -11
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +2 -2
- package/dist/collection/components/header/header.js +2 -6
- package/dist/collection/components/icon/icon.js +95 -95
- package/dist/collection/components/info-button/info-button.interfaces.js +1 -0
- package/dist/collection/components/info-button/info-button.js +2 -1
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/modal/modal.css +103 -75
- package/dist/collection/components/modal/modal.interfaces.js +1 -0
- package/dist/collection/components/modal/modal.js +5 -7
- package/dist/collection/components/ozon-content/nodes/noot.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/selectable/selectable.css +18 -1
- package/dist/collection/components/selectable/selectable.interfaces.js +1 -0
- package/dist/collection/components/selectable/selectable.js +3 -2
- package/dist/collection/components/table/table.css +49 -16
- package/dist/collection/components/table/table.js +2 -4
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +14 -43
- package/dist/collection/components/tree-view/tree-view.js +8 -2
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -0
- package/dist/collection/components/viewer-grid/viewer-grid.js +19 -11
- package/dist/collection/index.js +13 -0
- package/dist/components/clsx.m.js +3 -0
- package/dist/components/create-identifier.js +15 -0
- package/dist/components/dropdown-menu.js +151 -0
- package/dist/components/dso-accordion-section.d.ts +11 -0
- package/dist/components/dso-accordion-section.js +1594 -0
- package/dist/components/dso-accordion.d.ts +11 -0
- package/dist/components/dso-accordion.js +336 -0
- package/dist/components/dso-alert.d.ts +11 -0
- package/dist/components/dso-alert.js +55 -0
- package/dist/components/dso-attachments-counter.d.ts +11 -0
- package/dist/components/dso-attachments-counter.js +42 -0
- package/dist/components/dso-autosuggest.d.ts +11 -0
- package/dist/components/dso-autosuggest.js +309 -0
- package/dist/components/dso-badge.d.ts +11 -0
- package/dist/components/dso-badge.js +37 -0
- package/dist/components/dso-banner.d.ts +11 -0
- package/dist/components/dso-banner.js +37 -0
- package/dist/components/dso-card-container.d.ts +11 -0
- package/dist/components/dso-card-container.js +36 -0
- package/dist/components/dso-card.d.ts +11 -0
- package/dist/components/dso-card.js +66 -0
- package/dist/components/dso-date-picker.d.ts +11 -0
- package/dist/components/dso-date-picker.js +682 -0
- package/dist/components/dso-dropdown-menu.d.ts +11 -0
- package/dist/components/dso-dropdown-menu.js +6 -0
- package/dist/components/dso-header.d.ts +11 -0
- package/dist/components/dso-header.js +159 -0
- package/dist/components/dso-helpcenter-panel.d.ts +11 -0
- package/dist/components/dso-helpcenter-panel.js +127 -0
- package/dist/components/dso-highlight-box.d.ts +11 -0
- package/dist/components/dso-highlight-box.js +55 -0
- package/dist/components/dso-icon.d.ts +11 -0
- package/dist/components/dso-icon.js +6 -0
- package/dist/components/dso-image-overlay.d.ts +11 -0
- package/dist/components/dso-image-overlay.js +129 -0
- package/dist/components/dso-info-button.d.ts +11 -0
- package/dist/components/dso-info-button.js +6 -0
- package/dist/components/dso-info.d.ts +11 -0
- package/dist/components/dso-info.js +6 -0
- package/dist/components/dso-label.d.ts +11 -0
- package/dist/components/dso-label.js +156 -0
- package/dist/components/dso-map-base-layers.d.ts +11 -0
- package/dist/components/dso-map-base-layers.js +80 -0
- package/dist/components/dso-map-controls.d.ts +11 -0
- package/dist/components/dso-map-controls.js +86 -0
- package/dist/components/dso-map-overlays.d.ts +11 -0
- package/dist/components/dso-map-overlays.js +81 -0
- package/dist/components/dso-modal.d.ts +11 -0
- package/dist/components/dso-modal.js +85 -0
- package/dist/components/dso-ozon-content.d.ts +11 -0
- package/dist/components/dso-ozon-content.js +507 -0
- package/dist/components/dso-pagination.d.ts +11 -0
- package/dist/components/dso-pagination.js +159 -0
- package/dist/components/dso-progress-bar.d.ts +11 -0
- package/dist/components/dso-progress-bar.js +42 -0
- package/dist/components/dso-progress-indicator.d.ts +11 -0
- package/dist/components/dso-progress-indicator.js +6 -0
- package/dist/components/dso-responsive-element.d.ts +11 -0
- package/dist/components/dso-responsive-element.js +6 -0
- package/dist/components/dso-selectable.d.ts +11 -0
- package/dist/components/dso-selectable.js +6 -0
- package/dist/components/dso-table.d.ts +11 -0
- package/dist/components/dso-table.js +111 -0
- package/dist/components/dso-toggletip.d.ts +11 -0
- package/dist/components/dso-toggletip.js +90 -0
- package/dist/components/dso-tooltip.d.ts +11 -0
- package/dist/components/dso-tooltip.js +6 -0
- package/dist/components/dso-tree-view.d.ts +11 -0
- package/dist/components/dso-tree-view.js +227 -0
- package/dist/components/dso-viewer-grid.d.ts +11 -0
- package/dist/components/dso-viewer-grid.js +171 -0
- package/dist/components/focus-trap.esm.js +688 -0
- package/dist/components/icon.js +663 -0
- package/dist/components/index.d.ts +55 -0
- package/dist/components/index.esm.js +458 -0
- package/dist/components/index.js +35 -0
- package/dist/components/index2.js +70 -0
- package/dist/components/info-button.js +56 -0
- package/dist/components/info.js +42 -0
- package/dist/components/is-modified-event.js +4 -0
- package/dist/components/progress-indicator.js +44 -0
- package/dist/components/responsive-element.js +67 -0
- package/dist/components/selectable.js +108 -0
- package/dist/components/tooltip.js +2047 -0
- package/dist/components/v4.js +66 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-04ffcc93.entry.js +1 -0
- package/dist/dso-toolkit/{p-e0a37d82.entry.js → p-06b4f78d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2b83a825.entry.js → p-35687d62.entry.js} +1 -1
- package/dist/dso-toolkit/p-52bc72d0.entry.js +1 -0
- package/dist/dso-toolkit/p-57ceabab.js +5 -0
- package/dist/dso-toolkit/p-655eff47.entry.js +1 -0
- package/dist/dso-toolkit/p-672c8323.entry.js +1 -0
- package/dist/dso-toolkit/p-7f8be9bc.entry.js +1 -0
- package/dist/dso-toolkit/p-80575700.entry.js +1 -0
- package/dist/dso-toolkit/p-8e9f6355.entry.js +1 -0
- package/dist/dso-toolkit/p-a8cb2eae.entry.js +1 -0
- package/dist/dso-toolkit/p-bcd19ae7.entry.js +1 -0
- package/dist/dso-toolkit/p-d31805a9.entry.js +1 -0
- package/dist/dso-toolkit/{p-dcc74039.entry.js → p-d7b2adc3.entry.js} +1 -1
- package/dist/dso-toolkit/p-d8ba8db6.entry.js +1 -0
- package/dist/dso-toolkit/{p-800e1267.entry.js → p-daee3252.entry.js} +1 -1
- package/dist/esm/dso-accordion-section.entry.js +1510 -63
- package/dist/esm/dso-accordion.entry.js +24 -4
- package/dist/esm/dso-autosuggest.entry.js +57 -47
- package/dist/esm/dso-date-picker.entry.js +3 -2
- package/dist/esm/dso-dropdown-menu.entry.js +2 -2
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +2 -2
- package/dist/esm/dso-modal.entry.js +5 -8
- package/dist/esm/dso-ozon-content.entry.js +3 -3
- package/dist/esm/dso-table.entry.js +3 -5
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +2 -2
- package/dist/esm/dso-tooltip.entry.js +14 -22
- package/dist/esm/dso-viewer-grid.entry.js +8 -3
- package/dist/esm/{focus-trap.esm-33203b60.js → focus-trap.esm-94794d92.js} +82 -155
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/accordion/accordion.d.ts +7 -2
- package/dist/types/components/accordion/accordion.interfaces.d.ts +6 -3
- package/dist/types/components/accordion/components/accordion-section.d.ts +19 -3
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +3 -0
- package/dist/types/components/accordion/components/handles/element.handle.d.ts +6 -0
- package/dist/types/components/accordion/components/handles/heading.handle.d.ts +6 -0
- package/dist/types/components/accordion/components/handles/icon.handle.d.ts +7 -0
- package/dist/types/components/accordion/components/handles/index.d.ts +4 -0
- package/dist/types/components/accordion/components/handles/state-icon.handle.d.ts +5 -0
- package/dist/types/components/autosuggest/autosuggest.d.ts +2 -15
- package/dist/types/components/autosuggest/autosuggest.interfaces.d.ts +14 -0
- package/dist/types/components/date-picker/date-picker.d.ts +2 -15
- package/dist/types/components/date-picker/date-picker.interfaces.d.ts +14 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +2 -2
- package/dist/types/components/header/header.interfaces.d.ts +1 -0
- package/dist/types/components/info-button/info-button.d.ts +1 -4
- package/dist/types/components/info-button/info-button.interfaces.d.ts +4 -0
- package/dist/types/components/map-overlays/map-overlays.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +2 -4
- package/dist/types/components/modal/modal.interfaces.d.ts +3 -0
- package/dist/types/components/selectable/selectable.d.ts +1 -2
- package/dist/types/components/selectable/selectable.interfaces.d.ts +2 -0
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +0 -8
- package/dist/types/components/tree-view/tree-item.d.ts +1 -1
- package/dist/types/components/tree-view/tree-view.d.ts +2 -2
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +5 -16
- package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +15 -0
- package/dist/types/components.d.ts +29 -30
- package/dist/types/index.d.ts +13 -0
- package/package.json +20 -25
- package/dist/custom-elements/index.d.ts +0 -243
- package/dist/custom-elements/index.js +0 -7555
- package/dist/dso-toolkit/p-0917f18a.entry.js +0 -1
- package/dist/dso-toolkit/p-0c8cd0d8.entry.js +0 -1
- package/dist/dso-toolkit/p-203fc66c.entry.js +0 -1
- package/dist/dso-toolkit/p-39a33b89.entry.js +0 -1
- package/dist/dso-toolkit/p-3ab4441a.entry.js +0 -1
- package/dist/dso-toolkit/p-44c0bb3e.entry.js +0 -1
- package/dist/dso-toolkit/p-89d262b7.js +0 -5
- package/dist/dso-toolkit/p-9aa3fa9d.entry.js +0 -1
- package/dist/dso-toolkit/p-ba253bcd.entry.js +0 -1
- package/dist/dso-toolkit/p-e43e39cf.entry.js +0 -1
- package/dist/dso-toolkit/p-e8b22546.entry.js +0 -1
- package/dist/dso-toolkit/p-f93b7c7a.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-ecec64a0.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-
|
|
17
|
+
return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[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"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"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-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"focused":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-tooltip.cjs",[[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]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"./components/autosuggest/autosuggest.js",
|
|
4
|
-
"./components/date-picker/date-picker.js",
|
|
5
|
-
"./components/info-button/info-button.js",
|
|
6
3
|
"./components/modal/modal.js",
|
|
7
|
-
"./components/selectable/selectable.js",
|
|
8
|
-
"./components/viewer-grid/viewer-grid.js",
|
|
9
4
|
"./components/accordion/accordion.js",
|
|
10
5
|
"./components/accordion/components/accordion-section.js",
|
|
11
6
|
"./components/alert/alert.js",
|
|
12
7
|
"./components/attachments-counter/attachments-counter.js",
|
|
8
|
+
"./components/autosuggest/autosuggest.js",
|
|
13
9
|
"./components/badge/badge.js",
|
|
14
10
|
"./components/banner/banner.js",
|
|
15
11
|
"./components/card/card.js",
|
|
16
12
|
"./components/card-container/card-container.js",
|
|
13
|
+
"./components/date-picker/date-picker.js",
|
|
17
14
|
"./components/dropdown-menu/dropdown-menu.js",
|
|
18
15
|
"./components/header/header.js",
|
|
19
16
|
"./components/helpcenter-panel/helpcenter-panel.js",
|
|
@@ -21,6 +18,7 @@
|
|
|
21
18
|
"./components/icon/icon.js",
|
|
22
19
|
"./components/image-overlay/image-overlay.js",
|
|
23
20
|
"./components/info/info.js",
|
|
21
|
+
"./components/info-button/info-button.js",
|
|
24
22
|
"./components/label/label.js",
|
|
25
23
|
"./components/map-base-layers/map-base-layers.js",
|
|
26
24
|
"./components/map-controls/map-controls.js",
|
|
@@ -30,15 +28,17 @@
|
|
|
30
28
|
"./components/progress-bar/progress-bar.js",
|
|
31
29
|
"./components/progress-indicator/progress-indicator.js",
|
|
32
30
|
"./components/responsive-element/responsive-element.js",
|
|
31
|
+
"./components/selectable/selectable.js",
|
|
33
32
|
"./components/table/table.js",
|
|
34
33
|
"./components/toggletip/toggletip.js",
|
|
35
34
|
"./components/tooltip/tooltip.js",
|
|
36
|
-
"./components/tree-view/tree-view.js"
|
|
35
|
+
"./components/tree-view/tree-view.js",
|
|
36
|
+
"./components/viewer-grid/viewer-grid.js"
|
|
37
37
|
],
|
|
38
38
|
"compiler": {
|
|
39
39
|
"name": "@stencil/core",
|
|
40
|
-
"version": "2.
|
|
41
|
-
"typescriptVersion": "4.
|
|
40
|
+
"version": "2.20.0",
|
|
41
|
+
"typescriptVersion": "4.8.4"
|
|
42
42
|
},
|
|
43
43
|
"collections": [],
|
|
44
44
|
"bundles": []
|
|
@@ -8,6 +8,7 @@ export class Accordion {
|
|
|
8
8
|
const { state } = createStore({
|
|
9
9
|
variant: this.variant || "default",
|
|
10
10
|
reverseAlign: this.reverseAlign,
|
|
11
|
+
allowMultipleOpen: this.allowMultipleOpen,
|
|
11
12
|
});
|
|
12
13
|
this.accordionState = state;
|
|
13
14
|
}
|
|
@@ -17,6 +18,9 @@ export class Accordion {
|
|
|
17
18
|
updateReverseAlign(reverseAlign) {
|
|
18
19
|
this.accordionState.reverseAlign = reverseAlign;
|
|
19
20
|
}
|
|
21
|
+
updateAllowMultipleOpen(allowMultipleOpen) {
|
|
22
|
+
this.accordionState.allowMultipleOpen = allowMultipleOpen;
|
|
23
|
+
}
|
|
20
24
|
watchAllowMultiple(allowMultipleOpen) {
|
|
21
25
|
if (!allowMultipleOpen) {
|
|
22
26
|
const openSections = Array.from(this.host.querySelectorAll(":scope > dso-accordion-section[open]"));
|
|
@@ -28,7 +32,10 @@ export class Accordion {
|
|
|
28
32
|
async getState() {
|
|
29
33
|
return this.accordionState;
|
|
30
34
|
}
|
|
31
|
-
/** Toggle a section. Pass the `<dso-accordion-section>` element or the index of the section
|
|
35
|
+
/** Toggle a section. Pass the `<dso-accordion-section>` element or the index of the section.\
|
|
36
|
+
* returns `undefined` when no section is toggled.\
|
|
37
|
+
* returns `true` when the section is opened and `false` when the section is closed.
|
|
38
|
+
*/
|
|
32
39
|
async toggleSection(sectionElement, event) {
|
|
33
40
|
const sections = Array.from(this.host.querySelectorAll(":scope > dso-accordion-section"));
|
|
34
41
|
if (typeof sectionElement === "number") {
|
|
@@ -41,16 +48,17 @@ export class Accordion {
|
|
|
41
48
|
if (this.allowMultipleOpen) {
|
|
42
49
|
this.controlOpenAttribute(sectionElement, !sectionIsOpen);
|
|
43
50
|
this.emitToggleEvent(sectionElement, sections, event);
|
|
44
|
-
return;
|
|
51
|
+
return !sectionIsOpen;
|
|
45
52
|
}
|
|
46
53
|
if (sectionIsOpen) {
|
|
47
54
|
this.controlOpenAttribute(sectionElement, false);
|
|
48
55
|
this.emitToggleEvent(sectionElement, sections, event);
|
|
49
|
-
return;
|
|
56
|
+
return false;
|
|
50
57
|
}
|
|
51
58
|
await this.closeOpenSections();
|
|
52
59
|
this.controlOpenAttribute(sectionElement, true);
|
|
53
60
|
this.emitToggleEvent(sectionElement, sections, event);
|
|
61
|
+
return true;
|
|
54
62
|
}
|
|
55
63
|
/** Closes all sections belonging to this accordion. */
|
|
56
64
|
async closeOpenSections() {
|
|
@@ -58,6 +66,18 @@ export class Accordion {
|
|
|
58
66
|
const openSections = sections.filter((s) => this.isSectionOpen(s));
|
|
59
67
|
openSections.forEach((section) => this.controlOpenAttribute(section, false));
|
|
60
68
|
}
|
|
69
|
+
// These checks are needed for a React timing issue.
|
|
70
|
+
componentWillLoad() {
|
|
71
|
+
if (this.accordionState.variant !== this.variant) {
|
|
72
|
+
this.accordionState.variant = this.variant || "default";
|
|
73
|
+
}
|
|
74
|
+
if (this.accordionState.reverseAlign !== this.reverseAlign) {
|
|
75
|
+
this.accordionState.reverseAlign = this.reverseAlign;
|
|
76
|
+
}
|
|
77
|
+
if (this.accordionState.allowMultipleOpen !== this.allowMultipleOpen) {
|
|
78
|
+
this.accordionState.allowMultipleOpen = this.allowMultipleOpen;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
61
81
|
render() {
|
|
62
82
|
return (h(Host, { class: {
|
|
63
83
|
"dso-accordion": true,
|
|
@@ -206,7 +226,7 @@ export class Accordion {
|
|
|
206
226
|
},
|
|
207
227
|
"toggleSection": {
|
|
208
228
|
"complexType": {
|
|
209
|
-
"signature": "(sectionElement: HTMLElement | number, event?: MouseEvent) => Promise<
|
|
229
|
+
"signature": "(sectionElement: HTMLElement | number, event?: MouseEvent) => Promise<undefined | boolean>",
|
|
210
230
|
"parameters": [{
|
|
211
231
|
"tags": [],
|
|
212
232
|
"text": ""
|
|
@@ -225,10 +245,10 @@ export class Accordion {
|
|
|
225
245
|
"location": "global"
|
|
226
246
|
}
|
|
227
247
|
},
|
|
228
|
-
"return": "Promise<
|
|
248
|
+
"return": "Promise<boolean | undefined>"
|
|
229
249
|
},
|
|
230
250
|
"docs": {
|
|
231
|
-
"text": "Toggle a section. Pass the `<dso-accordion-section>` element or the index of the section.",
|
|
251
|
+
"text": "Toggle a section. Pass the `<dso-accordion-section>` element or the index of the section.\\\r\nreturns `undefined` when no section is toggled.\\\r\nreturns `true` when the section is opened and `false` when the section is closed.",
|
|
232
252
|
"tags": []
|
|
233
253
|
}
|
|
234
254
|
},
|
|
@@ -261,6 +281,9 @@ export class Accordion {
|
|
|
261
281
|
}, {
|
|
262
282
|
"propName": "reverseAlign",
|
|
263
283
|
"methodName": "updateReverseAlign"
|
|
284
|
+
}, {
|
|
285
|
+
"propName": "allowMultipleOpen",
|
|
286
|
+
"methodName": "updateAllowMultipleOpen"
|
|
264
287
|
}, {
|
|
265
288
|
"propName": "allowMultipleOpen",
|
|
266
289
|
"methodName": "watchAllowMultiple"
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
:host .dso-section-handle > a dso-icon {
|
|
63
63
|
flex-shrink: 0;
|
|
64
64
|
}
|
|
65
|
+
:host .dso-section-handle > button dso-icon.dso-section-handle-chevron,
|
|
66
|
+
:host .dso-section-handle > a dso-icon.dso-section-handle-chevron {
|
|
67
|
+
transform: rotate(0);
|
|
68
|
+
transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
69
|
+
}
|
|
65
70
|
:host .dso-section-handle > button > .dso-section-handle-addons:first-child,
|
|
66
71
|
:host .dso-section-handle > button > dso-icon:first-child,
|
|
67
72
|
:host .dso-section-handle > a > .dso-section-handle-addons:first-child,
|
|
@@ -76,19 +81,37 @@
|
|
|
76
81
|
:host .dso-section-handle > a > .dso-section-handle-addons:last-child {
|
|
77
82
|
margin-left: auto;
|
|
78
83
|
}
|
|
84
|
+
:host .dso-section-handle > button > .dso-section-handle-addons:last-child dso-attachments-counter,
|
|
79
85
|
:host .dso-section-handle > button > .dso-section-handle-addons:last-child dso-icon,
|
|
86
|
+
:host .dso-section-handle > a > .dso-section-handle-addons:last-child dso-attachments-counter,
|
|
80
87
|
:host .dso-section-handle > a > .dso-section-handle-addons:last-child dso-icon {
|
|
81
88
|
margin-left: 16px;
|
|
82
89
|
}
|
|
83
90
|
|
|
84
|
-
:host(
|
|
85
|
-
|
|
91
|
+
:host([open]) .dso-section-body {
|
|
92
|
+
position: inherit;
|
|
93
|
+
visibility: inherit;
|
|
94
|
+
}
|
|
95
|
+
:host([open]) .dso-section-handle > button .dso-section-handle-chevron:first-child,
|
|
96
|
+
:host([open]) .dso-section-handle > a .dso-section-handle-chevron:first-child {
|
|
97
|
+
transform: rotate(90deg);
|
|
98
|
+
}
|
|
99
|
+
:host([open]) .dso-section-handle > button .dso-section-handle-chevron:last-child,
|
|
100
|
+
:host([open]) .dso-section-handle > a .dso-section-handle-chevron:last-child {
|
|
101
|
+
transform: rotate(-180deg);
|
|
86
102
|
}
|
|
87
103
|
|
|
88
104
|
.dso-section-body {
|
|
89
105
|
background-color: #fff;
|
|
90
106
|
border-top: 0;
|
|
91
107
|
margin-top: -4px;
|
|
108
|
+
overflow-y: hidden;
|
|
109
|
+
}
|
|
110
|
+
.dso-section-body:not(.dso-animate-ready) {
|
|
111
|
+
position: absolute;
|
|
112
|
+
visibility: hidden;
|
|
113
|
+
}
|
|
114
|
+
.dso-section-body .dso-section-body-content {
|
|
92
115
|
padding: 20px 16px 16px;
|
|
93
116
|
}
|
|
94
117
|
|
|
@@ -149,7 +172,7 @@
|
|
|
149
172
|
:host(.dso-accordion-compact) .dso-section-handle button.active {
|
|
150
173
|
color: #39870c;
|
|
151
174
|
}
|
|
152
|
-
:host(.dso-accordion-compact) .dso-section-body {
|
|
175
|
+
:host(.dso-accordion-compact) .dso-section-body .dso-section-body-content {
|
|
153
176
|
padding-left: 32px;
|
|
154
177
|
padding-top: 0;
|
|
155
178
|
padding-right: 0;
|
|
@@ -159,7 +182,7 @@
|
|
|
159
182
|
:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-handle button {
|
|
160
183
|
padding-left: 16px;
|
|
161
184
|
}
|
|
162
|
-
:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-body {
|
|
185
|
+
:host(.dso-accordion-compact.dso-accordion-reverse-align) .dso-section-body .dso-section-body-content {
|
|
163
186
|
padding-left: 16px;
|
|
164
187
|
padding-right: 0;
|
|
165
188
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { h, Host, Fragment, forceUpdate, } from "@stencil/core";
|
|
2
|
+
import anime from "animejs";
|
|
3
|
+
import debounce from "debounce";
|
|
4
|
+
import { stateMap } from "./accordion-section.interfaces";
|
|
5
|
+
import { Handle, HandleElement, HandleIcon } from "./handles";
|
|
2
6
|
export class AccordionSection {
|
|
3
7
|
constructor() {
|
|
4
8
|
this.handleTitle = undefined;
|
|
@@ -11,8 +15,12 @@ export class AccordionSection {
|
|
|
11
15
|
this.open = false;
|
|
12
16
|
this.hasNestedSection = false;
|
|
13
17
|
}
|
|
18
|
+
toggleOpen() {
|
|
19
|
+
this.activateAnimation();
|
|
20
|
+
}
|
|
14
21
|
componentWillLoad() {
|
|
15
22
|
const accordion = this.host.parentElement;
|
|
23
|
+
this.hasNestedSection = this.host.querySelector("dso-accordion") !== null;
|
|
16
24
|
if (isAccordion(accordion)) {
|
|
17
25
|
this.accordion = accordion;
|
|
18
26
|
accordion.getState().then((state) => {
|
|
@@ -20,32 +28,158 @@ export class AccordionSection {
|
|
|
20
28
|
forceUpdate(this.host);
|
|
21
29
|
});
|
|
22
30
|
}
|
|
31
|
+
this.prepareAnimationResizeObserver();
|
|
23
32
|
}
|
|
24
33
|
componentDidLoad() {
|
|
25
|
-
|
|
34
|
+
var _a, _b;
|
|
35
|
+
const bodyContentElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dso-section-body-content");
|
|
36
|
+
if (bodyContentElement) {
|
|
37
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(bodyContentElement);
|
|
38
|
+
}
|
|
26
39
|
}
|
|
27
|
-
|
|
28
|
-
async toggleSection() {
|
|
40
|
+
disconnectedCallback() {
|
|
29
41
|
var _a;
|
|
30
|
-
|
|
42
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
43
|
+
}
|
|
44
|
+
/** Toggle this section.
|
|
45
|
+
* @param scrollIntoView boolean - defaults to true
|
|
46
|
+
*/
|
|
47
|
+
async toggleSection(scrollIntoView = true) {
|
|
48
|
+
var _a;
|
|
49
|
+
await ((_a = this.accordion) === null || _a === void 0 ? void 0 : _a.toggleSection(this.host).then(async () => {
|
|
50
|
+
if (scrollIntoView) {
|
|
51
|
+
await this.scrollIntoViewWhenNeeded(true);
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
/** Scroll this section into view when needed. */
|
|
56
|
+
async scrollSectionIntoView() {
|
|
57
|
+
await this.scrollIntoViewWhenNeeded(false);
|
|
58
|
+
}
|
|
59
|
+
async scrollIntoViewWhenNeeded(sectionToggled) {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
AccordionSection.scrollCandidate = undefined;
|
|
62
|
+
const bodyClientRect = (_a = this.sectionBody) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
63
|
+
const headingClientRect = (_b = this.sectionHeading) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
64
|
+
if (!bodyClientRect || !headingClientRect || !this.accordionState) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const waitForAnimationBeforeScrolling = (state) => {
|
|
68
|
+
var _a;
|
|
69
|
+
const sectionBottomOffsetTop = this.host.offsetTop + headingClientRect.height + (this.open ? (_a = this.bodyHeight) !== null && _a !== void 0 ? _a : 0 : 0);
|
|
70
|
+
return (sectionToggled && (sectionBottomOffsetTop > document.documentElement.scrollHeight || state.allowMultipleOpen));
|
|
71
|
+
};
|
|
72
|
+
if (waitForAnimationBeforeScrolling(this.accordionState)) {
|
|
73
|
+
AccordionSection.scrollCandidate = this.host;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
// this y is relative to the top of the viewport.
|
|
77
|
+
const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (_c = this.bodyHeight) !== null && _c !== void 0 ? _c : 0 : 0);
|
|
78
|
+
if (sectionBottomY > window.innerHeight) {
|
|
79
|
+
const expandedAccordionHeight = sectionBottomY - headingClientRect.top;
|
|
80
|
+
const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;
|
|
81
|
+
window.scrollTo({
|
|
82
|
+
top: shouldScrollToTopOfSection
|
|
83
|
+
? this.host.offsetTop
|
|
84
|
+
: this.host.offsetTop - (window.innerHeight - expandedAccordionHeight),
|
|
85
|
+
behavior: "smooth",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
else if (headingClientRect.top < 0) {
|
|
89
|
+
window.scrollTo({
|
|
90
|
+
top: this.host.offsetTop,
|
|
91
|
+
behavior: "smooth",
|
|
92
|
+
});
|
|
93
|
+
}
|
|
31
94
|
}
|
|
32
95
|
async toggle(e) {
|
|
33
96
|
var _a;
|
|
34
97
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
35
|
-
|
|
98
|
+
(_a = this.accordion) === null || _a === void 0 ? void 0 : _a.toggleSection(this.host, e).then(async (isOpen) => {
|
|
99
|
+
if (isOpen) {
|
|
100
|
+
await this.scrollIntoViewWhenNeeded(true);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
36
103
|
}
|
|
37
104
|
render() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
const { variant, reverseAlign } = this.accordionState;
|
|
105
|
+
var _a;
|
|
106
|
+
const { variant, reverseAlign } = (_a = this.accordionState) !== null && _a !== void 0 ? _a : {};
|
|
42
107
|
const hasAddons = !!this.status || !!this.state || !!this.icon || !!this.attachmentCount;
|
|
43
108
|
return (h(Host, { class: {
|
|
44
109
|
"dso-accordion-section": true,
|
|
45
110
|
["dso-accordion-" + variant]: true,
|
|
46
111
|
"dso-nested-accordion": this.hasNestedSection,
|
|
47
|
-
"dso-accordion-reverse-align":
|
|
48
|
-
} }, h(Handle, { heading: this.heading }, h(HandleElement, { handleUrl: this.handleUrl, onClick: async (event) => await this.toggle(event), open: this.open }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("span", null, this.handleTitle), h("dso-icon", {
|
|
112
|
+
"dso-accordion-reverse-align": reverseAlign !== null && reverseAlign !== void 0 ? reverseAlign : false,
|
|
113
|
+
}, hidden: !variant }, h(Handle, { heading: this.heading, ref: (element) => (this.sectionHeading = element) }, h(HandleElement, { handleUrl: this.handleUrl, onClick: async (event) => await this.toggle(event), open: this.open }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("span", null, this.handleTitle), h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" }))) : (h(Fragment, null, h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.state && h("span", { class: "sr-only" }, stateMap[this.state]), h("span", null, this.handleTitle), hasAddons && (h("div", { class: "dso-section-handle-addons" }, this.status && h("span", { class: "dso-status" }, this.status), h(HandleIcon, { state: this.state, icon: this.icon, attachmentCount: this.attachmentCount }))))))), h("div", { class: { "dso-section-body": true, "dso-animate-ready": !!this.animeInstance }, ref: (element) => (this.sectionBody = element), "aria-hidden": this.open ? "false" : "true" }, h("div", { class: "dso-section-body-content" }, h("slot", null)))));
|
|
114
|
+
}
|
|
115
|
+
prepareAnimationResizeObserver() {
|
|
116
|
+
this.resizeObserver = new ResizeObserver(debounce(([entry]) => {
|
|
117
|
+
// entry.contentRect does not include padding, so we use getBoundingClientRect.
|
|
118
|
+
const height = entry.target.getBoundingClientRect().height;
|
|
119
|
+
if (this.bodyHeight !== height) {
|
|
120
|
+
this.bodyHeight = height;
|
|
121
|
+
this.instantiateAnimation();
|
|
122
|
+
}
|
|
123
|
+
}, 150));
|
|
124
|
+
}
|
|
125
|
+
instantiateAnimation() {
|
|
126
|
+
this.animeInstance = anime({
|
|
127
|
+
targets: this.sectionBody,
|
|
128
|
+
height: 4,
|
|
129
|
+
easing: "cubicBezier(0.4, 0, 0.2, 1)",
|
|
130
|
+
duration: 260,
|
|
131
|
+
autoplay: false,
|
|
132
|
+
direction: "normal",
|
|
133
|
+
changeComplete: async () => {
|
|
134
|
+
if (AccordionSection.scrollCandidate === this.host) {
|
|
135
|
+
AccordionSection.scrollCandidate = undefined;
|
|
136
|
+
await this.scrollSectionIntoView();
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
begin: () => {
|
|
140
|
+
if (this.sectionBody) {
|
|
141
|
+
if (this.open) {
|
|
142
|
+
this.sectionBody.style.visibility = "";
|
|
143
|
+
this.sectionBody.style.position = "";
|
|
144
|
+
this.sectionBody.style.bottom = "";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
complete: () => {
|
|
149
|
+
if (this.sectionBody) {
|
|
150
|
+
this.sectionBody.style.height = "";
|
|
151
|
+
if (!this.open) {
|
|
152
|
+
this.sectionBody.style.visibility = "hidden";
|
|
153
|
+
this.sectionBody.style.position = "absolute";
|
|
154
|
+
this.sectionBody.style.bottom = "100%";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
if (!this.open) {
|
|
160
|
+
this.animeInstance.reverse();
|
|
161
|
+
this.animeInstance.play();
|
|
162
|
+
}
|
|
163
|
+
if (this.sectionBody) {
|
|
164
|
+
this.sectionBody.style.height = "";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
activateAnimation() {
|
|
168
|
+
if (this.animeInstance) {
|
|
169
|
+
if (this.animeInstance.progress > 0 && this.animeInstance.progress < 100) {
|
|
170
|
+
this.animeInstance.reverse();
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
if (this.open) {
|
|
174
|
+
this.animeInstance.direction = "reverse";
|
|
175
|
+
this.animeInstance.play();
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.animeInstance.direction = "normal";
|
|
179
|
+
this.animeInstance.play();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
49
183
|
}
|
|
50
184
|
static get is() { return "dso-accordion-section"; }
|
|
51
185
|
static get encapsulation() { return "shadow"; }
|
|
@@ -87,7 +221,7 @@ export class AccordionSection {
|
|
|
87
221
|
"references": {
|
|
88
222
|
"AccordionHeading": {
|
|
89
223
|
"location": "import",
|
|
90
|
-
"path": "
|
|
224
|
+
"path": "./accordion-section.interfaces"
|
|
91
225
|
}
|
|
92
226
|
}
|
|
93
227
|
},
|
|
@@ -127,7 +261,7 @@ export class AccordionSection {
|
|
|
127
261
|
"references": {
|
|
128
262
|
"AccordionSectionState": {
|
|
129
263
|
"location": "import",
|
|
130
|
-
"path": "
|
|
264
|
+
"path": "./accordion-section.interfaces"
|
|
131
265
|
}
|
|
132
266
|
}
|
|
133
267
|
},
|
|
@@ -219,6 +353,31 @@ export class AccordionSection {
|
|
|
219
353
|
static get methods() {
|
|
220
354
|
return {
|
|
221
355
|
"toggleSection": {
|
|
356
|
+
"complexType": {
|
|
357
|
+
"signature": "(scrollIntoView?: boolean) => Promise<void>",
|
|
358
|
+
"parameters": [{
|
|
359
|
+
"tags": [{
|
|
360
|
+
"name": "param",
|
|
361
|
+
"text": "scrollIntoView boolean - defaults to true"
|
|
362
|
+
}],
|
|
363
|
+
"text": "boolean - defaults to true"
|
|
364
|
+
}],
|
|
365
|
+
"references": {
|
|
366
|
+
"Promise": {
|
|
367
|
+
"location": "global"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"return": "Promise<void>"
|
|
371
|
+
},
|
|
372
|
+
"docs": {
|
|
373
|
+
"text": "Toggle this section.",
|
|
374
|
+
"tags": [{
|
|
375
|
+
"name": "param",
|
|
376
|
+
"text": "scrollIntoView boolean - defaults to true"
|
|
377
|
+
}]
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"scrollSectionIntoView": {
|
|
222
381
|
"complexType": {
|
|
223
382
|
"signature": "() => Promise<void>",
|
|
224
383
|
"parameters": [],
|
|
@@ -230,64 +389,20 @@ export class AccordionSection {
|
|
|
230
389
|
"return": "Promise<void>"
|
|
231
390
|
},
|
|
232
391
|
"docs": {
|
|
233
|
-
"text": "
|
|
392
|
+
"text": "Scroll this section into view when needed.",
|
|
234
393
|
"tags": []
|
|
235
394
|
}
|
|
236
395
|
}
|
|
237
396
|
};
|
|
238
397
|
}
|
|
239
398
|
static get elementRef() { return "host"; }
|
|
399
|
+
static get watchers() {
|
|
400
|
+
return [{
|
|
401
|
+
"propName": "open",
|
|
402
|
+
"methodName": "toggleOpen"
|
|
403
|
+
}];
|
|
404
|
+
}
|
|
240
405
|
}
|
|
241
406
|
function isAccordion(element) {
|
|
242
407
|
return element instanceof HTMLElement && "getState" in element;
|
|
243
408
|
}
|
|
244
|
-
const Handle = ({ heading }, children) => {
|
|
245
|
-
switch (heading) {
|
|
246
|
-
default:
|
|
247
|
-
case "h2":
|
|
248
|
-
return h("h2", { class: "dso-section-handle" }, children);
|
|
249
|
-
case "h3":
|
|
250
|
-
return h("h3", { class: "dso-section-handle" }, children);
|
|
251
|
-
case "h4":
|
|
252
|
-
return h("h4", { class: "dso-section-handle" }, children);
|
|
253
|
-
case "h5":
|
|
254
|
-
return h("h5", { class: "dso-section-handle" }, children);
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
const HandleElement = ({ handleUrl, onClick, open }, children) => {
|
|
258
|
-
if (handleUrl) {
|
|
259
|
-
return (h("a", { href: handleUrl, onClick: onClick, "aria-expanded": open ? "true" : "false" }, children));
|
|
260
|
-
}
|
|
261
|
-
return (h("button", { type: "button", onClick: onClick, "aria-expanded": open ? "true" : "false" }, children));
|
|
262
|
-
};
|
|
263
|
-
const HandleIcon = ({ state, icon, attachmentCount, }) => {
|
|
264
|
-
if (state) {
|
|
265
|
-
return h(HandleStateIcon, { state: state });
|
|
266
|
-
}
|
|
267
|
-
if (attachmentCount) {
|
|
268
|
-
return h("dso-attachments-counter", { count: attachmentCount });
|
|
269
|
-
}
|
|
270
|
-
if (icon) {
|
|
271
|
-
return h("dso-icon", { icon: icon });
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
const stateMap = {
|
|
275
|
-
success: "succes:",
|
|
276
|
-
info: "info:",
|
|
277
|
-
warning: "waarschuwing:",
|
|
278
|
-
danger: "fout:",
|
|
279
|
-
};
|
|
280
|
-
const HandleStateIcon = ({ state }) => {
|
|
281
|
-
if (state === "danger") {
|
|
282
|
-
return h("dso-icon", { icon: "status-danger" });
|
|
283
|
-
}
|
|
284
|
-
if (state === "success") {
|
|
285
|
-
return h("dso-icon", { icon: "status-success" });
|
|
286
|
-
}
|
|
287
|
-
if (state === "info") {
|
|
288
|
-
return h("dso-icon", { icon: "status-info" });
|
|
289
|
-
}
|
|
290
|
-
if (state === "warning") {
|
|
291
|
-
return h("dso-icon", { icon: "status-warning" });
|
|
292
|
-
}
|
|
293
|
-
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const HandleElement = ({ handleUrl, onClick, open }, children) => {
|
|
3
|
+
if (handleUrl) {
|
|
4
|
+
return (h("a", { href: handleUrl, onClick: onClick, "aria-expanded": open ? "true" : "false" }, children));
|
|
5
|
+
}
|
|
6
|
+
return (h("button", { type: "button", onClick: onClick, "aria-expanded": open ? "true" : "false" }, children));
|
|
7
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const Handle = ({ heading, ref }, children) => {
|
|
3
|
+
switch (heading) {
|
|
4
|
+
default:
|
|
5
|
+
case "h2":
|
|
6
|
+
return (h("h2", { ref: ref, class: "dso-section-handle" }, children));
|
|
7
|
+
case "h3":
|
|
8
|
+
return (h("h3", { ref: ref, class: "dso-section-handle" }, children));
|
|
9
|
+
case "h4":
|
|
10
|
+
return (h("h4", { ref: ref, class: "dso-section-handle" }, children));
|
|
11
|
+
case "h5":
|
|
12
|
+
return (h("h5", { ref: ref, class: "dso-section-handle" }, children));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { HandleStateIcon } from "./state-icon.handle";
|
|
3
|
+
export const HandleIcon = ({ state, icon, attachmentCount }) => {
|
|
4
|
+
if (state) {
|
|
5
|
+
return h(HandleStateIcon, { state: state });
|
|
6
|
+
}
|
|
7
|
+
if (attachmentCount) {
|
|
8
|
+
return h("dso-attachments-counter", { count: attachmentCount });
|
|
9
|
+
}
|
|
10
|
+
if (icon) {
|
|
11
|
+
return h("dso-icon", { icon: icon });
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const HandleStateIcon = ({ state }) => {
|
|
3
|
+
if (state === "danger") {
|
|
4
|
+
return h("dso-icon", { icon: "status-danger" });
|
|
5
|
+
}
|
|
6
|
+
if (state === "success") {
|
|
7
|
+
return h("dso-icon", { icon: "status-success" });
|
|
8
|
+
}
|
|
9
|
+
if (state === "info") {
|
|
10
|
+
return h("dso-icon", { icon: "status-info" });
|
|
11
|
+
}
|
|
12
|
+
if (state === "warning") {
|
|
13
|
+
return h("dso-icon", { icon: "status-warning" });
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|