@rankingcoach/vanguard 1.12.3 → 1.14.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-ControlledValuePlugin.js +1 -1
- package/dist/index-CsvContentValidator.js +30 -0
- package/dist/index-DateRange.js +1 -1
- package/dist/index-DefaultValuePlugin.js +1 -1
- package/dist/index-Document.types.js +3 -3
- package/dist/index-DocumentContentProcessor.js +42 -0
- package/dist/index-DocumentUpload.js +103 -109
- package/dist/index-GoogleMaps.js +42 -36
- package/dist/index-GoogleMapsAdvancedMarker.js +64 -0
- package/dist/index-GoogleMapsAdvancedMarkerContent.js +41 -0
- package/dist/index-HyperlinkPlugin.js +1 -1
- package/dist/index-KeywordNode.js +1 -1
- package/dist/index-KeywordPlugin.js +1 -1
- package/dist/index-ModalService.js +3 -1
- package/dist/index-OnChangeContentPlugin.js +1 -1
- package/dist/index-OnFocusOnBlurPlugin.js +1 -1
- package/dist/index-Select2.js +1 -1
- package/dist/index-SelectInput.js +478 -26
- package/dist/index-_virtual10.js +2 -3
- package/dist/index-_virtual21.js +2 -2
- package/dist/index-_virtual22.js +2 -2
- package/dist/index-_virtual23.js +3 -2
- package/dist/index-_virtual24.js +2 -2
- package/dist/index-_virtual25.js +2 -2
- package/dist/index-_virtual26.js +2 -2
- package/dist/index-_virtual27.js +2 -2
- package/dist/index-_virtual28.js +2 -2
- package/dist/index-_virtual29.js +2 -2
- package/dist/index-_virtual31.js +2 -2
- package/dist/index-_virtual32.js +2 -2
- package/dist/index-_virtual33.js +2 -2
- package/dist/index-_virtual34.js +2 -3
- package/dist/index-_virtual63.js +2 -2
- package/dist/index-_virtual64.js +2 -2
- package/dist/index-_virtual77.js +4 -2
- package/dist/index-_virtual78.js +1 -1
- package/dist/index-_virtual79.js +1 -1
- package/dist/index-_virtual80.js +1 -1
- package/dist/index-_virtual81.js +1 -1
- package/dist/index-_virtual82.js +1 -1
- package/dist/index-_virtual83.js +1 -1
- package/dist/index-_virtual84.js +1 -1
- package/dist/index-_virtual85.js +2 -4
- package/dist/index-_virtual9.js +3 -2
- package/dist/index-applyInternationalSeparatorStyle.js +1 -1
- package/dist/index-cjs.js +1 -1
- package/dist/index-colorManipulator3.js +2 -2
- package/dist/index-constants.js +1 -1
- package/dist/index-constants2.js +8 -2
- package/dist/index-constants3.js +2 -8
- package/dist/index-createExtensionPattern.js +1 -1
- package/dist/index-createStyled2.js +6 -6
- package/dist/index-dist3.js +1 -1
- package/dist/index-dist5.js +1 -1
- package/dist/index-exenv.js +1 -1
- package/dist/index-extractCountryCallingCode.js +1 -1
- package/dist/index-extractPhoneContext.js +1 -1
- package/dist/index-isViablePhoneNumber.js +1 -1
- package/dist/index-keycode.js +1 -1
- package/dist/index-lib2.js +1 -1
- package/dist/index-lib3.js +1 -1
- package/dist/index-lib4.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-mpd-parser.es.js +1 -1
- package/dist/index-parse2.js +1 -1
- package/dist/index-stripIddPrefix.js +1 -1
- package/dist/index-style-to-object.js +1 -1
- package/dist/index-tiny-invariant.js +12 -0
- package/dist/index-useHyperlinkEditor.js +1 -1
- package/dist/index-useLexicalToolbar.js +1 -1
- package/dist/index-useThemeWithoutDefault3.js +1 -1
- package/dist/index.js +427 -418
- package/dist/types/core/Autocomplete/stories/WithMultiple.story.d.ts +0 -4
- package/dist/types/core/Documents/Document.types.d.ts +2 -1
- package/dist/types/core/Documents/DocumentUpload/stories/WithCustomDimensions.story.d.ts +2 -0
- package/dist/types/core/Documents/DocumentUpload/stories/WithDocumentName.story.d.ts +2 -0
- package/dist/types/core/Documents/DocumentUpload/stories/_DocumentUpload.default.d.ts +2 -2
- package/dist/types/core/FileSelect/MediaItemProcessors/DocumentContentProcessor.d.ts +9 -0
- package/dist/types/core/FileSelect/MediaItemValidators/CsvContentValidator.d.ts +15 -0
- package/dist/types/core/FileSelect/index.d.ts +2 -1
- package/dist/types/core/FileSelect/stories/WithCsvValidator.story.d.ts +2 -0
- package/dist/types/core/FileSelect/stories/WithDocumentContentProcessor.story.d.ts +2 -0
- 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/core/Modal/stories/CloseConfirmModalViaHeader.story.d.ts +2 -0
- package/dist/types/core/Modal/stories/CloseViaHeaderButtonWithResponse.story.d.ts +2 -0
- package/dist/types/index.d.ts +8 -1
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +396 -394
- package/package.json +1 -1
- package/dist/index-SelectInput2.js +0 -484
- package/dist/types/core/FileSelect/SelectInput.d.ts +0 -11
|
@@ -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
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var d = (s, e, r) => e in s ? l(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
|
|
3
|
+
var t = (s, e, r) => d(s, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { ContentType as p } from "./index-Document.types.js";
|
|
5
|
+
import { MediaItemValidator as u } from "./index-MediaItemValidator.js";
|
|
6
|
+
class x extends u {
|
|
7
|
+
constructor({
|
|
8
|
+
requiredHeaders: r
|
|
9
|
+
}) {
|
|
10
|
+
super();
|
|
11
|
+
t(this, "applicableFileTypes", [p.TEXT_CSV]);
|
|
12
|
+
t(this, "requiredHeaders");
|
|
13
|
+
t(this, "validate", (r) => Promise.all(r.map((i) => this.validateMediaItem(i))));
|
|
14
|
+
t(this, "validateMediaItem", async (r) => {
|
|
15
|
+
r.isInvalid = r.isInvalid ?? !1, r.validationErrors = r.validationErrors ?? [];
|
|
16
|
+
const {
|
|
17
|
+
file: i
|
|
18
|
+
} = r;
|
|
19
|
+
if (!i) return r;
|
|
20
|
+
const o = ((await i.text()).split(/\r?\n/)[0] ?? "").split(",").map((a) => a.trim().toLowerCase()), n = this.requiredHeaders.filter((a) => !o.includes(a.toLowerCase()));
|
|
21
|
+
return n.length > 0 && (r.isInvalid = !0, r.validationErrors.push({
|
|
22
|
+
text: `The CSV is missing required columns: <b>${n.join(", ")}</b>.`
|
|
23
|
+
})), r;
|
|
24
|
+
});
|
|
25
|
+
this.requiredHeaders = r;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
x as CsvContentValidator
|
|
30
|
+
};
|
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-_virtual9.js";
|
|
10
10
|
import { ComponentContainer as u } from "./index-ComponentContainer.js";
|
|
11
11
|
const w = (a) => {
|
|
12
12
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const N = "image/*", i = "image/jpeg", P = "image/jpg", O = "image/png", I = "video/quicktime", T = "video/mp4", A = "unknown",
|
|
1
|
+
const N = "image/*", i = "image/jpeg", P = "image/jpg", O = "image/png", I = "video/quicktime", T = "video/mp4", A = "unknown", c = "application/pdf";
|
|
2
2
|
var _;
|
|
3
3
|
(function(E) {
|
|
4
|
-
E.FILE_ANY = "*", E.IMAGE_ANY = "image/*", E.IMAGE_JPEG = "image/jpeg", E.IMAGE_JPG = "image/jpg", E.IMAGE_PNG = "image/png", E.VIDEO_ANY = "video/*", E.VIDEO_MOV = "video/quicktime", E.VIDEO_MP4 = "video/mp4", E.UNKNOWN = "unknown", E.APPLICATION_PDF = "application/pdf";
|
|
4
|
+
E.FILE_ANY = "*", E.IMAGE_ANY = "image/*", E.IMAGE_JPEG = "image/jpeg", E.IMAGE_JPG = "image/jpg", E.IMAGE_PNG = "image/png", E.VIDEO_ANY = "video/*", E.VIDEO_MOV = "video/quicktime", E.VIDEO_MP4 = "video/mp4", E.UNKNOWN = "unknown", E.APPLICATION_PDF = "application/pdf", E.TEXT_CSV = "text/csv";
|
|
5
5
|
})(_ || (_ = {}));
|
|
6
6
|
export {
|
|
7
7
|
N as CONTENT_TYPE_IMAGE_ANY,
|
|
@@ -11,6 +11,6 @@ export {
|
|
|
11
11
|
A as CONTENT_TYPE_UNKNOWN,
|
|
12
12
|
I as CONTENT_TYPE_VIDEO_MOV,
|
|
13
13
|
T as CONTENT_TYPE_VIDEO_MP4,
|
|
14
|
-
|
|
14
|
+
c as CONTENY_TYPE_APPLICATION_PDF,
|
|
15
15
|
_ as ContentType
|
|
16
16
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var l = (s, e, t) => e in s ? p(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var r = (s, e, t) => l(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ContentType as d } from "./index-Document.types.js";
|
|
5
|
+
import { MediaItemProcessor as m } from "./index-MediaItemProcessor.js";
|
|
6
|
+
class P extends m {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
r(this, "applicableFileTypes", [d.APPLICATION_PDF]);
|
|
10
|
+
r(this, "process", (t) => new Promise(async (i) => {
|
|
11
|
+
const n = [];
|
|
12
|
+
for (const o of t) {
|
|
13
|
+
const {
|
|
14
|
+
file: a
|
|
15
|
+
} = o;
|
|
16
|
+
if (!a || o.fileType && !this.applicableFileTypes.includes(o.fileType)) {
|
|
17
|
+
n.push(o);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const c = await this.readFileAsDataURL(a);
|
|
21
|
+
n.push({
|
|
22
|
+
...o,
|
|
23
|
+
mediaItemContent: {
|
|
24
|
+
base64EncodedContent: c,
|
|
25
|
+
objectType: "DocumentContent"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
i(n);
|
|
30
|
+
}));
|
|
31
|
+
r(this, "readFileAsDataURL", (t) => new Promise((i) => {
|
|
32
|
+
const n = new FileReader();
|
|
33
|
+
n.onload = (o) => {
|
|
34
|
+
var a;
|
|
35
|
+
i((a = o.target) == null ? void 0 : a.result);
|
|
36
|
+
}, n.readAsDataURL(t);
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
P as DocumentContentProcessor
|
|
42
|
+
};
|