@uva-glass/component-library 1.62.6 → 1.62.8

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 (51) hide show
  1. package/dist/{Lexical.prod-eo-UKDld.js → Lexical.prod-B6kL_nwF.js} +159 -159
  2. package/dist/Lexical.prod-B6kL_nwF.js.map +1 -0
  3. package/dist/{LexicalUtils.prod-DzksRdFe.js → LexicalUtils.prod-BBoyOK4A.js} +22 -22
  4. package/dist/{LexicalUtils.prod-DzksRdFe.js.map → LexicalUtils.prod-BBoyOK4A.js.map} +1 -1
  5. package/dist/{ListPlugin-B-2w9EIN.js → ListPlugin-CpLcVKRP.js} +18 -18
  6. package/dist/{ListPlugin-B-2w9EIN.js.map → ListPlugin-CpLcVKRP.js.map} +1 -1
  7. package/dist/RteEditor.module-CHbWzGpE.js +28 -0
  8. package/dist/RteEditor.module-CHbWzGpE.js.map +1 -0
  9. package/dist/{TablePlugin-C4BuRRYL.js → TablePlugin-B-yAWpsC.js} +40 -40
  10. package/dist/{TablePlugin-C4BuRRYL.js.map → TablePlugin-B-yAWpsC.js.map} +1 -1
  11. package/dist/assets/FormInput.css +1 -1
  12. package/dist/assets/PeriodSelector.css +1 -1
  13. package/dist/assets/RteEditor.css +1 -1
  14. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  15. package/dist/components/FormInput/FormInput.js +27 -24
  16. package/dist/components/FormInput/FormInput.js.map +1 -1
  17. package/dist/components/InputField/InputField.stories.js +1 -1
  18. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  19. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  20. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  21. package/dist/components/MultiSelect/index.js +1 -1
  22. package/dist/components/PeriodSelector/PeriodSelector.js +32 -33
  23. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  24. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  25. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  26. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +8 -8
  27. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -3
  28. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +2 -2
  29. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +33 -33
  30. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  31. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  32. package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
  33. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  34. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  35. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +1 -1
  36. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  37. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +14 -14
  38. package/dist/components/RteEditor/Plugins/index.js +2 -2
  39. package/dist/components/RteEditor/RteEditor.js +75 -75
  40. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
  41. package/dist/components/index.js +1 -1
  42. package/dist/{helpers-BD3Y_bqE.js → helpers-C7Yo7VY3.js} +34 -34
  43. package/dist/{helpers-BD3Y_bqE.js.map → helpers-C7Yo7VY3.js.map} +1 -1
  44. package/dist/{helpers-DONVwywj.js → helpers-pUTvcL4e.js} +83 -83
  45. package/dist/helpers-pUTvcL4e.js.map +1 -0
  46. package/dist/index.js +1 -1
  47. package/package.json +6 -6
  48. package/dist/Lexical.prod-eo-UKDld.js.map +0 -1
  49. package/dist/RteEditor.module-XCAFrP3U.js +0 -28
  50. package/dist/RteEditor.module-XCAFrP3U.js.map +0 -1
  51. package/dist/helpers-DONVwywj.js.map +0 -1
@@ -1,39 +1,39 @@
1
1
  import { jsxs as m, jsx as e, Fragment as X } from "react/jsx-runtime";
2
2
  import { u as Z } from "./LexicalComposerContext.prod-Dyvim1tK.js";
3
3
  import { c as B } from "./clsx-OuTLNxxd.js";
4
- import { g as ee, o as te, d as oe, a as re, i as le, b as ne, c as ae, e as ie } from "./helpers-DONVwywj.js";
5
- import { _ as se, L as ce, A as U, x as j, w as ue, E as me } from "./Lexical.prod-eo-UKDld.js";
6
- import { forwardRef as H, useState as R, useRef as y, useId as D, useImperativeHandle as V, useEffect as q } from "react";
4
+ import { g as ee, o as te, d as oe, a as re, i as le, b as ne, c as ae, e as ie } from "./helpers-pUTvcL4e.js";
5
+ import { _ as se, O as ce, M as U, v as j, w as ue, E as me } from "./Lexical.prod-B6kL_nwF.js";
6
+ import { forwardRef as H, useState as R, useRef as y, useId as O, useImperativeHandle as V, useEffect as L } from "react";
7
7
  import { Button as I } from "./components/Buttons/Button.js";
8
8
  import "./components/Buttons/LinkButton.js";
9
9
  import "@react-aria/button";
10
- import { Label as L } from "./components/Label/Label.js";
10
+ import { Label as S } from "./components/Label/Label.js";
11
11
  import "@react-aria/dialog";
12
12
  import "@react-aria/focus";
13
13
  import "@react-aria/overlays";
14
14
  import "./components/OverlayCloseButton/OverlayCloseButton.js";
15
- import { FormField as M } from "./components/FormField/FormField.js";
15
+ import { FormField as D } from "./components/FormField/FormField.js";
16
16
  import "./components/GridRow/GridRow.js";
17
17
  import "./components/IconButton/IconButton.js";
18
18
  import "./components/Input/Input.js";
19
- import { InputField as O } from "./components/InputField/InputField.js";
19
+ import { InputField as $ } from "./components/InputField/InputField.js";
20
20
  import "react-router-dom";
21
21
  import { s as E, M as de } from "./MultiSelectItem-D9PxdX43.js";
22
22
  import "./components/RteEditor/Providers/LanguageProvider.js";
23
- import { e as fe, v as _e } from "./helpers-BD3Y_bqE.js";
23
+ import { e as fe, v as _e } from "./helpers-C7Yo7VY3.js";
24
24
  import { Icon as W } from "./components/Icon/Icon.js";
25
25
  import { FeedbackBox as z } from "./components/FeedbackBox/FeedbackBox.js";
26
26
  import { useTranslation as K } from "./components/RteEditor/hooks/useTranslation.js";
27
27
  import "./components/RteEditor/hooks/components/Flyout.js";
28
28
  import { useFlyout as pe } from "./components/RteEditor/hooks/useFlyout.js";
29
- import { s as P } from "./RteEditor.module-XCAFrP3U.js";
29
+ import { s as P } from "./RteEditor.module-CHbWzGpE.js";
30
30
  import "./components/SelectListbox/SelectListbox.js";
31
31
  import "./components/SelectListbox/SelectProvider.js";
32
32
  import "./components/Sortable/components/SortableItem.js";
33
33
  import "./SortableProvider-BUsvniX7.js";
34
34
  import './assets/TablePlugin.css';function be({ label: p, clearTrigger: f, onClear: s }) {
35
35
  return /* @__PURE__ */ m("header", { className: E["multi-select__header"], children: [
36
- /* @__PURE__ */ e(L, { htmlFor: "multi-select-list", children: p }),
36
+ /* @__PURE__ */ e(S, { htmlFor: "multi-select-list", children: p }),
37
37
  f && /* @__PURE__ */ e(I, { variant: "blank", onClick: s, children: f })
38
38
  ] });
39
39
  }
@@ -74,11 +74,11 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
74
74
  onRemoveHandler: s,
75
75
  isLink: t = { active: !1, url: "", linktext: "" }
