@phila/layerboard 3.0.0-beta.20 → 3.0.0-beta.22
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/dist/components/LayerCheckboxSet.vue.d.ts +36 -0
- package/dist/components/LayerPanel.vue.d.ts +63 -0
- package/dist/components/LayerRadioButtonSet.vue.d.ts +39 -0
- package/dist/components/Layerboard.vue.d.ts +332 -0
- package/dist/components/MapPanel.vue.d.ts +45 -0
- package/dist/components/TopicAccordion.vue.d.ts +39 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/composables/index.d.ts +4 -0
- package/dist/composables/useApiDataSources.d.ts +38 -0
- package/dist/composables/useDataSource.d.ts +340 -0
- package/dist/composables/useLayerConfig.d.ts +45 -0
- package/dist/composables/useLayerboard.d.ts +211 -0
- package/dist/index.d.ts +6 -0
- package/dist/layerboard.css +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/layerConfigService.d.ts +40 -0
- package/dist/types/config.d.ts +76 -0
- package/dist/types/dataSource.d.ts +40 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/layer.d.ts +122 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/webmap-transformer.d.ts +222 -0
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LayerConfig } from '../types/layer';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Array of layer configurations to display */
|
|
4
|
+
layers: LayerConfig[];
|
|
5
|
+
/** Set of currently visible layer IDs */
|
|
6
|
+
visibleLayerIds: Set<string>;
|
|
7
|
+
/** Map of layer IDs to opacity values (0-1) */
|
|
8
|
+
layerOpacities?: Record<string, number>;
|
|
9
|
+
/** Set of layer IDs currently loading */
|
|
10
|
+
loadingLayerIds?: Set<string>;
|
|
11
|
+
/** Map of layer IDs to error messages */
|
|
12
|
+
layerErrors?: Record<string, string>;
|
|
13
|
+
/** Current map zoom level (for zoom-based availability) */
|
|
14
|
+
currentZoom?: number;
|
|
15
|
+
/** Whether to show opacity sliders (can be overridden per-layer) */
|
|
16
|
+
showOpacity?: boolean;
|
|
17
|
+
/** Whether to show legends (can be overridden per-layer) */
|
|
18
|
+
showLegend?: boolean;
|
|
19
|
+
/** Accessible label for the group */
|
|
20
|
+
groupLabel?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
23
|
+
toggleLayer: (layerId: string) => any;
|
|
24
|
+
setOpacity: (layerId: string, opacity: number) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
onToggleLayer?: ((layerId: string) => any) | undefined;
|
|
27
|
+
onSetOpacity?: ((layerId: string, opacity: number) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
layerOpacities: Record<string, number>;
|
|
30
|
+
layerErrors: Record<string, string>;
|
|
31
|
+
currentZoom: number;
|
|
32
|
+
showOpacity: boolean;
|
|
33
|
+
showLegend: boolean;
|
|
34
|
+
loadingLayerIds: Set<string>;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFieldSetElement>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LayerConfig } from '../types/layer';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Array of layer configurations with component type */
|
|
4
|
+
layerList: Array<{
|
|
5
|
+
config: LayerConfig;
|
|
6
|
+
component: string;
|
|
7
|
+
}>;
|
|
8
|
+
/** Set of currently visible layer IDs */
|
|
9
|
+
visibleLayers: Set<string>;
|
|
10
|
+
/** Map of layer IDs to opacity values (0-1) */
|
|
11
|
+
layerOpacities: Record<string, number>;
|
|
12
|
+
/** Set of layer IDs currently loading */
|
|
13
|
+
loadingLayers: Set<string>;
|
|
14
|
+
/** Map of layer IDs to error messages */
|
|
15
|
+
layerErrors: Record<string, string>;
|
|
16
|
+
/** Current map zoom level */
|
|
17
|
+
currentZoom: number;
|
|
18
|
+
/** Current search query */
|
|
19
|
+
searchQuery: string;
|
|
20
|
+
/** Map of layer URLs to metadata page URLs */
|
|
21
|
+
layerMetadata: Record<string, string>;
|
|
22
|
+
/** Display mode: 'flat' for simple list, 'topics' for accordion grouping */
|
|
23
|
+
mode?: "flat" | "topics";
|
|
24
|
+
/** Whether to show the search box */
|
|
25
|
+
showSearch?: boolean;
|
|
26
|
+
/** Whether to show opacity sliders */
|
|
27
|
+
showOpacity?: boolean;
|
|
28
|
+
/** Whether to show legends */
|
|
29
|
+
showLegend?: boolean;
|
|
30
|
+
/** Placeholder text for search input */
|
|
31
|
+
searchPlaceholder?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function __VLS_template(): {
|
|
34
|
+
attrs: Partial<{}>;
|
|
35
|
+
slots: {
|
|
36
|
+
topics?(_: {}): any;
|
|
37
|
+
};
|
|
38
|
+
refs: {};
|
|
39
|
+
rootEl: HTMLDivElement;
|
|
40
|
+
};
|
|
41
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
42
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
43
|
+
toggleLayer: (layerId: string) => any;
|
|
44
|
+
setOpacity: (layerId: string, opacity: number) => any;
|
|
45
|
+
updateSearch: (query: string) => any;
|
|
46
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
+
onToggleLayer?: ((layerId: string) => any) | undefined;
|
|
48
|
+
onSetOpacity?: ((layerId: string, opacity: number) => any) | undefined;
|
|
49
|
+
onUpdateSearch?: ((query: string) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
mode: "flat" | "topics";
|
|
52
|
+
showSearch: boolean;
|
|
53
|
+
showOpacity: boolean;
|
|
54
|
+
showLegend: boolean;
|
|
55
|
+
searchPlaceholder: string;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
57
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
60
|
+
new (): {
|
|
61
|
+
$slots: S;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LayerConfig } from '../types/layer';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Array of layer configurations to display */
|
|
4
|
+
layers: LayerConfig[];
|
|
5
|
+
/** Set of currently visible layer IDs */
|
|
6
|
+
visibleLayerIds: Set<string>;
|
|
7
|
+
/** Map of layer IDs to opacity values (0-1) */
|
|
8
|
+
layerOpacities?: Record<string, number>;
|
|
9
|
+
/** Set of layer IDs currently loading */
|
|
10
|
+
loadingLayerIds?: Set<string>;
|
|
11
|
+
/** Map of layer IDs to error messages */
|
|
12
|
+
layerErrors?: Record<string, string>;
|
|
13
|
+
/** Current map zoom level (for zoom-based availability) */
|
|
14
|
+
currentZoom?: number;
|
|
15
|
+
/** Whether to show opacity sliders (can be overridden per-layer) */
|
|
16
|
+
showOpacity?: boolean;
|
|
17
|
+
/** Whether to show legends (can be overridden per-layer) */
|
|
18
|
+
showLegend?: boolean;
|
|
19
|
+
/** Unique name for the radio button group */
|
|
20
|
+
groupName?: string;
|
|
21
|
+
/** Accessible label for the group */
|
|
22
|
+
groupLabel?: string;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
25
|
+
setOpacity: (layerId: string, opacity: number) => any;
|
|
26
|
+
selectLayer: (layerId: string, previousLayerIds: string[]) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onSetOpacity?: ((layerId: string, opacity: number) => any) | undefined;
|
|
29
|
+
onSelectLayer?: ((layerId: string, previousLayerIds: string[]) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
layerOpacities: Record<string, number>;
|
|
32
|
+
layerErrors: Record<string, string>;
|
|
33
|
+
currentZoom: number;
|
|
34
|
+
showOpacity: boolean;
|
|
35
|
+
showLegend: boolean;
|
|
36
|
+
loadingLayerIds: Set<string>;
|
|
37
|
+
groupName: string;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { CyclomediaConfig, PictometryCredentials } from '@phila/phila-ui-map-core';
|
|
2
|
+
import { LayerConfig, TiledLayerConfig, LayerStyleOverride, PopupOverride } from '../types/layer';
|
|
3
|
+
import { DataSourceConfig } from '../types/dataSource';
|
|
4
|
+
type ControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** App title displayed in header */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Optional subtitle displayed in header */
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
/** WebMap ID to load layers from */
|
|
11
|
+
webMapId: string;
|
|
12
|
+
/** Primary theme color for header/footer (CSS color value) */
|
|
13
|
+
themeColor?: string;
|
|
14
|
+
/** Cyclomedia street-level imagery configuration */
|
|
15
|
+
cyclomediaConfig?: CyclomediaConfig;
|
|
16
|
+
/** Pictometry oblique imagery credentials */
|
|
17
|
+
pictometryCredentials?: PictometryCredentials;
|
|
18
|
+
/** Whether to show the default LayerPanel in sidebar (set false when using sidebar slot) */
|
|
19
|
+
showDefaultSidebar?: boolean;
|
|
20
|
+
/** Sidebar width in CSS units */
|
|
21
|
+
sidebarWidth?: string;
|
|
22
|
+
/** Label for mobile toggle button when showing map */
|
|
23
|
+
sidebarLabel?: string;
|
|
24
|
+
/** Label for mobile toggle button when showing sidebar */
|
|
25
|
+
mapLabel?: string;
|
|
26
|
+
/** Whether to fetch metadata from Carto for layer info links */
|
|
27
|
+
fetchMetadata?: boolean;
|
|
28
|
+
/** Tiled layer configurations (ESRI MapServer tiles separate from WebMap) */
|
|
29
|
+
tiledLayers?: TiledLayerConfig[];
|
|
30
|
+
/** API data source configurations for fetching external data (notices, status, etc.) */
|
|
31
|
+
dataSources?: DataSourceConfig[];
|
|
32
|
+
/** Layer style overrides - override paint/legend for specific layers by ID */
|
|
33
|
+
layerStyleOverrides?: Record<string, LayerStyleOverride>;
|
|
34
|
+
/** Popup overrides - override popup behavior for specific layers by ID */
|
|
35
|
+
popupOverrides?: Record<string, PopupOverride>;
|
|
36
|
+
/** Position of basemap toggle/dropdown control */
|
|
37
|
+
basemapControlPosition?: ControlPosition;
|
|
38
|
+
/** Position of zoom in/out navigation control */
|
|
39
|
+
navigationControlPosition?: ControlPosition;
|
|
40
|
+
/** Position of geolocation (find me) control */
|
|
41
|
+
geolocationControlPosition?: ControlPosition;
|
|
42
|
+
/** Position of address search control */
|
|
43
|
+
searchControlPosition?: ControlPosition;
|
|
44
|
+
/** Position of draw tool control (set to null to remove) */
|
|
45
|
+
drawControlPosition?: ControlPosition | null;
|
|
46
|
+
/** Position of Cyclomedia street view button */
|
|
47
|
+
cyclomediaButtonPosition?: ControlPosition;
|
|
48
|
+
/** Position of Pictometry oblique imagery button */
|
|
49
|
+
pictometryButtonPosition?: ControlPosition;
|
|
50
|
+
/** Initial map zoom level */
|
|
51
|
+
initialZoom?: number;
|
|
52
|
+
/** Initial map center [lng, lat] */
|
|
53
|
+
initialCenter?: [number, number];
|
|
54
|
+
};
|
|
55
|
+
declare function toggleTiledLayer(layerId: string): void;
|
|
56
|
+
declare function setTiledLayerVisible(layerId: string, visible: boolean): void;
|
|
57
|
+
declare function setTiledLayerOpacity(layerId: string, opacity: number): void;
|
|
58
|
+
declare function getDataSourceData<T = unknown>(id: string): T | null;
|
|
59
|
+
declare function refetchDataSource(id: string): Promise<void>;
|
|
60
|
+
declare function loadLayerConfigs(): Promise<void>;
|
|
61
|
+
declare function toggleLayer(layerId: string): void;
|
|
62
|
+
declare function setLayerVisible(layerId: string, visible: boolean): void;
|
|
63
|
+
declare function setLayersVisible(layerIds: string[], visible: boolean): void;
|
|
64
|
+
declare function setLayerOpacity(layerId: string, opacity: number): void;
|
|
65
|
+
declare function openModal(): void;
|
|
66
|
+
declare function closeModal(): void;
|
|
67
|
+
declare function __VLS_template(): {
|
|
68
|
+
attrs: Partial<{}>;
|
|
69
|
+
slots: {
|
|
70
|
+
header?(_: {}): any;
|
|
71
|
+
footer?(_: {
|
|
72
|
+
openModal: typeof openModal;
|
|
73
|
+
closeModal: typeof closeModal;
|
|
74
|
+
isModalOpen: boolean;
|
|
75
|
+
}): any;
|
|
76
|
+
footer?(_: {
|
|
77
|
+
openModal: typeof openModal;
|
|
78
|
+
closeModal: typeof closeModal;
|
|
79
|
+
isModalOpen: boolean;
|
|
80
|
+
}): any;
|
|
81
|
+
sidebar?(_: {
|
|
82
|
+
layers: {
|
|
83
|
+
config: {
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
type: "fill" | "line" | "circle";
|
|
87
|
+
url: string;
|
|
88
|
+
where?: string | undefined;
|
|
89
|
+
minZoom?: number | undefined;
|
|
90
|
+
maxZoom?: number | undefined;
|
|
91
|
+
opacity: number;
|
|
92
|
+
paint?: Record<string, unknown> | undefined;
|
|
93
|
+
outlinePaint?: Record<string, unknown> | undefined;
|
|
94
|
+
legend: {
|
|
95
|
+
type: "fill" | "line" | "circle";
|
|
96
|
+
color: string;
|
|
97
|
+
label: string;
|
|
98
|
+
width?: number | undefined;
|
|
99
|
+
radius?: number | undefined;
|
|
100
|
+
}[];
|
|
101
|
+
popup: {
|
|
102
|
+
title: string;
|
|
103
|
+
fields: {
|
|
104
|
+
field: string;
|
|
105
|
+
label: string;
|
|
106
|
+
format?: {
|
|
107
|
+
dateFormat?: string | undefined;
|
|
108
|
+
digitSeparator?: boolean | undefined;
|
|
109
|
+
places?: number | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
showTime?: boolean | undefined;
|
|
113
|
+
} | null;
|
|
114
|
+
displayOptions?: {
|
|
115
|
+
shouldShowCheckbox?: boolean | undefined;
|
|
116
|
+
shouldShowSlider?: boolean | undefined;
|
|
117
|
+
shouldShowLegendBox?: boolean | undefined;
|
|
118
|
+
layerNameChange?: string | undefined;
|
|
119
|
+
} | undefined;
|
|
120
|
+
};
|
|
121
|
+
component: string;
|
|
122
|
+
}[];
|
|
123
|
+
visibleLayers: Set<string> & Omit<Set<string>, keyof Set<any>>;
|
|
124
|
+
layerOpacities: Record<string, number>;
|
|
125
|
+
loadingLayers: Set<string> & Omit<Set<string>, keyof Set<any>>;
|
|
126
|
+
layerErrors: Record<string, string>;
|
|
127
|
+
currentZoom: number;
|
|
128
|
+
toggleLayer: typeof toggleLayer;
|
|
129
|
+
setLayerVisible: typeof setLayerVisible;
|
|
130
|
+
setLayersVisible: typeof setLayersVisible;
|
|
131
|
+
setOpacity: typeof setLayerOpacity;
|
|
132
|
+
tiledLayers: TiledLayerConfig[];
|
|
133
|
+
visibleTiledLayers: Set<string> & Omit<Set<string>, keyof Set<any>>;
|
|
134
|
+
tiledLayerOpacities: Record<string, number>;
|
|
135
|
+
toggleTiledLayer: typeof toggleTiledLayer;
|
|
136
|
+
setTiledLayerVisible: typeof setTiledLayerVisible;
|
|
137
|
+
setTiledLayerOpacity: typeof setTiledLayerOpacity;
|
|
138
|
+
dataSourcesState: import('../types/dataSource').DataSourcesState;
|
|
139
|
+
dataSourcesLoading: boolean;
|
|
140
|
+
getDataSource: typeof getDataSourceData;
|
|
141
|
+
refetchDataSource: typeof refetchDataSource;
|
|
142
|
+
}): any;
|
|
143
|
+
modal?(_: {
|
|
144
|
+
closeModal: typeof closeModal;
|
|
145
|
+
}): any;
|
|
146
|
+
};
|
|
147
|
+
refs: {
|
|
148
|
+
hamburgerRef: HTMLButtonElement;
|
|
149
|
+
mobileMenuRef: HTMLDivElement;
|
|
150
|
+
mobileMenuCloseRef: HTMLButtonElement;
|
|
151
|
+
sidebarRef: HTMLElement;
|
|
152
|
+
mobileToggleRef: HTMLButtonElement;
|
|
153
|
+
modalRef: HTMLDivElement;
|
|
154
|
+
modalCloseRef: HTMLButtonElement;
|
|
155
|
+
};
|
|
156
|
+
rootEl: HTMLDivElement;
|
|
157
|
+
};
|
|
158
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
159
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
160
|
+
/** Layer configurations */
|
|
161
|
+
layerList: import('vue').Ref<{
|
|
162
|
+
config: {
|
|
163
|
+
id: string;
|
|
164
|
+
title: string;
|
|
165
|
+
type: "fill" | "line" | "circle";
|
|
166
|
+
url: string;
|
|
167
|
+
where?: string | undefined;
|
|
168
|
+
minZoom?: number | undefined;
|
|
169
|
+
maxZoom?: number | undefined;
|
|
170
|
+
opacity: number;
|
|
171
|
+
paint?: Record<string, unknown> | undefined;
|
|
172
|
+
outlinePaint?: Record<string, unknown> | undefined;
|
|
173
|
+
legend: {
|
|
174
|
+
type: "fill" | "line" | "circle";
|
|
175
|
+
color: string;
|
|
176
|
+
label: string;
|
|
177
|
+
width?: number | undefined;
|
|
178
|
+
radius?: number | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
popup: {
|
|
181
|
+
title: string;
|
|
182
|
+
fields: {
|
|
183
|
+
field: string;
|
|
184
|
+
label: string;
|
|
185
|
+
format?: {
|
|
186
|
+
dateFormat?: string | undefined;
|
|
187
|
+
digitSeparator?: boolean | undefined;
|
|
188
|
+
places?: number | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
}[];
|
|
191
|
+
showTime?: boolean | undefined;
|
|
192
|
+
} | null;
|
|
193
|
+
displayOptions?: {
|
|
194
|
+
shouldShowCheckbox?: boolean | undefined;
|
|
195
|
+
shouldShowSlider?: boolean | undefined;
|
|
196
|
+
shouldShowLegendBox?: boolean | undefined;
|
|
197
|
+
layerNameChange?: string | undefined;
|
|
198
|
+
} | undefined;
|
|
199
|
+
};
|
|
200
|
+
component: string;
|
|
201
|
+
}[], {
|
|
202
|
+
config: LayerConfig;
|
|
203
|
+
component: string;
|
|
204
|
+
}[] | {
|
|
205
|
+
config: {
|
|
206
|
+
id: string;
|
|
207
|
+
title: string;
|
|
208
|
+
type: "fill" | "line" | "circle";
|
|
209
|
+
url: string;
|
|
210
|
+
where?: string | undefined;
|
|
211
|
+
minZoom?: number | undefined;
|
|
212
|
+
maxZoom?: number | undefined;
|
|
213
|
+
opacity: number;
|
|
214
|
+
paint?: Record<string, unknown> | undefined;
|
|
215
|
+
outlinePaint?: Record<string, unknown> | undefined;
|
|
216
|
+
legend: {
|
|
217
|
+
type: "fill" | "line" | "circle";
|
|
218
|
+
color: string;
|
|
219
|
+
label: string;
|
|
220
|
+
width?: number | undefined;
|
|
221
|
+
radius?: number | undefined;
|
|
222
|
+
}[];
|
|
223
|
+
popup: {
|
|
224
|
+
title: string;
|
|
225
|
+
fields: {
|
|
226
|
+
field: string;
|
|
227
|
+
label: string;
|
|
228
|
+
format?: {
|
|
229
|
+
dateFormat?: string | undefined;
|
|
230
|
+
digitSeparator?: boolean | undefined;
|
|
231
|
+
places?: number | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
}[];
|
|
234
|
+
showTime?: boolean | undefined;
|
|
235
|
+
} | null;
|
|
236
|
+
displayOptions?: {
|
|
237
|
+
shouldShowCheckbox?: boolean | undefined;
|
|
238
|
+
shouldShowSlider?: boolean | undefined;
|
|
239
|
+
shouldShowLegendBox?: boolean | undefined;
|
|
240
|
+
layerNameChange?: string | undefined;
|
|
241
|
+
} | undefined;
|
|
242
|
+
};
|
|
243
|
+
component: string;
|
|
244
|
+
}[]>;
|
|
245
|
+
/** Set of visible layer IDs */
|
|
246
|
+
visibleLayers: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
247
|
+
/** Layer opacity values */
|
|
248
|
+
layerOpacities: import('vue').Ref<Record<string, number>, Record<string, number>>;
|
|
249
|
+
/** Set of currently loading layer IDs */
|
|
250
|
+
loadingLayers: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
251
|
+
/** Map of layer errors by ID */
|
|
252
|
+
layerErrors: import('vue').Ref<Record<string, string>, Record<string, string>>;
|
|
253
|
+
/** Current map zoom level */
|
|
254
|
+
currentZoom: import('vue').Ref<number, number>;
|
|
255
|
+
/** Toggle a layer's visibility */
|
|
256
|
+
toggleLayer: typeof toggleLayer;
|
|
257
|
+
/** Set a layer's visibility explicitly */
|
|
258
|
+
setLayerVisible: typeof setLayerVisible;
|
|
259
|
+
/** Set multiple layers' visibility at once */
|
|
260
|
+
setLayersVisible: typeof setLayersVisible;
|
|
261
|
+
/** Set a layer's opacity */
|
|
262
|
+
setLayerOpacity: typeof setLayerOpacity;
|
|
263
|
+
/** Reload layer configurations */
|
|
264
|
+
reloadConfigs: typeof loadLayerConfigs;
|
|
265
|
+
/** Clear configuration cache */
|
|
266
|
+
clearCache: () => void;
|
|
267
|
+
/** Set of visible tiled layer IDs */
|
|
268
|
+
visibleTiledLayers: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
269
|
+
/** Tiled layer opacity values */
|
|
270
|
+
tiledLayerOpacities: import('vue').Ref<Record<string, number>, Record<string, number>>;
|
|
271
|
+
/** Toggle a tiled layer's visibility */
|
|
272
|
+
toggleTiledLayer: typeof toggleTiledLayer;
|
|
273
|
+
/** Set a tiled layer's visibility explicitly */
|
|
274
|
+
setTiledLayerVisible: typeof setTiledLayerVisible;
|
|
275
|
+
/** Set a tiled layer's opacity */
|
|
276
|
+
setTiledLayerOpacity: typeof setTiledLayerOpacity;
|
|
277
|
+
/** State of all data sources */
|
|
278
|
+
dataSourcesState: import('vue').ComputedRef<import('../types/dataSource').DataSourcesState>;
|
|
279
|
+
/** Whether any data source is loading */
|
|
280
|
+
dataSourcesLoading: import('vue').ComputedRef<boolean>;
|
|
281
|
+
/** Get data from a specific data source */
|
|
282
|
+
getDataSourceData: typeof getDataSourceData;
|
|
283
|
+
/** Refetch a specific data source */
|
|
284
|
+
refetchDataSource: typeof refetchDataSource;
|
|
285
|
+
/** Whether the modal is currently open */
|
|
286
|
+
isModalOpen: import('vue').Ref<boolean, boolean>;
|
|
287
|
+
/** Open the modal */
|
|
288
|
+
openModal: typeof openModal;
|
|
289
|
+
/** Close the modal */
|
|
290
|
+
closeModal: typeof closeModal;
|
|
291
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
292
|
+
zoom: (zoom: number) => any;
|
|
293
|
+
"configs-loaded": (configs: LayerConfig[]) => any;
|
|
294
|
+
"load-error": (error: string) => any;
|
|
295
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
296
|
+
onZoom?: ((zoom: number) => any) | undefined;
|
|
297
|
+
"onConfigs-loaded"?: ((configs: LayerConfig[]) => any) | undefined;
|
|
298
|
+
"onLoad-error"?: ((error: string) => any) | undefined;
|
|
299
|
+
}>, {
|
|
300
|
+
tiledLayers: TiledLayerConfig[];
|
|
301
|
+
basemapControlPosition: ControlPosition;
|
|
302
|
+
navigationControlPosition: ControlPosition;
|
|
303
|
+
geolocationControlPosition: ControlPosition;
|
|
304
|
+
searchControlPosition: ControlPosition;
|
|
305
|
+
drawControlPosition: ControlPosition | null;
|
|
306
|
+
cyclomediaButtonPosition: ControlPosition;
|
|
307
|
+
pictometryButtonPosition: ControlPosition;
|
|
308
|
+
themeColor: string;
|
|
309
|
+
showDefaultSidebar: boolean;
|
|
310
|
+
sidebarWidth: string;
|
|
311
|
+
sidebarLabel: string;
|
|
312
|
+
mapLabel: string;
|
|
313
|
+
fetchMetadata: boolean;
|
|
314
|
+
dataSources: DataSourceConfig[];
|
|
315
|
+
layerStyleOverrides: Record<string, LayerStyleOverride>;
|
|
316
|
+
popupOverrides: Record<string, PopupOverride>;
|
|
317
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
318
|
+
hamburgerRef: HTMLButtonElement;
|
|
319
|
+
mobileMenuRef: HTMLDivElement;
|
|
320
|
+
mobileMenuCloseRef: HTMLButtonElement;
|
|
321
|
+
sidebarRef: HTMLElement;
|
|
322
|
+
mobileToggleRef: HTMLButtonElement;
|
|
323
|
+
modalRef: HTMLDivElement;
|
|
324
|
+
modalCloseRef: HTMLButtonElement;
|
|
325
|
+
}, HTMLDivElement>;
|
|
326
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
327
|
+
export default _default;
|
|
328
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
329
|
+
new (): {
|
|
330
|
+
$slots: S;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CyclomediaConfig, PictometryCredentials } from '@phila/phila-ui-map-core';
|
|
2
|
+
import { TiledLayerConfig } from '../types/layer';
|
|
3
|
+
type ControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
visibleLayers: Set<string>;
|
|
6
|
+
layerOpacities: Record<string, number>;
|
|
7
|
+
layerList: Array<{
|
|
8
|
+
config: any;
|
|
9
|
+
component: string;
|
|
10
|
+
}>;
|
|
11
|
+
tiledLayers?: TiledLayerConfig[];
|
|
12
|
+
visibleTiledLayers?: Set<string>;
|
|
13
|
+
tiledLayerOpacities?: Record<string, number>;
|
|
14
|
+
cyclomediaConfig?: CyclomediaConfig;
|
|
15
|
+
pictometryCredentials?: PictometryCredentials;
|
|
16
|
+
basemapControlPosition?: ControlPosition;
|
|
17
|
+
navigationControlPosition?: ControlPosition;
|
|
18
|
+
geolocationControlPosition?: ControlPosition;
|
|
19
|
+
searchControlPosition?: ControlPosition;
|
|
20
|
+
drawControlPosition?: ControlPosition | null;
|
|
21
|
+
cyclomediaButtonPosition?: ControlPosition;
|
|
22
|
+
pictometryButtonPosition?: ControlPosition;
|
|
23
|
+
initialZoom?: number;
|
|
24
|
+
initialCenter?: [number, number];
|
|
25
|
+
};
|
|
26
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
27
|
+
zoom: (zoom: number) => any;
|
|
28
|
+
layerLoading: (layerId: string, loading: boolean) => any;
|
|
29
|
+
layerError: (layerId: string, error: string | null) => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onZoom?: ((zoom: number) => any) | undefined;
|
|
32
|
+
onLayerLoading?: ((layerId: string, loading: boolean) => any) | undefined;
|
|
33
|
+
onLayerError?: ((layerId: string, error: string | null) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
basemapControlPosition: ControlPosition;
|
|
36
|
+
navigationControlPosition: ControlPosition;
|
|
37
|
+
geolocationControlPosition: ControlPosition;
|
|
38
|
+
searchControlPosition: ControlPosition;
|
|
39
|
+
drawControlPosition: ControlPosition | null;
|
|
40
|
+
cyclomediaButtonPosition: ControlPosition;
|
|
41
|
+
pictometryButtonPosition: ControlPosition;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
|
+
mapRef: any;
|
|
44
|
+
}, HTMLDivElement>;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Title displayed in the accordion header */
|
|
3
|
+
title: string;
|
|
4
|
+
/** Optional icon name or component */
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** Whether the accordion is initially expanded */
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
/** Array of layer IDs associated with this topic */
|
|
9
|
+
layerIds?: string[];
|
|
10
|
+
/** Optional CSS class for custom styling */
|
|
11
|
+
headerClass?: string;
|
|
12
|
+
};
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
icon?(_: {}): any;
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
24
|
+
toggle: (expanded: boolean) => any;
|
|
25
|
+
layerChange: (layerId: string, visible: boolean) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
onToggle?: ((expanded: boolean) => any) | undefined;
|
|
28
|
+
onLayerChange?: ((layerId: string, visible: boolean) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
expanded: boolean;
|
|
31
|
+
layerIds: string[];
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
33
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Layerboard } from './Layerboard.vue';
|
|
2
|
+
export { default as LayerPanel } from './LayerPanel.vue';
|
|
3
|
+
export { default as MapPanel } from './MapPanel.vue';
|
|
4
|
+
export { default as TopicAccordion } from './TopicAccordion.vue';
|
|
5
|
+
export { default as LayerCheckboxSet } from './LayerCheckboxSet.vue';
|
|
6
|
+
export { default as LayerRadioButtonSet } from './LayerRadioButtonSet.vue';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useLayerboard, type UseLayerboardReturn } from './useLayerboard';
|
|
2
|
+
export { useLayerConfig } from './useLayerConfig';
|
|
3
|
+
export { useDataSource, useReactiveDataSource, type UseDataSourceReturn, type DataSourceConfig as LayerDataSourceConfig, type FetchOptions, type Bounds, } from './useDataSource';
|
|
4
|
+
export { useApiDataSources, type UseApiDataSourcesReturn } from './useApiDataSources';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DataSourceConfig, DataSourcesState } from '../types/dataSource';
|
|
3
|
+
/**
|
|
4
|
+
* Composable for managing multiple API data sources.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const dataSources: DataSourceConfig[] = [
|
|
9
|
+
* { id: 'notices', url: 'https://api.example.com/notices', type: 'http-get' },
|
|
10
|
+
* { id: 'trashDay', url: 'https://api.example.com/trash', type: 'http-get' },
|
|
11
|
+
* ]
|
|
12
|
+
*
|
|
13
|
+
* const { state, getData, refetch, isLoading } = useApiDataSources(dataSources)
|
|
14
|
+
*
|
|
15
|
+
* // Access data for a specific source
|
|
16
|
+
* const notices = computed(() => state.value.notices?.data)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useApiDataSources(configs: DataSourceConfig[]): {
|
|
20
|
+
/** Reactive state for all data sources */
|
|
21
|
+
state: Readonly<Ref<DataSourcesState>>;
|
|
22
|
+
/** Whether any data source is currently loading */
|
|
23
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
24
|
+
/** Fetch all data sources */
|
|
25
|
+
fetchAll: () => Promise<void>;
|
|
26
|
+
/** Refetch a specific data source by id */
|
|
27
|
+
refetch: (id: string) => Promise<void>;
|
|
28
|
+
/** Get data for a specific source */
|
|
29
|
+
getData: <T = unknown>(id: string) => T | null;
|
|
30
|
+
/** Check if a specific source is loading */
|
|
31
|
+
isSourceLoading: (id: string) => boolean;
|
|
32
|
+
/** Get error for a specific source */
|
|
33
|
+
getError: (id: string) => string | null;
|
|
34
|
+
/** Stop all polling (useful for cleanup) */
|
|
35
|
+
stopPolling: () => void;
|
|
36
|
+
};
|
|
37
|
+
/** Type for the return value of useApiDataSources */
|
|
38
|
+
export type UseApiDataSourcesReturn = ReturnType<typeof useApiDataSources>;
|