@dso-toolkit/core 62.12.1 → 62.13.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-advanced-select.cjs.entry.js +98 -0
- package/dist/cjs/dso-advanced-select.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/advanced-select/advanced-select.css +206 -0
- package/dist/collection/components/advanced-select/advanced-select.js +220 -0
- package/dist/collection/components/advanced-select/advanced-select.js.map +1 -0
- package/dist/collection/components/advanced-select/advanced-select.models.js +2 -0
- package/dist/collection/components/advanced-select/advanced-select.models.js.map +1 -0
- package/dist/components/dso-advanced-select.d.ts +11 -0
- package/dist/components/dso-advanced-select.js +129 -0
- package/dist/components/dso-advanced-select.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/p-e32f287e.entry.js +2 -0
- package/dist/dso-toolkit/p-e32f287e.entry.js.map +1 -0
- package/dist/esm/dso-advanced-select.entry.js +94 -0
- package/dist/esm/dso-advanced-select.entry.js.map +1 -0
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/advanced-select/advanced-select.d.ts +40 -0
- package/dist/types/components/advanced-select/advanced-select.models.d.ts +26 -0
- package/dist/types/components.d.ts +63 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["advancedSelectCss","AdvancedSelect","this","toggleOpen","open","handleOptionClick","event","option","dsoChange","emit","originalEvent","handleRedirectClick","redirect","dsoRedirect","isModifiedEvent","keyDownListener","key","preventDefault","handleTab","componentDidRender","trap","createTrap","removeTrap","createFocusTrap","host","clickOutsideDeactivates","escapeDeactivates","setReturnFocus","toggleButtonElementRef","tabbableOptions","getShadowRoot","onDeactivate","activate","_a","deactivate","direction","elements","tabbable","currentIndex","findIndex","e","shadowRoot","activeElement","nextIndex","length","focus","render","h","Fragment","toString","class","clsx","type","onClick","ref","element","_b","active","label","options","some","optionOrGroup","summaryCounter","filter","map","group","status","variant","icon","OptionElement","activeHint","callback","href"],"sources":["src/components/advanced-select/advanced-select.scss?tag=dso-advanced-select&encapsulation=shadow","src/components/advanced-select/advanced-select.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/global/mixins/set-colors.mixin\" as set-colors;\r\n@use \"~dso-toolkit/src/components/advanced-select\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.active-option {\r\n display: flex;\r\n inline-size: 100%;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0;\r\n border: 1px solid advanced-select.$border-color;\r\n border-radius: advanced-select.$border-radius;\r\n cursor: pointer;\r\n background-color: advanced-select.$bg-color;\r\n line-height: inherit;\r\n font-family: inherit;\r\n font-size: inherit;\r\n\r\n &.open {\r\n border-radius: advanced-select.$border-radius advanced-select.$border-radius 0 0;\r\n }\r\n\r\n dso-icon {\r\n color: advanced-select.$icon-color;\r\n }\r\n}\r\n\r\n.active-option-label {\r\n padding: advanced-select.$vertical-padding advanced-select.$horizontal-padding;\r\n overflow: hidden;\r\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Nodig om lange titels op de zelfde regel te houden */\r\n white-space: nowrap;\r\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Nodig om lange titels op de zelfde regel te houden */\r\n text-overflow: ellipsis;\r\n}\r\n\r\n.active-option-aside {\r\n display: flex;\r\n align-items: center;\r\n gap: advanced-select.$horizontal-padding * 0.5;\r\n padding: 0 advanced-select.$horizontal-padding * 0.5;\r\n}\r\n\r\n.badges {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n gap: advanced-select.$vertical-padding;\r\n}\r\n\r\n.groups-container {\r\n position: relative;\r\n}\r\n\r\n.groups {\r\n position: absolute;\r\n inset-block-start: -1px;\r\n inset-inline-start: 0;\r\n inline-size: 100%;\r\n max-block-size: 500px;\r\n margin: 0;\r\n padding: 0;\r\n overflow-y: auto;\r\n background-color: advanced-select.$bg-color;\r\n border: 1px solid advanced-select.$border-color;\r\n border-radius: 0 0 advanced-select.$border-radius advanced-select.$border-radius;\r\n\r\n li {\r\n &::marker {\r\n display: none;\r\n }\r\n }\r\n}\r\n\r\n.group {\r\n border-bottom: 1px solid advanced-select.$hr-color;\r\n\r\n &:last-child {\r\n border-bottom: none;\r\n }\r\n\r\n .option {\r\n padding-left: advanced-select.$horizontal-padding * 2 + advanced-select.$option-dot-size * 0.5;\r\n }\r\n\r\n .option-label::before {\r\n content: \"\";\r\n position: absolute;\r\n display: block;\r\n block-size: advanced-select.$option-dot-size;\r\n inline-size: advanced-select.$option-dot-size;\r\n inset: advanced-select.$vertical-padding auto auto -#{advanced-select.$option-dot-size * 2};\r\n border-radius: 50%;\r\n @include set-colors.apply(advanced-select.$default-variant-color, $icons: false, $links: false);\r\n }\r\n}\r\n\r\n.group-label {\r\n margin: 0;\r\n padding: advanced-select.$vertical-padding advanced-select.$horizontal-padding;\r\n color: advanced-select.$group-label-color;\r\n font-size: advanced-select.$group-label-font-size;\r\n font-weight: advanced-select.$group-label-font-weight;\r\n border-bottom: 1px solid advanced-select.$hr-color;\r\n}\r\n\r\n.group-link {\r\n display: block;\r\n padding: advanced-select.$group-link-horizontal-padding advanced-select.$group-link-vertical-padding;\r\n text-align: end;\r\n color: advanced-select.$group-link-color;\r\n text-decoration: none;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n\r\n dso-icon {\r\n color: advanced-select.$redirect-icon-color;\r\n }\r\n}\r\n\r\n.group-info .option-label::before {\r\n @include set-colors.apply(advanced-select.$info-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-primary .option-label::before {\r\n @include set-colors.apply(advanced-select.$primary-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-success .option-label::before {\r\n @include set-colors.apply(advanced-select.$success-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-warning .option-label::before {\r\n @include set-colors.apply(advanced-select.$warning-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-danger .option-label::before {\r\n @include set-colors.apply(advanced-select.$danger-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-error .option-label::before {\r\n @include set-colors.apply(advanced-select.$error-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-attention .option-label::before {\r\n @include set-colors.apply(advanced-select.$attention-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.options {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.option {\r\n display: block;\r\n inline-size: 100%;\r\n padding: advanced-select.$vertical-padding * 2 advanced-select.$horizontal-padding;\r\n cursor: pointer;\r\n line-height: inherit;\r\n font-family: inherit;\r\n font-size: inherit;\r\n border: none;\r\n text-align: left;\r\n background-color: advanced-select.$bg-color;\r\n\r\n &:hover {\r\n background-color: advanced-select.$option-hover-bg-color;\r\n\r\n .option-label {\r\n color: advanced-select.$option-hover-color;\r\n font-weight: advanced-select.$option-hover-font-weight;\r\n }\r\n }\r\n}\r\n\r\n.option.option-active .option-label {\r\n color: advanced-select.$option-active-color;\r\n font-weight: advanced-select.$option-active-font-weight;\r\n text-decoration: underline;\r\n}\r\n\r\n.option-label {\r\n position: relative;\r\n color: advanced-select.$option-color;\r\n font-size: advanced-select.$option-font-size;\r\n font-weight: advanced-select.$option-font-weight;\r\n}\r\n\r\n.option-hint {\r\n padding-left: 5px;\r\n color: advanced-select.$option-active-color;\r\n font-size: advanced-select.$option-font-size;\r\n font-weight: advanced-select.$option-active-font-weight;\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Prop,\r\n h,\r\n FunctionalComponent,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n State,\r\n Fragment,\r\n Listen,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport {\r\n AdvancedSelectGroup,\r\n AdvancedSelectGroupRedirect,\r\n AdvancedSelectOption,\r\n AdvancedSelectChangeEvent,\r\n AdvancedSelectOptionOrGroup,\r\n AdvancedSelectRedirectEvent,\r\n} from \"./advanced-select.models\";\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport { tabbable } from \"tabbable\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\n@Component({\r\n tag: \"dso-advanced-select\",\r\n styleUrl: \"advanced-select.scss\",\r\n shadow: true,\r\n})\r\nexport class AdvancedSelect implements ComponentInterface {\r\n private trap?: FocusTrap;\r\n\r\n @Element()\r\n host!: HTMLDsoAdvancedSelectElement;\r\n\r\n /**\r\n * The options to display in the select.\r\n */\r\n @Prop()\r\n options: AdvancedSelectOptionOrGroup<never>[] = [];\r\n\r\n /**\r\n * The active option. By object reference.\r\n */\r\n @Prop()\r\n active?: AdvancedSelectOption<never>;\r\n\r\n /**\r\n * An extra text for the active option. Only visible in the list of options.\r\n */\r\n @Prop()\r\n activeHint?: string;\r\n\r\n /**\r\n * The open state of the options list.\r\n */\r\n @State()\r\n open: boolean = false;\r\n\r\n /**\r\n * Emitted when user selects an option\r\n */\r\n @Event({ bubbles: false })\r\n dsoChange!: EventEmitter<AdvancedSelectChangeEvent<never>>;\r\n\r\n /**\r\n * Emitted when user activates a group redirect link.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRedirect!: EventEmitter<AdvancedSelectRedirectEvent>;\r\n\r\n private toggleButtonElementRef: HTMLButtonElement | undefined;\r\n\r\n @Listen(\"keydown\", { target: \"window\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (this.open && event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n this.handleTab(-1);\r\n } else if (this.open && event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n this.handleTab(1);\r\n }\r\n }\r\n\r\n componentDidRender() {\r\n if (this.open && !this.trap) {\r\n this.createTrap();\r\n } else if (!this.open && this.trap) {\r\n this.removeTrap();\r\n }\r\n }\r\n\r\n private toggleOpen = () => {\r\n this.open = !this.open;\r\n };\r\n\r\n private createTrap() {\r\n this.trap = createFocusTrap(this.host, {\r\n clickOutsideDeactivates: true,\r\n escapeDeactivates: true,\r\n setReturnFocus: this.toggleButtonElementRef,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n onDeactivate: () => {\r\n this.open = false;\r\n },\r\n }).activate();\r\n }\r\n\r\n private removeTrap() {\r\n this.trap?.deactivate();\r\n delete this.trap;\r\n }\r\n\r\n private handleTab(direction: number) {\r\n const elements = tabbable(this.host, { getShadowRoot: true });\r\n const currentIndex = elements.findIndex((e) => e === this.host.shadowRoot?.activeElement);\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= elements.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = elements.length - 1;\r\n }\r\n\r\n elements[nextIndex]?.focus();\r\n }\r\n\r\n private handleOptionClick = (event: MouseEvent, option: AdvancedSelectOption<never>) => {\r\n this.dsoChange.emit({ originalEvent: event, option });\r\n this.open = false;\r\n };\r\n\r\n private handleRedirectClick = (event: MouseEvent, redirect: AdvancedSelectGroupRedirect) => {\r\n this.dsoRedirect.emit({ originalEvent: event, isModifiedEvent: isModifiedEvent(event), redirect });\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n aria-expanded={this.open.toString()}\r\n class={clsx([\"active-option\", { open: this.open }])}\r\n type=\"button\"\r\n onClick={this.toggleOpen}\r\n ref={(element) => (this.toggleButtonElementRef = element)}\r\n >\r\n <span class=\"active-option-label\">{this.active?.label ?? \"Selecteer een optie\"}</span>\r\n <span class=\"active-option-aside\">\r\n {this.options.some(\r\n (optionOrGroup) => \"summaryCounter\" in optionOrGroup && optionOrGroup?.summaryCounter,\r\n ) && (\r\n <span class=\"badges\">\r\n {this.options\r\n .filter(\r\n (option): option is AdvancedSelectGroup<never> =>\r\n \"options\" in option && \"summaryCounter\" in option && !!option?.summaryCounter,\r\n )\r\n .map((group) => {\r\n return <dso-badge status={group.variant ?? \"outline\"}>{group.options.length}</dso-badge>;\r\n })}\r\n </span>\r\n )}\r\n <dso-icon icon=\"caret-down\"></dso-icon>\r\n </span>\r\n </button>\r\n {this.open && (\r\n <div class=\"groups-container\">\r\n <ul class=\"groups\">\r\n {this.options.map((optionOrGroup) =>\r\n \"options\" in optionOrGroup ? (\r\n <li class={clsx([\"group\", { [`group-${optionOrGroup.variant}`]: !!optionOrGroup.variant }])}>\r\n {optionOrGroup.label && <p class=\"group-label\">{optionOrGroup.label}</p>}\r\n <ul class=\"options\">\r\n {optionOrGroup.options.map((option) => (\r\n <OptionElement\r\n option={option}\r\n active={this.active}\r\n activeHint={this.activeHint}\r\n callback={this.handleOptionClick}\r\n />\r\n ))}\r\n </ul>\r\n {optionOrGroup.redirect && (\r\n <a\r\n class=\"group-link\"\r\n href={optionOrGroup.redirect.href}\r\n onClick={(e) => optionOrGroup.redirect && this.handleRedirectClick(e, optionOrGroup.redirect)}\r\n >\r\n {optionOrGroup.redirect.label}\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n )}\r\n </li>\r\n ) : (\r\n <OptionElement\r\n option={optionOrGroup}\r\n active={this.active}\r\n activeHint={this.activeHint}\r\n callback={this.handleOptionClick}\r\n />\r\n ),\r\n )}\r\n </ul>\r\n </div>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n\r\nconst OptionElement: FunctionalComponent<{\r\n option: AdvancedSelectOption<never>;\r\n active: AdvancedSelectOption<never> | undefined;\r\n activeHint: string | undefined;\r\n callback: (event: MouseEvent, value: AdvancedSelectOption<never>) => void;\r\n}> = ({ option, active, activeHint, callback }) => (\r\n <li>\r\n <button\r\n class={clsx([\"option\", { \"option-active\": active === option }])}\r\n type=\"button\"\r\n onClick={(e) => callback(e, option)}\r\n >\r\n <span class=\"option-label\">{option.label}</span>\r\n {!!activeHint && active === option && <span class=\"option-hint\">({activeHint})</span>}\r\n </button>\r\n </li>\r\n);\r\n"],"mappings":"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"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement } from './index-528d5213.js';
|
|
2
|
+
import { c as clsx } from './clsx-93f1b68e.js';
|
|
3
|
+
import { c as createFocusTrap, t as tabbable } from './focus-trap.esm-22fb5633.js';
|
|
4
|
+
import { i as isModifiedEvent } from './is-modified-event-4fc531e3.js';
|
|
5
|
+
|
|
6
|
+
const advancedSelectCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.active-option{display:flex;inline-size:100%;justify-content:space-between;align-items:center;padding:0;border:1px solid #275937;border-radius:4px;cursor:pointer;background-color:#fff;line-height:inherit;font-family:inherit;font-size:inherit}.active-option.open{border-radius:4px 4px 0 0}.active-option dso-icon{color:#275937}.active-option-label{padding:4px 16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.active-option-aside{display:flex;align-items:center;gap:8px;padding:0 8px}.badges{display:flex;justify-content:space-between;align-items:center;gap:4px}.groups-container{position:relative}.groups{position:absolute;inset-block-start:-1px;inset-inline-start:0;inline-size:100%;max-block-size:500px;margin:0;padding:0;overflow-y:auto;background-color:#fff;border:1px solid #275937;border-radius:0 0 4px 4px}.groups li::marker{display:none}.group{border-bottom:1px solid #ccc}.group:last-child{border-bottom:none}.group .option{padding-left:37px}.group .option-label::before{content:\"\";position:absolute;display:block;block-size:10px;inline-size:10px;inset:4px auto auto -20px;border-radius:50%;background-color:#ccc;border-color:#ccc;color:#191919}.group-label{margin:0;padding:4px 16px;color:#666;font-size:14px;font-weight:500;border-bottom:1px solid #ccc}.group-link{display:block;padding:8px 4px;text-align:end;color:#000;text-decoration:none}.group-link:hover{text-decoration:underline}.group-link dso-icon{color:#39870c}.group-info .option-label::before{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.group-primary .option-label::before{background-color:#275937;border-color:#275937;color:#fff}.group-success .option-label::before{background-color:#39870c;border-color:#39870c;color:#fff}.group-warning .option-label::before{background-color:#dcd400;border-color:#dcd400;color:#191919}.group-danger .option-label::before{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.group-error .option-label::before{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.group-attention .option-label::before{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}.options{margin:0;padding:0}.option{display:block;inline-size:100%;padding:8px 16px;cursor:pointer;line-height:inherit;font-family:inherit;font-size:inherit;border:none;text-align:left;background-color:#fff}.option:hover{background-color:#ebf3e6}.option:hover .option-label{color:#39870c;font-weight:bold}.option.option-active .option-label{color:#39870c;font-weight:bold;text-decoration:underline}.option-label{position:relative;color:#000;font-size:Asap, sans-serif;font-weight:400}.option-hint{padding-left:5px;color:#39870c;font-size:Asap, sans-serif;font-weight:bold}";
|
|
7
|
+
|
|
8
|
+
const AdvancedSelect = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.dsoChange = createEvent(this, "dsoChange", 3);
|
|
12
|
+
this.dsoRedirect = createEvent(this, "dsoRedirect", 3);
|
|
13
|
+
this.toggleOpen = () => {
|
|
14
|
+
this.open = !this.open;
|
|
15
|
+
};
|
|
16
|
+
this.handleOptionClick = (event, option) => {
|
|
17
|
+
this.dsoChange.emit({ originalEvent: event, option });
|
|
18
|
+
this.open = false;
|
|
19
|
+
};
|
|
20
|
+
this.handleRedirectClick = (event, redirect) => {
|
|
21
|
+
this.dsoRedirect.emit({ originalEvent: event, isModifiedEvent: isModifiedEvent(event), redirect });
|
|
22
|
+
this.open = false;
|
|
23
|
+
};
|
|
24
|
+
this.options = [];
|
|
25
|
+
this.active = undefined;
|
|
26
|
+
this.activeHint = undefined;
|
|
27
|
+
this.open = false;
|
|
28
|
+
}
|
|
29
|
+
keyDownListener(event) {
|
|
30
|
+
if (this.open && event.key === "ArrowUp") {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
this.handleTab(-1);
|
|
33
|
+
}
|
|
34
|
+
else if (this.open && event.key === "ArrowDown") {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
this.handleTab(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
componentDidRender() {
|
|
40
|
+
if (this.open && !this.trap) {
|
|
41
|
+
this.createTrap();
|
|
42
|
+
}
|
|
43
|
+
else if (!this.open && this.trap) {
|
|
44
|
+
this.removeTrap();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
createTrap() {
|
|
48
|
+
this.trap = createFocusTrap(this.host, {
|
|
49
|
+
clickOutsideDeactivates: true,
|
|
50
|
+
escapeDeactivates: true,
|
|
51
|
+
setReturnFocus: this.toggleButtonElementRef,
|
|
52
|
+
tabbableOptions: {
|
|
53
|
+
getShadowRoot: true,
|
|
54
|
+
},
|
|
55
|
+
onDeactivate: () => {
|
|
56
|
+
this.open = false;
|
|
57
|
+
},
|
|
58
|
+
}).activate();
|
|
59
|
+
}
|
|
60
|
+
removeTrap() {
|
|
61
|
+
var _a;
|
|
62
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
63
|
+
delete this.trap;
|
|
64
|
+
}
|
|
65
|
+
handleTab(direction) {
|
|
66
|
+
var _a;
|
|
67
|
+
const elements = tabbable(this.host, { getShadowRoot: true });
|
|
68
|
+
const currentIndex = elements.findIndex((e) => { var _a; return e === ((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement); });
|
|
69
|
+
let nextIndex = currentIndex + direction;
|
|
70
|
+
if (nextIndex >= elements.length) {
|
|
71
|
+
nextIndex = 0;
|
|
72
|
+
}
|
|
73
|
+
else if (nextIndex < 0) {
|
|
74
|
+
nextIndex = elements.length - 1;
|
|
75
|
+
}
|
|
76
|
+
(_a = elements[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
return (h(Fragment, null, h("button", { "aria-expanded": this.open.toString(), class: clsx(["active-option", { open: this.open }]), type: "button", onClick: this.toggleOpen, ref: (element) => (this.toggleButtonElementRef = element) }, h("span", { class: "active-option-label" }, (_b = (_a = this.active) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : "Selecteer een optie"), h("span", { class: "active-option-aside" }, this.options.some((optionOrGroup) => "summaryCounter" in optionOrGroup && (optionOrGroup === null || optionOrGroup === void 0 ? void 0 : optionOrGroup.summaryCounter)) && (h("span", { class: "badges" }, this.options
|
|
81
|
+
.filter((option) => "options" in option && "summaryCounter" in option && !!(option === null || option === void 0 ? void 0 : option.summaryCounter))
|
|
82
|
+
.map((group) => {
|
|
83
|
+
var _a;
|
|
84
|
+
return h("dso-badge", { status: (_a = group.variant) !== null && _a !== void 0 ? _a : "outline" }, group.options.length);
|
|
85
|
+
}))), h("dso-icon", { icon: "caret-down" }))), this.open && (h("div", { class: "groups-container" }, h("ul", { class: "groups" }, this.options.map((optionOrGroup) => "options" in optionOrGroup ? (h("li", { class: clsx(["group", { [`group-${optionOrGroup.variant}`]: !!optionOrGroup.variant }]) }, optionOrGroup.label && h("p", { class: "group-label" }, optionOrGroup.label), h("ul", { class: "options" }, optionOrGroup.options.map((option) => (h(OptionElement, { option: option, active: this.active, activeHint: this.activeHint, callback: this.handleOptionClick })))), optionOrGroup.redirect && (h("a", { class: "group-link", href: optionOrGroup.redirect.href, onClick: (e) => optionOrGroup.redirect && this.handleRedirectClick(e, optionOrGroup.redirect) }, optionOrGroup.redirect.label, h("dso-icon", { icon: "chevron-right" }))))) : (h(OptionElement, { option: optionOrGroup, active: this.active, activeHint: this.activeHint, callback: this.handleOptionClick }))))))));
|
|
86
|
+
}
|
|
87
|
+
get host() { return getElement(this); }
|
|
88
|
+
};
|
|
89
|
+
const OptionElement = ({ option, active, activeHint, callback }) => (h("li", null, h("button", { class: clsx(["option", { "option-active": active === option }]), type: "button", onClick: (e) => callback(e, option) }, h("span", { class: "option-label" }, option.label), !!activeHint && active === option && h("span", { class: "option-hint" }, "(", activeHint, ")"))));
|
|
90
|
+
AdvancedSelect.style = advancedSelectCss;
|
|
91
|
+
|
|
92
|
+
export { AdvancedSelect as dso_advanced_select };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=dso-advanced-select.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"dso-advanced-select.entry.js","mappings":";;;;;AAAA,MAAM,iBAAiB,GAAG,yrFAAyrF;;MC+BtsF,cAAc;;;;;IA+DjB,eAAU,GAAG;MACnB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;KACxB,CAAC;IAmCM,sBAAiB,GAAG,CAAC,KAAiB,EAAE,MAAmC;MACjF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;MACtD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACnB,CAAC;IAEM,wBAAmB,GAAG,CAAC,KAAiB,EAAE,QAAqC;MACrF,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;MACnG,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACnB,CAAC;mBAlG8C,EAAE;;;gBAkBlC,KAAK;;EAiBrB,eAAe,CAAC,KAAoB;IAClC,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE;MACxC,KAAK,CAAC,cAAc,EAAE,CAAC;MACvB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;KACpB;SAAM,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE;MACjD,KAAK,CAAC,cAAc,EAAE,CAAC;MACvB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KACnB;GACF;EAED,kBAAkB;IAChB,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MAC3B,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB;SAAM,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;MAClC,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB;GACF;EAMO,UAAU;IAChB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;MACrC,uBAAuB,EAAE,IAAI;MAC7B,iBAAiB,EAAE,IAAI;MACvB,cAAc,EAAE,IAAI,CAAC,sBAAsB;MAC3C,eAAe,EAAE;QACf,aAAa,EAAE,IAAI;OACpB;MACD,YAAY,EAAE;QACZ,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;OACnB;KACF,CAAC,CAAC,QAAQ,EAAE,CAAC;GACf;EAEO,UAAU;;IAChB,MAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,EAAE,CAAC;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC;GAClB;EAEO,SAAS,CAAC,SAAiB;;IACjC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,eAAK,OAAA,CAAC,MAAK,MAAA,IAAI,CAAC,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAA,CAAA,EAAA,CAAC,CAAC;IAE1F,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACzC,IAAI,SAAS,IAAI,QAAQ,CAAC,MAAM,EAAE;MAChC,SAAS,GAAG,CAAC,CAAC;KACf;SAAM,IAAI,SAAS,GAAG,CAAC,EAAE;MACxB,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;KACjC;IAED,MAAA,QAAQ,CAAC,SAAS,CAAC,0CAAE,KAAK,EAAE,CAAC;GAC9B;EAYD,MAAM;;IACJ,QACE,kBACE,+BACiB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EACnC,KAAK,EAAE,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EACnD,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,IAEzD,YAAM,KAAK,EAAC,qBAAqB,IAAE,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,mCAAI,qBAAqB,CAAQ,EACtF,YAAM,KAAK,EAAC,qBAAqB,IAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAChB,CAAC,aAAa,KAAK,gBAAgB,IAAI,aAAa,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,cAAc,CAAA,CACtF,KACC,YAAM,KAAK,EAAC,QAAQ,IACjB,IAAI,CAAC,OAAO;OACV,MAAM,CACL,CAAC,MAAM,KACL,SAAS,IAAI,MAAM,IAAI,gBAAgB,IAAI,MAAM,IAAI,CAAC,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,cAAc,CAAA,CAChF;OACA,GAAG,CAAC,CAAC,KAAK;;MACT,OAAO,iBAAW,MAAM,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,SAAS,IAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAa,CAAC;KAC1F,CAAC,CACC,CACR,EACD,gBAAU,IAAI,EAAC,YAAY,GAAY,CAClC,CACA,EACR,IAAI,CAAC,IAAI,KACR,WAAK,KAAK,EAAC,kBAAkB,IAC3B,UAAI,KAAK,EAAC,QAAQ,IACf,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,aAAa,KAC9B,SAAS,IAAI,aAAa,IACxB,UAAI,KAAK,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,SAAS,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,IACxF,aAAa,CAAC,KAAK,IAAI,SAAG,KAAK,EAAC,aAAa,IAAE,aAAa,CAAC,KAAK,CAAK,EACxE,UAAI,KAAK,EAAC,SAAS,IAChB,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MAChC,EAAC,aAAa,IACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,iBAAiB,GAChC,CACH,CAAC,CACC,EACJ,aAAa,CAAC,QAAQ,KACrB,SACE,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,IAAI,EACjC,OAAO,EAAE,CAAC,CAAC,KAAK,aAAa,CAAC,QAAQ,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,IAE5F,aAAa,CAAC,QAAQ,CAAC,KAAK,EAC7B,gBAAU,IAAI,EAAC,eAAe,GAAY,CACxC,CACL,CACE,KAEL,EAAC,aAAa,IACZ,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,iBAAiB,GAChC,CACH,CACF,CACE,CACD,CACP,CACA,EACH;GACH;;;AAGH,MAAM,aAAa,GAKd,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAC5C,cACE,cACE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,eAAe,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC,CAAC,EAC/D,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,IAEnC,YAAM,KAAK,EAAC,cAAc,IAAE,MAAM,CAAC,KAAK,CAAQ,EAC/C,CAAC,CAAC,UAAU,IAAI,MAAM,KAAK,MAAM,IAAI,YAAM,KAAK,EAAC,aAAa,SAAG,UAAU,MAAS,CAC9E,CACN,CACN,CAAC;;;;;","names":[],"sources":["src/components/advanced-select/advanced-select.scss?tag=dso-advanced-select&encapsulation=shadow","src/components/advanced-select/advanced-select.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/global/mixins/set-colors.mixin\" as set-colors;\r\n@use \"~dso-toolkit/src/components/advanced-select\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.active-option {\r\n display: flex;\r\n inline-size: 100%;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0;\r\n border: 1px solid advanced-select.$border-color;\r\n border-radius: advanced-select.$border-radius;\r\n cursor: pointer;\r\n background-color: advanced-select.$bg-color;\r\n line-height: inherit;\r\n font-family: inherit;\r\n font-size: inherit;\r\n\r\n &.open {\r\n border-radius: advanced-select.$border-radius advanced-select.$border-radius 0 0;\r\n }\r\n\r\n dso-icon {\r\n color: advanced-select.$icon-color;\r\n }\r\n}\r\n\r\n.active-option-label {\r\n padding: advanced-select.$vertical-padding advanced-select.$horizontal-padding;\r\n overflow: hidden;\r\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Nodig om lange titels op de zelfde regel te houden */\r\n white-space: nowrap;\r\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Nodig om lange titels op de zelfde regel te houden */\r\n text-overflow: ellipsis;\r\n}\r\n\r\n.active-option-aside {\r\n display: flex;\r\n align-items: center;\r\n gap: advanced-select.$horizontal-padding * 0.5;\r\n padding: 0 advanced-select.$horizontal-padding * 0.5;\r\n}\r\n\r\n.badges {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n gap: advanced-select.$vertical-padding;\r\n}\r\n\r\n.groups-container {\r\n position: relative;\r\n}\r\n\r\n.groups {\r\n position: absolute;\r\n inset-block-start: -1px;\r\n inset-inline-start: 0;\r\n inline-size: 100%;\r\n max-block-size: 500px;\r\n margin: 0;\r\n padding: 0;\r\n overflow-y: auto;\r\n background-color: advanced-select.$bg-color;\r\n border: 1px solid advanced-select.$border-color;\r\n border-radius: 0 0 advanced-select.$border-radius advanced-select.$border-radius;\r\n\r\n li {\r\n &::marker {\r\n display: none;\r\n }\r\n }\r\n}\r\n\r\n.group {\r\n border-bottom: 1px solid advanced-select.$hr-color;\r\n\r\n &:last-child {\r\n border-bottom: none;\r\n }\r\n\r\n .option {\r\n padding-left: advanced-select.$horizontal-padding * 2 + advanced-select.$option-dot-size * 0.5;\r\n }\r\n\r\n .option-label::before {\r\n content: \"\";\r\n position: absolute;\r\n display: block;\r\n block-size: advanced-select.$option-dot-size;\r\n inline-size: advanced-select.$option-dot-size;\r\n inset: advanced-select.$vertical-padding auto auto -#{advanced-select.$option-dot-size * 2};\r\n border-radius: 50%;\r\n @include set-colors.apply(advanced-select.$default-variant-color, $icons: false, $links: false);\r\n }\r\n}\r\n\r\n.group-label {\r\n margin: 0;\r\n padding: advanced-select.$vertical-padding advanced-select.$horizontal-padding;\r\n color: advanced-select.$group-label-color;\r\n font-size: advanced-select.$group-label-font-size;\r\n font-weight: advanced-select.$group-label-font-weight;\r\n border-bottom: 1px solid advanced-select.$hr-color;\r\n}\r\n\r\n.group-link {\r\n display: block;\r\n padding: advanced-select.$group-link-horizontal-padding advanced-select.$group-link-vertical-padding;\r\n text-align: end;\r\n color: advanced-select.$group-link-color;\r\n text-decoration: none;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n\r\n dso-icon {\r\n color: advanced-select.$redirect-icon-color;\r\n }\r\n}\r\n\r\n.group-info .option-label::before {\r\n @include set-colors.apply(advanced-select.$info-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-primary .option-label::before {\r\n @include set-colors.apply(advanced-select.$primary-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-success .option-label::before {\r\n @include set-colors.apply(advanced-select.$success-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-warning .option-label::before {\r\n @include set-colors.apply(advanced-select.$warning-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-danger .option-label::before {\r\n @include set-colors.apply(advanced-select.$danger-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-error .option-label::before {\r\n @include set-colors.apply(advanced-select.$error-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.group-attention .option-label::before {\r\n @include set-colors.apply(advanced-select.$attention-variant-color, $icons: false, $links: false);\r\n}\r\n\r\n.options {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.option {\r\n display: block;\r\n inline-size: 100%;\r\n padding: advanced-select.$vertical-padding * 2 advanced-select.$horizontal-padding;\r\n cursor: pointer;\r\n line-height: inherit;\r\n font-family: inherit;\r\n font-size: inherit;\r\n border: none;\r\n text-align: left;\r\n background-color: advanced-select.$bg-color;\r\n\r\n &:hover {\r\n background-color: advanced-select.$option-hover-bg-color;\r\n\r\n .option-label {\r\n color: advanced-select.$option-hover-color;\r\n font-weight: advanced-select.$option-hover-font-weight;\r\n }\r\n }\r\n}\r\n\r\n.option.option-active .option-label {\r\n color: advanced-select.$option-active-color;\r\n font-weight: advanced-select.$option-active-font-weight;\r\n text-decoration: underline;\r\n}\r\n\r\n.option-label {\r\n position: relative;\r\n color: advanced-select.$option-color;\r\n font-size: advanced-select.$option-font-size;\r\n font-weight: advanced-select.$option-font-weight;\r\n}\r\n\r\n.option-hint {\r\n padding-left: 5px;\r\n color: advanced-select.$option-active-color;\r\n font-size: advanced-select.$option-font-size;\r\n font-weight: advanced-select.$option-active-font-weight;\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Prop,\r\n h,\r\n FunctionalComponent,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n State,\r\n Fragment,\r\n Listen,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport {\r\n AdvancedSelectGroup,\r\n AdvancedSelectGroupRedirect,\r\n AdvancedSelectOption,\r\n AdvancedSelectChangeEvent,\r\n AdvancedSelectOptionOrGroup,\r\n AdvancedSelectRedirectEvent,\r\n} from \"./advanced-select.models\";\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport { tabbable } from \"tabbable\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\n@Component({\r\n tag: \"dso-advanced-select\",\r\n styleUrl: \"advanced-select.scss\",\r\n shadow: true,\r\n})\r\nexport class AdvancedSelect implements ComponentInterface {\r\n private trap?: FocusTrap;\r\n\r\n @Element()\r\n host!: HTMLDsoAdvancedSelectElement;\r\n\r\n /**\r\n * The options to display in the select.\r\n */\r\n @Prop()\r\n options: AdvancedSelectOptionOrGroup<never>[] = [];\r\n\r\n /**\r\n * The active option. By object reference.\r\n */\r\n @Prop()\r\n active?: AdvancedSelectOption<never>;\r\n\r\n /**\r\n * An extra text for the active option. Only visible in the list of options.\r\n */\r\n @Prop()\r\n activeHint?: string;\r\n\r\n /**\r\n * The open state of the options list.\r\n */\r\n @State()\r\n open: boolean = false;\r\n\r\n /**\r\n * Emitted when user selects an option\r\n */\r\n @Event({ bubbles: false })\r\n dsoChange!: EventEmitter<AdvancedSelectChangeEvent<never>>;\r\n\r\n /**\r\n * Emitted when user activates a group redirect link.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRedirect!: EventEmitter<AdvancedSelectRedirectEvent>;\r\n\r\n private toggleButtonElementRef: HTMLButtonElement | undefined;\r\n\r\n @Listen(\"keydown\", { target: \"window\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (this.open && event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n this.handleTab(-1);\r\n } else if (this.open && event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n this.handleTab(1);\r\n }\r\n }\r\n\r\n componentDidRender() {\r\n if (this.open && !this.trap) {\r\n this.createTrap();\r\n } else if (!this.open && this.trap) {\r\n this.removeTrap();\r\n }\r\n }\r\n\r\n private toggleOpen = () => {\r\n this.open = !this.open;\r\n };\r\n\r\n private createTrap() {\r\n this.trap = createFocusTrap(this.host, {\r\n clickOutsideDeactivates: true,\r\n escapeDeactivates: true,\r\n setReturnFocus: this.toggleButtonElementRef,\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n onDeactivate: () => {\r\n this.open = false;\r\n },\r\n }).activate();\r\n }\r\n\r\n private removeTrap() {\r\n this.trap?.deactivate();\r\n delete this.trap;\r\n }\r\n\r\n private handleTab(direction: number) {\r\n const elements = tabbable(this.host, { getShadowRoot: true });\r\n const currentIndex = elements.findIndex((e) => e === this.host.shadowRoot?.activeElement);\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= elements.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = elements.length - 1;\r\n }\r\n\r\n elements[nextIndex]?.focus();\r\n }\r\n\r\n private handleOptionClick = (event: MouseEvent, option: AdvancedSelectOption<never>) => {\r\n this.dsoChange.emit({ originalEvent: event, option });\r\n this.open = false;\r\n };\r\n\r\n private handleRedirectClick = (event: MouseEvent, redirect: AdvancedSelectGroupRedirect) => {\r\n this.dsoRedirect.emit({ originalEvent: event, isModifiedEvent: isModifiedEvent(event), redirect });\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n aria-expanded={this.open.toString()}\r\n class={clsx([\"active-option\", { open: this.open }])}\r\n type=\"button\"\r\n onClick={this.toggleOpen}\r\n ref={(element) => (this.toggleButtonElementRef = element)}\r\n >\r\n <span class=\"active-option-label\">{this.active?.label ?? \"Selecteer een optie\"}</span>\r\n <span class=\"active-option-aside\">\r\n {this.options.some(\r\n (optionOrGroup) => \"summaryCounter\" in optionOrGroup && optionOrGroup?.summaryCounter,\r\n ) && (\r\n <span class=\"badges\">\r\n {this.options\r\n .filter(\r\n (option): option is AdvancedSelectGroup<never> =>\r\n \"options\" in option && \"summaryCounter\" in option && !!option?.summaryCounter,\r\n )\r\n .map((group) => {\r\n return <dso-badge status={group.variant ?? \"outline\"}>{group.options.length}</dso-badge>;\r\n })}\r\n </span>\r\n )}\r\n <dso-icon icon=\"caret-down\"></dso-icon>\r\n </span>\r\n </button>\r\n {this.open && (\r\n <div class=\"groups-container\">\r\n <ul class=\"groups\">\r\n {this.options.map((optionOrGroup) =>\r\n \"options\" in optionOrGroup ? (\r\n <li class={clsx([\"group\", { [`group-${optionOrGroup.variant}`]: !!optionOrGroup.variant }])}>\r\n {optionOrGroup.label && <p class=\"group-label\">{optionOrGroup.label}</p>}\r\n <ul class=\"options\">\r\n {optionOrGroup.options.map((option) => (\r\n <OptionElement\r\n option={option}\r\n active={this.active}\r\n activeHint={this.activeHint}\r\n callback={this.handleOptionClick}\r\n />\r\n ))}\r\n </ul>\r\n {optionOrGroup.redirect && (\r\n <a\r\n class=\"group-link\"\r\n href={optionOrGroup.redirect.href}\r\n onClick={(e) => optionOrGroup.redirect && this.handleRedirectClick(e, optionOrGroup.redirect)}\r\n >\r\n {optionOrGroup.redirect.label}\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n )}\r\n </li>\r\n ) : (\r\n <OptionElement\r\n option={optionOrGroup}\r\n active={this.active}\r\n activeHint={this.activeHint}\r\n callback={this.handleOptionClick}\r\n />\r\n ),\r\n )}\r\n </ul>\r\n </div>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n\r\nconst OptionElement: FunctionalComponent<{\r\n option: AdvancedSelectOption<never>;\r\n active: AdvancedSelectOption<never> | undefined;\r\n activeHint: string | undefined;\r\n callback: (event: MouseEvent, value: AdvancedSelectOption<never>) => void;\r\n}> = ({ option, active, activeHint, callback }) => (\r\n <li>\r\n <button\r\n class={clsx([\"option\", { \"option-active\": active === option }])}\r\n type=\"button\"\r\n onClick={(e) => callback(e, option)}\r\n >\r\n <span class=\"option-label\">{option.label}</span>\r\n {!!activeHint && active === option && <span class=\"option-hint\">({activeHint})</span>}\r\n </button>\r\n </li>\r\n);\r\n"],"version":3}
|
package/dist/esm/dso-toolkit.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["dsot-document-component-demo",[[2,"dsot-document-component-demo",{"showCanvas":[516,"show-canvas"],"jsonFile":[1,"json-file"],"openDefault":[4,"open-default"],"response":[32],"document":[32],"openOrClosed":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]},null,{"jsonFile":["jsonFileWatcher"],"openDefault":["openDefaultWatcher"]}]]],["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-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"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"],"hover":[32],"focusHandle":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"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"],"role":[1],"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-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-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"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]],{"suggestions":["suggestionsWatcher"]}]]],["dso-card",[[1,"dso-card",{"clickable":[516],"imageShape":[513,"image-shape"],"href":[513],"mode":[513]}]]],["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-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]],{"url":["watchUrl"],"isOpen":["watchIsOpen"]}]]],["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"],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]},null,{"manual":["watchManualCallback"]}]]],["dso-mark-bar",[[1,"dso-mark-bar",{"value":[1],"label":[1],"current":[2],"totalCount":[2,"total-count"],"dsoFocus":[64]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]},null,{"variant":["updateVariant"],"reverseAlign":["updateReverseAlign"]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["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-logo",[[1,"dso-logo",{"label":[513],"ribbon":[1]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"mode":[513],"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-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["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]},null,{"placement":["watchPosition"],"dropdownAlign":["watchPosition"],"dropdownOptionsOffset":["watchOptionsOffset"],"strategy":["watchStrategy"]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[516,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32],"isOpen":[32]},null,{"open":["toggleOpen"],"enableAnimation":["toggleEnableAnimation"]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["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_7",[[1,"dso-ozon-content",{"content":[1],"inline":[516],"mark":[16],"state":[32]},null,{"content":["contentWatcher"]}],[1,"dso-label",{"compact":[4],"removable":[4],"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"]}],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-
|
|
17
|
+
return bootstrapLazy([["dsot-document-component-demo",[[2,"dsot-document-component-demo",{"showCanvas":[516,"show-canvas"],"jsonFile":[1,"json-file"],"openDefault":[4,"open-default"],"response":[32],"document":[32],"openOrClosed":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]},null,{"jsonFile":["jsonFileWatcher"],"openDefault":["openDefaultWatcher"]}]]],["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-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"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"],"hover":[32],"focusHandle":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-advanced-select",[[1,"dso-advanced-select",{"options":[16],"active":[16],"activeHint":[1,"active-hint"],"open":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-header",[[6,"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"],"role":[1],"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-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-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"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]],{"suggestions":["suggestionsWatcher"]}]]],["dso-card",[[1,"dso-card",{"clickable":[516],"imageShape":[513,"image-shape"],"href":[513],"mode":[513]}]]],["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-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]],{"url":["watchUrl"],"isOpen":["watchIsOpen"]}]]],["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"],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]},null,{"manual":["watchManualCallback"]}]]],["dso-mark-bar",[[1,"dso-mark-bar",{"value":[1],"label":[1],"current":[2],"totalCount":[2,"total-count"],"dsoFocus":[64]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]},null,{"variant":["updateVariant"],"reverseAlign":["updateReverseAlign"]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["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-logo",[[1,"dso-logo",{"label":[513],"ribbon":[1]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"mode":[513],"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-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["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]},null,{"placement":["watchPosition"],"dropdownAlign":["watchPosition"],"dropdownOptionsOffset":["watchOptionsOffset"],"strategy":["watchStrategy"]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[516,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32],"isOpen":[32]},null,{"open":["toggleOpen"],"enableAnimation":["toggleEnableAnimation"]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["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_7",[[1,"dso-ozon-content",{"content":[1],"inline":[516],"mark":[16],"state":[32]},null,{"content":["contentWatcher"]}],[1,"dso-label",{"compact":[4],"removable":[4],"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"]}],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]],[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}],[1,"dso-badge",{"status":[1]}]]],["dso-annotation-output_3",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[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":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513],"mark":[16],"recursiveToggle":[8,"recursive-toggle"]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=dso-toolkit.js.map
|
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-528d5213.js';
|
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["dsot-document-component-demo",[[2,"dsot-document-component-demo",{"showCanvas":[516,"show-canvas"],"jsonFile":[1,"json-file"],"openDefault":[4,"open-default"],"response":[32],"document":[32],"openOrClosed":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]},null,{"jsonFile":["jsonFileWatcher"],"openDefault":["openDefaultWatcher"]}]]],["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-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"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"],"hover":[32],"focusHandle":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-header",[[6,"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"],"role":[1],"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-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-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"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]],{"suggestions":["suggestionsWatcher"]}]]],["dso-card",[[1,"dso-card",{"clickable":[516],"imageShape":[513,"image-shape"],"href":[513],"mode":[513]}]]],["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-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]],{"url":["watchUrl"],"isOpen":["watchIsOpen"]}]]],["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"],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]},null,{"manual":["watchManualCallback"]}]]],["dso-mark-bar",[[1,"dso-mark-bar",{"value":[1],"label":[1],"current":[2],"totalCount":[2,"total-count"],"dsoFocus":[64]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]},null,{"variant":["updateVariant"],"reverseAlign":["updateReverseAlign"]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["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-logo",[[1,"dso-logo",{"label":[513],"ribbon":[1]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"mode":[513],"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-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["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]},null,{"placement":["watchPosition"],"dropdownAlign":["watchPosition"],"dropdownOptionsOffset":["watchOptionsOffset"],"strategy":["watchStrategy"]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[516,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32],"isOpen":[32]},null,{"open":["toggleOpen"],"enableAnimation":["toggleEnableAnimation"]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["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_7",[[1,"dso-ozon-content",{"content":[1],"inline":[516],"mark":[16],"state":[32]},null,{"content":["contentWatcher"]}],[1,"dso-label",{"compact":[4],"removable":[4],"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"]}],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-
|
|
6
|
+
return bootstrapLazy([["dsot-document-component-demo",[[2,"dsot-document-component-demo",{"showCanvas":[516,"show-canvas"],"jsonFile":[1,"json-file"],"openDefault":[4,"open-default"],"response":[32],"document":[32],"openOrClosed":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]},null,{"jsonFile":["jsonFileWatcher"],"openDefault":["openDefaultWatcher"]}]]],["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-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"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"],"hover":[32],"focusHandle":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-advanced-select",[[1,"dso-advanced-select",{"options":[16],"active":[16],"activeHint":[1,"active-hint"],"open":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-header",[[6,"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"],"role":[1],"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-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-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"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]],{"suggestions":["suggestionsWatcher"]}]]],["dso-card",[[1,"dso-card",{"clickable":[516],"imageShape":[513,"image-shape"],"href":[513],"mode":[513]}]]],["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-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]],{"url":["watchUrl"],"isOpen":["watchIsOpen"]}]]],["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"],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]},null,{"manual":["watchManualCallback"]}]]],["dso-mark-bar",[[1,"dso-mark-bar",{"value":[1],"label":[1],"current":[2],"totalCount":[2,"total-count"],"dsoFocus":[64]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]},null,{"variant":["updateVariant"],"reverseAlign":["updateReverseAlign"]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["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-logo",[[1,"dso-logo",{"label":[513],"ribbon":[1]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"mode":[513],"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-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["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]},null,{"placement":["watchPosition"],"dropdownAlign":["watchPosition"],"dropdownOptionsOffset":["watchOptionsOffset"],"strategy":["watchStrategy"]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[516,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32],"isOpen":[32]},null,{"open":["toggleOpen"],"enableAnimation":["toggleEnableAnimation"]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["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_7",[[1,"dso-ozon-content",{"content":[1],"inline":[516],"mark":[16],"state":[32]},null,{"content":["contentWatcher"]}],[1,"dso-label",{"compact":[4],"removable":[4],"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"]}],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]],[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}],[1,"dso-badge",{"status":[1]}]]],["dso-annotation-output_3",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[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":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513],"mark":[16],"recursiveToggle":[8,"recursive-toggle"]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { AdvancedSelectOption, AdvancedSelectChangeEvent, AdvancedSelectOptionOrGroup, AdvancedSelectRedirectEvent } from "./advanced-select.models";
|
|
3
|
+
export declare class AdvancedSelect implements ComponentInterface {
|
|
4
|
+
private trap?;
|
|
5
|
+
host: HTMLDsoAdvancedSelectElement;
|
|
6
|
+
/**
|
|
7
|
+
* The options to display in the select.
|
|
8
|
+
*/
|
|
9
|
+
options: AdvancedSelectOptionOrGroup<never>[];
|
|
10
|
+
/**
|
|
11
|
+
* The active option. By object reference.
|
|
12
|
+
*/
|
|
13
|
+
active?: AdvancedSelectOption<never>;
|
|
14
|
+
/**
|
|
15
|
+
* An extra text for the active option. Only visible in the list of options.
|
|
16
|
+
*/
|
|
17
|
+
activeHint?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The open state of the options list.
|
|
20
|
+
*/
|
|
21
|
+
open: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Emitted when user selects an option
|
|
24
|
+
*/
|
|
25
|
+
dsoChange: EventEmitter<AdvancedSelectChangeEvent<never>>;
|
|
26
|
+
/**
|
|
27
|
+
* Emitted when user activates a group redirect link.
|
|
28
|
+
*/
|
|
29
|
+
dsoRedirect: EventEmitter<AdvancedSelectRedirectEvent>;
|
|
30
|
+
private toggleButtonElementRef;
|
|
31
|
+
keyDownListener(event: KeyboardEvent): void;
|
|
32
|
+
componentDidRender(): void;
|
|
33
|
+
private toggleOpen;
|
|
34
|
+
private createTrap;
|
|
35
|
+
private removeTrap;
|
|
36
|
+
private handleTab;
|
|
37
|
+
private handleOptionClick;
|
|
38
|
+
private handleRedirectClick;
|
|
39
|
+
render(): any;
|
|
40
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type AdvancedSelectVariant = "primary" | "success" | "info" | "warning" | "danger" | "error" | "attention";
|
|
2
|
+
export interface AdvancedSelectOption<T> {
|
|
3
|
+
label: string;
|
|
4
|
+
value?: T;
|
|
5
|
+
}
|
|
6
|
+
export interface AdvancedSelectGroupRedirect {
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AdvancedSelectGroup<T> {
|
|
11
|
+
label: string;
|
|
12
|
+
summaryCounter?: boolean;
|
|
13
|
+
redirect?: AdvancedSelectGroupRedirect;
|
|
14
|
+
options: AdvancedSelectOption<T>[];
|
|
15
|
+
variant?: AdvancedSelectVariant;
|
|
16
|
+
}
|
|
17
|
+
export type AdvancedSelectOptionOrGroup<T> = AdvancedSelectOption<T> | AdvancedSelectGroup<T>;
|
|
18
|
+
export interface AdvancedSelectChangeEvent<T> {
|
|
19
|
+
originalEvent: MouseEvent;
|
|
20
|
+
option: AdvancedSelectOption<T>;
|
|
21
|
+
}
|
|
22
|
+
export interface AdvancedSelectRedirectEvent {
|
|
23
|
+
originalEvent: MouseEvent;
|
|
24
|
+
isModifiedEvent: boolean;
|
|
25
|
+
redirect: AdvancedSelectGroupRedirect;
|
|
26
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AccordionInternalState, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
9
9
|
import { AccordionHeading, AccordionSectionAnimationEndEvent, AccordionSectionAnimationStartEvent, AccordionSectionState, AccordionSectionToggleClickEvent } from "./components/accordion/components/accordion-section.interfaces";
|
|
10
|
+
import { AdvancedSelectChangeEvent, AdvancedSelectOption, AdvancedSelectOptionOrGroup, AdvancedSelectRedirectEvent } from "./components/advanced-select/advanced-select.models";
|
|
10
11
|
import { AnnotationButtonClickEvent } from "./components/annotation-button/annotation-button";
|
|
11
12
|
import { AnnotationOutputCloseEvent } from "./components/annotation-output/annotation-output";
|
|
12
13
|
import { Suggestion } from "./components/autosuggest/autosuggest.interfaces";
|
|
@@ -35,6 +36,7 @@ import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-
|
|
|
35
36
|
import { ViewerGridActiveTabSwitchEvent, ViewerGridChangeSizeAnimationEndEvent, ViewerGridChangeSizeEvent, ViewerGridCloseOverlayEvent, ViewerGridFilterpanelApplyEvent, ViewerGridFilterpanelCancelEvent, ViewerGridMainExpandEvent, ViewerGridMainToggleEvent, ViewerGridMode, ViewerGridPanelSize, ViewerGridVdkTab, ViewerGridVrkTab } from "./components/viewer-grid/viewer-grid.interfaces";
|
|
36
37
|
export { AccordionInternalState, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
37
38
|
export { AccordionHeading, AccordionSectionAnimationEndEvent, AccordionSectionAnimationStartEvent, AccordionSectionState, AccordionSectionToggleClickEvent } from "./components/accordion/components/accordion-section.interfaces";
|
|
39
|
+
export { AdvancedSelectChangeEvent, AdvancedSelectOption, AdvancedSelectOptionOrGroup, AdvancedSelectRedirectEvent } from "./components/advanced-select/advanced-select.models";
|
|
38
40
|
export { AnnotationButtonClickEvent } from "./components/annotation-button/annotation-button";
|
|
39
41
|
export { AnnotationOutputCloseEvent } from "./components/annotation-output/annotation-output";
|
|
40
42
|
export { Suggestion } from "./components/autosuggest/autosuggest.interfaces";
|
|
@@ -143,6 +145,20 @@ export namespace Components {
|
|
|
143
145
|
*/
|
|
144
146
|
"warning": boolean;
|
|
145
147
|
}
|
|
148
|
+
interface DsoAdvancedSelect {
|
|
149
|
+
/**
|
|
150
|
+
* The active option. By object reference.
|
|
151
|
+
*/
|
|
152
|
+
"active"?: AdvancedSelectOption<never>;
|
|
153
|
+
/**
|
|
154
|
+
* An extra text for the active option. Only visible in the list of options.
|
|
155
|
+
*/
|
|
156
|
+
"activeHint"?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The options to display in the select.
|
|
159
|
+
*/
|
|
160
|
+
"options": AdvancedSelectOptionOrGroup<never>[];
|
|
161
|
+
}
|
|
146
162
|
interface DsoAlert {
|
|
147
163
|
/**
|
|
148
164
|
* Whether or not to show the role attribute with value "alert". To control the tooltip add the `role-alert` attribute.
|
|
@@ -1018,6 +1034,10 @@ export interface DsoAccordionSectionCustomEvent<T> extends CustomEvent<T> {
|
|
|
1018
1034
|
detail: T;
|
|
1019
1035
|
target: HTMLDsoAccordionSectionElement;
|
|
1020
1036
|
}
|
|
1037
|
+
export interface DsoAdvancedSelectCustomEvent<T> extends CustomEvent<T> {
|
|
1038
|
+
detail: T;
|
|
1039
|
+
target: HTMLDsoAdvancedSelectElement;
|
|
1040
|
+
}
|
|
1021
1041
|
export interface DsoAnnotationButtonCustomEvent<T> extends CustomEvent<T> {
|
|
1022
1042
|
detail: T;
|
|
1023
1043
|
target: HTMLDsoAnnotationButtonElement;
|
|
@@ -1164,6 +1184,24 @@ declare global {
|
|
|
1164
1184
|
prototype: HTMLDsoActionListItemElement;
|
|
1165
1185
|
new (): HTMLDsoActionListItemElement;
|
|
1166
1186
|
};
|
|
1187
|
+
interface HTMLDsoAdvancedSelectElementEventMap {
|
|
1188
|
+
"dsoChange": AdvancedSelectChangeEvent<never>;
|
|
1189
|
+
"dsoRedirect": AdvancedSelectRedirectEvent;
|
|
1190
|
+
}
|
|
1191
|
+
interface HTMLDsoAdvancedSelectElement extends Components.DsoAdvancedSelect, HTMLStencilElement {
|
|
1192
|
+
addEventListener<K extends keyof HTMLDsoAdvancedSelectElementEventMap>(type: K, listener: (this: HTMLDsoAdvancedSelectElement, ev: DsoAdvancedSelectCustomEvent<HTMLDsoAdvancedSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1193
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1194
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1195
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1196
|
+
removeEventListener<K extends keyof HTMLDsoAdvancedSelectElementEventMap>(type: K, listener: (this: HTMLDsoAdvancedSelectElement, ev: DsoAdvancedSelectCustomEvent<HTMLDsoAdvancedSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1197
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1198
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1199
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1200
|
+
}
|
|
1201
|
+
var HTMLDsoAdvancedSelectElement: {
|
|
1202
|
+
prototype: HTMLDsoAdvancedSelectElement;
|
|
1203
|
+
new (): HTMLDsoAdvancedSelectElement;
|
|
1204
|
+
};
|
|
1167
1205
|
interface HTMLDsoAlertElement extends Components.DsoAlert, HTMLStencilElement {
|
|
1168
1206
|
}
|
|
1169
1207
|
var HTMLDsoAlertElement: {
|
|
@@ -1757,6 +1795,7 @@ declare global {
|
|
|
1757
1795
|
"dso-accordion-section": HTMLDsoAccordionSectionElement;
|
|
1758
1796
|
"dso-action-list": HTMLDsoActionListElement;
|
|
1759
1797
|
"dso-action-list-item": HTMLDsoActionListItemElement;
|
|
1798
|
+
"dso-advanced-select": HTMLDsoAdvancedSelectElement;
|
|
1760
1799
|
"dso-alert": HTMLDsoAlertElement;
|
|
1761
1800
|
"dso-annotation-button": HTMLDsoAnnotationButtonElement;
|
|
1762
1801
|
"dso-annotation-output": HTMLDsoAnnotationOutputElement;
|
|
@@ -1891,6 +1930,28 @@ declare namespace LocalJSX {
|
|
|
1891
1930
|
*/
|
|
1892
1931
|
"warning"?: boolean;
|
|
1893
1932
|
}
|
|
1933
|
+
interface DsoAdvancedSelect {
|
|
1934
|
+
/**
|
|
1935
|
+
* The active option. By object reference.
|
|
1936
|
+
*/
|
|
1937
|
+
"active"?: AdvancedSelectOption<never>;
|
|
1938
|
+
/**
|
|
1939
|
+
* An extra text for the active option. Only visible in the list of options.
|
|
1940
|
+
*/
|
|
1941
|
+
"activeHint"?: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* Emitted when user selects an option
|
|
1944
|
+
*/
|
|
1945
|
+
"onDsoChange"?: (event: DsoAdvancedSelectCustomEvent<AdvancedSelectChangeEvent<never>>) => void;
|
|
1946
|
+
/**
|
|
1947
|
+
* Emitted when user activates a group redirect link.
|
|
1948
|
+
*/
|
|
1949
|
+
"onDsoRedirect"?: (event: DsoAdvancedSelectCustomEvent<AdvancedSelectRedirectEvent>) => void;
|
|
1950
|
+
/**
|
|
1951
|
+
* The options to display in the select.
|
|
1952
|
+
*/
|
|
1953
|
+
"options"?: AdvancedSelectOptionOrGroup<never>[];
|
|
1954
|
+
}
|
|
1894
1955
|
interface DsoAlert {
|
|
1895
1956
|
/**
|
|
1896
1957
|
* Whether or not to show the role attribute with value "alert". To control the tooltip add the `role-alert` attribute.
|
|
@@ -2955,6 +3016,7 @@ declare namespace LocalJSX {
|
|
|
2955
3016
|
"dso-accordion-section": DsoAccordionSection;
|
|
2956
3017
|
"dso-action-list": DsoActionList;
|
|
2957
3018
|
"dso-action-list-item": DsoActionListItem;
|
|
3019
|
+
"dso-advanced-select": DsoAdvancedSelect;
|
|
2958
3020
|
"dso-alert": DsoAlert;
|
|
2959
3021
|
"dso-annotation-button": DsoAnnotationButton;
|
|
2960
3022
|
"dso-annotation-output": DsoAnnotationOutput;
|
|
@@ -3008,6 +3070,7 @@ declare module "@stencil/core" {
|
|
|
3008
3070
|
"dso-accordion-section": LocalJSX.DsoAccordionSection & JSXBase.HTMLAttributes<HTMLDsoAccordionSectionElement>;
|
|
3009
3071
|
"dso-action-list": LocalJSX.DsoActionList & JSXBase.HTMLAttributes<HTMLDsoActionListElement>;
|
|
3010
3072
|
"dso-action-list-item": LocalJSX.DsoActionListItem & JSXBase.HTMLAttributes<HTMLDsoActionListItemElement>;
|
|
3073
|
+
"dso-advanced-select": LocalJSX.DsoAdvancedSelect & JSXBase.HTMLAttributes<HTMLDsoAdvancedSelectElement>;
|
|
3011
3074
|
"dso-alert": LocalJSX.DsoAlert & JSXBase.HTMLAttributes<HTMLDsoAlertElement>;
|
|
3012
3075
|
"dso-annotation-button": LocalJSX.DsoAnnotationButton & JSXBase.HTMLAttributes<HTMLDsoAnnotationButtonElement>;
|
|
3013
3076
|
"dso-annotation-output": LocalJSX.DsoAnnotationOutput & JSXBase.HTMLAttributes<HTMLDsoAnnotationOutputElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dso-toolkit/core",
|
|
3
|
-
"version": "62.
|
|
3
|
+
"version": "62.13.0",
|
|
4
4
|
"description": "DSO Toolkit Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/components/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/animejs": "^3.1.12",
|
|
26
26
|
"animejs": "3.2.1",
|
|
27
27
|
"clsx": "^2.0.0",
|
|
28
|
-
"dso-toolkit": "^62.
|
|
28
|
+
"dso-toolkit": "^62.13.0",
|
|
29
29
|
"escape-string-regexp": "^5.0.0",
|
|
30
30
|
"focus-trap": "^7.5.4",
|
|
31
31
|
"popper-max-size-modifier": "^0.2.0",
|