@visitscotland/component-library 5.69.2 → 5.70.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.
@@ -0,0 +1,25 @@
1
+ type Item = {
2
+ id: string;
3
+ label: string;
4
+ };
5
+ type Props = {
6
+ detailText?: string;
7
+ hasIcons?: boolean;
8
+ items: Item[];
9
+ selectedCategory: string | string[] | undefined;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ changed: (args_0: {
13
+ id: string;
14
+ key: number | string;
15
+ }) => any;
16
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
17
+ onChanged?: (args_0: {
18
+ id: string;
19
+ key: number | string;
20
+ }) => any;
21
+ }>, {
22
+ detailText: string;
23
+ hasIcons: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ export default _default;
@@ -1,25 +1,100 @@
1
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
2
- export default _default;
3
- type __VLS_WithSlots<T, S> = T & (new () => {
4
- $slots: S;
5
- });
6
- declare const __VLS_component: import('vue').DefineComponent<{}, {
7
- $emit: (event: "category-selected" | "reset-location" | "reset-map" | "search-input-changed" | "subcategory-selected", ...args: any[]) => void;
8
- categories: Record<string, any>;
1
+ type CategoryConfig = Record<string, Category>;
2
+ type Category = {
3
+ id: string;
4
+ icon: string;
5
+ includedType?: string[];
6
+ excludedType?: string[];
7
+ keywords?: string[];
8
+ subCategory: Subcategory[];
9
+ };
10
+ type Subcategory = {
11
+ id: string;
12
+ includedType: string[];
13
+ excludedType?: string[];
14
+ };
15
+ type Categories = {
16
+ label: string;
17
+ id: string;
18
+ cmsData?: boolean;
19
+ subCategory: {
20
+ label: string;
21
+ id: string;
22
+ }[];
23
+ };
24
+ type DestinationCategory = {
25
+ label: string;
26
+ id: string;
27
+ };
28
+ type Props = {
29
+ /** Label and id for the category buttons */
30
+ categories: Categories[];
31
+ /** Icon data for the category buttons */
32
+ categoryData?: CategoryConfig;
33
+ /** List of destinations */
34
+ destinations: any;
35
+ /** List of destination categories */
36
+ destinationCategories: DestinationCategory[];
37
+ /** Whether the map is loaded or not. */
38
+ mapLoaded?: boolean;
39
+ /** Test query from Map Search */
40
+ query?: string;
41
+ /** Selected top level category */
42
+ selectedCategory?: string;
43
+ /** Selected sub categories */
44
+ selectedSubcategories?: any;
45
+ /** Labels for the sidebar */
46
+ sidebarLabels: Record<string, string>;
47
+ };
48
+ type __VLS_Props = Props;
49
+ type __VLS_PublicProps = __VLS_Props & {
50
+ 'isOpen'?: boolean;
51
+ 'isResultsOpen'?: boolean;
52
+ };
53
+ declare var __VLS_50: {};
54
+ type __VLS_Slots = {} & {
55
+ 'vs-map-sidebar-search-results'?: (props: typeof __VLS_50) => any;
56
+ };
57
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
58
+ "category-selected": (args_0: {
59
+ id: string;
60
+ key: number | string;
61
+ }) => any;
62
+ "destination-type-selected": () => any;
63
+ "reset-location": () => any;
64
+ "reset-map": () => any;
65
+ "search-input-changed": () => any;
66
+ "subcategory-selected": (args_0: {
67
+ id: string;
68
+ key: number | string;
69
+ }) => any;
70
+ "update:isOpen": (value: boolean) => any;
71
+ "update:isResultsOpen": (value: boolean) => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
73
+ "onCategory-selected"?: (args_0: {
74
+ id: string;
75
+ key: number | string;
76
+ }) => any;
77
+ "onDestination-type-selected"?: () => any;
78
+ "onReset-location"?: () => any;
79
+ "onReset-map"?: () => any;
80
+ "onSearch-input-changed"?: () => any;
81
+ "onSubcategory-selected"?: (args_0: {
82
+ id: string;
83
+ key: number | string;
84
+ }) => any;
85
+ "onUpdate:isOpen"?: (value: boolean) => any;
86
+ "onUpdate:isResultsOpen"?: (value: boolean) => any;
87
+ }>, {
9
88
  selectedCategory: string;
89
+ categoryData: CategoryConfig;
90
+ mapLoaded: boolean;
10
91
  query: string;
11
- sidebarLabels: Record<string, any>;
12
- categoryData: Record<string, any>;
13
- selectedSubcategories?: Record<string, any>;
14
- $props: {
15
- readonly categories?: Record<string, any>;
16
- readonly selectedCategory?: string;
17
- readonly query?: string;
18
- readonly sidebarLabels?: Record<string, any>;
19
- readonly categoryData?: Record<string, any>;
20
- readonly selectedSubcategories?: Record<string, any>;
92
+ selectedSubcategories: any;
93
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
94
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
95
+ export default _default;
96
+ type __VLS_WithSlots<T, S> = T & {
97
+ new (): {
98
+ $slots: S;
21
99
  };
22
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
- type __VLS_Slots = {
24
- 'vs-map-sidebar-search-results'?: (props: {}) => any;
25
100
  };
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+ export default function useSwipeDrawer(isOpen: Ref<boolean>, sidebar: Ref<HTMLElement | null>): {
3
+ endDrag: (event: PointerEvent) => void;
4
+ onDrag: (event: PointerEvent) => void;
5
+ sidebarStyle: import('vue').ComputedRef<{
6
+ height: string;
7
+ top: string;
8
+ transform: string;
9
+ transition: string;
10
+ }>;
11
+ startDrag: (event: PointerEvent) => void;
12
+ };
@@ -38,66 +38,261 @@ declare const _default: {
38
38
  };
39
39
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
40
40
  VsMapSidebar: {
41
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
42
- $emit: (event: "category-selected" | "reset-location" | "reset-map" | "search-input-changed" | "subcategory-selected", ...args: any[]) => void;
43
- categories: Record<string, any>;
41
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
42
+ categories: {
43
+ label: string;
44
+ id: string;
45
+ cmsData?: boolean;
46
+ subCategory: {
47
+ label: string;
48
+ id: string;
49
+ }[];
50
+ }[];
51
+ categoryData?: {
52
+ [x: string]: {
53
+ id: string;
54
+ icon: string;
55
+ includedType?: string[];
56
+ excludedType?: string[];
57
+ keywords?: string[];
58
+ subCategory: {
59
+ id: string;
60
+ includedType: string[];
61
+ excludedType?: string[];
62
+ }[];
63
+ };
64
+ };
65
+ destinations: any;
66
+ destinationCategories: {
67
+ label: string;
68
+ id: string;
69
+ }[];
70
+ mapLoaded?: boolean;
71
+ query?: string;
72
+ selectedCategory?: string;
73
+ selectedSubcategories?: any;
74
+ sidebarLabels: Record<string, string>;
75
+ } & {
76
+ isOpen?: boolean;
77
+ isResultsOpen?: boolean;
78
+ }> & Readonly<{
79
+ "onCategory-selected"?: (args_0: {
80
+ id: string;
81
+ key: number | string;
82
+ }) => any;
83
+ "onDestination-type-selected"?: () => any;
84
+ "onReset-location"?: () => any;
85
+ "onReset-map"?: () => any;
86
+ "onSearch-input-changed"?: () => any;
87
+ "onSubcategory-selected"?: (args_0: {
88
+ id: string;
89
+ key: number | string;
90
+ }) => any;
91
+ "onUpdate:isOpen"?: (value: boolean) => any;
92
+ "onUpdate:isResultsOpen"?: (value: boolean) => any;
93
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
94
+ "category-selected": (args_0: {
95
+ id: string;
96
+ key: number | string;
97
+ }) => any;
98
+ "destination-type-selected": () => any;
99
+ "reset-location": () => any;
100
+ "reset-map": () => any;
101
+ "search-input-changed": () => any;
102
+ "subcategory-selected": (args_0: {
103
+ id: string;
104
+ key: number | string;
105
+ }) => any;
106
+ "update:isOpen": (value: boolean) => any;
107
+ "update:isResultsOpen": (value: boolean) => any;
108
+ }, import('vue').PublicProps, {
44
109
  selectedCategory: string;
45
- query: string;
46
- sidebarLabels: Record<string, any>;
47
- categoryData: Record<string, any>;
48
- selectedSubcategories?: Record<string, any>;
49
- $props: {
50
- readonly categories?: Record<string, any>;
51
- readonly selectedCategory?: string;
52
- readonly query?: string;
53
- readonly sidebarLabels?: Record<string, any>;
54
- readonly categoryData?: Record<string, any>;
55
- readonly selectedSubcategories?: Record<string, any>;
110
+ categoryData: {
111
+ [x: string]: {
112
+ id: string;
113
+ icon: string;
114
+ includedType?: string[];
115
+ excludedType?: string[];
116
+ keywords?: string[];
117
+ subCategory: {
118
+ id: string;
119
+ includedType: string[];
120
+ excludedType?: string[];
121
+ }[];
122
+ };
56
123
  };
57
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
124
+ mapLoaded: boolean;
125
+ query: string;
126
+ selectedSubcategories: any;
127
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
58
128
  P: {};
59
129
  B: {};
60
130
  D: {};
61
131
  C: {};
62
132
  M: {};
63
133
  Defaults: {};
64
- }, Readonly<{}> & Readonly<{}>, {
65
- $emit: (event: "category-selected" | "reset-location" | "reset-map" | "search-input-changed" | "subcategory-selected", ...args: any[]) => void;
66
- categories: Record<string, any>;
134
+ }, Readonly<{
135
+ categories: {
136
+ label: string;
137
+ id: string;
138
+ cmsData?: boolean;
139
+ subCategory: {
140
+ label: string;
141
+ id: string;
142
+ }[];
143
+ }[];
144
+ categoryData?: {
145
+ [x: string]: {
146
+ id: string;
147
+ icon: string;
148
+ includedType?: string[];
149
+ excludedType?: string[];
150
+ keywords?: string[];
151
+ subCategory: {
152
+ id: string;
153
+ includedType: string[];
154
+ excludedType?: string[];
155
+ }[];
156
+ };
157
+ };
158
+ destinations: any;
159
+ destinationCategories: {
160
+ label: string;
161
+ id: string;
162
+ }[];
163
+ mapLoaded?: boolean;
164
+ query?: string;
165
+ selectedCategory?: string;
166
+ selectedSubcategories?: any;
167
+ sidebarLabels: Record<string, string>;
168
+ } & {
169
+ isOpen?: boolean;
170
+ isResultsOpen?: boolean;
171
+ }> & Readonly<{
172
+ "onCategory-selected"?: (args_0: {
173
+ id: string;
174
+ key: number | string;
175
+ }) => any;
176
+ "onDestination-type-selected"?: () => any;
177
+ "onReset-location"?: () => any;
178
+ "onReset-map"?: () => any;
179
+ "onSearch-input-changed"?: () => any;
180
+ "onSubcategory-selected"?: (args_0: {
181
+ id: string;
182
+ key: number | string;
183
+ }) => any;
184
+ "onUpdate:isOpen"?: (value: boolean) => any;
185
+ "onUpdate:isResultsOpen"?: (value: boolean) => any;
186
+ }>, {}, {}, {}, {}, {
67
187
  selectedCategory: string;
68
- query: string;
69
- sidebarLabels: Record<string, any>;
70
- categoryData: Record<string, any>;
71
- selectedSubcategories?: Record<string, any>;
72
- $props: {
73
- readonly categories?: Record<string, any>;
74
- readonly selectedCategory?: string;
75
- readonly query?: string;
76
- readonly sidebarLabels?: Record<string, any>;
77
- readonly categoryData?: Record<string, any>;
78
- readonly selectedSubcategories?: Record<string, any>;
188
+ categoryData: {
189
+ [x: string]: {
190
+ id: string;
191
+ icon: string;
192
+ includedType?: string[];
193
+ excludedType?: string[];
194
+ keywords?: string[];
195
+ subCategory: {
196
+ id: string;
197
+ includedType: string[];
198
+ excludedType?: string[];
199
+ }[];
200
+ };
79
201
  };
80
- }, {}, {}, {}, {}>;
202
+ mapLoaded: boolean;
203
+ query: string;
204
+ selectedSubcategories: any;
205
+ }>;
81
206
  __isFragment?: never;
82
207
  __isTeleport?: never;
83
208
  __isSuspense?: never;
84
- } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
85
- $emit: (event: "category-selected" | "reset-location" | "reset-map" | "search-input-changed" | "subcategory-selected", ...args: any[]) => void;
86
- categories: Record<string, any>;
209
+ } & import('vue').ComponentOptionsBase<Readonly<{
210
+ categories: {
211
+ label: string;
212
+ id: string;
213
+ cmsData?: boolean;
214
+ subCategory: {
215
+ label: string;
216
+ id: string;
217
+ }[];
218
+ }[];
219
+ categoryData?: {
220
+ [x: string]: {
221
+ id: string;
222
+ icon: string;
223
+ includedType?: string[];
224
+ excludedType?: string[];
225
+ keywords?: string[];
226
+ subCategory: {
227
+ id: string;
228
+ includedType: string[];
229
+ excludedType?: string[];
230
+ }[];
231
+ };
232
+ };
233
+ destinations: any;
234
+ destinationCategories: {
235
+ label: string;
236
+ id: string;
237
+ }[];
238
+ mapLoaded?: boolean;
239
+ query?: string;
240
+ selectedCategory?: string;
241
+ selectedSubcategories?: any;
242
+ sidebarLabels: Record<string, string>;
243
+ } & {
244
+ isOpen?: boolean;
245
+ isResultsOpen?: boolean;
246
+ }> & Readonly<{
247
+ "onCategory-selected"?: (args_0: {
248
+ id: string;
249
+ key: number | string;
250
+ }) => any;
251
+ "onDestination-type-selected"?: () => any;
252
+ "onReset-location"?: () => any;
253
+ "onReset-map"?: () => any;
254
+ "onSearch-input-changed"?: () => any;
255
+ "onSubcategory-selected"?: (args_0: {
256
+ id: string;
257
+ key: number | string;
258
+ }) => any;
259
+ "onUpdate:isOpen"?: (value: boolean) => any;
260
+ "onUpdate:isResultsOpen"?: (value: boolean) => any;
261
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
262
+ "category-selected": (args_0: {
263
+ id: string;
264
+ key: number | string;
265
+ }) => any;
266
+ "destination-type-selected": () => any;
267
+ "reset-location": () => any;
268
+ "reset-map": () => any;
269
+ "search-input-changed": () => any;
270
+ "subcategory-selected": (args_0: {
271
+ id: string;
272
+ key: number | string;
273
+ }) => any;
274
+ "update:isOpen": (value: boolean) => any;
275
+ "update:isResultsOpen": (value: boolean) => any;
276
+ }, string, {
87
277
  selectedCategory: string;
88
- query: string;
89
- sidebarLabels: Record<string, any>;
90
- categoryData: Record<string, any>;
91
- selectedSubcategories?: Record<string, any>;
92
- $props: {
93
- readonly categories?: Record<string, any>;
94
- readonly selectedCategory?: string;
95
- readonly query?: string;
96
- readonly sidebarLabels?: Record<string, any>;
97
- readonly categoryData?: Record<string, any>;
98
- readonly selectedSubcategories?: Record<string, any>;
278
+ categoryData: {
279
+ [x: string]: {
280
+ id: string;
281
+ icon: string;
282
+ includedType?: string[];
283
+ excludedType?: string[];
284
+ keywords?: string[];
285
+ subCategory: {
286
+ id: string;
287
+ includedType: string[];
288
+ excludedType?: string[];
289
+ }[];
290
+ };
99
291
  };
100
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
292
+ mapLoaded: boolean;
293
+ query: string;
294
+ selectedSubcategories: any;
295
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
101
296
  $slots: {
102
297
  'vs-map-sidebar-search-results'?: (props: {}) => any;
103
298
  };
@@ -4,15 +4,17 @@ declare const useGoogleMapStore: import('pinia').StoreDefinition<"googleMap", Pi
4
4
  firstInteraction: import('vue').Ref<boolean, boolean>;
5
5
  searchesCount: import('vue').Ref<number, number>;
6
6
  filterUsesCount: import('vue').Ref<number, number>;
7
+ searchTerm: import('vue').Ref<string, string>;
7
8
  showDestinations: import('vue').Ref<boolean, boolean>;
8
9
  showCategories: import('vue').Ref<boolean, boolean>;
9
10
  selectedDestinationType: import('vue').Ref<string, string>;
10
- }, "sidebarOpen" | "timeMounted" | "firstInteraction" | "searchesCount" | "filterUsesCount" | "showDestinations" | "showCategories" | "selectedDestinationType">, Pick<{
11
+ }, "searchTerm" | "sidebarOpen" | "timeMounted" | "firstInteraction" | "searchesCount" | "filterUsesCount" | "showDestinations" | "showCategories" | "selectedDestinationType">, Pick<{
11
12
  sidebarOpen: import('vue').Ref<boolean, boolean>;
12
13
  timeMounted: import('vue').Ref<number, number>;
13
14
  firstInteraction: import('vue').Ref<boolean, boolean>;
14
15
  searchesCount: import('vue').Ref<number, number>;
15
16
  filterUsesCount: import('vue').Ref<number, number>;
17
+ searchTerm: import('vue').Ref<string, string>;
16
18
  showDestinations: import('vue').Ref<boolean, boolean>;
17
19
  showCategories: import('vue').Ref<boolean, boolean>;
18
20
  selectedDestinationType: import('vue').Ref<string, string>;
@@ -22,6 +24,7 @@ declare const useGoogleMapStore: import('pinia').StoreDefinition<"googleMap", Pi
22
24
  firstInteraction: import('vue').Ref<boolean, boolean>;
23
25
  searchesCount: import('vue').Ref<number, number>;
24
26
  filterUsesCount: import('vue').Ref<number, number>;
27
+ searchTerm: import('vue').Ref<string, string>;
25
28
  showDestinations: import('vue').Ref<boolean, boolean>;
26
29
  showCategories: import('vue').Ref<boolean, boolean>;
27
30
  selectedDestinationType: import('vue').Ref<string, string>;