@uva-glass/component-library 1.64.5 → 1.64.7

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.
Files changed (87) hide show
  1. package/dist/Lexical.prod-DeeCy7Xd.js +4216 -0
  2. package/dist/Lexical.prod-DeeCy7Xd.js.map +1 -0
  3. package/dist/LexicalClipboard.prod-CayrMfkI.js +258 -0
  4. package/dist/LexicalClipboard.prod-CayrMfkI.js.map +1 -0
  5. package/dist/{LexicalLink.prod-BvJo1BD4.js → LexicalLink.prod-Biaqry-c.js} +40 -40
  6. package/dist/LexicalLink.prod-Biaqry-c.js.map +1 -0
  7. package/dist/{LexicalList.prod-igdv32dp.js → LexicalList.prod-Uk8UObU7.js} +52 -50
  8. package/dist/LexicalList.prod-Uk8UObU7.js.map +1 -0
  9. package/dist/LexicalSelection.prod-C1TEIGhq.js +86 -0
  10. package/dist/{LexicalSelection.prod-CL_DfdL6.js.map → LexicalSelection.prod-C1TEIGhq.js.map} +1 -1
  11. package/dist/LexicalTable.prod-hx6rW3fc.js +1338 -0
  12. package/dist/LexicalTable.prod-hx6rW3fc.js.map +1 -0
  13. package/dist/LexicalUtils.prod-CCjlRAc-.js +94 -0
  14. package/dist/LexicalUtils.prod-CCjlRAc-.js.map +1 -0
  15. package/dist/{TablePlugin-BVkwu1Gt.js → TablePlugin-BbiBRjod.js} +45 -45
  16. package/dist/{TablePlugin-BVkwu1Gt.js.map → TablePlugin-BbiBRjod.js.map} +1 -1
  17. package/dist/components/Buttons/Button.stories.js +1 -1
  18. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  19. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  20. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  21. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  22. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  23. package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
  24. package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
  25. package/dist/components/Drawer/Drawer.stories.js +1 -1
  26. package/dist/components/FormInput/FormInput.js +2 -2
  27. package/dist/components/FormInput/FormInput.stories.js +1 -1
  28. package/dist/components/IconButton/IconButton.stories.js +1 -1
  29. package/dist/components/InputField/InputField.stories.js +3 -3
  30. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  31. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  32. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  33. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
  34. package/dist/components/MultiSelect/index.js +1 -1
  35. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  36. package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
  37. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  38. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
  39. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
  40. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
  41. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +5 -5
  42. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
  43. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  44. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +69 -69
  45. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  46. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  47. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +12 -12
  48. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
  49. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  50. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
  51. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  52. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +26 -26
  53. package/dist/components/RteEditor/Plugins/index.js +1 -1
  54. package/dist/components/RteEditor/RteEditor.js +474 -473
  55. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  56. package/dist/components/RteEditor/helpers.js +9 -9
  57. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  58. package/dist/components/Sortable/Sortable.stories.js +1 -1
  59. package/dist/components/index.js +1 -1
  60. package/dist/{helpers-BKqr9jXh.js → helpers-CgzuKnuq.js} +39 -39
  61. package/dist/{helpers-BKqr9jXh.js.map → helpers-CgzuKnuq.js.map} +1 -1
  62. package/dist/index-0wq-B7do.js +238 -0
  63. package/dist/{index-DPQ9bZx5.js.map → index-0wq-B7do.js.map} +1 -1
  64. package/dist/{index-DsprzSCj.js → index-B9BWML6P.js} +1025 -963
  65. package/dist/{index-DsprzSCj.js.map → index-B9BWML6P.js.map} +1 -1
  66. package/dist/{index-C9QoqAAt.js → index-DQyNeMuh.js} +66 -66
  67. package/dist/index-DQyNeMuh.js.map +1 -0
  68. package/dist/index.js +1 -1
  69. package/dist/react-18-BIqxBxbW.js +65 -0
  70. package/dist/{react-18-C0Aiha-e.js.map → react-18-BIqxBxbW.js.map} +1 -1
  71. package/dist/storybook__react.d.js +186 -183
  72. package/dist/storybook__react.d.js.map +1 -1
  73. package/package.json +19 -19
  74. package/dist/Lexical.prod-RJB8n7sC.js +0 -4072
  75. package/dist/Lexical.prod-RJB8n7sC.js.map +0 -1
  76. package/dist/LexicalClipboard.prod-DB_B0Sr6.js +0 -259
  77. package/dist/LexicalClipboard.prod-DB_B0Sr6.js.map +0 -1
  78. package/dist/LexicalLink.prod-BvJo1BD4.js.map +0 -1
  79. package/dist/LexicalList.prod-igdv32dp.js.map +0 -1
  80. package/dist/LexicalSelection.prod-CL_DfdL6.js +0 -86
  81. package/dist/LexicalTable.prod-CfgKmbyy.js +0 -1221
  82. package/dist/LexicalTable.prod-CfgKmbyy.js.map +0 -1
  83. package/dist/LexicalUtils.prod-mYf1cd8X.js +0 -94
  84. package/dist/LexicalUtils.prod-mYf1cd8X.js.map +0 -1
  85. package/dist/index-C9QoqAAt.js.map +0 -1
  86. package/dist/index-DPQ9bZx5.js +0 -231
  87. package/dist/react-18-C0Aiha-e.js +0 -52
