@rankingcoach/vanguard 1.12.2-testare.0 → 1.12.3
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-ControlledValuePlugin.js +1 -1
- package/dist/index-DateRange.js +1 -1
- package/dist/index-DefaultValuePlugin.js +1 -1
- package/dist/index-Drawer.js +24 -18
- package/dist/index-DrawerRoot.js +33 -29
- package/dist/index-DropdownMenu.js +36 -36
- package/dist/index-HyperlinkPlugin.js +1 -1
- package/dist/index-KeywordNode.js +1 -1
- package/dist/index-KeywordPlugin.js +1 -1
- package/dist/index-ModalContext.js +9 -9
- package/dist/index-ModalService.js +130 -178
- package/dist/index-OnChangeContentPlugin.js +1 -1
- package/dist/index-OnFocusOnBlurPlugin.js +1 -1
- package/dist/index-OverlayStackingService.js +46 -0
- package/dist/index-_virtual10.js +3 -2
- package/dist/index-_virtual21.js +2 -2
- package/dist/index-_virtual22.js +2 -2
- package/dist/index-_virtual23.js +2 -3
- 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 +3 -2
- package/dist/index-_virtual63.js +2 -2
- package/dist/index-_virtual64.js +2 -2
- package/dist/index-_virtual77.js +2 -4
- 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 +4 -2
- package/dist/index-_virtual9.js +2 -3
- 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 +2 -8
- package/dist/index-constants3.js +8 -2
- 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-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-useHyperlinkEditor.js +1 -1
- package/dist/index-useLexicalToolbar.js +1 -1
- package/dist/index-useThemeWithoutDefault3.js +1 -1
- package/dist/types/core/Drawer/Drawer.d.ts +6 -0
- package/dist/types/core/Modal/ModalService.d.ts +0 -28
- package/dist/types/core/OverlayStacking/OverlayStackingService.d.ts +35 -0
- package/dist/types/core/OverlayStacking/stories/DrawerOverFullscreenModal.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/FullscreenModalDrawerModal.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/FullscreenModalDrawerModalPopover.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/ModalOverDrawer.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/_OverlayStacking.default.d.ts +15 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +18412 -19092
- package/dist-wordpress/types/index.d.ts +0 -2
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +1 -1
|
@@ -1,104 +1,103 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { mt2 as
|
|
6
|
-
import { classNames as
|
|
7
|
-
import { uuidv4 as
|
|
8
|
-
import { pubSubService as
|
|
9
|
-
import { deviceService as
|
|
10
|
-
import { PublicWidgetData as
|
|
11
|
-
import { Modal as
|
|
12
|
-
import { ModalHeader as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var N = (r, e, o) => e in r ? F(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o;
|
|
3
|
+
var c = (r, e, o) => N(r, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
5
|
+
import { mt2 as W } from "./index-general.module.js";
|
|
6
|
+
import { classNames as A } from "./index-classNames.js";
|
|
7
|
+
import { uuidv4 as R } from "./index-generate-uid.js";
|
|
8
|
+
import { pubSubService as I, PUB_SUB_EVENTS as T } from "./index-pub-sub.js";
|
|
9
|
+
import { deviceService as $ } from "./index-device.service.js";
|
|
10
|
+
import { PublicWidgetData as j } from "./index-public-widgets-data.store.js";
|
|
11
|
+
import { Modal as k } from "./index-Modal.js";
|
|
12
|
+
import { ModalHeader as U } from "./index-ModalHeader.js";
|
|
13
|
+
import { OverlayStackingService as C } from "./index-OverlayStackingService.js";
|
|
14
|
+
import { Render as y } from "./index-Render.js";
|
|
15
|
+
import { AcceptModal as V } from "./index-AcceptModal.js";
|
|
16
|
+
import { ErrorModal as D } from "./index-ErrorModal.js";
|
|
17
|
+
import { Text as x, FontWeights as E, TextTypes as G } from "./index-Text.js";
|
|
18
|
+
import L from "react";
|
|
19
|
+
import { PhotoCarouselModal as q } from "./index-PhotoCarouselModal.js";
|
|
20
|
+
import { ConfirmModal as z } from "./index-ConfirmModal.js";
|
|
21
|
+
import { LoadingModal as J } from "./index-LoadingModal.js";
|
|
22
|
+
const K = (r) => {
|
|
22
23
|
const {
|
|
23
24
|
close: e,
|
|
24
25
|
children: o,
|
|
25
|
-
title:
|
|
26
|
-
headerType:
|
|
27
|
-
message:
|
|
26
|
+
title: l,
|
|
27
|
+
headerType: t,
|
|
28
|
+
message: i,
|
|
28
29
|
hideHeaderCloseBtn: a,
|
|
29
30
|
padding: s
|
|
30
|
-
} =
|
|
31
|
-
return
|
|
32
|
-
...
|
|
33
|
-
children: [
|
|
31
|
+
} = r;
|
|
32
|
+
return v(k, {
|
|
33
|
+
...r,
|
|
34
|
+
children: [v(U, {
|
|
34
35
|
closeFn: e,
|
|
35
36
|
hideCloseButtonOnMobile: !1,
|
|
36
37
|
hideHeaderCloseBtn: a,
|
|
37
|
-
type:
|
|
38
|
-
children: [
|
|
39
|
-
if: !!
|
|
40
|
-
children:
|
|
41
|
-
type:
|
|
38
|
+
type: t,
|
|
39
|
+
children: [n(y, {
|
|
40
|
+
if: !!l,
|
|
41
|
+
children: n(x, {
|
|
42
|
+
type: G.heading4,
|
|
42
43
|
fontWeight: E.bold,
|
|
43
|
-
children:
|
|
44
|
+
children: l
|
|
44
45
|
})
|
|
45
|
-
}),
|
|
46
|
-
if: !!
|
|
47
|
-
children:
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
46
|
+
}), n(y, {
|
|
47
|
+
if: !!i && typeof i == "string",
|
|
48
|
+
children: n("div", {
|
|
49
|
+
className: A(W),
|
|
50
|
+
children: n(x, {
|
|
50
51
|
fontWeight: E.regular,
|
|
51
|
-
children:
|
|
52
|
+
children: i
|
|
52
53
|
})
|
|
53
54
|
})
|
|
54
55
|
})]
|
|
55
|
-
}),
|
|
56
|
+
}), n("span", {
|
|
56
57
|
style: {
|
|
57
58
|
padding: s
|
|
58
59
|
},
|
|
59
60
|
children: o
|
|
60
61
|
})]
|
|
61
62
|
});
|
|
62
|
-
}
|
|
63
|
-
class
|
|
63
|
+
};
|
|
64
|
+
class Q {
|
|
64
65
|
constructor() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
m(this, "popoverOrder");
|
|
72
|
-
m(this, "openErrorModal", ({
|
|
66
|
+
c(this, "loadingModalId");
|
|
67
|
+
c(this, "confirmModalId");
|
|
68
|
+
c(this, "errorModalId");
|
|
69
|
+
c(this, "modalCloseListeners");
|
|
70
|
+
c(this, "modalComponents");
|
|
71
|
+
c(this, "openErrorModal", ({
|
|
73
72
|
err: e,
|
|
74
73
|
source: o,
|
|
75
|
-
message:
|
|
76
|
-
title:
|
|
77
|
-
ctaPositive:
|
|
74
|
+
message: l,
|
|
75
|
+
title: t,
|
|
76
|
+
ctaPositive: i,
|
|
78
77
|
onClose: a
|
|
79
78
|
}) => {
|
|
80
|
-
this.errorModalId = this.open(
|
|
79
|
+
this.errorModalId = this.open(n(D, {
|
|
81
80
|
close: () => {
|
|
82
81
|
a && a();
|
|
83
82
|
},
|
|
84
83
|
err: e,
|
|
85
84
|
source: o,
|
|
86
|
-
message:
|
|
87
|
-
title:
|
|
88
|
-
ctaPositive:
|
|
85
|
+
message: l,
|
|
86
|
+
title: t,
|
|
87
|
+
ctaPositive: i
|
|
89
88
|
}));
|
|
90
89
|
});
|
|
91
|
-
this.loadingModalId = null, this.confirmModalId = null, this.errorModalId = null, this.modalCloseListeners = /* @__PURE__ */ new Map(), this.modalComponents = /* @__PURE__ */ new Map()
|
|
90
|
+
this.loadingModalId = null, this.confirmModalId = null, this.errorModalId = null, this.modalCloseListeners = /* @__PURE__ */ new Map(), this.modalComponents = /* @__PURE__ */ new Map();
|
|
92
91
|
}
|
|
93
92
|
on(e, o) {
|
|
94
|
-
document.addEventListener(e, (
|
|
93
|
+
document.addEventListener(e, (l) => o(l.detail));
|
|
95
94
|
}
|
|
96
|
-
onModalClose(e, o,
|
|
97
|
-
var
|
|
95
|
+
onModalClose(e, o, l) {
|
|
96
|
+
var t, i;
|
|
98
97
|
this.modalCloseListeners.has(e) || this.modalCloseListeners.set(e, {
|
|
99
98
|
cbs: [],
|
|
100
|
-
data:
|
|
101
|
-
}), o && ((
|
|
99
|
+
data: l
|
|
100
|
+
}), o && ((i = (t = this.modalCloseListeners.get(e)) == null ? void 0 : t.cbs) == null || i.push(o));
|
|
102
101
|
}
|
|
103
102
|
cleanModalClose(e) {
|
|
104
103
|
this.modalCloseListeners.delete(e);
|
|
@@ -107,74 +106,74 @@ class z {
|
|
|
107
106
|
return this.modalComponents.get(e);
|
|
108
107
|
}
|
|
109
108
|
removeModalComponent(e) {
|
|
110
|
-
this.modalComponents.delete(e),
|
|
109
|
+
this.modalComponents.delete(e), C.unregister(e);
|
|
111
110
|
}
|
|
112
|
-
openConfirmModal(e, o = "",
|
|
113
|
-
let
|
|
114
|
-
typeof e == "function" ?
|
|
111
|
+
openConfirmModal(e, o = "", l = "", t = "", i = "", a = "default", s = void 0, d = void 0, m, h, p) {
|
|
112
|
+
let f;
|
|
113
|
+
typeof e == "function" ? f = {
|
|
115
114
|
closeFn: e,
|
|
116
115
|
title: o,
|
|
117
|
-
message:
|
|
118
|
-
positiveCtaText:
|
|
119
|
-
negativeCtaText:
|
|
116
|
+
message: l,
|
|
117
|
+
positiveCtaText: t,
|
|
118
|
+
negativeCtaText: i,
|
|
120
119
|
headerType: a,
|
|
121
120
|
positiveIconLeft: s,
|
|
122
121
|
replacements: d,
|
|
123
|
-
hideHeaderCloseBtn:
|
|
124
|
-
customNegativeFn:
|
|
122
|
+
hideHeaderCloseBtn: m,
|
|
123
|
+
customNegativeFn: h,
|
|
125
124
|
hideNegativeBtn: p
|
|
126
|
-
} :
|
|
125
|
+
} : f = e;
|
|
127
126
|
const {
|
|
128
127
|
closeFn: M,
|
|
129
128
|
title: u = "",
|
|
130
129
|
message: g = "",
|
|
131
|
-
positiveCtaText:
|
|
132
|
-
negativeCtaText:
|
|
133
|
-
headerType:
|
|
134
|
-
positiveIconLeft:
|
|
130
|
+
positiveCtaText: H = "",
|
|
131
|
+
negativeCtaText: P = "",
|
|
132
|
+
headerType: b = "default",
|
|
133
|
+
positiveIconLeft: w,
|
|
135
134
|
replacements: B,
|
|
136
|
-
hideHeaderCloseBtn:
|
|
135
|
+
hideHeaderCloseBtn: S,
|
|
137
136
|
customNegativeFn: _
|
|
138
|
-
} =
|
|
139
|
-
return this.confirmModalId = this.open(
|
|
137
|
+
} = f;
|
|
138
|
+
return this.confirmModalId = this.open(n(z, {
|
|
140
139
|
close: M,
|
|
141
140
|
message: g,
|
|
142
141
|
title: u,
|
|
143
|
-
positiveCtaText:
|
|
144
|
-
positiveIconLeft:
|
|
145
|
-
negativeCtaText:
|
|
146
|
-
headerType:
|
|
142
|
+
positiveCtaText: H,
|
|
143
|
+
positiveIconLeft: w,
|
|
144
|
+
negativeCtaText: P,
|
|
145
|
+
headerType: b,
|
|
147
146
|
replacements: B,
|
|
148
|
-
hideHeaderCloseBtn:
|
|
147
|
+
hideHeaderCloseBtn: S,
|
|
149
148
|
customNegativeFn: _
|
|
150
149
|
})), this.confirmModalId;
|
|
151
150
|
}
|
|
152
|
-
openAcceptModal(e, o = "",
|
|
151
|
+
openAcceptModal(e, o = "", l = "", t = "default", i = "", a = void 0, s) {
|
|
153
152
|
let d;
|
|
154
153
|
typeof e == "function" ? d = {
|
|
155
154
|
closeFn: e,
|
|
156
155
|
title: o,
|
|
157
|
-
message:
|
|
158
|
-
headerType:
|
|
159
|
-
positiveCtaText:
|
|
156
|
+
message: l,
|
|
157
|
+
headerType: t,
|
|
158
|
+
positiveCtaText: i,
|
|
160
159
|
replacements: a,
|
|
161
160
|
hideHeaderCloseBtn: s
|
|
162
161
|
} : d = e;
|
|
163
162
|
const {
|
|
164
|
-
closeFn:
|
|
165
|
-
title:
|
|
163
|
+
closeFn: m,
|
|
164
|
+
title: h = "",
|
|
166
165
|
message: p = "",
|
|
167
|
-
headerType:
|
|
166
|
+
headerType: f = "default",
|
|
168
167
|
positiveCtaText: M = "",
|
|
169
168
|
replacements: u,
|
|
170
169
|
hideHeaderCloseBtn: g
|
|
171
170
|
} = d;
|
|
172
|
-
return this.confirmModalId = this.open(
|
|
173
|
-
close:
|
|
171
|
+
return this.confirmModalId = this.open(n(V, {
|
|
172
|
+
close: m,
|
|
174
173
|
message: p,
|
|
175
|
-
title:
|
|
174
|
+
title: h,
|
|
176
175
|
positiveCtaText: M,
|
|
177
|
-
headerType:
|
|
176
|
+
headerType: f,
|
|
178
177
|
replacements: u,
|
|
179
178
|
hideHeaderCloseBtn: g
|
|
180
179
|
})), this.confirmModalId;
|
|
@@ -182,25 +181,25 @@ class z {
|
|
|
182
181
|
closeConfirmModal() {
|
|
183
182
|
this.closeEv(this.confirmModalId), this.confirmModalId = null;
|
|
184
183
|
}
|
|
185
|
-
openLoadingModal(e, o,
|
|
186
|
-
let
|
|
187
|
-
typeof e == "object" && e !== null ?
|
|
184
|
+
openLoadingModal(e, o, l, t) {
|
|
185
|
+
let i;
|
|
186
|
+
typeof e == "object" && e !== null ? i = e : i = {
|
|
188
187
|
title: e,
|
|
189
188
|
message: o,
|
|
190
|
-
loadingAnimation:
|
|
191
|
-
headerTitle:
|
|
189
|
+
loadingAnimation: l,
|
|
190
|
+
headerTitle: t
|
|
192
191
|
};
|
|
193
192
|
const {
|
|
194
193
|
title: a,
|
|
195
194
|
message: s,
|
|
196
195
|
loadingAnimation: d = "default",
|
|
197
|
-
headerTitle:
|
|
198
|
-
} =
|
|
199
|
-
return this.loadingModalId = this.open(
|
|
196
|
+
headerTitle: m
|
|
197
|
+
} = i;
|
|
198
|
+
return this.loadingModalId = this.open(n(J, {
|
|
200
199
|
title: a,
|
|
201
200
|
message: s,
|
|
202
201
|
loadingAnimation: d,
|
|
203
|
-
headerTitle:
|
|
202
|
+
headerTitle: m,
|
|
204
203
|
close: () => {
|
|
205
204
|
}
|
|
206
205
|
}), {
|
|
@@ -214,7 +213,7 @@ class z {
|
|
|
214
213
|
this.closeEv(this.loadingModalId), this.loadingModalId = null;
|
|
215
214
|
}
|
|
216
215
|
openPhotoGalleryModal(e, o) {
|
|
217
|
-
return this.open(
|
|
216
|
+
return this.open(n(q, {
|
|
218
217
|
defaultMediaItem: o,
|
|
219
218
|
gallery: e,
|
|
220
219
|
close: () => {
|
|
@@ -240,62 +239,16 @@ class z {
|
|
|
240
239
|
this.closeEv(o);
|
|
241
240
|
});
|
|
242
241
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Highest order across modals AND popovers — used internally when assigning
|
|
245
|
-
* the next slot so modals/popovers never tie or interleave wrongly.
|
|
246
|
-
*/
|
|
247
|
-
getCurrentMaxOrder() {
|
|
248
|
-
let e = 0;
|
|
249
|
-
return this.modalOrder.forEach((o) => {
|
|
250
|
-
o > e && (e = o);
|
|
251
|
-
}), this.popoverOrder.forEach((o) => {
|
|
252
|
-
o > e && (e = o);
|
|
253
|
-
}), e;
|
|
254
|
-
}
|
|
255
|
-
getMaxModalOrder() {
|
|
256
|
-
let e = 0;
|
|
257
|
-
return this.modalOrder.forEach((o) => {
|
|
258
|
-
o > e && (e = o);
|
|
259
|
-
}), e;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Z-index of the topmost mounted modal, or MODAL_BASE_Z_INDEX (the stacking
|
|
263
|
-
* floor) when no modal is open. Popovers are excluded — this reports modal
|
|
264
|
-
* stacking only. Mirrors ModalTransition's formula: BASE + order.
|
|
265
|
-
*/
|
|
266
|
-
getTopmostModalZIndex() {
|
|
267
|
-
return L + this.getMaxModalOrder();
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Single source of truth for a modal's stack order. ModalContext delegates
|
|
271
|
-
* to this so the dropdown and ModalTransition cannot drift apart.
|
|
272
|
-
*/
|
|
273
|
-
getModalOrder(e) {
|
|
274
|
-
return this.modalOrder.get(e) ?? 0;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Register a popover (e.g. DropdownMenu) into the shared stacking ledger.
|
|
278
|
-
* Returns its z-index so the caller can position itself. Modals opened
|
|
279
|
-
* after this call will land above the popover; closing the popover with
|
|
280
|
-
* `unregisterPopover` frees the slot.
|
|
281
|
-
*/
|
|
282
|
-
registerPopover(e) {
|
|
283
|
-
const o = this.getCurrentMaxOrder() + 1;
|
|
284
|
-
return this.popoverOrder.set(e, o), L + o;
|
|
285
|
-
}
|
|
286
|
-
unregisterPopover(e) {
|
|
287
|
-
this.popoverOrder.delete(e);
|
|
288
|
-
}
|
|
289
242
|
/** Test-only: wipe internal state. Not for production code paths. */
|
|
290
243
|
__resetForTests() {
|
|
291
|
-
this.loadingModalId = null, this.confirmModalId = null, this.errorModalId = null, this.modalCloseListeners.clear(), this.modalComponents.clear(),
|
|
244
|
+
this.loadingModalId = null, this.confirmModalId = null, this.errorModalId = null, this.modalCloseListeners.clear(), this.modalComponents.clear(), C.__resetForTests();
|
|
292
245
|
}
|
|
293
246
|
open(e, o) {
|
|
294
|
-
let
|
|
295
|
-
const
|
|
296
|
-
widgetId:
|
|
297
|
-
} =
|
|
298
|
-
|
|
247
|
+
let l = R();
|
|
248
|
+
const t = j.getInstance(), {
|
|
249
|
+
widgetId: i
|
|
250
|
+
} = t.get();
|
|
251
|
+
i && (l = `${l}_${i}`), $.isMobile() && (!o || !o.hasOwnProperty("fullscreen")) ? o = {
|
|
299
252
|
fullscreen: !1,
|
|
300
253
|
animation: "pop",
|
|
301
254
|
...o
|
|
@@ -306,17 +259,17 @@ class z {
|
|
|
306
259
|
};
|
|
307
260
|
const a = {
|
|
308
261
|
...e
|
|
309
|
-
}, s = (
|
|
310
|
-
a.props.close && a.props.close(
|
|
262
|
+
}, s = (m) => {
|
|
263
|
+
a.props.close && a.props.close(m), this.closeEv(l, m);
|
|
311
264
|
};
|
|
312
|
-
o != null && o.wrapInModal && (e =
|
|
265
|
+
o != null && o.wrapInModal && (e = n(K, {
|
|
313
266
|
close: s,
|
|
314
267
|
padding: o.padding,
|
|
315
268
|
headerType: o.type,
|
|
316
269
|
title: o.title,
|
|
317
270
|
message: o.message,
|
|
318
|
-
children:
|
|
319
|
-
modalId:
|
|
271
|
+
children: L.isValidElement(e) ? L.cloneElement(e, {
|
|
272
|
+
modalId: l,
|
|
320
273
|
close: s
|
|
321
274
|
}) : e
|
|
322
275
|
}));
|
|
@@ -325,33 +278,32 @@ class z {
|
|
|
325
278
|
close: s,
|
|
326
279
|
...o
|
|
327
280
|
};
|
|
328
|
-
return this.modalComponents.set(
|
|
281
|
+
return this.modalComponents.set(l, {
|
|
329
282
|
...e,
|
|
330
283
|
props: {
|
|
331
284
|
...d
|
|
332
285
|
},
|
|
333
|
-
modalId:
|
|
334
|
-
}),
|
|
335
|
-
modalId:
|
|
286
|
+
modalId: l
|
|
287
|
+
}), C.register(l, "modal"), I.$pub(T.reactModalOpen, {
|
|
288
|
+
modalId: l,
|
|
336
289
|
animation: (o == null ? void 0 : o.animation) || "grow"
|
|
337
|
-
}),
|
|
290
|
+
}), l;
|
|
338
291
|
}
|
|
339
292
|
closeEv(e, o) {
|
|
340
|
-
return e ? new Promise((
|
|
293
|
+
return e ? new Promise((l) => {
|
|
341
294
|
setTimeout(() => {
|
|
342
|
-
|
|
295
|
+
I.$pub(T.reactModalClose, {
|
|
343
296
|
modalId: e
|
|
344
297
|
});
|
|
345
|
-
const
|
|
346
|
-
|
|
298
|
+
const t = this.modalCloseListeners.get(e);
|
|
299
|
+
t && t.cbs.forEach((i) => i(o)), this.cleanModalClose(e), this.removeModalComponent(e), l(t == null ? void 0 : t.data);
|
|
347
300
|
}, 0);
|
|
348
|
-
}) : new Promise((
|
|
349
|
-
|
|
301
|
+
}) : new Promise((l) => {
|
|
302
|
+
l(void 0);
|
|
350
303
|
});
|
|
351
304
|
}
|
|
352
305
|
}
|
|
353
|
-
const
|
|
306
|
+
const Me = new Q();
|
|
354
307
|
export {
|
|
355
|
-
|
|
356
|
-
pe as ModalService
|
|
308
|
+
Me as ModalService
|
|
357
309
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as e } from "./index-
|
|
1
|
+
import { __exports as e } from "./index-_virtual29.js";
|
|
2
2
|
import p from "react";
|
|
3
3
|
import { __require as P } from "./index-LexicalComposerContext2.js";
|
|
4
4
|
import { __require as O } from "./index-LexicalOnChangePlugin.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var d = (t, e, r) => e in t ? a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var i = (t, e, r) => d(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
const c = 1100;
|
|
5
|
+
class o {
|
|
6
|
+
constructor() {
|
|
7
|
+
i(this, "order", /* @__PURE__ */ new Map());
|
|
8
|
+
i(this, "kind", /* @__PURE__ */ new Map());
|
|
9
|
+
}
|
|
10
|
+
/** Assign the next slot above all currently-mounted overlays and return its z-index. */
|
|
11
|
+
register(e, r) {
|
|
12
|
+
const s = this.getMaxOrder() + 1;
|
|
13
|
+
return this.order.set(e, s), this.kind.set(e, r), 1100 + s;
|
|
14
|
+
}
|
|
15
|
+
/** Free the slot. The next opener will reuse the now-vacated topmost order. */
|
|
16
|
+
unregister(e) {
|
|
17
|
+
this.order.delete(e), this.kind.delete(e);
|
|
18
|
+
}
|
|
19
|
+
/** Slot order for an id, or 0 if not registered. */
|
|
20
|
+
getOrder(e) {
|
|
21
|
+
return this.order.get(e) ?? 0;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Topmost z-index across all overlays, or — when `kind` is supplied — the
|
|
25
|
+
* topmost z within that kind only. Returns `OVERLAY_BASE_Z_INDEX` (the
|
|
26
|
+
* stacking floor) when nothing of the requested kind is registered.
|
|
27
|
+
*/
|
|
28
|
+
getTopmostZIndex(e) {
|
|
29
|
+
return 1100 + this.getMaxOrder(e);
|
|
30
|
+
}
|
|
31
|
+
/** Test-only: wipe internal state. Not for production code paths. */
|
|
32
|
+
__resetForTests() {
|
|
33
|
+
this.order.clear(), this.kind.clear();
|
|
34
|
+
}
|
|
35
|
+
getMaxOrder(e) {
|
|
36
|
+
let r = 0;
|
|
37
|
+
return this.order.forEach((s, n) => {
|
|
38
|
+
e && this.kind.get(n) !== e || s > r && (r = s);
|
|
39
|
+
}), r;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const g = new o();
|
|
43
|
+
export {
|
|
44
|
+
c as OVERLAY_BASE_Z_INDEX,
|
|
45
|
+
g as OverlayStackingService
|
|
46
|
+
};
|
package/dist/index-_virtual10.js
CHANGED
package/dist/index-_virtual21.js
CHANGED
package/dist/index-_virtual22.js
CHANGED
package/dist/index-_virtual23.js
CHANGED
package/dist/index-_virtual24.js
CHANGED
package/dist/index-_virtual25.js
CHANGED
package/dist/index-_virtual26.js
CHANGED
package/dist/index-_virtual27.js
CHANGED
package/dist/index-_virtual28.js
CHANGED
package/dist/index-_virtual29.js
CHANGED
package/dist/index-_virtual31.js
CHANGED
package/dist/index-_virtual32.js
CHANGED
package/dist/index-_virtual33.js
CHANGED
package/dist/index-_virtual34.js
CHANGED
package/dist/index-_virtual63.js
CHANGED
package/dist/index-_virtual64.js
CHANGED
package/dist/index-_virtual77.js
CHANGED