@uva-glass/component-library 1.55.0 → 1.56.0

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 (138) hide show
  1. package/dist/{Lexical.prod-BiuZHlIm.js → Lexical.prod-CO0gPAfo.js} +583 -607
  2. package/dist/Lexical.prod-CO0gPAfo.js.map +1 -0
  3. package/dist/LexicalComposerContext.prod-Dyvim1tK.js +27 -0
  4. package/dist/LexicalComposerContext.prod-Dyvim1tK.js.map +1 -0
  5. package/dist/LexicalList.prod-BceA-cJD.js +562 -0
  6. package/dist/LexicalList.prod-BceA-cJD.js.map +1 -0
  7. package/dist/{LexicalUtils.prod-BZOm66mY.js → LexicalUtils.prod-PbdOb6JG.js} +6 -6
  8. package/dist/{LexicalUtils.prod-BZOm66mY.js.map → LexicalUtils.prod-PbdOb6JG.js.map} +1 -1
  9. package/dist/RteEditor.module-Dz9a8vaK.js +29 -0
  10. package/dist/RteEditor.module-Dz9a8vaK.js.map +1 -0
  11. package/dist/Sortable.module-uk_YuFs1.js +24 -0
  12. package/dist/{Sortable.module-BrgGu8qp.js.map → Sortable.module-uk_YuFs1.js.map} +1 -1
  13. package/dist/{SortableProvider-Z0e0qeQT.js → SortableProvider-i4PDjRS_.js} +2 -2
  14. package/dist/{SortableProvider-Z0e0qeQT.js.map → SortableProvider-i4PDjRS_.js.map} +1 -1
  15. package/dist/TablePlugin-1L5UZfDH.js +249 -0
  16. package/dist/TablePlugin-1L5UZfDH.js.map +1 -0
  17. package/dist/assets/Container.css +1 -1
  18. package/dist/assets/EditorHeader.css +1 -0
  19. package/dist/assets/Flyout.css +1 -0
  20. package/dist/assets/Periods.css +1 -1
  21. package/dist/assets/RteEditor.css +1 -1
  22. package/dist/assets/Sortable.css +1 -1
  23. package/dist/assets/TableCellContextMenu.css +1 -0
  24. package/dist/assets/TablePlugin.css +1 -0
  25. package/dist/components/CheckboxTree/CheckboxTree.js +13 -11
  26. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  27. package/dist/components/Icon/icons/index.d.ts +21 -18
  28. package/dist/components/Icon/icons/index.js +125 -120
  29. package/dist/components/Icon/icons/index.js.map +1 -1
  30. package/dist/components/InputField/InputField.stories.js +16 -14
  31. package/dist/components/InputField/InputField.stories.js.map +1 -1
  32. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  33. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  34. package/dist/components/MultiSelect/components/MultiSelectHeader.js +5 -3
  35. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  36. package/dist/components/MultiSelect/index.js +1 -1
  37. package/dist/components/Periods/Periods.js +12 -12
  38. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +6 -4
  39. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  40. package/dist/components/RteEditor/EditorHeader/EditorHeader.d.ts +7 -0
  41. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +53 -0
  42. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -0
  43. package/dist/components/RteEditor/EditorHeader/index.d.ts +1 -0
  44. package/dist/components/RteEditor/EditorHeader/index.js +5 -0
  45. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +11 -10
  46. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
  47. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +18 -15
  48. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  49. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.d.ts +2 -0
  50. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +7 -4
  51. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js.map +1 -1
  52. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +2 -1
  53. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +63 -49
  54. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  55. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.d.ts +3 -0
  56. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +6 -4
  57. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -1
  58. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +31 -8
  59. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  60. package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
  61. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +6 -3
  62. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  63. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.d.ts +8 -0
  64. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +44 -0
  65. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -0
  66. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.d.ts +1 -0
  67. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +5 -0
  68. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js.map +1 -0
  69. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.d.ts +9 -1
  70. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +8 -6
  71. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  72. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.d.ts +7 -0
  73. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -0
  74. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -0
  75. package/dist/components/RteEditor/Plugins/TablePlugin/index.d.ts +1 -0
  76. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +4 -2
  77. package/dist/components/RteEditor/Plugins/TablePlugin/index.js.map +1 -1
  78. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +4 -0
  79. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +48 -38
  80. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  81. package/dist/components/RteEditor/Plugins/index.js +10 -8
  82. package/dist/components/RteEditor/Plugins/index.js.map +1 -1
  83. package/dist/components/RteEditor/Providers/LanguageProvider.d.ts +10 -0
  84. package/dist/components/RteEditor/Providers/LanguageProvider.js +18 -0
  85. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -0
  86. package/dist/components/RteEditor/RteEditor.d.ts +9 -1
  87. package/dist/components/RteEditor/RteEditor.js +476 -401
  88. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  89. package/dist/components/RteEditor/RteEditor.stories.d.ts +1 -0
  90. package/dist/components/RteEditor/RteEditor.stories.js +106 -15
  91. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  92. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
  93. package/dist/components/RteEditor/hooks/components/Flyout.d.ts +7 -0
  94. package/dist/components/RteEditor/hooks/components/Flyout.js +14 -0
  95. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -0
  96. package/dist/components/RteEditor/hooks/useFlyout.js +16 -20
  97. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  98. package/dist/components/RteEditor/hooks/useTranslation.d.ts +61 -0
  99. package/dist/components/RteEditor/hooks/useTranslation.js +10 -0
  100. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -0
  101. package/dist/components/RteEditor/index.js +3 -2
  102. package/dist/components/RteEditor/mockRteContent.d.ts +1 -0
  103. package/dist/components/RteEditor/mockRteContent.js +98 -0
  104. package/dist/components/RteEditor/mockRteContent.js.map +1 -0
  105. package/dist/components/RteEditor/translations.d.ts +64 -0
  106. package/dist/components/RteEditor/translations.js +68 -0
  107. package/dist/components/RteEditor/translations.js.map +1 -0
  108. package/dist/components/Sortable/Sortable.js +1 -1
  109. package/dist/components/Sortable/SortableProvider.js +1 -1
  110. package/dist/components/Sortable/components/SortableContainer.js +2 -2
  111. package/dist/components/Sortable/components/SortableHandle.js +1 -1
  112. package/dist/components/Sortable/components/SortableItem.js +2 -2
  113. package/dist/components/index.js +20 -19
  114. package/dist/helpers-BewZrn6E.js +1512 -0
  115. package/dist/helpers-BewZrn6E.js.map +1 -0
  116. package/dist/{helpers-CJF7fErD.js → helpers-Ec7CfNnA.js} +72 -59
  117. package/dist/helpers-Ec7CfNnA.js.map +1 -0
  118. package/dist/index.js +20 -19
  119. package/dist/storyComponents/Container/Container.d.ts +1 -1
  120. package/dist/storyComponents/Container/Container.js +18 -16
  121. package/dist/storyComponents/Container/Container.js.map +1 -1
  122. package/package.json +12 -12
  123. package/dist/AddTableFrom-CwnPli3F.js +0 -162
  124. package/dist/AddTableFrom-CwnPli3F.js.map +0 -1
  125. package/dist/Lexical.prod-BiuZHlIm.js.map +0 -1
  126. package/dist/ListPlugin-DFFbKLaN.js +0 -588
  127. package/dist/ListPlugin-DFFbKLaN.js.map +0 -1
  128. package/dist/RteEditor.module-BBbfV1rk.js +0 -24
  129. package/dist/RteEditor.module-BBbfV1rk.js.map +0 -1
  130. package/dist/Sortable.module-BrgGu8qp.js +0 -24
  131. package/dist/TablePlugin-CKJQiwra.js +0 -1506
  132. package/dist/TablePlugin-CKJQiwra.js.map +0 -1
  133. package/dist/assets/AddTableFrom.css +0 -1
  134. package/dist/assets/useFlyout.css +0 -1
  135. package/dist/components/RteEditor/hooks/index.d.ts +0 -1
  136. package/dist/components/RteEditor/hooks/index.js +0 -5
  137. package/dist/helpers-CJF7fErD.js.map +0 -1
  138. /package/dist/components/RteEditor/{hooks → EditorHeader}/index.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { $getSelection, $isRangeSelection } from 'lexical';\nimport { useCallback, useEffect, useState } from 'react';\nimport { $isListNode } from '@lexical/list';\nimport { $isLinkNode } from '@lexical/link';\n\nimport type { ElementNode, TextNode } from 'lexical';\n\nimport { LinkPlugin, BlockFormatPlugin, ListPlugin, HistoryPlugin, TablePlugin } from 'components/RteEditor/Plugins';\nimport styles from 'components/RteEditor/RteEditor.module.css';\n\nexport type TargetType = '_blank' | '_self';\nexport interface LinkType {\n active: boolean;\n url: string;\n target: TargetType | string;\n}\n\nconst getNodeTag = (anchorNode: ElementNode | TextNode, tagToMatch: string): boolean | LinkType => {\n let currentNode: TextNode | ElementNode | null = anchorNode;\n let tag: string | null;\n\n while (currentNode !== null) {\n if (tagToMatch === 'a') {\n if ($isLinkNode(currentNode)) {\n return { active: true, url: currentNode.__url, target: !currentNode.__target ? '_self' : currentNode.__target };\n }\n }\n\n if (tagToMatch === 'ul' || tagToMatch === 'ol') {\n if ($isListNode(currentNode)) {\n tag = currentNode.getTag();\n return tag === tagToMatch;\n }\n }\n\n currentNode = currentNode.getParent();\n }\n\n return false;\n};\n\nexport const ToolBarPlugin = (): JSX.Element => {\n const [editor] = useLexicalComposerContext();\n const [isBold, setIsBold] = useState(false);\n const [isItalic, setIsItalic] = useState(false);\n const [isUList, setIsUList] = useState<boolean>(false);\n const [isOList, setIsOList] = useState<boolean>(false);\n const [isLink, setIsLink] = useState<LinkType>({ active: false, url: '', target: '_self' });\n\n const updateToolbar = useCallback(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n setIsBold(selection.hasFormat('bold'));\n setIsItalic(selection.hasFormat('italic'));\n\n const anchorNode = selection.anchor.getNode();\n setIsUList(getNodeTag(anchorNode, 'ul') as boolean);\n setIsOList(getNodeTag(anchorNode, 'ol') as boolean);\n setIsLink(getNodeTag(anchorNode, 'a') as LinkType);\n }\n }, []);\n\n useEffect(() => {\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n });\n }, [editor, updateToolbar]);\n\n return (\n <div className={styles['editor__toolbar']}>\n <BlockFormatPlugin isBold={isBold} isItalic={isItalic} />\n <ListPlugin isUList={isUList} isOList={isOList} />\n <LinkPlugin isLink={isLink} />\n <TablePlugin />\n <HistoryPlugin />\n </div>\n );\n};\n"],"names":["getNodeTag","anchorNode","tagToMatch","currentNode","tag","$isLinkNode","$isListNode","ToolBarPlugin","editor","useLexicalComposerContext","isBold","setIsBold","useState","isItalic","setIsItalic","isUList","setIsUList","isOList","setIsOList","isLink","setIsLink","updateToolbar","useCallback","selection","$getSelection","$isRangeSelection","useEffect","editorState","jsxs","styles","jsx","BlockFormatPlugin","ListPlugin","LinkPlugin","TablePlugin","HistoryPlugin"],"mappings":";;;;;;;;;;AAkBA,MAAMA,IAAa,CAACC,GAAoCC,MAA2C;AACjG,MAAIC,IAA6CF,GAC7CG;AAEJ,SAAOD,MAAgB,QAAM;AAC3B,QAAID,MAAe,OACbG,EAAYF,CAAW;AACzB,aAAO,EAAE,QAAQ,IAAM,KAAKA,EAAY,OAAO,QAASA,EAAY,WAAqBA,EAAY,WAAtB,QAA+B;AAI9G,SAAAD,MAAe,QAAQA,MAAe,SACpCI,EAAYH,CAAW;AACzB,aAAAC,IAAMD,EAAY,UACXC,MAAQF;AAInB,IAAAC,IAAcA,EAAY;EAC5B;AAEO,SAAA;AACT,GAEaI,IAAgB,MAAmB;AACxC,QAAA,CAACC,CAAM,IAAIC,KACX,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAK,GACxC,CAACG,GAASC,CAAU,IAAIJ,EAAkB,EAAK,GAC/C,CAACK,GAASC,CAAU,IAAIN,EAAkB,EAAK,GAC/C,CAACO,GAAQC,CAAS,IAAIR,EAAmB,EAAE,QAAQ,IAAO,KAAK,IAAI,QAAQ,QAAS,CAAA,GAEpFS,IAAgBC,EAAY,MAAM;AACtC,UAAMC,IAAYC;AACd,QAAAC,EAAkBF,CAAS,GAAG;AACtB,MAAAZ,EAAAY,EAAU,UAAU,MAAM,CAAC,GACzBT,EAAAS,EAAU,UAAU,QAAQ,CAAC;AAEnC,YAAAtB,IAAasB,EAAU,OAAO,QAAQ;AACjC,MAAAP,EAAAhB,EAAWC,GAAY,IAAI,CAAY,GACvCiB,EAAAlB,EAAWC,GAAY,IAAI,CAAY,GACxCmB,EAAApB,EAAWC,GAAY,GAAG,CAAa;AAAA,IACnD;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,SAAAyB,EAAU,MAAM;AACd,IAAAlB,EAAO,uBAAuB,CAAC,EAAE,aAAAmB,QAAkB;AACjD,MAAAA,EAAY,KAAK,MAAM;AACP,QAAAN;MAAA,CACf;AAAA,IAAA,CACF;AAAA,EAAA,GACA,CAACb,GAAQa,CAAa,CAAC,GAGvB,gBAAAO,EAAA,OAAA,EAAI,WAAWC,EAAO,iBACrB,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAkB,QAAArB,GAAgB,UAAAG,EAAoB,CAAA;AAAA,IACvD,gBAAAiB,EAACE,GAAW,EAAA,SAAAjB,GAAkB,SAAAE,EAAkB,CAAA;AAAA,IAChD,gBAAAa,EAACG,KAAW,QAAAd,GAAgB;AAAA,sBAC3Be,GAAY,EAAA;AAAA,sBACZC,GAAc,EAAA;AAAA,EACjB,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"ToolbarPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { $getSelection, $isRangeSelection } from 'lexical';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { $isTableCellNode } from '@lexical/table';\n\nimport type { ElementNode, TextNode } from 'lexical';\nimport type { Actions } from 'components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu';\nimport type { TableMutation } from 'components/RteEditor/Plugins/TablePlugin/TablePlugin';\n\nimport { getNodeTag } from 'components/RteEditor/Plugins/LinkPlugin/helpers';\nimport {\n LinkPlugin,\n BlockFormatPlugin,\n ListPlugin,\n HistoryPlugin,\n TablePlugin,\n TableCellContextMenu,\n} from 'components/RteEditor/Plugins';\nimport styles from 'components/RteEditor/RteEditor.module.css';\n\nexport type TargetType = '_blank' | '_self';\nexport interface LinkType {\n active: boolean;\n url: string;\n target: TargetType | string;\n}\n\nexport type Position = {\n xPos: number;\n yPos: number;\n};\n\nconst getTableCell = (\n anchorNode: ElementNode | TextNode,\n editor: ReturnType<typeof useLexicalComposerContext>[0]\n): Position | null => {\n let currentNode: TextNode | ElementNode | null = anchorNode;\n\n while (currentNode !== null) {\n if ($isTableCellNode(currentNode) && editor) {\n const domNode = editor.getElementByKey(currentNode.getKey());\n if (domNode) {\n const rect = domNode.getBoundingClientRect();\n return { xPos: rect.right, yPos: rect.bottom };\n } else {\n return null;\n }\n }\n currentNode = currentNode.getParent();\n }\n\n return null;\n};\n\nexport const ToolBarPlugin = (): JSX.Element => {\n const [editor] = useLexicalComposerContext();\n const [isBold, setIsBold] = useState(false);\n const [isItalic, setIsItalic] = useState(false);\n const [isUList, setIsUList] = useState<boolean>(false);\n const [isOList, setIsOList] = useState<boolean>(false);\n const [isLink, setIsLink] = useState<LinkType>({ active: false, url: '', target: '_self' });\n const [isSelectedRange, setIsSelectedRange] = useState(false);\n const [position, setPosition] = useState<Position | null>(null);\n const tableref = useRef<TableMutation>(null);\n\n const updateToolbar = useCallback(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchor = selection.anchor;\n const anchorNode = anchor.getNode();\n const focus = selection.focus;\n\n setIsBold(selection.hasFormat('bold'));\n setIsItalic(selection.hasFormat('italic'));\n setIsUList(getNodeTag(anchorNode, 'ul') as boolean);\n setIsOList(getNodeTag(anchorNode, 'ol') as boolean);\n\n setIsSelectedRange(Math.abs(anchor.offset - focus.offset) !== 0);\n setIsLink(getNodeTag(anchorNode, 'a') as LinkType);\n\n setPosition(getTableCell(anchorNode, editor));\n }\n }, [editor]);\n\n const handleTableAction = (action: Actions) => {\n tableref.current?.mutateTable(action);\n };\n\n useEffect(() => {\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n });\n }, [editor, updateToolbar]);\n\n return (\n <div className={styles['editor__toolbar']}>\n <BlockFormatPlugin isBold={isBold} isItalic={isItalic} />\n <ListPlugin isUList={isUList} isOList={isOList} />\n <TablePlugin isActive={Boolean(position)} ref={tableref} />\n {position && <TableCellContextMenu position={position} onAction={handleTableAction} />}\n <LinkPlugin isLink={isLink} isLinkable={isSelectedRange} />\n <HistoryPlugin />\n </div>\n );\n};\n"],"names":["getTableCell","anchorNode","editor","currentNode","$isTableCellNode","domNode","rect","ToolBarPlugin","useLexicalComposerContext","isBold","setIsBold","useState","isItalic","setIsItalic","isUList","setIsUList","isOList","setIsOList","isLink","setIsLink","isSelectedRange","setIsSelectedRange","position","setPosition","tableref","useRef","updateToolbar","useCallback","selection","$getSelection","$isRangeSelection","anchor","focus","getNodeTag","handleTableAction","action","_a","useEffect","editorState","jsxs","styles","jsx","BlockFormatPlugin","ListPlugin","TablePlugin","TableCellContextMenu","LinkPlugin","HistoryPlugin"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,IAAe,CACnBC,GACAC,MACoB;AACpB,MAAIC,IAA6CF;AAEjD,SAAOE,MAAgB,QAAM;AACvB,QAAAC,EAAiBD,CAAW,KAAKD,GAAQ;AAC3C,YAAMG,IAAUH,EAAO,gBAAgBC,EAAY,OAAQ,CAAA;AAC3D,UAAIE,GAAS;AACL,cAAAC,IAAOD,EAAQ;AACrB,eAAO,EAAE,MAAMC,EAAK,OAAO,MAAMA,EAAK;MAAO;AAEtC,eAAA;AAAA,IAEX;AACA,IAAAH,IAAcA,EAAY;EAC5B;AAEO,SAAA;AACT,GAEaI,KAAgB,MAAmB;AACxC,QAAA,CAACL,CAAM,IAAIM,KACX,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAK,GACxC,CAACG,GAASC,CAAU,IAAIJ,EAAkB,EAAK,GAC/C,CAACK,GAASC,CAAU,IAAIN,EAAkB,EAAK,GAC/C,CAACO,GAAQC,CAAS,IAAIR,EAAmB,EAAE,QAAQ,IAAO,KAAK,IAAI,QAAQ,QAAS,CAAA,GACpF,CAACS,GAAiBC,CAAkB,IAAIV,EAAS,EAAK,GACtD,CAACW,GAAUC,CAAW,IAAIZ,EAA0B,IAAI,GACxDa,IAAWC,EAAsB,IAAI,GAErCC,IAAgBC,EAAY,MAAM;AACtC,UAAMC,IAAYC;AACd,QAAAC,EAAkBF,CAAS,GAAG;AAChC,YAAMG,IAASH,EAAU,QACnB3B,IAAa8B,EAAO,WACpBC,IAAQJ,EAAU;AAEd,MAAAlB,EAAAkB,EAAU,UAAU,MAAM,CAAC,GACzBf,EAAAe,EAAU,UAAU,QAAQ,CAAC,GAC9Bb,EAAAkB,EAAWhC,GAAY,IAAI,CAAY,GACvCgB,EAAAgB,EAAWhC,GAAY,IAAI,CAAY,GAElDoB,EAAmB,KAAK,IAAIU,EAAO,SAASC,EAAM,MAAM,MAAM,CAAC,GACrDb,EAAAc,EAAWhC,GAAY,GAAG,CAAa,GAErCsB,EAAAvB,EAAaC,GAAYC,CAAM,CAAC;AAAA,IAC9C;AAAA,EAAA,GACC,CAACA,CAAM,CAAC,GAELgC,IAAoB,CAACC,MAAoB;;AACpC,KAAAC,IAAAZ,EAAA,YAAA,QAAAY,EAAS,YAAYD;AAAA,EAAM;AAGtC,SAAAE,EAAU,MAAM;AACd,IAAAnC,EAAO,uBAAuB,CAAC,EAAE,aAAAoC,QAAkB;AACjD,MAAAA,EAAY,KAAK,MAAM;AACP,QAAAZ;MAAA,CACf;AAAA,IAAA,CACF;AAAA,EAAA,GACA,CAACxB,GAAQwB,CAAa,CAAC,GAGvB,gBAAAa,EAAA,OAAA,EAAI,WAAWC,EAAO,iBACrB,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAkB,QAAAjC,GAAgB,UAAAG,EAAoB,CAAA;AAAA,IACvD,gBAAA6B,EAACE,GAAW,EAAA,SAAA7B,GAAkB,SAAAE,EAAkB,CAAA;AAAA,sBAC/C4B,GAAY,EAAA,UAAU,EAAQtB,GAAW,KAAKE,GAAU;AAAA,IACxDF,KAAY,gBAAAmB,EAACI,GAAqB,EAAA,UAAAvB,GAAoB,UAAUY,GAAmB;AAAA,IACnF,gBAAAO,EAAAK,GAAA,EAAW,QAAA5B,GAAgB,YAAYE,EAAiB,CAAA;AAAA,sBACxD2B,GAAc,EAAA;AAAA,EACjB,EAAA,CAAA;AAEJ;"}
@@ -1,15 +1,17 @@
1
- import { ToolBarPlugin as i } from "./ToolbarPlugin/ToolbarPlugin.js";
1
+ import { ToolBarPlugin as e } from "./ToolbarPlugin/ToolbarPlugin.js";
2
2
  import { BlockFormatPlugin as t } from "./BlockFormatPlugin/BlockFormatPlugin.js";
3
- import { L as m } from "../../../ListPlugin-DFFbKLaN.js";
4
- import { LinkPlugin as f } from "./LinkPlugin/LinkPlugin.js";
3
+ import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
4
+ import { LinkPlugin as x } from "./LinkPlugin/LinkPlugin.js";
5
5
  import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
6
- import { T as x } from "../../../TablePlugin-CKJQiwra.js";
6
+ import { T as g } from "../../../TablePlugin-1L5UZfDH.js";
7
+ import { TableCellContextMenu as a } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
7
8
  export {
8
9
  t as BlockFormatPlugin,
9
10
  p as HistoryPlugin,
10
- f as LinkPlugin,
11
- m as ListPlugin,
12
- x as TablePlugin,
13
- i as ToolBarPlugin
11
+ x as LinkPlugin,
12
+ n as ListPlugin,
13
+ a as TableCellContextMenu,
14
+ g as TablePlugin,
15
+ e as ToolBarPlugin
14
16
  };
15
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ interface LanguageContextProps {
3
+ language: string;
4
+ switchLanguage: (language: string) => void;
5
+ }
6
+ export declare const LanguageProvider: ({ children }: {
7
+ children: ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const useLanguage: () => LanguageContextProps;
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { createContext as g, useState as s, useContext as i } from "react";
3
+ const t = g(void 0), x = ({ children: e }) => {
4
+ const [n, o] = s("en"), a = (r) => {
5
+ o(r);
6
+ };
7
+ return /* @__PURE__ */ u(t.Provider, { value: { language: n, switchLanguage: a }, children: e });
8
+ }, d = () => {
9
+ const e = i(t);
10
+ if (!e)
11
+ throw new Error("useLanguage must be used within a LanguageProvider");
12
+ return e;
13
+ };
14
+ export {
15
+ x as LanguageProvider,
16
+ d as useLanguage
17
+ };
18
+ //# sourceMappingURL=LanguageProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageProvider.js","sources":["../../../../src/components/RteEditor/Providers/LanguageProvider.tsx"],"sourcesContent":["import { createContext, useContext, useState } from 'react';\n\nimport type { ReactNode } from 'react';\n\ninterface LanguageContextProps {\n language: string;\n switchLanguage: (language: string) => void;\n}\n\nconst LanguageContext = createContext<LanguageContextProps | undefined>(undefined);\n\nexport const LanguageProvider = ({ children }: { children: ReactNode }) => {\n const [language, setLanguage] = useState<string>('en');\n\n const switchLanguage = (language: string) => {\n setLanguage(language);\n };\n\n return <LanguageContext.Provider value={{ language, switchLanguage }}>{children}</LanguageContext.Provider>;\n};\n\nexport const useLanguage = (): LanguageContextProps => {\n const context = useContext(LanguageContext);\n if (!context) {\n throw new Error('useLanguage must be used within a LanguageProvider');\n }\n return context;\n};\n"],"names":["LanguageContext","createContext","LanguageProvider","children","language","setLanguage","useState","switchLanguage","jsx","useLanguage","context","useContext"],"mappings":";;AASA,MAAMA,IAAkBC,EAAgD,MAAS,GAEpEC,IAAmB,CAAC,EAAE,UAAAC,QAAwC;AACzE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAiB,IAAI,GAE/CC,IAAiB,CAACH,MAAqB;AAC3C,IAAAC,EAAYD,CAAQ;AAAA,EAAA;AAGf,SAAA,gBAAAI,EAACR,EAAgB,UAAhB,EAAyB,OAAO,EAAE,UAAAI,GAAU,gBAAAG,EAAe,GAAI,UAAAJ,EAAS,CAAA;AAClF,GAEaM,IAAc,MAA4B;AAC/C,QAAAC,IAAUC,EAAWX,CAAe;AAC1C,MAAI,CAACU;AACG,UAAA,IAAI,MAAM,oDAAoD;AAE/D,SAAAA;AACT;"}
@@ -1,7 +1,15 @@
1
1
  export interface RteEditorProps {
2
2
  namespace?: string;
3
+ currentLanguage?: 'NL' | 'EN';
3
4
  initialValue?: string;
4
5
  placeholder?: string;
6
+ label?: string;
7
+ info?: string;
8
+ required?: boolean;
9
+ maxWords?: number;
10
+ /** error text to display if set */
11
+ notValidatedText?: string;
5
12
  onChange: (content: string) => void;
6
13
  }
7
- export declare const RteEditor: ({ namespace, initialValue, placeholder, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Rte: ({ namespace, currentLanguage, initialValue, placeholder, label, info, required, notValidatedText, maxWords, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const RteEditor: ({ namespace, currentLanguage, initialValue, placeholder, label, info, required, notValidatedText, maxWords, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;