@editora/core 1.0.15 → 1.0.17
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/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-DIKuCeFw.mjs} +82 -79
- package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-DXZdK3zr.mjs} +72 -71
- package/dist/{ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs → ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs} +239 -238
- package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-H3XyYD7_.mjs} +2 -2
- package/dist/{BlocksLibraryPlugin.native-5sdsXsiE.mjs → BlocksLibraryPlugin.native-CownM6Rk.mjs} +140 -116
- package/dist/{CapitalizationPlugin.native-DLV4oPmB.mjs → CapitalizationPlugin.native-C-HRbXGh.mjs} +10 -5
- package/dist/{ChecklistPlugin.native-BS-kMz9O.mjs → ChecklistPlugin.native-NVrBUkaL.mjs} +141 -103
- package/dist/{CitationsPlugin.native-DQgoCd1B.mjs → CitationsPlugin.native-C_7wWQ-k.mjs} +441 -422
- package/dist/{ClearFormattingPlugin.native-B6ro3a1h.mjs → ClearFormattingPlugin.native-Pp0O-SBf.mjs} +24 -23
- package/dist/{CodePlugin.native-knhM8NNo.mjs → CodePlugin.native-BH-K4xmW.mjs} +474 -342
- package/dist/CodePlugin.native-hNgfXlfS.mjs +4767 -0
- package/dist/CodeSamplePlugin.native-svbAFWh_.mjs +501 -0
- package/dist/CollaborationPlugin.native-oSybCGPW.mjs +7468 -0
- package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-CLip9wAO.mjs} +233 -185
- package/dist/{ConditionalContentPlugin.native-CfhY46rU.mjs → ConditionalContentPlugin.native-Bf7XgRSW.mjs} +401 -351
- package/dist/{DataBindingPlugin.native-BoXwghTz.mjs → DataBindingPlugin.native-B7lpI_0c.mjs} +29 -28
- package/dist/{DocumentManagerPlugin.native-D1YHQ2NN.mjs → DocumentManagerPlugin.native-iFip6s4Q.mjs} +94 -45
- package/dist/{EmbedIframePlugin.native-BF_-LjTq.mjs → EmbedIframePlugin.native-BfZ_HGlV.mjs} +231 -186
- package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-D92aaOKi.mjs} +288 -76
- package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-M3cNQ0KA.mjs} +57 -50
- package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-DsLrH8eq.mjs} +41 -34
- package/dist/{FormatPainterPlugin.native-CsMrKfFU.mjs → FormatPainterPlugin.native-BhjzsiVq.mjs} +3 -2
- package/dist/{HistoryPlugin.native-D2wl32jV.mjs → HistoryPlugin.native-DPvhks6h.mjs} +36 -32
- package/dist/LinkPlugin.native-BsQXYsK6.mjs +352 -0
- package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-Bt0LANbO.mjs} +68 -35
- package/dist/{MathPlugin.native-NwWPHVmj.mjs → MathPlugin.native-Byo3WL0f.mjs} +211 -115
- package/dist/{MediaManagerPlugin.native-eOsTJFpw.mjs → MediaManagerPlugin.native-BT1NZIJS.mjs} +139 -134
- package/dist/{MentionPlugin.native-BMDlOqur.mjs → MentionPlugin.native-S_lwGZQO.mjs} +23 -18
- package/dist/{MergeTagPlugin.native-BzRVoD9-.mjs → MergeTagPlugin.native-7-6F3S1Y.mjs} +44 -43
- package/dist/{PreviewPlugin.native-WuIwOAOR.mjs → PreviewPlugin.native-CiR51jql.mjs} +31 -28
- package/dist/{SlashCommandsPlugin.native-BiN6ODw5.mjs → SlashCommandsPlugin.native-BDIIwGNs.mjs} +90 -79
- package/dist/{SmartPastePlugin.native-CZAEHkyt.mjs → SmartPastePlugin.native-BATLCds5.mjs} +89 -85
- package/dist/{SpecialCharactersPlugin.native-DaG4b19I.mjs → SpecialCharactersPlugin.native-CdZoc1GB.mjs} +73 -26
- package/dist/SpellCheckPlugin.native-Bef2oTLB.mjs +10935 -0
- package/dist/TablePlugin.native-BjIxYZ2X.mjs +772 -0
- package/dist/{TemplatePlugin.native-DLjFUaPW.mjs → TemplatePlugin.native-D6n5RUnC.mjs} +288 -262
- package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-KMZ2uzlq.mjs} +2 -2
- package/dist/{TranslationWorkflowPlugin.native-DdF16tgT.mjs → TranslationWorkflowPlugin.native-CZtG--06.mjs} +67 -65
- package/dist/{VersionDiffPlugin.native-Bvxgy--t.mjs → VersionDiffPlugin.native-Ca1fMWUJ.mjs} +42 -42
- package/dist/anchoredPopover-DJFD2oAP.mjs +116 -0
- package/dist/core.css +1 -1
- package/dist/dialogHelpers-DBf7WqYH.mjs +40 -0
- package/dist/editora.min.js +26 -24
- package/dist/editora.umd.js +26 -24
- package/dist/escapeHtml-CX8RelZ1.mjs +7 -0
- package/dist/historyHelpers-B0-4mq1E.mjs +15 -0
- package/dist/index-XsYC_KdJ.mjs +3923 -0
- package/dist/index-_eKRBZPq.js +12 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.esm.js +17 -14
- package/dist/plugin-loader.js +53 -52
- package/dist/webcomponent-core.js +2055 -476
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +96 -66
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +2223 -643
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +1564 -1198
- package/index.d.ts +32 -0
- package/package.json +10 -3
- package/dist/CodeSamplePlugin.native-CgGoH-X4.mjs +0 -384
- package/dist/LinkPlugin.native-DYCIcdTm.mjs +0 -283
- package/dist/SpellCheckPlugin.native-BZB9AewP.mjs +0 -1039
- package/dist/TablePlugin.native-DrHX-efe.mjs +0 -495
- package/dist/anchoredPopover-Bxds0VoB.mjs +0 -110
- package/dist/index-BLm1MtzH.js +0 -10
- package/dist/index-Cd9jEuZP.mjs +0 -2341
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor",
|
|
1
|
+
const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", et = "__editoraCommandEditorRoot", ot = "rte-approval-workflow-styles", d = "rte-approval-panel", h = "approval", k = "approvalWorkflow", v = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ft = {
|
|
2
2
|
panelTitle: "Approval Workflow",
|
|
3
3
|
panelAriaLabel: "Approval workflow panel",
|
|
4
4
|
statusLabel: "Status",
|
|
@@ -22,99 +22,99 @@ const w = ".rte-content, .editora-content", F = "[data-editora-editor], .rte-edi
|
|
|
22
22
|
lockedSuffix: "Locked",
|
|
23
23
|
shortcutText: "Shortcuts: Ctrl/Cmd+Alt+Shift+A/R/P/D",
|
|
24
24
|
approveCommentRequiredText: "Approval comment is required."
|
|
25
|
-
},
|
|
25
|
+
}, mt = {
|
|
26
26
|
draft: "statusDraftText",
|
|
27
27
|
review: "statusReviewText",
|
|
28
28
|
approved: "statusApprovedText"
|
|
29
29
|
}, p = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set();
|
|
30
|
-
let _ = 0,
|
|
31
|
-
function c(
|
|
32
|
-
return
|
|
30
|
+
let _ = 0, bt = 0, rt = 0, at = 0, R = null, g = null, T = null, L = null, S = null;
|
|
31
|
+
function c(t) {
|
|
32
|
+
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function vt(t) {
|
|
35
|
+
return t.replace(/\u00A0/g, " ").replace(/\s+/g, " ").trim();
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function lt(t) {
|
|
38
|
+
return t === "review" || t === "approved" ? t : "draft";
|
|
39
39
|
}
|
|
40
|
-
function z(
|
|
41
|
-
var
|
|
40
|
+
function z(t = {}) {
|
|
41
|
+
var e;
|
|
42
42
|
return {
|
|
43
|
-
defaultStatus:
|
|
44
|
-
lockOnApproval:
|
|
45
|
-
maxHistoryEntries: Math.max(10, Math.min(500, Number((
|
|
46
|
-
requireCommentOnApprove: !!
|
|
47
|
-
defaultActor: (
|
|
43
|
+
defaultStatus: lt(t.defaultStatus),
|
|
44
|
+
lockOnApproval: t.lockOnApproval !== !1,
|
|
45
|
+
maxHistoryEntries: Math.max(10, Math.min(500, Number((e = t.maxHistoryEntries) != null ? e : 120))),
|
|
46
|
+
requireCommentOnApprove: !!t.requireCommentOnApprove,
|
|
47
|
+
defaultActor: (t.defaultActor || "system").trim() || "system",
|
|
48
48
|
labels: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
49
|
+
...ft,
|
|
50
|
+
...t.labels || {}
|
|
51
51
|
},
|
|
52
|
-
normalizeText:
|
|
52
|
+
normalizeText: t.normalizeText || vt
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function Y(
|
|
56
|
-
return
|
|
55
|
+
function Y(t) {
|
|
56
|
+
return t.closest(F) || t;
|
|
57
57
|
}
|
|
58
|
-
function K(
|
|
59
|
-
if (!
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
return
|
|
58
|
+
function K(t) {
|
|
59
|
+
if (!t) return null;
|
|
60
|
+
if (t.matches(w)) return t;
|
|
61
|
+
const e = t.querySelector(w);
|
|
62
|
+
return e instanceof HTMLElement ? e : null;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function gt() {
|
|
65
65
|
if (typeof window == "undefined") return null;
|
|
66
|
-
const
|
|
67
|
-
if (!(
|
|
68
|
-
window[
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
const o =
|
|
66
|
+
const t = window[et];
|
|
67
|
+
if (!(t instanceof HTMLElement)) return null;
|
|
68
|
+
window[et] = null;
|
|
69
|
+
const e = K(t);
|
|
70
|
+
if (e) return e;
|
|
71
|
+
const o = t.closest(F);
|
|
72
72
|
if (o) {
|
|
73
73
|
const a = K(o);
|
|
74
74
|
if (a) return a;
|
|
75
75
|
}
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
82
|
-
let o =
|
|
78
|
+
function ht(t) {
|
|
79
|
+
const e = t.closest("[data-editora-editor]");
|
|
80
|
+
if (e && K(e) === t)
|
|
81
|
+
return e;
|
|
82
|
+
let o = t;
|
|
83
83
|
for (; o; ) {
|
|
84
|
-
if (o.matches(F) && (o ===
|
|
84
|
+
if (o.matches(F) && (o === t || K(o) === t))
|
|
85
85
|
return o;
|
|
86
86
|
o = o.parentElement;
|
|
87
87
|
}
|
|
88
|
-
return Y(
|
|
88
|
+
return Y(t);
|
|
89
89
|
}
|
|
90
|
-
function W(
|
|
91
|
-
return
|
|
90
|
+
function W(t) {
|
|
91
|
+
return t ? (t.getAttribute("data-theme") || t.getAttribute("theme") || "").toLowerCase() === "dark" ? !0 : t.classList.contains("dark") || t.classList.contains("editora-theme-dark") || t.classList.contains("rte-theme-dark") : !1;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
if (W(
|
|
96
|
-
const o =
|
|
93
|
+
function xt(t) {
|
|
94
|
+
const e = Y(t);
|
|
95
|
+
if (W(e)) return !0;
|
|
96
|
+
const o = e.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
|
|
97
97
|
return W(o) ? !0 : W(document.documentElement) || W(document.body);
|
|
98
98
|
}
|
|
99
|
-
function B(
|
|
100
|
-
|
|
99
|
+
function B(t, e) {
|
|
100
|
+
t.classList.remove("rte-approval-theme-dark"), xt(e) && t.classList.add("rte-approval-theme-dark");
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
102
|
+
function it(t) {
|
|
103
|
+
return t ? t.nodeType === Node.ELEMENT_NODE ? t : t.parentElement : null;
|
|
104
104
|
}
|
|
105
|
-
function x(
|
|
106
|
-
if (D(), (
|
|
107
|
-
if ((
|
|
108
|
-
const n =
|
|
105
|
+
function x(t, e = !0) {
|
|
106
|
+
if (D(), (t == null ? void 0 : t.contentElement) instanceof HTMLElement) return t.contentElement;
|
|
107
|
+
if ((t == null ? void 0 : t.editorElement) instanceof HTMLElement) {
|
|
108
|
+
const n = t.editorElement;
|
|
109
109
|
if (n.matches(w)) return n;
|
|
110
110
|
const l = n.querySelector(w);
|
|
111
111
|
if (l instanceof HTMLElement) return l;
|
|
112
112
|
}
|
|
113
|
-
const o =
|
|
113
|
+
const o = gt();
|
|
114
114
|
if (o) return o;
|
|
115
115
|
const a = window.getSelection();
|
|
116
116
|
if (a && a.rangeCount > 0) {
|
|
117
|
-
const n =
|
|
117
|
+
const n = it(a.getRangeAt(0).startContainer), l = n == null ? void 0 : n.closest(w);
|
|
118
118
|
if (l) return l;
|
|
119
119
|
}
|
|
120
120
|
const r = document.activeElement;
|
|
@@ -123,103 +123,104 @@ function x(e, t = !0) {
|
|
|
123
123
|
const n = r.closest(w);
|
|
124
124
|
if (n) return n;
|
|
125
125
|
}
|
|
126
|
-
return g && g.isConnected ? g : (g && !g.isConnected && (g = null),
|
|
126
|
+
return g && g.isConnected ? g : (g && !g.isConnected && (g = null), e ? document.querySelector(w) : null);
|
|
127
127
|
}
|
|
128
128
|
function D() {
|
|
129
|
-
Array.from(H).forEach((
|
|
129
|
+
Array.from(H).forEach((e) => {
|
|
130
130
|
var o;
|
|
131
|
-
|
|
131
|
+
e.isConnected || ((o = y.get(e)) == null || o.remove(), y.delete(e), O.delete(e), p.delete(e), I.delete(e), H.delete(e), g === e && (g = null));
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
134
|
+
function wt(t) {
|
|
135
|
+
return t ? !!(t.closest(`.${d}`) || t.closest(w) || t.closest(F)) : !1;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
if (!
|
|
140
|
-
const
|
|
137
|
+
function yt() {
|
|
138
|
+
const t = window.getSelection();
|
|
139
|
+
if (!t || t.rangeCount === 0) return !1;
|
|
140
|
+
const e = t.getRangeAt(0).startContainer, o = it(e);
|
|
141
141
|
return !!(o != null && o.closest(w));
|
|
142
142
|
}
|
|
143
|
-
function C(
|
|
144
|
-
const a =
|
|
143
|
+
function C(t, e, o) {
|
|
144
|
+
const a = ht(t);
|
|
145
145
|
Array.from(
|
|
146
146
|
a.querySelectorAll(
|
|
147
|
-
`.rte-toolbar-button[data-command="${
|
|
147
|
+
`.rte-toolbar-button[data-command="${e}"], .editora-toolbar-button[data-command="${e}"]`
|
|
148
148
|
)
|
|
149
149
|
).forEach((n) => {
|
|
150
150
|
n.classList.toggle("active", o), n.setAttribute("aria-pressed", o ? "true" : "false"), n.setAttribute("data-active", o ? "true" : "false");
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
|
|
153
|
+
function st(t, e, o) {
|
|
154
|
+
e !== null ? t.setAttribute("contenteditable", e) : t.setAttribute("contenteditable", "true"), o !== null ? t.setAttribute("data-readonly", o) : t.removeAttribute("data-readonly");
|
|
155
155
|
}
|
|
156
|
-
function X(
|
|
157
|
-
|
|
156
|
+
function X(t) {
|
|
157
|
+
t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
158
158
|
}
|
|
159
|
-
function J(
|
|
160
|
-
if (
|
|
159
|
+
function J(t, e) {
|
|
160
|
+
if (e === t.innerHTML) return;
|
|
161
161
|
const o = window.execEditorCommand || window.executeEditorCommand;
|
|
162
162
|
if (typeof o == "function")
|
|
163
163
|
try {
|
|
164
|
-
o("recordDomTransaction", e, t
|
|
164
|
+
o("recordDomTransaction", t, e, t.innerHTML);
|
|
165
165
|
} catch (a) {
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
function Q() {
|
|
169
|
-
return
|
|
169
|
+
return rt += 1, `approval-comment-${Date.now().toString(36)}-${rt.toString(36)}`;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function kt() {
|
|
172
|
+
return at += 1, `approval-signoff-${Date.now().toString(36)}-${at.toString(36)}`;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function pt(t) {
|
|
175
175
|
return {
|
|
176
|
-
status:
|
|
177
|
-
locked:
|
|
178
|
-
comments:
|
|
179
|
-
signoffs:
|
|
180
|
-
updatedAt:
|
|
176
|
+
status: t.status,
|
|
177
|
+
locked: t.locked,
|
|
178
|
+
comments: t.comments.map((e) => ({ ...e })),
|
|
179
|
+
signoffs: t.signoffs.map((e) => ({ ...e })),
|
|
180
|
+
updatedAt: t.updatedAt
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
const o =
|
|
185
|
-
return
|
|
183
|
+
function At(t, e) {
|
|
184
|
+
const o = mt[t];
|
|
185
|
+
return e.labels[o] || t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
function ct(t, e, o) {
|
|
188
|
+
var n, l;
|
|
189
|
+
const a = e.locked, r = e.status === "approved" && o.lockOnApproval;
|
|
190
|
+
if (t.setAttribute("data-approval-status", e.status), t.setAttribute("data-approval-locked", r ? "true" : "false"), t.classList.toggle("rte-approval-locked-editor", r), C(t, "toggleApprovalWorkflowPanel", tt(t)), C(t, "requestApprovalReview", e.status === "review"), C(t, "approveDocument", e.status === "approved"), C(t, "reopenDraft", e.status === "draft"), r) {
|
|
191
|
+
a || (e.preApprovalContentEditable = t.getAttribute("contenteditable"), e.preApprovalReadonly = t.getAttribute("data-readonly")), t.setAttribute("contenteditable", "false"), t.setAttribute("data-readonly", "true"), e.locked = !0;
|
|
191
192
|
return;
|
|
192
193
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
(
|
|
196
|
-
(
|
|
197
|
-
),
|
|
194
|
+
e.locked = !1, st(
|
|
195
|
+
t,
|
|
196
|
+
(n = e.preApprovalContentEditable) != null ? n : e.originalContentEditable,
|
|
197
|
+
(l = e.preApprovalReadonly) != null ? l : e.originalReadonly
|
|
198
|
+
), e.preApprovalContentEditable = null, e.preApprovalReadonly = null;
|
|
198
199
|
}
|
|
199
|
-
function f(
|
|
200
|
-
let o = I.get(
|
|
200
|
+
function f(t, e) {
|
|
201
|
+
let o = I.get(t);
|
|
201
202
|
return o || (o = {
|
|
202
|
-
status:
|
|
203
|
+
status: e.defaultStatus,
|
|
203
204
|
locked: !1,
|
|
204
205
|
comments: [],
|
|
205
206
|
signoffs: [],
|
|
206
207
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
207
|
-
originalContentEditable:
|
|
208
|
-
originalReadonly:
|
|
208
|
+
originalContentEditable: t.getAttribute("contenteditable"),
|
|
209
|
+
originalReadonly: t.getAttribute("data-readonly"),
|
|
209
210
|
preApprovalContentEditable: null,
|
|
210
211
|
preApprovalReadonly: null
|
|
211
|
-
}, I.set(
|
|
212
|
+
}, I.set(t, o), H.add(t), ct(t, o, e), o);
|
|
212
213
|
}
|
|
213
|
-
function j(
|
|
214
|
-
return
|
|
214
|
+
function j(t, e) {
|
|
215
|
+
return t.length <= e ? t : t.slice(t.length - e);
|
|
215
216
|
}
|
|
216
|
-
function M(
|
|
217
|
-
const o =
|
|
218
|
-
o && (o.textContent =
|
|
217
|
+
function M(t, e) {
|
|
218
|
+
const o = t.querySelector(".rte-approval-live");
|
|
219
|
+
o && (o.textContent = e);
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
const o =
|
|
222
|
-
|
|
221
|
+
function St(t, e) {
|
|
222
|
+
const o = pt(e);
|
|
223
|
+
t.__approvalWorkflowState = o, t.dispatchEvent(
|
|
223
224
|
new CustomEvent("editora:approval-state-changed", {
|
|
224
225
|
bubbles: !0,
|
|
225
226
|
detail: {
|
|
@@ -228,14 +229,14 @@ function Se(e, t) {
|
|
|
228
229
|
})
|
|
229
230
|
);
|
|
230
231
|
}
|
|
231
|
-
function q(
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
const o = p.get(
|
|
232
|
+
function q(t) {
|
|
233
|
+
const e = y.get(t);
|
|
234
|
+
if (!e) return;
|
|
235
|
+
const o = p.get(t) || R;
|
|
235
236
|
if (!o) return;
|
|
236
|
-
const a = f(
|
|
237
|
+
const a = f(t, o), r = e.querySelector(".rte-approval-summary"), n = e.querySelector('[data-action="request-review"]'), l = e.querySelector('[data-action="approve"]'), s = e.querySelector('[data-action="reopen-draft"]'), u = e.querySelector(".rte-approval-comments-list"), m = e.querySelector(".rte-approval-signoffs-list");
|
|
237
238
|
if (r) {
|
|
238
|
-
const i =
|
|
239
|
+
const i = At(a.status, o);
|
|
239
240
|
r.textContent = `${o.labels.summaryPrefix}: ${i} | Comments: ${a.comments.length} | Sign-offs: ${a.signoffs.length}${a.locked ? ` | ${o.labels.lockedSuffix}` : ""}`;
|
|
240
241
|
}
|
|
241
242
|
n && (n.disabled = a.status !== "draft"), l && (l.disabled = a.status === "approved"), s && (s.disabled = a.status === "draft"), u && (a.comments.length === 0 ? u.innerHTML = `<li class="rte-approval-empty">${c(o.labels.noCommentsText)}</li>` : u.innerHTML = a.comments.slice().reverse().map(
|
|
@@ -264,70 +265,70 @@ function q(e) {
|
|
|
264
265
|
`
|
|
265
266
|
).join(""));
|
|
266
267
|
}
|
|
267
|
-
function G(
|
|
268
|
-
|
|
268
|
+
function G(t, e, o) {
|
|
269
|
+
e.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), ct(t, e, o), q(t), St(t, e);
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
271
|
+
function nt(t, e, o, a) {
|
|
272
|
+
t.comments.push({
|
|
272
273
|
id: Q(),
|
|
273
|
-
author: o ||
|
|
274
|
+
author: o || e.defaultActor,
|
|
274
275
|
message: a,
|
|
275
276
|
kind: "system",
|
|
276
277
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
277
|
-
}),
|
|
278
|
+
}), t.comments = j(t.comments, e.maxHistoryEntries);
|
|
278
279
|
}
|
|
279
|
-
function $(
|
|
280
|
-
const r = f(
|
|
281
|
-
if (r.status ===
|
|
282
|
-
const n =
|
|
283
|
-
return r.status =
|
|
280
|
+
function $(t, e, o, a) {
|
|
281
|
+
const r = f(t, o);
|
|
282
|
+
if (r.status === e) return !1;
|
|
283
|
+
const n = t.innerHTML;
|
|
284
|
+
return r.status = e, e === "review" ? nt(r, o, a, "Review requested.") : e === "draft" && nt(r, o, a, "Returned to draft."), G(t, r, o), X(t), J(t, n), !0;
|
|
284
285
|
}
|
|
285
|
-
function
|
|
286
|
-
const r = a.normalizeText(
|
|
286
|
+
function dt(t, e, o, a) {
|
|
287
|
+
const r = a.normalizeText(e);
|
|
287
288
|
if (!r) return !1;
|
|
288
|
-
const n = a.normalizeText(o) || a.defaultActor, l = f(
|
|
289
|
+
const n = a.normalizeText(o) || a.defaultActor, l = f(t, a), s = t.innerHTML;
|
|
289
290
|
return l.comments.push({
|
|
290
291
|
id: Q(),
|
|
291
292
|
author: n,
|
|
292
293
|
message: r,
|
|
293
294
|
kind: "comment",
|
|
294
295
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
295
|
-
}), l.comments = j(l.comments, a.maxHistoryEntries), G(
|
|
296
|
+
}), l.comments = j(l.comments, a.maxHistoryEntries), G(t, l, a), X(t), J(t, s), !0;
|
|
296
297
|
}
|
|
297
|
-
function Z(
|
|
298
|
-
const r =
|
|
299
|
-
if (
|
|
300
|
-
const l = f(
|
|
298
|
+
function Z(t, e, o, a) {
|
|
299
|
+
const r = e.normalizeText(o) || e.defaultActor, n = e.normalizeText(a);
|
|
300
|
+
if (e.requireCommentOnApprove && !n) return !1;
|
|
301
|
+
const l = f(t, e), s = t.innerHTML;
|
|
301
302
|
return l.status = "approved", l.signoffs.push({
|
|
302
|
-
id:
|
|
303
|
+
id: kt(),
|
|
303
304
|
author: r,
|
|
304
305
|
comment: n || void 0,
|
|
305
306
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
306
|
-
}), l.signoffs = j(l.signoffs,
|
|
307
|
+
}), l.signoffs = j(l.signoffs, e.maxHistoryEntries), n && (l.comments.push({
|
|
307
308
|
id: Q(),
|
|
308
309
|
author: r,
|
|
309
310
|
message: n,
|
|
310
311
|
kind: "system",
|
|
311
312
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
312
|
-
}), l.comments = j(l.comments,
|
|
313
|
+
}), l.comments = j(l.comments, e.maxHistoryEntries)), G(t, l, e), X(t), J(t, s), !0;
|
|
313
314
|
}
|
|
314
|
-
function N(
|
|
315
|
-
return
|
|
315
|
+
function N(t, e) {
|
|
316
|
+
return t.querySelector(`[data-field="${e}"]`);
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function Et(t) {
|
|
318
319
|
var a, r;
|
|
319
|
-
const
|
|
320
|
-
return { actor:
|
|
320
|
+
const e = ((a = N(t, "actor")) == null ? void 0 : a.value) || "", o = ((r = N(t, "comment")) == null ? void 0 : r.value) || "";
|
|
321
|
+
return { actor: e, comment: o };
|
|
321
322
|
}
|
|
322
|
-
function U(
|
|
323
|
-
if (!
|
|
324
|
-
const a = Y(
|
|
325
|
-
|
|
323
|
+
function U(t, e) {
|
|
324
|
+
if (!e.classList.contains("show")) return;
|
|
325
|
+
const a = Y(t).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 420), n = Math.max(10, window.innerWidth - r - 10), l = Math.min(Math.max(10, a.right - r), n), s = Math.max(10, Math.min(window.innerHeight - 10 - 280, a.top + 12));
|
|
326
|
+
e.style.width = `${r}px`, e.style.left = `${l}px`, e.style.top = `${s}px`, e.style.maxHeight = `${Math.max(280, window.innerHeight - 24)}px`;
|
|
326
327
|
}
|
|
327
|
-
function $
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
330
|
-
const o = p.get(
|
|
328
|
+
function $t(t) {
|
|
329
|
+
const e = y.get(t);
|
|
330
|
+
if (e) return e;
|
|
331
|
+
const o = p.get(t) || R || z(), a = `rte-approval-panel-${bt++}`, r = document.createElement("section");
|
|
331
332
|
return r.className = d, r.id = a, r.setAttribute("role", "dialog"), r.setAttribute("aria-modal", "false"), r.setAttribute("aria-label", o.labels.panelAriaLabel), r.setAttribute("tabindex", "-1"), r.innerHTML = `
|
|
332
333
|
<header class="rte-approval-header">
|
|
333
334
|
<h2 class="rte-approval-title">${c(o.labels.panelTitle)}</h2>
|
|
@@ -386,22 +387,22 @@ function $e(e) {
|
|
|
386
387
|
if (!l) return;
|
|
387
388
|
const s = l.closest("[data-action]");
|
|
388
389
|
if (!s) return;
|
|
389
|
-
const u = s.getAttribute("data-action") || "", m = p.get(
|
|
390
|
-
if (p.set(
|
|
391
|
-
P(
|
|
390
|
+
const u = s.getAttribute("data-action") || "", m = p.get(t) || R || o;
|
|
391
|
+
if (p.set(t, m), f(t, m), u === "close") {
|
|
392
|
+
P(t, !0);
|
|
392
393
|
return;
|
|
393
394
|
}
|
|
394
|
-
const i =
|
|
395
|
+
const i = Et(r);
|
|
395
396
|
if (u === "request-review") {
|
|
396
|
-
$(
|
|
397
|
+
$(t, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
|
|
397
398
|
return;
|
|
398
399
|
}
|
|
399
400
|
if (u === "reopen-draft") {
|
|
400
|
-
$(
|
|
401
|
+
$(t, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
|
|
401
402
|
return;
|
|
402
403
|
}
|
|
403
404
|
if (u === "approve") {
|
|
404
|
-
const b = Z(
|
|
405
|
+
const b = Z(t, m, i.actor, i.comment);
|
|
405
406
|
if (!b && m.requireCommentOnApprove) {
|
|
406
407
|
M(r, m.labels.approveCommentRequiredText);
|
|
407
408
|
return;
|
|
@@ -413,117 +414,117 @@ function $e(e) {
|
|
|
413
414
|
return;
|
|
414
415
|
}
|
|
415
416
|
if (u === "add-comment") {
|
|
416
|
-
if (!
|
|
417
|
+
if (!dt(t, i.comment, i.actor, m)) return;
|
|
417
418
|
const E = N(r, "comment");
|
|
418
419
|
E && (E.value = ""), M(r, "Comment added.");
|
|
419
420
|
return;
|
|
420
421
|
}
|
|
421
422
|
}), r.addEventListener("keydown", (n) => {
|
|
422
|
-
n.key === "Escape" && (n.preventDefault(), P(
|
|
423
|
-
}), B(r,
|
|
423
|
+
n.key === "Escape" && (n.preventDefault(), P(t, !0));
|
|
424
|
+
}), B(r, t), document.body.appendChild(r), y.set(t, r), O.set(t, !1), q(t), r;
|
|
424
425
|
}
|
|
425
|
-
function
|
|
426
|
-
return O.get(
|
|
426
|
+
function tt(t) {
|
|
427
|
+
return O.get(t) === !0;
|
|
427
428
|
}
|
|
428
|
-
function A(
|
|
429
|
+
function A(t) {
|
|
429
430
|
D();
|
|
430
|
-
const
|
|
431
|
+
const e = $t(t);
|
|
431
432
|
y.forEach((o, a) => {
|
|
432
|
-
a !==
|
|
433
|
-
}),
|
|
433
|
+
a !== t && P(a, !1);
|
|
434
|
+
}), e.classList.add("show"), O.set(t, !0), C(t, "toggleApprovalWorkflowPanel", !0), B(e, t), U(t, e), q(t);
|
|
434
435
|
}
|
|
435
|
-
function P(
|
|
436
|
-
const o = y.get(
|
|
437
|
-
o && (o.classList.remove("show"), O.set(
|
|
436
|
+
function P(t, e = !1) {
|
|
437
|
+
const o = y.get(t);
|
|
438
|
+
o && (o.classList.remove("show"), O.set(t, !1), C(t, "toggleApprovalWorkflowPanel", !1), e && t.focus({ preventScroll: !0 }));
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
-
const o =
|
|
441
|
-
return (typeof
|
|
440
|
+
function ut(t, e) {
|
|
441
|
+
const o = tt(t);
|
|
442
|
+
return (typeof e == "boolean" ? e : !o) ? A(t) : P(t), !0;
|
|
442
443
|
}
|
|
443
|
-
function V(
|
|
444
|
-
return typeof
|
|
444
|
+
function V(t) {
|
|
445
|
+
return typeof t.key == "string" ? t.key.toLowerCase() : "";
|
|
445
446
|
}
|
|
446
|
-
function
|
|
447
|
-
const
|
|
448
|
-
return (
|
|
447
|
+
function Ct(t) {
|
|
448
|
+
const e = V(t);
|
|
449
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "a";
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
-
const
|
|
452
|
-
return (
|
|
451
|
+
function Tt(t) {
|
|
452
|
+
const e = V(t);
|
|
453
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "r";
|
|
453
454
|
}
|
|
454
|
-
function
|
|
455
|
-
const
|
|
456
|
-
return (
|
|
455
|
+
function Lt(t) {
|
|
456
|
+
const e = V(t);
|
|
457
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "p";
|
|
457
458
|
}
|
|
458
|
-
function
|
|
459
|
-
const
|
|
460
|
-
return (
|
|
459
|
+
function Rt(t) {
|
|
460
|
+
const e = V(t);
|
|
461
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "d";
|
|
461
462
|
}
|
|
462
|
-
function
|
|
463
|
-
R =
|
|
463
|
+
function Mt(t) {
|
|
464
|
+
R = t, T || (T = (e) => {
|
|
464
465
|
D();
|
|
465
|
-
const o =
|
|
466
|
+
const o = e.target, a = o == null ? void 0 : o.closest(w);
|
|
466
467
|
if (!a) return;
|
|
467
468
|
g = a;
|
|
468
|
-
const r = p.get(a) ||
|
|
469
|
+
const r = p.get(a) || t;
|
|
469
470
|
p.set(a, r), f(a, r);
|
|
470
471
|
const n = y.get(a);
|
|
471
472
|
n && (B(n, a), U(a, n));
|
|
472
|
-
}, document.addEventListener("focusin", T, !0)), L || (L = (
|
|
473
|
-
if (
|
|
474
|
-
const o =
|
|
473
|
+
}, document.addEventListener("focusin", T, !0)), L || (L = (e) => {
|
|
474
|
+
if (e.defaultPrevented) return;
|
|
475
|
+
const o = Ct(e), a = Tt(e), r = Lt(e), n = Rt(e), l = e.key === "Escape";
|
|
475
476
|
if (!l && !o && !a && !r && !n)
|
|
476
477
|
return;
|
|
477
478
|
D();
|
|
478
|
-
const s =
|
|
479
|
-
if (!
|
|
479
|
+
const s = e.target, u = !!(s != null && s.closest(`.${d} input, .${d} textarea, .${d} select`));
|
|
480
|
+
if (!wt(s) && !yt())
|
|
480
481
|
return;
|
|
481
482
|
const i = x(void 0, !1);
|
|
482
483
|
if (!i) return;
|
|
483
|
-
const b = p.get(i) || R ||
|
|
484
|
+
const b = p.get(i) || R || t;
|
|
484
485
|
p.set(i, b);
|
|
485
486
|
const E = f(i, b);
|
|
486
|
-
if (g = i, l &&
|
|
487
|
-
|
|
487
|
+
if (g = i, l && tt(i)) {
|
|
488
|
+
e.preventDefault(), P(i, !0);
|
|
488
489
|
return;
|
|
489
490
|
}
|
|
490
491
|
if (!u) {
|
|
491
492
|
if (o) {
|
|
492
|
-
|
|
493
|
+
e.preventDefault(), e.stopPropagation(), ut(i);
|
|
493
494
|
return;
|
|
494
495
|
}
|
|
495
496
|
if (a) {
|
|
496
|
-
|
|
497
|
+
e.preventDefault(), e.stopPropagation(), $(i, "review", b, b.defaultActor) && A(i);
|
|
497
498
|
return;
|
|
498
499
|
}
|
|
499
500
|
if (r) {
|
|
500
|
-
|
|
501
|
+
e.preventDefault(), e.stopPropagation(), Z(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
|
|
501
502
|
return;
|
|
502
503
|
}
|
|
503
|
-
n && (
|
|
504
|
+
n && (e.preventDefault(), e.stopPropagation(), E.status !== "draft" && $(i, "draft", b, b.defaultActor) && A(i));
|
|
504
505
|
}
|
|
505
506
|
}, document.addEventListener("keydown", L, !0)), S || (S = () => {
|
|
506
|
-
D(), y.forEach((
|
|
507
|
-
!o.isConnected || !
|
|
507
|
+
D(), y.forEach((e, o) => {
|
|
508
|
+
!o.isConnected || !e.isConnected || (B(e, o), U(o, e));
|
|
508
509
|
});
|
|
509
510
|
}, window.addEventListener("scroll", S, !0), window.addEventListener("resize", S));
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
+
function Dt(t) {
|
|
512
513
|
var o, a;
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
(o =
|
|
517
|
-
(a =
|
|
514
|
+
const e = I.get(t);
|
|
515
|
+
e && (t.classList.remove("rte-approval-locked-editor"), t.removeAttribute("data-approval-status"), t.removeAttribute("data-approval-locked"), st(
|
|
516
|
+
t,
|
|
517
|
+
(o = e.preApprovalContentEditable) != null ? o : e.originalContentEditable,
|
|
518
|
+
(a = e.preApprovalReadonly) != null ? a : e.originalReadonly
|
|
518
519
|
));
|
|
519
520
|
}
|
|
520
|
-
function
|
|
521
|
-
T && (document.removeEventListener("focusin", T, !0), T = null), L && (document.removeEventListener("keydown", L, !0), L = null), S && (window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), S = null), y.forEach((
|
|
521
|
+
function Ht() {
|
|
522
|
+
T && (document.removeEventListener("focusin", T, !0), T = null), L && (document.removeEventListener("keydown", L, !0), L = null), S && (window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), S = null), y.forEach((t) => t.remove()), y.clear(), H.forEach((t) => Dt(t)), H.clear(), R = null, g = null;
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
-
if (typeof document == "undefined" || document.getElementById(
|
|
525
|
-
const
|
|
526
|
-
|
|
524
|
+
function qt() {
|
|
525
|
+
if (typeof document == "undefined" || document.getElementById(ot)) return;
|
|
526
|
+
const t = document.createElement("style");
|
|
527
|
+
t.id = ot, t.textContent = `
|
|
527
528
|
.rte-toolbar-group-items.${h},
|
|
528
529
|
.editora-toolbar-group-items.${h},
|
|
529
530
|
.rte-toolbar-group-items.${k},
|
|
@@ -914,11 +915,11 @@ function qe() {
|
|
|
914
915
|
max-height: calc(100vh - 20px);
|
|
915
916
|
}
|
|
916
917
|
}
|
|
917
|
-
`, document.head.appendChild(
|
|
918
|
+
`, document.head.appendChild(t);
|
|
918
919
|
}
|
|
919
|
-
const
|
|
920
|
-
const
|
|
921
|
-
return
|
|
920
|
+
const Pt = (t = {}) => {
|
|
921
|
+
const e = z(t);
|
|
922
|
+
return qt(), {
|
|
922
923
|
name: "approvalWorkflow",
|
|
923
924
|
toolbar: [
|
|
924
925
|
{
|
|
@@ -962,19 +963,19 @@ const Pe = (e = {}) => {
|
|
|
962
963
|
approvalWorkflow: (o, a) => {
|
|
963
964
|
const r = x(a);
|
|
964
965
|
if (!r) return !1;
|
|
965
|
-
const n = p.get(r) ||
|
|
966
|
+
const n = p.get(r) || e;
|
|
966
967
|
return p.set(r, n), f(r, n), g = r, A(r), q(r), !0;
|
|
967
968
|
},
|
|
968
969
|
toggleApprovalWorkflowPanel: (o, a) => {
|
|
969
970
|
const r = x(a);
|
|
970
971
|
if (!r) return !1;
|
|
971
|
-
const n = p.get(r) ||
|
|
972
|
-
return p.set(r, n), f(r, n), g = r,
|
|
972
|
+
const n = p.get(r) || e;
|
|
973
|
+
return p.set(r, n), f(r, n), g = r, ut(r, typeof o == "boolean" ? o : void 0);
|
|
973
974
|
},
|
|
974
975
|
requestApprovalReview: (o, a) => {
|
|
975
976
|
const r = x(a);
|
|
976
977
|
if (!r) return !1;
|
|
977
|
-
const n = p.get(r) ||
|
|
978
|
+
const n = p.get(r) || e;
|
|
978
979
|
p.set(r, n), f(r, n);
|
|
979
980
|
const l = $(r, "review", n, n.defaultActor);
|
|
980
981
|
return A(r), l;
|
|
@@ -982,7 +983,7 @@ const Pe = (e = {}) => {
|
|
|
982
983
|
approveDocument: (o, a) => {
|
|
983
984
|
const r = x(a);
|
|
984
985
|
if (!r) return !1;
|
|
985
|
-
const n = p.get(r) ||
|
|
986
|
+
const n = p.get(r) || e;
|
|
986
987
|
p.set(r, n), f(r, n);
|
|
987
988
|
const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u = Z(r, n, l, s);
|
|
988
989
|
return u && A(r), u;
|
|
@@ -990,7 +991,7 @@ const Pe = (e = {}) => {
|
|
|
990
991
|
reopenDraft: (o, a) => {
|
|
991
992
|
const r = x(a);
|
|
992
993
|
if (!r) return !1;
|
|
993
|
-
const n = p.get(r) ||
|
|
994
|
+
const n = p.get(r) || e;
|
|
994
995
|
p.set(r, n), f(r, n);
|
|
995
996
|
const l = $(r, "draft", n, n.defaultActor);
|
|
996
997
|
return l && A(r), l;
|
|
@@ -998,15 +999,15 @@ const Pe = (e = {}) => {
|
|
|
998
999
|
addApprovalComment: (o, a) => {
|
|
999
1000
|
const r = x(a);
|
|
1000
1001
|
if (!r) return !1;
|
|
1001
|
-
const n = p.get(r) ||
|
|
1002
|
+
const n = p.get(r) || e;
|
|
1002
1003
|
p.set(r, n), f(r, n);
|
|
1003
|
-
const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u =
|
|
1004
|
+
const l = typeof o == "object" && o ? String(o.author || "") : n.defaultActor, s = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = dt(r, s, l, n);
|
|
1004
1005
|
return u && A(r), u;
|
|
1005
1006
|
},
|
|
1006
1007
|
setApprovalStatus: (o, a) => {
|
|
1007
1008
|
const r = x(a);
|
|
1008
1009
|
if (!r || !o) return !1;
|
|
1009
|
-
const n =
|
|
1010
|
+
const n = lt(o), l = p.get(r) || e;
|
|
1010
1011
|
p.set(r, l), f(r, l);
|
|
1011
1012
|
const s = $(r, n, l, l.defaultActor);
|
|
1012
1013
|
return s && A(r), s;
|
|
@@ -1014,7 +1015,7 @@ const Pe = (e = {}) => {
|
|
|
1014
1015
|
setApprovalWorkflowOptions: (o, a) => {
|
|
1015
1016
|
const r = x(a);
|
|
1016
1017
|
if (!r || !o || typeof o != "object") return !1;
|
|
1017
|
-
const n = p.get(r) ||
|
|
1018
|
+
const n = p.get(r) || e, l = z({
|
|
1018
1019
|
...n,
|
|
1019
1020
|
...o,
|
|
1020
1021
|
labels: {
|
|
@@ -1030,9 +1031,9 @@ const Pe = (e = {}) => {
|
|
|
1030
1031
|
getApprovalWorkflowState: (o, a) => {
|
|
1031
1032
|
const r = x(a);
|
|
1032
1033
|
if (!r) return !1;
|
|
1033
|
-
const n = p.get(r) ||
|
|
1034
|
+
const n = p.get(r) || e;
|
|
1034
1035
|
p.set(r, n);
|
|
1035
|
-
const l = f(r, n), s =
|
|
1036
|
+
const l = f(r, n), s = pt(l);
|
|
1036
1037
|
if (typeof o == "function")
|
|
1037
1038
|
try {
|
|
1038
1039
|
o(s);
|
|
@@ -1060,8 +1061,8 @@ const Pe = (e = {}) => {
|
|
|
1060
1061
|
},
|
|
1061
1062
|
init: function(a) {
|
|
1062
1063
|
_ += 1;
|
|
1063
|
-
const r = this && typeof this.__pluginConfig == "object" ? z({ ...
|
|
1064
|
-
|
|
1064
|
+
const r = this && typeof this.__pluginConfig == "object" ? z({ ...e, ...this.__pluginConfig }) : e;
|
|
1065
|
+
Mt(r);
|
|
1065
1066
|
const n = x(
|
|
1066
1067
|
a != null && a.editorElement ? { editorElement: a.editorElement } : void 0,
|
|
1067
1068
|
!1
|
|
@@ -1069,11 +1070,11 @@ const Pe = (e = {}) => {
|
|
|
1069
1070
|
n && (p.set(n, r), f(n, r), g = n, q(n));
|
|
1070
1071
|
},
|
|
1071
1072
|
destroy: () => {
|
|
1072
|
-
_ = Math.max(0, _ - 1), !(_ > 0) &&
|
|
1073
|
+
_ = Math.max(0, _ - 1), !(_ > 0) && Ht();
|
|
1073
1074
|
}
|
|
1074
1075
|
};
|
|
1075
1076
|
};
|
|
1076
1077
|
export {
|
|
1077
|
-
|
|
1078
|
+
Pt as ApprovalWorkflowPlugin
|
|
1078
1079
|
};
|
|
1079
|
-
//# sourceMappingURL=ApprovalWorkflowPlugin.native-
|
|
1080
|
+
//# sourceMappingURL=ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs.map
|