@rankingcoach/vanguard 1.12.2 → 1.13.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.
- package/dist/index-AdvancedMarker.js +235 -0
- package/dist/index-Autocomplete.js +62 -62
- package/dist/index-DateRange.js +1 -1
- package/dist/index-GoogleMaps.js +42 -36
- package/dist/index-GoogleMapsAdvancedMarker.js +64 -0
- package/dist/index-GoogleMapsAdvancedMarkerContent.js +41 -0
- package/dist/index-Parser2.js +3 -2
- package/dist/index-_virtual10.js +5 -3
- package/dist/index-_virtual11.js +5 -5
- package/dist/index-_virtual12.js +3 -5
- package/dist/index-cjs.js +1 -1
- package/dist/index-lib5.js +1 -1
- package/dist/index-map-context.js +12 -0
- package/dist/index-map-helper.js +38 -0
- package/dist/index-tiny-invariant.js +12 -0
- package/dist/index-video.es.js +2 -2
- package/dist/index.js +425 -418
- package/dist/types/core/Autocomplete/stories/WithMultiple.story.d.ts +0 -4
- package/dist/types/core/GoogleMaps/GoogleMaps.d.ts +2 -1
- package/dist/types/core/GoogleMaps/GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarker.d.ts +55 -0
- package/dist/types/core/GoogleMaps/GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarkerContent.d.ts +41 -0
- package/dist/types/core/GoogleMaps/index.d.ts +6 -0
- package/dist/types/core/GoogleMaps/map-context.d.ts +1 -1
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarker.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarkerCustomIcon.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarkerHTML.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMapIdAndMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMarkerInfoBox.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMultipleAdvancedMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMultipleMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithSingleMarker.story.d.ts +2 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +18553 -19223
- package/dist-wordpress/types/index.d.ts +0 -2
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
var Xe = Object.defineProperty;
|
|
2
|
+
var Ye = (n, i, o) => i in n ? Xe(n, i, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[i] = o;
|
|
3
|
+
var te = (n, i, o) => Ye(n, typeof i != "symbol" ? i + "" : i, o);
|
|
4
|
+
import { jsx as $e, Fragment as Ve } from "react/jsx-runtime";
|
|
5
|
+
import { PureComponent as Ze, Children as Ue, isValidElement as We, cloneElement as qe, memo as Oe, useContext as Se, useState as r, useEffect as t, useMemo as Ce } from "react";
|
|
6
|
+
import { applyUpdatersToPropsAndRegisterEvents as Ae, unregisterEvents as Me } from "./index-map-helper.js";
|
|
7
|
+
import { MapContext as Be } from "./index-map-context.js";
|
|
8
|
+
const je = {
|
|
9
|
+
onAnimationChanged: "animation_changed",
|
|
10
|
+
onClick: "click",
|
|
11
|
+
onClickableChanged: "clickable_changed",
|
|
12
|
+
onCursorChanged: "cursor_changed",
|
|
13
|
+
onDblClick: "dblclick",
|
|
14
|
+
onDrag: "drag",
|
|
15
|
+
onDragEnd: "dragend",
|
|
16
|
+
onDraggableChanged: "draggable_changed",
|
|
17
|
+
onDragStart: "dragstart",
|
|
18
|
+
onFlatChanged: "flat_changed",
|
|
19
|
+
onIconChanged: "icon_changed",
|
|
20
|
+
onMouseDown: "mousedown",
|
|
21
|
+
onMouseOut: "mouseout",
|
|
22
|
+
onMouseOver: "mouseover",
|
|
23
|
+
onMouseUp: "mouseup",
|
|
24
|
+
onPositionChanged: "position_changed",
|
|
25
|
+
onRightClick: "rightclick",
|
|
26
|
+
onShapeChanged: "shape_changed",
|
|
27
|
+
onTitleChanged: "title_changed",
|
|
28
|
+
onVisibleChanged: "visible_changed",
|
|
29
|
+
onZindexChanged: "zindex_changed"
|
|
30
|
+
}, Fe = {
|
|
31
|
+
animation(n, i) {
|
|
32
|
+
},
|
|
33
|
+
clickable(n, i) {
|
|
34
|
+
n.gmpClickable = i;
|
|
35
|
+
},
|
|
36
|
+
cursor(n, i) {
|
|
37
|
+
},
|
|
38
|
+
draggable(n, i) {
|
|
39
|
+
n.draggable = i;
|
|
40
|
+
},
|
|
41
|
+
icon(n, i) {
|
|
42
|
+
},
|
|
43
|
+
label(n, i) {
|
|
44
|
+
},
|
|
45
|
+
map(n, i) {
|
|
46
|
+
n.map = i;
|
|
47
|
+
},
|
|
48
|
+
opacity(n, i) {
|
|
49
|
+
},
|
|
50
|
+
options(n, i) {
|
|
51
|
+
},
|
|
52
|
+
position(n, i) {
|
|
53
|
+
n.position = i;
|
|
54
|
+
},
|
|
55
|
+
shape(n, i) {
|
|
56
|
+
},
|
|
57
|
+
title(n, i) {
|
|
58
|
+
n.title = i;
|
|
59
|
+
},
|
|
60
|
+
visible(n, i) {
|
|
61
|
+
},
|
|
62
|
+
zIndex(n, i) {
|
|
63
|
+
n.zIndex = i;
|
|
64
|
+
}
|
|
65
|
+
}, ne = {};
|
|
66
|
+
function De({
|
|
67
|
+
position: n,
|
|
68
|
+
options: i,
|
|
69
|
+
clusterer: o,
|
|
70
|
+
noClustererRedraw: W,
|
|
71
|
+
children: q,
|
|
72
|
+
draggable: l,
|
|
73
|
+
visible: Ge,
|
|
74
|
+
animation: He,
|
|
75
|
+
clickable: a,
|
|
76
|
+
cursor: Ie,
|
|
77
|
+
icon: Je,
|
|
78
|
+
label: Ke,
|
|
79
|
+
opacity: Ne,
|
|
80
|
+
shape: Qe,
|
|
81
|
+
title: g,
|
|
82
|
+
zIndex: m,
|
|
83
|
+
onClick: d,
|
|
84
|
+
onDblClick: p,
|
|
85
|
+
onDrag: v,
|
|
86
|
+
onDragEnd: c,
|
|
87
|
+
onDragStart: f,
|
|
88
|
+
onMouseOut: L,
|
|
89
|
+
onMouseOver: u,
|
|
90
|
+
onMouseUp: h,
|
|
91
|
+
onMouseDown: _,
|
|
92
|
+
onRightClick: k,
|
|
93
|
+
onClickableChanged: b,
|
|
94
|
+
onCursorChanged: x,
|
|
95
|
+
onAnimationChanged: y,
|
|
96
|
+
onDraggableChanged: E,
|
|
97
|
+
onFlatChanged: P,
|
|
98
|
+
onIconChanged: w,
|
|
99
|
+
onPositionChanged: z,
|
|
100
|
+
onShapeChanged: A,
|
|
101
|
+
onTitleChanged: M,
|
|
102
|
+
onVisibleChanged: j,
|
|
103
|
+
onZindexChanged: F,
|
|
104
|
+
onLoad: se,
|
|
105
|
+
onUnmount: ie
|
|
106
|
+
}) {
|
|
107
|
+
const B = Se(Be), [e, Re] = r(null), [G, re] = r(null), [H, oe] = r(null), [I, le] = r(null), [J, ae] = r(null), [K, ge] = r(null), [N, me] = r(null), [Q, de] = r(null), [R, pe] = r(null), [T, ve] = r(null), [ce, fe] = r(null), [X, Le] = r(null), [Y, ue] = r(null), [$, he] = r(null), [V, _e] = r(null), [Z, ke] = r(null), [O, be] = r(null), [S, xe] = r(null), [ye, Ee] = r(null), [C, Pe] = r(null), [D, we] = r(null), [ee, ze] = r(null);
|
|
108
|
+
t(() => {
|
|
109
|
+
e !== null && (e.map = B);
|
|
110
|
+
}, [B]), t(() => {
|
|
111
|
+
}, [e, i]), t(() => {
|
|
112
|
+
typeof l < "u" && e !== null && (e.draggable = l);
|
|
113
|
+
}, [e, l]), t(() => {
|
|
114
|
+
n && e !== null && (e.position = n);
|
|
115
|
+
}, [e, n]), t(() => {
|
|
116
|
+
}, [e, Ge]), t(() => {
|
|
117
|
+
}, [e, He]), t(() => {
|
|
118
|
+
e && a !== void 0 && (e.gmpClickable = a);
|
|
119
|
+
}, [e, a]), t(() => {
|
|
120
|
+
}, [e, Ie]), t(() => {
|
|
121
|
+
}, [e, Je]), t(() => {
|
|
122
|
+
}, [e, Ke]), t(() => {
|
|
123
|
+
}, [e, Ne]), t(() => {
|
|
124
|
+
}, [e, Qe]), t(() => {
|
|
125
|
+
e && g !== void 0 && (e.title = g);
|
|
126
|
+
}, [e, g]), t(() => {
|
|
127
|
+
e && m !== void 0 && (e.zIndex = m);
|
|
128
|
+
}, [e, m]), t(() => {
|
|
129
|
+
e && p && (G !== null && google.maps.event.removeListener(G), re(google.maps.event.addListener(e, "dblclick", p)));
|
|
130
|
+
}, [p]), t(() => {
|
|
131
|
+
e && c && (H !== null && google.maps.event.removeListener(H), oe(google.maps.event.addListener(e, "dragend", c)));
|
|
132
|
+
}, [c]), t(() => {
|
|
133
|
+
e && f && (I !== null && google.maps.event.removeListener(I), le(google.maps.event.addListener(e, "dragstart", f)));
|
|
134
|
+
}, [f]), t(() => {
|
|
135
|
+
e && _ && (J !== null && google.maps.event.removeListener(J), ae(google.maps.event.addListener(e, "mousedown", _)));
|
|
136
|
+
}, [_]), t(() => {
|
|
137
|
+
e && L && (K !== null && google.maps.event.removeListener(K), ge(google.maps.event.addListener(e, "mouseout", L)));
|
|
138
|
+
}, [L]), t(() => {
|
|
139
|
+
e && u && (N !== null && google.maps.event.removeListener(N), me(google.maps.event.addListener(e, "mouseover", u)));
|
|
140
|
+
}, [u]), t(() => {
|
|
141
|
+
e && h && (Q !== null && google.maps.event.removeListener(Q), de(google.maps.event.addListener(e, "mouseup", h)));
|
|
142
|
+
}, [h]), t(() => {
|
|
143
|
+
e && k && (R !== null && google.maps.event.removeListener(R), pe(google.maps.event.addListener(e, "rightclick", k)));
|
|
144
|
+
}, [k]), t(() => {
|
|
145
|
+
e && d && (T !== null && google.maps.event.removeListener(T), ve(google.maps.event.addListener(e, "click", d)));
|
|
146
|
+
}, [d]), t(() => {
|
|
147
|
+
e && v && (ce !== null && google.maps.event.removeListener(ce), fe(google.maps.event.addListener(e, "drag", v)));
|
|
148
|
+
}, [v]), t(() => {
|
|
149
|
+
e && b && (X !== null && google.maps.event.removeListener(X), Le(google.maps.event.addListener(e, "clickable_changed", b)));
|
|
150
|
+
}, [b]), t(() => {
|
|
151
|
+
e && x && (Y !== null && google.maps.event.removeListener(Y), ue(google.maps.event.addListener(e, "cursor_changed", x)));
|
|
152
|
+
}, [x]), t(() => {
|
|
153
|
+
e && y && ($ !== null && google.maps.event.removeListener($), he(google.maps.event.addListener(e, "animation_changed", y)));
|
|
154
|
+
}, [y]), t(() => {
|
|
155
|
+
e && E && (V !== null && google.maps.event.removeListener(V), _e(google.maps.event.addListener(e, "draggable_changed", E)));
|
|
156
|
+
}, [E]), t(() => {
|
|
157
|
+
e && P && (Z !== null && google.maps.event.removeListener(Z), ke(google.maps.event.addListener(e, "flat_changed", P)));
|
|
158
|
+
}, [P]), t(() => {
|
|
159
|
+
e && w && (O !== null && google.maps.event.removeListener(O), be(google.maps.event.addListener(e, "icon_changed", w)));
|
|
160
|
+
}, [w]), t(() => {
|
|
161
|
+
e && z && (S !== null && google.maps.event.removeListener(S), xe(google.maps.event.addListener(e, "position_changed", z)));
|
|
162
|
+
}, [z]), t(() => {
|
|
163
|
+
e && A && (ye !== null && google.maps.event.removeListener(ye), Ee(google.maps.event.addListener(e, "shape_changed", A)));
|
|
164
|
+
}, [A]), t(() => {
|
|
165
|
+
e && M && (C !== null && google.maps.event.removeListener(C), Pe(google.maps.event.addListener(e, "title_changed", M)));
|
|
166
|
+
}, [M]), t(() => {
|
|
167
|
+
e && j && (D !== null && google.maps.event.removeListener(D), we(google.maps.event.addListener(e, "visible_changed", j)));
|
|
168
|
+
}, [j]), t(() => {
|
|
169
|
+
e && F && (ee !== null && google.maps.event.removeListener(ee), ze(google.maps.event.addListener(e, "zindex_changed", F)));
|
|
170
|
+
}, [F]), t(() => {
|
|
171
|
+
const U = {
|
|
172
|
+
...i || ne,
|
|
173
|
+
...o ? ne : {
|
|
174
|
+
map: B
|
|
175
|
+
},
|
|
176
|
+
position: n
|
|
177
|
+
}, s = new google.maps.marker.AdvancedMarkerElement(U);
|
|
178
|
+
return o || (s.map = B), n && (s.position = n), typeof l < "u" && (s.draggable = l), typeof a < "u" && (s.gmpClickable = a), typeof g == "string" && (s.title = g), typeof m == "number" && (s.zIndex = m), p && re(google.maps.event.addListener(s, "dblclick", p)), c && oe(google.maps.event.addListener(s, "dragend", c)), f && le(google.maps.event.addListener(s, "dragstart", f)), _ && ae(google.maps.event.addListener(s, "mousedown", _)), L && ge(google.maps.event.addListener(s, "mouseout", L)), u && me(google.maps.event.addListener(s, "mouseover", u)), h && de(google.maps.event.addListener(s, "mouseup", h)), k && pe(google.maps.event.addListener(s, "rightclick", k)), d && ve(google.maps.event.addListener(s, "click", d)), v && fe(google.maps.event.addListener(s, "drag", v)), b && Le(google.maps.event.addListener(s, "clickable_changed", b)), x && ue(google.maps.event.addListener(s, "cursor_changed", x)), y && he(google.maps.event.addListener(s, "animation_changed", y)), E && _e(google.maps.event.addListener(s, "draggable_changed", E)), P && ke(google.maps.event.addListener(s, "flat_changed", P)), w && be(google.maps.event.addListener(s, "icon_changed", w)), z && xe(google.maps.event.addListener(s, "position_changed", z)), A && Ee(google.maps.event.addListener(s, "shape_changed", A)), M && Pe(google.maps.event.addListener(s, "title_changed", M)), j && we(google.maps.event.addListener(s, "visible_changed", j)), F && ze(google.maps.event.addListener(s, "zindex_changed", F)), Re(s), se && se(s), () => {
|
|
179
|
+
G !== null && google.maps.event.removeListener(G), H !== null && google.maps.event.removeListener(H), I !== null && google.maps.event.removeListener(I), J !== null && google.maps.event.removeListener(J), K !== null && google.maps.event.removeListener(K), N !== null && google.maps.event.removeListener(N), Q !== null && google.maps.event.removeListener(Q), R !== null && google.maps.event.removeListener(R), T !== null && google.maps.event.removeListener(T), X !== null && google.maps.event.removeListener(X), Y !== null && google.maps.event.removeListener(Y), $ !== null && google.maps.event.removeListener($), V !== null && google.maps.event.removeListener(V), Z !== null && google.maps.event.removeListener(Z), O !== null && google.maps.event.removeListener(O), S !== null && google.maps.event.removeListener(S), C !== null && google.maps.event.removeListener(C), D !== null && google.maps.event.removeListener(D), ee !== null && google.maps.event.removeListener(ee), ie && ie(s), o || s && (s.map = null);
|
|
180
|
+
};
|
|
181
|
+
}, []);
|
|
182
|
+
const Te = Ce(() => q ? Ue.map(q, (U) => We(U) ? qe(U, {
|
|
183
|
+
anchor: e
|
|
184
|
+
}) : U) : null, [q, e]);
|
|
185
|
+
return $e(Ve, {
|
|
186
|
+
children: Te
|
|
187
|
+
}) || null;
|
|
188
|
+
}
|
|
189
|
+
const ot = Oe(De);
|
|
190
|
+
class et extends Ze {
|
|
191
|
+
constructor() {
|
|
192
|
+
super(...arguments);
|
|
193
|
+
te(this, "registeredEvents", []);
|
|
194
|
+
te(this, "marker");
|
|
195
|
+
}
|
|
196
|
+
componentDidMount() {
|
|
197
|
+
const o = {
|
|
198
|
+
...this.props.options || ne,
|
|
199
|
+
...this.props.clusterer ? ne : {
|
|
200
|
+
map: this.context
|
|
201
|
+
},
|
|
202
|
+
position: this.props.position
|
|
203
|
+
};
|
|
204
|
+
this.marker = new google.maps.marker.AdvancedMarkerElement(o), this.props.clusterer || (this.marker.map = this.context), this.registeredEvents = Ae({
|
|
205
|
+
updaterMap: Fe,
|
|
206
|
+
eventMap: je,
|
|
207
|
+
prevProps: {},
|
|
208
|
+
nextProps: this.props,
|
|
209
|
+
instance: this.marker
|
|
210
|
+
}), this.props.onLoad && this.props.onLoad(this.marker);
|
|
211
|
+
}
|
|
212
|
+
componentDidUpdate(o) {
|
|
213
|
+
this.marker && (Me(this.registeredEvents), this.registeredEvents = Ae({
|
|
214
|
+
updaterMap: Fe,
|
|
215
|
+
eventMap: je,
|
|
216
|
+
prevProps: o,
|
|
217
|
+
nextProps: this.props,
|
|
218
|
+
instance: this.marker
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
componentWillUnmount() {
|
|
222
|
+
this.marker && (this.props.onUnmount && this.props.onUnmount(this.marker), Me(this.registeredEvents), this.props.clusterer || this.marker && (this.marker.map = null));
|
|
223
|
+
}
|
|
224
|
+
render() {
|
|
225
|
+
let o = null;
|
|
226
|
+
return this.props.children && (o = Ue.map(this.props.children, (W) => We(W) ? qe(W, {
|
|
227
|
+
anchor: this.marker
|
|
228
|
+
}) : W)), o || null;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
te(et, "contextType", Be);
|
|
232
|
+
export {
|
|
233
|
+
et as Marker,
|
|
234
|
+
ot as MarkerF
|
|
235
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useRef as
|
|
1
|
+
import { useRef as D, useState as L, useEffect as R, createElement as h } from "react";
|
|
2
2
|
import { jsx as a, jsxs as Oe } from "react/jsx-runtime";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { useAppDispatch as Ce } from "./index-use-app-dispatch.js";
|
|
5
5
|
import { classNames as Te } from "./index-classNames.js";
|
|
6
6
|
import { InputBase as ge } from "./index-InputBase.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { IconNames as
|
|
7
|
+
import { Icon as M } from "./index-Icon.js";
|
|
8
|
+
import { IconNames as $ } from "./index-IconNames.js";
|
|
9
9
|
import Ae from "./index-_virtual2.js";
|
|
10
10
|
import Ie from "./index-_virtual3.js";
|
|
11
11
|
import { ComponentContainer as Ke } from "./index-ComponentContainer.js";
|
|
@@ -13,60 +13,60 @@ import { Text as we } from "./index-Text.js";
|
|
|
13
13
|
import Ne from "./index-Autocomplete2.js";
|
|
14
14
|
import je from "./index-Chip.js";
|
|
15
15
|
const _e = (y) => {
|
|
16
|
-
var
|
|
16
|
+
var P, F, q;
|
|
17
17
|
const {
|
|
18
18
|
className: v,
|
|
19
|
-
id:
|
|
19
|
+
id: x,
|
|
20
20
|
value: b,
|
|
21
|
-
infoText:
|
|
22
|
-
label:
|
|
23
|
-
labelType:
|
|
24
|
-
placeholder:
|
|
25
|
-
inputRef:
|
|
21
|
+
infoText: B,
|
|
22
|
+
label: U,
|
|
23
|
+
labelType: _,
|
|
24
|
+
placeholder: V,
|
|
25
|
+
inputRef: W,
|
|
26
26
|
formconfig: t,
|
|
27
27
|
optionKey: s,
|
|
28
28
|
options: O,
|
|
29
|
-
noOptionsText:
|
|
30
|
-
splitCommaTag:
|
|
29
|
+
noOptionsText: z = null,
|
|
30
|
+
splitCommaTag: G = !1,
|
|
31
31
|
multiple: c = !1,
|
|
32
|
-
hideCaret:
|
|
33
|
-
hideClearButton:
|
|
32
|
+
hideCaret: H = !1,
|
|
33
|
+
hideClearButton: J = !1,
|
|
34
34
|
restrictToOptions: C = !0,
|
|
35
|
-
highlightOptions:
|
|
36
|
-
popoverPosition:
|
|
37
|
-
popoverMessage:
|
|
35
|
+
highlightOptions: Q = !0,
|
|
36
|
+
popoverPosition: X,
|
|
37
|
+
popoverMessage: Y,
|
|
38
38
|
onKeyUp: T,
|
|
39
39
|
onKeyDown: g,
|
|
40
40
|
onChange: A,
|
|
41
|
-
autoComplete:
|
|
41
|
+
autoComplete: Z = !0,
|
|
42
42
|
testId: I,
|
|
43
|
-
replacements:
|
|
44
|
-
disabled:
|
|
45
|
-
isLoading:
|
|
46
|
-
autoSelect:
|
|
43
|
+
replacements: ee,
|
|
44
|
+
disabled: te,
|
|
45
|
+
isLoading: oe,
|
|
46
|
+
autoSelect: ne = !0,
|
|
47
47
|
adornment: K,
|
|
48
|
-
...
|
|
49
|
-
} = y,
|
|
50
|
-
let i =
|
|
51
|
-
i || (i =
|
|
48
|
+
...re
|
|
49
|
+
} = y, se = Ce(), p = D(null), [le, u] = L(void 0);
|
|
50
|
+
let i = W;
|
|
51
|
+
i || (i = D(null));
|
|
52
52
|
let w = null;
|
|
53
53
|
t && (w = t._autocompleteRef ?? null, i = t._inputRef);
|
|
54
54
|
let {
|
|
55
55
|
required: N
|
|
56
56
|
} = y;
|
|
57
|
-
(((
|
|
57
|
+
(((P = t == null ? void 0 : t.validation) == null ? void 0 : P.required) === !0 || ((F = t == null ? void 0 : t.validation) == null ? void 0 : F.required) === !1) && (N = (q = t == null ? void 0 : t.validation) == null ? void 0 : q.required), R(() => {
|
|
58
58
|
var o, n;
|
|
59
59
|
const e = (o = t == null ? void 0 : t._autocompleteRef) == null ? void 0 : o.current;
|
|
60
60
|
e && (e.value = t == null ? void 0 : t.stateValue, u(Number((n = t == null ? void 0 : t.stateValue) == null ? void 0 : n.key)));
|
|
61
61
|
}, [t]);
|
|
62
|
-
const [d,
|
|
63
|
-
|
|
62
|
+
const [d, j] = L(b ?? c ? [] : null);
|
|
63
|
+
R(() => {
|
|
64
64
|
t && setTimeout(() => {
|
|
65
65
|
var e;
|
|
66
|
-
|
|
66
|
+
j(t == null ? void 0 : t.stateValue), u(Number((e = t == null ? void 0 : t.stateValue) == null ? void 0 : e.key));
|
|
67
67
|
}, 0);
|
|
68
68
|
}, [t == null ? void 0 : t.stateValue]);
|
|
69
|
-
const
|
|
69
|
+
const E = (e) => !K || e === void 0 ? null : K[e], ae = (e, o) => c ? a("div", {
|
|
70
70
|
className: "vanguard-input-tags",
|
|
71
71
|
children: e.map((n, l) => h(je, {
|
|
72
72
|
label: a(we, {
|
|
@@ -81,7 +81,7 @@ const _e = (y) => {
|
|
|
81
81
|
}
|
|
82
82
|
}))
|
|
83
83
|
}) : null, m = (e, o, n, l) => {
|
|
84
|
-
C && i && i.current && typeof o == "string" && (i.current.value = o), o && typeof o == "object" && !Array.isArray(o) && "key" in o ? u(Number(o.key)) : u(void 0), t && t && t.setStateValue &&
|
|
84
|
+
C && i && i.current && typeof o == "string" && (i.current.value = o), o && typeof o == "object" && !Array.isArray(o) && "key" in o ? u(Number(o.key)) : u(void 0), j(o), t && t && t.setStateValue && se(t.setStateValue(o)), A && (n || (n = "blur"), A(e, o, n, l));
|
|
85
85
|
}, ie = (e) => {
|
|
86
86
|
var o;
|
|
87
87
|
if (e.key === "Enter" && !p.current) {
|
|
@@ -90,7 +90,7 @@ const _e = (y) => {
|
|
|
90
90
|
}) : (r) => r)) ?? [];
|
|
91
91
|
Array.isArray(d) ? m(e, [...d, ...l], "selectOption") : m(e, [...l], "selectOption"), (n == null ? void 0 : n.length) > 0 && (e.stopPropagation(), e.preventDefault(), e.nativeEvent.stopImmediatePropagation());
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, k = () => {
|
|
94
94
|
const e = document.getElementsByClassName("MuiAutocomplete-option");
|
|
95
95
|
if (p.current) {
|
|
96
96
|
p.current = !1;
|
|
@@ -99,25 +99,25 @@ const _e = (y) => {
|
|
|
99
99
|
}
|
|
100
100
|
}, pe = (e) => {
|
|
101
101
|
}, ue = (e) => {
|
|
102
|
-
|
|
102
|
+
k(), T && T(e);
|
|
103
103
|
}, ce = (e) => {
|
|
104
|
-
|
|
104
|
+
k(), G && ie(e), g && g(e);
|
|
105
105
|
}, de = (e, o, {
|
|
106
106
|
inputValue: n
|
|
107
107
|
}) => {
|
|
108
|
-
if (
|
|
108
|
+
if (Q) {
|
|
109
109
|
const r = f(o), ye = Ae(r, n), ve = Ie(r, ye);
|
|
110
110
|
return h("li", {
|
|
111
111
|
...e,
|
|
112
112
|
key: r
|
|
113
113
|
}, Oe("div", {
|
|
114
114
|
className: "option-style",
|
|
115
|
-
children: [
|
|
116
|
-
children: ve.map((
|
|
115
|
+
children: [E(o.key), a("span", {
|
|
116
|
+
children: ve.map((S, be) => a("span", {
|
|
117
117
|
style: {
|
|
118
|
-
fontWeight:
|
|
118
|
+
fontWeight: S.highlight ? 700 : 400
|
|
119
119
|
},
|
|
120
|
-
children:
|
|
120
|
+
children: S.text
|
|
121
121
|
}, be))
|
|
122
122
|
})]
|
|
123
123
|
}));
|
|
@@ -140,66 +140,66 @@ const _e = (y) => {
|
|
|
140
140
|
const r = e;
|
|
141
141
|
r && s && (r.hasOwnProperty(s), n = r[s]);
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
let l = o;
|
|
144
144
|
if (typeof o == "object") {
|
|
145
145
|
const r = o;
|
|
146
|
-
r && s && (r.hasOwnProperty(s),
|
|
146
|
+
r && s && (r.hasOwnProperty(s), l = r[s]);
|
|
147
147
|
}
|
|
148
148
|
return n === l;
|
|
149
149
|
}, fe = () => {
|
|
150
150
|
const e = ["vanguard-autocomplete"];
|
|
151
|
-
return v && e.push(v),
|
|
151
|
+
return v && e.push(v), J && e.push("vanguard-autocomplete-no-clear-btn"), (H || b !== null) && e.push("vanguard-autocomplete-no-caret"), Te(...e);
|
|
152
152
|
}, he = () => a("div", {
|
|
153
153
|
children: "No options available!!"
|
|
154
154
|
});
|
|
155
155
|
return a(Ke, {
|
|
156
156
|
className: fe(),
|
|
157
157
|
children: a(Ne, {
|
|
158
|
-
...
|
|
158
|
+
...re,
|
|
159
159
|
"data-testid": I,
|
|
160
|
-
id:
|
|
160
|
+
id: x,
|
|
161
161
|
ref: w,
|
|
162
162
|
value: d,
|
|
163
163
|
freeSolo: !C,
|
|
164
|
-
autoComplete:
|
|
165
|
-
autoSelect:
|
|
164
|
+
autoComplete: Z,
|
|
165
|
+
autoSelect: ne,
|
|
166
166
|
multiple: c,
|
|
167
167
|
options: O,
|
|
168
|
-
noOptionsText:
|
|
168
|
+
noOptionsText: z,
|
|
169
169
|
renderTags: ae,
|
|
170
170
|
renderOption: de,
|
|
171
171
|
ListboxComponent: O.length === 0 ? he : void 0,
|
|
172
172
|
isOptionEqualToValue: me,
|
|
173
173
|
getOptionLabel: f,
|
|
174
174
|
onChange: m,
|
|
175
|
-
clearIcon: a(
|
|
175
|
+
clearIcon: a(M, {
|
|
176
176
|
color: "--n400",
|
|
177
|
-
children:
|
|
177
|
+
children: $.close
|
|
178
178
|
}),
|
|
179
|
-
popupIcon: a(
|
|
179
|
+
popupIcon: a(M, {
|
|
180
180
|
color: "--n400",
|
|
181
|
-
children:
|
|
181
|
+
children: $.caretDown
|
|
182
182
|
}),
|
|
183
|
-
disabled:
|
|
183
|
+
disabled: te,
|
|
184
184
|
renderInput: (e) => a(ge, {
|
|
185
185
|
formconfig: t,
|
|
186
186
|
inputRef: i,
|
|
187
|
-
isLoading:
|
|
187
|
+
isLoading: oe,
|
|
188
188
|
testId: `${I}-input`,
|
|
189
189
|
textFieldProps: e,
|
|
190
190
|
required: N,
|
|
191
|
-
infoText:
|
|
192
|
-
label:
|
|
193
|
-
labelType:
|
|
194
|
-
placeholder:
|
|
195
|
-
popoverMessage:
|
|
196
|
-
popoverPosition:
|
|
191
|
+
infoText: B,
|
|
192
|
+
label: U,
|
|
193
|
+
labelType: _,
|
|
194
|
+
placeholder: V,
|
|
195
|
+
popoverMessage: Y,
|
|
196
|
+
popoverPosition: X,
|
|
197
197
|
onKeyDown: ce,
|
|
198
198
|
onKeyUp: ue,
|
|
199
199
|
onChange: pe,
|
|
200
200
|
formFieldType: "Autocomplete",
|
|
201
|
-
replacements:
|
|
202
|
-
adornment:
|
|
201
|
+
replacements: ee,
|
|
202
|
+
adornment: E(le)
|
|
203
203
|
})
|
|
204
204
|
})
|
|
205
205
|
});
|
package/dist/index-DateRange.js
CHANGED
|
@@ -6,7 +6,7 @@ import { classNames as f } from "./index-classNames.js";
|
|
|
6
6
|
import { datesAreDifferent as r } from "./index-date-helpers.js";
|
|
7
7
|
import c from "./index-moment.js";
|
|
8
8
|
import { useState as g, useEffect as d } from "react";
|
|
9
|
-
import { d as p } from "./index-
|
|
9
|
+
import { d as p } from "./index-_virtual12.js";
|
|
10
10
|
import { ComponentContainer as u } from "./index-ComponentContainer.js";
|
|
11
11
|
const w = (a) => {
|
|
12
12
|
const {
|
package/dist/index-GoogleMaps.js
CHANGED
|
@@ -1,62 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useGoogleMapApiLoader as
|
|
4
|
-
import { GoogleMap as
|
|
5
|
-
import { googleMapBlackWhiteTheme_NoPoi as
|
|
6
|
-
import { googleMapColouredTheme as
|
|
7
|
-
import { Render as
|
|
8
|
-
import "react";
|
|
9
|
-
import { ComponentContainer as
|
|
10
|
-
|
|
3
|
+
import { useGoogleMapApiLoader as h } from "./index-use-google-map-api-loader.js";
|
|
4
|
+
import { GoogleMap as L } from "./index-esm.js";
|
|
5
|
+
import { googleMapBlackWhiteTheme_NoPoi as M, googleMapBlackWhiteTheme as I } from "./index-GoogleMapBlackWhiteTheme.js";
|
|
6
|
+
import { googleMapColouredTheme as A } from "./index-GoogleMapColouredTheme.js";
|
|
7
|
+
import { Render as x } from "./index-Render.js";
|
|
8
|
+
import { useState as y } from "react";
|
|
9
|
+
import { ComponentContainer as C } from "./index-ComponentContainer.js";
|
|
10
|
+
import { MapContext as T } from "./index-map-context.js";
|
|
11
|
+
const b = "fb831772aadb7781", D = (t) => {
|
|
11
12
|
const {
|
|
12
|
-
apiKey:
|
|
13
|
-
isJsApiLoaded:
|
|
14
|
-
theme:
|
|
15
|
-
testId:
|
|
16
|
-
onLoad:
|
|
17
|
-
mapId: e
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
apiKey: s,
|
|
14
|
+
isJsApiLoaded: n,
|
|
15
|
+
theme: d = "default",
|
|
16
|
+
testId: l = "presence-insights-competitors-map-google-itself-textid",
|
|
17
|
+
onLoad: i,
|
|
18
|
+
mapId: e,
|
|
19
|
+
children: p
|
|
20
|
+
} = t, [r, m] = y(null), {
|
|
21
|
+
isLoaded: c
|
|
22
|
+
} = h([], s), u = n !== void 0 ? n : c, f = (a) => {
|
|
23
|
+
m(a), i && i(a);
|
|
22
24
|
};
|
|
23
|
-
function
|
|
25
|
+
function g() {
|
|
24
26
|
if (e)
|
|
25
27
|
return null;
|
|
26
|
-
switch (
|
|
28
|
+
switch (d) {
|
|
27
29
|
case "coloured":
|
|
28
|
-
return
|
|
30
|
+
return A;
|
|
29
31
|
case "blackWhite":
|
|
30
|
-
return
|
|
32
|
+
return I;
|
|
31
33
|
case "blackWhiteNoPoi":
|
|
32
|
-
return
|
|
34
|
+
return M;
|
|
33
35
|
case "default":
|
|
34
36
|
default:
|
|
35
37
|
return null;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
|
-
return
|
|
39
|
-
"data-testid":
|
|
40
|
+
return o(C, {
|
|
41
|
+
"data-testid": l,
|
|
40
42
|
className: "GoogleMaps-container",
|
|
41
|
-
children:
|
|
42
|
-
if:
|
|
43
|
-
children:
|
|
44
|
-
...
|
|
45
|
-
onLoad:
|
|
43
|
+
children: o(x, {
|
|
44
|
+
if: u,
|
|
45
|
+
children: o(L, {
|
|
46
|
+
...t,
|
|
47
|
+
onLoad: f,
|
|
46
48
|
mapContainerStyle: {
|
|
47
49
|
width: "100%",
|
|
48
50
|
height: "100%"
|
|
49
51
|
},
|
|
50
52
|
options: {
|
|
51
53
|
gestureHandling: "greedy",
|
|
52
|
-
...
|
|
53
|
-
styles:
|
|
54
|
-
mapId: typeof e == "string" ? e : e === !0 ?
|
|
55
|
-
}
|
|
54
|
+
...t.options,
|
|
55
|
+
styles: g(),
|
|
56
|
+
mapId: typeof e == "string" ? e : e === !0 ? b : void 0
|
|
57
|
+
},
|
|
58
|
+
children: r !== null ? o(T.Provider, {
|
|
59
|
+
value: r,
|
|
60
|
+
children: p
|
|
61
|
+
}) : null
|
|
56
62
|
})
|
|
57
63
|
})
|
|
58
64
|
});
|
|
59
65
|
};
|
|
60
66
|
export {
|
|
61
|
-
|
|
67
|
+
D as GoogleMaps
|
|
62
68
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useMemo as k, useState as L, useEffect as r } from "react";
|
|
2
|
+
import { createPortal as M } from "react-dom";
|
|
3
|
+
import { useGoogleMap as E } from "./index-map-context.js";
|
|
4
|
+
const x = (p) => {
|
|
5
|
+
const {
|
|
6
|
+
onClick: s,
|
|
7
|
+
onMouseOver: a,
|
|
8
|
+
onMouseOut: i,
|
|
9
|
+
id: u,
|
|
10
|
+
zIndex: o,
|
|
11
|
+
pos: t,
|
|
12
|
+
title: f,
|
|
13
|
+
draggable: l,
|
|
14
|
+
onDragEnd: m,
|
|
15
|
+
children: v
|
|
16
|
+
} = p, c = E(), d = k(() => document.createElement("div"), []), [e, g] = L(null);
|
|
17
|
+
return r(() => {
|
|
18
|
+
if (isNaN(t.lat) || isNaN(t.lng)) return;
|
|
19
|
+
const n = new google.maps.marker.AdvancedMarkerElement({
|
|
20
|
+
map: c,
|
|
21
|
+
position: t,
|
|
22
|
+
content: d,
|
|
23
|
+
zIndex: o,
|
|
24
|
+
title: f,
|
|
25
|
+
gmpDraggable: l
|
|
26
|
+
});
|
|
27
|
+
return g(n), () => {
|
|
28
|
+
n.map = null, g(null);
|
|
29
|
+
};
|
|
30
|
+
}, [c]), r(() => {
|
|
31
|
+
e && (e.position = t);
|
|
32
|
+
}, [e, t.lat, t.lng]), r(() => {
|
|
33
|
+
e && o !== void 0 && (e.zIndex = o);
|
|
34
|
+
}, [e, o]), r(() => {
|
|
35
|
+
e && (e.gmpDraggable = !!l);
|
|
36
|
+
}, [e, l]), r(() => {
|
|
37
|
+
if (!e || !s) return;
|
|
38
|
+
const n = e.addListener("click", () => s(u));
|
|
39
|
+
return () => {
|
|
40
|
+
google.maps.event.removeListener(n);
|
|
41
|
+
};
|
|
42
|
+
}, [e, s, u]), r(() => {
|
|
43
|
+
if (!e || !a) return;
|
|
44
|
+
const n = e.addListener("mouseover", a);
|
|
45
|
+
return () => {
|
|
46
|
+
google.maps.event.removeListener(n);
|
|
47
|
+
};
|
|
48
|
+
}, [e, a]), r(() => {
|
|
49
|
+
if (!e || !i) return;
|
|
50
|
+
const n = e.addListener("mouseout", i);
|
|
51
|
+
return () => {
|
|
52
|
+
google.maps.event.removeListener(n);
|
|
53
|
+
};
|
|
54
|
+
}, [e, i]), r(() => {
|
|
55
|
+
if (!e || !m) return;
|
|
56
|
+
const n = e.addListener("dragend", m);
|
|
57
|
+
return () => {
|
|
58
|
+
google.maps.event.removeListener(n);
|
|
59
|
+
};
|
|
60
|
+
}, [e, m]), M(v, d);
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
x as GoogleMapsAdvancedMarker
|
|
64
|
+
};
|