@@ -1,231 +0,0 @@
1
- var C = {}, d = {};
2
- Object.defineProperty(d, "__esModule", { value: !0 });
3
- d.normalizeSpacerunSpans = d.normalizeSpacing = d.parseHtml = d.MSWordNormalizer = void 0;
4
- const T = [
5
- /<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,
6
- /xmlns:o="urn:schemas-microsoft-com/i
7
- ];
8
- class w {
9
- isActive(s) {
10
- return T.some((n) => n.test(s));
11
- }
12
- normalize(s) {
13
- const { bodyString: n, stylesString: r } = M(s), t = new DOMParser().parseFromString(n, "text/html");
14
- return this.transformListItemLikeLElementsIntoLists(t, r), this.removeMSAttributes(t), t.body.innerHTML;
15
- }
16
- findAllItemLikeElements(s) {
17
- const n = s.querySelectorAll("*"), r = [];
18
- for (const t of n) {
19
- const i = t.tagName.toLowerCase();
20
- if (!["p", "h1", "h2", "h3", "h4", "h5", "h6", "li", "div"].includes(i) || !(t instanceof HTMLElement))
21
- continue;
22
- const c = _(t.getAttribute("style") || "");
23
- if ("mso-list" in c) {
24
- if (!t.parentElement || b(t.parentElement))
25
- continue;
26
- const u = P(c);
27
- r.push(Object.assign(Object.assign({}, u), { element: t }));
28
- }
29
- }
30
- return r;
31
- }
32
- transformListItemLikeLElementsIntoLists(s, n) {
33
- var r, t, i, c, u, h, y;
34
- const g = this.findAllItemLikeElements(s);
35
- if (!g.length)
36
- return;
37
- const m = {}, a = [];
38
- for (const l of g)
39
- if (l.indent != null) {
40
- k(l) || (a.length = 0);
41
- const p = `${l.id}:${l.indent}`, o = Math.min(l.indent - 1, a.length);
42
- if (o < a.length && ((r = a[o]) === null || r === void 0 ? void 0 : r.id) !== l.id && (a.length = o), o < a.length - 1)
43
- a.length = o + 1;
44
- else {
45
- const v = j(l, n);
46
- if (o > a.length - 1 || ((t = a[o]) === null || t === void 0 ? void 0 : t.listElement.tagName.toLowerCase()) != v.type) {
47
- o == 0 && v.type == "ol" && l.id !== void 0 && m[p] && (v.startIndex = (i = m[p]) !== null && i !== void 0 ? i : null);
48
- const L = $(v, !1);
49
- if (a.length == 0) {
50
- const f = l.element.parentNode;
51
- Array.from(f.children).indexOf(l.element) + 1 === f.children.length ? f.appendChild(L) : f.insertBefore(L, l.element);
52
- } else {
53
- const f = (c = a[o - 1]) === null || c === void 0 ? void 0 : c.listItemElements;
54
- f && ((u = f[f.length - 1]) === null || u === void 0 || u.appendChild(L));
55
- }
56
- a[o] = Object.assign(Object.assign({}, l), { listElement: L, listItemElements: [] }), o == 0 && l.id !== void 0 && (m[p] = v.startIndex || 1);
57
- }
58
- }
59
- const S = l.element.tagName.toLowerCase() == "li" ? l.element : document.createElement("li");
60
- (h = a[o]) === null || h === void 0 || h.listElement.appendChild(S), (y = a[o]) === null || y === void 0 || y.listItemElements.push(S), o == 0 && l.id !== void 0 && m[p]++, l.element != S && S.appendChild(l.element), D(l.element);
61
- }
62
- }
63
- removeMSAttributes(s) {
64
- const n = s.querySelectorAll("*"), r = [];
65
- for (const t of n) {
66
- for (const i of t.classList)
67
- /\bmso/gi.exec(i) && t.classList.remove(i);
68
- t instanceof HTMLElement && O(t), (t.tagName === "W:SDT" || t.tagName === "W:SDTPR" && E(t) || t.tagName === "O:P" && E(t)) && r.push(t);
69
- }
70
- for (const t of r)
71
- t.parentNode.removeChild(t);
72
- }
73
- }
74
- d.MSWordNormalizer = w;
75
- function M(e) {
76
- const s = new DOMParser();
77
- e = e.replace(/<!--\[if gte vml 1]>/g, ""), e = e.replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi, "");
78
- const n = A(z(e)), r = s.parseFromString(n, "text/html");
79
- N(r);
80
- const t = r.body.innerHTML, i = I(r);
81
- return {
82
- bodyString: t,
83
- stylesString: i
84
- };
85
- }
86
- d.parseHtml = M;
87
- function I(e) {
88
- const s = [], n = [], r = Array.from(e.getElementsByTagName("style"));
89
- for (const t of r)
90
- t.sheet && t.sheet.cssRules && t.sheet.cssRules.length && (s.push(t.sheet), n.push(t.innerHTML));
91
- return n.join(" ");
92
- }
93
- function A(e) {
94
- return x(x(e)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g, "$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g, "").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g, "$1 $2").replace(/ <\//g, " </").replace(/ <o:p><\/o:p>/g, " <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g, "").replace(/>([^\S\r\n]*[\r\n]\s*)</g, "><");
95
- }
96
- d.normalizeSpacing = A;
97
- function x(e) {
98
- return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g, (s, n) => n.length === 1 ? " " : Array(n.length + 1).join("  ").substring(0, n.length));
99
- }
100
- function N(e) {
101
- e.querySelectorAll("span[style*=spacerun]").forEach((s) => {
102
- const n = s, r = n.innerText.length || 0;
103
- n.innerText = Array(r + 1).join("  ").substring(0, r);
104
- });
105
- }
106
- d.normalizeSpacerunSpans = N;
107
- function z(e) {
108
- const s = "</body>", n = "</html>", r = e.indexOf(s);
109
- if (r < 0)
110
- return e;
111
- const t = e.indexOf(n, r + s.length);
112
- return e.substring(0, r + s.length) + (t >= 0 ? e.substring(t) : "");
113
- }
114
- function _(e) {
115
- const s = {};
116
- return e && e.split(";").map((r) => r.trim()).forEach((r) => {
117
- const [t, i] = r.split(":").map((c) => c.trim());
118
- t && i && (s[t] = i);
119
- }), s;
120
- }
121
- function E(e) {
122
- return !e.textContent && !e.innerHTML.trim();
123
- }
124
- function O(e) {
125
- const t = (e.getAttribute("style") || "").split(";").map((i) => i.trim()).filter((i) => {
126
- var c;
127
- const [u] = i.split(":");
128
- return !/\bmso/gi.exec((c = u == null ? void 0 : u.toLowerCase()) !== null && c !== void 0 ? c : "");
129
- }).join(";");
130
- e.setAttribute("style", t);
131
- }
132
- function P(e) {
133
- var s;
134
- const n = e["mso-list"];
135
- if (n === void 0)
136
- return {};
137
- const r = n.match(/(^|\s{1,100})l(\d+)/i), t = n.match(/\s{0,100}lfo(\d+)/i), i = n.match(/\s{0,100}level(\d+)/i);
138
- return r && t && i ? {
139
- id: r[2],
140
- order: t[1],
141
- indent: parseInt((s = i[1]) !== null && s !== void 0 ? s : "")
142
- } : {
143
- indent: 1
144
- };
145
- }
146
- function j(e, s) {
147
- const n = new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`, "gi"), r = /mso-level-number-format:([^;]{0,100});/gi, t = /mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi, i = new RegExp(`@list\\s+l${e.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`, "gi"), c = new RegExp(`@list l${e.id}:level\\d\\s*{[^{]*mso-level-number-format:`, "gi"), u = i.exec(s), h = c.exec(s), y = u && !h, g = n.exec(s);
148
- let m = "decimal", a = "ol", l = null;
149
- if (g && g[1]) {
150
- const p = r.exec(g[1]);
151
- if (p && p[1] && (m = p[1].trim(), a = m !== "bullet" && m !== "image" ? "ol" : "ul"), m === "bullet") {
152
- const o = R(e.element);
153
- o && (m = o);
154
- } else {
155
- const o = t.exec(g[1]);
156
- o && o[1] && (l = parseInt(o[1]));
157
- }
158
- y && (a = "ol");
159
- }
160
- return {
161
- type: a,
162
- startIndex: l,
163
- style: W(m),
164
- isLegalStyleList: y
165
- };
166
- }
167
- function R(e) {
168
- if (e.tagName.toLowerCase() == "li" && e.parentElement.tagName.toLowerCase() == "ul" && e.parentElement.hasAttribute("type"))
169
- return e.parentElement.getAttribute("type");
170
- const s = H(e);
171
- if (!s)
172
- return null;
173
- const n = s.textContent;
174
- return n === "o" ? "circle" : (n ?? "").charCodeAt(0) === 183 ? "disc" : n === "§" ? "square" : null;
175
- }
176
- function H(e) {
177
- var s;
178
- if (((s = Array.from(e.children)[0]) === null || s === void 0 ? void 0 : s.tagName.toLowerCase()) === "#text")
179
- return null;
180
- for (const n of Array.from(e.children))
181
- if (["element", "span"].includes(n.tagName.toLowerCase()))
182
- return n;
183
- return null;
184
- }
185
- function W(e) {
186
- if (e.startsWith("arabic-leading-zero"))
187
- return "decimal-leading-zero";
188
- switch (e) {
189
- case "alpha-upper":
190
- return "upper-alpha";
191
- case "alpha-lower":
192
- return "lower-alpha";
193
- case "roman-upper":
194
- return "upper-roman";
195
- case "roman-lower":
196
- return "lower-roman";
197
- case "circle":
198
- case "disc":
199
- case "square":
200
- return e;
201
- default:
202
- return null;
203
- }
204
- }
205
- function $(e, s) {
206
- const n = document.createElement(e.type);
207
- return e.style && n.style.setProperty("list-style-type", e.style), e.startIndex && e.startIndex > 1 && n.setAttribute("start", e.startIndex.toString()), e.isLegalStyleList && s && n.classList.add("legal-list"), n;
208
- }
209
- function D(e) {
210
- e.querySelectorAll("span").forEach((n) => {
211
- var r;
212
- const t = n.getAttribute("style");
213
- t && t.includes("mso-list:Ignore") && ((r = n.parentNode) === null || r === void 0 || r.removeChild(n));
214
- });
215
- }
216
- function k(e) {
217
- const s = e.element.previousSibling;
218
- return b(s || e.element.parentElement);
219
- }
220
- const b = (e) => ["ul", "ol"].includes(e.tagName.toLowerCase());
221
- (function(e) {
222
- Object.defineProperty(e, "__esModule", { value: !0 }), e.MSWordNormalizer = void 0;
223
- const s = d;
224
- Object.defineProperty(e, "MSWordNormalizer", { enumerable: !0, get: function() {
225
- return s.MSWordNormalizer;
226
- } });
227
- })(C);
228
- export {
229
- C as d
230
- };
231
- //# sourceMappingURL=index-DPQ9bZx5.js.map
@@ -1,52 +0,0 @@
1
- import * as i from "react";
2
- import { r as R } from "./index-DsprzSCj.js";
3
- var u, n = R;
4
- if (process.env.NODE_ENV === "production")
5
- u = n.createRoot, n.hydrateRoot;
6
- else {
7
- var a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
8
- u = function(e, r) {
9
- a.usingClientEntryPoint = !0;
10
- try {
11
- return n.createRoot(e, r);
12
- } finally {
13
- a.usingClientEntryPoint = !1;
14
- }
15
- };
16
- }
17
- var s = /* @__PURE__ */ new Map();
18
- function m() {
19
- return globalThis.IS_REACT_ACT_ENVIRONMENT;
20
- }
21
- var c = ({ callback: e, children: r }) => {
22
- let t = i.useRef();
23
- return i.useLayoutEffect(() => {
24
- t.current !== e && (t.current = e, e());
25
- }, [e]), r;
26
- };
27
- typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
28
- let e = null, r = null;
29
- return { promise: new Promise((t, o) => {
30
- e = t, r = o;
31
- }), resolve: e, reject: r };
32
- });
33
- var f = async (e, r, t) => {
34
- let o = await _(r, t);
35
- if (m()) {
36
- o.render(e);
37
- return;
38
- }
39
- let { promise: l, resolve: E } = Promise.withResolvers();
40
- return o.render(i.createElement(c, { callback: E }, e)), l;
41
- }, p = (e, r) => {
42
- let t = s.get(e);
43
- t && (t.unmount(), s.delete(e));
44
- }, _ = async (e, r) => {
45
- let t = s.get(e);
46
- return t || (t = u(e, r), s.set(e, t)), t;
47
- };
48
- export {
49
- f as renderElement,
50
- p as unmountElement
51
- };
52
- //# sourceMappingURL=react-18-C0Aiha-e.js.map