@empathyco/x-components 3.0.0-alpha.19 → 3.0.0-alpha.23
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/CHANGELOG.md +50 -0
- package/core/index.js +3 -1
- package/core/index.js.map +1 -1
- package/design-system/base.css +4 -1
- package/design-system/button-secondary.css +1 -1
- package/design-system/default-theme.css +97 -42
- package/design-system/dropdown-default.css +68 -33
- package/design-system/dropdown-l.css +1 -1
- package/design-system/dropdown-m.css +1 -1
- package/design-system/dropdown-s.css +1 -1
- package/design-system/dropdown-xl.css +1 -1
- package/design-system/full-theme.css +2521 -129
- package/design-system/list-default.css +5 -0
- package/design-system/list-gap.css +121 -1
- package/design-system/list-padding.css +105 -1
- package/design-system/row-padding.css +2 -0
- package/design-system/utilities-background-color.css +20 -0
- package/design-system/utilities-border-color.css +20 -0
- package/design-system/utilities-border-radius.css +981 -0
- package/design-system/utilities-border-width.css +333 -0
- package/design-system/utilities-box-shadow.css +68 -0
- package/design-system/utilities-font-color.css +20 -0
- package/design-system/utilities-margin.css +380 -0
- package/design-system/utilities-padding.css +380 -0
- package/docs/API-reference/api/x-adapter.empathydirect.md +0 -1
- package/docs/API-reference/api/x-components.createfetchandsaveaction.md +26 -0
- package/docs/API-reference/api/x-components.createfetchandsaveactionsoptions.fetch.md +24 -0
- package/docs/API-reference/api/x-components.createfetchandsaveactionsoptions.md +23 -0
- package/docs/API-reference/api/x-components.createfetchandsaveactionsoptions.oncancel.md +17 -0
- package/docs/API-reference/api/x-components.createfetchandsaveactionsoptions.onerror.md +24 -0
- package/docs/API-reference/api/x-components.createfetchandsaveactionsoptions.onsuccess.md +25 -0
- package/docs/API-reference/api/x-components.fetchandsaveactions.cancelprevious.md +13 -0
- package/docs/API-reference/api/x-components.fetchandsaveactions.fetchandsave.md +13 -0
- package/docs/API-reference/api/x-components.fetchandsaveactions.md +21 -0
- package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
- package/docs/API-reference/api/x-components.md +8 -11
- package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
- package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
- package/docs/API-reference/api/{x-components.urlstate.filters.md → x-components.params.filters.md} +2 -2
- package/docs/API-reference/api/x-components.params.md +25 -0
- package/docs/API-reference/api/{x-components.urlstate.page.md → x-components.params.page.md} +2 -2
- package/docs/API-reference/api/{x-components.urlstate.query.md → x-components.params.query.md} +2 -2
- package/docs/API-reference/api/{x-components.urlstate.relatedtags.md → x-components.params.relatedtags.md} +2 -2
- package/docs/API-reference/api/x-components.params.scroll.md +11 -0
- package/docs/API-reference/api/{x-components.urlstate.sort.md → x-components.params.sort.md} +2 -2
- package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
- package/docs/API-reference/api/x-components.popularsearchesstate.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsstate.md +1 -1
- package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
- package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
- package/docs/API-reference/api/x-components.requeststatus.md +13 -0
- package/docs/API-reference/api/x-components.searchmutations.md +2 -1
- package/docs/API-reference/api/x-components.searchmutations.setredirections.md +24 -0
- package/docs/API-reference/api/x-components.searchstate.md +2 -1
- package/docs/API-reference/api/x-components.searchstate.redirections.md +13 -0
- package/docs/API-reference/api/x-components.setstatus.md +25 -0
- package/docs/API-reference/api/x-components.statusmutations.md +20 -0
- package/docs/API-reference/api/x-components.statusmutations.setstatus.md +24 -0
- package/docs/API-reference/api/x-components.statusstate.md +20 -0
- package/docs/API-reference/api/x-components.statusstate.status.md +13 -0
- package/docs/API-reference/api/x-components.urlactions.md +8 -0
- package/docs/API-reference/api/x-components.urlactions.updatestorefromurl.md +17 -0
- package/docs/API-reference/api/x-components.urlactions.updateurl.md +17 -0
- package/docs/API-reference/api/x-components.urlgetters.md +2 -1
- package/docs/API-reference/api/x-components.urlgetters.urlmappedparamnames.md +13 -0
- package/docs/API-reference/api/x-components.urlgetters.urlparams.md +3 -1
- package/docs/API-reference/api/x-components.urlmutations.md +3 -1
- package/docs/API-reference/api/x-components.urlmutations.setextraparams.md +24 -0
- package/docs/API-reference/api/x-components.urlmutations.setparams.md +24 -0
- package/docs/API-reference/api/x-components.urlmutations.seturlconfig.md +3 -1
- package/docs/API-reference/api/x-components.urlparamkey.md +3 -1
- package/docs/API-reference/api/x-components.urlstate.extraparams.md +1 -1
- package/docs/API-reference/api/x-components.urlstate.md +2 -6
- package/docs/API-reference/api/{x-components.nosuggestions.query.md → x-components.urlstate.params.md} +3 -3
- package/docs/API-reference/api/x-components.xcomponentaliasstatusapi.md +7 -7
- package/docs/API-reference/api/x-components.xmodulestree.md +0 -1
- package/docs/API-reference/api/x-types.modelnametype.md +1 -1
- package/docs/API-reference/api/x-types.redirection.md +2 -3
- package/docs/API-reference/components/url/x-components.url-handler.md +84 -0
- package/docs/sidebar.json +1 -1
- package/js/components/base-dropdown.vue.js +2 -2
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue.js +2 -2
- package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
- package/js/index.js +3 -5
- package/js/index.js.map +1 -1
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/js/plugins/x-plugin.js +1 -1
- package/js/plugins/x-plugin.js.map +1 -1
- package/js/store/utils/{helpers/fetch-and-save-action.helpers.js → fetch-and-save-action.utils.js} +5 -5
- package/js/store/utils/fetch-and-save-action.utils.js.map +1 -0
- package/js/store/utils/{get-getters-proxy.js → getters-proxy.utils.js} +1 -1
- package/js/store/utils/getters-proxy.utils.js.map +1 -0
- package/js/store/utils/{helpers/status.helpers.js → status-store.utils.js} +1 -1
- package/js/store/utils/status-store.utils.js.map +1 -0
- package/js/store/{store.utils.js → utils/store-emitters.utils.js} +1 -1
- package/js/store/utils/store-emitters.utils.js.map +1 -0
- package/js/store/x.module.js +0 -1
- package/js/store/x.module.js.map +1 -1
- package/js/wiring/wiring.utils.js +1 -1
- package/js/wiring/wiring.utils.js.map +1 -1
- package/js/x-modules/device/store/emitters.js +3 -1
- package/js/x-modules/device/store/emitters.js.map +1 -1
- package/js/x-modules/empathize/store/emitters.js +3 -1
- package/js/x-modules/empathize/store/emitters.js.map +1 -1
- package/js/x-modules/extra-params/store/emitters.js +3 -1
- package/js/x-modules/extra-params/store/emitters.js.map +1 -1
- package/js/x-modules/facets/store/emitters.js +1 -1
- package/js/x-modules/facets/store/emitters.js.map +1 -1
- package/js/x-modules/history-queries/store/emitters.js +3 -1
- package/js/x-modules/history-queries/store/emitters.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/emitters.js +3 -1
- package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
- package/js/x-modules/identifier-results/store/module.js +1 -1
- package/js/x-modules/identifier-results/store/module.js.map +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.js +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.js.map +1 -1
- package/js/x-modules/next-queries/store/emitters.js +3 -1
- package/js/x-modules/next-queries/store/emitters.js.map +1 -1
- package/js/x-modules/next-queries/store/module.js +1 -1
- package/js/x-modules/next-queries/store/module.js.map +1 -1
- package/js/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.js +1 -1
- package/js/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.js.map +1 -1
- package/js/x-modules/popular-searches/store/emitters.js +1 -1
- package/js/x-modules/popular-searches/store/emitters.js.map +1 -1
- package/js/x-modules/popular-searches/store/module.js +1 -1
- package/js/x-modules/popular-searches/store/module.js.map +1 -1
- package/js/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.js +1 -1
- package/js/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.js.map +1 -1
- package/js/x-modules/query-suggestions/store/emitters.js +3 -1
- package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
- package/js/x-modules/query-suggestions/store/module.js +1 -1
- package/js/x-modules/query-suggestions/store/module.js.map +1 -1
- package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.js +1 -1
- package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.js.map +1 -1
- package/js/x-modules/recommendations/store/emitters.js +3 -1
- package/js/x-modules/recommendations/store/emitters.js.map +1 -1
- package/js/x-modules/recommendations/store/module.js +1 -1
- package/js/x-modules/recommendations/store/module.js.map +1 -1
- package/js/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.js +1 -1
- package/js/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.js.map +1 -1
- package/js/x-modules/related-tags/store/emitters.js +3 -1
- package/js/x-modules/related-tags/store/emitters.js.map +1 -1
- package/js/x-modules/related-tags/store/module.js +1 -1
- package/js/x-modules/related-tags/store/module.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +3 -2
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/emitters.js +3 -1
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search/store/module.js +6 -2
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search-box/store/emitters.js +3 -1
- package/js/x-modules/search-box/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/emitters.js +3 -1
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/url/store/actions/update-store-from-url.action.js +76 -0
- package/js/x-modules/url/store/actions/update-store-from-url.action.js.map +1 -0
- package/js/x-modules/url/store/actions/update-url.action.js +52 -0
- package/js/x-modules/url/store/actions/update-url.action.js.map +1 -0
- package/js/x-modules/url/store/emitters.js +3 -1
- package/js/x-modules/url/store/emitters.js.map +1 -1
- package/js/x-modules/url/store/getters/url-mapped-param-names.getter.js +23 -0
- package/js/x-modules/url/store/getters/url-mapped-param-names.getter.js.map +1 -0
- package/js/x-modules/url/store/getters/url-params.getter.js +23 -10
- package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
- package/js/x-modules/url/store/module.js +24 -7
- package/js/x-modules/url/store/module.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter.api.json +0 -26
- package/report/x-components.api.json +1178 -756
- package/report/x-components.api.md +62 -106
- package/report/x-types.api.json +18 -27
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/plugins/x-plugin.d.ts +1 -1
- package/types/plugins/x-plugin.d.ts.map +1 -1
- package/types/plugins/x-plugin.types.d.ts +2 -2
- package/types/plugins/x-plugin.types.d.ts.map +1 -1
- package/types/router.d.ts.map +1 -1
- package/types/store/index.d.ts +3 -2
- package/types/store/index.d.ts.map +1 -1
- package/types/store/utils/{helpers/fetch-and-save-action.helpers.d.ts → fetch-and-save-action.utils.d.ts} +24 -16
- package/types/store/utils/fetch-and-save-action.utils.d.ts.map +1 -0
- package/types/store/utils/{get-getters-proxy.d.ts → getters-proxy.utils.d.ts} +1 -1
- package/types/store/utils/getters-proxy.utils.d.ts.map +1 -0
- package/types/store/utils/{helpers/status.helpers.d.ts → status-store.utils.d.ts} +1 -1
- package/types/store/utils/status-store.utils.d.ts.map +1 -0
- package/types/store/{store-emitters.types.d.ts → utils/store-emitters.utils.d.ts} +13 -4
- package/types/store/utils/store-emitters.utils.d.ts.map +1 -0
- package/types/store/x.module.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/types.d.ts +1 -1
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/types.d.ts +1 -1
- package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/types.d.ts +1 -1
- package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/types.d.ts +1 -1
- package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/module.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +26 -18
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/url/components/index.d.ts +2 -0
- package/types/x-modules/url/components/index.d.ts.map +1 -0
- package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts +11 -0
- package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts.map +1 -0
- package/types/x-modules/url/store/actions/update-url.action.d.ts +11 -0
- package/types/x-modules/url/store/actions/update-url.action.d.ts.map +1 -0
- package/types/x-modules/url/store/emitters.d.ts +1 -1
- package/types/x-modules/url/store/getters/url-mapped-param-names.getter.d.ts +12 -0
- package/types/x-modules/url/store/getters/url-mapped-param-names.getter.d.ts.map +1 -0
- package/types/x-modules/url/store/getters/url-params.getter.d.ts +1 -0
- package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
- package/types/x-modules/url/store/module.d.ts.map +1 -1
- package/types/x-modules/url/store/types.d.ts +46 -3
- package/types/x-modules/url/store/types.d.ts.map +1 -1
- package/types/x-modules/x-modules.types.d.ts +1 -3
- package/types/x-modules/x-modules.types.d.ts.map +1 -1
- package/design-system/list-background.css +0 -20
- package/design-system/list-border.css +0 -44
- package/design-system/row-background.css +0 -20
- package/docs/API-reference/api/x-adapter.empathydirect.title.md +0 -11
- package/docs/API-reference/api/x-components.clearnosuggestionsquery.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestions.beforedestroy.md +0 -15
- package/docs/API-reference/api/x-components.nosuggestions.created.md +0 -15
- package/docs/API-reference/api/x-components.nosuggestions.eventstorender.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestions.eventsubscriptions.md +0 -11
- package/docs/API-reference/api/x-components.nosuggestions.md +0 -32
- package/docs/API-reference/api/x-components.nosuggestions.message.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestions.suggestionsevents.md +0 -11
- package/docs/API-reference/api/x-components.nosuggestionsactions.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestionsgetters.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestionsmutations.md +0 -20
- package/docs/API-reference/api/x-components.nosuggestionsmutations.setquery.md +0 -24
- package/docs/API-reference/api/x-components.nosuggestionsstate.md +0 -20
- package/docs/API-reference/api/x-components.nosuggestionsstate.query.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestionsxmodule.md +0 -13
- package/docs/API-reference/api/x-components.nosuggestionsxstoremodule.md +0 -15
- package/docs/API-reference/api/x-components.setnosuggestionsquery.md +0 -13
- package/docs/API-reference/api/x-components.xeventarraypayload.md +0 -15
- package/docs/API-reference/api/x-components.xmodulestree.nosuggestions.md +0 -11
- package/docs/API-reference/api/x-types.redirection.title.md +0 -13
- package/docs/API-reference/components/no-suggestions/x-components.no-suggestions.md +0 -49
- package/js/store/store.utils.js.map +0 -1
- package/js/store/utils/get-getters-proxy.js.map +0 -1
- package/js/store/utils/helpers/fetch-and-save-action.helpers.js.map +0 -1
- package/js/store/utils/helpers/status.helpers.js.map +0 -1
- package/js/x-modules/no-suggestions/components/no-suggestions.vue.js +0 -70
- package/js/x-modules/no-suggestions/components/no-suggestions.vue.js.map +0 -1
- package/js/x-modules/no-suggestions/components/no-suggestions.vue_rollup-plugin-vue=script.js +0 -160
- package/js/x-modules/no-suggestions/components/no-suggestions.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/x-modules/no-suggestions/store/module.js +0 -20
- package/js/x-modules/no-suggestions/store/module.js.map +0 -1
- package/js/x-modules/no-suggestions/wiring.js +0 -46
- package/js/x-modules/no-suggestions/wiring.js.map +0 -1
- package/js/x-modules/no-suggestions/x-module.js +0 -18
- package/js/x-modules/no-suggestions/x-module.js.map +0 -1
- package/no-suggestions/index.d.ts +0 -1
- package/no-suggestions/index.js +0 -4
- package/types/store/store-emitters.types.d.ts.map +0 -1
- package/types/store/store.utils.d.ts +0 -12
- package/types/store/store.utils.d.ts.map +0 -1
- package/types/store/utils/get-getters-proxy.d.ts.map +0 -1
- package/types/store/utils/helpers/fetch-and-save-action.helpers.d.ts.map +0 -1
- package/types/store/utils/helpers/status.helpers.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/components/index.d.ts +0 -2
- package/types/x-modules/no-suggestions/components/index.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/components/no-suggestions.vue.d.ts +0 -90
- package/types/x-modules/no-suggestions/components/no-suggestions.vue.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/config.types.d.ts +0 -9
- package/types/x-modules/no-suggestions/config.types.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/index.d.ts +0 -6
- package/types/x-modules/no-suggestions/index.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/store/index.d.ts +0 -3
- package/types/x-modules/no-suggestions/store/index.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/store/module.d.ts +0 -8
- package/types/x-modules/no-suggestions/store/module.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/store/types.d.ts +0 -44
- package/types/x-modules/no-suggestions/store/types.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/wiring.d.ts +0 -29
- package/types/x-modules/no-suggestions/wiring.d.ts.map +0 -1
- package/types/x-modules/no-suggestions/x-module.d.ts +0 -16
- package/types/x-modules/no-suggestions/x-module.d.ts.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [UrlMutations](./x-components.urlmutations.md) > [setExtraParams](./x-components.urlmutations.setextraparams.md)
|
|
4
|
+
|
|
5
|
+
## UrlMutations.setExtraParams() method
|
|
6
|
+
|
|
7
|
+
Sets new extra params.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setExtraParams(extraParam: Dictionary<UrlParamValue>): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| extraParam | [Dictionary](./x-components.dictionary.md)<!-- --><[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->> | The new query of the search-box. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [UrlMutations](./x-components.urlmutations.md) > [setParams](./x-components.urlmutations.setparams.md)
|
|
4
|
+
|
|
5
|
+
## UrlMutations.setParams() method
|
|
6
|
+
|
|
7
|
+
Sets the new params.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setParams(params: Record<keyof Params, UrlParamValue>): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| params | Record<keyof [Params](./x-components.params.md)<!-- -->, [UrlParamValue](./x-components.urlparamvalue.md)<!-- -->> | The new query of the search-box. |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## UrlMutations.setUrlConfig() method
|
|
6
6
|
|
|
7
|
+
Sets a new url configuration.
|
|
8
|
+
|
|
7
9
|
<b>Signature:</b>
|
|
8
10
|
|
|
9
11
|
```typescript
|
|
@@ -14,7 +16,7 @@ setUrlConfig(config: UrlConfig): void;
|
|
|
14
16
|
|
|
15
17
|
| Parameter | Type | Description |
|
|
16
18
|
| --- | --- | --- |
|
|
17
|
-
| config | [UrlConfig](./x-components.urlconfig.md) |
|
|
19
|
+
| config | [UrlConfig](./x-components.urlconfig.md) | The new query of the search-box. |
|
|
18
20
|
|
|
19
21
|
<b>Returns:</b>
|
|
20
22
|
|
|
@@ -9,5 +9,7 @@ The key of the parameter to store in the URL.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export declare type UrlParamKey = string
|
|
12
|
+
export declare type UrlParamKey = Extract<keyof Params, string>;
|
|
13
13
|
```
|
|
14
|
+
<b>References:</b> [Params](./x-components.params.md)
|
|
15
|
+
|
|
@@ -17,10 +17,6 @@ export interface UrlState
|
|
|
17
17
|
| Property | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| [config](./x-components.urlstate.config.md) | [UrlConfig](./x-components.urlconfig.md) | |
|
|
20
|
-
| [extraParams](./x-components.urlstate.extraparams.md) |
|
|
21
|
-
| [
|
|
22
|
-
| [page](./x-components.urlstate.page.md) | number | |
|
|
23
|
-
| [query](./x-components.urlstate.query.md) | string | |
|
|
24
|
-
| [relatedTags](./x-components.urlstate.relatedtags.md) | string\[\] | |
|
|
25
|
-
| [sort](./x-components.urlstate.sort.md) | string | |
|
|
20
|
+
| [extraParams](./x-components.urlstate.extraparams.md) | [Dictionary](./x-components.dictionary.md)<!-- --><[UrlParamValue](./x-components.urlparamvalue.md)<!-- -->> | |
|
|
21
|
+
| [params](./x-components.urlstate.params.md) | Record<keyof [Params](./x-components.params.md)<!-- -->, [UrlParamValue](./x-components.urlparamvalue.md)<!-- -->> | |
|
|
26
22
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [UrlState](./x-components.urlstate.md) > [params](./x-components.urlstate.params.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## UrlState.params property
|
|
6
6
|
|
|
7
7
|
<b>Signature:</b>
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
|
|
10
|
+
params: Record<keyof Params, UrlParamValue>;
|
|
11
11
|
```
|
|
@@ -16,11 +16,11 @@ export interface XComponentAliasStatusAPI
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| [identifierResults](./x-components.xcomponentaliasstatusapi.identifierresults.md) | RequestStatus \| undefined | The [IdentifierResultsXModule](./x-components.identifierresultsxmodule.md) status. |
|
|
20
|
-
| [nextQueries](./x-components.xcomponentaliasstatusapi.nextqueries.md) | RequestStatus \| undefined | The [NextQueriesXModule](./x-components.nextqueriesxmodule.md) status. |
|
|
21
|
-
| [popularSearches](./x-components.xcomponentaliasstatusapi.popularsearches.md) | RequestStatus \| undefined | The [PopularSearchesXModule](./x-components.popularsearchesxmodule.md) status. |
|
|
22
|
-
| [querySuggestions](./x-components.xcomponentaliasstatusapi.querysuggestions.md) | RequestStatus \| undefined | The [QuerySuggestionsXModule](./x-components.querysuggestionsxmodule.md) status. |
|
|
23
|
-
| [recommendations](./x-components.xcomponentaliasstatusapi.recommendations.md) | RequestStatus \| undefined | The [RecommendationsXModule](./x-components.recommendationsxmodule.md) status. |
|
|
24
|
-
| [relatedTags](./x-components.xcomponentaliasstatusapi.relatedtags.md) | RequestStatus \| undefined | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) status. |
|
|
25
|
-
| [search](./x-components.xcomponentaliasstatusapi.search.md) | RequestStatus \| undefined | The [SearchXModule](./x-components.searchxmodule.md) status. |
|
|
19
|
+
| [identifierResults](./x-components.xcomponentaliasstatusapi.identifierresults.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [IdentifierResultsXModule](./x-components.identifierresultsxmodule.md) status. |
|
|
20
|
+
| [nextQueries](./x-components.xcomponentaliasstatusapi.nextqueries.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [NextQueriesXModule](./x-components.nextqueriesxmodule.md) status. |
|
|
21
|
+
| [popularSearches](./x-components.xcomponentaliasstatusapi.popularsearches.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [PopularSearchesXModule](./x-components.popularsearchesxmodule.md) status. |
|
|
22
|
+
| [querySuggestions](./x-components.xcomponentaliasstatusapi.querysuggestions.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [QuerySuggestionsXModule](./x-components.querysuggestionsxmodule.md) status. |
|
|
23
|
+
| [recommendations](./x-components.xcomponentaliasstatusapi.recommendations.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [RecommendationsXModule](./x-components.recommendationsxmodule.md) status. |
|
|
24
|
+
| [relatedTags](./x-components.xcomponentaliasstatusapi.relatedtags.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) status. |
|
|
25
|
+
| [search](./x-components.xcomponentaliasstatusapi.search.md) | [RequestStatus](./x-components.requeststatus.md) \| undefined | The [SearchXModule](./x-components.searchxmodule.md) status. |
|
|
26
26
|
|
|
@@ -23,7 +23,6 @@ export interface XModulesTree
|
|
|
23
23
|
| [historyQueries](./x-components.xmodulestree.historyqueries.md) | [HistoryQueriesXModule](./x-components.historyqueriesxmodule.md) | |
|
|
24
24
|
| [identifierResults](./x-components.xmodulestree.identifierresults.md) | [IdentifierResultsXModule](./x-components.identifierresultsxmodule.md) | |
|
|
25
25
|
| [nextQueries](./x-components.xmodulestree.nextqueries.md) | [NextQueriesXModule](./x-components.nextqueriesxmodule.md) | |
|
|
26
|
-
| [noSuggestions](./x-components.xmodulestree.nosuggestions.md) | [NoSuggestionsXModule](./x-components.nosuggestionsxmodule.md) | |
|
|
27
26
|
| [popularSearches](./x-components.xmodulestree.popularsearches.md) | [PopularSearchesXModule](./x-components.popularsearchesxmodule.md) | |
|
|
28
27
|
| [querySuggestions](./x-components.xmodulestree.querysuggestions.md) | [QuerySuggestionsXModule](./x-components.querysuggestionsxmodule.md) | |
|
|
29
28
|
| [recommendations](./x-components.xmodulestree.recommendations.md) | [RecommendationsXModule](./x-components.recommendationsxmodule.md) | |
|
|
@@ -9,7 +9,7 @@ Type to ease the usage of the ModelNames interface with autocomplete suggestions
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export declare type ModelNameType = 'Result' | 'NextQueries' | 'NextQuery' | 'RelatedTag' | 'PopularSearch' | 'QuerySuggestion' | 'HistoryQuery' | 'Banner' | 'Promoted' | FilterModelName | FacetModelName | string;
|
|
12
|
+
export declare type ModelNameType = 'Result' | 'NextQueries' | 'NextQuery' | 'RelatedTag' | 'PopularSearch' | 'QuerySuggestion' | 'HistoryQuery' | 'Banner' | 'Promoted' | 'Redirection' | FilterModelName | FacetModelName | string;
|
|
13
13
|
```
|
|
14
14
|
<b>References:</b> [FilterModelName](./x-types.filtermodelname.md)<!-- -->, [FacetModelName](./x-types.facetmodelname.md)
|
|
15
15
|
|
|
@@ -9,15 +9,14 @@ A redirection (AKA Direct Link) is simply a URL. Normally, the user is just redi
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface Redirection extends Identifiable
|
|
12
|
+
export interface Redirection extends NamedModel<'Redirection'>, Identifiable
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [Identifiable](./x-types.identifiable.md)
|
|
14
|
+
<b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- --><'Redirection'>, [Identifiable](./x-types.identifiable.md)
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
18
18
|
| Property | Type | Description |
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| [tagging](./x-types.redirection.tagging.md) | { click: [Tagging](./x-types.tagging.md)<!-- -->; } | Redirect tagging. |
|
|
21
|
-
| [title](./x-types.redirection.title.md) | string | Redirect title. |
|
|
22
21
|
| [url](./x-types.redirection.url.md) | string | URL to redirect. |
|
|
23
22
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: x-components.x-components.url-handler
|
|
3
|
+
title: Url Handler
|
|
4
|
+
sidebar_label: Url Handler
|
|
5
|
+
---
|
|
6
|
+
# url-handler
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Events
|
|
11
|
+
|
|
12
|
+
This component emits the following events:
|
|
13
|
+
|
|
14
|
+
- [`UrlConfigProvided`](./../../api/x-components.urlxevents.urlconfigprovided.md)
|
|
15
|
+
- [`DocumentLoaded`](./../../api/x-components.urlxevents.documentloaded.md)
|
|
16
|
+
- [`DocumentHistoryChanged`](./../../api/x-components.urlxevents.documenthistorychanged.md)
|
|
17
|
+
|
|
18
|
+
## See it in action
|
|
19
|
+
|
|
20
|
+
This component doesn't render elements to the DOM, but serves as a way to easily change the default
|
|
21
|
+
url parameter names.
|
|
22
|
+
|
|
23
|
+
_Try to make some requests and take a look to the url!_
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<UrlHandler />
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { UrlHandler } from "@empathyco/x-components/url-handler";
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: "UrlHandlerDemo",
|
|
35
|
+
components: {
|
|
36
|
+
UrlHandler
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Play with props
|
|
43
|
+
|
|
44
|
+
In this example, the `UrlHandler` component changes the following query parameter names:
|
|
45
|
+
|
|
46
|
+
- `query` to be `ebq`.
|
|
47
|
+
- `page` to be `p`.
|
|
48
|
+
- `filters` to be `f`
|
|
49
|
+
- `sort` to be `s`
|
|
50
|
+
|
|
51
|
+
_Try to make some requests and take a look to the url!_
|
|
52
|
+
|
|
53
|
+
```vue
|
|
54
|
+
<template>
|
|
55
|
+
<UrlHandler :query="query" :page="page" :filters="filters" :sort="sort" />
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
import { UrlHandler } from "@empathyco/x-components/url-handler";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "UrlHandlerDemo",
|
|
63
|
+
components: {
|
|
64
|
+
UrlHandler
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
query: "ebq",
|
|
69
|
+
page: "p",
|
|
70
|
+
filters: "f",
|
|
71
|
+
sort: "s"
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Play with events
|
|
79
|
+
|
|
80
|
+
The `UrlHandler` will emit a `UrlConfigProvided` event, with the new url param names if they are
|
|
81
|
+
provided.
|
|
82
|
+
|
|
83
|
+
It also emits the `DocumentLoaded` when the page is loaded and the `DocumentHistoryChanged` when the
|
|
84
|
+
url changes.
|
package/docs/sidebar.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"API Reference":[{"Components":[{"Common":[{"Animations":["front/xcomponents/API-reference/components/common/animations/x-components.x-components.animate-width","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-from-top","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-height","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-width","front/xcomponents/API-reference/components/common/animations/x-components.x-components.fade-and-slide","front/xcomponents/API-reference/components/common/animations/x-components.x-components.staggered-fade-and-slide","front/xcomponents/API-reference/components/common/animations/x-components.x-components.translate-from-right"]},{"Column Picker":["front/xcomponents/API-reference/components/common/column-picker/x-components.x-components.base-column-picker-dropdown","front/xcomponents/API-reference/components/common/column-picker/x-components.x-components.base-column-picker-list"]},{"Currency":["front/xcomponents/API-reference/components/common/currency/x-components.x-components.base-currency"]},{"Filters":[{"Labels":["front/xcomponents/API-reference/components/common/filters/labels/x-components.x-components.base-price-filter-label","front/xcomponents/API-reference/components/common/filters/labels/x-components.x-components.base-rating-filter-label"]}]},{"Icons":["front/xcomponents/API-reference/components/common/icons/x-components.x-components.arrow","front/xcomponents/API-reference/components/common/icons/x-components.x-components.bag","front/xcomponents/API-reference/components/common/icons/x-components.x-components.bar-code","front/xcomponents/API-reference/components/common/icons/x-components.x-components.barcode-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cart","front/xcomponents/API-reference/components/common/icons/x-components.x-components.check-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.check","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-card-selected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-card-unselected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-selected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-unselected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-down","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-left","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-right","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-down","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-left","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-right","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-up","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-up","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cross-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cross","front/xcomponents/API-reference/components/common/icons/x-components.x-components.filters","front/xcomponents/API-reference/components/common/icons/x-components.x-components.grid-1-col","front/xcomponents/API-reference/components/common/icons/x-components.x-components.grid-2-col","front/xcomponents/API-reference/components/common/icons/x-components.x-components.hide","front/xcomponents/API-reference/components/common/icons/x-components.x-components.history-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.history","front/xcomponents/API-reference/components/common/icons/x-components.x-components.menu","front/xcomponents/API-reference/components/common/icons/x-components.x-components.minus-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.minus","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-1","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-2","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-3","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-4","front/xcomponents/API-reference/components/common/icons/x-components.x-components.plus","front/xcomponents/API-reference/components/common/icons/x-components.x-components.search-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.search","front/xcomponents/API-reference/components/common/icons/x-components.x-components.show","front/xcomponents/API-reference/components/common/icons/x-components.x-components.star","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trash-open","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trash","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trending-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trending","front/xcomponents/API-reference/components/common/icons/x-components.x-components.user"]},{"Layouts":["front/xcomponents/API-reference/components/common/layouts/x-components.x-components.multi-column-max-width-layout","front/xcomponents/API-reference/components/common/layouts/x-components.x-components.single-column-layout"]},{"Modals":["front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal-close","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal-open","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal-close","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal-open","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-modal"]},{"Panels":["front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-header-toggle-panel","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-id-toggle-panel-button","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-id-toggle-panel","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-toggle-panel"]},{"Result":["front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-add-to-cart","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-current-price","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-fallback-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-link","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-placeholder-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-previous-price"]},{"Scroll":["front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-id-scroll","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-main-scroll","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-scroll-to-top","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-scroll"]},{"Suggestions":["front/xcomponents/API-reference/components/common/suggestions/x-components.x-components.base-suggestion","front/xcomponents/API-reference/components/common/suggestions/x-components.x-components.base-suggestions"]}]},{"Device":["front/xcomponents/API-reference/components/device/x-components.x-components.device-detector"]},{"Empathize":["front/xcomponents/API-reference/components/empathize/x-components.x-components.empathize"]},{"Extra Params":["front/xcomponents/API-reference/components/extra-params/x-components.x-components.extra-params","front/xcomponents/API-reference/components/extra-params/x-components.x-components.renderless-extra-param","front/xcomponents/API-reference/components/extra-params/x-components.x-components.snippet-config-extra-params"]},{"Facets":["front/xcomponents/API-reference/components/facets/x-components.x-components.clear-filters",{"Facets":["front/xcomponents/API-reference/components/facets/x-components.facets/x-components.facets-provider","front/xcomponents/API-reference/components/facets/x-components.facets/x-components.facets"]},{"Filters":["front/xcomponents/API-reference/components/facets/x-components.filters/x-components.all-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.base-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.editable-number-range-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.hierarchical-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.number-range-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.renderless-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.simple-filter"]},{"Lists":["front/xcomponents/API-reference/components/facets/x-components.lists/x-components.exclude-filters-with-no-results","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.filters-list","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.filters-search","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.selected-filters-list","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.selected-filters","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.sliced-filters","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.sorted-filters"]}]},{"History Queries":["front/xcomponents/API-reference/components/history-queries/x-components.x-components.clear-history-queries","front/xcomponents/API-reference/components/history-queries/x-components.x-components.history-queries","front/xcomponents/API-reference/components/history-queries/x-components.x-components.history-query","front/xcomponents/API-reference/components/history-queries/x-components.x-components.remove-history-query"]},{"Identifier Results":["front/xcomponents/API-reference/components/identifier-results/x-components.x-components.identifier-result","front/xcomponents/API-reference/components/identifier-results/x-components.x-components.identifier-results"]},{"Next Queries":["front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-queries-list","front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-queries","front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-query"]},{"No Suggestions":["front/xcomponents/API-reference/components/no-suggestions/x-components.x-components.no-suggestions"]},{"Popular Searches":["front/xcomponents/API-reference/components/popular-searches/x-components.x-components.popular-search","front/xcomponents/API-reference/components/popular-searches/x-components.x-components.popular-searches"]},{"Query Suggestions":["front/xcomponents/API-reference/components/query-suggestions/x-components.x-components.query-suggestion","front/xcomponents/API-reference/components/query-suggestions/x-components.x-components.query-suggestions"]},{"Recommendations":["front/xcomponents/API-reference/components/recommendations/x-components.x-components.recommendations"]},{"Related Tags":["front/xcomponents/API-reference/components/related-tags/x-components.x-components.related-tag","front/xcomponents/API-reference/components/related-tags/x-components.x-components.related-tags"]},{"Search Box":["front/xcomponents/API-reference/components/search-box/x-components.x-components.clear-search-input","front/xcomponents/API-reference/components/search-box/x-components.x-components.search-button","front/xcomponents/API-reference/components/search-box/x-components.x-components.search-input"]},{"Search":["front/xcomponents/API-reference/components/search/x-components.x-components.banner","front/xcomponents/API-reference/components/search/x-components.x-components.banners-list","front/xcomponents/API-reference/components/search/x-components.x-components.partial-query-button","front/xcomponents/API-reference/components/search/x-components.x-components.partial-results-list","front/xcomponents/API-reference/components/search/x-components.x-components.promoted","front/xcomponents/API-reference/components/search/x-components.x-components.promoteds-list","front/xcomponents/API-reference/components/search/x-components.x-components.results-list","front/xcomponents/API-reference/components/search/x-components.x-components.sort-dropdown","front/xcomponents/API-reference/components/search/x-components.x-components.sort-list","front/xcomponents/API-reference/components/search/x-components.x-components.spellcheck-button","front/xcomponents/API-reference/components/search/x-components.x-components.spellcheck"]}]}],"Guide":[{"Getting Started":[{"Components":["front/xcomponents/guide/getting-started/components/x-components.clear-search-input","front/xcomponents/guide/getting-started/components/x-components.live-examples","front/xcomponents/guide/getting-started/components/x-components.query-suggestions","front/xcomponents/guide/getting-started/components/x-components.search-button","front/xcomponents/guide/getting-started/components/x-components.search-input"]},"front/xcomponents/guide/getting-started/x-components.install-xplugin","front/xcomponents/guide/getting-started/x-components.use-components"]},"front/xcomponents/guide/x-components.install"]}
|
|
1
|
+
{"API Reference":[{"Components":[{"Common":[{"Animations":["front/xcomponents/API-reference/components/common/animations/x-components.x-components.animate-width","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-from-top","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-height","front/xcomponents/API-reference/components/common/animations/x-components.x-components.collapse-width","front/xcomponents/API-reference/components/common/animations/x-components.x-components.fade-and-slide","front/xcomponents/API-reference/components/common/animations/x-components.x-components.staggered-fade-and-slide","front/xcomponents/API-reference/components/common/animations/x-components.x-components.translate-from-right"]},{"Column Picker":["front/xcomponents/API-reference/components/common/column-picker/x-components.x-components.base-column-picker-dropdown","front/xcomponents/API-reference/components/common/column-picker/x-components.x-components.base-column-picker-list"]},{"Currency":["front/xcomponents/API-reference/components/common/currency/x-components.x-components.base-currency"]},{"Filters":[{"Labels":["front/xcomponents/API-reference/components/common/filters/labels/x-components.x-components.base-price-filter-label","front/xcomponents/API-reference/components/common/filters/labels/x-components.x-components.base-rating-filter-label"]}]},{"Icons":["front/xcomponents/API-reference/components/common/icons/x-components.x-components.arrow","front/xcomponents/API-reference/components/common/icons/x-components.x-components.bag","front/xcomponents/API-reference/components/common/icons/x-components.x-components.bar-code","front/xcomponents/API-reference/components/common/icons/x-components.x-components.barcode-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cart","front/xcomponents/API-reference/components/common/icons/x-components.x-components.check-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.check","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-card-selected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-card-unselected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-selected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.checkbox-unselected","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-down","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-left","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-right","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-down","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-left","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-right","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-tiny-up","front/xcomponents/API-reference/components/common/icons/x-components.x-components.chevron-up","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cross-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.cross","front/xcomponents/API-reference/components/common/icons/x-components.x-components.filters","front/xcomponents/API-reference/components/common/icons/x-components.x-components.grid-1-col","front/xcomponents/API-reference/components/common/icons/x-components.x-components.grid-2-col","front/xcomponents/API-reference/components/common/icons/x-components.x-components.hide","front/xcomponents/API-reference/components/common/icons/x-components.x-components.history-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.history","front/xcomponents/API-reference/components/common/icons/x-components.x-components.menu","front/xcomponents/API-reference/components/common/icons/x-components.x-components.minus-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.minus","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-1","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-2","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-3","front/xcomponents/API-reference/components/common/icons/x-components.x-components.nq-4","front/xcomponents/API-reference/components/common/icons/x-components.x-components.plus","front/xcomponents/API-reference/components/common/icons/x-components.x-components.search-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.search","front/xcomponents/API-reference/components/common/icons/x-components.x-components.show","front/xcomponents/API-reference/components/common/icons/x-components.x-components.star","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trash-open","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trash","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trending-tiny","front/xcomponents/API-reference/components/common/icons/x-components.x-components.trending","front/xcomponents/API-reference/components/common/icons/x-components.x-components.user"]},{"Layouts":["front/xcomponents/API-reference/components/common/layouts/x-components.x-components.multi-column-max-width-layout","front/xcomponents/API-reference/components/common/layouts/x-components.x-components.single-column-layout"]},{"Modals":["front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal-close","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal-open","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-events-modal","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal-close","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal-open","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-id-modal","front/xcomponents/API-reference/components/common/modals/x-components.x-components.base-modal"]},{"Panels":["front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-header-toggle-panel","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-id-toggle-panel-button","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-id-toggle-panel","front/xcomponents/API-reference/components/common/panels/x-components.x-components.base-toggle-panel"]},{"Result":["front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-add-to-cart","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-current-price","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-fallback-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-link","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-placeholder-image","front/xcomponents/API-reference/components/common/result/x-components.x-components.base-result-previous-price"]},{"Scroll":["front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-id-scroll","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-main-scroll","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-scroll-to-top","front/xcomponents/API-reference/components/common/scroll/x-components.x-components.base-scroll"]},{"Suggestions":["front/xcomponents/API-reference/components/common/suggestions/x-components.x-components.base-suggestion","front/xcomponents/API-reference/components/common/suggestions/x-components.x-components.base-suggestions"]}]},{"Device":["front/xcomponents/API-reference/components/device/x-components.x-components.device-detector"]},{"Empathize":["front/xcomponents/API-reference/components/empathize/x-components.x-components.empathize"]},{"Extra Params":["front/xcomponents/API-reference/components/extra-params/x-components.x-components.extra-params","front/xcomponents/API-reference/components/extra-params/x-components.x-components.renderless-extra-param","front/xcomponents/API-reference/components/extra-params/x-components.x-components.snippet-config-extra-params"]},{"Facets":["front/xcomponents/API-reference/components/facets/x-components.x-components.clear-filters",{"Facets":["front/xcomponents/API-reference/components/facets/x-components.facets/x-components.facets-provider","front/xcomponents/API-reference/components/facets/x-components.facets/x-components.facets"]},{"Filters":["front/xcomponents/API-reference/components/facets/x-components.filters/x-components.all-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.base-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.editable-number-range-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.hierarchical-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.number-range-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.renderless-filter","front/xcomponents/API-reference/components/facets/x-components.filters/x-components.simple-filter"]},{"Lists":["front/xcomponents/API-reference/components/facets/x-components.lists/x-components.exclude-filters-with-no-results","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.filters-list","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.filters-search","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.selected-filters-list","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.selected-filters","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.sliced-filters","front/xcomponents/API-reference/components/facets/x-components.lists/x-components.sorted-filters"]}]},{"History Queries":["front/xcomponents/API-reference/components/history-queries/x-components.x-components.clear-history-queries","front/xcomponents/API-reference/components/history-queries/x-components.x-components.history-queries","front/xcomponents/API-reference/components/history-queries/x-components.x-components.history-query","front/xcomponents/API-reference/components/history-queries/x-components.x-components.remove-history-query"]},{"Identifier Results":["front/xcomponents/API-reference/components/identifier-results/x-components.x-components.identifier-result","front/xcomponents/API-reference/components/identifier-results/x-components.x-components.identifier-results"]},{"Next Queries":["front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-queries-list","front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-queries","front/xcomponents/API-reference/components/next-queries/x-components.x-components.next-query"]},{"Popular Searches":["front/xcomponents/API-reference/components/popular-searches/x-components.x-components.popular-search","front/xcomponents/API-reference/components/popular-searches/x-components.x-components.popular-searches"]},{"Query Suggestions":["front/xcomponents/API-reference/components/query-suggestions/x-components.x-components.query-suggestion","front/xcomponents/API-reference/components/query-suggestions/x-components.x-components.query-suggestions"]},{"Recommendations":["front/xcomponents/API-reference/components/recommendations/x-components.x-components.recommendations"]},{"Related Tags":["front/xcomponents/API-reference/components/related-tags/x-components.x-components.related-tag","front/xcomponents/API-reference/components/related-tags/x-components.x-components.related-tags"]},{"Search Box":["front/xcomponents/API-reference/components/search-box/x-components.x-components.clear-search-input","front/xcomponents/API-reference/components/search-box/x-components.x-components.search-button","front/xcomponents/API-reference/components/search-box/x-components.x-components.search-input"]},{"Search":["front/xcomponents/API-reference/components/search/x-components.x-components.banner","front/xcomponents/API-reference/components/search/x-components.x-components.banners-list","front/xcomponents/API-reference/components/search/x-components.x-components.partial-query-button","front/xcomponents/API-reference/components/search/x-components.x-components.partial-results-list","front/xcomponents/API-reference/components/search/x-components.x-components.promoted","front/xcomponents/API-reference/components/search/x-components.x-components.promoteds-list","front/xcomponents/API-reference/components/search/x-components.x-components.results-list","front/xcomponents/API-reference/components/search/x-components.x-components.sort-dropdown","front/xcomponents/API-reference/components/search/x-components.x-components.sort-list","front/xcomponents/API-reference/components/search/x-components.x-components.spellcheck-button","front/xcomponents/API-reference/components/search/x-components.x-components.spellcheck"]},{"Url":["front/xcomponents/API-reference/components/url/x-components.x-components.url-handler"]}]}],"Guide":[{"Getting Started":[{"Components":["front/xcomponents/guide/getting-started/components/x-components.clear-search-input","front/xcomponents/guide/getting-started/components/x-components.live-examples","front/xcomponents/guide/getting-started/components/x-components.query-suggestions","front/xcomponents/guide/getting-started/components/x-components.search-button","front/xcomponents/guide/getting-started/components/x-components.search-input"]},"front/xcomponents/guide/getting-started/x-components.install-xplugin","front/xcomponents/guide/getting-started/x-components.use-components"]},"front/xcomponents/guide/x-components.install"]}
|
|
@@ -193,11 +193,11 @@ __vue_render__._withStripped = true;
|
|
|
193
193
|
/* style */
|
|
194
194
|
var __vue_inject_styles__ = function (inject) {
|
|
195
195
|
if (!inject) { return }
|
|
196
|
-
inject("data-v-
|
|
196
|
+
inject("data-v-1046e888_0", { source: ".x-dropdown[data-v-1046e888] {\n position: relative;\n}\n.x-dropdown__items-list[data-v-1046e888] {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n}", map: undefined, media: undefined });
|
|
197
197
|
|
|
198
198
|
};
|
|
199
199
|
/* scoped */
|
|
200
|
-
var __vue_scope_id__ = "data-v-
|
|
200
|
+
var __vue_scope_id__ = "data-v-1046e888";
|
|
201
201
|
/* module identifier */
|
|
202
202
|
var __vue_module_identifier__ = undefined;
|
|
203
203
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n aria-haspopup=\"listbox\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"$scopedSlots.toggle\" :isOpen=\"isOpen\" :item=\"value\" name=\"toggle\" />\n <slot v-else :item=\"value\" name=\"item\" />\n </button>\n\n <component :is=\"animation\">\n <ul\n v-if=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"close\"\n @keydown.home=\"highlightFirstItem\"\n :aria-expanded=\"isOpen.toString()\"\n class=\"x-dropdown__items-list\"\n role=\"listbox\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n ref=\"itemButtons\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(index === highlightedItemIndex).toString()\"\n :aria-current=\"(item === value).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n tabindex=\"-1\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === value\"\n :item=\"item\"\n name=\"item\"\n />\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import Vue from 'vue';\n import { normalizeString } from '../utils/normalize';\n import { isInRange } from '../utils/number';\n import { debounce } from '../utils/debounce';\n import { VueCSSClasses } from '../utils/types';\n import { NoElement } from './no-element';\n\n type DropdownItem = string | number | Identifiable;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n model: {\n event: 'change'\n }\n })\n export default class BaseDropdown extends Vue {\n /**\n * List of items to display.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: DropdownItem[];\n\n /**\n * The selected item.\n *\n * @public\n */\n @Prop({ required: true })\n public value!: DropdownItem | null;\n\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n *\n * @public\n */\n @Prop({ default: 'NoElement' })\n public animation!: typeof Vue | string;\n\n /**\n * Time to wait without receiving any keystroke before resetting the items search query.\n *\n * @public\n */\n @Prop({ default: 1000 })\n public searchTimeoutMs!: number;\n\n public $refs!: {\n /** Array containing the dropdown list buttons HTMLElements. */\n itemButtons: HTMLButtonElement[];\n };\n\n /**\n * Property to track whether the dropdown is expanded and displaying the full\n * list of items, or closed.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Index of the element that has the focus in the list. -1 means no element has focus.\n *\n * @internal\n */\n protected highlightedItemIndex = -1;\n\n /**\n * String to search for the first element that starts with it.\n *\n * @internal\n */\n protected searchBuffer = '';\n\n /**\n * Resets the search buffer after a certain time has passed.\n *\n * @internal\n */\n protected restartResetSearchTimeout!: () => void;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n * @internal\n */\n protected get dropdownCSSClasses(): VueCSSClasses {\n return {\n 'x-dropdown--is-open': this.isOpen\n };\n }\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n * @internal\n */\n protected get itemsCSSClasses(): VueCSSClasses[] {\n return this.items.map((item, index) => {\n return {\n 'x-dropdown__item--is-selected': this.value === item,\n 'x-dropdown__item--is-highlighted': this.highlightedItemIndex === index\n };\n });\n }\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.removeDocumentCloseListeners();\n }\n\n /**\n * Opens the dropdown.\n *\n * @internal\n */\n protected open(): void {\n this.isOpen = true;\n }\n\n /**\n * Closes the dropdown.\n *\n * @internal\n */\n protected close(): void {\n this.isOpen = false;\n }\n\n /**\n * If the dropdown is opened it closes it. If it is closed it opens it.\n *\n * @internal\n */\n protected toggle(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n * @internal\n */\n protected emitSelectedItemChanged(item: DropdownItem): void {\n this.$emit('change', item);\n this.close();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightNextItem(): void {\n this.open();\n this.highlightedItemIndex = (this.highlightedItemIndex + 1) % this.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightPreviousItem(): void {\n this.open();\n this.highlightedItemIndex =\n this.highlightedItemIndex > 0 ? this.highlightedItemIndex - 1 : this.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n *\n * @internal\n */\n protected highlightFirstItem(): void {\n this.highlightedItemIndex = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n *\n * @internal\n */\n protected highlightLastItem(): void {\n this.highlightedItemIndex = this.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n * @internal\n */\n protected updateSearchBuffer(event: KeyboardEvent): void {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n this.searchBuffer += key;\n this.restartResetSearchTimeout();\n }\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items folowing this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n * @internal\n */\n @Watch('searchBuffer')\n protected highlightMatchingItem(search: string): void {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = this.$refs.itemButtons.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n this.highlightedItemIndex =\n // First matching item starting to search from the current highlighted element\n matchingIndices.find(index => index >= this.highlightedItemIndex) ??\n // First matching item\n matchingIndices[0] ??\n // First item\n 0;\n }\n }\n\n /**\n * Resets the search buffer.\n *\n * @internal\n */\n protected resetSearch(): void {\n this.searchBuffer = '';\n }\n\n /** Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n * @internal\n */\n @Watch('searchTimeoutMs', { immediate: true })\n protected updateSearchTimeout(searchTimeoutMs: number): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.restartResetSearchTimeout = debounce(this.resetSearch, searchTimeoutMs);\n }\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n * @internal\n */\n @Watch('highlightedItemIndex', { immediate: true })\n protected focusHighlightedItem(highlightedItemIndex: number): void {\n this.$nextTick(() => {\n if (this.$refs.itemButtons && isInRange(highlightedItemIndex, [0, this.items.length - 1])) {\n const newItem = this.$refs.itemButtons[this.highlightedItemIndex];\n newItem.focus();\n }\n });\n }\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected updateHighlightedItem(isOpen: boolean): void {\n if (isOpen) {\n this.highlightedItemIndex = this.value === null ? 0 : this.items.indexOf(this.value);\n } else {\n this.highlightedItemIndex = -1;\n }\n }\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected syncCloseListeners(isOpen: boolean): void {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether or not the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n this.addDocumentCloseListeners();\n } else {\n this.removeDocumentCloseListeners();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected addDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.addEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected removeDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.removeEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happen out of the dropdown component.\n */\n protected closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent): void {\n if (!this.$el.contains(event.target as HTMLElement)) {\n this.close();\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-dropdown {\n position: relative;\n\n &__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n left: 0;\n top: 100%;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown :items=\"items\" v-model=\"value\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: ['a']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n aria-haspopup=\"listbox\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"$scopedSlots.toggle\" :isOpen=\"isOpen\" :item=\"value\" name=\"toggle\" />\n <slot v-else :item=\"value\" name=\"item\" />\n </button>\n\n <component :is=\"animation\">\n <ul\n v-if=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"close\"\n @keydown.home=\"highlightFirstItem\"\n :aria-expanded=\"isOpen.toString()\"\n class=\"x-dropdown__items-list\"\n role=\"listbox\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n ref=\"itemButtons\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(index === highlightedItemIndex).toString()\"\n :aria-current=\"(item === value).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n tabindex=\"-1\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === value\"\n :item=\"item\"\n name=\"item\"\n />\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import Vue from 'vue';\n import { normalizeString } from '../utils/normalize';\n import { isInRange } from '../utils/number';\n import { debounce } from '../utils/debounce';\n import { VueCSSClasses } from '../utils/types';\n import { NoElement } from './no-element';\n\n type DropdownItem = string | number | Identifiable;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n model: {\n event: 'change'\n }\n })\n export default class BaseDropdown extends Vue {\n /**\n * List of items to display.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: DropdownItem[];\n\n /**\n * The selected item.\n *\n * @public\n */\n @Prop({ required: true })\n public value!: DropdownItem | null;\n\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n *\n * @public\n */\n @Prop({ default: 'NoElement' })\n public animation!: typeof Vue | string;\n\n /**\n * Time to wait without receiving any keystroke before resetting the items search query.\n *\n * @public\n */\n @Prop({ default: 1000 })\n public searchTimeoutMs!: number;\n\n public $refs!: {\n /** Array containing the dropdown list buttons HTMLElements. */\n itemButtons: HTMLButtonElement[];\n };\n\n /**\n * Property to track whether the dropdown is expanded and displaying the full\n * list of items, or closed.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Index of the element that has the focus in the list. -1 means no element has focus.\n *\n * @internal\n */\n protected highlightedItemIndex = -1;\n\n /**\n * String to search for the first element that starts with it.\n *\n * @internal\n */\n protected searchBuffer = '';\n\n /**\n * Resets the search buffer after a certain time has passed.\n *\n * @internal\n */\n protected restartResetSearchTimeout!: () => void;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n * @internal\n */\n protected get dropdownCSSClasses(): VueCSSClasses {\n return {\n 'x-dropdown--is-open': this.isOpen\n };\n }\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n * @internal\n */\n protected get itemsCSSClasses(): VueCSSClasses[] {\n return this.items.map((item, index) => {\n return {\n 'x-dropdown__item--is-selected': this.value === item,\n 'x-dropdown__item--is-highlighted': this.highlightedItemIndex === index\n };\n });\n }\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.removeDocumentCloseListeners();\n }\n\n /**\n * Opens the dropdown.\n *\n * @internal\n */\n protected open(): void {\n this.isOpen = true;\n }\n\n /**\n * Closes the dropdown.\n *\n * @internal\n */\n protected close(): void {\n this.isOpen = false;\n }\n\n /**\n * If the dropdown is opened it closes it. If it is closed it opens it.\n *\n * @internal\n */\n protected toggle(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n * @internal\n */\n protected emitSelectedItemChanged(item: DropdownItem): void {\n this.$emit('change', item);\n this.close();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightNextItem(): void {\n this.open();\n this.highlightedItemIndex = (this.highlightedItemIndex + 1) % this.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightPreviousItem(): void {\n this.open();\n this.highlightedItemIndex =\n this.highlightedItemIndex > 0 ? this.highlightedItemIndex - 1 : this.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n *\n * @internal\n */\n protected highlightFirstItem(): void {\n this.highlightedItemIndex = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n *\n * @internal\n */\n protected highlightLastItem(): void {\n this.highlightedItemIndex = this.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n * @internal\n */\n protected updateSearchBuffer(event: KeyboardEvent): void {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n this.searchBuffer += key;\n this.restartResetSearchTimeout();\n }\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items folowing this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n * @internal\n */\n @Watch('searchBuffer')\n protected highlightMatchingItem(search: string): void {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = this.$refs.itemButtons.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n this.highlightedItemIndex =\n // First matching item starting to search from the current highlighted element\n matchingIndices.find(index => index >= this.highlightedItemIndex) ??\n // First matching item\n matchingIndices[0] ??\n // First item\n 0;\n }\n }\n\n /**\n * Resets the search buffer.\n *\n * @internal\n */\n protected resetSearch(): void {\n this.searchBuffer = '';\n }\n\n /** Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n * @internal\n */\n @Watch('searchTimeoutMs', { immediate: true })\n protected updateSearchTimeout(searchTimeoutMs: number): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.restartResetSearchTimeout = debounce(this.resetSearch, searchTimeoutMs);\n }\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n * @internal\n */\n @Watch('highlightedItemIndex', { immediate: true })\n protected focusHighlightedItem(highlightedItemIndex: number): void {\n this.$nextTick(() => {\n if (this.$refs.itemButtons && isInRange(highlightedItemIndex, [0, this.items.length - 1])) {\n const newItem = this.$refs.itemButtons[this.highlightedItemIndex];\n newItem.focus();\n }\n });\n }\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected updateHighlightedItem(isOpen: boolean): void {\n if (isOpen) {\n this.highlightedItemIndex = this.value === null ? 0 : this.items.indexOf(this.value);\n } else {\n this.highlightedItemIndex = -1;\n }\n }\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected syncCloseListeners(isOpen: boolean): void {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether or not the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n this.addDocumentCloseListeners();\n } else {\n this.removeDocumentCloseListeners();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected addDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.addEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected removeDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.removeEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happen out of the dropdown component.\n */\n protected closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent): void {\n if (!this.$el.contains(event.target as HTMLElement)) {\n this.close();\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-dropdown {\n position: relative;\n\n &__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown :items=\"items\" v-model=\"value\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: ['a']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -259,11 +259,11 @@ __vue_render__._withStripped = true;
|
|
|
259
259
|
/* style */
|
|
260
260
|
var __vue_inject_styles__ = function (inject) {
|
|
261
261
|
if (!inject) { return }
|
|
262
|
-
inject("data-v-58202672_0", { source: ".dev-mode .slot-helper[data-v-58202672] {\n font-family: inherit;\n color: grey;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n width: 100%;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n border: dashed 1px grey;\n border-radius: 10px;\n}\n.x-layout[data-v-58202672] {\n --x-size-gap-default: var(--x-size-column-gap-layout-columns, 20px);\n --x-size-margin-max-width: calc((100vw - var(--x-size-max-width-layout-columns, 1440px)) / 2);\n --x-size-margin-layout-columns: max(\n var(--x-size-min-margin-layout-columns, 20px),\n var(--x-size-margin-max-width)\n );\n --x-number-columns-header-middle: calc(var(--x-number-columns-layout-columns, 5) - 2);\n --x-number-columns-sub-header-content: var(--x-number-columns-header-middle);\n --x-number-columns-toolbar-body: calc(var(--x-number-columns-layout-columns, 5) - 1);\n display: grid;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n max-height: 100%;\n grid-template-columns: [page-start] 1fr [scroll-to-top-start] calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default)) [scroll-to-top-end page-end];\n grid-template-rows: [page-start header-start] auto [header-end sub-header-start] auto [sub-header-end toolbar-start] auto [toolbar-end main-start] 1fr [scroll-to-top-start] auto [main-end scroll-to-top-end page-end];\n background-color: var(--x-color-background-layout-columns, white);\n border-color: var(--x-color-border-layout-columns);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns, 0);\n}\n.x-layout__header[data-v-58202672] {\n grid-column: page;\n grid-row: header;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [header-start] var(--x-size-margin-layout-columns) [start-content-start] 1fr [start-content-end middle-content-start] repeat(var(--x-number-columns-header-middle), 1fr) [middle-content-end end-content-start] 1fr [end-content-end] var(--x-size-margin-layout-columns) [header-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-header, 0);\n padding-top: var(--x-size-padding-top-layout-columns-header, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-header, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-header, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-header, 0);\n margin-top: var(--x-size-margin-top-layout-columns-header, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-header, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-header, 0);\n background-color: var(--x-color-background-layout-columns-header, transparent);\n border-color: var(--x-color-border-layout-columns-header, trasparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-header, 0);\n}\n.x-layout__header-start[data-v-58202672] {\n grid-column: start-content;\n}\n.x-layout__header-start.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-start, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-start, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-start, flex start);\n justify-content: var(--x-size-justify-layout-columns-header-start, flex start);\n -ms-flex-align: var(--x-size-align-layout-columns-header-start, flex start);\n align-items: var(--x-size-align-layout-columns-header-start, flex start);\n}\n.x-layout__header-middle[data-v-58202672] {\n grid-column: middle-content;\n}\n.x-layout__header-middle.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-middle, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-middle, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-middle, center);\n justify-content: var(--x-size-justify-layout-columns-header-middle, center);\n -ms-flex-align: var(--x-size-align-layout-columns-header-middle, flex start);\n align-items: var(--x-size-align-layout-columns-header-middle, flex start);\n}\n.x-layout__header-end[data-v-58202672] {\n grid-column: end-content;\n}\n.x-layout__header-end.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-end, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-end, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-end, flex-end);\n justify-content: var(--x-size-justify-layout-columns-header-end, flex-end);\n -ms-flex-align: var(--x-size-align-layout-columns-header-end, flex-start);\n align-items: var(--x-size-align-layout-columns-header-end, flex-start);\n}\n.x-layout__sub-header[data-v-58202672] {\n grid-column: page;\n grid-row: sub-header;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [sub-header-start] var(--x-size-margin-layout-columns) 1fr [sub-header-content-start] repeat(var(--x-number-columns-sub-header-content), 1fr) [sub-header-content-end] 1fr var(--x-size-margin-layout-columns) [sub-header-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-sub-header, 0);\n padding-top: var(--x-size-padding-top-layout-columns-sub-header, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-sub-header), 0;\n padding-bottom: var(--x-size-padding-bottom-layout-columns-sub-header), 0;\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-sub-header, 0);\n margin-top: var(--x-size-margin-top-layout-columns-sub-header, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-sub-header, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-sub-header, 0);\n background-color: var(--x-color-background-layout-columns-sub-header, transparent);\n border-color: var(--x-color-border-layout-columns-sub-header, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-sub-header, 0);\n}\n.x-layout__sub-header-content[data-v-58202672] {\n grid-column: sub-header-content;\n}\n.x-layout__sub-header-content.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-sub-header, row nowrap);\n flex-flow: var(--x-flow-layout-columns-sub-header, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-sub-header, flex-start);\n justify-content: var(--x-size-justify-layout-columns-sub-header, flex-start);\n -ms-flex-align: var(--x-size-align-layout-columns-sub-header, flex-start);\n align-items: var(--x-size-align-layout-columns-sub-header, flex-start);\n}\n.x-layout__toolbar[data-v-58202672] {\n grid-column: page;\n grid-row: toolbar;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [toolbar-start] var(--x-size-margin-layout-columns) [toolbar-aside-start] 1fr [toolbar-aside-end toolbar-body-start] repeat(var(--x-number-columns-toolbar-body), 1fr) [toolbar-body-end] var(--x-size-margin-layout-columns) [toolbar-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-toolbar, 0);\n padding-top: var(--x-size-padding-top-layout-columns-toolbar, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-toolbar, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-toolbar, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-toolbar, 0);\n margin-top: var(--x-size-margin-top-layout-columns-toolbar, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-toolbar, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-toolbar, 0);\n background-color: var(--x-color-background-layout-columns-toolbar, transparent);\n border-color: var(--x-color-border-layout-columns-toolbar, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-toolbar, 0);\n}\n.x-layout__toolbar-aside[data-v-58202672] {\n grid-column: toolbar-aside;\n}\n.x-layout__toolbar-aside.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-toolbar-aside, row nowrap);\n flex-flow: var(--x-flow-layout-columns-toolbar-aside, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-toolbar-aside, flex-start);\n justify-content: var(--x-size-justify-layout-columns-toolbar-aside, flex-start);\n -ms-flex-align: var(--x-size-align-layout-columns-toolbar-aside, center);\n align-items: var(--x-size-align-layout-columns-toolbar-aside, center);\n}\n.x-layout__toolbar-body[data-v-58202672] {\n grid-column: toolbar-body;\n}\n.x-layout__toolbar-body.x-list[data-v-58202672] {\n -ms-flex-flow: var(--x-flow-layout-columns-toolbar-body, row nowrap);\n flex-flow: var(--x-flow-layout-columns-toolbar-body, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-toolbar-body, flex-end);\n justify-content: var(--x-size-justify-layout-columns-toolbar-body, flex-end);\n -ms-flex-align: var(--x-size-align-layout-columns-toolbar-body, center);\n align-items: var(--x-size-align-layout-columns-toolbar-body, center);\n}\n.x-layout__main[data-v-58202672] {\n grid-column: page;\n grid-row: main;\n min-height: 0;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -ms-flex-pack: stretch;\n justify-content: stretch;\n padding-left: calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default));\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-main, 0);\n padding-top: var(--x-size-padding-top-layout-columns-main, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-main, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-main, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-main, 0);\n margin-top: var(--x-size-margin-top-layout-columns-main, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-main, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-main, 0);\n background-color: var(--x-color-background-layout-columns-main, transparent);\n border-color: var(--x-color-border-layout-columns-main, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main, 0);\n}\n.x-layout__collapse-aside[data-v-58202672] {\n width: calc( ( 100% - var(--x-size-gap-default) * (var(--x-number-columns-layout-columns, 5)) - var(--x-size-margin-layout-columns) ) / var(--x-number-columns-layout-columns, 5) + var(--x-size-gap-default) );\n}\n.x-layout__aside-scroll[data-v-58202672] {\n height: 100%;\n margin-right: var(--x-size-gap-default);\n}\n.x-layout__main-aside[data-v-58202672] {\n background-color: var(--x-color-background-layout-columns-main-aside, transparent);\n border-color: var(--x-color-border-layout-columns-main-aside, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main-aside, 0);\n}\n.x-layout__body-scroll[data-v-58202672] {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 0;\n padding-right: calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default) - 16px);\n}\n.x-layout__body-scroll.x-scroll[data-v-58202672] {\n --x-string-overflow-scroll: scroll;\n}\n.x-layout__main-body[data-v-58202672] {\n background-color: var(--x-color-background-layout-columns-main-body, transparent);\n border-color: var(--x-color-border-layout-columns-main-body, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main-body, 0);\n}\n.x-layout__main-body[data-v-58202672] .x-grid {\n --x-size-gap-grid: var(--x-size-gap-default);\n}\n[dir=\"ltr\"] .x-layout__scroll-to-top[data-v-58202672] {\n margin-left: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n}\n[dir=\"rtl\"] .x-layout__scroll-to-top[data-v-58202672] {\n margin-right: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n}\n.x-layout__scroll-to-top[data-v-58202672] {\n grid-area: scroll-to-top;\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-scroll-to-top, 10px);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-scroll-to-top, 10px);\n -webkit-margin-start: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n z-index: 1;\n}", map: undefined, media: undefined });
|
|
262
|
+
inject("data-v-242cf01e_0", { source: ".dev-mode .slot-helper[data-v-242cf01e] {\n font-family: inherit;\n color: grey;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n width: 100%;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n border: dashed 1px grey;\n border-radius: 10px;\n}\n.x-layout[data-v-242cf01e] {\n --x-size-gap-default: var(--x-size-column-gap-layout-columns, 20px);\n --x-size-margin-max-width: calc((100vw - var(--x-size-max-width-layout-columns, 1440px)) / 2);\n --x-size-margin-layout-columns: max(\n var(--x-size-min-margin-layout-columns, 20px),\n var(--x-size-margin-max-width)\n );\n --x-number-columns-header-middle: calc(var(--x-number-columns-layout-columns, 5) - 2);\n --x-number-columns-sub-header-content: var(--x-number-columns-header-middle);\n --x-number-columns-toolbar-body: calc(var(--x-number-columns-layout-columns, 5) - 1);\n display: grid;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n max-height: 100%;\n grid-template-columns: [page-start] 1fr [scroll-to-top-start] calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default)) [scroll-to-top-end page-end];\n grid-template-rows: [page-start header-start] auto [header-end sub-header-start] auto [sub-header-end toolbar-start] auto [toolbar-end main-start] 1fr [scroll-to-top-start] auto [main-end scroll-to-top-end page-end];\n background-color: var(--x-color-background-layout-columns, white);\n border-color: var(--x-color-border-layout-columns);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns, 0);\n}\n.x-layout__header[data-v-242cf01e] {\n grid-column: page;\n grid-row: header;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [header-start] var(--x-size-margin-layout-columns) [start-content-start] 1fr [start-content-end middle-content-start] repeat(var(--x-number-columns-header-middle), 1fr) [middle-content-end end-content-start] 1fr [end-content-end] var(--x-size-margin-layout-columns) [header-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-header, 0);\n padding-top: var(--x-size-padding-top-layout-columns-header, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-header, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-header, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-header, 0);\n margin-top: var(--x-size-margin-top-layout-columns-header, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-header, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-header, 0);\n background-color: var(--x-color-background-layout-columns-header, transparent);\n border-color: var(--x-color-border-layout-columns-header, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-header, 0);\n}\n.x-layout__header-start[data-v-242cf01e] {\n grid-column: start-content;\n}\n.x-layout__header-start.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-start, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-start, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-start, flex start);\n justify-content: var(--x-size-justify-layout-columns-header-start, flex start);\n -ms-flex-align: var(--x-size-align-layout-columns-header-start, flex start);\n align-items: var(--x-size-align-layout-columns-header-start, flex start);\n}\n.x-layout__header-middle[data-v-242cf01e] {\n grid-column: middle-content;\n}\n.x-layout__header-middle.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-middle, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-middle, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-middle, center);\n justify-content: var(--x-size-justify-layout-columns-header-middle, center);\n -ms-flex-align: var(--x-size-align-layout-columns-header-middle, flex start);\n align-items: var(--x-size-align-layout-columns-header-middle, flex start);\n}\n.x-layout__header-end[data-v-242cf01e] {\n grid-column: end-content;\n}\n.x-layout__header-end.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-header-end, row nowrap);\n flex-flow: var(--x-flow-layout-columns-header-end, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-header-end, flex-end);\n justify-content: var(--x-size-justify-layout-columns-header-end, flex-end);\n -ms-flex-align: var(--x-size-align-layout-columns-header-end, flex-start);\n align-items: var(--x-size-align-layout-columns-header-end, flex-start);\n}\n.x-layout__sub-header[data-v-242cf01e] {\n grid-column: page;\n grid-row: sub-header;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [sub-header-start] var(--x-size-margin-layout-columns) 1fr [sub-header-content-start] repeat(var(--x-number-columns-sub-header-content), 1fr) [sub-header-content-end] 1fr var(--x-size-margin-layout-columns) [sub-header-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-sub-header, 0);\n padding-top: var(--x-size-padding-top-layout-columns-sub-header, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-sub-header), 0;\n padding-bottom: var(--x-size-padding-bottom-layout-columns-sub-header), 0;\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-sub-header, 0);\n margin-top: var(--x-size-margin-top-layout-columns-sub-header, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-sub-header, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-sub-header, 0);\n background-color: var(--x-color-background-layout-columns-sub-header, transparent);\n border-color: var(--x-color-border-layout-columns-sub-header, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-sub-header, 0);\n}\n.x-layout__sub-header-content[data-v-242cf01e] {\n grid-column: sub-header-content;\n}\n.x-layout__sub-header-content.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-sub-header, row nowrap);\n flex-flow: var(--x-flow-layout-columns-sub-header, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-sub-header, flex-start);\n justify-content: var(--x-size-justify-layout-columns-sub-header, flex-start);\n -ms-flex-align: var(--x-size-align-layout-columns-sub-header, flex-start);\n align-items: var(--x-size-align-layout-columns-sub-header, flex-start);\n}\n.x-layout__toolbar[data-v-242cf01e] {\n grid-column: page;\n grid-row: toolbar;\n display: grid;\n column-gap: var(--x-size-gap-default);\n grid-template-columns: [toolbar-start] var(--x-size-margin-layout-columns) [toolbar-aside-start] 1fr [toolbar-aside-end toolbar-body-start] repeat(var(--x-number-columns-toolbar-body), 1fr) [toolbar-body-end] var(--x-size-margin-layout-columns) [toolbar-end];\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-toolbar, 0);\n padding-top: var(--x-size-padding-top-layout-columns-toolbar, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-toolbar, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-toolbar, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-toolbar, 0);\n margin-top: var(--x-size-margin-top-layout-columns-toolbar, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-toolbar, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-toolbar, 0);\n background-color: var(--x-color-background-layout-columns-toolbar, transparent);\n border-color: var(--x-color-border-layout-columns-toolbar, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-toolbar, 0);\n}\n.x-layout__toolbar-aside[data-v-242cf01e] {\n grid-column: toolbar-aside;\n}\n.x-layout__toolbar-aside.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-toolbar-aside, row nowrap);\n flex-flow: var(--x-flow-layout-columns-toolbar-aside, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-toolbar-aside, flex-start);\n justify-content: var(--x-size-justify-layout-columns-toolbar-aside, flex-start);\n -ms-flex-align: var(--x-size-align-layout-columns-toolbar-aside, center);\n align-items: var(--x-size-align-layout-columns-toolbar-aside, center);\n}\n.x-layout__toolbar-body[data-v-242cf01e] {\n grid-column: toolbar-body;\n}\n.x-layout__toolbar-body.x-list[data-v-242cf01e] {\n -ms-flex-flow: var(--x-flow-layout-columns-toolbar-body, row nowrap);\n flex-flow: var(--x-flow-layout-columns-toolbar-body, row nowrap);\n -ms-flex-pack: var(--x-size-justify-layout-columns-toolbar-body, flex-end);\n justify-content: var(--x-size-justify-layout-columns-toolbar-body, flex-end);\n -ms-flex-align: var(--x-size-align-layout-columns-toolbar-body, center);\n align-items: var(--x-size-align-layout-columns-toolbar-body, center);\n}\n.x-layout__main[data-v-242cf01e] {\n grid-column: page;\n grid-row: main;\n min-height: 0;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -ms-flex-pack: stretch;\n justify-content: stretch;\n padding-left: calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default));\n -webkit-padding-before: var(--x-size-padding-top-layout-columns-main, 0);\n padding-top: var(--x-size-padding-top-layout-columns-main, 0);\n -webkit-padding-after: var(--x-size-padding-bottom-layout-columns-main, 0);\n padding-bottom: var(--x-size-padding-bottom-layout-columns-main, 0);\n -webkit-margin-before: var(--x-size-margin-top-layout-columns-main, 0);\n margin-top: var(--x-size-margin-top-layout-columns-main, 0);\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-main, 0);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-main, 0);\n background-color: var(--x-color-background-layout-columns-main, transparent);\n border-color: var(--x-color-border-layout-columns-main, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main, 0);\n}\n.x-layout__collapse-aside[data-v-242cf01e] {\n width: calc( ( 100% - var(--x-size-gap-default) * (var(--x-number-columns-layout-columns, 5)) - var(--x-size-margin-layout-columns) ) / var(--x-number-columns-layout-columns, 5) + var(--x-size-gap-default) );\n}\n.x-layout__aside-scroll[data-v-242cf01e] {\n height: 100%;\n margin-right: var(--x-size-gap-default);\n}\n.x-layout__main-aside[data-v-242cf01e] {\n background-color: var(--x-color-background-layout-columns-main-aside, transparent);\n border-color: var(--x-color-border-layout-columns-main-aside, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main-aside, 0);\n}\n.x-layout__body-scroll[data-v-242cf01e] {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 0;\n padding-right: calc(var(--x-size-margin-layout-columns) + var(--x-size-gap-default) - 16px);\n}\n.x-layout__body-scroll.x-scroll[data-v-242cf01e] {\n --x-string-overflow-scroll: scroll;\n}\n.x-layout__main-body[data-v-242cf01e] {\n background-color: var(--x-color-background-layout-columns-main-body, transparent);\n border-color: var(--x-color-border-layout-columns-main-body, transparent);\n border-style: solid;\n border-width: var(--x-size-border-width-layout-columns-main-body, 0);\n}\n.x-layout__main-body[data-v-242cf01e] .x-grid {\n --x-size-gap-grid: var(--x-size-gap-default);\n}\n[dir=\"ltr\"] .x-layout__scroll-to-top[data-v-242cf01e] {\n margin-left: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n}\n[dir=\"rtl\"] .x-layout__scroll-to-top[data-v-242cf01e] {\n margin-right: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n}\n.x-layout__scroll-to-top[data-v-242cf01e] {\n grid-area: scroll-to-top;\n -webkit-margin-after: var(--x-size-margin-bottom-layout-columns-scroll-to-top, 10px);\n margin-bottom: var(--x-size-margin-bottom-layout-columns-scroll-to-top, 10px);\n -webkit-margin-start: var(--x-size-margin-left-layout-columns-scroll-to-top, 10px);\n z-index: 1;\n}", map: undefined, media: undefined });
|
|
263
263
|
|
|
264
264
|
};
|
|
265
265
|
/* scoped */
|
|
266
|
-
var __vue_scope_id__ = "data-v-
|
|
266
|
+
var __vue_scope_id__ = "data-v-242cf01e";
|
|
267
267
|
/* module identifier */
|
|
268
268
|
var __vue_module_identifier__ = undefined;
|
|
269
269
|
/* functional template */
|