ablok-components 0.3.26 → 0.3.27

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,417 @@
1
+ import { PropType } from '../../../../vue/dist/vue.esm-bundler.js';
2
+ interface LocationFinderItem {
3
+ id?: string | number;
4
+ title?: string;
5
+ label?: string;
6
+ name?: string;
7
+ address?: string;
8
+ description?: string;
9
+ subtitle?: string;
10
+ lat: number | string;
11
+ lng: number | string;
12
+ distance?: number;
13
+ source?: string;
14
+ [key: string]: any;
15
+ }
16
+ export interface LocationFinderMessages {
17
+ searchLabel?: string;
18
+ searchPlaceholder?: string;
19
+ resultsLabel?: string;
20
+ emptyText?: string;
21
+ locateButtonLabel?: string;
22
+ stopTrackingLabel?: string;
23
+ mapHelperText?: string;
24
+ directionsTitle?: string;
25
+ directionsEmptyText?: string;
26
+ distanceLabel?: string;
27
+ durationLabel?: string;
28
+ loadingRoute?: string;
29
+ legendAriaLabel?: string;
30
+ legendLocations?: string;
31
+ legendSelected?: string;
32
+ legendSearchResult?: string;
33
+ userLocationLabel?: string;
34
+ pinnedLocationTitle?: string;
35
+ selectedLocationLabel?: string;
36
+ }
37
+ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
38
+ modelValue: {
39
+ type: PropType<LocationFinderItem | null>;
40
+ default: null;
41
+ };
42
+ locations: {
43
+ type: PropType<LocationFinderItem[]>;
44
+ default: () => never[];
45
+ };
46
+ center: {
47
+ type: PropType<{
48
+ lat: number;
49
+ lng: number;
50
+ } | null>;
51
+ default: null;
52
+ };
53
+ distance: {
54
+ type: PropType<number | null>;
55
+ default: null;
56
+ };
57
+ userLocation: {
58
+ type: PropType<{
59
+ lat: number;
60
+ lng: number;
61
+ } | null>;
62
+ default: null;
63
+ };
64
+ messages: {
65
+ type: PropType<LocationFinderMessages>;
66
+ default: () => {};
67
+ };
68
+ mapHeight: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ searchLabel: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
76
+ searchPlaceholder: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ resultsLabel: {
81
+ type: StringConstructor;
82
+ default: string;
83
+ };
84
+ emptyText: {
85
+ type: StringConstructor;
86
+ default: string;
87
+ };
88
+ locateButtonLabel: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ stopTrackingLabel: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ mapHelperText: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
100
+ enableGeocoding: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ geocodingEndpoint: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ reverseGeocodingEndpoint: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ geocodingLimit: {
113
+ type: NumberConstructor;
114
+ default: number;
115
+ };
116
+ geocodingMinQueryLength: {
117
+ type: NumberConstructor;
118
+ default: number;
119
+ };
120
+ customGeocodingFetch: null;
121
+ enableDirections: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ directionsEndpoint: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
129
+ routeProfile: {
130
+ type: StringConstructor;
131
+ default: string;
132
+ };
133
+ customDirectionsFetch: null;
134
+ showDirectionsSummary: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ showDirectionsSteps: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
142
+ directionsTitle: {
143
+ type: StringConstructor;
144
+ default: string;
145
+ };
146
+ directionsEmptyText: {
147
+ type: StringConstructor;
148
+ default: string;
149
+ };
150
+ distanceLabel: {
151
+ type: StringConstructor;
152
+ default: string;
153
+ };
154
+ durationLabel: {
155
+ type: StringConstructor;
156
+ default: string;
157
+ };
158
+ routeColor: {
159
+ type: StringConstructor;
160
+ default: string;
161
+ };
162
+ routeWeight: {
163
+ type: NumberConstructor;
164
+ default: number;
165
+ };
166
+ disabled: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
170
+ interactive: {
171
+ type: BooleanConstructor;
172
+ default: boolean;
173
+ };
174
+ showSearch: {
175
+ type: BooleanConstructor;
176
+ default: boolean;
177
+ };
178
+ showLegend: {
179
+ type: BooleanConstructor;
180
+ default: boolean;
181
+ };
182
+ showSidebar: {
183
+ type: BooleanConstructor;
184
+ default: boolean;
185
+ };
186
+ showTrackButton: {
187
+ type: BooleanConstructor;
188
+ default: boolean;
189
+ };
190
+ trackUser: {
191
+ type: BooleanConstructor;
192
+ default: boolean;
193
+ };
194
+ autoLocate: {
195
+ type: BooleanConstructor;
196
+ default: boolean;
197
+ };
198
+ }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
199
+ select: (...args: any[]) => void;
200
+ search: (...args: any[]) => void;
201
+ "update:modelValue": (...args: any[]) => void;
202
+ "update:distance": (...args: any[]) => void;
203
+ "track-user": (...args: any[]) => void;
204
+ }, string, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
205
+ modelValue: {
206
+ type: PropType<LocationFinderItem | null>;
207
+ default: null;
208
+ };
209
+ locations: {
210
+ type: PropType<LocationFinderItem[]>;
211
+ default: () => never[];
212
+ };
213
+ center: {
214
+ type: PropType<{
215
+ lat: number;
216
+ lng: number;
217
+ } | null>;
218
+ default: null;
219
+ };
220
+ distance: {
221
+ type: PropType<number | null>;
222
+ default: null;
223
+ };
224
+ userLocation: {
225
+ type: PropType<{
226
+ lat: number;
227
+ lng: number;
228
+ } | null>;
229
+ default: null;
230
+ };
231
+ messages: {
232
+ type: PropType<LocationFinderMessages>;
233
+ default: () => {};
234
+ };
235
+ mapHeight: {
236
+ type: StringConstructor;
237
+ default: string;
238
+ };
239
+ searchLabel: {
240
+ type: StringConstructor;
241
+ default: string;
242
+ };
243
+ searchPlaceholder: {
244
+ type: StringConstructor;
245
+ default: string;
246
+ };
247
+ resultsLabel: {
248
+ type: StringConstructor;
249
+ default: string;
250
+ };
251
+ emptyText: {
252
+ type: StringConstructor;
253
+ default: string;
254
+ };
255
+ locateButtonLabel: {
256
+ type: StringConstructor;
257
+ default: string;
258
+ };
259
+ stopTrackingLabel: {
260
+ type: StringConstructor;
261
+ default: string;
262
+ };
263
+ mapHelperText: {
264
+ type: StringConstructor;
265
+ default: string;
266
+ };
267
+ enableGeocoding: {
268
+ type: BooleanConstructor;
269
+ default: boolean;
270
+ };
271
+ geocodingEndpoint: {
272
+ type: StringConstructor;
273
+ default: string;
274
+ };
275
+ reverseGeocodingEndpoint: {
276
+ type: StringConstructor;
277
+ default: string;
278
+ };
279
+ geocodingLimit: {
280
+ type: NumberConstructor;
281
+ default: number;
282
+ };
283
+ geocodingMinQueryLength: {
284
+ type: NumberConstructor;
285
+ default: number;
286
+ };
287
+ customGeocodingFetch: null;
288
+ enableDirections: {
289
+ type: BooleanConstructor;
290
+ default: boolean;
291
+ };
292
+ directionsEndpoint: {
293
+ type: StringConstructor;
294
+ default: string;
295
+ };
296
+ routeProfile: {
297
+ type: StringConstructor;
298
+ default: string;
299
+ };
300
+ customDirectionsFetch: null;
301
+ showDirectionsSummary: {
302
+ type: BooleanConstructor;
303
+ default: boolean;
304
+ };
305
+ showDirectionsSteps: {
306
+ type: BooleanConstructor;
307
+ default: boolean;
308
+ };
309
+ directionsTitle: {
310
+ type: StringConstructor;
311
+ default: string;
312
+ };
313
+ directionsEmptyText: {
314
+ type: StringConstructor;
315
+ default: string;
316
+ };
317
+ distanceLabel: {
318
+ type: StringConstructor;
319
+ default: string;
320
+ };
321
+ durationLabel: {
322
+ type: StringConstructor;
323
+ default: string;
324
+ };
325
+ routeColor: {
326
+ type: StringConstructor;
327
+ default: string;
328
+ };
329
+ routeWeight: {
330
+ type: NumberConstructor;
331
+ default: number;
332
+ };
333
+ disabled: {
334
+ type: BooleanConstructor;
335
+ default: boolean;
336
+ };
337
+ interactive: {
338
+ type: BooleanConstructor;
339
+ default: boolean;
340
+ };
341
+ showSearch: {
342
+ type: BooleanConstructor;
343
+ default: boolean;
344
+ };
345
+ showLegend: {
346
+ type: BooleanConstructor;
347
+ default: boolean;
348
+ };
349
+ showSidebar: {
350
+ type: BooleanConstructor;
351
+ default: boolean;
352
+ };
353
+ showTrackButton: {
354
+ type: BooleanConstructor;
355
+ default: boolean;
356
+ };
357
+ trackUser: {
358
+ type: BooleanConstructor;
359
+ default: boolean;
360
+ };
361
+ autoLocate: {
362
+ type: BooleanConstructor;
363
+ default: boolean;
364
+ };
365
+ }>> & Readonly<{
366
+ onSelect?: ((...args: any[]) => any) | undefined;
367
+ onSearch?: ((...args: any[]) => any) | undefined;
368
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
369
+ "onUpdate:distance"?: ((...args: any[]) => any) | undefined;
370
+ "onTrack-user"?: ((...args: any[]) => any) | undefined;
371
+ }>, {
372
+ modelValue: LocationFinderItem | null;
373
+ disabled: boolean;
374
+ messages: LocationFinderMessages;
375
+ center: {
376
+ lat: number;
377
+ lng: number;
378
+ } | null;
379
+ routeColor: string;
380
+ routeWeight: number;
381
+ userLocation: {
382
+ lat: number;
383
+ lng: number;
384
+ } | null;
385
+ interactive: boolean;
386
+ distance: number | null;
387
+ locations: LocationFinderItem[];
388
+ emptyText: string;
389
+ searchLabel: string;
390
+ searchPlaceholder: string;
391
+ resultsLabel: string;
392
+ locateButtonLabel: string;
393
+ stopTrackingLabel: string;
394
+ mapHelperText: string;
395
+ directionsTitle: string;
396
+ directionsEmptyText: string;
397
+ distanceLabel: string;
398
+ durationLabel: string;
399
+ mapHeight: string;
400
+ enableGeocoding: boolean;
401
+ geocodingEndpoint: string;
402
+ reverseGeocodingEndpoint: string;
403
+ geocodingLimit: number;
404
+ geocodingMinQueryLength: number;
405
+ enableDirections: boolean;
406
+ directionsEndpoint: string;
407
+ routeProfile: string;
408
+ showDirectionsSummary: boolean;
409
+ showDirectionsSteps: boolean;
410
+ showSearch: boolean;
411
+ showLegend: boolean;
412
+ showSidebar: boolean;
413
+ showTrackButton: boolean;
414
+ trackUser: boolean;
415
+ autoLocate: boolean;
416
+ }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, HTMLDivElement>;
417
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { ofetch } from 'ofetch';
2
+ export interface RoutePoint {
3
+ lat: number;
4
+ lng: number;
5
+ }
6
+ export interface RouteStep {
7
+ instruction: string;
8
+ name: string;
9
+ distance: number;
10
+ duration: number;
11
+ }
12
+ interface DirectionsOptions {
13
+ endpoint?: string;
14
+ profile?: string;
15
+ customFetch?: typeof ofetch | any;
16
+ }
17
+ export declare function useDirections(): {
18
+ routeCoordinates: import('../../vue/dist/vue.esm-bundler.js').Ref<[number, number][], [number, number][]>;
19
+ distanceMeters: import('../../vue/dist/vue.esm-bundler.js').Ref<number | null, number | null>;
20
+ durationSeconds: import('../../vue/dist/vue.esm-bundler.js').Ref<number | null, number | null>;
21
+ steps: import('../../vue/dist/vue.esm-bundler.js').Ref<{
22
+ instruction: string;
23
+ name: string;
24
+ distance: number;
25
+ duration: number;
26
+ }[], RouteStep[] | {
27
+ instruction: string;
28
+ name: string;
29
+ distance: number;
30
+ duration: number;
31
+ }[]>;
32
+ pending: import('../../vue/dist/vue.esm-bundler.js').Ref<boolean, boolean>;
33
+ error: import('../../vue/dist/vue.esm-bundler.js').Ref<string, string>;
34
+ hasRoute: import('../../vue/dist/vue.esm-bundler.js').ComputedRef<boolean>;
35
+ fetchRoute: (origin: RoutePoint, destination: RoutePoint, options?: DirectionsOptions) => Promise<any>;
36
+ clearRoute: () => void;
37
+ };
38
+ export {};
@@ -0,0 +1,53 @@
1
+ import { ofetch } from 'ofetch';
2
+ export interface GeocodingResult {
3
+ id: string;
4
+ title: string;
5
+ address: string;
6
+ lat: number;
7
+ lng: number;
8
+ source: 'geocoder' | 'reverse-geocoder';
9
+ raw?: any;
10
+ }
11
+ interface GeocodingOptions {
12
+ endpoint?: string;
13
+ reverseEndpoint?: string;
14
+ customFetch?: typeof ofetch | any;
15
+ limit?: number;
16
+ language?: string;
17
+ }
18
+ export declare function useGeocoding(): {
19
+ results: import('../../vue/dist/vue.esm-bundler.js').Ref<{
20
+ id: string;
21
+ title: string;
22
+ address: string;
23
+ lat: number;
24
+ lng: number;
25
+ source: "geocoder" | "reverse-geocoder";
26
+ raw?: any;
27
+ }[], GeocodingResult[] | {
28
+ id: string;
29
+ title: string;
30
+ address: string;
31
+ lat: number;
32
+ lng: number;
33
+ source: "geocoder" | "reverse-geocoder";
34
+ raw?: any;
35
+ }[]>;
36
+ pending: import('../../vue/dist/vue.esm-bundler.js').Ref<boolean, boolean>;
37
+ error: import('../../vue/dist/vue.esm-bundler.js').Ref<string, string>;
38
+ search: (query: string, options?: GeocodingOptions) => Promise<{
39
+ id: string;
40
+ title: string;
41
+ address: string;
42
+ lat: number;
43
+ lng: number;
44
+ source: "geocoder" | "reverse-geocoder";
45
+ raw?: any;
46
+ }[]>;
47
+ reverse: (position: {
48
+ lat: number;
49
+ lng: number;
50
+ }, options?: GeocodingOptions) => Promise<GeocodingResult | null>;
51
+ clearResults: () => void;
52
+ };
53
+ export {};
@@ -0,0 +1,20 @@
1
+ export interface GeolocationPositionValue {
2
+ lat: number;
3
+ lng: number;
4
+ accuracy: number | null;
5
+ }
6
+ export declare function useGeolocation(options?: PositionOptions): {
7
+ supported: boolean;
8
+ position: import('../../vue/dist/vue.esm-bundler.js').ComputedRef<{
9
+ lat: number;
10
+ lng: number;
11
+ accuracy: number | null;
12
+ } | null>;
13
+ accuracy: import('../../vue/dist/vue.esm-bundler.js').ComputedRef<number | null>;
14
+ error: import('../../vue/dist/vue.esm-bundler.js').Ref<string, string>;
15
+ pending: import('../../vue/dist/vue.esm-bundler.js').Ref<boolean, boolean>;
16
+ isTracking: import('../../vue/dist/vue.esm-bundler.js').Ref<boolean, boolean>;
17
+ locate: () => Promise<GeolocationPositionValue | null>;
18
+ startTracking: () => void;
19
+ stopTracking: () => void;
20
+ };
package/dist/i18n.d.ts CHANGED
@@ -132,6 +132,27 @@ declare const i18n: import('vue-i18n').I18n<{
132
132
  search: {
133
133
  noResults: string;
134
134
  };
135
+ locationFinder: {
136
+ searchLabel: string;
137
+ searchPlaceholder: string;
138
+ resultsLabel: string;
139
+ emptyText: string;
140
+ locateButtonLabel: string;
141
+ stopTrackingLabel: string;
142
+ mapHelperText: string;
143
+ directionsTitle: string;
144
+ directionsEmptyText: string;
145
+ distanceLabel: string;
146
+ durationLabel: string;
147
+ loadingRoute: string;
148
+ legendAriaLabel: string;
149
+ legendLocations: string;
150
+ legendSelected: string;
151
+ legendSearchResult: string;
152
+ userLocationLabel: string;
153
+ pinnedLocationTitle: string;
154
+ selectedLocationLabel: string;
155
+ };
135
156
  admin: {
136
157
  finder: {
137
158
  title: string;
package/dist/index.d.ts CHANGED
@@ -25,9 +25,12 @@ export { default as ColorPalette } from './components/molecules/color-palette/co
25
25
  export { default as InputDropdown } from './components/molecules/input-dropdown/input-dropdown.vue';
26
26
  export { default as AutoSuggest } from './components/molecules/auto-suggest/auto-suggest.vue';
27
27
  export { default as BaseCamera } from './components/molecules/base-camera/base-camera.vue';
28
+ export { default as BaseMap } from './components/molecules/base-map/base-map.vue';
29
+ export { default as LocationList } from './components/molecules/location-list/location-list.vue';
28
30
  export { default as FileUpload } from './components/molecules/file-upload/file-upload.vue';
29
31
  export { default as UploadGroup } from './components/molecules/upload-group/upload-group.vue';
30
32
  export { default as AssetUploader } from './components/organisms/asset-uploader/asset-uploader.vue';
33
+ export { default as LocationFinder } from './components/organisms/location-finder/location-finder.vue';
31
34
  export { default as BaseCarousel } from './components/templates/base-carousel/base-carousel.vue';
32
35
  export { default as MediaThumbnails } from './components/molecules/media-thumbnails/media-thumbnails.vue';
33
36
  export { default as ProgressSteps } from './components/molecules/progress-steps/progress-steps.vue';
@@ -48,5 +51,11 @@ export { default as ImageResize } from './components/molecules/image-resize/imag
48
51
  export { default as ImageCropResize } from './components/molecules/image-crop-resize/image-crop-resize.vue';
49
52
  export { default as ImageUpload } from './components/molecules/image-upload/image-upload.vue';
50
53
  export { useCameraFilter } from './composables/useCameraFilter';
54
+ export { useDirections } from './composables/useDirections';
55
+ export { useGeocoding } from './composables/useGeocoding';
56
+ export { useGeolocation } from './composables/useGeolocation';
51
57
  export type { CameraFilterProps } from './composables/useCameraFilter';
52
58
  export type { ApplyImageFilterOptions } from './composables/useCameraFilter';
59
+ export type { RoutePoint, RouteStep } from './composables/useDirections';
60
+ export type { GeocodingResult } from './composables/useGeocoding';
61
+ export type { GeolocationPositionValue } from './composables/useGeolocation';