@empathyco/x-components 10.0.2 → 10.1.1
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 +15 -0
- package/core/index.js +1 -0
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.arialabels.md +19 -0
- package/docs/API-reference/api/x-components.arialabels.tabs.md +13 -0
- package/docs/API-reference/api/x-components.extraparamsstate.catalogsectionparamkey.md +18 -0
- package/docs/API-reference/api/x-components.extraparamsstate.md +19 -0
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +1 -0
- package/docs/API-reference/api/x-components.md +132 -0
- package/docs/API-reference/api/x-components.relatedpromptquery.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptrequest.md +13 -0
- package/docs/API-reference/api/x-components.resetcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.reseturlcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.searchconfig.defaultcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.searchconfig.md +19 -0
- package/docs/API-reference/api/x-components.searchmutations.md +19 -0
- package/docs/API-reference/api/x-components.searchmutations.setcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.searchstate.catalogsection.md +13 -0
- package/docs/API-reference/api/x-components.searchstate.md +19 -0
- package/docs/API-reference/api/x-components.semanticqueriesnormalizedquery.md +13 -0
- package/docs/API-reference/api/x-components.semanticqueriesquery.md +13 -0
- package/docs/API-reference/api/x-components.semanticqueriesrequest.md +13 -0
- package/docs/API-reference/api/x-components.setcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.setcatalogsectionfromurl.md +13 -0
- package/docs/API-reference/api/x-components.seturlcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.seturlparams.md +1 -1
- package/docs/API-reference/api/x-components.simplefilter.md +1 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +1 -0
- package/docs/API-reference/api/x-components.tab.click.md +13 -0
- package/docs/API-reference/api/x-components.tab.id.md +13 -0
- package/docs/API-reference/api/x-components.tab.label.md +13 -0
- package/docs/API-reference/api/x-components.tab.md +115 -0
- package/docs/API-reference/api/x-components.tab.selected.md +13 -0
- package/docs/API-reference/api/x-components.tabs.md +29 -0
- package/docs/API-reference/api/x-components.urlmutations.md +19 -0
- package/docs/API-reference/api/x-components.urlmutations.setcatalogsection.md +13 -0
- package/docs/API-reference/api/x-components.urlparams.catalogsection.md +11 -0
- package/docs/API-reference/api/x-components.urlparams.md +17 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +19 -0
- package/docs/API-reference/api/x-components.xeventstypes.userselectedacatalogsection.md +13 -0
- package/docs/API-reference/components/common/tabs/x-components.tabs.md +24 -0
- package/js/components/tabs/tabs.vue.js +44 -0
- package/js/components/tabs/tabs.vue.js.map +1 -0
- package/js/components/tabs/tabs.vue2.js +44 -0
- package/js/components/tabs/tabs.vue2.js.map +1 -0
- package/js/index.js +8 -2
- package/js/index.js.map +1 -1
- package/js/types/accessibility.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue2.js +1 -0
- 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 +1 -0
- package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
- package/js/x-modules/extra-params/store/emitters.js +23 -2
- package/js/x-modules/extra-params/store/emitters.js.map +1 -1
- package/js/x-modules/extra-params/store/module.js +1 -0
- package/js/x-modules/extra-params/store/module.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +1 -0
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js +1 -0
- package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js +1 -0
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
- package/js/x-modules/search/store/getters/request.getter.js +24 -10
- package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/search/store/module.js +5 -0
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +29 -1
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue2.js +6 -2
- package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
- package/js/x-modules/url/store/initial-state.js +1 -0
- package/js/x-modules/url/store/initial-state.js.map +1 -1
- package/js/x-modules/url/store/module.js +3 -0
- package/js/x-modules/url/store/module.js.map +1 -1
- package/js/x-modules/url/wiring.js +19 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/package.json +3 -3
- package/related-prompts/index.js +2 -0
- package/report/x-components.api.json +811 -5
- package/report/x-components.api.md +92 -6
- package/search/index.js +1 -1
- package/semantic-queries/index.js +3 -0
- package/types/src/components/index.d.ts +1 -0
- package/types/src/components/index.d.ts.map +1 -1
- package/types/src/components/snippet-callbacks.vue.d.ts +1 -0
- package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
- package/types/src/components/tabs/index.d.ts +3 -0
- package/types/src/components/tabs/index.d.ts.map +1 -0
- package/types/src/components/tabs/tab.types.d.ts +16 -0
- package/types/src/components/tabs/tab.types.d.ts.map +1 -0
- package/types/src/components/tabs/tabs.vue.d.ts +48 -0
- package/types/src/components/tabs/tabs.vue.d.ts.map +1 -0
- package/types/src/types/accessibility.d.ts +3 -0
- package/types/src/types/accessibility.d.ts.map +1 -1
- package/types/src/types/url-params.d.ts +1 -0
- package/types/src/types/url-params.d.ts.map +1 -1
- package/types/src/wiring/events.types.d.ts +5 -0
- package/types/src/wiring/events.types.d.ts.map +1 -1
- package/types/src/x-modules/extra-params/store/emitters.d.ts +4 -1
- package/types/src/x-modules/extra-params/store/emitters.d.ts.map +1 -1
- package/types/src/x-modules/extra-params/store/module.d.ts.map +1 -1
- package/types/src/x-modules/extra-params/store/types.d.ts +8 -0
- package/types/src/x-modules/extra-params/store/types.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +1 -0
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +1 -0
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/related-prompts/store/index.d.ts +1 -0
- package/types/src/x-modules/related-prompts/store/index.d.ts.map +1 -1
- package/types/src/x-modules/search/config.types.d.ts +5 -0
- package/types/src/x-modules/search/config.types.d.ts.map +1 -1
- package/types/src/x-modules/search/store/getters/request.getter.d.ts +2 -0
- package/types/src/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
- package/types/src/x-modules/search/store/module.d.ts.map +1 -1
- package/types/src/x-modules/search/store/types.d.ts +14 -0
- package/types/src/x-modules/search/store/types.d.ts.map +1 -1
- package/types/src/x-modules/search/wiring.d.ts +31 -2
- package/types/src/x-modules/search/wiring.d.ts.map +1 -1
- package/types/src/x-modules/semantic-queries/store/index.d.ts +1 -0
- package/types/src/x-modules/semantic-queries/store/index.d.ts.map +1 -1
- package/types/src/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
- package/types/src/x-modules/url/store/initial-state.d.ts.map +1 -1
- package/types/src/x-modules/url/store/module.d.ts.map +1 -1
- package/types/src/x-modules/url/store/types.d.ts +6 -0
- package/types/src/x-modules/url/store/types.d.ts.map +1 -1
- package/types/src/x-modules/url/wiring.d.ts +18 -0
- package/types/src/x-modules/url/wiring.d.ts.map +1 -1
- package/url/index.js +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [Tab](./x-components.tab.md)
|
|
4
|
+
|
|
5
|
+
## Tab interface
|
|
6
|
+
|
|
7
|
+
The shape of a single item rendered by [Tabs](./x-components.tabs.md)<!-- -->.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface Tab
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Property
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Modifiers
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Type
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th><th>
|
|
33
|
+
|
|
34
|
+
Description
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
</th></tr></thead>
|
|
38
|
+
<tbody><tr><td>
|
|
39
|
+
|
|
40
|
+
[click](./x-components.tab.click.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
() => void
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td><td>
|
|
52
|
+
|
|
53
|
+
Callback invoked when the tab is clicked.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
59
|
+
[id](./x-components.tab.id.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</td><td>
|
|
66
|
+
|
|
67
|
+
string
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
The unique id of the tab.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td></tr>
|
|
76
|
+
<tr><td>
|
|
77
|
+
|
|
78
|
+
[label](./x-components.tab.label.md)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
</td><td>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
</td><td>
|
|
85
|
+
|
|
86
|
+
string
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</td><td>
|
|
90
|
+
|
|
91
|
+
Text label rendered inside the tab.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
</td></tr>
|
|
95
|
+
<tr><td>
|
|
96
|
+
|
|
97
|
+
[selected?](./x-components.tab.selected.md)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
</td><td>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
</td><td>
|
|
104
|
+
|
|
105
|
+
boolean
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</td><td>
|
|
109
|
+
|
|
110
|
+
_(Optional)_ Tab selected state.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</td></tr>
|
|
114
|
+
</tbody></table>
|
|
115
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [Tab](./x-components.tab.md) > [selected](./x-components.tab.selected.md)
|
|
4
|
+
|
|
5
|
+
## Tab.selected property
|
|
6
|
+
|
|
7
|
+
Tab selected state.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [Tabs](./x-components.tabs.md)
|
|
4
|
+
|
|
5
|
+
## Tabs variable
|
|
6
|
+
|
|
7
|
+
Renders a list of tabs from the given `items`<!-- -->. It keeps track of the selected tab internally: clicking a tab marks it as selected and invokes its `click` callback.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
_default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
items: {
|
|
14
|
+
type: PropType<Tab[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
itemClasses: StringConstructor;
|
|
18
|
+
}>, {
|
|
19
|
+
ariaLabels: import("vue").ComputedRef<{
|
|
20
|
+
root?: string;
|
|
21
|
+
}>;
|
|
22
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
items: {
|
|
24
|
+
type: PropType<Tab[]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
itemClasses: StringConstructor;
|
|
28
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>
|
|
29
|
+
```
|
|
@@ -54,6 +54,25 @@ Description
|
|
|
54
54
|
Sets the new browseCategory.
|
|
55
55
|
|
|
56
56
|
|
|
57
|
+
</td></tr>
|
|
58
|
+
<tr><td>
|
|
59
|
+
|
|
60
|
+
[setCatalogSection](./x-components.urlmutations.setcatalogsection.md)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</td><td>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
(catalogSection: string) => void
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</td><td>
|
|
72
|
+
|
|
73
|
+
Sets the new catalog section of the url, the id of the selected catalog section.
|
|
74
|
+
|
|
75
|
+
|
|
57
76
|
</td></tr>
|
|
58
77
|
<tr><td>
|
|
59
78
|
|
|
@@ -0,0 +1,13 @@
|
|
|
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) > [setCatalogSection](./x-components.urlmutations.setcatalogsection.md)
|
|
4
|
+
|
|
5
|
+
## UrlMutations.setCatalogSection property
|
|
6
|
+
|
|
7
|
+
Sets the new catalog section of the url, the id of the selected catalog section.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setCatalogSection: (catalogSection: string) => void;
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [UrlParams](./x-components.urlparams.md) > [catalogSection](./x-components.urlparams.catalogsection.md)
|
|
4
|
+
|
|
5
|
+
## UrlParams.catalogSection property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
catalogSection: string;
|
|
11
|
+
```
|
|
@@ -554,6 +554,25 @@ void
|
|
|
554
554
|
The user has reached the top of the empathize and keeps navigating in that direction. Payload: none.
|
|
555
555
|
|
|
556
556
|
|
|
557
|
+
</td></tr>
|
|
558
|
+
<tr><td>
|
|
559
|
+
|
|
560
|
+
[UserSelectedACatalogSection](./x-components.xeventstypes.userselectedacatalogsection.md)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
</td><td>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
</td><td>
|
|
567
|
+
|
|
568
|
+
string
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
</td><td>
|
|
572
|
+
|
|
573
|
+
The user selected a catalog section. Payload: String containing the id of the selected catalog section.
|
|
574
|
+
|
|
575
|
+
|
|
557
576
|
</td></tr>
|
|
558
577
|
<tr><td>
|
|
559
578
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XEventsTypes](./x-components.xeventstypes.md) > [UserSelectedACatalogSection](./x-components.xeventstypes.userselectedacatalogsection.md)
|
|
4
|
+
|
|
5
|
+
## XEventsTypes.UserSelectedACatalogSection property
|
|
6
|
+
|
|
7
|
+
The user selected a catalog section. Payload: String containing the id of the selected catalog section.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
UserSelectedACatalogSection: string;
|
|
13
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
title: Tabs
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tabs
|
|
8
|
+
|
|
9
|
+
Renders a list of tabs from the given `items`. It keeps track of the
|
|
10
|
+
selected tab internally: clicking a tab marks it as selected and invokes
|
|
11
|
+
its `click` callback.
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| Name | Description | Type | Default |
|
|
16
|
+
| ------------------------ | ------------------------- | ------------------- | ------------- |
|
|
17
|
+
| <code>items</code> | The tabs to render. | <code>Tab[]</code> | <code></code> |
|
|
18
|
+
| <code>itemClasses</code> | The classes for tab item. | <code>string</code> | <code></code> |
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Name | Description | Bindings<br />(name - type - description) |
|
|
23
|
+
| -------------------- | ----------- | ----------------------------------------- |
|
|
24
|
+
| <code>default</code> | | |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _sfc_main from './tabs.vue2.js';
|
|
2
|
+
import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, renderSlot, createTextVNode, toDisplayString } from 'vue';
|
|
3
|
+
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
|
|
4
|
+
|
|
5
|
+
const _hoisted_1 = ["aria-label"];
|
|
6
|
+
const _hoisted_2 = ["aria-selected", "onClick"];
|
|
7
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8
|
+
return openBlock(), createElementBlock("nav", {
|
|
9
|
+
class: "xds:tabs",
|
|
10
|
+
"data-test": "tabs",
|
|
11
|
+
"aria-label": _ctx.ariaLabels?.root,
|
|
12
|
+
role: "tablist"
|
|
13
|
+
}, [
|
|
14
|
+
(openBlock(true), createElementBlock(
|
|
15
|
+
Fragment,
|
|
16
|
+
null,
|
|
17
|
+
renderList(_ctx.items, (item) => {
|
|
18
|
+
return openBlock(), createElementBlock("button", {
|
|
19
|
+
key: item.id,
|
|
20
|
+
type: "button",
|
|
21
|
+
class: normalizeClass(["xds:tab", [_ctx.itemClasses, { "xds:selected": item.selected }]]),
|
|
22
|
+
"data-test": "tab",
|
|
23
|
+
role: "tab",
|
|
24
|
+
"aria-selected": item.selected,
|
|
25
|
+
onClick: ($event) => item.click()
|
|
26
|
+
}, [
|
|
27
|
+
renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
28
|
+
createTextVNode(
|
|
29
|
+
toDisplayString(item.label),
|
|
30
|
+
1
|
|
31
|
+
/* TEXT */
|
|
32
|
+
)
|
|
33
|
+
])
|
|
34
|
+
], 10, _hoisted_2);
|
|
35
|
+
}),
|
|
36
|
+
128
|
|
37
|
+
/* KEYED_FRAGMENT */
|
|
38
|
+
))
|
|
39
|
+
], 8, _hoisted_1);
|
|
40
|
+
}
|
|
41
|
+
var tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
42
|
+
|
|
43
|
+
export { tabs as default };
|
|
44
|
+
//# sourceMappingURL=tabs.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.vue.js","sources":["../../../../src/components/tabs/tabs.vue"],"sourcesContent":["<template>\n <nav class=\"xds:tabs\" data-test=\"tabs\" :aria-label=\"ariaLabels?.root\" role=\"tablist\">\n <button\n v-for=\"item in items\"\n :key=\"item.id\"\n type=\"button\"\n class=\"xds:tab\"\n :class=\"[itemClasses, { 'xds:selected': item.selected }]\"\n data-test=\"tab\"\n role=\"tab\"\n :aria-selected=\"item.selected\"\n @click=\"item.click()\"\n >\n <slot :item=\"item\">{{ item.label }}</slot>\n </button>\n </nav>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue'\nimport type { Tab } from './tab.types'\nimport { useAccessibilityLabels } from '@x/composables'\nimport { defineComponent } from 'vue'\n\n/**\n * Renders a list of tabs from the given `items`. It keeps track of the\n * selected tab internally: clicking a tab marks it as selected and invokes\n * its `click` callback.\n *\n * @public\n */\nexport default defineComponent({\n name: 'Tabs',\n props: {\n /**\n * The tabs to render.\n *\n * @public\n */\n items: {\n type: Array as PropType<Tab[]>,\n required: true,\n },\n /**\n * The classes for tab item.\n *\n * @public\n */\n itemClasses: String,\n },\n setup() {\n const ariaLabels = useAccessibilityLabels('tabs')\n\n return { ariaLabels }\n },\n})\n</script>\n"],"names":["_createElementBlock","_openBlock","_Fragment","_renderList","_normalizeClass","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;sBACEA,kBAAA,CAcM,KAAA,EAAA;AAAA,IAdD,KAAA,EAAM,UAAA;AAAA,IAAW,WAAA,EAAU,MAAA;AAAA,IAAQ,cAAY,IAAA,CAAA,UAAA,EAAY,IAAA;AAAA,IAAM,IAAA,EAAK;AAAA,GAAA,EAAA;AACzE,KAAAC,SAAA,CAAA,IAAA,CAAA,EAAAD,kBAAA;AAAA,MAYSE,QAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,UAAA,CAXQ,IAAA,CAAA,KAAA,EAAK,CAAb,IAAA,KAAI;4BADbH,kBAAA,CAYS,QAAA,EAAA;AAAA,UAVN,KAAK,IAAA,CAAK,EAAA;AAAA,UACX,IAAA,EAAK,QAAA;AAAA,UACL,OAAKI,cAAA,CAAA,CAAC,SAAA,EAAS,CACN,IAAA,CAAA,WAAA,EAAW,EAAA,cAAA,EAAoB,KAAK,QAAA,EAAQ,CAAA,CAAA,CAAA;AAAA,UACrD,WAAA,EAAU,KAAA;AAAA,UACV,IAAA,EAAK,KAAA;AAAA,UACJ,iBAAe,IAAA,CAAK,QAAA;AAAA,UACpB,OAAA,EAAK,CAAA,MAAA,KAAE,IAAA,CAAK,KAAA;AAAK,SAAA,EAAA;UAElBC,UAAA,CAA0C,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAnC,IAAA,EAAU,EAAjB,MAA0C;AAAA,YAAAC,eAAA;AAApB,cAAAC,eAAA,CAAA,IAAA,CAAK,KAAK,CAAA;AAAA,cAAA;AAAA;AAAA;AAAA,WAAA;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import '../../composables/create-use-device.js';
|
|
2
|
+
import 'vuex';
|
|
3
|
+
import '../../plugins/x-bus.js';
|
|
4
|
+
import '@empathyco/x-utils';
|
|
5
|
+
import '../../plugins/x-plugin.js';
|
|
6
|
+
import 'rxjs';
|
|
7
|
+
import { defineComponent } from 'vue';
|
|
8
|
+
import { useAccessibilityLabels } from '../../composables/use-accessibility-labels.js';
|
|
9
|
+
import '@vueuse/core';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Renders a list of tabs from the given `items`. It keeps track of the
|
|
13
|
+
* selected tab internally: clicking a tab marks it as selected and invokes
|
|
14
|
+
* its `click` callback.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
var _sfc_main = defineComponent({
|
|
19
|
+
name: 'Tabs',
|
|
20
|
+
props: {
|
|
21
|
+
/**
|
|
22
|
+
* The tabs to render.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
items: {
|
|
27
|
+
type: Array,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* The classes for tab item.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
itemClasses: String,
|
|
36
|
+
},
|
|
37
|
+
setup() {
|
|
38
|
+
const ariaLabels = useAccessibilityLabels('tabs');
|
|
39
|
+
return { ariaLabels };
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { _sfc_main as default };
|
|
44
|
+
//# sourceMappingURL=tabs.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.vue2.js","sources":["../../../../src/components/tabs/tabs.vue"],"sourcesContent":["<template>\n <nav class=\"xds:tabs\" data-test=\"tabs\" :aria-label=\"ariaLabels?.root\" role=\"tablist\">\n <button\n v-for=\"item in items\"\n :key=\"item.id\"\n type=\"button\"\n class=\"xds:tab\"\n :class=\"[itemClasses, { 'xds:selected': item.selected }]\"\n data-test=\"tab\"\n role=\"tab\"\n :aria-selected=\"item.selected\"\n @click=\"item.click()\"\n >\n <slot :item=\"item\">{{ item.label }}</slot>\n </button>\n </nav>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue'\nimport type { Tab } from './tab.types'\nimport { useAccessibilityLabels } from '@x/composables'\nimport { defineComponent } from 'vue'\n\n/**\n * Renders a list of tabs from the given `items`. It keeps track of the\n * selected tab internally: clicking a tab marks it as selected and invokes\n * its `click` callback.\n *\n * @public\n */\nexport default defineComponent({\n name: 'Tabs',\n props: {\n /**\n * The tabs to render.\n *\n * @public\n */\n items: {\n type: Array as PropType<Tab[]>,\n required: true,\n },\n /**\n * The classes for tab item.\n *\n * @public\n */\n itemClasses: String,\n },\n setup() {\n const ariaLabels = useAccessibilityLabels('tabs')\n\n return { ariaLabels }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;AAwBA;;;;;;AAME;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,KAAwB;AAC9B,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;;AAIE;AACF,QAAA,WAAW,EAAE,MAAM;AACpB,KAAA;IACD,KAAK,GAAA;AACH,QAAA,MAAM,UAAS,GAAI,sBAAsB,CAAC,MAAM,CAAA;QAEhD,OAAO,EAAE,UAAS,EAAE;IACtB,CAAC;AACF,CAAA,CAAA;;;;"}
|
package/js/index.js
CHANGED
|
@@ -150,6 +150,7 @@ export { default as SortList } from './components/sort/sort-list.vue.js';
|
|
|
150
150
|
export { default as SortPickerList } from './components/sort/sort-picker-list.vue.js';
|
|
151
151
|
export { default as BaseSuggestion } from './components/suggestions/base-suggestion.vue.js';
|
|
152
152
|
export { default as BaseSuggestions } from './components/suggestions/base-suggestions.vue.js';
|
|
153
|
+
export { default as Tabs } from './components/tabs/tabs.vue.js';
|
|
153
154
|
export { getRootXComponent, getXComponentXModuleName, isXComponent } from './components/x-component.utils.js';
|
|
154
155
|
export { createUseDevice } from './composables/create-use-device.js';
|
|
155
156
|
export { use$x } from './composables/use-_x.js';
|
|
@@ -385,6 +386,8 @@ export { default as RelatedPromptsTagList } from './x-modules/related-prompts/co
|
|
|
385
386
|
export { cancelFetchAndSaveRelatedPrompts, fetchAndSaveRelatedPrompts } from './x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js';
|
|
386
387
|
export { fetchRelatedPrompts } from './x-modules/related-prompts/store/actions/fetch-related-prompts.action.js';
|
|
387
388
|
export { relatedPromptsStoreEmitters } from './x-modules/related-prompts/store/emitters.js';
|
|
389
|
+
export { query as relatedPromptQuery } from './x-modules/related-prompts/store/getters/related-prompts-query.getter.js';
|
|
390
|
+
export { request as relatedPromptRequest } from './x-modules/related-prompts/store/getters/request.getter.js';
|
|
388
391
|
export { relatedPromptsXStoreModule } from './x-modules/related-prompts/store/module.js';
|
|
389
392
|
export { relatedPromptsWiring } from './x-modules/related-prompts/wiring.js';
|
|
390
393
|
export { relatedPromptsXModule } from './x-modules/related-prompts/x-module.js';
|
|
@@ -431,7 +434,7 @@ export { searchEmitters } from './x-modules/search/store/emitters.js';
|
|
|
431
434
|
export { query as searchQuery } from './x-modules/search/store/getters/query.getter.js';
|
|
432
435
|
export { request as searchRequest } from './x-modules/search/store/getters/request.getter.js';
|
|
433
436
|
export { resettableState, searchXStoreModule } from './x-modules/search/store/module.js';
|
|
434
|
-
export { cancelFetchAndSaveSearchResponseWire, clearSearchQuery, fetchAndSaveSearchResponseWire, increasePageAppendingResultsWire, resetAppending, resetFromNoResultsWithFilters, resetIsNoResults, resetRequestOnRefinementWire, resetSpellcheckQuery, resetStateForReloadWire, resetStateIfNoRequestWire, saveOriginWire, searchWiring, setRelatedTags, setSearchExtraParams, setSearchExtraParamsFromPreview, setSearchPage, setSearchQuery, setSearchQueryFromPreview, setSearchSelectedFiltersFromHistoryQuery, setSearchSelectedFiltersFromPreview, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
|
|
437
|
+
export { cancelFetchAndSaveSearchResponseWire, clearSearchQuery, fetchAndSaveSearchResponseWire, increasePageAppendingResultsWire, resetAppending, resetCatalogSection, resetFromNoResultsWithFilters, resetIsNoResults, resetRequestOnRefinementWire, resetSpellcheckQuery, resetStateForReloadWire, resetStateIfNoRequestWire, saveOriginWire, searchWiring, setCatalogSection, setCatalogSectionFromUrl, setRelatedTags, setSearchExtraParams, setSearchExtraParamsFromPreview, setSearchPage, setSearchQuery, setSearchQueryFromPreview, setSearchSelectedFiltersFromHistoryQuery, setSearchSelectedFiltersFromPreview, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
|
|
435
438
|
export { searchXModule } from './x-modules/search/x-module.js';
|
|
436
439
|
export { default as ClearSearchInput } from './x-modules/search-box/components/clear-search-input.vue.js';
|
|
437
440
|
export { default as SearchButton } from './x-modules/search-box/components/search-button.vue.js';
|
|
@@ -446,6 +449,9 @@ export { default as SemanticQuery } from './x-modules/semantic-queries/component
|
|
|
446
449
|
export { fetchAndSaveSemanticQuery } from './x-modules/semantic-queries/store/actions/fetch-and-save-semantic-query.action.js';
|
|
447
450
|
export { fetchSemanticQuery } from './x-modules/semantic-queries/store/actions/fetch-semantic-query.action.js';
|
|
448
451
|
export { semanticQueriesEmitters } from './x-modules/semantic-queries/store/emitters.js';
|
|
452
|
+
export { normalizedQuery as semanticQueriesNormalizedQuery } from './x-modules/semantic-queries/store/getters/normalized-query.getter.js';
|
|
453
|
+
export { request as semanticQueriesRequest } from './x-modules/semantic-queries/store/getters/request.getter.js';
|
|
454
|
+
export { query as semanticQueriesQuery } from './x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js';
|
|
449
455
|
export { semanticQueriesXStoreModule } from './x-modules/semantic-queries/store/module.js';
|
|
450
456
|
export { clearQueryWire, fetchAndSaveSemanticQueryWire, semanticQueriesWiring, setQueryFromSearchResponseChangedWire, setQueryWire, setSemanticQueriesExtraParamsWire, setTotalResultsFromSearchResponseChangedWire, setTotalResultsWire } from './x-modules/semantic-queries/wiring.js';
|
|
451
457
|
export { semanticQueriesXModule } from './x-modules/semantic-queries/x-module.js';
|
|
@@ -459,7 +465,7 @@ export { taggingXModule } from './x-modules/tagging/x-module.js';
|
|
|
459
465
|
export { default as UrlHandler } from './x-modules/url/components/url-handler.vue.js';
|
|
460
466
|
export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
|
|
461
467
|
export { urlXStoreModule } from './x-modules/url/store/module.js';
|
|
462
|
-
export { resetUrlBrowseCategory, resetUrlQuery, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromBrowse, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
|
|
468
|
+
export { resetUrlBrowseCategory, resetUrlCatalogSection, resetUrlQuery, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlCatalogSection, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromBrowse, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
|
|
463
469
|
export { urlXModule } from './x-modules/url/x-module.js';
|
|
464
470
|
export { default as VendorBannersList } from './x-modules/vendor/components/vendor-banners-list.vue.js';
|
|
465
471
|
export { default as VendorResultsList } from './x-modules/vendor/components/vendor-results-list.vue.js';
|
package/js/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility.js","sources":["../../../src/types/accessibility.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\n\n/**\n * Configuration of the global aria labels for the components. Namespaces are the PascalCase\n * component names and every entry is optional, so the map can be set partially. The entries\n * `PageSelector.numberPage` and `BaseColumnPickerList.ariaLabel` are template strings: their\n * `page` and `column` tokens are substituted per item at resolution.\n *\n * @public\n */\nexport interface AriaLabels {\n pageSelector?: {\n pagination?: string\n prevPage?: string\n nextPage?: string\n numberPage?: (page: number | string) => string\n }\n aiCarousel?: { expand?: string; collapse?: string }\n baseColumnPickerDropdown?: { dropdown?: string }\n baseColumnPickerList?: { button?: (page: number) => string }\n pageLoaderButton?: { button?: string }\n baseModal?: { modal?: string }\n baseEventsModalOpen?: { button?: string }\n baseEventsModalClose?: { button?: string }\n sortDropdown?: { dropdown?: string }\n facets?: { root?: string }\n filtersSearch?: { input?: string }\n sliderFilter?: { min?: string; max?: string }\n editableNumberRangeFilter?: { min?: string; max?: string }\n searchInput?: { input?: string }\n clearHistoryQueries?: { button?: string }\n historyQueriesSwitch?: { root?: string }\n historyQuery?: { removeButton?: string }\n removeHistoryQuery?: { button?: string }\n scrollToTop?: { button?: string }\n baseDropdown?: { toggleButton?: string }\n}\n\nexport const ACCESSIBILITY_KEY: InjectionKey<AriaLabels> = Symbol('accessibility')\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessibility.js","sources":["../../../src/types/accessibility.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\n\n/**\n * Configuration of the global aria labels for the components. Namespaces are the PascalCase\n * component names and every entry is optional, so the map can be set partially. The entries\n * `PageSelector.numberPage` and `BaseColumnPickerList.ariaLabel` are template strings: their\n * `page` and `column` tokens are substituted per item at resolution.\n *\n * @public\n */\nexport interface AriaLabels {\n pageSelector?: {\n pagination?: string\n prevPage?: string\n nextPage?: string\n numberPage?: (page: number | string) => string\n }\n aiCarousel?: { expand?: string; collapse?: string }\n baseColumnPickerDropdown?: { dropdown?: string }\n baseColumnPickerList?: { button?: (page: number) => string }\n pageLoaderButton?: { button?: string }\n baseModal?: { modal?: string }\n baseEventsModalOpen?: { button?: string }\n baseEventsModalClose?: { button?: string }\n sortDropdown?: { dropdown?: string }\n facets?: { root?: string }\n filtersSearch?: { input?: string }\n sliderFilter?: { min?: string; max?: string }\n editableNumberRangeFilter?: { min?: string; max?: string }\n searchInput?: { input?: string }\n clearHistoryQueries?: { button?: string }\n historyQueriesSwitch?: { root?: string }\n historyQuery?: { removeButton?: string }\n removeHistoryQuery?: { button?: string }\n scrollToTop?: { button?: string }\n baseDropdown?: { toggleButton?: string }\n tabs?: { root?: string }\n}\n\nexport const ACCESSIBILITY_KEY: InjectionKey<AriaLabels> = Symbol('accessibility')\n"],"names":[],"mappings":"MAuCa,iBAAiB,GAA6B,MAAM,CAAC,eAAe;;;;"}
|
|
@@ -94,6 +94,7 @@ import '../../../components/sort/sort-picker-list.vue2.js';
|
|
|
94
94
|
import '../../../components/suggestions/base-suggestion.vue2.js';
|
|
95
95
|
import '../../../components/suggestions/base-suggestions.vue2.js';
|
|
96
96
|
import '../../../components/suggestions/base-suggestions.vue3.js';
|
|
97
|
+
import '../../../components/tabs/tabs.vue2.js';
|
|
97
98
|
import '../../../composables/create-use-device.js';
|
|
98
99
|
import { useAccessibilityLabels } from '../../../composables/use-accessibility-labels.js';
|
|
99
100
|
import 'vuex';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-carousel.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div v-if=\"suggestionsSearch.length\" class=\"x-ai-carousel\">\n <DisplayEmitter\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-display-emitter\"\n >\n <span\n class=\"x-ai-carousel-title\"\n :class=\"{ 'x-ai-carousel-title--expanded': titleExpanded }\"\n data-test=\"ai-carousel-title\"\n @click=\"toggleTitleExpansion\"\n >\n <AIStarIcon class=\"x-ai-carousel-title-icon\" />\n <ChangeHeight>\n <span\n ref=\"titleRef\"\n class=\"x-ai-carousel-title-text\"\n :class=\"{ 'x-ai-carousel-title-text--expanded': titleExpanded }\"\n >\n {{ title }}\n </span>\n </ChangeHeight>\n <button\n v-if=\"isTitleOverflowing\"\n class=\"x-ai-carousel-title-button\"\n data-test=\"ai-carousel-title-button\"\n :aria-label=\"titleExpanded ? ariaLabels?.collapse : ariaLabels?.expand\"\n >\n <ChevronDownIcon\n class=\"x-ai-carousel-title-button-icon\"\n :class=\"{ 'x-ai-carousel-title-button-icon--expanded': titleExpanded }\"\n />\n </button>\n </span>\n </DisplayEmitter>\n\n <AiGroupedCarousel\n v-if=\"group\"\n :sliding-panel-classes=\"slidingPanelClasses\"\n :sliding-panel-container-classes=\"slidingPanelContainerClasses\"\n :sliding-panel-buttons-classes=\"slidingPanelButtonsClasses\"\n >\n <template #sliding-panels-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panels-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panels-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <template #result=\"{ result }\">\n <slot name=\"result\" :result=\"result\" />\n </template>\n </AiGroupedCarousel>\n\n <div v-else class=\"x-ai-carousel-suggestions\" data-test=\"ai-carousel-suggestions-container\">\n <DisplayEmitter\n v-for=\"{ query: suggestionQuery, results: queriesResults } in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-query-display-emitter\"\n >\n <div class=\"x-ai-carousel-suggestion\" data-test=\"ai-carousel-suggestion\">\n <BaseEventButton\n class=\"x-ai-carousel-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-carousel-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"tagging?.searchQueries[suggestionQuery].toolingDisplayClick\"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"ai_carousel\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-carousel-suggestion-results\">\n <li\n v-for=\"result in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n\n <slot name=\"extra-content\" />\n <slot name=\"cta-button\" />\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, defineComponent, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n DisplayEmitter,\n SlidingPanel,\n} from '../../../components'\nimport { use$x, useAccessibilityLabels, useState } from '../../../composables'\nimport { aiXModule } from '../x-module'\nimport AiGroupedCarousel from './ai-grouped-carousel.vue'\n\nexport default defineComponent({\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n AiGroupedCarousel,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n DisplayEmitter,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: String,\n /* The classes added to the sliding panel. */\n slidingPanelClasses: String,\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: String,\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: String,\n /* Controls whether the carousel should group results or display N carousels per N queries. */\n group: {\n type: Boolean,\n default: true,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query, suggestionsSearch, queries, tagging } = useState('ai')\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const ariaLabels = useAccessibilityLabels('aiCarousel')\n\n const titleRef = ref<HTMLElement | null>(null)\n const titleExpanded = ref(false)\n const isTitleOverflowing = ref(false)\n\n /**\n * Checks if the title is overflowing and updates the state.\n */\n function updateTitleOverflow() {\n if (titleExpanded.value) {\n return\n }\n if (titleRef.value) {\n isTitleOverflowing.value = titleRef.value.scrollWidth > titleRef.value.clientWidth\n }\n }\n\n /**\n * Toggles the title expanded state if it is overflowing.\n */\n function toggleTitleExpansion() {\n if (isTitleOverflowing.value) {\n titleExpanded.value = !titleExpanded.value\n }\n }\n\n const title = computed(() => {\n if (!props.title) {\n const queriesList = new Intl.ListFormat('en', {\n style: 'long',\n type: 'conjunction',\n }).format(queries.value.map(({ query }) => query))\n return `Searching for ${queriesList}`\n }\n return props.title\n })\n\n watch(queries, () => {\n if (queries.value.length > 0) {\n $x.emit('AiSuggestionsSearchRequestUpdated')\n }\n })\n\n onMounted(() => {\n $x.emit('AiComponentMounted', undefined, { feature: 'ai_carousel' })\n })\n\n onBeforeUnmount(() => {\n $x.emit('AiComponentUnmounted')\n })\n\n useResizeObserver(titleRef, updateTitleOverflow)\n\n return {\n ariaLabels,\n emptyTaggingRequest,\n isTitleOverflowing,\n queries,\n query,\n suggestionsSearch,\n tagging,\n title,\n titleExpanded,\n titleRef,\n toggleTitleExpansion,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-carousel {\n --color: var(--x-ai-carousel-color, #bbc9cf);\n --color-lighter: var(--x-ai-carousel-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n padding: 8px 0;\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-carousel-title {\n display: flex;\n font-size: 12px;\n gap: 8px;\n align-items: flex-start;\n margin: 0 14px 8px;\n cursor: pointer;\n}\n.x-ai-carousel-title-text {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.x-ai-carousel-title-text--expanded {\n white-space: normal;\n}\n.x-ai-carousel-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color);\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition: transform 0.3s ease;\n}\n.x-ai-carousel-title-button-icon--expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-carousel-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-carousel-suggestion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.x-ai-carousel-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n}\n\n.x-ai-carousel-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-carousel-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n</style>\n"],"names":["DisplayClickProvider","DisplayEmitter"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"ai-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-carousel.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div v-if=\"suggestionsSearch.length\" class=\"x-ai-carousel\">\n <DisplayEmitter\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-display-emitter\"\n >\n <span\n class=\"x-ai-carousel-title\"\n :class=\"{ 'x-ai-carousel-title--expanded': titleExpanded }\"\n data-test=\"ai-carousel-title\"\n @click=\"toggleTitleExpansion\"\n >\n <AIStarIcon class=\"x-ai-carousel-title-icon\" />\n <ChangeHeight>\n <span\n ref=\"titleRef\"\n class=\"x-ai-carousel-title-text\"\n :class=\"{ 'x-ai-carousel-title-text--expanded': titleExpanded }\"\n >\n {{ title }}\n </span>\n </ChangeHeight>\n <button\n v-if=\"isTitleOverflowing\"\n class=\"x-ai-carousel-title-button\"\n data-test=\"ai-carousel-title-button\"\n :aria-label=\"titleExpanded ? ariaLabels?.collapse : ariaLabels?.expand\"\n >\n <ChevronDownIcon\n class=\"x-ai-carousel-title-button-icon\"\n :class=\"{ 'x-ai-carousel-title-button-icon--expanded': titleExpanded }\"\n />\n </button>\n </span>\n </DisplayEmitter>\n\n <AiGroupedCarousel\n v-if=\"group\"\n :sliding-panel-classes=\"slidingPanelClasses\"\n :sliding-panel-container-classes=\"slidingPanelContainerClasses\"\n :sliding-panel-buttons-classes=\"slidingPanelButtonsClasses\"\n >\n <template #sliding-panels-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panels-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panels-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <template #result=\"{ result }\">\n <slot name=\"result\" :result=\"result\" />\n </template>\n </AiGroupedCarousel>\n\n <div v-else class=\"x-ai-carousel-suggestions\" data-test=\"ai-carousel-suggestions-container\">\n <DisplayEmitter\n v-for=\"{ query: suggestionQuery, results: queriesResults } in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-query-display-emitter\"\n >\n <div class=\"x-ai-carousel-suggestion\" data-test=\"ai-carousel-suggestion\">\n <BaseEventButton\n class=\"x-ai-carousel-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-carousel-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"tagging?.searchQueries[suggestionQuery].toolingDisplayClick\"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"ai_carousel\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-carousel-suggestion-results\">\n <li\n v-for=\"result in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n\n <slot name=\"extra-content\" />\n <slot name=\"cta-button\" />\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, defineComponent, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n DisplayEmitter,\n SlidingPanel,\n} from '../../../components'\nimport { use$x, useAccessibilityLabels, useState } from '../../../composables'\nimport { aiXModule } from '../x-module'\nimport AiGroupedCarousel from './ai-grouped-carousel.vue'\n\nexport default defineComponent({\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n AiGroupedCarousel,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n DisplayEmitter,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: String,\n /* The classes added to the sliding panel. */\n slidingPanelClasses: String,\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: String,\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: String,\n /* Controls whether the carousel should group results or display N carousels per N queries. */\n group: {\n type: Boolean,\n default: true,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query, suggestionsSearch, queries, tagging } = useState('ai')\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const ariaLabels = useAccessibilityLabels('aiCarousel')\n\n const titleRef = ref<HTMLElement | null>(null)\n const titleExpanded = ref(false)\n const isTitleOverflowing = ref(false)\n\n /**\n * Checks if the title is overflowing and updates the state.\n */\n function updateTitleOverflow() {\n if (titleExpanded.value) {\n return\n }\n if (titleRef.value) {\n isTitleOverflowing.value = titleRef.value.scrollWidth > titleRef.value.clientWidth\n }\n }\n\n /**\n * Toggles the title expanded state if it is overflowing.\n */\n function toggleTitleExpansion() {\n if (isTitleOverflowing.value) {\n titleExpanded.value = !titleExpanded.value\n }\n }\n\n const title = computed(() => {\n if (!props.title) {\n const queriesList = new Intl.ListFormat('en', {\n style: 'long',\n type: 'conjunction',\n }).format(queries.value.map(({ query }) => query))\n return `Searching for ${queriesList}`\n }\n return props.title\n })\n\n watch(queries, () => {\n if (queries.value.length > 0) {\n $x.emit('AiSuggestionsSearchRequestUpdated')\n }\n })\n\n onMounted(() => {\n $x.emit('AiComponentMounted', undefined, { feature: 'ai_carousel' })\n })\n\n onBeforeUnmount(() => {\n $x.emit('AiComponentUnmounted')\n })\n\n useResizeObserver(titleRef, updateTitleOverflow)\n\n return {\n ariaLabels,\n emptyTaggingRequest,\n isTitleOverflowing,\n queries,\n query,\n suggestionsSearch,\n tagging,\n title,\n titleExpanded,\n titleRef,\n toggleTitleExpansion,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-carousel {\n --color: var(--x-ai-carousel-color, #bbc9cf);\n --color-lighter: var(--x-ai-carousel-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n padding: 8px 0;\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-carousel-title {\n display: flex;\n font-size: 12px;\n gap: 8px;\n align-items: flex-start;\n margin: 0 14px 8px;\n cursor: pointer;\n}\n.x-ai-carousel-title-text {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.x-ai-carousel-title-text--expanded {\n white-space: normal;\n}\n.x-ai-carousel-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color);\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition: transform 0.3s ease;\n}\n.x-ai-carousel-title-button-icon--expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-carousel-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-carousel-suggestion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.x-ai-carousel-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n}\n\n.x-ai-carousel-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-carousel-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n</style>\n"],"names":["DisplayClickProvider","DisplayEmitter"],"mappings":"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"}
|
|
@@ -95,6 +95,7 @@ import '../../../components/sort/sort-picker-list.vue2.js';
|
|
|
95
95
|
import '../../../components/suggestions/base-suggestion.vue2.js';
|
|
96
96
|
import '../../../components/suggestions/base-suggestions.vue2.js';
|
|
97
97
|
import '../../../components/suggestions/base-suggestions.vue3.js';
|
|
98
|
+
import '../../../components/tabs/tabs.vue2.js';
|
|
98
99
|
import '../../../composables/create-use-device.js';
|
|
99
100
|
import '../../../utils/storage.js';
|
|
100
101
|
import '@vueuse/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-grouped-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-grouped-carousel.vue"],"sourcesContent":["<template>\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-carousel-suggestion-results\">\n <DisplayClickProvider\n v-for=\"suggestion in suggestionsSearch\"\n :key=\"suggestion.query\"\n :tooling-display-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayClick\"\n :tooling-add2-cart-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart\"\n result-feature=\"ai_carousel\"\n >\n <li\n v-for=\"result in suggestion.results\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </DisplayClickProvider>\n </ul>\n </SlidingPanel>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { DisplayClickProvider, SlidingPanel } from '../../../components'\nimport { useState } from '../../../composables'\n\nexport default defineComponent({\n components: {\n DisplayClickProvider,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: String,\n /* The classes added to the sliding panel. */\n slidingPanelClasses: String,\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: String,\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: String,\n },\n setup() {\n const { suggestionsSearch, tagging } = useState('ai')\n\n return {\n suggestionsSearch,\n tagging,\n }\n },\n})\n</script>\n"],"names":["DisplayClickProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-grouped-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-grouped-carousel.vue"],"sourcesContent":["<template>\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-carousel-suggestion-results\">\n <DisplayClickProvider\n v-for=\"suggestion in suggestionsSearch\"\n :key=\"suggestion.query\"\n :tooling-display-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayClick\"\n :tooling-add2-cart-tagging=\"tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart\"\n result-feature=\"ai_carousel\"\n >\n <li\n v-for=\"result in suggestion.results\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </DisplayClickProvider>\n </ul>\n </SlidingPanel>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { DisplayClickProvider, SlidingPanel } from '../../../components'\nimport { useState } from '../../../composables'\n\nexport default defineComponent({\n components: {\n DisplayClickProvider,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: String,\n /* The classes added to the sliding panel. */\n slidingPanelClasses: String,\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: String,\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: String,\n },\n setup() {\n const { suggestionsSearch, tagging } = useState('ai')\n\n return {\n suggestionsSearch,\n tagging,\n }\n },\n})\n</script>\n"],"names":["DisplayClickProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,gBAAe,eAAe,CAAC;AAC7B,IAAA,UAAU,EAAE;8BACVA,WAAoB;QACpB,YAAY;AACb,KAAA;AACD,IAAA,KAAK,EAAE;;AAEL,QAAA,KAAK,EAAE,MAAM;;AAEb,QAAA,mBAAmB,EAAE,MAAM;;AAE3B,QAAA,4BAA4B,EAAE,MAAM;;AAEpC,QAAA,0BAA0B,EAAE,MAAM;AACnC,KAAA;IACD,KAAK,GAAA;QACH,MAAM,EAAE,iBAAiB,EAAE,OAAM,EAAE,GAAI,QAAQ,CAAC,IAAI,CAAA;QAEpD,OAAO;YACL,iBAAiB;YACjB,OAAO;SACT;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
@@ -94,6 +94,7 @@ import '../../../components/sort/sort-picker-list.vue2.js';
|
|
|
94
94
|
import '../../../components/suggestions/base-suggestion.vue2.js';
|
|
95
95
|
import '../../../components/suggestions/base-suggestions.vue2.js';
|
|
96
96
|
import '../../../components/suggestions/base-suggestions.vue3.js';
|
|
97
|
+
import '../../../components/tabs/tabs.vue2.js';
|
|
97
98
|
import '../../../composables/create-use-device.js';
|
|
98
99
|
import { getActiveElement } from '../../../utils/html.js';
|
|
99
100
|
import '../../../utils/storage.js';
|