wcs-core 7.3.0 → 7.4.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/README.md +11 -9
- package/design-tokens/dist/sncf-groupe-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-groupe.css +227 -227
- package/design-tokens/dist/sncf-holding-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-holding.css +227 -227
- package/design-tokens/dist/sncf-reseau-root-scoped.css +227 -227
- package/design-tokens/dist/sncf-reseau.css +227 -227
- package/design-tokens/dist/sncf-voyageurs-root-scoped.css +242 -242
- package/design-tokens/dist/sncf-voyageurs.css +242 -242
- package/dist/cjs/{popper-8d6e7fca.js → popper-1b61df21.js} +10 -17
- package/dist/cjs/popper-1b61df21.js.map +1 -0
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/wcs-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav.cjs.entry.js +3 -3
- package/dist/cjs/wcs-com-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js +1 -1
- package/dist/cjs/wcs-error_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid.cjs.entry.js +5 -4
- package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +3 -2
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +2 -2
- package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-select_2.cjs.entry.js +59 -24
- package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/accordion/{accordion.e2e.js → accordion.e2e.playwright.js} +51 -55
- package/dist/collection/components/accordion/accordion.e2e.playwright.js.map +1 -0
- package/dist/collection/components/accordion-panel/accordion-panel.js +1 -1
- package/dist/collection/components/alert/alert.e2e.playwright.js +125 -0
- package/dist/collection/components/alert/alert.e2e.playwright.js.map +1 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.playwright.js +107 -0
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.playwright.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.playwright.js +188 -0
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.playwright.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/collection/components/button/button.e2e.playwright.js +26 -0
- package/dist/collection/components/button/button.e2e.playwright.js.map +1 -0
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.e2e.playwright.js +39 -0
- package/dist/collection/components/checkbox/checkbox.e2e.playwright.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.e2e.playwright.js +190 -0
- package/dist/collection/components/chip/chip.e2e.playwright.js.map +1 -0
- package/dist/collection/components/com-nav/com-nav.css +15 -0
- package/dist/collection/components/com-nav/{com-nav.e2e.js → com-nav.e2e.playwright.js} +60 -44
- package/dist/collection/components/com-nav/com-nav.e2e.playwright.js.map +1 -0
- package/dist/collection/components/com-nav/com-nav.js +3 -3
- package/dist/collection/components/com-nav/com-nav.js.map +1 -1
- package/dist/collection/components/com-nav-category/com-nav-category.js +1 -1
- package/dist/collection/components/com-nav-item/com-nav-item.css +2 -2
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +1 -1
- package/dist/collection/components/counter/counter.e2e.playwright.js +187 -0
- package/dist/collection/components/counter/counter.e2e.playwright.js.map +1 -0
- package/dist/collection/components/counter/counter.js +1 -1
- package/dist/collection/components/dropdown/dropdown.e2e.playwright.js +320 -0
- package/dist/collection/components/dropdown/dropdown.e2e.playwright.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/editable-field/editable-field.e2e.playwright.js +156 -0
- package/dist/collection/components/editable-field/editable-field.e2e.playwright.js.map +1 -0
- package/dist/collection/components/form-field/form-field.e2e.playwright.js +104 -0
- package/dist/collection/components/form-field/form-field.e2e.playwright.js.map +1 -0
- package/dist/collection/components/galactic-menu/galactic-menu.js +1 -1
- package/dist/collection/components/grid/grid.e2e.playwright.js +153 -0
- package/dist/collection/components/grid/grid.e2e.playwright.js.map +1 -0
- package/dist/collection/components/grid/grid.js +6 -5
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/grid-column/grid-column.js +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-step.js +2 -1
- package/dist/collection/components/horizontal-stepper/horizontal-step.js.map +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper-interface.js.map +1 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +5 -1
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js.map +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.e2e.playwright.js +157 -0
- package/dist/collection/components/input/input.e2e.playwright.js.map +1 -0
- package/dist/collection/components/input/input.js +2 -2
- package/dist/collection/components/label/label.css +4 -6
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js +1 -1
- package/dist/collection/components/modal/modal.css +4 -0
- package/dist/collection/components/modal/modal.e2e.playwright.js +35 -0
- package/dist/collection/components/modal/modal.e2e.playwright.js.map +1 -0
- package/dist/collection/components/modal/modal.js +2 -2
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/native-select/native-select.js +1 -1
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/progress-radial/progress-radial.js +1 -1
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/radio-group/radio-group.e2e.playwright.js +231 -0
- package/dist/collection/components/radio-group/radio-group.e2e.playwright.js.map +1 -0
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/select/select.e2e.playwright.js +1702 -0
- package/dist/collection/components/select/select.e2e.playwright.js.map +1 -0
- package/dist/collection/components/select/select.js +49 -20
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-option/select-option.js +3 -3
- package/dist/collection/components/select-option/select-option.js.map +1 -1
- package/dist/collection/components/switch/switch.e2e.playwright.js +40 -0
- package/dist/collection/components/switch/switch.e2e.playwright.js.map +1 -0
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tabs/tabs.e2e.playwright.js +205 -0
- package/dist/collection/components/tabs/tabs.e2e.playwright.js.map +1 -0
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/textarea/textarea.e2e.playwright.js +133 -0
- package/dist/collection/components/textarea/textarea.e2e.playwright.js.map +1 -0
- package/dist/collection/components/textarea/textarea.js +1 -1
- package/dist/collection/utils/playwright/test-expect.js +2 -0
- package/dist/collection/utils/playwright/test-expect.js.map +1 -0
- package/dist/collection/utils/playwright/test.js +16 -0
- package/dist/collection/utils/playwright/test.js.map +1 -0
- package/dist/esm/{popper-e491c314.js → popper-ac238961.js} +10 -17
- package/dist/esm/popper-ac238961.js.map +1 -0
- package/dist/esm/wcs-breadcrumb.entry.js +1 -1
- package/dist/esm/wcs-breadcrumb.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-item.entry.js +1 -1
- package/dist/esm/wcs-com-nav-item.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav.entry.js +3 -3
- package/dist/esm/wcs-com-nav.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown.entry.js +1 -1
- package/dist/esm/wcs-error_3.entry.js +1 -1
- package/dist/esm/wcs-error_3.entry.js.map +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +1 -1
- package/dist/esm/wcs-grid.entry.js +5 -4
- package/dist/esm/wcs-grid.entry.js.map +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +3 -2
- package/dist/esm/wcs-horizontal-stepper.entry.js.map +1 -1
- package/dist/esm/wcs-modal.entry.js +2 -2
- package/dist/esm/wcs-modal.entry.js.map +1 -1
- package/dist/esm/wcs-select_2.entry.js +59 -24
- package/dist/esm/wcs-select_2.entry.js.map +1 -1
- package/dist/esm/wcs-tabs.entry.js +1 -1
- package/dist/esm/wcs-tooltip.entry.js +1 -1
- package/dist/types/components/accordion/accordion.e2e.playwright.d.ts +1 -0
- package/dist/types/components/alert/alert.e2e.playwright.d.ts +1 -0
- package/dist/types/components/alert-drawer/alert-drawer.e2e.playwright.d.ts +1 -0
- package/dist/types/components/breadcrumb/breadcrumb.e2e.playwright.d.ts +1 -0
- package/dist/types/components/button/button.e2e.playwright.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.e2e.playwright.d.ts +1 -0
- package/dist/types/components/chip/chip.e2e.playwright.d.ts +1 -0
- package/dist/types/components/com-nav/com-nav.e2e.playwright.d.ts +1 -0
- package/dist/types/components/counter/counter.e2e.playwright.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.e2e.playwright.d.ts +1 -0
- package/dist/types/components/editable-field/editable-field.e2e.playwright.d.ts +1 -0
- package/dist/types/components/form-field/form-field.e2e.playwright.d.ts +1 -0
- package/dist/types/components/grid/grid.e2e.playwright.d.ts +1 -0
- package/dist/types/components/horizontal-stepper/horizontal-stepper-interface.d.ts +2 -0
- package/dist/types/components/horizontal-stepper/horizontal-stepper.d.ts +4 -0
- package/dist/types/components/input/input.e2e.playwright.d.ts +1 -0
- package/dist/types/components/modal/modal.e2e.playwright.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.e2e.playwright.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +7 -1
- package/dist/types/components/select/select.e2e.playwright.d.ts +1 -0
- package/dist/types/components/switch/switch.e2e.playwright.d.ts +1 -0
- package/dist/types/components/tabs/tabs.e2e.playwright.d.ts +1 -0
- package/dist/types/components/textarea/textarea.e2e.playwright.d.ts +1 -0
- package/dist/types/components.d.ts +12 -0
- package/dist/types/utils/playwright/test-expect.d.ts +33 -0
- package/dist/types/utils/playwright/test.d.ts +7 -0
- package/dist/wcs/{p-8e9bd0f1.entry.js → p-0326f834.entry.js} +2 -2
- package/dist/wcs/{p-8e9bd0f1.entry.js.map → p-0326f834.entry.js.map} +1 -1
- package/dist/wcs/p-2221bf0c.entry.js +16 -0
- package/dist/wcs/p-2221bf0c.entry.js.map +1 -0
- package/dist/wcs/p-4ae08567.entry.js +2 -0
- package/dist/wcs/p-4ae08567.entry.js.map +1 -0
- package/dist/wcs/p-4e2d6227.entry.js +2 -0
- package/dist/wcs/p-4e2d6227.entry.js.map +1 -0
- package/dist/wcs/p-8332a7e3.entry.js +2 -0
- package/dist/wcs/p-8332a7e3.entry.js.map +1 -0
- package/dist/wcs/{p-ec383729.entry.js → p-9b76b8e6.entry.js} +2 -2
- package/dist/wcs/{p-ec383729.entry.js.map → p-9b76b8e6.entry.js.map} +1 -1
- package/dist/wcs/{p-1f593d06.entry.js → p-abd8d5a0.entry.js} +2 -2
- package/dist/wcs/{p-622f7403.entry.js → p-c6f8c45c.entry.js} +2 -2
- package/dist/wcs/{p-a94e685c.entry.js → p-db7ba599.entry.js} +2 -2
- package/dist/wcs/p-e1fb3625.js +2 -0
- package/dist/wcs/p-e1fb3625.js.map +1 -0
- package/dist/wcs/{p-a956dc84.entry.js → p-f2f7595e.entry.js} +2 -2
- package/dist/wcs/{p-a956dc84.entry.js.map → p-f2f7595e.entry.js.map} +1 -1
- package/dist/wcs/p-fbd68522.entry.js +2 -0
- package/dist/wcs/p-fbd68522.entry.js.map +1 -0
- package/dist/wcs/{p-8c2605fd.entry.js → p-fe303f58.entry.js} +2 -2
- package/dist/wcs/wcs.esm.js +1 -1
- package/package.json +18 -24
- package/dist/cjs/popper-8d6e7fca.js.map +0 -1
- package/dist/collection/components/accordion/accordion.e2e.js.map +0 -1
- package/dist/collection/components/alert/alert.e2e.js +0 -142
- package/dist/collection/components/alert/alert.e2e.js.map +0 -1
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js +0 -111
- package/dist/collection/components/alert-drawer/alert-drawer.e2e.js.map +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +0 -223
- package/dist/collection/components/breadcrumb/breadcrumb.e2e.js.map +0 -1
- package/dist/collection/components/button/button.e2e.js +0 -25
- package/dist/collection/components/button/button.e2e.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox.e2e.js +0 -45
- package/dist/collection/components/checkbox/checkbox.e2e.js.map +0 -1
- package/dist/collection/components/chip/chip.e2e.js +0 -209
- package/dist/collection/components/chip/chip.e2e.js.map +0 -1
- package/dist/collection/components/com-nav/com-nav.e2e.js.map +0 -1
- package/dist/collection/components/counter/counter.e2e.js +0 -206
- package/dist/collection/components/counter/counter.e2e.js.map +0 -1
- package/dist/collection/components/dropdown/dropdown.e2e.js +0 -156
- package/dist/collection/components/dropdown/dropdown.e2e.js.map +0 -1
- package/dist/collection/components/editable-field/editable-field.e2e.js +0 -176
- package/dist/collection/components/editable-field/editable-field.e2e.js.map +0 -1
- package/dist/collection/components/form-field/form-field.e2e.js +0 -122
- package/dist/collection/components/form-field/form-field.e2e.js.map +0 -1
- package/dist/collection/components/grid/grid.e2e.js +0 -147
- package/dist/collection/components/grid/grid.e2e.js.map +0 -1
- package/dist/collection/components/input/input.e2e.js +0 -152
- package/dist/collection/components/input/input.e2e.js.map +0 -1
- package/dist/collection/components/modal/modal.e2e.js +0 -36
- package/dist/collection/components/modal/modal.e2e.js.map +0 -1
- package/dist/collection/components/radio-group/radio-group.e2e.js +0 -239
- package/dist/collection/components/radio-group/radio-group.e2e.js.map +0 -1
- package/dist/collection/components/select/select.e2e.js +0 -1081
- package/dist/collection/components/select/select.e2e.js.map +0 -1
- package/dist/collection/components/switch/switch.e2e.js +0 -45
- package/dist/collection/components/switch/switch.e2e.js.map +0 -1
- package/dist/collection/components/tabs/tabs.e2e.js +0 -207
- package/dist/collection/components/tabs/tabs.e2e.js.map +0 -1
- package/dist/collection/components/textarea/textarea.e2e.js +0 -132
- package/dist/collection/components/textarea/textarea.e2e.js.map +0 -1
- package/dist/collection/utils/tests.js +0 -23
- package/dist/collection/utils/tests.js.map +0 -1
- package/dist/esm/popper-e491c314.js.map +0 -1
- package/dist/types/utils/tests.d.ts +0 -4
- package/dist/wcs/p-0dd07842.entry.js +0 -2
- package/dist/wcs/p-0dd07842.entry.js.map +0 -1
- package/dist/wcs/p-0f864e86.js +0 -2
- package/dist/wcs/p-0f864e86.js.map +0 -1
- package/dist/wcs/p-1244daa0.entry.js +0 -2
- package/dist/wcs/p-1244daa0.entry.js.map +0 -1
- package/dist/wcs/p-1fbe0328.entry.js +0 -2
- package/dist/wcs/p-1fbe0328.entry.js.map +0 -1
- package/dist/wcs/p-b94a09b6.entry.js +0 -16
- package/dist/wcs/p-b94a09b6.entry.js.map +0 -1
- package/dist/wcs/p-fd187bce.entry.js +0 -2
- package/dist/wcs/p-fd187bce.entry.js.map +0 -1
- /package/dist/wcs/{p-1f593d06.entry.js.map → p-abd8d5a0.entry.js.map} +0 -0
- /package/dist/wcs/{p-622f7403.entry.js.map → p-c6f8c45c.entry.js.map} +0 -0
- /package/dist/wcs/{p-a94e685c.entry.js.map → p-db7ba599.entry.js.map} +0 -0
- /package/dist/wcs/{p-8c2605fd.entry.js.map → p-fe303f58.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"m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AAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;gBACjE,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,sBAAsB,CAAC;oBAC/C,4DAAK,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAC,oBAAoB;wBACjE,6DAAM,IAAI,EAAC,kBAAkB;4BACzB,qFAA2B,CACxB,CACL,CAER,CACH,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,SAAS,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\n\nimport { interpret, Interpreter, Machine, MachineConfig, MachineOptions } from 'xstate';\nimport {\n isWcsSelectSize,\n SelectChangeEventDetail,\n SelectFilterChangeEventDetail,\n WcsDefaultSelectFilterFn,\n WcsSelectFilterFn,\n WcsSelectSize,\n WcsSelectSizeValue\n} from './select-interface';\nimport { SelectArrow } from './select-arrow';\nimport { SelectOptionChosedEvent, SelectOptionValue } from '../select-option/select-option-interface';\nimport {\n isElement,\n generateUniqueId,\n findItemLabel,\n inheritAriaAttributes,\n inheritAttributes, setOrRemoveAttribute, compareLists\n} from '../../utils/helpers';\nimport { SelectChips } from './select-chips';\nimport { createPopper, Instance } from '@popperjs/core';\nimport { isEqual } from 'lodash-es';\nimport { getActionForKeyboardEvent, KeyboardEventAssociatedAction } from './select-keyboard-event';\nimport { isFocusable } from '../../utils/accessibility';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\ninterface SelectStateSchema {\n states: {\n closed: {};\n opened: {};\n };\n}\n\ntype SelectEvent\n = { type: 'OPEN' }\n | { type: 'CLOSE', value: { shouldBlur?: boolean, fromKeyboard: boolean } }\n | { type: 'CLICK' }\n | { type: 'OPTION_SELECTED', value: { option: SelectOptionChosedEvent, fromKeyboard: boolean } };\n\nconst SELECT_MACHINE_CONFIG: MachineConfig<any, SelectStateSchema, SelectEvent> = {\n key: 'select',\n initial: 'closed',\n states: {\n closed: {\n entry: ['close'],\n on: {\n CLICK: 'opened',\n OPEN: 'opened',\n OPTION_SELECTED: {actions: ['selectOption']}\n },\n },\n opened: {\n entry: ['open'],\n on: {\n CLICK: 'closed',\n CLOSE: 'closed',\n OPTION_SELECTED: {actions: ['selectOption']}\n },\n },\n }\n};\n\nconst SELECT_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The select component (also named combobox) is a form component that allows users to select one or more options\n * from a list.\n * Use it with several slotted `wcs-select-option` inside.\n *\n * @slot filter-no-result Contains the customizable \"No result found\" div (autocomplete mode only).\n * \n * @cssprop --wcs-select-control-arrow-color - Color of the select arrow\n * @cssprop --wcs-select-control-arrow-color-disabled - Color of the select arrow when disabled\n * \n * @cssprop --wcs-select-control-background-color - Background color of the select control\n * \n * @cssprop --wcs-select-control-line-height - Line height of the select control\n * \n * @cssprop --wcs-select-options-padding - Padding of the select options container\n * \n * @cssprop --wcs-select-control-border-radius - Border radius of the select control\n * @cssprop --wcs-select-control-border-width-default - Border width of the select control when not focused\n * @cssprop --wcs-select-control-border-width-focus - Border width of the select control when focused\n * \n * @cssprop --wcs-select-control-border-color-default - Border color of the select control when not focused\n * @cssprop --wcs-select-control-border-color-disabled - Border color of the select control when disabled\n * @cssprop --wcs-select-control-border-color-error - Border color of the select control when error\n * @cssprop --wcs-select-control-border-color-focus - Border color of the select control when focused (not opened, but the control is focused)\n * \n * @cssprop --wcs-select-value-color - Text color of the select value when not focused \n * @cssprop --wcs-select-value-font-weight - Font weight of the select value\n * \n * @cssprop --wcs-select-placeholder-color - Text color of the select placeholder\n * @cssprop --wcs-select-placeholder-font-weight - Font weight of the select placeholder\n * @cssprop --wcs-select-placeholder-font-style - Font style of the select placeholder\n *\n * @cssprop --wcs-select-text-color-disabled - Text color of the select when disabled\n *\n * @cssprop --wcs-select-control-border-style-default - Border style of the select control when not focused\n * @cssprop --wcs-select-control-border-style-focus - Border style of the select control when focused\n * @cssprop --wcs-select-control-border-style-error - Border style of the select control when error\n * \n * @cssprop --wcs-select-control-chips-gap - Gap between chips (only in multiple mode)\n *\n * @cssprop --wcs-select-control-height-m - Height of the select control in medium size\n * @cssprop --wcs-select-control-height-l - Height of the select control in large size\n * \n * @cssprop --wcs-select-control-autocomplete-padding-vertical-m - Padding vertical (top - bottom) of the select control in size m\n * @cssprop --wcs-select-control-autocomplete-padding-vertical-l - Padding vertical (top - bottom) of the select control in size l\n * @cssprop --wcs-select-control-padding-horizontal-m - Padding horizontal (left - right) in medium size\n * @cssprop --wcs-select-control-padding-horizontal-l - Padding horizontal (left - right) in large size\n * \n * @cssprop --wcs-select-control-font-size-m - Font size of the select in size m\n * @cssprop --wcs-select-control-font-size-l - Font size of the select in size m\n * \n * \n * @cssprop --wcs-select-control-chip-color-default - Color default of the select chip\n * @cssprop --wcs-select-control-chip-color-disabled - Color disabled of the select chip\n * @cssprop --wcs-select-control-chip-background-color-default - Background color default of the select chip\n * @cssprop --wcs-select-control-chip-background-color-disabled - Disabled background color of the select chip\n * @cssprop --wcs-select-control-chip-padding-vertical - Padding vertical (top - bottom) of the select chip\n * @cssprop --wcs-select-control-chip-padding-horizontal - Padding horizontal (left - right) of the select chip\n * @cssprop --wcs-select-control-chip-line-height - Line height of the select chip\n * @cssprop --wcs-select-control-chip-border-radius - Border radius of the select chip\n * \n * @cssprop --wcs-select-overlay-max-height - Max height of the select overlay\n * @cssprop --wcs-select-overlay-background-color - Background color of the select overlay\n * @cssprop --wcs-select-overlay-border-width - Border width of the select overlay\n * @cssprop --wcs-select-overlay-border-color - Border color of the select overlay\n * @cssprop --wcs-select-overlay-border-radius - Border radius of the overlay\n */\n@Component({\n tag: 'wcs-select',\n styleUrl: 'select.scss',\n shadow: true\n})\nexport class Select implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLWcsSelectElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n private stateService!: Interpreter<any, SelectStateSchema, SelectEvent>;\n\n private selectId = `wcs-select-${selectIds++}`;\n private labelElement: HTMLWcsLabelElement;\n private optionsEl!: HTMLDivElement;\n private optionsId = generateUniqueId(\"OPTIONS\");\n private controlEl!: HTMLDivElement;\n\n // Only used for multiples.\n private values: SelectOptionValue[];\n\n /**\n * This attribute mutate when a new option is selected OR unselected\n * @private\n */\n private lastModifiedOptionElement: HTMLWcsSelectOptionElement | null;\n /**\n * It serves for accessibility feature: keyboard navigation. It serves to focus the option if defined when the select\n * is opened based on which key pressed.\n *\n * When the select is <b>opened</b> user can navigate through options with keyboard:\n *\n * - Arrow right | down: `lastFocusedOptionElement` equals to the next option of `lastFocusedOptionElement` or\n * the first if `lastFocusedOptionElement` is not defined\n * - Arrow left | top: `lastFocusedOptionElement` equals to the previous enabled option of `lastFocusedOptionElement`\n * or the first if `lastFocusedOptionElement` is not defined\n * - Page up: `lastFocusedOptionElement` equals to the first enabled option\n * - Page down: `lastFocusedOptionElement` equals to the last enabled option\n * @private\n */\n private lastFocusedOptionElement: HTMLWcsSelectOptionElement | null;\n\n // Only used for autocomplete.\n private lastHighlightedOptionElement: HTMLWcsSelectOptionElement | null;\n private autocompleteInput: HTMLInputElement;\n\n /** Whether the select is expanded */\n @State()\n private expanded: boolean = false;\n\n /**\n * Specify the size (height) of the select.\n */\n @Prop({reflect: true}) size: WcsSelectSize = 'm';\n\n /** Text to display for the selected option, when no option is selected, the value is undefined. */\n @State()\n private displayText: string;\n\n /** When the host is focused. */\n @State()\n // @ts-ignore\n private focused: boolean;\n\n /** The currently selected value. */\n @Prop({mutable: true})\n value?: any | null;\n\n /** The text to display when the select is empty. */\n @Prop({mutable: true, reflect: true})\n placeholder?: string | null;\n\n /** If `true`, the user cannot interact with the select. */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop({ reflect: true })\n required: boolean = false;\n\n /** If `true`, the user can select multiple values at once. */\n @Prop({ reflect: true })\n multiple: boolean = false;\n\n /** If `true`, the select acts as an autocomplete field to filter your results. */\n @Prop({ reflect: true })\n autocomplete: boolean = false;\n\n /**\n * **Only works with `autocomplete` mode.** \n * If `true`, the server mode disables the client-side filtering on your select and allows you to handle\n * which options should be present in your DOM.\n */\n @Prop({ reflect: true })\n serverMode: boolean = false;\n\n /**\n * **Only works with `autocomplete` mode.** \n * Customizable sort function to change the comparison of values. If not provided, uses the default behavior :\n * `option.textContent.toLowerCase().startsWith(filter.toLowerCase())`\n */\n @Prop({attribute: null}) filterFn: WcsSelectFilterFn;\n\n /** If `true`, selected items are shown in chips mode. */\n @Prop({ reflect: true })\n chips: boolean = false;\n\n /** The name of the control, which is submitted with the form data. */\n @Prop()\n name?: string;\n\n /** Function used to compare options, default : deep comparison. */\n @Prop()\n compareWith?: (optionValue: any, selectedValue: any) => boolean = (optionValue, selectedValue) => isEqual(optionValue, selectedValue);\n\n private popper: Instance;\n\n /**\n * Boolean to toggle the text \"No result found\" (only for autocomplete with filter)\n * @private\n */\n @State() private showNoResultFoundLabel: boolean = false;\n\n /**\n * Value of the autocomplete input field\n * @private\n */\n @State() private autocompleteValue = undefined;\n\n @State() private overlayDirection: 'bottom' | 'top' = 'bottom';\n\n /** Emitted when the value has changed. */\n @Event() wcsChange!: EventEmitter<SelectChangeEventDetail>;\n\n /** Emitted when the select has focus. */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n /** Emitted when the select loses focus. */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /** Emitted when the autocomplete filter has changed. */\n @Event() wcsFilterChange!: EventEmitter<SelectFilterChangeEventDetail>;\n\n /** Open the component. */\n @Method()\n async open() {\n this.stateService.send('OPEN');\n }\n\n /** Close the component. */\n @Method()\n async close() {\n this.stateService.send('CLOSE');\n }\n\n @Watch('value')\n onValueChangeHandler(newValue: any) {\n this.updateSelectedValue(newValue);\n }\n\n /**\n * Updates the selected value(s) of the component and manages the internal state accordingly\n *\n * @param value - The value(s) to be selected in the component\n * For single selection mode: any value that matches an option's value\n * For multiple selection mode: a single value or an array of values\n * @param resetIfNoValue - When true and no value is provided, the select component will be reset\n * Defaults to true\n */\n private updateSelectedValue(value: any, resetIfNoValue = true) {\n // If no value is passed, the select is reset.\n if (!value && resetIfNoValue) {\n this.reset();\n }\n if (this.multiple) {\n // If user don't give an array, we provide one\n if (!Array.isArray(value)) {\n value = [value];\n }\n\n // We assume that the last modified option in multiple mode is the last one in the array\n this.lastModifiedOptionElement = value.length > 0 ? Array.from(this.options).find(opt => this.compareWith(opt.value, value[value.length - 1])) ?? null : null;\n\n if (this.serverMode) {\n // in server mode, we don't know all the possible select options, so we assume the value is correct,\n // and we just sync the displayText and current available options\n const compareResult = compareLists(this.values.map(v => v.value), value, this.compareWith);\n compareResult.added.forEach(addedOption => {\n const option = Array.from(this.options).find(opt => this.compareWith(opt.value, addedOption)); \n if (option) {\n this.values.push({\n value: option.value,\n displayText: option.innerText,\n chipColor: option.chipColor,\n chipBackgroundColor: option.chipBackgroundColor\n });\n option.selected = true;\n }\n });\n \n // We update the selected options when the slot changes to keep the selected options in sync with the current value\n compareResult.kept.forEach((keptOption: string) => {\n const option = Array.from(this.options).find(opt => this.compareWith(opt.value, keptOption));\n if (option) {\n option.selected = true;\n }\n })\n \n compareResult.removed.forEach(removedOption => {\n this.values = this.values.filter(v => !this.compareWith(v.value, removedOption));\n const removedOptionElement = Array.from(this.options).find(opt => this.compareWith(opt.value, removedOption));\n if (removedOptionElement) {\n removedOptionElement.selected = false;\n }\n });\n } else {\n this.values = [];\n \n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n const isSelected = value ?\n value.findIndex(v => this.compareWith(opt.value, v)) !== -1\n : false;\n if (isSelected) {\n this.values.push({\n value: opt.value,\n displayText: opt.innerText,\n chipColor: opt.chipColor,\n chipBackgroundColor: opt.chipBackgroundColor\n });\n }\n opt.selected = isSelected;\n });\n }\n // update select placeholder text\n this.displayText = this.values.length !== 0\n ? this.values.map(v => v.displayText).join(', ')\n : undefined;\n } else {\n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n const isSelected = this.compareWith(opt.value, value);\n if (isSelected) {\n this.displayText = opt.innerText;\n this.lastModifiedOptionElement = opt;\n if (this.autocomplete) {\n this.setAutocompleteValue(opt.innerText);\n }\n }\n opt.selected = isSelected;\n });\n }\n }\n\n /**\n * Reset the select: unselects all options for multiple mode and displays the placeholder\n * @private\n */\n private reset() {\n this.values = [];\n this.displayText = undefined;\n if (this.autocomplete) {\n // When need to reset the internal filter state of the component as the mutation of \n // autocompleteValue from the code doesn't call onAutocompleteInputEvent method.\n this.setAutocompleteValue('', true);\n }\n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n opt.selected = false;\n });\n }\n\n componentDidLoad() {\n this.optionsEl = this.el.shadowRoot.querySelector('.wcs-select-options');\n this.controlEl = this.el.shadowRoot.querySelector('.wcs-select-control');\n\n const stateMachine = Machine(\n SELECT_MACHINE_CONFIG,\n this.initMachineOptions()\n );\n // FIXME: type checking failed...\n // @ts-ignore\n this.stateService = interpret(stateMachine);\n\n if (this.multiple) {\n this.values = [];\n }\n\n this.stateService.start();\n if (this.optionsEl.querySelector('slot') === null) {\n this.replaceOptions_firefoxBefore63();\n this.listenDomUpdate_firefoxBefore63();\n }\n\n if (this.value !== undefined) {\n this.updateSelectedValue(this.value);\n }\n\n this.popper = this.createPopperInstance();\n\n // if the select is inside a wcs-form-field, we set an id to the wcs-label if present\n // the wcs-label element reference is kept to compute aria-label value during the rendering\n this.labelElement = findItemLabel(this.el);\n if (this.labelElement) {\n this.labelElement.id = this.selectId + \"-lbl\";\n }\n }\n\n private createPopperInstance() {\n return createPopper(this.controlEl, this.optionsEl, {\n placement: \"bottom\",\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 4] // we want 4px between select control and select options\n }\n }\n ]\n });\n }\n\n private emitChange(newValue: any): void {\n this.wcsChange.emit({\n value: newValue\n });\n }\n\n private replaceOptions_firefoxBefore63() {\n Array.from(this.el.querySelectorAll('wcs-select-option'))\n .forEach(option => {\n if (option.parentNode === this.el) {\n this.el.removeChild(option);\n this.optionsEl.appendChild(option);\n }\n });\n }\n\n private listenDomUpdate_firefoxBefore63() {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n this.replaceOptions_firefoxBefore63();\n }\n }\n });\n observer.observe(this.el, {childList: true});\n }\n \n componentWillRender(): Promise<void> | void {\n if (this.multiple) {\n this.options\n .forEach((opt: HTMLWcsSelectOptionElement) => opt.multiple = true);\n }\n }\n\n componentWillLoad(): Promise<void> | void {\n if (!isWcsSelectSize(this.size)) {\n console.warn(`Invalid size value for wcs-select : \"${this.size}\". Must be one of \"${WcsSelectSizeValue.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n \n // XXX : special case on this component for attribute inheritance\n // We only move attributes on the native input when autocomplete is true.\n // Otherwise, all attributes are on the Host, so we do not need to inherit those.\n if (this.autocomplete) {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, SELECT_INHERITED_ATTRS),\n };\n }\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n if(this.autocomplete === false) {\n setOrRemoveAttribute(this.el, attr, value);\n } else {\n setOrRemoveAttribute(this.autocompleteInput, attr, value);\n }\n }\n\n private get options(): HTMLWcsSelectOptionElement[] {\n const opts = this.el?.querySelectorAll('wcs-select-option');\n if (opts && opts.length !== 0) {\n return opts as any as HTMLWcsSelectOptionElement[];\n }\n return [];\n }\n\n private get notDisabledOptions(): HTMLWcsSelectOptionElement[] {\n const opts = this.el?.querySelectorAll('wcs-select-option:not([disabled]):not([aria-hidden])');\n if (opts && opts.length !== 0) {\n return opts as any as HTMLWcsSelectOptionElement[];\n }\n return [];\n }\n\n private initMachineOptions(): Partial<MachineOptions<any, SelectEvent>> {\n return {\n actions: {\n open: () => {\n if (!this.disabled) {\n this.expanded = true;\n this.focused = false;\n if(this.multiple === false && this.autocomplete && this.hasValue === false) {\n // If we open the select in single autocomplete mode, we update the autocomplete value at \n // the blur event so that the displayed value reflect the current select value. \n // Indeed, we have to tell the component to take the current filter state manually at the \n // opening (because the input event of the autocomplete field is not fired at this point).\n if (this.autocompleteValue && this.autocompleteValue !== '') {\n this.setAutocompleteValue(this.autocompleteValue);\n }\n }\n this.clearHighlightOnLastHighlightedOption();\n if (this.notDisabledOptions.length > 0) {\n this.lastFocusedOptionElement = this.lastModifiedOptionElement ?? this.notDisabledOptions[0];\n requestAnimationFrame(() => {\n this.autocomplete\n ? this.autocompleteInput?.focus()\n : this.lastFocusedOptionElement?.focus();\n });\n }\n }\n },\n close: (_, event: SelectEvent) => {\n if (event.type === 'CLOSE') {\n this.clearHighlightOnLastHighlightedOption();\n if (event.value?.shouldBlur) {\n this.focused = false;\n } else {\n if (this.autocomplete && event.value?.fromKeyboard) {\n // If we're in autocomplete mode, a keyboard event (e.g. escape) doesn't change the \n // focus (so this.el.focus() aren't called because the select was already focused)\n // but you still have to go back to the autocomplete input.\n this.focusAutocompleteInput();\n } else {\n // Otherwise, we focus the select element\n this.el.focus();\n }\n this.focused = true;\n }\n }\n this.expanded = false;\n },\n selectOption: (_, event) => {\n if (event.type === 'OPTION_SELECTED') {\n if (this.multiple) {\n this.handleOptionSelectedOnMultiple(event.value.option);\n } else {\n this.handleOptionSelectedOnSingle(event.value.option);\n this.stateService.send('CLOSE', {value: {fromKeyboard: event.value.fromKeyboard}});\n }\n\n if (this.autocomplete) {\n if (this.multiple) {\n requestAnimationFrame(() => {\n this.autocompleteInput.focus();\n })\n } else {\n this.autocompleteValue = event.value.option.displayText;\n }\n }\n this.emitChange(this.value);\n }\n }\n },\n guards: {\n enabled: () => !this.disabled\n }\n };\n }\n\n private handleOptionSelectedOnMultiple(event: SelectOptionChosedEvent) {\n const index = this.values.findIndex(v => this.compareWith(v.value, event.value));\n if (index === -1) {\n // this will trigger the watch on value and update the values model\n this.value = [...this.values.map(v => v.value), event.value];\n } else {\n // this will trigger the watch on value and update the values model\n this.value = this.values.filter(v => !this.compareWith(v.value, event.value)).map(v => v.value);\n }\n }\n\n private handleOptionSelectedOnSingle(event: SelectOptionChosedEvent) {\n this.value = event.value;\n }\n\n disconnectedCallback() {\n this.stateService?.stop();\n }\n\n private get hasValue(): boolean {\n // TODO: change this behavior.\n return this.displayText !== undefined;\n }\n\n @Listen('mouseup')\n onMouseUp(event: MouseEvent) {\n const clickOnScroll = isElement(event.target)\n && (event.offsetX > event.target.clientWidth\n || event.offsetY > event.target.clientHeight // If the click il located bellow the component height the click happen in the overlay\n || event.offsetY < 0); // If the click is made above the component\n\n const clickOnRemoveChip = event.composedPath()\n .filter(x => {\n const el = (x as HTMLElement);\n return el.nodeName === 'svg' && el.classList.contains('chip');\n })\n .length > 0;\n\n if (!clickOnScroll && !clickOnRemoveChip) {\n this.stateService.send('CLICK');\n }\n }\n\n @Listen('click', {target: 'window'})\n onWindowClickEvent(event: MouseEvent) {\n const firstSelectInEventPath = event.composedPath().filter(x => (x as HTMLElement).nodeName === 'WCS-SELECT')[0];\n const clickOnCurrentSelect = firstSelectInEventPath === this.el;\n // TODO: Move this logic in the state machine\n // FIXME: Doesnt work with single + disabled option\n if (this.expanded && !clickOnCurrentSelect) {\n this.stateService.send({type: 'CLOSE', value: {shouldBlur: true, fromKeyboard: false}});\n }\n }\n\n @Listen('keydown')\n onKeyDown(_event: KeyboardEvent) {\n const currentState = this.stateService.getSnapshot().matches(\"closed\") ? 'closed' : 'opened';\n let type: 'autocomplete_unique' | 'autocomplete_multiple' | 'unique' | 'multiple';\n if (this.autocomplete) {\n type = this.multiple ? 'autocomplete_multiple' : 'autocomplete_unique';\n } else {\n type = this.multiple ? 'multiple' : 'unique';\n }\n const actionsFromKeyboardEvents: KeyboardEventAssociatedAction[] = getActionForKeyboardEvent(_event, currentState, type);\n \n // If we have at least one associated actions, we prevent the default behavior of the event. \n // Except if the action is a focus move (we have to handle the preventDefault behavior ourselves in the action implementation)\n if (actionsFromKeyboardEvents.length != 0 && actionsFromKeyboardEvents.filter(a => a.kind === 'MoveFocus').length === 0) {\n _event.preventDefault();\n }\n\n for (const actionFromKeyboardEvent of actionsFromKeyboardEvents) {\n this.doActionFromKeyboardEventAssociatedAction(actionFromKeyboardEvent, _event);\n }\n }\n\n doActionFromKeyboardEventAssociatedAction(actionFromKeyboardEvent: KeyboardEventAssociatedAction, event: KeyboardEvent) {\n switch (actionFromKeyboardEvent.kind) {\n case \"CloseSelect\":\n this.stateService.send({\n type: 'CLOSE',\n value: {shouldBlur: actionFromKeyboardEvent.shouldBlur, fromKeyboard: true}\n });\n break;\n case \"OpenSelect\":\n this.stateService.send('OPEN');\n break;\n case \"SelectOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.selectClosestOption('next');\n break;\n case \"previous\":\n this.selectClosestOption('previous');\n break;\n case \"first\":\n this.selectFirstOption();\n break;\n case \"last\":\n this.selectLastOption();\n break;\n case \"lastHighlighted\": {\n // We have to handle enterKey here because with autocomplete mode, a wcs-select-option\n // is only highlighted, therefore the event is not fired\n const indexToSelect = Array.from(this.notDisabledOptions).indexOf(this.lastHighlightedOptionElement);\n\n if (indexToSelect !== -1) {\n this.lastModifiedOptionElement = this.lastHighlightedOptionElement;\n this.selectOption(indexToSelect, true);\n }\n break;\n }\n }\n break;\n case \"ClearAutocompleteInput\":\n this.autocompleteValue = '';\n break;\n case \"ClearHighlight\":\n this.clearHighlightOnLastHighlightedOption();\n break;\n case \"HighlightOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.highlightClosestOption('next');\n break;\n case \"previous\":\n this.highlightClosestOption('previous');\n break;\n case \"first\":\n this.highlightFirstOption();\n break;\n case \"last\":\n this.highlightLastOption();\n break;\n default:\n break;\n }\n break;\n case \"FocusOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.focusClosestOption('next');\n break;\n case \"previous\":\n this.focusClosestOption('previous')\n break;\n case \"first\":\n this.focusFirstOption()\n break;\n case \"last\":\n this.focusLastOption();\n break;\n case \"lastFocused\":\n if (this.lastFocusedOptionElement != null) {\n this.focusOption(Array.from(this.notDisabledOptions).indexOf(this.lastFocusedOptionElement));\n }\n break;\n default:\n break;\n }\n break;\n case \"MoveFocus\":\n switch (actionFromKeyboardEvent.target) {\n case \"previous\": {\n let elementToFocus: Element = this.el.previousElementSibling ?? this.el.parentElement;\n while (elementToFocus) {\n if (isFocusable(elementToFocus)) break;\n elementToFocus = elementToFocus.previousElementSibling ?? elementToFocus.parentElement;\n }\n if (elementToFocus) {\n event.preventDefault();\n (elementToFocus as HTMLElement).focus();\n }\n break;\n }\n default:\n break;\n }\n break;\n default:\n throw new Error(\"Internal error\");\n }\n }\n\n private getClosestActiveOptionIndexForState(direction: 'next' | 'previous', state: 'highlighted' | 'focused' | 'modified'): number | 'nothing' {\n let concernedOption: HTMLWcsSelectOptionElement | null;\n switch (state) {\n case 'focused':\n concernedOption = this.lastFocusedOptionElement;\n break;\n case 'modified':\n concernedOption = this.lastModifiedOptionElement;\n break;\n case 'highlighted':\n concernedOption = this.lastHighlightedOptionElement;\n break;\n default:\n concernedOption = null;\n }\n let currentIndex = Array.from(this.notDisabledOptions).indexOf(concernedOption);\n\n const MIN_INDEX = 0;\n const MAX_INDEX = this.notDisabledOptions.length - 1;\n\n if (direction === 'next' && currentIndex < MAX_INDEX) {\n currentIndex++;\n } else if (direction === 'previous' && currentIndex > MIN_INDEX) {\n currentIndex--;\n } else {\n if (!this.autocomplete)\n return 'nothing';\n\n // Used to scroll options infinitely with keyboard (autocomplete mode only)\n if (direction === 'next' && currentIndex >= MAX_INDEX) {\n currentIndex = 0;\n }\n if (direction === 'previous' && currentIndex === MIN_INDEX) {\n currentIndex = MAX_INDEX;\n }\n }\n return currentIndex;\n }\n\n /**\n * Selects the non-disabled option with the index passed as a parameter.\n * The method sends an event to the state machine (the same as when clicking on an option with the mouse)\n * @param indexToSelect Option index within non-deactivated options list\n * @param fromKeyboard\n * @private\n */\n private selectOption(indexToSelect: number, fromKeyboard = false) {\n const optionToSelect = this.notDisabledOptions[indexToSelect];\n\n if (!optionToSelect) return;\n\n this.sendOptionSelectedToStateMachine({\n source: optionToSelect,\n value: optionToSelect.value,\n displayText: optionToSelect.innerText\n }, fromKeyboard);\n }\n\n private selectClosestOption(direction: 'next' | 'previous'): void {\n const indexToSelect = this.getClosestActiveOptionIndexForState(direction, 'modified');\n if (indexToSelect === 'nothing') return;\n this.selectOption(indexToSelect, true);\n }\n\n private selectFirstOption() {\n if (this.notDisabledOptions.length < 1) {\n return;\n }\n\n this.selectOption(0, true);\n }\n\n private selectLastOption() {\n if (this.notDisabledOptions.length < 1) {\n return;\n }\n\n this.selectOption(this.notDisabledOptions.length - 1, true);\n }\n\n private focusOption(indexToFocus: number) {\n this.lastFocusedOptionElement = this.notDisabledOptions[indexToFocus];\n this.lastFocusedOptionElement?.focus();\n this.el.setAttribute(\"aria-activedescendant\", this.lastFocusedOptionElement.id);\n }\n\n private focusClosestOption(direction: 'next' | 'previous'): void {\n const indexToFocus = this.getClosestActiveOptionIndexForState(direction, 'focused');\n if (indexToFocus === 'nothing') return;\n\n this.focusOption(indexToFocus);\n }\n\n private focusFirstOption() {\n this.focusOption(0);\n }\n\n private focusLastOption() {\n this.focusOption(this.notDisabledOptions.length - 1);\n }\n\n @Listen('wcsSelectOptionClick')\n selectedOptionChanged(event: CustomEvent<SelectOptionChosedEvent>) {\n this.sendOptionSelectedToStateMachine(event.detail);\n }\n\n sendOptionSelectedToStateMachine(event: SelectOptionChosedEvent, fromKeyboard = false) {\n this.stateService.send({type: 'OPTION_SELECTED', value: {option: event, fromKeyboard}});\n }\n\n onSlotchange() {\n // We call updateSelectedValue to update the selected options when the slot changes to keep the selected options in sync with the current value.\n // This also update the displayText value according to the options data.\n // Finally, this update the internal models for multiple mode and handle the server mode correctly.\n this.updateSelectedValue(this.value, false);\n\n // Server-mode only : \"no result\" slot should be visible dynamically if no option is present in the slot\n if (this.autocomplete && this.serverMode) {\n this.showNoResultFoundLabel = this.options.length < 1;\n }\n\n if (this.multiple) {\n this.options\n .forEach((opt: HTMLWcsSelectOptionElement) => opt.multiple = true);\n }\n }\n\n removeChip(v: SelectOptionValue) {\n this.options\n .forEach(opt => {\n if (opt.value === v.value) {\n this.sendOptionSelectedToStateMachine({\n ...v,\n source: opt\n });\n }\n });\n }\n\n //region Autocomplete mode\n\n private highlightOption(indexToHighlight: number) {\n this.clearHighlightOnLastHighlightedOption();\n this.lastHighlightedOptionElement = this.notDisabledOptions[indexToHighlight];\n if (this.lastHighlightedOptionElement) {\n this.lastHighlightedOptionElement.highlighted = true;\n this.autocompleteInput.setAttribute(\"aria-activedescendant\", this.lastHighlightedOptionElement.id);\n requestAnimationFrame(() => {\n this.lastHighlightedOptionElement.scrollIntoView({block: \"nearest\", inline: \"nearest\"});\n })\n }\n }\n\n private highlightFirstOption() {\n this.highlightOption(0);\n }\n\n private highlightLastOption() {\n this.highlightOption(this.notDisabledOptions.length - 1);\n }\n\n private highlightClosestOption(direction: 'next' | 'previous'): void {\n const indexToHighlight = this.getClosestActiveOptionIndexForState(direction, 'highlighted');\n if (indexToHighlight === 'nothing') return;\n\n this.highlightOption(indexToHighlight);\n }\n\n /**\n * This method removes the highlight that applies to the last highlighted option if any.\n * This is used only for accessibility of autocomplete mode.\n * @private\n */\n private clearHighlightOnLastHighlightedOption() {\n if (this.lastHighlightedOptionElement) {\n this.lastHighlightedOptionElement.highlighted = false;\n this.lastHighlightedOptionElement = null;\n }\n }\n\n private onAutocompleteInputEvent(e: InputEvent) {\n const filter = this.autocompleteInput.value ?? '';\n\n this.setAutocompleteValue(filter, false, true); // fromUserInteraction = true\n // Avoid the inputEvent event to bubble and be emitted, we rather use wcsFilterChange in this case :\n e.stopPropagation();\n\n }\n\n /**\n * Set the autocomplete value and open the select if needed.\n * @param filter - The new filter value\n * @param isReset - If true, the filter is reset and the select is closed\n * @param fromUserInteraction - If true, the change comes from user interaction (typing), if false it's programmatic\n * @private\n */\n private setAutocompleteValue(filter: string, isReset = false, fromUserInteraction = false): void {\n this.clearHighlightOnLastHighlightedOption();\n const newValueIsDifferentFromLastModifiedOption = this.lastModifiedOptionElement == null || this.lastModifiedOptionElement?.textContent !== this.autocompleteValue;\n // Only open the select automatically when the change comes from user interaction\n if (!this.expanded && newValueIsDifferentFromLastModifiedOption && !isReset && fromUserInteraction) {\n this.open(); \n }\n\n // Prevents client-side filtering logic from being applied when serverMode is enabled.\n if (!this.serverMode) {\n if (filter.length) {\n const [matchingOptions, optionsToHide] = [[], []];\n const filteringFunction: WcsSelectFilterFn = this.filterFn ?? WcsDefaultSelectFilterFn;\n this.options.forEach((optionEl: HTMLWcsSelectOptionElement) =>\n (filteringFunction(optionEl, filter) ? matchingOptions : optionsToHide).push(optionEl)\n );\n\n this.showNoResultFoundLabel = matchingOptions.length === 0;\n matchingOptions.forEach(o => {\n o.hidden = false;\n o.removeAttribute(\"aria-hidden\");\n });\n optionsToHide.forEach(o => {\n o.hidden = true;\n o.setAttribute(\"aria-hidden\", \"true\");\n });\n } else {\n this.showNoResultFoundLabel = false;\n this.options.forEach(o => {\n o.hidden = false;\n o.removeAttribute(\"aria-hidden\");\n });\n }\n }\n \n if (this.autocompleteValue !== filter) {\n this.autocompleteValue = filter ?? '';\n this.wcsFilterChange.emit({\n value: filter,\n });\n }\n }\n\n @Listen('focus')\n onFocus(event: FocusEvent) {\n if (this.autocomplete) {\n this.focusAutocompleteInput();\n }\n this.wcsFocus.emit(event);\n }\n\n private focusAutocompleteInput(): void {\n this.autocompleteInput?.focus();\n }\n\n //endregion\n\n @Listen('blur', { capture: true })\n onBlur(event: FocusEvent) {\n // Avoid emitting a wcsBlur event when the relatedTarget of the blur event is a child or the select itself\n const target = event.relatedTarget as HTMLElement;\n if (this.el.contains(target)) {\n return;\n }\n \n this.wcsBlur.emit(event);\n }\n\n componentDidRender() {\n this.popper?.update();\n }\n\n private focusedAttributes() {\n return !this.disabled ? {tabIndex: 0} : {};\n }\n\n private onAutocompleteFieldBlur(_e: FocusEvent) {\n if (this.multiple === false && this.autocomplete === true && this.hasValue) {\n this.autocompleteValue = this.displayText;\n }\n }\n\n render() {\n const ariaLabelValue = `${this.labelElement ? this.labelElement.innerText : ''} ${this.hasValue ? this.displayText : ''}`.trimEnd();\n const noResultContainerId = 'no-result-container';\n \n return (\n <Host class={this.expanded ? 'expanded ' : ''}\n overlayDirection={this.overlayDirection}\n {...this.focusedAttributes()}\n role={!this.autocomplete ? \"combobox\" : null}\n aria-haspopup={!this.autocomplete ? \"listbox\" : null}\n aria-owns={!this.autocomplete ? this.optionsId : null}\n aria-controls={!this.autocomplete ? this.optionsId : null}\n aria-disabled={!this.autocomplete ? (this.disabled ? 'true' : null) : null}\n aria-required={!this.autocomplete ? (this.required ? 'true' : 'false') : null}\n aria-expanded={!this.autocomplete ? (this.expanded ? 'true' : 'false') : null}\n aria-multiselectable={!this.autocomplete ? (this.multiple ? 'true' : 'false') : null}\n aria-label={!this.autocomplete ? ariaLabelValue : null}>\n <div class=\"wcs-select-control\">\n <div class=\"wcs-select-value-container\">\n {this.hasValue\n ?\n (this.chips ?\n this.values.map((option: SelectOptionValue) =>\n <SelectChips disabled={this.disabled} option={option}\n onRemove={this.removeChip.bind(this)}/>\n )\n : (!this.autocomplete || this.autocomplete && this.multiple) &&\n <label class=\"wcs-select-value\">{this.displayText}</label>)\n : !this.autocomplete && <label class=\"wcs-select-placeholder\">{this.placeholder}</label>\n }\n {this.autocomplete && <input class=\"autocomplete-field\"\n value={this.autocompleteValue}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-label={ariaLabelValue}\n aria-describedby={noResultContainerId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-expanded={this.expanded ? 'true' : 'false'}\n aria-controls={this.optionsId}\n aria-owns={this.optionsId}\n aria-multiselectable={this.multiple ? 'true' : 'false'}\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n disabled={this.disabled}\n required={this.required}\n onBlur={(e) => this.onAutocompleteFieldBlur(e)}\n placeholder={this.values?.length ? null : this.placeholder}\n onInput={(e) => this.onAutocompleteInputEvent(e)}\n ref={el => this.autocompleteInput = el}\n {...this.inheritedAttributes}/>\n }\n </div>\n <SelectArrow up={this.expanded}/>\n </div>\n <div class=\"wcs-select-options\" id={this.optionsId} role=\"listbox\">\n <slot name=\"options\" onSlotchange={this.onSlotchange.bind(this)}/>\n {(this.autocomplete && this.showNoResultFoundLabel) &&\n <div role=\"alert\" id={noResultContainerId} class=\"noresult-container\">\n <slot name=\"filter-no-result\">\n <span>Aucun résultat</span>\n </slot>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n\nlet selectIds = 0;\n"]}
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAe,OAAO,EAAiC,MAAM,QAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ;AAED,IAAI,SAAS,GAAG,CAAC,CAAC","sourcesContent":["import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Method,\n Prop,\n State,\n Watch\n} from '@stencil/core';\n\nimport { interpret, Interpreter, Machine, MachineConfig, MachineOptions } from 'xstate';\nimport {\n isWcsSelectSize,\n SelectChangeEventDetail,\n SelectFilterChangeEventDetail,\n WcsDefaultSelectFilterFn,\n WcsSelectFilterFn,\n WcsSelectSize,\n WcsSelectSizeValue\n} from './select-interface';\nimport { SelectArrow } from './select-arrow';\nimport { SelectOptionChosedEvent, SelectOptionValue } from '../select-option/select-option-interface';\nimport {\n isElement,\n generateUniqueId,\n findItemLabel,\n inheritAriaAttributes,\n inheritAttributes, setOrRemoveAttribute, compareLists\n} from '../../utils/helpers';\nimport { SelectChips } from './select-chips';\nimport { createPopper, Instance } from '@popperjs/core';\nimport { isEqual } from 'lodash-es';\nimport { getActionForKeyboardEvent, KeyboardEventAssociatedAction } from './select-keyboard-event';\nimport { isFocusable } from '../../utils/accessibility';\nimport { AriaAttributeName, MutableAriaAttribute } from \"../../utils/mutable-aria-attribute\";\n\ninterface SelectStateSchema {\n states: {\n closed: {};\n opened: {};\n };\n}\n\ntype SelectEvent\n = { type: 'OPEN' }\n | { type: 'CLOSE', value: { shouldBlur?: boolean, fromKeyboard: boolean } }\n | { type: 'CLICK' }\n | { type: 'OPTION_SELECTED', value: { option: SelectOptionChosedEvent, fromKeyboard: boolean } };\n\nconst SELECT_MACHINE_CONFIG: MachineConfig<any, SelectStateSchema, SelectEvent> = {\n key: 'select',\n initial: 'closed',\n states: {\n closed: {\n entry: ['close'],\n on: {\n CLICK: 'opened',\n OPEN: 'opened',\n OPTION_SELECTED: {actions: ['selectOption']}\n },\n },\n opened: {\n entry: ['open'],\n on: {\n CLICK: 'closed',\n CLOSE: 'closed',\n OPTION_SELECTED: {actions: ['selectOption']}\n },\n },\n }\n};\n\nconst SELECT_INHERITED_ATTRS = ['tabindex', 'title'];\n\n/**\n * The select component (also named combobox) is a form component that allows users to select one or more options\n * from a list.\n * Use it with several slotted `wcs-select-option` inside.\n *\n * @slot filter-no-result Contains the customizable \"No result found\" div (autocomplete mode only).\n * \n * @cssprop --wcs-select-control-arrow-color - Color of the select arrow\n * @cssprop --wcs-select-control-arrow-color-disabled - Color of the select arrow when disabled\n * \n * @cssprop --wcs-select-control-background-color - Background color of the select control\n * \n * @cssprop --wcs-select-control-line-height - Line height of the select control\n * \n * @cssprop --wcs-select-options-padding - Padding of the select options container\n * \n * @cssprop --wcs-select-control-border-radius - Border radius of the select control\n * @cssprop --wcs-select-control-border-width-default - Border width of the select control when not focused\n * @cssprop --wcs-select-control-border-width-focus - Border width of the select control when focused\n * \n * @cssprop --wcs-select-control-border-color-default - Border color of the select control when not focused\n * @cssprop --wcs-select-control-border-color-disabled - Border color of the select control when disabled\n * @cssprop --wcs-select-control-border-color-error - Border color of the select control when error\n * @cssprop --wcs-select-control-border-color-focus - Border color of the select control when focused (not opened, but the control is focused)\n * \n * @cssprop --wcs-select-value-color - Text color of the select value when not focused \n * @cssprop --wcs-select-value-font-weight - Font weight of the select value\n * \n * @cssprop --wcs-select-placeholder-color - Text color of the select placeholder\n * @cssprop --wcs-select-placeholder-font-weight - Font weight of the select placeholder\n * @cssprop --wcs-select-placeholder-font-style - Font style of the select placeholder\n *\n * @cssprop --wcs-select-text-color-disabled - Text color of the select when disabled\n *\n * @cssprop --wcs-select-control-border-style-default - Border style of the select control when not focused\n * @cssprop --wcs-select-control-border-style-focus - Border style of the select control when focused\n * @cssprop --wcs-select-control-border-style-error - Border style of the select control when error\n * \n * @cssprop --wcs-select-control-chips-gap - Gap between chips (only in multiple mode)\n *\n * @cssprop --wcs-select-control-height-m - Height of the select control in medium size\n * @cssprop --wcs-select-control-height-l - Height of the select control in large size\n * \n * @cssprop --wcs-select-control-autocomplete-padding-vertical-m - Padding vertical (top - bottom) of the select control in size m\n * @cssprop --wcs-select-control-autocomplete-padding-vertical-l - Padding vertical (top - bottom) of the select control in size l\n * @cssprop --wcs-select-control-padding-horizontal-m - Padding horizontal (left - right) in medium size\n * @cssprop --wcs-select-control-padding-horizontal-l - Padding horizontal (left - right) in large size\n * \n * @cssprop --wcs-select-control-font-size-m - Font size of the select in size m\n * @cssprop --wcs-select-control-font-size-l - Font size of the select in size m\n * \n * \n * @cssprop --wcs-select-control-chip-color-default - Color default of the select chip\n * @cssprop --wcs-select-control-chip-color-disabled - Color disabled of the select chip\n * @cssprop --wcs-select-control-chip-background-color-default - Background color default of the select chip\n * @cssprop --wcs-select-control-chip-background-color-disabled - Disabled background color of the select chip\n * @cssprop --wcs-select-control-chip-padding-vertical - Padding vertical (top - bottom) of the select chip\n * @cssprop --wcs-select-control-chip-padding-horizontal - Padding horizontal (left - right) of the select chip\n * @cssprop --wcs-select-control-chip-line-height - Line height of the select chip\n * @cssprop --wcs-select-control-chip-border-radius - Border radius of the select chip\n * \n * @cssprop --wcs-select-overlay-max-height - Max height of the select overlay\n * @cssprop --wcs-select-overlay-background-color - Background color of the select overlay\n * @cssprop --wcs-select-overlay-border-width - Border width of the select overlay\n * @cssprop --wcs-select-overlay-border-color - Border color of the select overlay\n * @cssprop --wcs-select-overlay-border-radius - Border radius of the overlay\n */\n@Component({\n tag: 'wcs-select',\n styleUrl: 'select.scss',\n shadow: true\n})\nexport class Select implements ComponentInterface, MutableAriaAttribute {\n @Element() private el!: HTMLWcsSelectElement;\n private inheritedAttributes: { [k: string]: any } = {};\n \n private stateService!: Interpreter<any, SelectStateSchema, SelectEvent>;\n\n private selectId = `wcs-select-${selectIds++}`;\n private labelElement: HTMLWcsLabelElement;\n private optionsEl!: HTMLDivElement;\n private optionsId = generateUniqueId(\"OPTIONS\");\n private controlEl!: HTMLDivElement;\n\n // Only used for multiples.\n private values: SelectOptionValue[];\n\n /**\n * This attribute mutate when a new option is selected OR unselected\n * @private\n */\n private lastModifiedOptionElement: HTMLWcsSelectOptionElement | null;\n /**\n * It serves for accessibility feature: keyboard navigation. It serves to focus the option if defined when the select\n * is opened based on which key pressed.\n *\n * When the select is <b>opened</b> user can navigate through options with keyboard:\n *\n * - Arrow right | down: `lastFocusedOptionElement` equals to the next option of `lastFocusedOptionElement` or\n * the first if `lastFocusedOptionElement` is not defined\n * - Arrow left | top: `lastFocusedOptionElement` equals to the previous enabled option of `lastFocusedOptionElement`\n * or the first if `lastFocusedOptionElement` is not defined\n * - Page up: `lastFocusedOptionElement` equals to the first enabled option\n * - Page down: `lastFocusedOptionElement` equals to the last enabled option\n * @private\n */\n private lastFocusedOptionElement: HTMLWcsSelectOptionElement | null;\n\n // Only used for autocomplete.\n private lastHighlightedOptionElement: HTMLWcsSelectOptionElement | null;\n private autocompleteInput: HTMLInputElement;\n\n /** Whether the select is expanded */\n @State()\n private expanded: boolean = false;\n\n /**\n * Specify the size (height) of the select.\n */\n @Prop({reflect: true}) size: WcsSelectSize = 'm';\n\n /** Text to display for the selected option, when no option is selected, the value is undefined. */\n @State()\n private displayText: string;\n\n /** When the host is focused. */\n @State()\n // @ts-ignore\n private focused: boolean;\n\n /** The currently selected value. */\n @Prop({mutable: true})\n value?: any | null;\n\n /** The text to display when the select is empty. */\n @Prop({mutable: true, reflect: true})\n placeholder?: string | null;\n\n /** If `true`, the user cannot interact with the select. */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop({ reflect: true })\n required: boolean = false;\n\n /** If `true`, the user can select multiple values at once. */\n @Prop({ reflect: true })\n multiple: boolean = false;\n\n /** If `true`, the select acts as an autocomplete field to filter your results. */\n @Prop({ reflect: true })\n autocomplete: boolean = false;\n\n /**\n * **Only works with `autocomplete` mode.** \n * If `true`, the server mode disables the client-side filtering on your select and allows you to handle\n * which options should be present in your DOM.\n */\n @Prop({ reflect: true })\n serverMode: boolean = false;\n\n /**\n * **Only works with `autocomplete` mode.** \n * Customizable sort function to change the comparison of values. If not provided, uses the default behavior :\n * `option.textContent.toLowerCase().startsWith(filter.toLowerCase())`\n */\n @Prop({attribute: null}) filterFn: WcsSelectFilterFn;\n\n /** If `true`, selected items are shown in chips mode. */\n @Prop({ reflect: true })\n chips: boolean = false;\n\n /** The name of the control, which is submitted with the form data. */\n @Prop()\n name?: string;\n\n /** Function used to compare options, default : deep comparison. */\n @Prop()\n compareWith?: (optionValue: any, selectedValue: any) => boolean = (optionValue, selectedValue) => isEqual(optionValue, selectedValue);\n\n private popper: Instance;\n\n /**\n * Boolean to toggle the text \"No result found\" (only for autocomplete with filter)\n * @private\n */\n @State() private showNoResultFoundLabel: boolean = false;\n\n /**\n * Value of the autocomplete input field\n * @private\n */\n @State() private autocompleteValue = undefined;\n\n @State() private overlayDirection: 'bottom' | 'top' = 'bottom';\n\n /** Emitted when the value has changed. */\n @Event() wcsChange!: EventEmitter<SelectChangeEventDetail>;\n\n /** Emitted when the select has focus. */\n @Event() wcsFocus!: EventEmitter<FocusEvent>;\n\n /** Emitted when the select loses focus. */\n @Event() wcsBlur!: EventEmitter<FocusEvent>;\n\n /** Emitted when the autocomplete filter has changed. */\n @Event() wcsFilterChange!: EventEmitter<SelectFilterChangeEventDetail>;\n\n /** Open the component. */\n @Method()\n async open() {\n this.stateService.send('OPEN');\n }\n\n /** Close the component. */\n @Method()\n async close() {\n this.stateService.send('CLOSE');\n }\n\n @Watch('value')\n onValueChangeHandler(newValue: any) {\n this.updateSelectedValue(newValue);\n }\n\n /**\n * Updates the selected value(s) of the component and manages the internal state accordingly\n *\n * @param value - The value(s) to be selected in the component\n * For single selection mode: any value that matches an option's value\n * For multiple selection mode: a single value or an array of values\n * @param resetIfNoValue - When true and no value is provided, the select component will be reset\n * Defaults to true\n */\n private updateSelectedValue(value: any, resetIfNoValue = true, shouldEmitFilterChangeEvent = true) {\n // If no value is passed, the select is reset.\n if (!value && resetIfNoValue) {\n this.reset();\n }\n if (this.multiple) {\n // If user don't give an array, we provide one\n if (!Array.isArray(value)) {\n value = [value];\n }\n\n // We assume that the last modified option in multiple mode is the last one in the array\n this.lastModifiedOptionElement = value.length > 0 ? Array.from(this.options).find(opt => this.compareWith(opt.value, value[value.length - 1])) ?? null : null;\n\n if (this.serverMode) {\n // in server mode, we don't know all the possible select options, so we assume the value is correct,\n // and we just sync the displayText and current available options\n const compareResult = compareLists(this.values.map(v => v.value), value, this.compareWith);\n compareResult.added.forEach(addedOption => {\n const option = Array.from(this.options).find(opt => this.compareWith(opt.value, addedOption)); \n if (option) {\n this.values.push({\n value: option.value,\n displayText: option.innerText,\n chipColor: option.chipColor,\n chipBackgroundColor: option.chipBackgroundColor\n });\n option.selected = true;\n }\n });\n\n\n // We update the selected options when the slot changes to keep the selected options in sync with the current value\n compareResult.kept.forEach((keptOption: string) => {\n const option = Array.from(this.options).find(opt => this.compareWith(opt.value, keptOption));\n if (option) {\n option.selected = true;\n }\n\n })\n \n compareResult.removed.forEach(removedOption => {\n this.values = this.values.filter(v => !this.compareWith(v.value, removedOption));\n const removedOptionElement = Array.from(this.options).find(opt => this.compareWith(opt.value, removedOption));\n if (removedOptionElement) {\n removedOptionElement.selected = false;\n }\n });\n } else {\n this.values = [];\n \n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n const isSelected = value ?\n value.findIndex(v => this.compareWith(opt.value, v)) !== -1\n : false;\n if (isSelected) {\n this.values.push({\n value: opt.value,\n displayText: opt.innerText,\n chipColor: opt.chipColor,\n chipBackgroundColor: opt.chipBackgroundColor\n });\n }\n opt.selected = isSelected;\n });\n }\n // update select placeholder text\n this.displayText = this.values.length !== 0\n ? this.values.map(v => v.displayText).join(', ')\n : undefined;\n } else {\n let hasFoundCurrentValueInOptionList = false;\n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n const isSelected = this.compareWith(opt.value, value);\n if (isSelected) {\n hasFoundCurrentValueInOptionList = true;\n this.displayText = opt.innerText;\n this.lastModifiedOptionElement = opt;\n if (this.autocomplete) {\n this.setAutocompleteValue(opt.innerText, false, false, shouldEmitFilterChangeEvent);\n }\n }\n opt.selected = isSelected;\n });\n // we are in server mode and the current select value hasn't been found, we set the AutocompleteValue (filter) to undefined\n // This is important to preserve the same state logic as when a value change and we set the filter to that value\n // Not doing that implies the displayText is not updated because of the check in le slot change handler\n if (this.serverMode && !hasFoundCurrentValueInOptionList) {\n this.setAutocompleteValue('', false, false, shouldEmitFilterChangeEvent);\n this.displayText = '';\n }\n }\n }\n\n\n /**\n * Reset the select: unselects all options for multiple mode and displays the placeholder\n * @private\n */\n private reset() {\n this.values = [];\n this.displayText = undefined;\n if (this.autocomplete) {\n // When need to reset the internal filter state of the component as the mutation of \n // autocompleteValue from the code doesn't call onAutocompleteInputEvent method.\n this.setAutocompleteValue('', true);\n }\n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n opt.selected = false;\n });\n }\n\n componentDidLoad() {\n this.optionsEl = this.el.shadowRoot.querySelector('.wcs-select-options');\n this.controlEl = this.el.shadowRoot.querySelector('.wcs-select-control');\n\n const stateMachine = Machine(\n SELECT_MACHINE_CONFIG,\n this.initMachineOptions()\n );\n // FIXME: type checking failed...\n // @ts-ignore\n this.stateService = interpret(stateMachine);\n\n if (this.multiple) {\n this.values = [];\n }\n\n this.stateService.start();\n if (this.optionsEl.querySelector('slot') === null) {\n this.replaceOptions_firefoxBefore63();\n this.listenDomUpdate_firefoxBefore63();\n }\n\n if (this.value !== undefined) {\n this.updateSelectedValue(this.value);\n }\n\n this.popper = this.createPopperInstance();\n\n // if the select is inside a wcs-form-field, we set an id to the wcs-label if present\n // the wcs-label element reference is kept to compute aria-label value during the rendering\n this.labelElement = findItemLabel(this.el);\n if (this.labelElement) {\n this.labelElement.id = this.selectId + \"-lbl\";\n }\n }\n\n private createPopperInstance() {\n return createPopper(this.controlEl, this.optionsEl, {\n placement: \"bottom\",\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 4] // we want 4px between select control and select options\n }\n }\n ]\n });\n }\n\n private emitChange(newValue: any): void {\n this.wcsChange.emit({\n value: newValue\n });\n }\n\n private replaceOptions_firefoxBefore63() {\n Array.from(this.el.querySelectorAll('wcs-select-option'))\n .forEach(option => {\n if (option.parentNode === this.el) {\n this.el.removeChild(option);\n this.optionsEl.appendChild(option);\n }\n });\n }\n\n private listenDomUpdate_firefoxBefore63() {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n this.replaceOptions_firefoxBefore63();\n }\n }\n });\n observer.observe(this.el, {childList: true});\n }\n \n componentWillRender(): Promise<void> | void {\n if (this.multiple) {\n this.options\n .forEach((opt: HTMLWcsSelectOptionElement) => opt.multiple = true);\n }\n }\n\n componentWillLoad(): Promise<void> | void {\n if (!isWcsSelectSize(this.size)) {\n console.warn(`Invalid size value for wcs-select : \"${this.size}\". Must be one of \"${WcsSelectSizeValue.join(', ')}\"`);\n this.size = \"m\"; // Default fallback value\n }\n \n // XXX : special case on this component for attribute inheritance\n // We only move attributes on the native input when autocomplete is true.\n // Otherwise, all attributes are on the Host, so we do not need to inherit those.\n if (this.autocomplete) {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el, SELECT_INHERITED_ATTRS),\n };\n }\n }\n\n @Method()\n async setAriaAttribute(attr: AriaAttributeName, value: string | null | undefined) {\n if(this.autocomplete === false) {\n setOrRemoveAttribute(this.el, attr, value);\n } else {\n setOrRemoveAttribute(this.autocompleteInput, attr, value);\n }\n }\n\n private get options(): HTMLWcsSelectOptionElement[] {\n const opts = this.el?.querySelectorAll('wcs-select-option');\n if (opts && opts.length !== 0) {\n return opts as any as HTMLWcsSelectOptionElement[];\n }\n return [];\n }\n\n private get notDisabledOptions(): HTMLWcsSelectOptionElement[] {\n const opts = this.el?.querySelectorAll('wcs-select-option:not([disabled]):not([aria-hidden])');\n if (opts && opts.length !== 0) {\n return opts as any as HTMLWcsSelectOptionElement[];\n }\n return [];\n }\n\n private initMachineOptions(): Partial<MachineOptions<any, SelectEvent>> {\n return {\n actions: {\n open: () => {\n if (!this.disabled) {\n this.expanded = true;\n this.focused = false;\n if(this.multiple === false && this.autocomplete && this.hasValue === false) {\n // If we open the select in single autocomplete mode, we update the autocomplete value at \n // the blur event so that the displayed value reflect the current select value. \n // Indeed, we have to tell the component to take the current filter state manually at the \n // opening (because the input event of the autocomplete field is not fired at this point).\n if (this.autocompleteValue && this.autocompleteValue !== '') {\n this.setAutocompleteValue(this.autocompleteValue);\n }\n }\n this.clearHighlightOnLastHighlightedOption();\n if (this.notDisabledOptions.length > 0) {\n this.lastFocusedOptionElement = this.lastModifiedOptionElement ?? this.notDisabledOptions[0];\n requestAnimationFrame(() => {\n this.autocomplete\n ? this.autocompleteInput?.focus()\n : this.lastFocusedOptionElement?.focus();\n });\n }\n }\n },\n close: (_, event: SelectEvent) => {\n if (event.type === 'CLOSE') {\n this.clearHighlightOnLastHighlightedOption();\n if (event.value?.shouldBlur) {\n this.focused = false;\n } else {\n if (this.autocomplete && event.value?.fromKeyboard) {\n // If we're in autocomplete mode, a keyboard event (e.g. escape) doesn't change the \n // focus (so this.el.focus() aren't called because the select was already focused)\n // but you still have to go back to the autocomplete input.\n this.focusAutocompleteInput();\n } else {\n // Otherwise, we focus the select element\n this.el.focus();\n }\n this.focused = true;\n }\n\n if (this.autocomplete && this.displayText && this.multiple === false) {\n this.setAutocompleteValue(this.displayText);\n }\n }\n this.expanded = false;\n },\n selectOption: (_, event) => {\n if (event.type === 'OPTION_SELECTED') {\n if (this.multiple) {\n this.handleOptionSelectedOnMultiple(event.value.option);\n } else {\n this.handleOptionSelectedOnSingle(event.value.option);\n this.stateService.send('CLOSE', {value: {fromKeyboard: event.value.fromKeyboard}});\n }\n\n if (this.autocomplete) {\n if (this.multiple) {\n requestAnimationFrame(() => {\n this.autocompleteInput.focus();\n })\n } else {\n // Emit the filter change immediately so that server-side filtering can refresh options.\n this.setAutocompleteValue(event.value.option.displayText);\n }\n }\n this.emitChange(this.value);\n }\n }\n },\n guards: {\n enabled: () => !this.disabled\n }\n };\n }\n\n private handleOptionSelectedOnMultiple(event: SelectOptionChosedEvent) {\n const index = this.values.findIndex(v => this.compareWith(v.value, event.value));\n if (index === -1) {\n // this will trigger the watch on value and update the values model\n this.value = [...this.values.map(v => v.value), event.value];\n } else {\n // this will trigger the watch on value and update the values model\n this.value = this.values.filter(v => !this.compareWith(v.value, event.value)).map(v => v.value);\n }\n }\n\n private handleOptionSelectedOnSingle(event: SelectOptionChosedEvent) {\n this.value = event.value;\n }\n\n disconnectedCallback() {\n this.stateService?.stop();\n }\n\n private get hasValue(): boolean {\n // TODO: change this behavior.\n return this.displayText !== undefined;\n }\n\n @Listen('mouseup')\n onMouseUp(event: MouseEvent) {\n const clickOnScroll = isElement(event.target)\n && (event.offsetX > event.target.clientWidth\n || event.offsetY > event.target.clientHeight // If the click il located bellow the component height the click happen in the overlay\n || event.offsetY < 0); // If the click is made above the component\n\n const clickOnRemoveChip = event.composedPath()\n .filter(x => {\n const el = (x as HTMLElement);\n return el.nodeName === 'svg' && el.classList.contains('chip');\n })\n .length > 0;\n\n if (!clickOnScroll && !clickOnRemoveChip) {\n this.stateService.send('CLICK');\n }\n }\n\n @Listen('click', {target: 'window'})\n onWindowClickEvent(event: MouseEvent) {\n const firstSelectInEventPath = event.composedPath().filter(x => (x as HTMLElement).nodeName === 'WCS-SELECT')[0];\n const clickOnCurrentSelect = firstSelectInEventPath === this.el;\n // TODO: Move this logic in the state machine\n // FIXME: Doesnt work with single + disabled option\n if (this.expanded && !clickOnCurrentSelect) {\n this.stateService.send({type: 'CLOSE', value: {shouldBlur: true, fromKeyboard: false}});\n }\n }\n\n @Listen('keydown')\n onKeyDown(_event: KeyboardEvent) {\n const currentState = this.stateService.getSnapshot().matches(\"closed\") ? 'closed' : 'opened';\n let type: 'autocomplete_unique' | 'autocomplete_multiple' | 'unique' | 'multiple';\n if (this.autocomplete) {\n type = this.multiple ? 'autocomplete_multiple' : 'autocomplete_unique';\n } else {\n type = this.multiple ? 'multiple' : 'unique';\n }\n const actionsFromKeyboardEvents: KeyboardEventAssociatedAction[] = getActionForKeyboardEvent(_event, currentState, type);\n \n // If we have at least one associated actions, we prevent the default behavior of the event. \n // Except if the action is a focus move (we have to handle the preventDefault behavior ourselves in the action implementation)\n if (actionsFromKeyboardEvents.length != 0 && actionsFromKeyboardEvents.filter(a => a.kind === 'MoveFocus').length === 0) {\n _event.preventDefault();\n }\n\n for (const actionFromKeyboardEvent of actionsFromKeyboardEvents) {\n this.doActionFromKeyboardEventAssociatedAction(actionFromKeyboardEvent, _event);\n }\n }\n\n doActionFromKeyboardEventAssociatedAction(actionFromKeyboardEvent: KeyboardEventAssociatedAction, event: KeyboardEvent) {\n switch (actionFromKeyboardEvent.kind) {\n case \"CloseSelect\":\n this.stateService.send({\n type: 'CLOSE',\n value: {shouldBlur: actionFromKeyboardEvent.shouldBlur, fromKeyboard: true}\n });\n break;\n case \"OpenSelect\":\n this.stateService.send('OPEN');\n break;\n case \"SelectOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.selectClosestOption('next');\n break;\n case \"previous\":\n this.selectClosestOption('previous');\n break;\n case \"first\":\n this.selectFirstOption();\n break;\n case \"last\":\n this.selectLastOption();\n break;\n case \"lastHighlighted\": {\n // We have to handle enterKey here because with autocomplete mode, a wcs-select-option\n // is only highlighted, therefore the event is not fired\n const indexToSelect = Array.from(this.notDisabledOptions).indexOf(this.lastHighlightedOptionElement);\n\n if (indexToSelect !== -1) {\n this.lastModifiedOptionElement = this.lastHighlightedOptionElement;\n this.selectOption(indexToSelect, true);\n }\n break;\n }\n }\n break;\n case \"ClearAutocompleteInput\":\n this.setAutocompleteValue('', false, false);\n break;\n case \"ClearHighlight\":\n this.clearHighlightOnLastHighlightedOption();\n break;\n case \"HighlightOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.highlightClosestOption('next');\n break;\n case \"previous\":\n this.highlightClosestOption('previous');\n break;\n case \"first\":\n this.highlightFirstOption();\n break;\n case \"last\":\n this.highlightLastOption();\n break;\n default:\n break;\n }\n break;\n case \"FocusOption\":\n switch (actionFromKeyboardEvent.target) {\n case \"next\":\n this.focusClosestOption('next');\n break;\n case \"previous\":\n this.focusClosestOption('previous')\n break;\n case \"first\":\n this.focusFirstOption()\n break;\n case \"last\":\n this.focusLastOption();\n break;\n case \"lastFocused\":\n if (this.lastFocusedOptionElement != null) {\n this.focusOption(Array.from(this.notDisabledOptions).indexOf(this.lastFocusedOptionElement));\n }\n break;\n default:\n break;\n }\n break;\n case \"MoveFocus\":\n switch (actionFromKeyboardEvent.target) {\n case \"previous\": {\n let elementToFocus: Element = this.el.previousElementSibling ?? this.el.parentElement;\n while (elementToFocus) {\n if (isFocusable(elementToFocus)) break;\n elementToFocus = elementToFocus.previousElementSibling ?? elementToFocus.parentElement;\n }\n if (elementToFocus) {\n event.preventDefault();\n (elementToFocus as HTMLElement).focus();\n }\n break;\n }\n default:\n break;\n }\n break;\n default:\n throw new Error(\"Internal error\");\n }\n }\n\n private getClosestActiveOptionIndexForState(direction: 'next' | 'previous', state: 'highlighted' | 'focused' | 'modified'): number | 'nothing' {\n let concernedOption: HTMLWcsSelectOptionElement | null;\n switch (state) {\n case 'focused':\n concernedOption = this.lastFocusedOptionElement;\n break;\n case 'modified':\n concernedOption = this.lastModifiedOptionElement;\n break;\n case 'highlighted':\n concernedOption = this.lastHighlightedOptionElement;\n break;\n default:\n concernedOption = null;\n }\n let currentIndex = Array.from(this.notDisabledOptions).indexOf(concernedOption);\n\n const MIN_INDEX = 0;\n const MAX_INDEX = this.notDisabledOptions.length - 1;\n\n if (direction === 'next' && currentIndex < MAX_INDEX) {\n currentIndex++;\n } else if (direction === 'previous' && currentIndex > MIN_INDEX) {\n currentIndex--;\n } else {\n if (!this.autocomplete)\n return 'nothing';\n\n // Used to scroll options infinitely with keyboard (autocomplete mode only)\n if (direction === 'next' && currentIndex >= MAX_INDEX) {\n currentIndex = 0;\n }\n if (direction === 'previous' && currentIndex === MIN_INDEX) {\n currentIndex = MAX_INDEX;\n }\n }\n return currentIndex;\n }\n\n /**\n * Selects the non-disabled option with the index passed as a parameter.\n * The method sends an event to the state machine (the same as when clicking on an option with the mouse)\n * @param indexToSelect Option index within non-deactivated options list\n * @param fromKeyboard\n * @private\n */\n private selectOption(indexToSelect: number, fromKeyboard = false) {\n const optionToSelect = this.notDisabledOptions[indexToSelect];\n\n if (!optionToSelect) return;\n\n this.sendOptionSelectedToStateMachine({\n source: optionToSelect,\n value: optionToSelect.value,\n displayText: optionToSelect.innerText\n }, fromKeyboard);\n }\n\n private selectClosestOption(direction: 'next' | 'previous'): void {\n const indexToSelect = this.getClosestActiveOptionIndexForState(direction, 'modified');\n if (indexToSelect === 'nothing') return;\n this.selectOption(indexToSelect, true);\n }\n\n private selectFirstOption() {\n if (this.notDisabledOptions.length < 1) {\n return;\n }\n\n this.selectOption(0, true);\n }\n\n private selectLastOption() {\n if (this.notDisabledOptions.length < 1) {\n return;\n }\n\n this.selectOption(this.notDisabledOptions.length - 1, true);\n }\n\n private focusOption(indexToFocus: number) {\n this.lastFocusedOptionElement = this.notDisabledOptions[indexToFocus];\n this.lastFocusedOptionElement?.focus();\n this.el.setAttribute(\"aria-activedescendant\", this.lastFocusedOptionElement.id);\n }\n\n private focusClosestOption(direction: 'next' | 'previous'): void {\n const indexToFocus = this.getClosestActiveOptionIndexForState(direction, 'focused');\n if (indexToFocus === 'nothing') return;\n\n this.focusOption(indexToFocus);\n }\n\n private focusFirstOption() {\n this.focusOption(0);\n }\n\n private focusLastOption() {\n this.focusOption(this.notDisabledOptions.length - 1);\n }\n\n @Listen('wcsSelectOptionClick')\n selectedOptionChanged(event: CustomEvent<SelectOptionChosedEvent>) {\n this.sendOptionSelectedToStateMachine(event.detail);\n }\n\n sendOptionSelectedToStateMachine(event: SelectOptionChosedEvent, fromKeyboard = false) {\n this.stateService.send({type: 'OPTION_SELECTED', value: {option: event, fromKeyboard}});\n }\n\n onSlotchange() {\n if (!this.serverMode || (this.autocomplete && this.displayText === this.autocompleteValue)) {\n // We call updateSelectedValue to update the selected options when the slot changes to keep the selected options in sync with the current value.\n // This also update the displayText value according to the options data.\n // Finally, this update the internal models for multiple mode and handle the server mode correctly.\n this.updateSelectedValue(this.value, false, false);\n } else {\n this.syncOptionsElementsStateWithCurrentSelectedValue();\n }\n\n // Server-mode only : \"no result\" slot should be visible dynamically if no option is present in the slot\n if (this.autocomplete && this.serverMode) {\n this.showNoResultFoundLabel = this.options.length < 1;\n }\n\n if (this.multiple) {\n this.options\n .forEach((opt: HTMLWcsSelectOptionElement) => opt.multiple = true);\n }\n }\n\n /**\n * This method only affect the option's selected state\n * \n * Set the selected state of each option to match the current selected value of the select\n */\n private syncOptionsElementsStateWithCurrentSelectedValue() {\n this.options.forEach((opt: HTMLWcsSelectOptionElement) => {\n const isSelected = this.compareWith(opt.value, this.value);\n opt.selected = isSelected;\n });\n }\n\n removeChip(v: SelectOptionValue) {\n this.options\n .forEach(opt => {\n if (opt.value === v.value) {\n this.sendOptionSelectedToStateMachine({\n ...v,\n source: opt\n });\n }\n });\n }\n\n //region Autocomplete mode\n\n private highlightOption(indexToHighlight: number) {\n this.clearHighlightOnLastHighlightedOption();\n this.lastHighlightedOptionElement = this.notDisabledOptions[indexToHighlight];\n if (this.lastHighlightedOptionElement) {\n this.lastHighlightedOptionElement.highlighted = true;\n this.autocompleteInput.setAttribute(\"aria-activedescendant\", this.lastHighlightedOptionElement.id);\n requestAnimationFrame(() => {\n this.lastHighlightedOptionElement.scrollIntoView({block: \"nearest\", inline: \"nearest\"});\n })\n }\n }\n\n private highlightFirstOption() {\n this.highlightOption(0);\n }\n\n private highlightLastOption() {\n this.highlightOption(this.notDisabledOptions.length - 1);\n }\n\n private highlightClosestOption(direction: 'next' | 'previous'): void {\n const indexToHighlight = this.getClosestActiveOptionIndexForState(direction, 'highlighted');\n if (indexToHighlight === 'nothing') return;\n\n this.highlightOption(indexToHighlight);\n }\n\n /**\n * This method removes the highlight that applies to the last highlighted option if any.\n * This is used only for accessibility of autocomplete mode.\n * @private\n */\n private clearHighlightOnLastHighlightedOption() {\n if (this.lastHighlightedOptionElement) {\n this.lastHighlightedOptionElement.highlighted = false;\n this.lastHighlightedOptionElement = null;\n }\n }\n\n private onAutocompleteInputEvent(e: InputEvent) {\n const filter = this.autocompleteInput.value ?? '';\n\n this.setAutocompleteValue(filter, false, true); // fromUserInteraction = true\n // Avoid the inputEvent event to bubble and be emitted, we rather use wcsFilterChange in this case :\n e.stopPropagation();\n\n }\n\n /**\n * Set the autocomplete value and open the select if needed.\n * @param filter - The new filter value\n * @param isReset - If true, the filter is reset and the select is closed\n * @param fromUserInteraction - If true, the change comes from user interaction (typing), if false it's programmatic\n * @param shouldEmitFilterChangeEvent\n * @private\n */\n private setAutocompleteValue(filter: string, isReset = false, fromUserInteraction = false, shouldEmitFilterChangeEvent = true): void {\n this.clearHighlightOnLastHighlightedOption();\n const newValueIsDifferentFromLastModifiedOption = this.lastModifiedOptionElement == null || this.lastModifiedOptionElement?.textContent !== this.autocompleteValue;\n // Only open the select automatically when the change comes from user interaction\n if (!this.expanded && newValueIsDifferentFromLastModifiedOption && !isReset && fromUserInteraction) {\n this.open(); \n }\n\n // Prevents client-side filtering logic from being applied when serverMode is enabled.\n if (!this.serverMode) {\n if (filter.length) {\n const [matchingOptions, optionsToHide] = [[], []];\n const filteringFunction: WcsSelectFilterFn = this.filterFn ?? WcsDefaultSelectFilterFn;\n this.options.forEach((optionEl: HTMLWcsSelectOptionElement) =>\n (filteringFunction(optionEl, filter) ? matchingOptions : optionsToHide).push(optionEl)\n );\n\n this.showNoResultFoundLabel = matchingOptions.length === 0;\n matchingOptions.forEach(o => {\n o.hidden = false;\n o.removeAttribute(\"aria-hidden\");\n });\n optionsToHide.forEach(o => {\n o.hidden = true;\n o.setAttribute(\"aria-hidden\", \"true\");\n });\n } else {\n this.showNoResultFoundLabel = false;\n this.options.forEach(o => {\n o.hidden = false;\n o.removeAttribute(\"aria-hidden\");\n });\n }\n }\n\n const newAutocompleteValue = filter ?? '';\n const valueHasChanged = this.autocompleteValue !== newAutocompleteValue;\n\n if (valueHasChanged) {\n this.autocompleteValue = newAutocompleteValue;\n }\n\n if (shouldEmitFilterChangeEvent && valueHasChanged) {\n this.wcsFilterChange.emit({\n value: filter,\n });\n }\n }\n\n @Listen('focus')\n onFocus(event: FocusEvent) {\n if (this.autocomplete) {\n this.focusAutocompleteInput();\n }\n this.wcsFocus.emit(event);\n }\n\n private focusAutocompleteInput(): void {\n this.autocompleteInput?.focus();\n }\n\n //endregion\n\n @Listen('blur', { capture: true })\n onBlur(event: FocusEvent) {\n // Avoid emitting a wcsBlur event when the relatedTarget of the blur event is a child or the select itself\n const target = event.relatedTarget as HTMLElement;\n if (this.el.contains(target)) {\n return;\n }\n \n this.wcsBlur.emit(event);\n }\n\n componentDidRender() {\n this.popper?.update();\n }\n\n private focusedAttributes() {\n return !this.disabled ? { tabIndex: 0 } : {};\n }\n\n render() {\n const ariaLabelValue = `${this.labelElement ? this.labelElement.innerText : ''} ${this.hasValue ? this.displayText : ''}`.trimEnd();\n const noResultContainerId = 'no-result-container';\n \n return (\n <Host class={this.expanded ? 'expanded ' : ''}\n overlayDirection={this.overlayDirection}\n {...this.focusedAttributes()}\n role={!this.autocomplete ? \"combobox\" : null}\n aria-haspopup={!this.autocomplete ? \"listbox\" : null}\n aria-owns={!this.autocomplete ? this.optionsId : null}\n aria-controls={!this.autocomplete ? this.optionsId : null}\n aria-disabled={!this.autocomplete ? (this.disabled ? 'true' : null) : null}\n aria-required={!this.autocomplete ? (this.required ? 'true' : 'false') : null}\n aria-expanded={!this.autocomplete ? (this.expanded ? 'true' : 'false') : null}\n aria-multiselectable={!this.autocomplete ? (this.multiple ? 'true' : 'false') : null}\n aria-label={!this.autocomplete ? ariaLabelValue : null}>\n <div class=\"wcs-select-control\">\n <div class=\"wcs-select-value-container\">\n {this.hasValue\n ?\n (this.chips ?\n this.values.map((option: SelectOptionValue) =>\n <SelectChips disabled={this.disabled} option={option}\n onRemove={this.removeChip.bind(this)}/>\n )\n : (!this.autocomplete || this.autocomplete && this.multiple) &&\n <label class=\"wcs-select-value\">{this.displayText}</label>)\n : !this.autocomplete && <label class=\"wcs-select-placeholder\">{this.placeholder}</label>\n }\n {this.autocomplete && <input class=\"autocomplete-field\"\n value={this.autocompleteValue}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-label={ariaLabelValue}\n aria-describedby={noResultContainerId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-expanded={this.expanded ? 'true' : 'false'}\n aria-controls={this.optionsId}\n aria-owns={this.optionsId}\n aria-multiselectable={this.multiple ? 'true' : 'false'}\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n disabled={this.disabled}\n required={this.required}\n placeholder={this.values?.length ? null : this.placeholder}\n onInput={(e) => this.onAutocompleteInputEvent(e)}\n ref={el => this.autocompleteInput = el}\n {...this.inheritedAttributes}/>\n }\n </div>\n <SelectArrow up={this.expanded}/>\n </div>\n <div class=\"wcs-select-options\" id={this.optionsId} role=\"listbox\">\n <slot name=\"options\" onSlotchange={this.onSlotchange.bind(this)}/>\n {(this.autocomplete && this.showNoResultFoundLabel) &&\n <div role=\"alert\" id={noResultContainerId} class=\"noresult-container\">\n <slot name=\"filter-no-result\">\n <span>Aucun résultat</span>\n </slot>\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n\nlet selectIds = 0;\n"]}
|
|
@@ -35,7 +35,6 @@ import { isEnterKey, generateUniqueId, isSpaceKey } from "../../utils/helpers";
|
|
|
35
35
|
*/
|
|
36
36
|
export class SelectOption {
|
|
37
37
|
constructor() {
|
|
38
|
-
this.selectOptionId = generateUniqueId(this.el.tagName);
|
|
39
38
|
this.disabled = false;
|
|
40
39
|
this.selected = false;
|
|
41
40
|
this.highlighted = false;
|
|
@@ -45,6 +44,7 @@ export class SelectOption {
|
|
|
45
44
|
this.multiple = false;
|
|
46
45
|
}
|
|
47
46
|
componentWillLoad() {
|
|
47
|
+
this.selectOptionId = generateUniqueId(this.el.tagName);
|
|
48
48
|
if (this.value === undefined) {
|
|
49
49
|
// If no value was given we use the text content instead.
|
|
50
50
|
this.value = this.el.innerText || '';
|
|
@@ -77,8 +77,8 @@ export class SelectOption {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
render() {
|
|
80
|
-
return (h(Host, { key: '
|
|
81
|
-
h("wcs-checkbox", { key: '
|
|
80
|
+
return (h(Host, { key: '18a9f541ccf9757c1b4e9005ecd9ca98f40ced22', id: this.selectOptionId, "aria-selected": this.selected || this.highlighted ? 'true' : 'false', slot: "options", role: "option", tabindex: "-1" }, this.multiple &&
|
|
81
|
+
h("wcs-checkbox", { key: 'aa89dc61bd7ddabf6efdf1f7b5fc6bc024f91ffd', tabindex: "-1", checked: this.selected, disabled: this.disabled }), h("slot", { key: 'fc59a661788d75fd7f172e8ef13f7360c2540552' })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "wcs-select-option"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-option.js","sourceRoot":"","sources":["../../../src/components/select-option/select-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAoC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEnH,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAC,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AC;IAED;;;OAGG;IAEH,aAAa,CAAC,KAAoB;QAC9B,IAAG,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YACzB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QAC5B,CAAC;IACL,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,cAAc,mBAAiB,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAC,IAAI;YACzI,IAAI,CAAC,QAAQ;gBACV,qEAAc,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAiB;YAEhG,8DAAQ,CACL,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Element, Event, Prop, EventEmitter, ComponentInterface, h, Host, Listen } from '@stencil/core';\nimport { SelectOptionChosedEvent } from './select-option-interface';\nimport {isEnterKey, generateUniqueId, isSpaceKey} from \"../../utils/helpers\";\n\n/**\n * The select option is a subcomponent of `wcs-select` that represents a single option in a select list.\n * \n * @cssprop --wcs-select-option-background-color-default - Default background color of the option\n * @cssprop --wcs-select-option-background-color-hover - Background color of the option when hovered\n * @cssprop --wcs-select-option-background-color-press - Background color of the option when pressed\n * @cssprop --wcs-select-option-background-color-selected - Background color of the option when selected\n * @cssprop --wcs-select-option-background-color-selected-hover - Background color of the option when selected and hovered\n * @cssprop --wcs-select-option-background-color-selected-press - Background color of the option when selected and pressed\n * @cssprop --wcs-select-option-background-color-selected-disabled - Background color of the option when selected and disabled\n * @cssprop --wcs-select-option-background-color-focus - Background color of the option when focused\n * \n * @cssprop --wcs-select-option-border-color-focus - Border color for autocomplete mode\n * @cssprop --wcs-select-option-border-width-focus - Border width for autocomplete mode\n * @cssprop --wcs-select-option-border-style-focus - Border style of the option when focused\n * \n * @cssprop --wcs-select-option-height - Height of the option\n * @cssprop --wcs-select-option-padding-horizontal - Horizontal padding of the option\n * @cssprop --wcs-select-option-padding-vertical - Vertical padding of the option\n * \n * @cssprop --wcs-select-option-text-font-size - Font size of the option text\n * @cssprop --wcs-select-option-text-font-weight - Font weight of the option text\n * @cssprop --wcs-select-option-text-color-default - Default color of the option text\n * @cssprop --wcs-select-option-text-color-focus - Color of the option text when focused\n * @cssprop --wcs-select-option-text-color-hover - Color of the option text when hovered\n * @cssprop --wcs-select-option-text-color-selected - Color of the option text when selected\n * @cssprop --wcs-select-option-text-color-disabled - Color of the option text when disabled\n * \n * @cssprop --wcs-select-option-checkbox-color - Color of the checkbox\n * \n * @cssprop --wcs-select-option-gap - Gap between the checkbox and the text\n * @cssprop --wcs-select-option-transition-duration - Duration of the transition\n */\n@Component({\n tag: 'wcs-select-option',\n styleUrl: 'select-option.scss'\n})\nexport class SelectOption implements ComponentInterface {\n @Element() private el!: HTMLWcsSelectOptionElement;\n private selectOptionId: string;\n\n /** Whether this option can be selected. */\n @Prop({ mutable: true, reflect: true }) disabled: boolean = false;\n\n /** Whether this option is selected. */\n @Prop({ mutable: true, reflect: true }) selected: boolean = false;\n \n /** This property mustn't be set by hand, it is used by the `wcs-select` component.\n * Applies a highlight design on the option for autocomplete mode.\n * @internal\n * @ignore\n */\n @Prop({ mutable: true, reflect: true }) highlighted: boolean = false;\n\n /** The option value, not what's displayed, use inner text instead. */\n @Prop() value?: any;\n\n /** Chip's displayed text color. */\n @Prop() chipColor?: string;\n\n /** Chip's background color. */\n @Prop() chipBackgroundColor?: string;\n\n /**\n * This property mustn't be set by hand, it is used by the `wcs-select` component.\n * If you want a multiple select, set `multiple` attribute on the parent select instead.\n * @internal\n * @ignore\n */\n @Prop({ reflect: true, mutable: true }) multiple: boolean = false;\n\n @Event({\n eventName: 'wcsSelectOptionClick',\n })\n // TODO: find a better name ?\n wcsSelectOptionClick: EventEmitter<SelectOptionChosedEvent>;\n\n componentWillLoad() {\n this.selectOptionId = generateUniqueId(this.el.tagName);\n\n if (this.value === undefined) {\n // If no value was given we use the text content instead.\n this.value = this.el.innerText || '';\n }\n }\n\n private chooseOption(event: UIEvent) {\n if (!this.disabled) {\n event.stopPropagation();\n // We select inner HTML as it's what's passed into the slot.\n const displayText = this.el.innerText;\n this.wcsSelectOptionClick.emit({\n source: this.el,\n value: this.value,\n displayText\n });\n }\n }\n\n @Listen('mouseup')\n onMouseUp(event: MouseEvent) {\n this.chooseOption(event);\n }\n\n /**\n * Handles the keydown event to update the selection.\n * @param event keyboard event\n */\n @Listen('keydown')\n handleKeydown(event: KeyboardEvent) {\n if(isEnterKey(event) || isSpaceKey(event)) {\n this.chooseOption(event);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n render() {\n return (\n <Host id={this.selectOptionId} aria-selected={this.selected || this.highlighted ? 'true' : 'false'} slot=\"options\" role=\"option\" tabindex=\"-1\">\n {this.multiple &&\n <wcs-checkbox tabindex=\"-1\" checked={this.selected} disabled={this.disabled}></wcs-checkbox>\n }\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { setWcsContent } from "../../utils/playwright/test";
|
|
2
|
+
import { test } from "@stencil/playwright";
|
|
3
|
+
import { expect } from "@playwright/test";
|
|
4
|
+
test.describe('Switch component', () => {
|
|
5
|
+
test.describe('Events', () => {
|
|
6
|
+
test('should emit a wcsChange event when clicked on wcs-switch', async ({ page }) => {
|
|
7
|
+
// Given
|
|
8
|
+
await setWcsContent(page, `
|
|
9
|
+
<wcs-switch name="switch-id">
|
|
10
|
+
Switch
|
|
11
|
+
</wcs-switch>
|
|
12
|
+
`);
|
|
13
|
+
const switchElement = page.locator('wcs-switch');
|
|
14
|
+
const changeSpy = await page.spyOnEvent('wcsChange');
|
|
15
|
+
// When
|
|
16
|
+
await switchElement.click();
|
|
17
|
+
await page.waitForChanges();
|
|
18
|
+
// Then
|
|
19
|
+
expect(changeSpy).toHaveReceivedEventTimes(1);
|
|
20
|
+
expect(changeSpy).toHaveReceivedEventDetail({ checked: true });
|
|
21
|
+
});
|
|
22
|
+
test('should emit a wcsChange event when space pressed on wcs-switch', async ({ page }) => {
|
|
23
|
+
// Given
|
|
24
|
+
await setWcsContent(page, `
|
|
25
|
+
<wcs-switch name="switch-id">
|
|
26
|
+
Switch
|
|
27
|
+
</wcs-switch>
|
|
28
|
+
`);
|
|
29
|
+
const switchElement = page.locator('wcs-switch');
|
|
30
|
+
const changeSpy = await page.spyOnEvent('wcsChange');
|
|
31
|
+
// When
|
|
32
|
+
await switchElement.press('Space');
|
|
33
|
+
await page.waitForChanges();
|
|
34
|
+
// Then
|
|
35
|
+
expect(changeSpy).toHaveReceivedEventTimes(1);
|
|
36
|
+
expect(changeSpy).toHaveReceivedEventDetail({ checked: true });
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=switch.e2e.playwright.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.e2e.playwright.js","sourceRoot":"","sources":["../../../src/components/switch/switch.e2e.playwright.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAW,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CA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OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { setWcsContent } from '../../utils/playwright/test';\nimport { test, E2EPage } from \"@stencil/playwright\";\n\nimport { expect } from \"@playwright/test\";\n\ntest.describe('Switch component', () => {\n test.describe('Events', () => {\n test('should emit a wcsChange event when clicked on wcs-switch', async ({ page }: { page: E2EPage }) => {\n // Given\n await setWcsContent(page, `\n <wcs-switch name=\"switch-id\">\n Switch\n </wcs-switch>\n `);\n\n const switchElement = page.locator('wcs-switch');\n\n const changeSpy = await page.spyOnEvent('wcsChange');\n\n // When\n await switchElement.click();\n await page.waitForChanges();\n\n // Then\n expect(changeSpy).toHaveReceivedEventTimes(1);\n expect(changeSpy).toHaveReceivedEventDetail({ checked: true });\n });\n\n test('should emit a wcsChange event when space pressed on wcs-switch', async ({ page }: { page: E2EPage }) => {\n // Given\n await setWcsContent(page, `\n <wcs-switch name=\"switch-id\">\n Switch\n </wcs-switch>\n `);\n\n const switchElement = page.locator('wcs-switch');\n\n const changeSpy = await page.spyOnEvent('wcsChange');\n\n // When\n await switchElement.press('Space');\n await page.waitForChanges();\n\n // Then\n expect(changeSpy).toHaveReceivedEventTimes(1);\n expect(changeSpy).toHaveReceivedEventDetail({ checked: true });\n });\n });\n});\n"]}
|
|
@@ -252,7 +252,7 @@ export class Switch {
|
|
|
252
252
|
"signature": "(attr: AriaAttributeName, value: string | null | undefined) => Promise<void>",
|
|
253
253
|
"parameters": [{
|
|
254
254
|
"name": "attr",
|
|
255
|
-
"type": "
|
|
255
|
+
"type": "`aria-${string}` | \"role\"",
|
|
256
256
|
"docs": ""
|
|
257
257
|
}, {
|
|
258
258
|
"name": "value",
|