@empathyco/x-components 9.3.1 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/core/index.js +3 -1
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.aicarousel.md +2 -2
- package/docs/API-reference/api/x-components.basecolumnpickerdropdown.md +2 -2
- package/docs/API-reference/api/x-components.basecolumnpickerlist.md +2 -2
- package/docs/API-reference/api/x-components.basecurrency.md +2 -0
- package/docs/API-reference/api/x-components.basedropdown.md +2 -2
- package/docs/API-reference/api/x-components.baseeventsmodalclose.md +2 -2
- package/docs/API-reference/api/x-components.baseeventsmodalopen.md +2 -2
- package/docs/API-reference/api/x-components.basemodal.md +2 -2
- package/docs/API-reference/api/x-components.basepricefilterlabel.md +2 -0
- package/docs/API-reference/api/x-components.baseresultcurrentprice.md +2 -0
- package/docs/API-reference/api/x-components.baseresultpreviousprice.md +2 -0
- package/docs/API-reference/api/x-components.clearhistoryqueries.md +2 -2
- package/docs/API-reference/api/x-components.deepmergewithdefaults.md +85 -0
- package/docs/API-reference/api/x-components.editablenumberrangefilter.md +2 -2
- package/docs/API-reference/api/x-components.facets.md +2 -2
- package/docs/API-reference/api/x-components.filterssearch.md +2 -2
- package/docs/API-reference/api/x-components.historyqueriesswitch.md +2 -2
- package/docs/API-reference/api/x-components.historyquery.md +2 -2
- package/docs/API-reference/api/x-components.md +30 -0
- package/docs/API-reference/api/x-components.pageloaderbutton.md +2 -2
- package/docs/API-reference/api/x-components.pageselector.md +2 -2
- package/docs/API-reference/api/x-components.removehistoryquery.md +2 -2
- package/docs/API-reference/api/x-components.scrolltotop.md +2 -2
- package/docs/API-reference/api/x-components.searchinput.md +2 -2
- package/docs/API-reference/api/x-components.sliderfilter.md +2 -2
- package/docs/API-reference/api/x-components.sortdropdown.md +2 -2
- package/docs/API-reference/api/x-components.useaccessibilitylabels.md +72 -0
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +19 -0
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +37 -0
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +21 -0
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +22 -0
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-dropdown.vue2.js +11 -4
- package/js/components/base-dropdown.vue2.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue2.js +1 -0
- package/js/components/base-keyboard-navigation.vue2.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue2.js +10 -3
- package/js/components/column-picker/base-column-picker-dropdown.vue2.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue2.js +10 -3
- package/js/components/column-picker/base-column-picker-list.vue2.js.map +1 -1
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue2.js +8 -1
- package/js/components/currency/base-currency.vue2.js.map +1 -1
- package/js/components/display-click-provider.vue.js +2 -1
- package/js/components/display-click-provider.vue.js.map +1 -1
- package/js/components/filters/labels/base-price-filter-label.vue.js +8 -0
- package/js/components/filters/labels/base-price-filter-label.vue.js.map +1 -1
- package/js/components/highlight.vue2.js +1 -0
- package/js/components/highlight.vue2.js.map +1 -1
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-close.vue2.js +10 -3
- package/js/components/modals/base-events-modal-close.vue2.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue2.js +10 -3
- package/js/components/modals/base-events-modal-open.vue2.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue2.js +2 -1
- package/js/components/modals/base-id-modal-close.vue2.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue2.js +2 -1
- package/js/components/modals/base-id-modal-open.vue2.js.map +1 -1
- package/js/components/modals/base-id-modal.vue2.js +2 -1
- package/js/components/modals/base-id-modal.vue2.js.map +1 -1
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue2.js +3 -3
- package/js/components/modals/base-modal.vue2.js.map +1 -1
- package/js/components/page-loader-button.vue.js.map +1 -1
- package/js/components/page-loader-button.vue2.js +3 -3
- package/js/components/page-loader-button.vue2.js.map +1 -1
- package/js/components/page-selector.vue.js.map +1 -1
- package/js/components/page-selector.vue2.js +3 -3
- package/js/components/page-selector.vue2.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue2.js +1 -0
- package/js/components/panels/base-id-toggle-panel-button.vue2.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue2.js +2 -1
- package/js/components/panels/base-id-toggle-panel.vue2.js.map +1 -1
- package/js/components/result/base-result-current-price.vue.js +3 -2
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-current-price.vue2.js +6 -0
- package/js/components/result/base-result-current-price.vue2.js.map +1 -1
- package/js/components/result/base-result-link.vue2.js +2 -1
- package/js/components/result/base-result-link.vue2.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.js +3 -2
- package/js/components/result/base-result-previous-price.vue.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue2.js +6 -0
- package/js/components/result/base-result-previous-price.vue2.js.map +1 -1
- package/js/components/result/base-result-rating.vue2.js +2 -1
- package/js/components/result/base-result-rating.vue2.js.map +1 -1
- package/js/components/sort/sort-dropdown.vue.js.map +1 -1
- package/js/components/sort/sort-dropdown.vue2.js +10 -3
- package/js/components/sort/sort-dropdown.vue2.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue2.js +1 -0
- package/js/components/suggestions/base-suggestion.vue2.js.map +1 -1
- package/js/composables/use-accessibility-labels.js +40 -0
- package/js/composables/use-accessibility-labels.js.map +1 -0
- package/js/index.js +3 -1
- package/js/index.js.map +1 -1
- package/js/utils/accessibility.js +1 -19
- package/js/utils/accessibility.js.map +1 -1
- package/js/utils/deep-merge-with-defaults.js +47 -0
- package/js/utils/deep-merge-with-defaults.js.map +1 -0
- package/js/x-installer/x-installer.js +0 -4
- package/js/x-installer/x-installer.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue2.js +3 -3
- package/js/x-modules/ai/components/ai-carousel.vue2.js.map +1 -1
- package/js/x-modules/ai/components/ai-grouped-carousel.vue2.js +1 -0
- package/js/x-modules/ai/components/ai-grouped-carousel.vue2.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue2.js +2 -2
- package/js/x-modules/facets/components/facets/facets-provider.vue2.js +1 -0
- package/js/x-modules/facets/components/facets/facets-provider.vue2.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue2.js +9 -3
- package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue2.js +3 -3
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/slider-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/slider-filter.vue2.js +3 -3
- package/js/x-modules/facets/components/filters/slider-filter.vue2.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue2.js +10 -3
- package/js/x-modules/facets/components/lists/filters-search.vue2.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue.js +1 -0
- package/js/x-modules/facets/components/lists/sorted-filters.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue2.js +10 -3
- package/js/x-modules/history-queries/components/clear-history-queries.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries-switch.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries-switch.vue2.js +10 -3
- package/js/x-modules/history-queries/components/history-queries-switch.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue2.js +10 -3
- package/js/x-modules/history-queries/components/history-query.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue2.js +10 -3
- package/js/x-modules/history-queries/components/remove-history-query.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +1 -0
- package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js +2 -2
- package/js/x-modules/query-suggestions/components/query-suggestion.vue2.js +1 -0
- package/js/x-modules/query-suggestions/components/query-suggestion.vue2.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue2.js +1 -0
- package/js/x-modules/query-suggestions/components/query-suggestions.vue2.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue2.js +1 -0
- package/js/x-modules/recommendations/components/recommendations.vue2.js.map +1 -1
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +2 -1
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js +3 -3
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
- package/js/x-modules/search/wiring.js +1 -0
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue2.js +11 -4
- package/js/x-modules/search-box/components/search-input.vue2.js.map +1 -1
- package/js/x-modules/semantic-queries/components/semantic-queries.vue2.js +1 -0
- package/js/x-modules/semantic-queries/components/semantic-queries.vue2.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +485 -52
- package/report/x-components.api.md +54 -43
- package/types/src/components/base-dropdown.vue.d.ts +2 -2
- package/types/src/components/column-picker/base-column-picker-dropdown.vue.d.ts +2 -2
- package/types/src/components/column-picker/base-column-picker-dropdown.vue.d.ts.map +1 -1
- package/types/src/components/column-picker/base-column-picker-list.vue.d.ts +2 -2
- package/types/src/components/column-picker/base-column-picker-list.vue.d.ts.map +1 -1
- package/types/src/components/currency/base-currency.vue.d.ts +12 -0
- package/types/src/components/currency/base-currency.vue.d.ts.map +1 -1
- package/types/src/components/filters/labels/base-price-filter-label.vue.d.ts +12 -0
- package/types/src/components/filters/labels/base-price-filter-label.vue.d.ts.map +1 -1
- package/types/src/components/modals/base-events-modal-close.vue.d.ts +2 -2
- package/types/src/components/modals/base-events-modal-close.vue.d.ts.map +1 -1
- package/types/src/components/modals/base-events-modal-open.vue.d.ts +2 -2
- package/types/src/components/modals/base-events-modal-open.vue.d.ts.map +1 -1
- package/types/src/components/modals/base-modal.vue.d.ts +2 -2
- package/types/src/components/modals/base-modal.vue.d.ts.map +1 -1
- package/types/src/components/page-loader-button.vue.d.ts +2 -2
- package/types/src/components/page-loader-button.vue.d.ts.map +1 -1
- package/types/src/components/page-selector.vue.d.ts +2 -2
- package/types/src/components/page-selector.vue.d.ts.map +1 -1
- package/types/src/components/result/base-result-current-price.vue.d.ts +12 -0
- package/types/src/components/result/base-result-current-price.vue.d.ts.map +1 -1
- package/types/src/components/result/base-result-previous-price.vue.d.ts +12 -0
- package/types/src/components/result/base-result-previous-price.vue.d.ts.map +1 -1
- package/types/src/components/sort/sort-dropdown.vue.d.ts +2 -2
- package/types/src/components/sort/sort-dropdown.vue.d.ts.map +1 -1
- package/types/src/composables/index.d.ts +1 -0
- package/types/src/composables/index.d.ts.map +1 -1
- package/types/src/composables/use-accessibility-labels.d.ts +31 -0
- package/types/src/composables/use-accessibility-labels.d.ts.map +1 -0
- package/types/src/utils/accessibility.d.ts +0 -10
- package/types/src/utils/accessibility.d.ts.map +1 -1
- package/types/src/utils/deep-merge-with-defaults.d.ts +28 -0
- package/types/src/utils/deep-merge-with-defaults.d.ts.map +1 -0
- package/types/src/utils/index.d.ts +1 -0
- package/types/src/utils/index.d.ts.map +1 -1
- package/types/src/x-installer/x-installer.d.ts.map +1 -1
- package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts +2 -2
- package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/facets/facets.vue.d.ts +2 -2
- package/types/src/x-modules/facets/components/facets/facets.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/editable-number-range-filter.vue.d.ts +2 -2
- package/types/src/x-modules/facets/components/filters/editable-number-range-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/slider-filter.vue.d.ts +2 -2
- package/types/src/x-modules/facets/components/filters/slider-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/lists/filters-search.vue.d.ts +2 -2
- package/types/src/x-modules/facets/components/lists/filters-search.vue.d.ts.map +1 -1
- package/types/src/x-modules/history-queries/components/clear-history-queries.vue.d.ts +2 -2
- package/types/src/x-modules/history-queries/components/clear-history-queries.vue.d.ts.map +1 -1
- package/types/src/x-modules/history-queries/components/history-queries-switch.vue.d.ts +2 -2
- package/types/src/x-modules/history-queries/components/history-queries-switch.vue.d.ts.map +1 -1
- package/types/src/x-modules/history-queries/components/history-query.vue.d.ts +2 -2
- package/types/src/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
- package/types/src/x-modules/history-queries/components/remove-history-query.vue.d.ts +2 -2
- package/types/src/x-modules/history-queries/components/remove-history-query.vue.d.ts.map +1 -1
- package/types/src/x-modules/scroll/components/scroll-to-top.vue.d.ts +2 -2
- package/types/src/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -1
- package/types/src/x-modules/search-box/components/search-input.vue.d.ts +2 -2
- package/types/src/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.4.0](https://github.com/empathyco/x/compare/@empathyco/x-components@9.3.2...@empathyco/x-components@9.4.0) (2026-10-12)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add locale prop to currency components for customizable formatting (#2186)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [9.3.2](https://github.com/empathyco/x/compare/@empathyco/x-components@9.3.1...@empathyco/x-components@9.3.2) (2026-10-09)
|
|
14
|
+
|
|
15
|
+
### Code Refactoring
|
|
16
|
+
|
|
17
|
+
* replace mergeAccessibilityLabels with useAccessibilityLabels for improved aria label handling (#2184)
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
## [9.3.1](https://github.com/empathyco/x/compare/@empathyco/x-components@9.3.0...@empathyco/x-components@9.3.1) (2026-10-09)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
package/core/index.js
CHANGED
|
@@ -153,6 +153,7 @@ export { default as BaseSuggestions } from '../js/components/suggestions/base-su
|
|
|
153
153
|
export { getRootXComponent, getXComponentXModuleName, isXComponent } from '../js/components/x-component.utils.js';
|
|
154
154
|
export { createUseDevice } from '../js/composables/create-use-device.js';
|
|
155
155
|
export { use$x } from '../js/composables/use-_x.js';
|
|
156
|
+
export { useAccessibilityLabels } from '../js/composables/use-accessibility-labels.js';
|
|
156
157
|
export { useAliasApi } from '../js/composables/use-alias-api.js';
|
|
157
158
|
export { useDebounce } from '../js/composables/use-debounce.js';
|
|
158
159
|
export { useGetter } from '../js/composables/use-getter.js';
|
|
@@ -175,11 +176,12 @@ export { createStoreEmitters } from '../js/store/utils/store-emitters.utils.js';
|
|
|
175
176
|
export { RootXStoreModule } from '../js/store/x.module.js';
|
|
176
177
|
export { ACCESSIBILITY_KEY } from '../js/types/accessibility.js';
|
|
177
178
|
export { AnimationProp } from '../js/types/animation-prop.js';
|
|
178
|
-
export { DEFAULT_ARIA_LABELS
|
|
179
|
+
export { DEFAULT_ARIA_LABELS } from '../js/utils/accessibility.js';
|
|
179
180
|
export { arrayToObject, createEmitterArrayFilter, deepFilter, deepFlat, groupItemsBy, isArrayEmpty } from '../js/utils/array.js';
|
|
180
181
|
export { CancelSymbol, cancellablePromise } from '../js/utils/cancellable-promise.js';
|
|
181
182
|
export { clone } from '../js/utils/clone.js';
|
|
182
183
|
export { debounce as debounceFunction } from '../js/utils/debounce.js';
|
|
184
|
+
export { deepMergeWithDefaults } from '../js/utils/deep-merge-with-defaults.js';
|
|
183
185
|
export { areFiltersDifferent, createRawFilters } from '../js/utils/filters.js';
|
|
184
186
|
export { FOCUSABLE_SELECTORS } from '../js/utils/focus.js';
|
|
185
187
|
export { noOp } from '../js/utils/function.js';
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,10 +17,10 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
19
|
}>, {
|
|
20
|
-
ariaLabels: {
|
|
20
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
21
21
|
expand?: string;
|
|
22
22
|
collapse?: string;
|
|
23
|
-
}
|
|
23
|
+
}>;
|
|
24
24
|
emptyTaggingRequest: TaggingRequest;
|
|
25
25
|
isTitleOverflowing: import("vue").Ref<boolean, boolean>;
|
|
26
26
|
queries: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionQuery[]>;
|
|
@@ -19,9 +19,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
19
19
|
modelValue: NumberConstructor;
|
|
20
20
|
animation: PropType<string | Component>;
|
|
21
21
|
}>, {
|
|
22
|
-
ariaLabels: {
|
|
22
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
23
23
|
dropdown?: string;
|
|
24
|
-
}
|
|
24
|
+
}>;
|
|
25
25
|
emitEvents: (column: number) => void;
|
|
26
26
|
hasToggleSlot: boolean;
|
|
27
27
|
selectedColumns: import("vue").Ref<number, number>;
|
|
@@ -19,9 +19,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
19
19
|
modelValue: NumberConstructor;
|
|
20
20
|
buttonClass: StringConstructor;
|
|
21
21
|
}>, {
|
|
22
|
-
ariaLabels: {
|
|
22
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
23
23
|
button?: (page: number) => string;
|
|
24
|
-
}
|
|
24
|
+
}>;
|
|
25
25
|
columnsWithCssClasses: import("vue").ComputedRef<ColumnPickerItem[]>;
|
|
26
26
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
27
|
columns: {
|
|
@@ -17,6 +17,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
17
17
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
18
18
|
default: () => {};
|
|
19
19
|
};
|
|
20
|
+
locale: StringConstructor;
|
|
20
21
|
}>, {
|
|
21
22
|
currencyText: import("vue").ComputedRef<string>;
|
|
22
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -29,6 +30,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
29
30
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
30
31
|
default: () => {};
|
|
31
32
|
};
|
|
33
|
+
locale: StringConstructor;
|
|
32
34
|
}>> & Readonly<{}>, {
|
|
33
35
|
format: Omit<Intl.NumberFormatOptions, "currency" | "style">;
|
|
34
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>
|
|
@@ -28,9 +28,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
28
28
|
default: number;
|
|
29
29
|
};
|
|
30
30
|
}>, {
|
|
31
|
-
ariaLabels: {
|
|
31
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
32
32
|
toggleButton?: string;
|
|
33
|
-
}
|
|
33
|
+
}>;
|
|
34
34
|
hasToggleSlot: boolean;
|
|
35
35
|
closeAndFocusToggleButton: () => void;
|
|
36
36
|
dropdownCSSClasses: import("vue").ComputedRef<{
|
|
@@ -15,9 +15,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
}>, {
|
|
18
|
-
ariaLabels: {
|
|
18
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
19
19
|
button?: string;
|
|
20
|
-
}
|
|
20
|
+
}>;
|
|
21
21
|
events: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
22
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
closingEvent: {
|
|
@@ -15,9 +15,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
}>, {
|
|
18
|
-
ariaLabels: {
|
|
18
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
19
19
|
button?: string;
|
|
20
|
-
}
|
|
20
|
+
}>;
|
|
21
21
|
events: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
22
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
openingEvent: {
|
|
@@ -30,9 +30,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
30
30
|
contentClass: StringConstructor;
|
|
31
31
|
overlayClass: StringConstructor;
|
|
32
32
|
}>, {
|
|
33
|
-
ariaLabels: {
|
|
33
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
34
34
|
modal?: string;
|
|
35
|
-
}
|
|
35
|
+
}>;
|
|
36
36
|
emitOverlayClicked: (event: Event) => void;
|
|
37
37
|
isWaitingForLeave: import("vue").Ref<boolean, boolean>;
|
|
38
38
|
modalContentRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
@@ -18,6 +18,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
18
18
|
};
|
|
19
19
|
currency: StringConstructor;
|
|
20
20
|
format: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
21
|
+
locale: StringConstructor;
|
|
21
22
|
lessThan: {
|
|
22
23
|
type: StringConstructor;
|
|
23
24
|
required: true;
|
|
@@ -41,6 +42,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
41
42
|
};
|
|
42
43
|
currency: StringConstructor;
|
|
43
44
|
format: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
45
|
+
locale: StringConstructor;
|
|
44
46
|
lessThan: {
|
|
45
47
|
type: StringConstructor;
|
|
46
48
|
required: true;
|
|
@@ -19,6 +19,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
19
19
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
20
20
|
default: () => {};
|
|
21
21
|
};
|
|
22
|
+
locale: StringConstructor;
|
|
22
23
|
}>, {
|
|
23
24
|
dynamicClasses: import("vue").ComputedRef<VueCSSClasses>;
|
|
24
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -31,6 +32,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
31
32
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
32
33
|
default: () => {};
|
|
33
34
|
};
|
|
35
|
+
locale: StringConstructor;
|
|
34
36
|
}>> & Readonly<{}>, {
|
|
35
37
|
format: Omit<Intl.NumberFormatOptions, "currency" | "style">;
|
|
36
38
|
}, {}, {
|
|
@@ -19,6 +19,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
19
19
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
20
20
|
default: () => {};
|
|
21
21
|
};
|
|
22
|
+
locale: StringConstructor;
|
|
22
23
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
24
|
result: {
|
|
24
25
|
type: PropType<Result>;
|
|
@@ -29,6 +30,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
29
30
|
type: PropType<Omit<Intl.NumberFormatOptions, "currency" | "style">>;
|
|
30
31
|
default: () => {};
|
|
31
32
|
};
|
|
33
|
+
locale: StringConstructor;
|
|
32
34
|
}>> & Readonly<{}>, {
|
|
33
35
|
format: Omit<Intl.NumberFormatOptions, "currency" | "style">;
|
|
34
36
|
}, {}, {
|
|
@@ -10,9 +10,9 @@ A button that when is pressed, emits the [HistoryQueriesXEvents.UserPressedClear
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
_default: import("vue").DefineComponent<{}, {
|
|
13
|
-
ariaLabels: {
|
|
13
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
14
14
|
button?: string;
|
|
15
|
-
}
|
|
15
|
+
}>;
|
|
16
16
|
dynamicClasses: import("vue").ComputedRef<VueCSSClasses>;
|
|
17
17
|
clearHistoryQueriesEvents: Partial<XEventsTypes>;
|
|
18
18
|
isHistoryQueriesEmpty: import("vue").ComputedRef<boolean>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [deepMergeWithDefaults](./x-components.deepmergewithdefaults.md)
|
|
4
|
+
|
|
5
|
+
## deepMergeWithDefaults() function
|
|
6
|
+
|
|
7
|
+
Deeply merges `overrides` onto `defaults` at any depth, so nested objects can be overridden partially without losing the rest of the default configuration:
|
|
8
|
+
|
|
9
|
+
- The keys of `defaults` define the shape of the result: keys that do not exist in `defaults` are ignored. - An `undefined` entry in `overrides` keeps the default value. - When both the default and the override are plain objects, they are merged recursively. - Any other value (string, function, array, `null`<!-- -->...) in `overrides` replaces the default.
|
|
10
|
+
|
|
11
|
+
Neither input is mutated.
|
|
12
|
+
|
|
13
|
+
**Signature:**
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
export declare function deepMergeWithDefaults<T extends object>(defaults: T, overrides?: DeepPartial<T>): T;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
<table><thead><tr><th>
|
|
22
|
+
|
|
23
|
+
Parameter
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
</th><th>
|
|
27
|
+
|
|
28
|
+
Type
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
</th><th>
|
|
32
|
+
|
|
33
|
+
Description
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
</th></tr></thead>
|
|
37
|
+
<tbody><tr><td>
|
|
38
|
+
|
|
39
|
+
defaults
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
</td><td>
|
|
43
|
+
|
|
44
|
+
T
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</td><td>
|
|
48
|
+
|
|
49
|
+
The base object. It provides the result shape and the fallback values.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</td></tr>
|
|
53
|
+
<tr><td>
|
|
54
|
+
|
|
55
|
+
overrides
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
</td><td>
|
|
59
|
+
|
|
60
|
+
DeepPartial<T>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</td><td>
|
|
64
|
+
|
|
65
|
+
_(Optional)_ The values that win over the defaults at each leaf.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</td></tr>
|
|
69
|
+
</tbody></table>
|
|
70
|
+
|
|
71
|
+
**Returns:**
|
|
72
|
+
|
|
73
|
+
T
|
|
74
|
+
|
|
75
|
+
A new object with the same shape as `defaults`<!-- -->.
|
|
76
|
+
|
|
77
|
+
## Example
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
const defaults = { a: { b: { c: 1, d: 2 }, e: 'keep' }, f: () => 'x' }
|
|
82
|
+
deepMergeWithDefaults(defaults, { a: { b: { c: 10 } } })
|
|
83
|
+
// → { a: { b: { c: 10, d: 2 }, e: 'keep' }, f: () => 'x' }
|
|
84
|
+
```
|
|
85
|
+
|
|
@@ -28,10 +28,10 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
28
28
|
inputsClass: StringConstructor;
|
|
29
29
|
buttonsClass: StringConstructor;
|
|
30
30
|
}>, {
|
|
31
|
-
ariaLabels: {
|
|
31
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
32
32
|
min?: string;
|
|
33
33
|
max?: string;
|
|
34
|
-
}
|
|
34
|
+
}>;
|
|
35
35
|
cssClasses: import("vue").ComputedRef<{
|
|
36
36
|
'x-editable-number-range-filter--error': boolean;
|
|
37
37
|
}>;
|
|
@@ -18,9 +18,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
18
18
|
};
|
|
19
19
|
renderableFacets: StringConstructor;
|
|
20
20
|
}>, {
|
|
21
|
-
ariaLabels: {
|
|
21
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
22
22
|
root?: string;
|
|
23
|
-
}
|
|
23
|
+
}>;
|
|
24
24
|
selectedFiltersByFacet: import("vue").ComputedRef<import("../..").FiltersByFacet>;
|
|
25
25
|
hasFacets: import("vue").ComputedRef<boolean>;
|
|
26
26
|
mappedFacets: import("vue").ComputedRef<Dictionary<RenderFacet>>;
|
|
@@ -20,9 +20,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
20
20
|
default: number;
|
|
21
21
|
};
|
|
22
22
|
}>, {
|
|
23
|
-
ariaLabels: {
|
|
23
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
24
24
|
input?: string;
|
|
25
|
-
}
|
|
25
|
+
}>;
|
|
26
26
|
clearQuery: () => void;
|
|
27
27
|
setQuery: (query: string) => void;
|
|
28
28
|
cssClasses: import("vue").ComputedRef<VueCSSClasses>;
|
|
@@ -10,9 +10,9 @@ History Queries Switch is a component to activate or deactivate the history quer
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
_default: import("vue").DefineComponent<{}, {
|
|
13
|
-
ariaLabels: {
|
|
13
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
14
14
|
root?: string;
|
|
15
|
-
}
|
|
15
|
+
}>;
|
|
16
16
|
toggle: () => void;
|
|
17
17
|
isEnabled: import("vue").ComputedRef<boolean>;
|
|
18
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
@@ -17,9 +17,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
17
17
|
removeButtonClass: StringConstructor;
|
|
18
18
|
suggestionClass: StringConstructor;
|
|
19
19
|
}>, {
|
|
20
|
-
ariaLabels: {
|
|
20
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
21
21
|
removeButton?: string;
|
|
22
|
-
}
|
|
22
|
+
}>;
|
|
23
23
|
query: import("vue").ComputedRef<string>;
|
|
24
24
|
suggestionSelectedEvents: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
25
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -556,6 +556,21 @@ Filters an array with all elements that pass the test implemented by the given f
|
|
|
556
556
|
Flat an `Item[]` deeply using the given `childrenKey` to access to his children.
|
|
557
557
|
|
|
558
558
|
|
|
559
|
+
</td></tr>
|
|
560
|
+
<tr><td>
|
|
561
|
+
|
|
562
|
+
[deepMergeWithDefaults(defaults, overrides)](./x-components.deepmergewithdefaults.md)
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
</td><td>
|
|
566
|
+
|
|
567
|
+
Deeply merges `overrides` onto `defaults` at any depth, so nested objects can be overridden partially without losing the rest of the default configuration:
|
|
568
|
+
|
|
569
|
+
- The keys of `defaults` define the shape of the result: keys that do not exist in `defaults` are ignored. - An `undefined` entry in `overrides` keeps the default value. - When both the default and the override are plain objects, they are merged recursively. - Any other value (string, function, array, `null`<!-- -->...) in `overrides` replaces the default.
|
|
570
|
+
|
|
571
|
+
Neither input is mutated.
|
|
572
|
+
|
|
573
|
+
|
|
559
574
|
</td></tr>
|
|
560
575
|
<tr><td>
|
|
561
576
|
|
|
@@ -1147,6 +1162,21 @@ Util to transform string a into kebab case.
|
|
|
1147
1162
|
Function which returns the `$x` object from the current component instance.
|
|
1148
1163
|
|
|
1149
1164
|
|
|
1165
|
+
</td></tr>
|
|
1166
|
+
<tr><td>
|
|
1167
|
+
|
|
1168
|
+
[useAccessibilityLabels(namespace)](./x-components.useaccessibilitylabels.md)
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
</td><td>
|
|
1172
|
+
|
|
1173
|
+
Resolves the aria labels for a given [AriaLabels](./x-components.arialabels.md) namespace, merging any labels provided by the consumer under [ACCESSIBILITY\_KEY](./x-components.accessibility_key.md) on top of the library defaults.
|
|
1174
|
+
|
|
1175
|
+
The consumer only needs to `app.provide` a \*\*partial\*\* configuration (e.g. the labels translated to its language): every entry that is not provided falls back to the library default. Providing nothing is a regular use case (the components resolve the defaults), and the `inject` fallback keeps Vue from logging an "injection not found" warning in that case.
|
|
1176
|
+
|
|
1177
|
+
The resolved labels are reactive: if the consumer provides a reactive object (or re-provides translated labels when the locale changes), the components pick the new values up.
|
|
1178
|
+
|
|
1179
|
+
|
|
1150
1180
|
</td></tr>
|
|
1151
1181
|
<tr><td>
|
|
1152
1182
|
|
|
@@ -18,9 +18,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
18
18
|
type: PropType<Partial<XEventsTypes>>;
|
|
19
19
|
};
|
|
20
20
|
}>, {
|
|
21
|
-
ariaLabels: {
|
|
21
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
22
22
|
button?: string;
|
|
23
|
-
}
|
|
23
|
+
}>;
|
|
24
24
|
resultsLength: import("vue").ComputedRef<number>;
|
|
25
25
|
totalResults: import("vue").ComputedRef<number>;
|
|
26
26
|
events: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
@@ -39,12 +39,12 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
39
39
|
required: true;
|
|
40
40
|
};
|
|
41
41
|
}>, {
|
|
42
|
-
ariaLabels: {
|
|
42
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
43
43
|
pagination?: string;
|
|
44
44
|
prevPage?: string;
|
|
45
45
|
nextPage?: string;
|
|
46
46
|
numberPage?: (page: number | string) => string;
|
|
47
|
-
}
|
|
47
|
+
}>;
|
|
48
48
|
visiblePages: import("vue").ComputedRef<PageItem[]>;
|
|
49
49
|
selectPage: (page: number | string) => void;
|
|
50
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -15,9 +15,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
15
15
|
required: true;
|
|
16
16
|
};
|
|
17
17
|
}>, {
|
|
18
|
-
ariaLabels: {
|
|
18
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
19
19
|
button?: string;
|
|
20
|
-
}
|
|
20
|
+
}>;
|
|
21
21
|
removeHistoryQueryEvent: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
22
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
historyQuery: {
|
|
@@ -20,9 +20,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
}>, {
|
|
23
|
-
ariaLabels: {
|
|
23
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
24
24
|
button?: string;
|
|
25
|
-
}
|
|
25
|
+
}>;
|
|
26
26
|
events: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
27
27
|
isVisible: import("vue").ComputedRef<boolean>;
|
|
28
28
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -27,9 +27,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
27
27
|
default: number;
|
|
28
28
|
};
|
|
29
29
|
}>, {
|
|
30
|
-
ariaLabels: {
|
|
30
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
31
31
|
input?: string;
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
33
|
query: import("vue").ComputedRef<string>;
|
|
34
34
|
inputElement: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
35
35
|
emitUserHoveredInSearchBox: () => void;
|
|
@@ -24,10 +24,10 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
24
24
|
};
|
|
25
25
|
isInstant: BooleanConstructor;
|
|
26
26
|
}>, {
|
|
27
|
-
ariaLabels: {
|
|
27
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
28
28
|
min?: string;
|
|
29
29
|
max?: string;
|
|
30
|
-
}
|
|
30
|
+
}>;
|
|
31
31
|
selectedRange: import("vue").Ref<{
|
|
32
32
|
min: number;
|
|
33
33
|
max: number;
|
|
@@ -28,9 +28,9 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
30
|
}>, {
|
|
31
|
-
ariaLabels: {
|
|
31
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
32
32
|
dropdown?: string;
|
|
33
|
-
}
|
|
33
|
+
}>;
|
|
34
34
|
emitUserClickedASort: (sort: Sort) => void;
|
|
35
35
|
rootRef: import("vue").Ref<import("vue").DefineComponent<{}, {}, any> | undefined, import("vue").DefineComponent<{}, {}, any> | undefined>;
|
|
36
36
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [useAccessibilityLabels](./x-components.useaccessibilitylabels.md)
|
|
4
|
+
|
|
5
|
+
## useAccessibilityLabels() function
|
|
6
|
+
|
|
7
|
+
Resolves the aria labels for a given [AriaLabels](./x-components.arialabels.md) namespace, merging any labels provided by the consumer under [ACCESSIBILITY\_KEY](./x-components.accessibility_key.md) on top of the library defaults.
|
|
8
|
+
|
|
9
|
+
The consumer only needs to `app.provide` a \*\*partial\*\* configuration (e.g. the labels translated to its language): every entry that is not provided falls back to the library default. Providing nothing is a regular use case (the components resolve the defaults), and the `inject` fallback keeps Vue from logging an "injection not found" warning in that case.
|
|
10
|
+
|
|
11
|
+
The resolved labels are reactive: if the consumer provides a reactive object (or re-provides translated labels when the locale changes), the components pick the new values up.
|
|
12
|
+
|
|
13
|
+
**Signature:**
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
export declare function useAccessibilityLabels<N extends keyof AriaLabels>(namespace: N): ComputedRef<NonNullable<AriaLabels[N]>>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
<table><thead><tr><th>
|
|
22
|
+
|
|
23
|
+
Parameter
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
</th><th>
|
|
27
|
+
|
|
28
|
+
Type
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
</th><th>
|
|
32
|
+
|
|
33
|
+
Description
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
</th></tr></thead>
|
|
37
|
+
<tbody><tr><td>
|
|
38
|
+
|
|
39
|
+
namespace
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
</td><td>
|
|
43
|
+
|
|
44
|
+
N
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</td><td>
|
|
48
|
+
|
|
49
|
+
The [AriaLabels](./x-components.arialabels.md) namespace to resolve (the PascalCase component name).
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</td></tr>
|
|
53
|
+
</tbody></table>
|
|
54
|
+
|
|
55
|
+
**Returns:**
|
|
56
|
+
|
|
57
|
+
ComputedRef<NonNullable<[AriaLabels](./x-components.arialabels.md)<!-- -->\[N\]>>
|
|
58
|
+
|
|
59
|
+
A reactive object with the resolved aria labels for the given namespace.
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```vue
|
|
65
|
+
<script setup>
|
|
66
|
+
const ariaLabels = useAccessibilityLabels('pageSelector')
|
|
67
|
+
</script>
|
|
68
|
+
<template>
|
|
69
|
+
<nav :aria-label="ariaLabels.pagination">...</nav>
|
|
70
|
+
</template>
|
|
71
|
+
```
|
|
72
|
+
|
|
@@ -13,6 +13,7 @@ title: BaseCurrency
|
|
|
13
13
|
| <code>value</code> | Numeric value to be formatted. | <code>number</code> | <code></code> |
|
|
14
14
|
| <code>currency</code> | The ISO 4217 currency value. If not specified we use snippetConfig.currency | <code>string</code> | <code></code> |
|
|
15
15
|
| <code>format</code> | The currency format possibilities from Intl.NumberFormatOptions.<br />Allows customization of decimal places, grouping, etc.<br />Note: 'currency' and 'style' options are managed internally. | <code>Omit<Intl.NumberFormatOptions, 'currency' \| 'style'></code> | <code>() => ({})</code> |
|
|
16
|
+
| <code>locale</code> | Locale used to format the value. If not specified we use snippetConfig.uiLang | <code>string</code> | <code></code> |
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
|
@@ -110,3 +111,21 @@ internally):
|
|
|
110
111
|
import BaseCurrency from "@empathyco/x-components/js/components/currency/base-currency.vue";
|
|
111
112
|
</script>
|
|
112
113
|
```
|
|
114
|
+
|
|
115
|
+
### Using a different locale
|
|
116
|
+
|
|
117
|
+
By default the currency is formatted using the `uiLang` of the `snippetConfig`. You can format
|
|
118
|
+
the value in a different locale using the `locale` prop:
|
|
119
|
+
|
|
120
|
+
```vue
|
|
121
|
+
<template>
|
|
122
|
+
<!-- output: '€1,234.56' even if snippetConfig.uiLang is 'es-ES' -->
|
|
123
|
+
<BaseCurrency :value="1234.56" currency="EUR" locale="en-US" />
|
|
124
|
+
<!-- output: '1234,56 €' for snippetConfig.uiLang 'es-ES' -->
|
|
125
|
+
<BaseCurrency :value="1234.56" currency="EUR" />
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<script setup>
|
|
129
|
+
import BaseCurrency from "@empathyco/x-components/js/components/currency/base-currency.vue";
|
|
130
|
+
</script>
|
|
131
|
+
```
|