@factorialco/f0-react 7.23.0 → 7.24.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/dist/{ChatPdfThumbnail-BBAjTpRO.js → ChatPdfThumbnail-DzeBhA18.js} +1 -1
- package/dist/{ChatPostComposerDialog-CzzBwu4c.js → ChatPostComposerDialog-DDLVT6WW.js} +3 -3
- package/dist/{DocumentToolbar-CLmAa1CS.js → DocumentToolbar-5oxgBa7d.js} +2 -2
- package/dist/{DocxViewer-17wM_5Ub.js → DocxViewer-r1GX7pUj.js} +2 -2
- package/dist/{F0AiProcessingOverlay-Crv3v_qi.js → F0AiProcessingOverlay-nojpvoxK.js} +285 -285
- package/dist/{F0CanvasPanel-B2aaoYnV.js → F0CanvasPanel-DnlpQoxW.js} +639 -638
- package/dist/F0Map-BK43p1Ck.js +2499 -0
- package/dist/{F0VideoPlayer-aMaViir7.js → F0VideoPlayer-DKPfOJBp.js} +79 -79
- package/dist/{MapProvider-cgH29EcL.js → MapProvider-bLF59EA-.js} +8174 -8124
- package/dist/{SheetViewer-DRvoh1Ht.js → SheetViewer-C9Ca3S1F.js} +2 -2
- package/dist/{TextViewer-t6wTzXs4.js → TextViewer-B_O1q-K3.js} +2 -2
- package/dist/ai.d.ts +18 -8
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +8 -8
- package/dist/component-status.js +2 -2
- package/dist/{experimental-7owBUBms.js → experimental-FF0XQX9W.js} +11859 -13903
- package/dist/experimental.d.ts +363 -88
- package/dist/experimental.js +291 -284
- package/dist/f0.d.ts +178 -8
- package/dist/f0.js +6005 -6007
- package/dist/i18n-provider-defaults.d.ts +18 -8
- package/dist/i18n-provider-defaults.js +11 -1
- package/dist/index-BUqW79F1.js +4 -0
- package/dist/index-BWwc7G48.js +410 -0
- package/dist/{index-CyVOH26Y.js → index-CCea6fTM.js} +1 -1
- package/dist/index-DjrijFLO.js +256 -0
- package/dist/{index-zELO6ifF.js → index-P0wMW0hA.js} +31 -31
- package/dist/{pdfWorker-tk-Ol5j0.js → pdfWorker-DHOTMIrl.js} +3 -3
- package/dist/styles.css +1 -1
- package/dist/{tooltip-BElsa4MF.js → tooltip-CrXp1Uaz.js} +2 -2
- package/package.json +1 -1
- package/dist/index-C2NRpdhB.js +0 -4
- package/dist/index-DnEPnn6A.js +0 -255
- /package/dist/{experimental.css → maplibre-gl.css} +0 -0
|
@@ -490,6 +490,7 @@ export declare const defaultTranslations: {
|
|
|
490
490
|
readonly list: "List";
|
|
491
491
|
readonly kanban: "Kanban";
|
|
492
492
|
readonly graph: "Graph";
|
|
493
|
+
readonly map: "Map";
|
|
493
494
|
readonly pagination: {
|
|
494
495
|
readonly of: "of";
|
|
495
496
|
};
|
|
@@ -497,6 +498,11 @@ export declare const defaultTranslations: {
|
|
|
497
498
|
readonly reset: "Reset to default";
|
|
498
499
|
readonly viewSelectorLabel: "Select view";
|
|
499
500
|
};
|
|
501
|
+
readonly map: {
|
|
502
|
+
readonly notOnMap: "Not on map";
|
|
503
|
+
readonly onMap: "On map";
|
|
504
|
+
readonly notOnMapCount: "{{count}} not on map";
|
|
505
|
+
};
|
|
500
506
|
readonly table: {
|
|
501
507
|
readonly seeMoreChildren: "See more";
|
|
502
508
|
readonly settings: {
|
|
@@ -1389,11 +1395,15 @@ export declare const defaultTranslations: {
|
|
|
1389
1395
|
readonly loadError: "Couldn't load the map.";
|
|
1390
1396
|
readonly retry: "Retry";
|
|
1391
1397
|
readonly currentLocation: "Your location";
|
|
1398
|
+
readonly panel: "Map panel";
|
|
1399
|
+
readonly detailPanel: "Map detail panel";
|
|
1392
1400
|
readonly controls: {
|
|
1393
1401
|
readonly zoomIn: "Zoom in";
|
|
1394
1402
|
readonly zoomOut: "Zoom out";
|
|
1395
1403
|
readonly fit: "Fit to markers";
|
|
1396
1404
|
readonly locate: "My location";
|
|
1405
|
+
readonly showPanel: "Show panel";
|
|
1406
|
+
readonly hidePanel: "Hide panel";
|
|
1397
1407
|
};
|
|
1398
1408
|
};
|
|
1399
1409
|
readonly wizard: {
|
|
@@ -1528,9 +1538,11 @@ declare module "@tiptap/core" {
|
|
|
1528
1538
|
|
|
1529
1539
|
declare module "@tiptap/core" {
|
|
1530
1540
|
interface Commands<ReturnType> {
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1541
|
+
enhanceHighlight: {
|
|
1542
|
+
setEnhanceHighlight: (from: number, to: number, options?: {
|
|
1543
|
+
placeholder?: string;
|
|
1544
|
+
}) => ReturnType;
|
|
1545
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
1534
1546
|
};
|
|
1535
1547
|
}
|
|
1536
1548
|
}
|
|
@@ -1538,11 +1550,9 @@ declare module "@tiptap/core" {
|
|
|
1538
1550
|
|
|
1539
1551
|
declare module "@tiptap/core" {
|
|
1540
1552
|
interface Commands<ReturnType> {
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}) => ReturnType;
|
|
1545
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
1553
|
+
fontSize: {
|
|
1554
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
1555
|
+
unsetFontSize: () => ReturnType;
|
|
1546
1556
|
};
|
|
1547
1557
|
}
|
|
1548
1558
|
}
|
|
@@ -490,6 +490,7 @@ const e = {
|
|
|
490
490
|
list: "List",
|
|
491
491
|
kanban: "Kanban",
|
|
492
492
|
graph: "Graph",
|
|
493
|
+
map: "Map",
|
|
493
494
|
pagination: {
|
|
494
495
|
of: "of"
|
|
495
496
|
},
|
|
@@ -497,6 +498,11 @@ const e = {
|
|
|
497
498
|
reset: "Reset to default",
|
|
498
499
|
viewSelectorLabel: "Select view"
|
|
499
500
|
},
|
|
501
|
+
map: {
|
|
502
|
+
notOnMap: "Not on map",
|
|
503
|
+
onMap: "On map",
|
|
504
|
+
notOnMapCount: "{{count}} not on map"
|
|
505
|
+
},
|
|
500
506
|
table: {
|
|
501
507
|
seeMoreChildren: "See more",
|
|
502
508
|
settings: {
|
|
@@ -1397,11 +1403,15 @@ const e = {
|
|
|
1397
1403
|
loadError: "Couldn't load the map.",
|
|
1398
1404
|
retry: "Retry",
|
|
1399
1405
|
currentLocation: "Your location",
|
|
1406
|
+
panel: "Map panel",
|
|
1407
|
+
detailPanel: "Map detail panel",
|
|
1400
1408
|
controls: {
|
|
1401
1409
|
zoomIn: "Zoom in",
|
|
1402
1410
|
zoomOut: "Zoom out",
|
|
1403
1411
|
fit: "Fit to markers",
|
|
1404
|
-
locate: "My location"
|
|
1412
|
+
locate: "My location",
|
|
1413
|
+
showPanel: "Show panel",
|
|
1414
|
+
hidePanel: "Hide panel"
|
|
1405
1415
|
}
|
|
1406
1416
|
},
|
|
1407
1417
|
wizard: {
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { jsxs as k, jsx as o, Fragment as rn } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useEffect as v, useMemo as M, useCallback as A, useState as w } from "react";
|
|
3
|
+
import { o as En, q as Fn, r as ln, s as Tn, t as Dn, v as Pn, w as Bn, x as Ln, u as sn } from "./F0CanvasPanel-DnlpQoxW.js";
|
|
4
|
+
import { d as L, f as on, u as In } from "./tooltip-CrXp1Uaz.js";
|
|
5
|
+
import { a as cn, u as Qn, S as jn } from "./MapProvider-bLF59EA-.js";
|
|
6
|
+
import { a as Kn, b as Un, R as tn } from "./F0Map-BK43p1Ck.js";
|
|
7
|
+
const R = 3, _n = ({
|
|
8
|
+
title: e,
|
|
9
|
+
count: t,
|
|
10
|
+
ariaLabel: r,
|
|
11
|
+
avatars: a,
|
|
12
|
+
onClick: i,
|
|
13
|
+
dataTestId: s
|
|
14
|
+
}) => /* @__PURE__ */ k(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: i,
|
|
19
|
+
"aria-label": r,
|
|
20
|
+
"data-testid": s,
|
|
21
|
+
className: L(
|
|
22
|
+
"flex h-8 items-center gap-2 rounded-md pl-3 pr-1.5",
|
|
23
|
+
"hover:bg-f1-background-hover",
|
|
24
|
+
on()
|
|
25
|
+
),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ o("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ o(
|
|
28
|
+
En,
|
|
29
|
+
{
|
|
30
|
+
variant: "label",
|
|
31
|
+
content: e,
|
|
32
|
+
markdown: !1,
|
|
33
|
+
className: "text-f1-foreground-secondary"
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
a && a.length > 0 ? (
|
|
37
|
+
// `sm`: at `xs` the "+N" bubble becomes an ellipsis, and the number is
|
|
38
|
+
// the point. The rest go in as `remainingCount`, not items, which would
|
|
39
|
+
// make the bubble a button inside this button.
|
|
40
|
+
/* @__PURE__ */ o(
|
|
41
|
+
Fn,
|
|
42
|
+
{
|
|
43
|
+
type: "person",
|
|
44
|
+
avatars: a.slice(0, R),
|
|
45
|
+
remainingCount: t > R ? t - R : void 0,
|
|
46
|
+
size: "sm",
|
|
47
|
+
max: R,
|
|
48
|
+
noTooltip: !0
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
) : /* @__PURE__ */ o(ln, { value: t, size: "sm" })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
), an = ({
|
|
55
|
+
title: e,
|
|
56
|
+
count: t,
|
|
57
|
+
open: r,
|
|
58
|
+
onOpenChange: a,
|
|
59
|
+
defaultOpen: i = !0,
|
|
60
|
+
children: s,
|
|
61
|
+
dataTestId: l
|
|
62
|
+
}) => {
|
|
63
|
+
const [c = i, u] = In({
|
|
64
|
+
prop: r,
|
|
65
|
+
defaultProp: i,
|
|
66
|
+
onChange: a
|
|
67
|
+
});
|
|
68
|
+
return /* @__PURE__ */ k(Tn, { open: c, onOpenChange: u, "data-testid": l, children: [
|
|
69
|
+
/* @__PURE__ */ o(Dn, { asChild: !0, children: /* @__PURE__ */ k(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
className: L(
|
|
74
|
+
// Wider than its rows, padded so the title aligns with them.
|
|
75
|
+
"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left",
|
|
76
|
+
"hover:bg-f1-background-hover",
|
|
77
|
+
on()
|
|
78
|
+
),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ o(cn, { variant: "label", content: e, markdown: !1, ellipsis: !0 }) }),
|
|
81
|
+
/* @__PURE__ */ o(ln, { value: t, size: "sm" }),
|
|
82
|
+
/* @__PURE__ */ o(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
className: L(
|
|
86
|
+
"flex shrink-0 text-f1-icon transition-transform duration-200 motion-reduce:transition-none",
|
|
87
|
+
c && "rotate-180"
|
|
88
|
+
),
|
|
89
|
+
children: /* @__PURE__ */ o(Pn, { icon: Bn, size: "sm" })
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
) }),
|
|
95
|
+
/* @__PURE__ */ o(Ln, { className: "px-0.5", children: s })
|
|
96
|
+
] });
|
|
97
|
+
}, Wn = ({
|
|
98
|
+
rows: e,
|
|
99
|
+
unplaced: t,
|
|
100
|
+
placed: r,
|
|
101
|
+
matches: a,
|
|
102
|
+
notOnMapOpen: i,
|
|
103
|
+
onNotOnMapOpenChange: s
|
|
104
|
+
}) => {
|
|
105
|
+
const l = sn();
|
|
106
|
+
return /* @__PURE__ */ o("div", { className: "flex h-full min-h-0 flex-col gap-1 overflow-y-auto px-1 pb-1.5 pt-0.5", children: a ? (
|
|
107
|
+
// Section rows step in 2px; so do matches, to stay where they were.
|
|
108
|
+
/* @__PURE__ */ o("div", { className: "px-0.5", "data-testid": "map-panel-search-results", children: a.length > 0 ? e(a) : /* @__PURE__ */ o("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ o(
|
|
109
|
+
cn,
|
|
110
|
+
{
|
|
111
|
+
variant: "description",
|
|
112
|
+
content: l.select.noResults,
|
|
113
|
+
markdown: !1
|
|
114
|
+
}
|
|
115
|
+
) }) })
|
|
116
|
+
) : /* @__PURE__ */ k(rn, { children: [
|
|
117
|
+
t.length > 0 ? /* @__PURE__ */ o(
|
|
118
|
+
an,
|
|
119
|
+
{
|
|
120
|
+
title: l.collections.map.notOnMap,
|
|
121
|
+
count: t.length,
|
|
122
|
+
open: i,
|
|
123
|
+
onOpenChange: s,
|
|
124
|
+
dataTestId: "map-panel-not-on-map",
|
|
125
|
+
children: e(t)
|
|
126
|
+
}
|
|
127
|
+
) : null,
|
|
128
|
+
/* @__PURE__ */ o(
|
|
129
|
+
an,
|
|
130
|
+
{
|
|
131
|
+
title: l.collections.map.onMap,
|
|
132
|
+
count: r.length,
|
|
133
|
+
dataTestId: "map-panel-on-map",
|
|
134
|
+
children: e(r)
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }) });
|
|
138
|
+
}, Xn = ({
|
|
139
|
+
querySignature: e,
|
|
140
|
+
records: t,
|
|
141
|
+
markerKey: r,
|
|
142
|
+
isLoading: a,
|
|
143
|
+
reframe: i
|
|
144
|
+
}) => {
|
|
145
|
+
const s = p(null), l = p(
|
|
146
|
+
null
|
|
147
|
+
), c = p(null);
|
|
148
|
+
return v(() => {
|
|
149
|
+
s.current !== null && s.current !== e && (l.current = { records: t, markerKey: r }), s.current = e;
|
|
150
|
+
}, [e, t, r]), v(() => {
|
|
151
|
+
const u = l.current;
|
|
152
|
+
if (!u || a || u.records === t)
|
|
153
|
+
return;
|
|
154
|
+
l.current = null;
|
|
155
|
+
const E = c.current;
|
|
156
|
+
c.current = null, u.markerKey !== r ? i() : E?.();
|
|
157
|
+
}, [a, t, r, i]), {
|
|
158
|
+
/** Runs `fn` now, or once a pending query lands without new markers. */
|
|
159
|
+
ifUnchanged: (u) => {
|
|
160
|
+
l.current ? c.current = u : u();
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}, $n = ({
|
|
164
|
+
selectedId: e,
|
|
165
|
+
search: t,
|
|
166
|
+
zoomedInRef: r,
|
|
167
|
+
fitToMarkers: a,
|
|
168
|
+
ifUnchanged: i
|
|
169
|
+
}) => {
|
|
170
|
+
const s = p(null);
|
|
171
|
+
v(() => {
|
|
172
|
+
const c = s.current;
|
|
173
|
+
s.current = e, c && !e && r.current && a(), e || (r.current = !1);
|
|
174
|
+
}, [e, a, r]);
|
|
175
|
+
const l = p(t);
|
|
176
|
+
v(() => {
|
|
177
|
+
const c = l.current;
|
|
178
|
+
l.current = t, !(!c || t) && (r.current && i(a), r.current = !1);
|
|
179
|
+
}, [t, a, r]);
|
|
180
|
+
}, qn = (e, {
|
|
181
|
+
coordinates: t,
|
|
182
|
+
label: r,
|
|
183
|
+
marker: a,
|
|
184
|
+
recordId: i
|
|
185
|
+
}) => {
|
|
186
|
+
const s = {
|
|
187
|
+
points: [],
|
|
188
|
+
placed: [],
|
|
189
|
+
unplaced: [],
|
|
190
|
+
placedIds: /* @__PURE__ */ new Set(),
|
|
191
|
+
unplacedKinds: /* @__PURE__ */ new Map()
|
|
192
|
+
};
|
|
193
|
+
for (const l of e) {
|
|
194
|
+
const c = i(l), u = t(l);
|
|
195
|
+
if (!Array.isArray(u)) {
|
|
196
|
+
s.unplaced.push(l), s.unplacedKinds.set(c, u?.kind ?? null);
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
s.placedIds.add(c), s.placed.push(l), s.points.push({
|
|
200
|
+
id: c,
|
|
201
|
+
coordinates: u,
|
|
202
|
+
label: r?.(l),
|
|
203
|
+
...a?.(l) ?? { variant: "default" }
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return s;
|
|
207
|
+
}, zn = (e) => e.every((t) => t.variant === "employee") ? e.map(({ firstName: t, lastName: r, src: a }) => ({
|
|
208
|
+
firstName: t,
|
|
209
|
+
lastName: r,
|
|
210
|
+
src: a
|
|
211
|
+
})) : null, Hn = ({
|
|
212
|
+
hasSidebar: e,
|
|
213
|
+
panel: t,
|
|
214
|
+
expanded: r,
|
|
215
|
+
onToggle: a,
|
|
216
|
+
unplacedCount: i,
|
|
217
|
+
countButton: s,
|
|
218
|
+
search: l
|
|
219
|
+
}) => e ? {
|
|
220
|
+
sidebar: t,
|
|
221
|
+
sidebarExpanded: r,
|
|
222
|
+
onSidebarToggle: a,
|
|
223
|
+
sidebarToggleAddon: i > 0 ? s : void 0,
|
|
224
|
+
sidebarHeaderStart: l
|
|
225
|
+
} : {}, ee = ({
|
|
226
|
+
source: e,
|
|
227
|
+
coordinates: t,
|
|
228
|
+
label: r,
|
|
229
|
+
marker: a,
|
|
230
|
+
getRecordId: i,
|
|
231
|
+
selectedRecordId: s,
|
|
232
|
+
onSelect: l,
|
|
233
|
+
revealRecordId: c,
|
|
234
|
+
searchSelectionNonce: u,
|
|
235
|
+
viewportInset: E,
|
|
236
|
+
initialViewport: un,
|
|
237
|
+
showControls: pn,
|
|
238
|
+
projection: dn,
|
|
239
|
+
provider: fn,
|
|
240
|
+
markerLimit: mn,
|
|
241
|
+
ariaLabel: hn,
|
|
242
|
+
sidebar: I,
|
|
243
|
+
sidebarSearchText: C,
|
|
244
|
+
detail: F,
|
|
245
|
+
onSidebarToggle: gn,
|
|
246
|
+
onLoadData: vn,
|
|
247
|
+
onLoadError: bn
|
|
248
|
+
}) => {
|
|
249
|
+
const Q = sn(), j = Math.min(
|
|
250
|
+
mn ?? tn,
|
|
251
|
+
tn
|
|
252
|
+
), Mn = M(
|
|
253
|
+
() => e.dataAdapter.paginationType ? { ...e.dataAdapter, perPage: j } : e.dataAdapter,
|
|
254
|
+
[e.dataAdapter, j]
|
|
255
|
+
), { data: Cn, paginationInfo: K, isInitialLoading: U, isLoading: xn } = Qn({ ...e, dataAdapter: Mn }, { onError: bn }), d = Cn.records;
|
|
256
|
+
v(() => {
|
|
257
|
+
vn({
|
|
258
|
+
totalItems: K?.total || d.length,
|
|
259
|
+
filters: e.currentFilters,
|
|
260
|
+
search: e.currentSearch,
|
|
261
|
+
isInitialLoading: U,
|
|
262
|
+
data: d
|
|
263
|
+
});
|
|
264
|
+
}, [K?.total, d]);
|
|
265
|
+
const f = A(
|
|
266
|
+
(n) => i ? i(n) : String(n.id),
|
|
267
|
+
[i]
|
|
268
|
+
), { points: _, placed: T, unplaced: m, placedIds: x, unplacedKinds: W } = M(
|
|
269
|
+
() => qn(d, { coordinates: t, label: r, marker: a, recordId: f }),
|
|
270
|
+
[d, t, r, a, f]
|
|
271
|
+
), [On, Sn] = w(
|
|
272
|
+
null
|
|
273
|
+
), h = s !== void 0 ? s : On, O = p(null), X = p(null), $ = p(h);
|
|
274
|
+
$.current = h;
|
|
275
|
+
const D = p(!1), b = A(
|
|
276
|
+
(n) => {
|
|
277
|
+
if (n !== null && n === O.current) {
|
|
278
|
+
O.current = null;
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
X.current = n, n !== null && (D.current = !1), s === void 0 && Sn(n), l?.(
|
|
282
|
+
n === null ? null : d.find((g) => f(g) === n) ?? null
|
|
283
|
+
);
|
|
284
|
+
},
|
|
285
|
+
[l, d, f, s]
|
|
286
|
+
), S = p(null), N = A(
|
|
287
|
+
(n) => {
|
|
288
|
+
b(n), x.has(n) && S.current && (O.current = n, S.current.focusMarker(n), O.current = null, D.current = !0);
|
|
289
|
+
},
|
|
290
|
+
[x, b]
|
|
291
|
+
), q = p(l);
|
|
292
|
+
q.current = l, v(
|
|
293
|
+
() => () => {
|
|
294
|
+
(X.current !== null || $.current !== null) && q.current?.(null);
|
|
295
|
+
},
|
|
296
|
+
[]
|
|
297
|
+
);
|
|
298
|
+
const [P, Nn] = w(!1), [yn, z] = w(!1), [B, H] = w(""), J = (n) => {
|
|
299
|
+
n !== P && (Nn(n), gn?.(n));
|
|
300
|
+
}, An = () => {
|
|
301
|
+
z(!0), H(""), J(!0);
|
|
302
|
+
}, Z = M(
|
|
303
|
+
() => ({
|
|
304
|
+
select: (n) => n ? N(f(n)) : b(null),
|
|
305
|
+
selectedRecordId: h,
|
|
306
|
+
placement: (n) => {
|
|
307
|
+
const g = f(n);
|
|
308
|
+
return x.has(g) ? "placed" : W.get(g) ?? "unplaced";
|
|
309
|
+
}
|
|
310
|
+
}),
|
|
311
|
+
[N, b, f, h, x, W]
|
|
312
|
+
), y = h ? d.find((n) => f(n) === h) ?? null : null, G = p(null);
|
|
313
|
+
y && (G.current = y);
|
|
314
|
+
const V = y ?? G.current, Y = A(() => S.current?.fitToMarkers(), []), wn = Xn({
|
|
315
|
+
querySignature: JSON.stringify({
|
|
316
|
+
filters: e.currentFilters ?? {},
|
|
317
|
+
search: e.currentSearch ?? ""
|
|
318
|
+
}),
|
|
319
|
+
records: d,
|
|
320
|
+
markerKey: _.map((n) => n.id).join(","),
|
|
321
|
+
isLoading: xn,
|
|
322
|
+
reframe: Y
|
|
323
|
+
});
|
|
324
|
+
$n({
|
|
325
|
+
selectedId: h,
|
|
326
|
+
search: e.currentSearch,
|
|
327
|
+
zoomedInRef: D,
|
|
328
|
+
fitToMarkers: Y,
|
|
329
|
+
ifUnchanged: wn.ifUnchanged
|
|
330
|
+
});
|
|
331
|
+
const nn = p(null);
|
|
332
|
+
v(() => {
|
|
333
|
+
const n = `${c}:${u ?? 0}`;
|
|
334
|
+
!c || nn.current === n || !d.some((g) => f(g) === c) || (nn.current = n, N(c));
|
|
335
|
+
}, [c, u, d, f, N]);
|
|
336
|
+
const Rn = M(() => {
|
|
337
|
+
const n = B.trim().toLowerCase();
|
|
338
|
+
return !C || !n ? null : [...m, ...T].filter(
|
|
339
|
+
(g) => C(g).toLowerCase().includes(n)
|
|
340
|
+
);
|
|
341
|
+
}, [C, B, m, T]), kn = M(
|
|
342
|
+
() => a ? zn(m.map(a)) : null,
|
|
343
|
+
[m, a]
|
|
344
|
+
), en = "flex h-full min-h-0 flex-1 flex-col border-0 border-t border-solid border-f1-border-secondary";
|
|
345
|
+
return U ? /* @__PURE__ */ o("div", { className: en, children: /* @__PURE__ */ o(Kn, {}) }) : /* @__PURE__ */ o("div", { className: en, children: /* @__PURE__ */ o(
|
|
346
|
+
Un,
|
|
347
|
+
{
|
|
348
|
+
ref: S,
|
|
349
|
+
markers: _,
|
|
350
|
+
selectedMarkerId: h,
|
|
351
|
+
onMarkerSelect: b,
|
|
352
|
+
centerOnMarkerClick: !0,
|
|
353
|
+
viewportInset: E,
|
|
354
|
+
initialViewport: un,
|
|
355
|
+
showControls: pn,
|
|
356
|
+
projection: dn,
|
|
357
|
+
provider: fn,
|
|
358
|
+
ariaLabel: hn,
|
|
359
|
+
...Hn({
|
|
360
|
+
hasSidebar: !!I,
|
|
361
|
+
panel: /* @__PURE__ */ o(
|
|
362
|
+
Wn,
|
|
363
|
+
{
|
|
364
|
+
rows: (n) => I?.(n, Z),
|
|
365
|
+
unplaced: m,
|
|
366
|
+
placed: T,
|
|
367
|
+
matches: Rn,
|
|
368
|
+
notOnMapOpen: yn,
|
|
369
|
+
onNotOnMapOpenChange: z
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
expanded: P,
|
|
373
|
+
onToggle: () => J(!P),
|
|
374
|
+
unplacedCount: m.length,
|
|
375
|
+
countButton: /* @__PURE__ */ o(
|
|
376
|
+
_n,
|
|
377
|
+
{
|
|
378
|
+
title: Q.collections.map.notOnMap,
|
|
379
|
+
count: m.length,
|
|
380
|
+
ariaLabel: Q.t("collections.map.notOnMapCount", {
|
|
381
|
+
count: m.length
|
|
382
|
+
}),
|
|
383
|
+
avatars: kn,
|
|
384
|
+
onClick: An,
|
|
385
|
+
dataTestId: "map-not-on-map"
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
search: C ? /* @__PURE__ */ o(
|
|
389
|
+
jn,
|
|
390
|
+
{
|
|
391
|
+
value: B,
|
|
392
|
+
onChange: (n) => H(n ?? ""),
|
|
393
|
+
variant: "ghost",
|
|
394
|
+
expandedWidth: "fill"
|
|
395
|
+
}
|
|
396
|
+
) : void 0
|
|
397
|
+
}),
|
|
398
|
+
detail: F ? V ? F(V, Z) : (
|
|
399
|
+
// oxlint-disable-next-line react/jsx-no-useless-fragment -- a node, not null: see above
|
|
400
|
+
/* @__PURE__ */ o(rn, {})
|
|
401
|
+
) : null,
|
|
402
|
+
detailOpen: !!y,
|
|
403
|
+
clearSelectionOnBackgroundClick: !F,
|
|
404
|
+
fullScreen: !0
|
|
405
|
+
}
|
|
406
|
+
) });
|
|
407
|
+
};
|
|
408
|
+
export {
|
|
409
|
+
ee as MapCollection
|
|
410
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as L } from "./F0CanvasPanel-
|
|
1
|
+
import { n as L } from "./F0CanvasPanel-DnlpQoxW.js";
|
|
2
2
|
const O = (e) => e.map(([n, s]) => ({ lat: s, lng: n })), x = (e, n) => ({
|
|
3
3
|
strokeColor: n && e.hover?.color || e.color,
|
|
4
4
|
strokeWeight: n && e.hover?.width || e.width,
|