@editora/plugins 1.0.11 → 1.0.13
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/README.md +1 -1
- package/dist/approval-workflow.cjs.js +14 -14
- package/dist/approval-workflow.esm.js +265 -262
- package/dist/blockquote.cjs.js +1 -1
- package/dist/blockquote.esm.js +177 -15
- package/dist/blocks-library.cjs.js +6 -6
- package/dist/blocks-library.esm.js +95 -92
- package/dist/bold.cjs.js +1 -1
- package/dist/bold.esm.js +10 -6
- package/dist/capitalization.cjs.js +1 -1
- package/dist/capitalization.esm.js +124 -44
- package/dist/checklist.cjs.js +1 -1
- package/dist/checklist.esm.js +251 -191
- package/dist/citations.cjs.js +4 -4
- package/dist/citations.esm.js +131 -128
- package/dist/clear-formatting.cjs.js +1 -1
- package/dist/clear-formatting.esm.js +68 -36
- package/dist/code.cjs.js +121 -44
- package/dist/code.esm.js +2694 -889
- package/dist/content-rules.cjs.js +5 -5
- package/dist/content-rules.esm.js +104 -101
- package/dist/data-binding.cjs.js +3 -3
- package/dist/data-binding.esm.js +51 -48
- package/dist/direction.cjs.js +1 -1
- package/dist/direction.esm.js +97 -74
- package/dist/doc-schema.cjs.js +4 -4
- package/dist/doc-schema.esm.js +104 -101
- package/dist/embed-iframe.cjs.js +21 -4
- package/dist/embed-iframe.esm.js +279 -116
- package/dist/heading.cjs.js +1 -1
- package/dist/heading.esm.js +239 -56
- package/dist/history.cjs.js +1 -1
- package/dist/history.esm.js +74 -89
- package/dist/inlineFormatting-DOYOJdnD.js +1 -0
- package/dist/inlineFormatting-DuVTGXYG.mjs +95 -0
- package/dist/italic.cjs.js +1 -1
- package/dist/italic.esm.js +12 -8
- package/dist/math.cjs.js +27 -21
- package/dist/math.esm.js +218 -146
- package/dist/merge-tag.cjs.js +8 -2
- package/dist/merge-tag.esm.js +130 -111
- package/dist/pii-redaction.cjs.js +6 -6
- package/dist/pii-redaction.esm.js +169 -166
- package/dist/smart-paste.cjs.js +5 -5
- package/dist/smart-paste.esm.js +120 -117
- package/dist/special-characters.cjs.js +6 -10
- package/dist/special-characters.esm.js +97 -75
- package/dist/strikethrough.cjs.js +1 -1
- package/dist/strikethrough.esm.js +11 -25
- package/dist/translation-workflow.cjs.js +7 -7
- package/dist/translation-workflow.esm.js +103 -100
- package/dist/underline.cjs.js +1 -1
- package/dist/underline.esm.js +7 -3
- package/package.json +3 -3
|
@@ -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", g = ':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,98 +22,98 @@ 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
|
-
}, s = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(),
|
|
30
|
-
let _ = 0,
|
|
31
|
-
function p(
|
|
32
|
-
return
|
|
29
|
+
}, s = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new Set();
|
|
30
|
+
let _ = 0, bt = 0, rt = 0, at = 0, R = null, v = null, T = null, L = null, S = null;
|
|
31
|
+
function p(t) {
|
|
32
|
+
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function gt(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(
|
|
40
|
+
function z(t = {}) {
|
|
41
41
|
return {
|
|
42
|
-
defaultStatus:
|
|
43
|
-
lockOnApproval:
|
|
44
|
-
maxHistoryEntries: Math.max(10, Math.min(500, Number(
|
|
45
|
-
requireCommentOnApprove: !!
|
|
46
|
-
defaultActor: (
|
|
42
|
+
defaultStatus: lt(t.defaultStatus),
|
|
43
|
+
lockOnApproval: t.lockOnApproval !== !1,
|
|
44
|
+
maxHistoryEntries: Math.max(10, Math.min(500, Number(t.maxHistoryEntries ?? 120))),
|
|
45
|
+
requireCommentOnApprove: !!t.requireCommentOnApprove,
|
|
46
|
+
defaultActor: (t.defaultActor || "system").trim() || "system",
|
|
47
47
|
labels: {
|
|
48
|
-
...
|
|
49
|
-
...
|
|
48
|
+
...ft,
|
|
49
|
+
...t.labels || {}
|
|
50
50
|
},
|
|
51
|
-
normalizeText:
|
|
51
|
+
normalizeText: t.normalizeText || gt
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
54
|
+
function Y(t) {
|
|
55
|
+
return t.closest(F) || t;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
if (!
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
61
|
-
return
|
|
57
|
+
function K(t) {
|
|
58
|
+
if (!t) return null;
|
|
59
|
+
if (t.matches(w)) return t;
|
|
60
|
+
const e = t.querySelector(w);
|
|
61
|
+
return e instanceof HTMLElement ? e : null;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function vt() {
|
|
64
64
|
if (typeof window > "u") return null;
|
|
65
|
-
const
|
|
66
|
-
if (!(
|
|
67
|
-
window[
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const o =
|
|
65
|
+
const t = window[et];
|
|
66
|
+
if (!(t instanceof HTMLElement)) return null;
|
|
67
|
+
window[et] = null;
|
|
68
|
+
const e = K(t);
|
|
69
|
+
if (e) return e;
|
|
70
|
+
const o = t.closest(F);
|
|
71
71
|
if (o) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = K(o);
|
|
73
73
|
if (n) return n;
|
|
74
74
|
}
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
let o =
|
|
77
|
+
function ht(t) {
|
|
78
|
+
const e = t.closest("[data-editora-editor]");
|
|
79
|
+
if (e && K(e) === t)
|
|
80
|
+
return e;
|
|
81
|
+
let o = t;
|
|
82
82
|
for (; o; ) {
|
|
83
|
-
if (o.matches(F) && (o ===
|
|
83
|
+
if (o.matches(F) && (o === t || K(o) === t))
|
|
84
84
|
return o;
|
|
85
85
|
o = o.parentElement;
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return Y(t);
|
|
88
88
|
}
|
|
89
|
-
function W(
|
|
90
|
-
return
|
|
89
|
+
function W(t) {
|
|
90
|
+
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;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
if (W(
|
|
95
|
-
const o =
|
|
92
|
+
function xt(t) {
|
|
93
|
+
const e = Y(t);
|
|
94
|
+
if (W(e)) return !0;
|
|
95
|
+
const o = e.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
|
|
96
96
|
return W(o) ? !0 : W(document.documentElement) || W(document.body);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function B(t, e) {
|
|
99
|
+
t.classList.remove("rte-approval-theme-dark"), xt(e) && t.classList.add("rte-approval-theme-dark");
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
101
|
+
function it(t) {
|
|
102
|
+
return t ? t.nodeType === Node.ELEMENT_NODE ? t : t.parentElement : null;
|
|
103
103
|
}
|
|
104
|
-
function x(
|
|
105
|
-
if (D(),
|
|
106
|
-
if (
|
|
107
|
-
const a =
|
|
104
|
+
function x(t, e = !0) {
|
|
105
|
+
if (D(), t?.contentElement instanceof HTMLElement) return t.contentElement;
|
|
106
|
+
if (t?.editorElement instanceof HTMLElement) {
|
|
107
|
+
const a = t.editorElement;
|
|
108
108
|
if (a.matches(w)) return a;
|
|
109
109
|
const l = a.querySelector(w);
|
|
110
110
|
if (l instanceof HTMLElement) return l;
|
|
111
111
|
}
|
|
112
|
-
const o =
|
|
112
|
+
const o = vt();
|
|
113
113
|
if (o) return o;
|
|
114
114
|
const n = window.getSelection();
|
|
115
115
|
if (n && n.rangeCount > 0) {
|
|
116
|
-
const l =
|
|
116
|
+
const l = it(n.getRangeAt(0).startContainer)?.closest(w);
|
|
117
117
|
if (l) return l;
|
|
118
118
|
}
|
|
119
119
|
const r = document.activeElement;
|
|
@@ -122,101 +122,101 @@ function x(e, t = !0) {
|
|
|
122
122
|
const a = r.closest(w);
|
|
123
123
|
if (a) return a;
|
|
124
124
|
}
|
|
125
|
-
return v && v.isConnected ? v : (v && !v.isConnected && (v = null),
|
|
125
|
+
return v && v.isConnected ? v : (v && !v.isConnected && (v = null), e ? document.querySelector(w) : null);
|
|
126
126
|
}
|
|
127
127
|
function D() {
|
|
128
|
-
Array.from(H).forEach((
|
|
129
|
-
|
|
128
|
+
Array.from(H).forEach((e) => {
|
|
129
|
+
e.isConnected || (y.get(e)?.remove(), y.delete(e), O.delete(e), s.delete(e), I.delete(e), H.delete(e), v === e && (v = null));
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function wt(t) {
|
|
133
|
+
return t ? !!(t.closest(`.${d}`) || t.closest(w) || t.closest(F)) : !1;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
if (!
|
|
138
|
-
const
|
|
139
|
-
return !!
|
|
135
|
+
function yt() {
|
|
136
|
+
const t = window.getSelection();
|
|
137
|
+
if (!t || t.rangeCount === 0) return !1;
|
|
138
|
+
const e = t.getRangeAt(0).startContainer;
|
|
139
|
+
return !!it(e)?.closest(w);
|
|
140
140
|
}
|
|
141
|
-
function C(
|
|
142
|
-
const n =
|
|
141
|
+
function C(t, e, o) {
|
|
142
|
+
const n = ht(t);
|
|
143
143
|
Array.from(
|
|
144
144
|
n.querySelectorAll(
|
|
145
|
-
`.rte-toolbar-button[data-command="${
|
|
145
|
+
`.rte-toolbar-button[data-command="${e}"], .editora-toolbar-button[data-command="${e}"]`
|
|
146
146
|
)
|
|
147
147
|
).forEach((a) => {
|
|
148
148
|
a.classList.toggle("active", o), a.setAttribute("aria-pressed", o ? "true" : "false"), a.setAttribute("data-active", o ? "true" : "false");
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
151
|
+
function st(t, e, o) {
|
|
152
|
+
e !== null ? t.setAttribute("contenteditable", e) : t.setAttribute("contenteditable", "true"), o !== null ? t.setAttribute("data-readonly", o) : t.removeAttribute("data-readonly");
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
154
|
+
function X(t) {
|
|
155
|
+
t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
if (
|
|
157
|
+
function J(t, e) {
|
|
158
|
+
if (e === t.innerHTML) return;
|
|
159
159
|
const o = window.execEditorCommand || window.executeEditorCommand;
|
|
160
160
|
if (typeof o == "function")
|
|
161
161
|
try {
|
|
162
|
-
o("recordDomTransaction", e, t
|
|
162
|
+
o("recordDomTransaction", t, e, t.innerHTML);
|
|
163
163
|
} catch {
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
166
|
+
function Q() {
|
|
167
|
+
return rt += 1, `approval-comment-${Date.now().toString(36)}-${rt.toString(36)}`;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return
|
|
169
|
+
function kt() {
|
|
170
|
+
return at += 1, `approval-signoff-${Date.now().toString(36)}-${at.toString(36)}`;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ct(t) {
|
|
173
173
|
return {
|
|
174
|
-
status:
|
|
175
|
-
locked:
|
|
176
|
-
comments:
|
|
177
|
-
signoffs:
|
|
178
|
-
updatedAt:
|
|
174
|
+
status: t.status,
|
|
175
|
+
locked: t.locked,
|
|
176
|
+
comments: t.comments.map((e) => ({ ...e })),
|
|
177
|
+
signoffs: t.signoffs.map((e) => ({ ...e })),
|
|
178
|
+
updatedAt: t.updatedAt
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
const o =
|
|
183
|
-
return
|
|
181
|
+
function At(t, e) {
|
|
182
|
+
const o = mt[t];
|
|
183
|
+
return e.labels[o] || t;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
if (
|
|
187
|
-
|
|
185
|
+
function pt(t, e, o) {
|
|
186
|
+
if (t.setAttribute("data-approval-status", e.status), t.setAttribute("data-approval-locked", e.locked ? "true" : "false"), t.classList.toggle("rte-approval-locked-editor", e.locked), C(t, "toggleApprovalWorkflowPanel", tt(t)), C(t, "requestApprovalReview", e.status === "review"), C(t, "approveDocument", e.status === "approved"), C(t, "reopenDraft", e.status === "draft"), e.status === "approved" && o.lockOnApproval) {
|
|
187
|
+
e.locked || (e.preApprovalContentEditable = t.getAttribute("contenteditable"), e.preApprovalReadonly = t.getAttribute("data-readonly")), t.setAttribute("contenteditable", "false"), t.setAttribute("data-readonly", "true"), e.locked = !0;
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
),
|
|
190
|
+
e.locked = !1, st(
|
|
191
|
+
t,
|
|
192
|
+
e.preApprovalContentEditable ?? e.originalContentEditable,
|
|
193
|
+
e.preApprovalReadonly ?? e.originalReadonly
|
|
194
|
+
), e.preApprovalContentEditable = null, e.preApprovalReadonly = null;
|
|
195
195
|
}
|
|
196
|
-
function f(
|
|
197
|
-
let o = I.get(
|
|
196
|
+
function f(t, e) {
|
|
197
|
+
let o = I.get(t);
|
|
198
198
|
return o || (o = {
|
|
199
|
-
status:
|
|
199
|
+
status: e.defaultStatus,
|
|
200
200
|
locked: !1,
|
|
201
201
|
comments: [],
|
|
202
202
|
signoffs: [],
|
|
203
203
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
204
|
-
originalContentEditable:
|
|
205
|
-
originalReadonly:
|
|
204
|
+
originalContentEditable: t.getAttribute("contenteditable"),
|
|
205
|
+
originalReadonly: t.getAttribute("data-readonly"),
|
|
206
206
|
preApprovalContentEditable: null,
|
|
207
207
|
preApprovalReadonly: null
|
|
208
|
-
}, I.set(
|
|
208
|
+
}, I.set(t, o), H.add(t), pt(t, o, e), o);
|
|
209
209
|
}
|
|
210
|
-
function j(
|
|
211
|
-
return
|
|
210
|
+
function j(t, e) {
|
|
211
|
+
return t.length <= e ? t : t.slice(t.length - e);
|
|
212
212
|
}
|
|
213
|
-
function M(
|
|
214
|
-
const o =
|
|
215
|
-
o && (o.textContent =
|
|
213
|
+
function M(t, e) {
|
|
214
|
+
const o = t.querySelector(".rte-approval-live");
|
|
215
|
+
o && (o.textContent = e);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
const o =
|
|
219
|
-
|
|
217
|
+
function St(t, e) {
|
|
218
|
+
const o = ct(e);
|
|
219
|
+
t.__approvalWorkflowState = o, t.dispatchEvent(
|
|
220
220
|
new CustomEvent("editora:approval-state-changed", {
|
|
221
221
|
bubbles: !0,
|
|
222
222
|
detail: {
|
|
@@ -225,14 +225,14 @@ function Ae(e, t) {
|
|
|
225
225
|
})
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
|
-
function q(
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
231
|
-
const o = s.get(
|
|
228
|
+
function q(t) {
|
|
229
|
+
const e = y.get(t);
|
|
230
|
+
if (!e) return;
|
|
231
|
+
const o = s.get(t) || R;
|
|
232
232
|
if (!o) return;
|
|
233
|
-
const n = f(
|
|
233
|
+
const n = f(t, o), r = e.querySelector(".rte-approval-summary"), a = e.querySelector('[data-action="request-review"]'), l = e.querySelector('[data-action="approve"]'), c = e.querySelector('[data-action="reopen-draft"]'), u = e.querySelector(".rte-approval-comments-list"), m = e.querySelector(".rte-approval-signoffs-list");
|
|
234
234
|
if (r) {
|
|
235
|
-
const i =
|
|
235
|
+
const i = At(n.status, o);
|
|
236
236
|
r.textContent = `${o.labels.summaryPrefix}: ${i} | Comments: ${n.comments.length} | Sign-offs: ${n.signoffs.length}${n.locked ? ` | ${o.labels.lockedSuffix}` : ""}`;
|
|
237
237
|
}
|
|
238
238
|
a && (a.disabled = n.status !== "draft"), l && (l.disabled = n.status === "approved"), c && (c.disabled = n.status === "draft"), u && (n.comments.length === 0 ? u.innerHTML = `<li class="rte-approval-empty">${p(o.labels.noCommentsText)}</li>` : u.innerHTML = n.comments.slice().reverse().map(
|
|
@@ -261,69 +261,69 @@ function q(e) {
|
|
|
261
261
|
`
|
|
262
262
|
).join(""));
|
|
263
263
|
}
|
|
264
|
-
function G(
|
|
265
|
-
|
|
264
|
+
function G(t, e, o) {
|
|
265
|
+
e.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), pt(t, e, o), q(t), St(t, e);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
|
|
269
|
-
id:
|
|
270
|
-
author: o ||
|
|
267
|
+
function nt(t, e, o, n) {
|
|
268
|
+
t.comments.push({
|
|
269
|
+
id: Q(),
|
|
270
|
+
author: o || e.defaultActor,
|
|
271
271
|
message: n,
|
|
272
272
|
kind: "system",
|
|
273
273
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
274
|
-
}),
|
|
274
|
+
}), t.comments = j(t.comments, e.maxHistoryEntries);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const r = f(
|
|
278
|
-
if (r.status ===
|
|
279
|
-
const a =
|
|
280
|
-
return r.status =
|
|
276
|
+
function $(t, e, o, n) {
|
|
277
|
+
const r = f(t, o);
|
|
278
|
+
if (r.status === e) return !1;
|
|
279
|
+
const a = t.innerHTML;
|
|
280
|
+
return r.status = e, e === "review" ? nt(r, o, n, "Review requested.") : e === "draft" && nt(r, o, n, "Returned to draft."), G(t, r, o), X(t), J(t, a), !0;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
const r = n.normalizeText(
|
|
282
|
+
function dt(t, e, o, n) {
|
|
283
|
+
const r = n.normalizeText(e);
|
|
284
284
|
if (!r) return !1;
|
|
285
|
-
const a = n.normalizeText(o) || n.defaultActor, l = f(
|
|
285
|
+
const a = n.normalizeText(o) || n.defaultActor, l = f(t, n), c = t.innerHTML;
|
|
286
286
|
return l.comments.push({
|
|
287
|
-
id:
|
|
287
|
+
id: Q(),
|
|
288
288
|
author: a,
|
|
289
289
|
message: r,
|
|
290
290
|
kind: "comment",
|
|
291
291
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
292
|
-
}), l.comments = j(l.comments, n.maxHistoryEntries), G(
|
|
292
|
+
}), l.comments = j(l.comments, n.maxHistoryEntries), G(t, l, n), X(t), J(t, c), !0;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
const r =
|
|
296
|
-
if (
|
|
297
|
-
const l = f(
|
|
294
|
+
function Z(t, e, o, n) {
|
|
295
|
+
const r = e.normalizeText(o) || e.defaultActor, a = e.normalizeText(n);
|
|
296
|
+
if (e.requireCommentOnApprove && !a) return !1;
|
|
297
|
+
const l = f(t, e), c = t.innerHTML;
|
|
298
298
|
return l.status = "approved", l.signoffs.push({
|
|
299
|
-
id:
|
|
299
|
+
id: kt(),
|
|
300
300
|
author: r,
|
|
301
301
|
comment: a || void 0,
|
|
302
302
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
303
|
-
}), l.signoffs = j(l.signoffs,
|
|
304
|
-
id:
|
|
303
|
+
}), l.signoffs = j(l.signoffs, e.maxHistoryEntries), a && (l.comments.push({
|
|
304
|
+
id: Q(),
|
|
305
305
|
author: r,
|
|
306
306
|
message: a,
|
|
307
307
|
kind: "system",
|
|
308
308
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
309
|
-
}), l.comments = j(l.comments,
|
|
309
|
+
}), l.comments = j(l.comments, e.maxHistoryEntries)), G(t, l, e), X(t), J(t, c), !0;
|
|
310
310
|
}
|
|
311
|
-
function N(
|
|
312
|
-
return
|
|
311
|
+
function N(t, e) {
|
|
312
|
+
return t.querySelector(`[data-field="${e}"]`);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
const
|
|
316
|
-
return { actor:
|
|
314
|
+
function Et(t) {
|
|
315
|
+
const e = N(t, "actor")?.value || "", o = N(t, "comment")?.value || "";
|
|
316
|
+
return { actor: e, comment: o };
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
if (!
|
|
320
|
-
const n =
|
|
321
|
-
|
|
318
|
+
function U(t, e) {
|
|
319
|
+
if (!e.classList.contains("show")) return;
|
|
320
|
+
const n = Y(t).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 420), a = Math.max(10, window.innerWidth - r - 10), l = Math.min(Math.max(10, n.right - r), a), c = Math.max(10, Math.min(window.innerHeight - 10 - 280, n.top + 12));
|
|
321
|
+
e.style.width = `${r}px`, e.style.left = `${l}px`, e.style.top = `${c}px`, e.style.maxHeight = `${Math.max(280, window.innerHeight - 24)}px`;
|
|
322
322
|
}
|
|
323
|
-
function $
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
const o = s.get(
|
|
323
|
+
function $t(t) {
|
|
324
|
+
const e = y.get(t);
|
|
325
|
+
if (e) return e;
|
|
326
|
+
const o = s.get(t) || R || z(), n = `rte-approval-panel-${bt++}`, r = document.createElement("section");
|
|
327
327
|
return r.className = d, r.id = n, r.setAttribute("role", "dialog"), r.setAttribute("aria-modal", "false"), r.setAttribute("aria-label", o.labels.panelAriaLabel), r.setAttribute("tabindex", "-1"), r.innerHTML = `
|
|
328
328
|
<header class="rte-approval-header">
|
|
329
329
|
<h2 class="rte-approval-title">${p(o.labels.panelTitle)}</h2>
|
|
@@ -382,144 +382,147 @@ function $e(e) {
|
|
|
382
382
|
if (!l) return;
|
|
383
383
|
const c = l.closest("[data-action]");
|
|
384
384
|
if (!c) return;
|
|
385
|
-
const u = c.getAttribute("data-action") || "", m = s.get(
|
|
386
|
-
if (s.set(
|
|
387
|
-
P(
|
|
385
|
+
const u = c.getAttribute("data-action") || "", m = s.get(t) || R || o;
|
|
386
|
+
if (s.set(t, m), f(t, m), u === "close") {
|
|
387
|
+
P(t, !0);
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
|
-
const i =
|
|
390
|
+
const i = Et(r);
|
|
391
391
|
if (u === "request-review") {
|
|
392
|
-
|
|
392
|
+
$(t, "review", m, i.actor || m.defaultActor) && M(r, "Status changed to review.");
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
395
|
if (u === "reopen-draft") {
|
|
396
|
-
|
|
396
|
+
$(t, "draft", m, i.actor || m.defaultActor) && M(r, "Status changed to draft.");
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
if (u === "approve") {
|
|
400
|
-
const b =
|
|
400
|
+
const b = Z(t, m, i.actor, i.comment);
|
|
401
401
|
if (!b && m.requireCommentOnApprove) {
|
|
402
402
|
M(r, m.labels.approveCommentRequiredText);
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
if (b) {
|
|
406
|
-
const
|
|
407
|
-
|
|
406
|
+
const E = N(r, "comment");
|
|
407
|
+
E && (E.value = ""), M(r, "Document approved and signed off.");
|
|
408
408
|
}
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
if (u === "add-comment") {
|
|
412
|
-
if (!
|
|
413
|
-
const
|
|
414
|
-
|
|
412
|
+
if (!dt(t, i.comment, i.actor, m)) return;
|
|
413
|
+
const E = N(r, "comment");
|
|
414
|
+
E && (E.value = ""), M(r, "Comment added.");
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
}), r.addEventListener("keydown", (a) => {
|
|
418
|
-
a.key === "Escape" && (a.preventDefault(), P(
|
|
419
|
-
}),
|
|
418
|
+
a.key === "Escape" && (a.preventDefault(), P(t, !0));
|
|
419
|
+
}), B(r, t), document.body.appendChild(r), y.set(t, r), O.set(t, !1), q(t), r;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
return O.get(
|
|
421
|
+
function tt(t) {
|
|
422
|
+
return O.get(t) === !0;
|
|
423
423
|
}
|
|
424
|
-
function A(
|
|
424
|
+
function A(t) {
|
|
425
425
|
D();
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
n !==
|
|
429
|
-
}),
|
|
426
|
+
const e = $t(t);
|
|
427
|
+
y.forEach((o, n) => {
|
|
428
|
+
n !== t && P(n, !1);
|
|
429
|
+
}), e.classList.add("show"), O.set(t, !0), C(t, "toggleApprovalWorkflowPanel", !0), B(e, t), U(t, e), q(t);
|
|
430
430
|
}
|
|
431
|
-
function P(
|
|
432
|
-
const o =
|
|
433
|
-
o && (o.classList.remove("show"), O.set(
|
|
431
|
+
function P(t, e = !1) {
|
|
432
|
+
const o = y.get(t);
|
|
433
|
+
o && (o.classList.remove("show"), O.set(t, !1), C(t, "toggleApprovalWorkflowPanel", !1), e && t.focus({ preventScroll: !0 }));
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
const o =
|
|
437
|
-
return (typeof
|
|
435
|
+
function ut(t, e) {
|
|
436
|
+
const o = tt(t);
|
|
437
|
+
return (typeof e == "boolean" ? e : !o) ? A(t) : P(t), !0;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
441
|
-
return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "a";
|
|
439
|
+
function V(t) {
|
|
440
|
+
return typeof t.key == "string" ? t.key.toLowerCase() : "";
|
|
442
441
|
}
|
|
443
|
-
function
|
|
444
|
-
const
|
|
445
|
-
return (
|
|
442
|
+
function Ct(t) {
|
|
443
|
+
const e = V(t);
|
|
444
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "a";
|
|
446
445
|
}
|
|
447
|
-
function
|
|
448
|
-
const
|
|
449
|
-
return (
|
|
446
|
+
function Tt(t) {
|
|
447
|
+
const e = V(t);
|
|
448
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "r";
|
|
450
449
|
}
|
|
451
|
-
function
|
|
452
|
-
const
|
|
453
|
-
return (
|
|
450
|
+
function Lt(t) {
|
|
451
|
+
const e = V(t);
|
|
452
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "p";
|
|
454
453
|
}
|
|
455
|
-
function
|
|
456
|
-
|
|
454
|
+
function Rt(t) {
|
|
455
|
+
const e = V(t);
|
|
456
|
+
return (t.metaKey || t.ctrlKey) && t.altKey && t.shiftKey && e === "d";
|
|
457
|
+
}
|
|
458
|
+
function Mt(t) {
|
|
459
|
+
R = t, T || (T = (e) => {
|
|
457
460
|
D();
|
|
458
|
-
const n =
|
|
461
|
+
const n = e.target?.closest(w);
|
|
459
462
|
if (!n) return;
|
|
460
463
|
v = n;
|
|
461
|
-
const r = s.get(n) ||
|
|
464
|
+
const r = s.get(n) || t;
|
|
462
465
|
s.set(n, r), f(n, r);
|
|
463
|
-
const a =
|
|
464
|
-
a && (
|
|
465
|
-
}, document.addEventListener("focusin", T, !0)), L || (L = (
|
|
466
|
-
if (
|
|
467
|
-
const o =
|
|
466
|
+
const a = y.get(n);
|
|
467
|
+
a && (B(a, n), U(n, a));
|
|
468
|
+
}, document.addEventListener("focusin", T, !0)), L || (L = (e) => {
|
|
469
|
+
if (e.defaultPrevented) return;
|
|
470
|
+
const o = Ct(e), n = Tt(e), r = Lt(e), a = Rt(e), l = e.key === "Escape";
|
|
468
471
|
if (!l && !o && !n && !r && !a)
|
|
469
472
|
return;
|
|
470
473
|
D();
|
|
471
|
-
const c =
|
|
472
|
-
if (!
|
|
474
|
+
const c = e.target, u = !!c?.closest(`.${d} input, .${d} textarea, .${d} select`);
|
|
475
|
+
if (!wt(c) && !yt())
|
|
473
476
|
return;
|
|
474
477
|
const i = x(void 0, !1);
|
|
475
478
|
if (!i) return;
|
|
476
|
-
const b = s.get(i) || R ||
|
|
479
|
+
const b = s.get(i) || R || t;
|
|
477
480
|
s.set(i, b);
|
|
478
|
-
const
|
|
479
|
-
if (v = i, l &&
|
|
480
|
-
|
|
481
|
+
const E = f(i, b);
|
|
482
|
+
if (v = i, l && tt(i)) {
|
|
483
|
+
e.preventDefault(), P(i, !0);
|
|
481
484
|
return;
|
|
482
485
|
}
|
|
483
486
|
if (!u) {
|
|
484
487
|
if (o) {
|
|
485
|
-
|
|
488
|
+
e.preventDefault(), e.stopPropagation(), ut(i);
|
|
486
489
|
return;
|
|
487
490
|
}
|
|
488
491
|
if (n) {
|
|
489
|
-
|
|
492
|
+
e.preventDefault(), e.stopPropagation(), $(i, "review", b, b.defaultActor) && A(i);
|
|
490
493
|
return;
|
|
491
494
|
}
|
|
492
495
|
if (r) {
|
|
493
|
-
|
|
496
|
+
e.preventDefault(), e.stopPropagation(), Z(i, b, b.defaultActor, "Approved via keyboard shortcut.") && A(i);
|
|
494
497
|
return;
|
|
495
498
|
}
|
|
496
|
-
a && (
|
|
499
|
+
a && (e.preventDefault(), e.stopPropagation(), E.status !== "draft" && $(i, "draft", b, b.defaultActor) && A(i));
|
|
497
500
|
}
|
|
498
501
|
}, document.addEventListener("keydown", L, !0)), S || (S = () => {
|
|
499
|
-
D(),
|
|
500
|
-
!o.isConnected || !
|
|
502
|
+
D(), y.forEach((e, o) => {
|
|
503
|
+
!o.isConnected || !e.isConnected || (B(e, o), U(o, e));
|
|
501
504
|
});
|
|
502
505
|
}, window.addEventListener("scroll", S, !0), window.addEventListener("resize", S));
|
|
503
506
|
}
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
507
|
+
function Dt(t) {
|
|
508
|
+
const e = I.get(t);
|
|
509
|
+
e && (t.classList.remove("rte-approval-locked-editor"), t.removeAttribute("data-approval-status"), t.removeAttribute("data-approval-locked"), st(
|
|
510
|
+
t,
|
|
511
|
+
e.preApprovalContentEditable ?? e.originalContentEditable,
|
|
512
|
+
e.preApprovalReadonly ?? e.originalReadonly
|
|
510
513
|
));
|
|
511
514
|
}
|
|
512
|
-
function
|
|
513
|
-
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),
|
|
515
|
+
function Ht() {
|
|
516
|
+
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, v = null;
|
|
514
517
|
}
|
|
515
|
-
function
|
|
516
|
-
if (typeof document > "u" || document.getElementById(
|
|
517
|
-
const
|
|
518
|
-
|
|
518
|
+
function qt() {
|
|
519
|
+
if (typeof document > "u" || document.getElementById(ot)) return;
|
|
520
|
+
const t = document.createElement("style");
|
|
521
|
+
t.id = ot, t.textContent = `
|
|
519
522
|
.rte-toolbar-group-items.${h},
|
|
520
523
|
.editora-toolbar-group-items.${h},
|
|
521
|
-
.rte-toolbar-group-items.${
|
|
522
|
-
.editora-toolbar-group-items.${
|
|
524
|
+
.rte-toolbar-group-items.${k},
|
|
525
|
+
.editora-toolbar-group-items.${k} {
|
|
523
526
|
display: flex;
|
|
524
527
|
border: 1px solid #ccc;
|
|
525
528
|
border-radius: 3px;
|
|
@@ -528,8 +531,8 @@ function He() {
|
|
|
528
531
|
|
|
529
532
|
.rte-toolbar-group-items.${h} .rte-toolbar-button,
|
|
530
533
|
.editora-toolbar-group-items.${h} .editora-toolbar-button,
|
|
531
|
-
.rte-toolbar-group-items.${
|
|
532
|
-
.editora-toolbar-group-items.${
|
|
534
|
+
.rte-toolbar-group-items.${k} .rte-toolbar-button,
|
|
535
|
+
.editora-toolbar-group-items.${k} .editora-toolbar-button {
|
|
533
536
|
border: none;
|
|
534
537
|
border-radius: 0;
|
|
535
538
|
border-right: 1px solid #ccc;
|
|
@@ -551,22 +554,22 @@ function He() {
|
|
|
551
554
|
|
|
552
555
|
.rte-toolbar-group-items.${h} .rte-toolbar-item:last-child .rte-toolbar-button,
|
|
553
556
|
.editora-toolbar-group-items.${h} .editora-toolbar-item:last-child .editora-toolbar-button,
|
|
554
|
-
.rte-toolbar-group-items.${
|
|
555
|
-
.editora-toolbar-group-items.${
|
|
557
|
+
.rte-toolbar-group-items.${k} .rte-toolbar-item:last-child .rte-toolbar-button,
|
|
558
|
+
.editora-toolbar-group-items.${k} .editora-toolbar-item:last-child .editora-toolbar-button {
|
|
556
559
|
border-right: none;
|
|
557
560
|
}
|
|
558
561
|
|
|
559
562
|
${g} .rte-toolbar-group-items.${h},
|
|
560
563
|
${g} .editora-toolbar-group-items.${h},
|
|
561
|
-
${g} .rte-toolbar-group-items.${
|
|
562
|
-
${g} .editora-toolbar-group-items.${
|
|
564
|
+
${g} .rte-toolbar-group-items.${k},
|
|
565
|
+
${g} .editora-toolbar-group-items.${k},
|
|
563
566
|
.${d}.rte-approval-theme-dark {
|
|
564
567
|
border-color: #566275;
|
|
565
568
|
}
|
|
566
569
|
${g} .rte-toolbar-group-items.${h} .rte-toolbar-button svg,
|
|
567
570
|
${g} .editora-toolbar-group-items.${h} .editora-toolbar-button svg,
|
|
568
|
-
${g} .rte-toolbar-group-items.${
|
|
569
|
-
${g} .editora-toolbar-group-items.${
|
|
571
|
+
${g} .rte-toolbar-group-items.${k} .rte-toolbar-button svg,
|
|
572
|
+
${g} .editora-toolbar-group-items.${k} .editora-toolbar-button svg
|
|
570
573
|
{
|
|
571
574
|
fill: none;
|
|
572
575
|
}
|
|
@@ -906,11 +909,11 @@ function He() {
|
|
|
906
909
|
max-height: calc(100vh - 20px);
|
|
907
910
|
}
|
|
908
911
|
}
|
|
909
|
-
`, document.head.appendChild(
|
|
912
|
+
`, document.head.appendChild(t);
|
|
910
913
|
}
|
|
911
|
-
const
|
|
912
|
-
const
|
|
913
|
-
return
|
|
914
|
+
const Pt = (t = {}) => {
|
|
915
|
+
const e = z(t);
|
|
916
|
+
return qt(), {
|
|
914
917
|
name: "approvalWorkflow",
|
|
915
918
|
toolbar: [
|
|
916
919
|
{
|
|
@@ -954,59 +957,59 @@ const qe = (e = {}) => {
|
|
|
954
957
|
approvalWorkflow: (o, n) => {
|
|
955
958
|
const r = x(n);
|
|
956
959
|
if (!r) return !1;
|
|
957
|
-
const a = s.get(r) ||
|
|
960
|
+
const a = s.get(r) || e;
|
|
958
961
|
return s.set(r, a), f(r, a), v = r, A(r), q(r), !0;
|
|
959
962
|
},
|
|
960
963
|
toggleApprovalWorkflowPanel: (o, n) => {
|
|
961
964
|
const r = x(n);
|
|
962
965
|
if (!r) return !1;
|
|
963
|
-
const a = s.get(r) ||
|
|
964
|
-
return s.set(r, a), f(r, a), v = r,
|
|
966
|
+
const a = s.get(r) || e;
|
|
967
|
+
return s.set(r, a), f(r, a), v = r, ut(r, typeof o == "boolean" ? o : void 0);
|
|
965
968
|
},
|
|
966
969
|
requestApprovalReview: (o, n) => {
|
|
967
970
|
const r = x(n);
|
|
968
971
|
if (!r) return !1;
|
|
969
|
-
const a = s.get(r) ||
|
|
972
|
+
const a = s.get(r) || e;
|
|
970
973
|
s.set(r, a), f(r, a);
|
|
971
|
-
const l =
|
|
974
|
+
const l = $(r, "review", a, a.defaultActor);
|
|
972
975
|
return A(r), l;
|
|
973
976
|
},
|
|
974
977
|
approveDocument: (o, n) => {
|
|
975
978
|
const r = x(n);
|
|
976
979
|
if (!r) return !1;
|
|
977
|
-
const a = s.get(r) ||
|
|
980
|
+
const a = s.get(r) || e;
|
|
978
981
|
s.set(r, a), f(r, a);
|
|
979
|
-
const l = typeof o == "object" && o ? String(o.author || "") : a.defaultActor, c = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u =
|
|
982
|
+
const l = typeof o == "object" && o ? String(o.author || "") : a.defaultActor, c = typeof o == "object" && o ? String(o.comment || "") : typeof o == "string" ? o : "", u = Z(r, a, l, c);
|
|
980
983
|
return u && A(r), u;
|
|
981
984
|
},
|
|
982
985
|
reopenDraft: (o, n) => {
|
|
983
986
|
const r = x(n);
|
|
984
987
|
if (!r) return !1;
|
|
985
|
-
const a = s.get(r) ||
|
|
988
|
+
const a = s.get(r) || e;
|
|
986
989
|
s.set(r, a), f(r, a);
|
|
987
|
-
const l =
|
|
990
|
+
const l = $(r, "draft", a, a.defaultActor);
|
|
988
991
|
return l && A(r), l;
|
|
989
992
|
},
|
|
990
993
|
addApprovalComment: (o, n) => {
|
|
991
994
|
const r = x(n);
|
|
992
995
|
if (!r) return !1;
|
|
993
|
-
const a = s.get(r) ||
|
|
996
|
+
const a = s.get(r) || e;
|
|
994
997
|
s.set(r, a), f(r, a);
|
|
995
|
-
const l = typeof o == "object" && o ? String(o.author || "") : a.defaultActor, c = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u =
|
|
998
|
+
const l = typeof o == "object" && o ? String(o.author || "") : a.defaultActor, c = typeof o == "object" && o ? String(o.message || "") : typeof o == "string" ? o : "", u = dt(r, c, l, a);
|
|
996
999
|
return u && A(r), u;
|
|
997
1000
|
},
|
|
998
1001
|
setApprovalStatus: (o, n) => {
|
|
999
1002
|
const r = x(n);
|
|
1000
1003
|
if (!r || !o) return !1;
|
|
1001
|
-
const a =
|
|
1004
|
+
const a = lt(o), l = s.get(r) || e;
|
|
1002
1005
|
s.set(r, l), f(r, l);
|
|
1003
|
-
const c =
|
|
1006
|
+
const c = $(r, a, l, l.defaultActor);
|
|
1004
1007
|
return c && A(r), c;
|
|
1005
1008
|
},
|
|
1006
1009
|
setApprovalWorkflowOptions: (o, n) => {
|
|
1007
1010
|
const r = x(n);
|
|
1008
1011
|
if (!r || !o || typeof o != "object") return !1;
|
|
1009
|
-
const a = s.get(r) ||
|
|
1012
|
+
const a = s.get(r) || e, l = z({
|
|
1010
1013
|
...a,
|
|
1011
1014
|
...o,
|
|
1012
1015
|
labels: {
|
|
@@ -1022,9 +1025,9 @@ const qe = (e = {}) => {
|
|
|
1022
1025
|
getApprovalWorkflowState: (o, n) => {
|
|
1023
1026
|
const r = x(n);
|
|
1024
1027
|
if (!r) return !1;
|
|
1025
|
-
const a = s.get(r) ||
|
|
1028
|
+
const a = s.get(r) || e;
|
|
1026
1029
|
s.set(r, a);
|
|
1027
|
-
const l = f(r, a), c =
|
|
1030
|
+
const l = f(r, a), c = ct(l);
|
|
1028
1031
|
if (typeof o == "function")
|
|
1029
1032
|
try {
|
|
1030
1033
|
o(c);
|
|
@@ -1052,8 +1055,8 @@ const qe = (e = {}) => {
|
|
|
1052
1055
|
},
|
|
1053
1056
|
init: function(n) {
|
|
1054
1057
|
_ += 1;
|
|
1055
|
-
const r = this && typeof this.__pluginConfig == "object" ? z({ ...
|
|
1056
|
-
|
|
1058
|
+
const r = this && typeof this.__pluginConfig == "object" ? z({ ...e, ...this.__pluginConfig }) : e;
|
|
1059
|
+
Mt(r);
|
|
1057
1060
|
const a = x(
|
|
1058
1061
|
n?.editorElement ? { editorElement: n.editorElement } : void 0,
|
|
1059
1062
|
!1
|
|
@@ -1061,10 +1064,10 @@ const qe = (e = {}) => {
|
|
|
1061
1064
|
a && (s.set(a, r), f(a, r), v = a, q(a));
|
|
1062
1065
|
},
|
|
1063
1066
|
destroy: () => {
|
|
1064
|
-
_ = Math.max(0, _ - 1), !(_ > 0) &&
|
|
1067
|
+
_ = Math.max(0, _ - 1), !(_ > 0) && Ht();
|
|
1065
1068
|
}
|
|
1066
1069
|
};
|
|
1067
1070
|
};
|
|
1068
1071
|
export {
|
|
1069
|
-
|
|
1072
|
+
Pt as ApprovalWorkflowPlugin
|
|
1070
1073
|
};
|