76
76
  }, b) => {
77
- const l = K(), [n, c] = R(t.url || ""), [d, v] = R(t.linktext || ""), [h, _] = R(null), [F, C] = R(null), k = y(null), i = `link_${D()}`, w = `text_${D()}`, x = () => {
77
+ const l = K(), [n, c] = R(t.url || ""), [d, v] = R(t.linktext || ""), [h, _] = R(null), [F, C] = R(null), k = y(null), i = `link_${O()}`, w = `text_${O()}`, x = () => {
78
78
  window.open(fe(n), "_blank");
79
- }, $ = (a) => {
79
+ }, A = (a) => {
80
80
  c(a.target.value);
81
- }, S = (a) => {
81
+ }, q = (a) => {
82
82
  v(a.target.value);
83
83
  }, r = (a) => _e(a) === !1 || a.trim() === "" ? (_(l.errortext.urlNotValid), !1) : (_(null), !0), o = (a) => a.trim() === "" ? (C(l.errortext.linkTextNotValid), !1) : (C(null), !0), N = () => {
84
84
  if (t.url !== "" && n === "" && typeof s == "function") {
@@ -100,16 +100,16 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
100
100
  focusFirstField: J,
101
101
  setDefaults: G
102
102
  })), /* @__PURE__ */ m("div", { className: g.linkform, children: [
103
- /* @__PURE__ */ m(M, { className: g["linkform__input-field"], children: [
104
- /* @__PURE__ */ e(L, { htmlFor: i, children: l.links.linkLabel }),
103
+ /* @__PURE__ */ m(D, { className: g["linkform__input-field"], children: [
104
+ /* @__PURE__ */ e(S, { htmlFor: i, children: l.links.linkLabel }),
105
105
  /* @__PURE__ */ m("div", { className: g["linkform__input-url-wrapper"], children: [
106
106
  /* @__PURE__ */ e(
107
- O,
107
+ $,
108
108
  {
109
109
  id: i,
110
110
  placeholder: l.links.linkPlaceholder,
111
111
  value: n,
112
- onChange: (a) => $(a),
112
+ onChange: (a) => A(a),
113
113
  onFocus: () => _(null),
114
114
  ref: k,
115
115
  "aria-label": l.aria.labels.linkField
@@ -119,14 +119,14 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
119
119
  ] }),
120
120
  h && /* @__PURE__ */ e(z, { level: "error", feedback: h })
121
121
  ] }),
122
- /* @__PURE__ */ m(M, { className: g["linkform__input-field"], children: [
123
- /* @__PURE__ */ e(L, { htmlFor: w, children: l.links.linkText }),
122
+ /* @__PURE__ */ m(D, { className: g["linkform__input-field"], children: [
123
+ /* @__PURE__ */ e(S, { htmlFor: w, children: l.links.linkText }),
124
124
  /* @__PURE__ */ e(
125
- O,
125
+ $,
126
126
  {
127
127
  id: w,
128
128
  value: d,
129
- onChange: (a) => S(a),
129
+ onChange: (a) => q(a),
130
130
  onFocus: () => C(null),
131
131
  "aria-label": l.aria.labels.linkTextfield
132
132
  }
@@ -139,12 +139,12 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
139
139
  ] })
140
140
  ] });
141
141
  }
142
- ), ve = "_tableform_t5fpq_1", Fe = "_tableform__footer_t5fpq_12", A = {
142
+ ), ve = "_tableform_t5fpq_1", Fe = "_tableform__footer_t5fpq_12", M = {
143
143
  tableform: ve,
144
144
  "tableform__input-field": "_tableform__input-field_t5fpq_5",
145
145
  tableform__footer: Fe
146
146
  }, Ce = H(({ onCloseHandler: p, onSaveHandler: f }, s) => {
147
- const t = K(), [b, l] = R(), [n, c] = R(), d = y(null), v = `row_${D()}`, h = `column_${D()}`, _ = (i, w) => {
147
+ const t = K(), [b, l] = R(), [n, c] = R(), d = y(null), v = `row_${O()}`, h = `column_${O()}`, _ = (i, w) => {
148
148
  const x = i.target.value;
149
149
  w === "row" ? l(parseInt(x)) : c(parseInt(x));
150
150
  }, F = () => {
@@ -160,11 +160,11 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
160
160
  var i;
161
161
  return (i = d.current) == null ? void 0 : i.focus();
162
162
  }
163
- })), /* @__PURE__ */ m("div", { className: A.tableform, children: [
164
- /* @__PURE__ */ m(M, { className: A["tableform__input-field"], children: [
165
- /* @__PURE__ */ e(L, { htmlFor: v, children: t.table.nrofRows }),
163
+ })), /* @__PURE__ */ m("div", { className: M.tableform, children: [
164
+ /* @__PURE__ */ m(D, { className: M["tableform__input-field"], children: [
165
+ /* @__PURE__ */ e(S, { htmlFor: v, children: t.table.nrofRows }),
166
166
  /* @__PURE__ */ e(
167
- O,
167
+ $,
168
168
  {
169
169
  id: v,
170
170
  placeholder: t.table.nrofRowsPlaceholder,
@@ -175,10 +175,10 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
175
175
  }
176
176
  )
177
177
  ] }),
178
- /* @__PURE__ */ m(M, { className: A["tableform__input-field"], children: [
179
- /* @__PURE__ */ e(L, { htmlFor: h, children: t.table.nrofColumns }),
178
+ /* @__PURE__ */ m(D, { className: M["tableform__input-field"], children: [
179
+ /* @__PURE__ */ e(S, { htmlFor: h, children: t.table.nrofColumns }),
180
180
  /* @__PURE__ */ e(
181
- O,
181
+ $,
182
182
  {
183
183
  id: h,
184
184
  placeholder: t.table.nrofColumnsPlaceholder,
@@ -188,7 +188,7 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
188
188
  }
189
189
  )
190
190
  ] }),
191
- /* @__PURE__ */ m("div", { className: A.tableform__footer, children: [
191
+ /* @__PURE__ */ m("div", { className: M.tableform__footer, children: [
192
192
  /* @__PURE__ */ e(I, { variant: "secondary", onClick: C, "aria-label": t.common.cancel, children: t.common.cancel }),
193
193
  /* @__PURE__ */ e(
194
194
  I,
@@ -213,7 +213,7 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
213
213
  F.current && me(F.current);
214
214
  });
215
215
  }, i = () => {
216
- h.current || (C(), l(S));
216
+ h.current || (C(), l(q));
217
217
  }, w = () => {
218
218
  n(), k();
219
219
  }, x = (r, o) => {
@@ -223,7 +223,7 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
223
223
  const T = u.getFirstDescendant();
224
224
  T && T.select();
225
225
  }), w();
226
- }, $ = (r) => {
226
+ }, A = (r) => {
227
227
  t.update(() => {
228
228
  const o = U();
229
229
  if (j(o)) {
@@ -250,7 +250,7 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
250
250
  }
251
251
  }
252
252
  });
253
- }, S = {
253
+ }, q = {
254
254
  children: /* @__PURE__ */ e(
255
255
  Ce,
256
256
  {
@@ -260,21 +260,21 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
260
260
  }
261
261
  )
262
262
  };
263
- return q(() => {
263
+ return L(() => {
264
264
  var r, o;
265
265
  c ? (h.current = !0, (o = d.current) == null || o.focusFirstField()) : ((r = d.current) == null || r.clearForm(), setTimeout(() => h.current = !1, we));
266
- }, [d, c]), q(() => {
266
+ }, [d, c]), L(() => {
267
267
  const r = t.registerCommand(
268
268
  se,
269
- (o) => o.ctrlKey && o.shiftKey && o.code === "Digit9" ? (o.preventDefault(), l(S), !0) : !1,
269
+ (o) => o.ctrlKey && o.shiftKey && o.code === "Digit9" ? (o.preventDefault(), l(q), !0) : !1,
270
270
  ce
271
271
  );
272
272
  return () => {
273
273
  r();
274
274
  };
275
- }, [t]), q(() => {
275
+ }, [t]), L(() => {
276
276
  _.current = c;
277
- }, [c]), q(() => {
277
+ }, [c]), L(() => {
278
278
  const r = (o) => {
279
279
  o.key === "Escape" && _.current && (o.preventDefault(), o.stopPropagation(), w());
280
280
  };
@@ -282,7 +282,7 @@ const he = "_linkform_x5q7m_1", ke = "_linkform__footer_x5q7m_12", g = {
282
282
  document.removeEventListener("keydown", r);
283
283
  };
284
284
  }, []), V(f, () => ({
285
- mutateTable: $
285
+ mutateTable: A
286
286
  })), /* @__PURE__ */ e("div", { className: P["editor__toolbar-button-group"], children: /* @__PURE__ */ m("div", { className: P["editor__toolbar-button-flyoutwrapper"], children: [
287
287
  /* @__PURE__ */ e(
288
288
  "button",
@@ -307,4 +307,4 @@ export {
307
307
  be as a,
308
308
  Ce as b
309
309
  };
310
- //# sourceMappingURL=TablePlugin-C4BuRRYL.js.map
310
+ //# sourceMappingURL=TablePlugin-B-yAWpsC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TablePlugin-C4BuRRYL.js","sources":["../src/components/MultiSelect/components/MultiSelectHeader.tsx","../src/components/MultiSelect/MultiSelect.tsx","../src/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/AddTableFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/TablePlugin.tsx"],"sourcesContent":["import styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Label } from 'components/Label';\nimport { Button } from 'components';\n\nexport interface MultiSelectHeaderProps {\n label: string;\n clearTrigger?: string;\n onClear?: () => void;\n}\n\nexport function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps) {\n return (\n <header className={styles['multi-select__header']}>\n <Label htmlFor=\"multi-select-list\">{label}</Label>\n {clearTrigger && (\n <Button variant={'blank'} onClick={onClear}>\n {clearTrigger}\n </Button>\n )}\n </header>\n );\n}\n","import clsx from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';\nimport { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';\n\nexport interface MultiSelectProps {\n /** `true` if the container should scroll on overflow; otherwise, `false` to resize the container to its contents. The default is `true`. */\n scrollable?: boolean;\n /** `true` to disable the border around the container; otherwise, `false`. The default is `false`. */\n noBorder?: boolean;\n /** The header contents. */\n header?: ReactNode;\n}\n\n/** Represents a component to list a number of checkboxes. */\nexport const MultiSelect = ({ scrollable = true, noBorder, header, children }: PropsWithChildren<MultiSelectProps>) => (\n <>\n {header}\n <div\n className={clsx(styles['multi-select'], {\n [styles['multi-select--no-border']]: noBorder,\n })}\n >\n <ul\n className={clsx(styles['multi-select__list'], {\n [styles['multi-select__list--scrollable']]: scrollable,\n })}\n id=\"multi-select-list\"\n >\n {children}\n </ul>\n </div>\n </>\n);\n\nMultiSelect.MultiSelectHeader = MultiSelectHeader;\nMultiSelect.MultiSelectItem = MultiSelectItem;\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\nimport type { LinkType } from 'components/RteEditor/Plugins/LinkPlugin';\n\nimport { ensureHttps, validateUrlWithProtocol } from './helpers';\nimport styles from './AddLinkForm.module.css';\n\nimport { Button, FeedbackBox, FormField, Icon, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddLinkFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (url: string, linktext: string) => void;\n onRemoveHandler?: () => void;\n isLink: LinkType;\n}\n\nexport interface addLinkFormMethods {\n clearForm: () => void;\n focusFirstField: () => void;\n setDefaults: (url: string, linktext: string) => void;\n}\n\nexport const AddLinkForm = forwardRef(\n (\n {\n onCloseHandler,\n onSaveHandler,\n onRemoveHandler,\n isLink = { active: false, url: '', linktext: '' },\n }: AddLinkFormProps,\n ref\n ): JSX.Element => {\n const t = useTranslation();\n const [url, setUrl] = useState<string>(isLink.url || '');\n const [linkText, setLinkText] = useState<string>(isLink.linktext || '');\n const [urlError, setUrlError] = useState<string | null>(null);\n const [linkTextError, setLinkTextError] = useState<string | null>(null);\n const firstField = useRef<HTMLInputElement>(null);\n const linkId = `link_${useId()}`;\n const textId = `text_${useId()}`;\n\n const handleOpenUrl = () => {\n window.open(ensureHttps(url), '_blank');\n };\n\n const handleUrl = (event: ChangeEvent<HTMLInputElement>) => {\n setUrl(event.target.value);\n };\n\n const handleLinkText = (event: ChangeEvent<HTMLInputElement>) => {\n setLinkText(event.target.value);\n };\n\n const validateUrl = (url: string): boolean => {\n if (validateUrlWithProtocol(url) === false || url.trim() === '') {\n setUrlError(t.errortext.urlNotValid);\n return false;\n }\n setUrlError(null);\n return true;\n };\n\n const validateLinkText = (linkText: string): boolean => {\n if (linkText.trim() === '') {\n setLinkTextError(t.errortext.linkTextNotValid);\n return false;\n }\n setLinkTextError(null);\n return true;\n };\n\n const handleSave = () => {\n if (isLink.url !== '' && url === '' && typeof onRemoveHandler === 'function') {\n onRemoveHandler();\n return;\n }\n\n if (!validateUrl(url) || !validateLinkText(linkText)) {\n return;\n }\n\n onSaveHandler(url, linkText);\n resetForm();\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setUrl('');\n setLinkText('');\n setUrlError(null);\n setLinkTextError(null);\n };\n\n const setDefaults = (url: string, linktext: string) => {\n setUrl(url);\n setLinkText(linktext);\n };\n\n const focusFirstField = () => {\n if (firstField.current) {\n firstField.current.focus();\n }\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField,\n setDefaults,\n }));\n\n return (\n <div className={styles['linkform']}>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={linkId}>{t.links.linkLabel}</Label>\n <div className={styles['linkform__input-url-wrapper']}>\n <InputField\n id={linkId}\n placeholder={t.links.linkPlaceholder}\n value={url}\n onChange={(event) => handleUrl(event)}\n onFocus={() => setUrlError(null)}\n ref={firstField}\n aria-label={t.aria.labels.linkField}\n />\n {url && (\n <button type=\"button\" onClick={handleOpenUrl} className={styles['linkform__open-url-button']}>\n <Icon name=\"ArrowTopRightOnSquare\" size={20} />\n </button>\n )}\n </div>\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={textId}>{t.links.linkText}</Label>\n <InputField\n id={textId}\n value={linkText}\n onChange={(event) => handleLinkText(event)}\n onFocus={() => setLinkTextError(null)}\n aria-label={t.aria.labels.linkTextfield}\n />\n {linkTextError && <FeedbackBox level=\"error\" feedback={linkTextError} />}\n </FormField>\n <div className={styles['linkform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel} type=\"button\">\n {t.common.cancel}\n </Button>\n <Button variant={'primary'} onClick={handleSave} aria-label={t.aria.labels.linkOkButton} type=\"button\">\n {t.links.addLink}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\n\nimport styles from './AddTableFrom.module.css';\n\nimport { Button, FormField, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddTableFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (nrfOfRows: number, nrOfColumns: number) => void;\n}\n\nexport interface addTableForm {\n clearForm: () => void;\n focusFirstField: () => void;\n}\n\nexport const AddTableForm = forwardRef(({ onCloseHandler, onSaveHandler }: AddTableFormProps, ref) => {\n const t = useTranslation();\n const [rowCount, setRowCount] = useState<number>();\n const [columnCount, setColumnCount] = useState<number>();\n const firstField = useRef<HTMLInputElement>(null);\n const rowId = `row_${useId()}`;\n const columnId = `column_${useId()}`;\n\n const handleDimentionChange = (event: ChangeEvent<HTMLInputElement>, type: string) => {\n const value = event.target.value;\n type === 'row' ? setRowCount(parseInt(value)) : setColumnCount(parseInt(value));\n };\n\n const handleSave = () => {\n if (rowCount !== undefined && columnCount !== undefined) {\n onSaveHandler(rowCount, columnCount);\n resetForm();\n }\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setRowCount(undefined);\n setColumnCount(undefined);\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField: () => firstField.current?.focus(),\n }));\n\n return (\n <div className={styles['tableform']}>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={rowId}>{t.table.nrofRows}</Label>\n <InputField\n id={rowId}\n placeholder={t.table.nrofRowsPlaceholder}\n value={rowCount ? rowCount : ''}\n onChange={(event) => handleDimentionChange(event, 'row')}\n aria-label={t.aria.labels.tableRowfield}\n ref={firstField}\n />\n </FormField>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={columnId}>{t.table.nrofColumns}</Label>\n <InputField\n id={columnId}\n placeholder={t.table.nrofColumnsPlaceholder}\n value={columnCount ? columnCount : ''}\n onChange={(event) => handleDimentionChange(event, 'column')}\n aria-label={t.aria.labels.tableColumnfield}\n />\n </FormField>\n <div className={styles['tableform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel}>\n {t.common.cancel}\n </Button>\n <Button\n variant={'primary'}\n onClick={handleSave}\n disabled={!rowCount || !columnCount}\n aria-label={t.aria.labels.tableOkButton}\n >\n {t.common.add}\n </Button>\n </div>\n </div>\n );\n});\n","import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { $getTableCellNodeFromLexicalNode, $isTableCellNode } from '@lexical/table';\nimport {\n $getSelection,\n $isRangeSelection,\n $getRoot,\n KEY_DOWN_COMMAND,\n COMMAND_PRIORITY_EDITOR,\n $setSelection,\n} from 'lexical';\nimport { useRef, useEffect, useImperativeHandle, forwardRef } from 'react';\n\nimport type { BaseSelection, TextNode } from 'lexical';\nimport type { addTableForm } from './AddTableFrom';\nimport type { Actions } from './TableCellContextMenu';\n\nimport { AddTableForm } from './AddTableFrom';\nimport { createTable, deleteColumn, deleteRow, deleteTable, insertColumn, insertRow } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks/useFlyout';\nimport { Icon } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\nconst PREVENT_OPEN_DELAY = 200;\n\ninterface TablePluginProps {\n isActive: boolean;\n}\n\nexport interface TableMutation {\n mutateTable: (type: Actions) => void;\n}\n\nexport const TablePlugin = forwardRef(({ isActive }: TablePluginProps, ref): JSX.Element => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, hideFlyout, isVisible } = useFlyout();\n const addTableForm = useRef<addTableForm>();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const preventOpen = useRef(false);\n const isVisibleRef = useRef(isVisible);\n const storedSelection = useRef<BaseSelection | null>(null);\n\n const storeCursorPosition = () => {\n editor.update(() => {\n const selection = $getSelection();\n storedSelection.current = selection;\n });\n };\n\n const rePositionCursor = () => {\n editor.update(() => {\n if (storedSelection.current) {\n $setSelection(storedSelection.current);\n }\n });\n };\n\n const openFlyout = () => {\n if (!preventOpen.current) {\n storeCursorPosition();\n showFlyout(flyoutOptions);\n }\n };\n\n const closeFlyout = () => {\n hideFlyout();\n rePositionCursor();\n };\n\n const insertTable = (nrOfRows: number, nrOfColumns: number) => {\n editor.update(() => {\n const selection = $getSelection();\n const tableNode = createTable(nrOfRows, nrOfColumns);\n if ($isRangeSelection(selection)) {\n selection.insertNodes([tableNode]);\n } else {\n $getRoot().append(tableNode);\n }\n const firstDescendant = tableNode.getFirstDescendant();\n if (firstDescendant) {\n (firstDescendant as TextNode).select();\n }\n });\n\n closeFlyout();\n };\n\n const mutateTable = (action: Actions) => {\n editor.update(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode();\n const currentNode = $getTableCellNodeFromLexicalNode(anchorNode);\n\n if ($isTableCellNode(currentNode)) {\n switch (action) {\n case 'insertRowAbove':\n case 'insertRowBelow':\n insertRow(currentNode, action);\n break;\n case 'deleteRow':\n deleteRow(currentNode);\n break;\n case 'insertColumnLeft':\n case 'insertColumnRight':\n insertColumn(currentNode, action);\n break;\n case 'deleteColumn':\n deleteColumn(currentNode);\n break;\n case 'deleteTable':\n deleteTable(currentNode);\n break;\n }\n }\n }\n });\n };\n\n const flyoutOptions = {\n children: (\n <AddTableForm\n onCloseHandler={closeFlyout}\n onSaveHandler={(rows, columns) => insertTable(rows, columns)}\n ref={addTableForm}\n />\n ),\n };\n\n useEffect(() => {\n if (!isVisible) {\n addTableForm.current?.clearForm();\n setTimeout(() => (preventOpen.current = false), PREVENT_OPEN_DELAY);\n } else {\n preventOpen.current = true;\n addTableForm.current?.focusFirstField();\n }\n }, [addTableForm, isVisible]);\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit9') {\n event.preventDefault();\n showFlyout(flyoutOptions);\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n useEffect(() => {\n isVisibleRef.current = isVisible;\n }, [isVisible]);\n\n useEffect(() => {\n const removeKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isVisibleRef.current) {\n event.preventDefault();\n event.stopPropagation();\n closeFlyout();\n }\n };\n\n document.addEventListener('keydown', removeKeydown, { capture: true });\n\n return () => {\n document.removeEventListener('keydown', removeKeydown);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useImperativeHandle(ref, () => ({\n mutateTable,\n }));\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={openFlyout}\n title={t.table.tableTooltip}\n className={clsx(styles['editor__toolbar-button'], isActive && styles[`editor__toolbar-button--active`])}\n aria-label={t.aria.labels.table}\n aria-keyshortcuts={t.aria.keyshortcuts.table}\n ref={buttonRef}\n type=\"button\"\n >\n <Icon name=\"Table\" size={24} />\n </button>\n {flyout}\n </div>\n </div>\n );\n});\n"],"names":["MultiSelectHeader","label","clearTrigger","onClear","jsxs","styles","jsx","Label","Button","MultiSelect","scrollable","noBorder","header","children","Fragment","clsx","MultiSelectItem","AddLinkForm","forwardRef","onCloseHandler","onSaveHandler","onRemoveHandler","isLink","ref","t","useTranslation","url","setUrl","useState","linkText","setLinkText","urlError","setUrlError","linkTextError","setLinkTextError","firstField","useRef","linkId","useId","textId","handleOpenUrl","ensureHttps","handleUrl","event","handleLinkText","validateUrl","validateUrlWithProtocol","validateLinkText","handleSave","resetForm","handleClose","setDefaults","linktext","focusFirstField","useImperativeHandle","FormField","InputField","Icon","FeedbackBox","AddTableForm","rowCount","setRowCount","columnCount","setColumnCount","rowId","columnId","handleDimentionChange","type","value","_a","PREVENT_OPEN_DELAY","TablePlugin","isActive","editor","useLexicalComposerContext","flyout","showFlyout","hideFlyout","isVisible","useFlyout","addTableForm","buttonRef","preventOpen","isVisibleRef","storedSelection","storeCursorPosition","selection","$getSelection","rePositionCursor","$setSelection","openFlyout","flyoutOptions","closeFlyout","insertTable","nrOfRows","nrOfColumns","tableNode","createTable","$isRangeSelection","$getRoot","firstDescendant","mutateTable","action","anchorNode","currentNode","$getTableCellNodeFromLexicalNode","$isTableCellNode","insertRow","deleteRow","insertColumn","deleteColumn","deleteTable","rows","columns","useEffect","_b","removeKeyboardShortcut","KEY_DOWN_COMMAND","COMMAND_PRIORITY_EDITOR","removeKeydown"],"mappings":";;;;;;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CAAC;"}
1
+ {"version":3,"file":"TablePlugin-B-yAWpsC.js","sources":["../src/components/MultiSelect/components/MultiSelectHeader.tsx","../src/components/MultiSelect/MultiSelect.tsx","../src/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/AddTableFrom.tsx","../src/components/RteEditor/Plugins/TablePlugin/TablePlugin.tsx"],"sourcesContent":["import styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Label } from 'components/Label';\nimport { Button } from 'components';\n\nexport interface MultiSelectHeaderProps {\n label: string;\n clearTrigger?: string;\n onClear?: () => void;\n}\n\nexport function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps) {\n return (\n <header className={styles['multi-select__header']}>\n <Label htmlFor=\"multi-select-list\">{label}</Label>\n {clearTrigger && (\n <Button variant={'blank'} onClick={onClear}>\n {clearTrigger}\n </Button>\n )}\n </header>\n );\n}\n","import clsx from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';\nimport { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';\n\nexport interface MultiSelectProps {\n /** `true` if the container should scroll on overflow; otherwise, `false` to resize the container to its contents. The default is `true`. */\n scrollable?: boolean;\n /** `true` to disable the border around the container; otherwise, `false`. The default is `false`. */\n noBorder?: boolean;\n /** The header contents. */\n header?: ReactNode;\n}\n\n/** Represents a component to list a number of checkboxes. */\nexport const MultiSelect = ({ scrollable = true, noBorder, header, children }: PropsWithChildren<MultiSelectProps>) => (\n <>\n {header}\n <div\n className={clsx(styles['multi-select'], {\n [styles['multi-select--no-border']]: noBorder,\n })}\n >\n <ul\n className={clsx(styles['multi-select__list'], {\n [styles['multi-select__list--scrollable']]: scrollable,\n })}\n id=\"multi-select-list\"\n >\n {children}\n </ul>\n </div>\n </>\n);\n\nMultiSelect.MultiSelectHeader = MultiSelectHeader;\nMultiSelect.MultiSelectItem = MultiSelectItem;\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\nimport type { LinkType } from 'components/RteEditor/Plugins/LinkPlugin';\n\nimport { ensureHttps, validateUrlWithProtocol } from './helpers';\nimport styles from './AddLinkForm.module.css';\n\nimport { Button, FeedbackBox, FormField, Icon, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddLinkFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (url: string, linktext: string) => void;\n onRemoveHandler?: () => void;\n isLink: LinkType;\n}\n\nexport interface addLinkFormMethods {\n clearForm: () => void;\n focusFirstField: () => void;\n setDefaults: (url: string, linktext: string) => void;\n}\n\nexport const AddLinkForm = forwardRef(\n (\n {\n onCloseHandler,\n onSaveHandler,\n onRemoveHandler,\n isLink = { active: false, url: '', linktext: '' },\n }: AddLinkFormProps,\n ref\n ): JSX.Element => {\n const t = useTranslation();\n const [url, setUrl] = useState<string>(isLink.url || '');\n const [linkText, setLinkText] = useState<string>(isLink.linktext || '');\n const [urlError, setUrlError] = useState<string | null>(null);\n const [linkTextError, setLinkTextError] = useState<string | null>(null);\n const firstField = useRef<HTMLInputElement>(null);\n const linkId = `link_${useId()}`;\n const textId = `text_${useId()}`;\n\n const handleOpenUrl = () => {\n window.open(ensureHttps(url), '_blank');\n };\n\n const handleUrl = (event: ChangeEvent<HTMLInputElement>) => {\n setUrl(event.target.value);\n };\n\n const handleLinkText = (event: ChangeEvent<HTMLInputElement>) => {\n setLinkText(event.target.value);\n };\n\n const validateUrl = (url: string): boolean => {\n if (validateUrlWithProtocol(url) === false || url.trim() === '') {\n setUrlError(t.errortext.urlNotValid);\n return false;\n }\n setUrlError(null);\n return true;\n };\n\n const validateLinkText = (linkText: string): boolean => {\n if (linkText.trim() === '') {\n setLinkTextError(t.errortext.linkTextNotValid);\n return false;\n }\n setLinkTextError(null);\n return true;\n };\n\n const handleSave = () => {\n if (isLink.url !== '' && url === '' && typeof onRemoveHandler === 'function') {\n onRemoveHandler();\n return;\n }\n\n if (!validateUrl(url) || !validateLinkText(linkText)) {\n return;\n }\n\n onSaveHandler(url, linkText);\n resetForm();\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setUrl('');\n setLinkText('');\n setUrlError(null);\n setLinkTextError(null);\n };\n\n const setDefaults = (url: string, linktext: string) => {\n setUrl(url);\n setLinkText(linktext);\n };\n\n const focusFirstField = () => {\n if (firstField.current) {\n firstField.current.focus();\n }\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField,\n setDefaults,\n }));\n\n return (\n <div className={styles['linkform']}>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={linkId}>{t.links.linkLabel}</Label>\n <div className={styles['linkform__input-url-wrapper']}>\n <InputField\n id={linkId}\n placeholder={t.links.linkPlaceholder}\n value={url}\n onChange={(event) => handleUrl(event)}\n onFocus={() => setUrlError(null)}\n ref={firstField}\n aria-label={t.aria.labels.linkField}\n />\n {url && (\n <button type=\"button\" onClick={handleOpenUrl} className={styles['linkform__open-url-button']}>\n <Icon name=\"ArrowTopRightOnSquare\" size={20} />\n </button>\n )}\n </div>\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField className={styles['linkform__input-field']}>\n <Label htmlFor={textId}>{t.links.linkText}</Label>\n <InputField\n id={textId}\n value={linkText}\n onChange={(event) => handleLinkText(event)}\n onFocus={() => setLinkTextError(null)}\n aria-label={t.aria.labels.linkTextfield}\n />\n {linkTextError && <FeedbackBox level=\"error\" feedback={linkTextError} />}\n </FormField>\n <div className={styles['linkform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel} type=\"button\">\n {t.common.cancel}\n </Button>\n <Button variant={'primary'} onClick={handleSave} aria-label={t.aria.labels.linkOkButton} type=\"button\">\n {t.links.addLink}\n </Button>\n </div>\n </div>\n );\n }\n);\n","import { useState, forwardRef, useImperativeHandle, useRef, useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\n\nimport styles from './AddTableFrom.module.css';\n\nimport { Button, FormField, InputField, Label } from 'components';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ninterface AddTableFormProps {\n onCloseHandler: () => void;\n onSaveHandler: (nrfOfRows: number, nrOfColumns: number) => void;\n}\n\nexport interface addTableForm {\n clearForm: () => void;\n focusFirstField: () => void;\n}\n\nexport const AddTableForm = forwardRef(({ onCloseHandler, onSaveHandler }: AddTableFormProps, ref) => {\n const t = useTranslation();\n const [rowCount, setRowCount] = useState<number>();\n const [columnCount, setColumnCount] = useState<number>();\n const firstField = useRef<HTMLInputElement>(null);\n const rowId = `row_${useId()}`;\n const columnId = `column_${useId()}`;\n\n const handleDimentionChange = (event: ChangeEvent<HTMLInputElement>, type: string) => {\n const value = event.target.value;\n type === 'row' ? setRowCount(parseInt(value)) : setColumnCount(parseInt(value));\n };\n\n const handleSave = () => {\n if (rowCount !== undefined && columnCount !== undefined) {\n onSaveHandler(rowCount, columnCount);\n resetForm();\n }\n };\n\n const handleClose = () => {\n onCloseHandler();\n resetForm();\n };\n\n const resetForm = () => {\n setRowCount(undefined);\n setColumnCount(undefined);\n };\n\n useImperativeHandle(ref, () => ({\n clearForm: resetForm,\n focusFirstField: () => firstField.current?.focus(),\n }));\n\n return (\n <div className={styles['tableform']}>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={rowId}>{t.table.nrofRows}</Label>\n <InputField\n id={rowId}\n placeholder={t.table.nrofRowsPlaceholder}\n value={rowCount ? rowCount : ''}\n onChange={(event) => handleDimentionChange(event, 'row')}\n aria-label={t.aria.labels.tableRowfield}\n ref={firstField}\n />\n </FormField>\n <FormField className={styles['tableform__input-field']}>\n <Label htmlFor={columnId}>{t.table.nrofColumns}</Label>\n <InputField\n id={columnId}\n placeholder={t.table.nrofColumnsPlaceholder}\n value={columnCount ? columnCount : ''}\n onChange={(event) => handleDimentionChange(event, 'column')}\n aria-label={t.aria.labels.tableColumnfield}\n />\n </FormField>\n <div className={styles['tableform__footer']}>\n <Button variant={'secondary'} onClick={handleClose} aria-label={t.common.cancel}>\n {t.common.cancel}\n </Button>\n <Button\n variant={'primary'}\n onClick={handleSave}\n disabled={!rowCount || !columnCount}\n aria-label={t.aria.labels.tableOkButton}\n >\n {t.common.add}\n </Button>\n </div>\n </div>\n );\n});\n","import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { $getTableCellNodeFromLexicalNode, $isTableCellNode } from '@lexical/table';\nimport {\n $getSelection,\n $isRangeSelection,\n $getRoot,\n KEY_DOWN_COMMAND,\n COMMAND_PRIORITY_EDITOR,\n $setSelection,\n} from 'lexical';\nimport { useRef, useEffect, useImperativeHandle, forwardRef } from 'react';\n\nimport type { BaseSelection, TextNode } from 'lexical';\nimport type { addTableForm } from './AddTableFrom';\nimport type { Actions } from './TableCellContextMenu';\n\nimport { AddTableForm } from './AddTableFrom';\nimport { createTable, deleteColumn, deleteRow, deleteTable, insertColumn, insertRow } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks/useFlyout';\nimport { Icon } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\nconst PREVENT_OPEN_DELAY = 200;\n\ninterface TablePluginProps {\n isActive: boolean;\n}\n\nexport interface TableMutation {\n mutateTable: (type: Actions) => void;\n}\n\nexport const TablePlugin = forwardRef(({ isActive }: TablePluginProps, ref): JSX.Element => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, hideFlyout, isVisible } = useFlyout();\n const addTableForm = useRef<addTableForm>();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const preventOpen = useRef(false);\n const isVisibleRef = useRef(isVisible);\n const storedSelection = useRef<BaseSelection | null>(null);\n\n const storeCursorPosition = () => {\n editor.update(() => {\n const selection = $getSelection();\n storedSelection.current = selection;\n });\n };\n\n const rePositionCursor = () => {\n editor.update(() => {\n if (storedSelection.current) {\n $setSelection(storedSelection.current);\n }\n });\n };\n\n const openFlyout = () => {\n if (!preventOpen.current) {\n storeCursorPosition();\n showFlyout(flyoutOptions);\n }\n };\n\n const closeFlyout = () => {\n hideFlyout();\n rePositionCursor();\n };\n\n const insertTable = (nrOfRows: number, nrOfColumns: number) => {\n editor.update(() => {\n const selection = $getSelection();\n const tableNode = createTable(nrOfRows, nrOfColumns);\n if ($isRangeSelection(selection)) {\n selection.insertNodes([tableNode]);\n } else {\n $getRoot().append(tableNode);\n }\n const firstDescendant = tableNode.getFirstDescendant();\n if (firstDescendant) {\n (firstDescendant as TextNode).select();\n }\n });\n\n closeFlyout();\n };\n\n const mutateTable = (action: Actions) => {\n editor.update(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode();\n const currentNode = $getTableCellNodeFromLexicalNode(anchorNode);\n\n if ($isTableCellNode(currentNode)) {\n switch (action) {\n case 'insertRowAbove':\n case 'insertRowBelow':\n insertRow(currentNode, action);\n break;\n case 'deleteRow':\n deleteRow(currentNode);\n break;\n case 'insertColumnLeft':\n case 'insertColumnRight':\n insertColumn(currentNode, action);\n break;\n case 'deleteColumn':\n deleteColumn(currentNode);\n break;\n case 'deleteTable':\n deleteTable(currentNode);\n break;\n }\n }\n }\n });\n };\n\n const flyoutOptions = {\n children: (\n <AddTableForm\n onCloseHandler={closeFlyout}\n onSaveHandler={(rows, columns) => insertTable(rows, columns)}\n ref={addTableForm}\n />\n ),\n };\n\n useEffect(() => {\n if (!isVisible) {\n addTableForm.current?.clearForm();\n setTimeout(() => (preventOpen.current = false), PREVENT_OPEN_DELAY);\n } else {\n preventOpen.current = true;\n addTableForm.current?.focusFirstField();\n }\n }, [addTableForm, isVisible]);\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit9') {\n event.preventDefault();\n showFlyout(flyoutOptions);\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n useEffect(() => {\n isVisibleRef.current = isVisible;\n }, [isVisible]);\n\n useEffect(() => {\n const removeKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isVisibleRef.current) {\n event.preventDefault();\n event.stopPropagation();\n closeFlyout();\n }\n };\n\n document.addEventListener('keydown', removeKeydown, { capture: true });\n\n return () => {\n document.removeEventListener('keydown', removeKeydown);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useImperativeHandle(ref, () => ({\n mutateTable,\n }));\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={openFlyout}\n title={t.table.tableTooltip}\n className={clsx(styles['editor__toolbar-button'], isActive && styles[`editor__toolbar-button--active`])}\n aria-label={t.aria.labels.table}\n aria-keyshortcuts={t.aria.keyshortcuts.table}\n ref={buttonRef}\n type=\"button\"\n >\n <Icon name=\"Table\" size={24} />\n </button>\n {flyout}\n </div>\n </div>\n );\n});\n"],"names":["MultiSelectHeader","label","clearTrigger","onClear","jsxs","styles","jsx","Label","Button","MultiSelect","scrollable","noBorder","header","children","Fragment","clsx","MultiSelectItem","AddLinkForm","forwardRef","onCloseHandler","onSaveHandler","onRemoveHandler","isLink","ref","t","useTranslation","url","setUrl","useState","linkText","setLinkText","urlError","setUrlError","linkTextError","setLinkTextError","firstField","useRef","linkId","useId","textId","handleOpenUrl","ensureHttps","handleUrl","event","handleLinkText","validateUrl","validateUrlWithProtocol","validateLinkText","handleSave","resetForm","handleClose","setDefaults","linktext","focusFirstField","useImperativeHandle","FormField","InputField","Icon","FeedbackBox","AddTableForm","rowCount","setRowCount","columnCount","setColumnCount","rowId","columnId","handleDimentionChange","type","value","_a","PREVENT_OPEN_DELAY","TablePlugin","isActive","editor","useLexicalComposerContext","flyout","showFlyout","hideFlyout","isVisible","useFlyout","addTableForm","buttonRef","preventOpen","isVisibleRef","storedSelection","storeCursorPosition","selection","$getSelection","rePositionCursor","$setSelection","openFlyout","flyoutOptions","closeFlyout","insertTable","nrOfRows","nrOfColumns","tableNode","createTable","$isRangeSelection","$getRoot","firstDescendant","mutateTable","action","anchorNode","currentNode","$getTableCellNodeFromLexicalNode","$isTableCellNode","insertRow","deleteRow","insertColumn","deleteColumn","deleteTable","rows","columns","useEffect","_b","removeKeyboardShortcut","KEY_DOWN_COMMAND","COMMAND_PRIORITY_EDITOR","removeKeydown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAASA,GAAkB,EAAE,OAAAC,GAAO,cAAAC,GAAc,SAAAC,KAAmC;AAC1F,SACG,gBAAAC,EAAA,UAAA,EAAO,WAAWC,EAAO,sBAAsB,GAC9C,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAM,SAAQ,qBAAqB,UAAMN,GAAA;AAAA,IACzCC,KACE,gBAAAI,EAAAE,GAAA,EAAO,SAAS,SAAS,SAASL,GAChC,UACHD,GAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;ACFa,MAAAO,IAAc,CAAC,EAAE,YAAAC,IAAa,IAAM,UAAAC,GAAU,QAAAC,GAAQ,UAAAC,QAE9D,gBAAAT,EAAAU,GAAA,EAAA,UAAA;AAAA,EAAAF;AAAA,EACD,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWS,EAAKV,EAAO,cAAc,GAAG;AAAA,QACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGM;AAAA,MAAA,CACtC;AAAA,MAED,UAAA,gBAAAL;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWS,EAAKV,EAAO,oBAAoB,GAAG;AAAA,YAC5C,CAACA,EAAO,gCAAg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CAAsC,GAC3D,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASoF;AAAA,QACT,OAAOlE,EAAE,MAAM;AAAA,QACf,WAAWT,EAAKV,EAAO,wBAAwB,GAAGmE,KAAYnE,EAAO,gCAAgC,CAAC;AAAA,QACtG,cAAYmB,EAAE,KAAK,OAAO;AAAA,QAC1B,qBAAmBA,EAAE,KAAK,aAAa;AAAA,QACvC,KAAKyD;AAAA,QACL,MAAK;AAAA,QAEL,UAAC,gBAAA3E,EAAAmD,GAAA,EAAK,MAAK,SAAQ,MAAM,IAAI;AAAA,MAAA;AAAA,IAC/B;AAAA,IACCkB;AAAA,EAAA,EACH,CAAA,EACF,CAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- ._form-field__container_130e1_1{align-items:center;display:flex;flex-wrap:wrap}._form-field__container--label-left_130e1_7{align-items:flex-start;flex-direction:row;gap:1rem;line-height:2.5rem}._form-field__container--label-left_130e1_7>label:after{line-height:3.6}._form-field__container--label-top_130e1_18{align-items:flex-start;flex-direction:column;gap:.5rem;line-height:normal}._form-field__input-container_130e1_25{display:flex;flex:1;flex-direction:column;line-height:1;position:relative;width:100%}._form-field__input_130e1_25{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:1px solid;border-radius:.5rem;color:var(--color-black);flex:1;font-family:inherit;font-size:inherit;height:2.75rem;margin:0 0 .5rem;min-height:2.5rem;padding:0 1rem;text-align:inherit}._form-field__input_130e1_25::-webkit-outer-spin-button,._form-field__input_130e1_25::-webkit-inner-spin-button{margin:0}._form-field__input--error_130e1_55{border-color:var(--color-red-500)}
1
+ ._form-field__container_c9jem_1{align-items:center;display:flex;flex-wrap:wrap}._form-field__container--label-left_c9jem_7{align-items:flex-start;flex-direction:row;gap:1rem;line-height:2.5rem}._form-field__container--label-left_c9jem_7>label:after{line-height:3.6}._form-field__container--label-top_c9jem_18{align-items:flex-start;flex-direction:column;gap:.5rem;line-height:normal}._form-field__input-feedback-container_c9jem_25{display:flex;flex:1;flex-direction:column;line-height:1.5;position:relative;width:100%}._form-field__input-container_c9jem_34{display:flex;flex:1}._form-field__input_c9jem_25{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:1px solid;border-radius:.5rem;color:var(--color-black);flex:1;font-family:inherit;font-size:inherit;height:2.75rem;margin:0 0 .5rem;min-height:2.5rem;padding:0 1rem;text-align:inherit}._form-field__input_c9jem_25::-webkit-outer-spin-button,._form-field__input_c9jem_25::-webkit-inner-spin-button{margin:0}._form-field__input--error_c9jem_60{border-color:var(--color-red-500)}
@@ -1 +1 @@
1
- ._period-selector__container_1v02t_1{display:flex;flex-wrap:wrap}._period-selector__container--label-left_1v02t_6{flex-direction:row;gap:1rem;line-height:2.5rem}._period-selector__container--label-top_1v02t_12{align-items:flex-start;flex-direction:column;gap:.5rem;line-height:normal}._period-selector__selector-container_1v02t_19{display:flex;flex-direction:column}._period-selector__selector-row_1v02t_24{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
1
+ ._period-selector__container_10t7p_1{display:flex;flex-wrap:wrap}._period-selector__container--label-left_10t7p_6{flex-direction:row;gap:1rem;line-height:2.5rem}._period-selector__container--label-top_10t7p_12{align-items:flex-start;flex-direction:column;gap:.5rem;line-height:normal}._period-selector__selector-container_10t7p_19{display:flex;flex-direction:column;line-height:1.5}._period-selector__selector-row_10t7p_25{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
@@ -1 +1 @@
1
- ._editor__container_1appy_1{background-color:var(--color-white);display:flex;flex-direction:column}._editor__header_1appy_7{align-items:center;display:flex;justify-content:space-between;margin-bottom:.5rem;min-height:1.5rem}._editor__header-word-count_1appy_15{align-self:flex-end;font-size:.875rem;margin-left:.5rem;text-align:right;white-space:nowrap;width:4.5rem}._editor__header-word-count--alert_1appy_24{color:var(--color-red-500);font-weight:700}._editor_1appy_1{border:1px solid var(--color-grey-400);border-radius:4px;margin-bottom:.5rem;padding:.25rem}._editor_1appy_1:has(._editor__field_1appy_36:focus-visible){outline:1px solid var(--color-blue-500)}._editor__toolbar_1appy_40{align-items:center;display:flex;gap:.25rem;justify-content:flex-start;margin-bottom:.25rem;padding:.25rem}._editor__toolbar-button-group_1appy_49{align-items:center;display:flex;gap:.125rem;justify-content:center}._editor__toolbar-button_1appy_49{align-items:center;background-color:var(--color-white);border:none;border-radius:.25rem;cursor:pointer;display:flex;font-size:1.1rem;height:2rem;justify-content:center;width:2rem}._editor__toolbar-button_1appy_49:hover{background-color:var(--color-grey-200);border:1px solid var(--color-grey-500)}._editor__toolbar-button_1appy_49:focus-visible{outline:.125rem dotted var(--color-cobalt);outline-offset:.125rem;z-index:1}._editor__toolbar-button_1appy_49:disabled{border-color:var(--color-grey-100);color:var(--color-grey-200);cursor:not-allowed}._editor__toolbar-button_1appy_49:hover:disabled{background-color:var(--color-grey-100);border-color:var(--color-grey-100);color:var(--color-grey-300);cursor:not-allowed}._editor__toolbar-button--bold_1appy_93{font-weight:700}._editor__toolbar-button--italic_1appy_97{font-style:italic}._editor__toolbar-button--active_1appy_101,._editor__toolbar-button_1appy_49:active{background-color:var(--color-black);border-color:var(--color-black);color:var(--color-white)}._editor__toolbar-button_1appy_49:active:hover{color:var(--color-white)}._editor__toolbar-button--active_1appy_101:hover{color:var(--color-black)}._editor__toolbar-button--active_1appy_101:disabled{background-color:var(--color-grey-100);border-color:var(--color-grey-100);color:var(--color-grey-300);cursor:not-allowed}._editor__toolbar-button-flyoutwrapper_1appy_123,._editor__field-wrapper_1appy_127{position:relative}._editor__field-wrapper_1appy_127:before{border-top:1px solid var(--color-grey-400);content:"";display:block;height:0;left:-.25rem;position:absolute;top:-.3rem;width:calc(100% + .5rem);z-index:1}._editor__field_1appy_36{background-color:var(--color-white);margin-top:.5rem;min-height:8rem;overflow-x:hidden;padding:0 .5rem .5rem;position:relative}._editor__field_1appy_36::-webkit-scrollbar{cursor:default;width:12px}._editor__field_1appy_36::-webkit-scrollbar-track{background:var(--color-white)}._editor__field_1appy_36::-webkit-scrollbar-thumb{background-color:var(--color-grey-300);border:3px solid var(--color-white);border-radius:20px;cursor:default}._editor__field_1appy_36:focus-visible{outline:none}._editor__placeholder_1appy_172{color:var(--color-grey-300);left:.5rem;pointer-events:none;position:absolute;top:0}._editor__field_1appy_36 p{margin:0}._editor__text--bold_1appy_185{font-weight:700}._editor__text--italic_1appy_189{font-style:italic}._editor__list--ul_1appy_193,._editor__list--ol_1appy_194{margin:0;padding:0}._editor__list--ul_1appy_193>._editor__listitem_1appy_199{list-style-type:disc;margin-left:1rem}._editor__list--ol_1appy_194>._editor__listitem_1appy_199{list-style-type:decimal;margin-left:1rem}._editor__link_1appy_209{color:var(--color-blue-500);cursor:pointer;text-decoration:underline}._editor__table_1appy_215{border:1px solid var(--color-grey-300);border-collapse:collapse;margin:.5rem 0;width:100%}._editor__table_1appy_215 tr{width:100%}._editor__table_1appy_215 td{border:1px solid var(--color-grey-300);padding:.125rem .25rem;vertical-align:top;width:auto}
1
+ ._editor__container_akhe4_1{background-color:var(--color-white);display:flex;flex-direction:column}._editor__header_akhe4_7{align-items:center;display:flex;justify-content:space-between;margin-bottom:.5rem;min-height:1.5rem}._editor__header-word-count_akhe4_15{align-self:flex-end;font-size:.875rem;margin-left:.5rem;text-align:right;white-space:nowrap;width:4.5rem}._editor__header-word-count--alert_akhe4_24{color:var(--color-red-500);font-weight:700}._editor_akhe4_1{border:1px solid var(--color-grey-400);border-radius:4px;margin-bottom:.5rem;padding:.25rem}._editor_akhe4_1:has(._editor__field_akhe4_36:focus-visible){outline:1px solid var(--color-blue-500)}._editor__toolbar_akhe4_40{align-items:center;display:flex;gap:.25rem;justify-content:flex-start;margin-bottom:.25rem;padding:.25rem}._editor__toolbar-button-group_akhe4_49{align-items:center;display:flex;gap:.125rem;justify-content:center}._editor__toolbar-button_akhe4_49{align-items:center;background-color:var(--color-white);border:none;border-radius:.25rem;cursor:pointer;display:flex;font-size:1.1rem;height:2rem;justify-content:center;width:2rem}._editor__toolbar-button_akhe4_49:hover{background-color:var(--color-grey-200);border:1px solid var(--color-grey-500)}._editor__toolbar-button_akhe4_49:focus-visible{outline:.125rem dotted var(--color-cobalt);outline-offset:.125rem;z-index:1}._editor__toolbar-button--active_akhe4_80,._editor__toolbar-button_akhe4_49:active{background-color:var(--color-black);border-color:var(--color-black);color:var(--color-white)}._editor__toolbar-button_akhe4_49:disabled{border-color:var(--color-grey-100);color:var(--color-grey-200);cursor:not-allowed}._editor__toolbar-button_akhe4_49:hover:disabled{background-color:var(--color-grey-100);border-color:var(--color-grey-100);color:var(--color-grey-300);cursor:not-allowed}._editor__toolbar-button--bold_akhe4_100{font-weight:700}._editor__toolbar-button--italic_akhe4_104{font-style:italic}._editor__toolbar-button_akhe4_49:active:hover{color:var(--color-white)}._editor__toolbar-button--active_akhe4_80:hover{color:var(--color-black)}._editor__toolbar-button--active_akhe4_80:disabled{background-color:var(--color-grey-100);border-color:var(--color-grey-100);color:var(--color-grey-300);cursor:not-allowed}._editor__toolbar-button-flyoutwrapper_akhe4_123,._editor__field-wrapper_akhe4_127{position:relative}._editor__field-wrapper_akhe4_127:before{border-top:1px solid var(--color-grey-400);content:"";display:block;height:0;left:-.25rem;position:absolute;top:-.3rem;width:calc(100% + .5rem);z-index:1}._editor__field_akhe4_36{background-color:var(--color-white);margin-top:.5rem;min-height:8rem;overflow-x:hidden;padding:0 .5rem .5rem;position:relative}._editor__field_akhe4_36::-webkit-scrollbar{cursor:default;width:12px}._editor__field_akhe4_36::-webkit-scrollbar-track{background:var(--color-white)}._editor__field_akhe4_36::-webkit-scrollbar-thumb{background-color:var(--color-grey-300);border:3px solid var(--color-white);border-radius:20px;cursor:default}._editor__field_akhe4_36:focus-visible{outline:none}._editor__placeholder_akhe4_172{color:var(--color-grey-300);left:.5rem;pointer-events:none;position:absolute;top:0}._editor__field_akhe4_36 p{margin:0}._editor__text--bold_akhe4_185{font-weight:700}._editor__text--italic_akhe4_189{font-style:italic}._editor__list--ul_akhe4_193,._editor__list--ol_akhe4_194{margin:0;padding:0}._editor__list--ul_akhe4_193>._editor__listitem_akhe4_199{list-style-type:disc;margin-left:1rem}._editor__list--ol_akhe4_194>._editor__listitem_akhe4_199{list-style-type:decimal;margin-left:1rem}._editor__link_akhe4_209{color:var(--color-blue-500);cursor:pointer;text-decoration:underline}._editor__table_akhe4_215{border:1px solid var(--color-grey-300);border-collapse:collapse;margin:.5rem 0;width:100%}._editor__table_akhe4_215 tr{width:100%}._editor__table_akhe4_215 td{border:1px solid var(--color-grey-300);padding:.125rem .25rem;vertical-align:top;width:auto}
@@ -17,7 +17,7 @@ import "../IconButton/IconButton.js";
17
17
  import "../Input/Input.js";
18
18
  import "../InputField/InputField.js";
19
19
  import "react-router-dom";
20
- import "../../TablePlugin-C4BuRRYL.js";
20
+ import "../../TablePlugin-B-yAWpsC.js";
21
21
  import "../RteEditor/Providers/LanguageProvider.js";
22
22
  import "../RteEditor/hooks/components/Flyout.js";
23
23
  import "../SelectListbox/SelectListbox.js";
@@ -1,4 +1,4 @@
1
- import { jsxs as f, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
2
  import { c as l } from "../../clsx-OuTLNxxd.js";
3
3
  import "react";
4
4
  import "../Buttons/Button.js";
@@ -15,7 +15,7 @@ import "../IconButton/IconButton.js";
15
15
  import "../Input/Input.js";
16
16
  import "../InputField/InputField.js";
17
17
  import "react-router-dom";
18
- import "../../TablePlugin-C4BuRRYL.js";
18
+ import "../../TablePlugin-B-yAWpsC.js";
19
19
  import "../RteEditor/Providers/LanguageProvider.js";
20
20
  import "../RteEditor/hooks/components/Flyout.js";
21
21
  import "../SelectListbox/SelectListbox.js";
@@ -23,38 +23,41 @@ import "../SelectListbox/SelectProvider.js";
23
23
  import "../Sortable/components/SortableItem.js";
24
24
  import "../../SortableProvider-BUsvniX7.js";
25
25
  import '../../assets/FormInput.css';const r = {
26
- "form-field__container": "_form-field__container_130e1_1",
27
- "form-field__container--label-left": "_form-field__container--label-left_130e1_7",
28
- "form-field__container--label-top": "_form-field__container--label-top_130e1_18",
29
- "form-field__input-container": "_form-field__input-container_130e1_25",
30
- "form-field__input": "_form-field__input_130e1_25",
31
- "form-field__input--error": "_form-field__input--error_130e1_55"
26
+ "form-field__container": "_form-field__container_c9jem_1",
27
+ "form-field__container--label-left": "_form-field__container--label-left_c9jem_7",
28
+ "form-field__container--label-top": "_form-field__container--label-top_c9jem_18",
29
+ "form-field__input-feedback-container": "_form-field__input-feedback-container_c9jem_25",
30
+ "form-field__input-container": "_form-field__input-container_c9jem_34",
31
+ "form-field__input": "_form-field__input_c9jem_25",
32
+ "form-field__input--error": "_form-field__input--error_c9jem_60"
32
33
  }, J = ({
33
34
  id: t,
34
- label: _,
35
- labelPosition: p = "top",
36
- type: m = "text",
37
- required: a = !1,
38
- notValidatedText: e = "",
35
+ label: m,
36
+ labelPosition: c = "top",
37
+ type: _ = "text",
38
+ required: p = !1,
39
+ notValidatedText: i = "",
39
40
  onChange: n
40
41
  }) => {
41
- const c = (o) => ["e", "E", "+", "-"].includes(o.key) && o.preventDefault(), d = (o) => {
42
- typeof n == "function" && n(o.target.value);
42
+ const a = (e) => ["e", "E", "+", "-"].includes(e.key) && e.preventDefault(), d = (e) => {
43
+ typeof n == "function" && n(e.target.value);
43
44
  };
44
- return /* @__PURE__ */ f("div", { className: l(r["form-field__container"], r[`form-field__container--label-${p}`]), children: [
45
- _ && /* @__PURE__ */ i(s, { htmlFor: t, required: a, children: _ }),
46
- /* @__PURE__ */ f("div", { className: r["form-field__input-container"], children: [
47
- /* @__PURE__ */ i(
45
+ return /* @__PURE__ */ f("div", { className: l(r["form-field__container"], r[`form-field__container--label-${c}`]), children: [
46
+ m && /* @__PURE__ */ o(s, { htmlFor: t, required: p, children: m }),
47
+ /* @__PURE__ */ f("div", { className: r["form-field__input-feedback-container"], children: [
48
+ /* @__PURE__ */ o("div", { className: r["form-field__input-container"], children: /* @__PURE__ */ o(
48
49
  "input",
49
50
  {
50
51
  id: t,
51
- type: m,
52
- ...m === "number" && { onKeyDown: c },
52
+ type: _,
53
+ ..._ === "number" && { onKeyDown: a },
53
54
  onChange: d,
54
- className: l(r["form-field__input"], [e !== "" && r["form-field__input--error"]])
55
+ className: l(r["form-field__input"], [
56
+ i !== "" && r["form-field__input--error"]
57
+ ])
55
58
  }
56
- ),
57
- e !== "" && /* @__PURE__ */ i(u, { level: "error", feedback: e })
59
+ ) }),
60
+ i !== "" && /* @__PURE__ */ o(u, { level: "error", feedback: i })
58
61
  ] })
59
62
  ] });
60
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange: (value: string) => void;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValidatedText = '',\n onChange,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n return (\n <div className={clsx(styles['form-field__container'], styles[`form-field__container--label-${labelPosition}`])}>\n {label && (\n <Label htmlFor={id} required={required}>\n {label}\n </Label>\n )}\n\n <div className={styles['form-field__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-field__input'], [notValidatedText !== '' && styles['form-field__input--error']])}\n />\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValidatedText","onChange","blockInvalidChar","event","handleChange","jsxs","clsx","styles","jsx","Label","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuBaA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AACF,MAAsB;AACpB,QAAMC,IAAmB,CAACC,MACxB,CAAC,KAAK,KAAK,KAAK,GAAG,EAAE,SAASA,EAAM,GAAG,KAAKA,EAAM,eAAe,GAE7DC,IAAe,CAACD,MAA+C;AAC/D,IAAA,OAAOF,KAAa,cACbA,EAAAE,EAAM,OAAO,KAAK;AAAA,EAC7B;AAGF,SACG,gBAAAE,EAAA,OAAA,EAAI,WAAWC,EAAKC,EAAO,uBAAuB,GAAGA,EAAO,gCAAgCV,CAAa,EAAE,CAAC,GAC1G,UAAA;AAAA,IAAAD,KACE,gBAAAY,EAAAC,GAAA,EAAM,SAASd,GAAI,UAAAI,GACjB,UACHH,GAAA;AAAA,IAGD,gBAAAS,EAAA,OAAA,EAAI,WAAWE,EAAO,6BAA6B,GAClD,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAAb;AAAA,UACA,MAAAG;AAAA,UACC,GAAIA,MAAS,YAAY,EAAE,WAAWI,EAAiB;AAAA,UACxD,UAAUE;AAAA,UACV,WAAWE,EAAKC,EAAO,mBAAmB,GAAG,CAACP,MAAqB,MAAMO,EAAO,0BAA0B,CAAC,CAAC;AAAA,QAAA;AAAA,MAC9G;AAAA,MACCP,MAAqB,MAAM,gBAAAQ,EAACE,KAAY,OAAM,SAAQ,UAAUV,GAAkB;AAAA,IAAA,GACrF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange: (value: string) => void;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValidatedText = '',\n onChange,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n return (\n <div className={clsx(styles['form-field__container'], styles[`form-field__container--label-${labelPosition}`])}>\n {label && (\n <Label htmlFor={id} required={required}>\n {label}\n </Label>\n )}\n\n <div className={styles['form-field__input-feedback-container']}>\n <div className={styles['form-field__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-field__input'], [\n notValidatedText !== '' && styles['form-field__input--error'],\n ])}\n />\n </div>\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValidatedText","onChange","blockInvalidChar","event","handleChange","jsxs","clsx","styles","jsx","Label","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;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16
  import "../Input/Input.js";
17
17
  import "react-router-dom";
18
- import "../../TablePlugin-C4BuRRYL.js";
18
+ import "../../TablePlugin-B-yAWpsC.js";
19
19
  import "../RteEditor/Providers/LanguageProvider.js";
20
20
  import "../RteEditor/hooks/components/Flyout.js";
21
21
  import "../SelectListbox/SelectListbox.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-OuTLNxxd.js";
3
3
  import "../../MultiSelectItem-D9PxdX43.js";
4
- import { M as p } from "../../TablePlugin-C4BuRRYL.js";
4
+ import { M as p } from "../../TablePlugin-B-yAWpsC.js";
5
5
  export {
6
6
  p as MultiSelect
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as S, jsx as r } from "react/jsx-runtime";
2
2
  import { fn as d } from "../../index-C9QoqAAt.js";
3
3
  import { useState as p } from "react";
4
- import { M as e } from "../../TablePlugin-C4BuRRYL.js";
4
+ import { M as e } from "../../TablePlugin-B-yAWpsC.js";
5
5
  import { Container as M } from "../../storyComponents/Container/Container.js";
6
6
  const C = `
7
7
  // MultiSelectHeader can be added optionally
@@ -14,7 +14,7 @@ import "../../IconButton/IconButton.js";
14
14
  import "../../Input/Input.js";
15
15
  import "../../InputField/InputField.js";
16
16
  import "react-router-dom";
17
- import { a as q } from "../../../TablePlugin-C4BuRRYL.js";
17
+ import { a as q } from "../../../TablePlugin-B-yAWpsC.js";
18
18
  import "../../RteEditor/Providers/LanguageProvider.js";
19
19
  import "../../RteEditor/hooks/components/Flyout.js";
20
20
  import "../../SelectListbox/SelectListbox.js";
@@ -1,4 +1,4 @@
1
- import { M as l } from "../../TablePlugin-C4BuRRYL.js";
1
+ import { M as l } from "../../TablePlugin-B-yAWpsC.js";
2
2
  export {
3
3
  l as MultiSelect
4
4
  };