@uva-glass/component-library 3.52.10 → 3.53.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.
- package/dist/{Lexical.prod-sd_e2sqT.js → Lexical.prod-DH2XfwvA.js} +58 -58
- package/dist/{Lexical.prod-sd_e2sqT.js.map → Lexical.prod-DH2XfwvA.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-Co2PF1UJ.js → LexicalClipboard.prod-DTuNvXAS.js} +22 -22
- package/dist/{LexicalClipboard.prod-Co2PF1UJ.js.map → LexicalClipboard.prod-DTuNvXAS.js.map} +1 -1
- package/dist/{LexicalLink.prod-BCE6Bg2N.js → LexicalLink.prod-BV5Y2RYj.js} +8 -9
- package/dist/{LexicalLink.prod-BCE6Bg2N.js.map → LexicalLink.prod-BV5Y2RYj.js.map} +1 -1
- package/dist/{LexicalList.prod-CIB0K0ja.js → LexicalList.prod-DA9du3qx.js} +4 -4
- package/dist/{LexicalList.prod-CIB0K0ja.js.map → LexicalList.prod-DA9du3qx.js.map} +1 -1
- package/dist/{LexicalSelection.prod-CCmcTP6S.js → LexicalSelection.prod-mQk00-U_.js} +2 -2
- package/dist/{LexicalSelection.prod-CCmcTP6S.js.map → LexicalSelection.prod-mQk00-U_.js.map} +1 -1
- package/dist/{LexicalTable.prod-Oa2YPHLl.js → LexicalTable.prod-RGq0GKAR.js} +4 -4
- package/dist/{LexicalTable.prod-Oa2YPHLl.js.map → LexicalTable.prod-RGq0GKAR.js.map} +1 -1
- package/dist/{LexicalUtils.prod-CjKjgnmx.js → LexicalUtils.prod-DU4QwthB.js} +2 -2
- package/dist/{LexicalUtils.prod-CjKjgnmx.js.map → LexicalUtils.prod-DU4QwthB.js.map} +1 -1
- package/dist/RteEditor.module-DaBh86FK.js +41 -0
- package/dist/RteEditor.module-DaBh86FK.js.map +1 -0
- package/dist/{TableCellResizerPlugin-DATbSzfg.js → TableCellResizerPlugin-DRwI83s2.js} +4 -4
- package/dist/{TableCellResizerPlugin-DATbSzfg.js.map → TableCellResizerPlugin-DRwI83s2.js.map} +1 -1
- package/dist/{TablePlugin-CqCjNBW_.js → TablePlugin-DmE96vN7.js} +20 -20
- package/dist/{TablePlugin-CqCjNBW_.js.map → TablePlugin-DmE96vN7.js.map} +1 -1
- package/dist/assets/AddCatalogueLinkForm.css +1 -0
- package/dist/assets/Flyout.css +1 -1
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/variables.css +72 -72
- package/dist/chunk-SS2NHR7W-qmI2h7CJ.js +4507 -0
- package/dist/chunk-SS2NHR7W-qmI2h7CJ.js.map +1 -0
- package/dist/{client-CFLMKOFW.js → client-D4oO7Spw.js} +11 -11
- package/dist/{client-CFLMKOFW.js.map → client-D4oO7Spw.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +2 -2
- package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
- package/dist/components/ActionList/ActionList.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
- package/dist/components/Attention/Attention.test.js +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Card/Card.test.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +111 -55
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FormInput/FormInput.d.ts +3 -1
- package/dist/components/FormInput/FormInput.js +26 -24
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.test.js +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.d.ts +22 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js +108 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js.map +1 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js +5 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.d.ts +8 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +182 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js +5 -0
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +8 -8
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +0 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +112 -132
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +2 -3
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +52 -57
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -23
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +4 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +65 -52
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +8 -9
- package/dist/components/RteEditor/Providers/LanguageProvider.d.ts +2 -2
- package/dist/components/RteEditor/Providers/LanguageProvider.js +4 -4
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.d.ts +8 -3
- package/dist/components/RteEditor/RteEditor.js +334 -309
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +69 -33
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +1 -0
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +3 -2
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +26 -23
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/components/Flyout.js +6 -16
- package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useTranslation.d.ts +39 -1
- package/dist/components/RteEditor/hooks/useTranslation.js +6 -6
- package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
- package/dist/components/RteEditor/mockCatalogueSearchData.d.ts +18 -0
- package/dist/components/RteEditor/mockCatalogueSearchData.js +485 -0
- package/dist/components/RteEditor/mockCatalogueSearchData.js.map +1 -0
- package/dist/components/RteEditor/mockRteContent.d.ts +1 -1
- package/dist/components/RteEditor/mockRteContent.js +8 -6
- package/dist/components/RteEditor/mockRteContent.js.map +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.d.ts +29 -0
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +126 -0
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -0
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.d.ts +1 -0
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js +11 -0
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js.map +1 -0
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +58 -52
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/index.d.ts +1 -0
- package/dist/components/RteEditor/nodes/index.js +14 -6
- package/dist/components/RteEditor/nodes/index.js.map +1 -1
- package/dist/components/RteEditor/translations.d.ts +41 -3
- package/dist/components/RteEditor/translations.js +44 -6
- package/dist/components/RteEditor/translations.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +2 -2
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{index-DRQMriwT.js → index-B4NxQN5d.js} +8668 -10004
- package/dist/index-B4NxQN5d.js.map +1 -0
- package/dist/{index-BKK3EWVW.js → index-ZQcmo1D_.js} +2 -2
- package/dist/{index-BKK3EWVW.js.map → index-ZQcmo1D_.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/react-18-BczhA0zC.js +41 -0
- package/dist/react-18-BczhA0zC.js.map +1 -0
- package/dist/{react.esm-BjO203QT.js → react.esm-BDo_tPxu.js} +2 -2
- package/dist/{react.esm-BjO203QT.js.map → react.esm-BDo_tPxu.js.map} +1 -1
- package/dist/storybook__react.d.js +4252 -4509
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +19 -19
- package/dist/RteEditor.module-CUi7Vqe8.js +0 -37
- package/dist/RteEditor.module-CUi7Vqe8.js.map +0 -1
- package/dist/chunk-HERDX7MO-DaYu-eWo.js +0 -11320
- package/dist/chunk-HERDX7MO-DaYu-eWo.js.map +0 -1
- package/dist/index-DRQMriwT.js.map +0 -1
- package/dist/react-18-C6foUf2n.js +0 -42
- package/dist/react-18-C6foUf2n.js.map +0 -1
|
@@ -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, $setSelection } from 'lexical';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { $getTableCellNodeFromLexicalNode } from '@lexical/table';\n\nimport type { JSX } from 'react';\nimport type { Actions } from 'components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu';\nimport type { TableMutation } from 'components/RteEditor/Plugins/TablePlugin/TablePlugin';\n\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';\nimport { removeScrollableContainers, setScrollableContainers } from 'components/RteEditor/helpers';\n\nexport type Position = {\n xPos: number;\n yPos: number;\n height: number;\n};\n\ninterface ToolBarProps {\n editorScrollPosition: number;\n}\n\nexport const ToolBarPlugin = ({
|
|
1
|
+
{"version":3,"file":"ToolbarPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { $getSelection, $isRangeSelection, $setSelection } from 'lexical';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { $getTableCellNodeFromLexicalNode } from '@lexical/table';\n\nimport type { JSX } from 'react';\nimport type { Actions } from 'components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu';\nimport type { TableMutation } from 'components/RteEditor/Plugins/TablePlugin/TablePlugin';\nimport type { SearchResponse } from 'components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm';\n\nimport { CourseCataloguePlugin } from 'components/RteEditor/Plugins/CourseCataloguePlugin';\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';\nimport { removeScrollableContainers, setScrollableContainers } from 'components/RteEditor/helpers';\n\nexport type Position = {\n xPos: number;\n yPos: number;\n height: number;\n};\n\ninterface ToolBarProps {\n editorScrollPosition: number;\n onCatalogueLinkSearch?: (query: string, linkType: 'course' | 'programme') => void;\n catalogueSearchResponse?: SearchResponse;\n}\n\nexport const ToolBarPlugin = ({\n editorScrollPosition,\n onCatalogueLinkSearch,\n catalogueSearchResponse,\n}: ToolBarProps): JSX.Element => {\n const [editor] = useLexicalComposerContext();\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\n const tableCell = $getTableCellNodeFromLexicalNode(anchorNode);\n if (tableCell) {\n const domNode = editor.getElementByKey(tableCell.getKey());\n const position = domNode ? domNode.getBoundingClientRect() : { right: 0, bottom: 0, height: 0 };\n setPosition({ xPos: position.right, yPos: position.bottom, height: position.height });\n } else {\n setPosition(null);\n }\n }\n }, [editor]);\n\n const handleTableAction = (action: Actions) => {\n tableref.current?.mutateTable(action);\n };\n\n const handleResizeScroll = () => {\n editor.update(() => {\n const selection = $getSelection();\n\n if ($isRangeSelection(selection)) {\n const anchor = selection.anchor;\n const anchorNode = anchor.getNode();\n\n const tableCell = $getTableCellNodeFromLexicalNode(anchorNode);\n if (tableCell) {\n $setSelection(null);\n setPosition(null);\n }\n }\n });\n };\n\n useEffect(() => {\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n });\n }, [editor, updateToolbar]);\n\n useEffect(() => {\n setScrollableContainers(handleResizeScroll);\n\n window.addEventListener('scroll', handleResizeScroll);\n window.addEventListener('resize', handleResizeScroll);\n\n return () => {\n window.removeEventListener('scroll', handleResizeScroll);\n window.removeEventListener('resize', handleResizeScroll);\n removeScrollableContainers(handleResizeScroll);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n useEffect(() => {\n const removeKeydown = () => {\n setScrollableContainers(handleResizeScroll);\n };\n\n window.addEventListener('keydown', removeKeydown, { capture: true });\n\n return () => {\n window.removeEventListener('keydown', removeKeydown);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <div className={styles['editor__toolbar']}>\n <BlockFormatPlugin />\n <ListPlugin />\n <TablePlugin isActive={Boolean(position)} ref={tableref} />\n {position && (\n <TableCellContextMenu\n position={position}\n parentScrollPosition={editorScrollPosition}\n onAction={handleTableAction}\n />\n )}\n <LinkPlugin parentScrollPosition={editorScrollPosition} />\n {onCatalogueLinkSearch && catalogueSearchResponse && (\n <CourseCataloguePlugin\n parentScrollPosition={editorScrollPosition}\n onSearch={onCatalogueLinkSearch}\n searchResponse={catalogueSearchResponse}\n />\n )}\n <HistoryPlugin />\n </div>\n );\n};\n"],"names":["ToolBarPlugin","editorScrollPosition","onCatalogueLinkSearch","catalogueSearchResponse","editor","useLexicalComposerContext","position","setPosition","useState","tableref","useRef","updateToolbar","useCallback","selection","$getSelection","$isRangeSelection","anchorNode","tableCell","$getTableCellNodeFromLexicalNode","domNode","handleTableAction","action","handleResizeScroll","$setSelection","useEffect","editorState","setScrollableContainers","removeScrollableContainers","removeKeydown","jsxs","styles","jsx","BlockFormatPlugin","ListPlugin","TablePlugin","TableCellContextMenu","LinkPlugin","CourseCataloguePlugin","HistoryPlugin"],"mappings":";;;;;;;;;;;;;;;;AAkCO,MAAMA,IAAgB,CAAC;AAAA,EAC5B,sBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,yBAAAC;AACF,MAAiC;AAC/B,QAAM,CAACC,CAAM,IAAIC,EAAA,GACX,CAACC,GAAUC,CAAW,IAAIC,EAA0B,IAAI,GACxDC,IAAWC,EAAsB,IAAI,GAErCC,IAAgBC,EAAY,MAAM;AACtC,UAAMC,IAAYC,EAAA;AAClB,QAAIC,EAAkBF,CAAS,GAAG;AAEhC,YAAMG,IADSH,EAAU,OACC,QAAA,GAEpBI,IAAYC,EAAiCF,CAAU;AAC7D,UAAIC,GAAW;AACb,cAAME,IAAUf,EAAO,gBAAgBa,EAAU,QAAQ,GACnDX,IAAWa,IAAUA,EAAQ,sBAAA,IAA0B,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAAA;AAC5F,QAAAZ,EAAY,EAAE,MAAMD,EAAS,OAAO,MAAMA,EAAS,QAAQ,QAAQA,EAAS,OAAA,CAAQ;AAAA,MACtF;AACE,QAAAC,EAAY,IAAI;AAAA,IAEpB;AAAA,EACF,GAAG,CAACH,CAAM,CAAC,GAELgB,IAAoB,CAACC,MAAoB;AAC7C,IAAAZ,EAAS,SAAS,YAAYY,CAAM;AAAA,EACtC,GAEMC,IAAqB,MAAM;AAC/B,IAAAlB,EAAO,OAAO,MAAM;AAClB,YAAMS,IAAYC,EAAA;AAElB,UAAIC,EAAkBF,CAAS,GAAG;AAEhC,cAAMG,IADSH,EAAU,OACC,QAAA;AAG1B,QADkBK,EAAiCF,CAAU,MAE3DO,EAAc,IAAI,GAClBhB,EAAY,IAAI;AAAA,MAEpB;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAAiB,EAAU,MAAM;AACd,IAAApB,EAAO,uBAAuB,CAAC,EAAE,aAAAqB,QAAkB;AACjD,MAAAA,EAAY,KAAK,MAAM;AACrB,QAAAd,EAAA;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH,GAAG,CAACP,GAAQO,CAAa,CAAC,GAE1Ba,EAAU,OACRE,EAAwBJ,CAAkB,GAE1C,OAAO,iBAAiB,UAAUA,CAAkB,GACpD,OAAO,iBAAiB,UAAUA,CAAkB,GAE7C,MAAM;AACX,WAAO,oBAAoB,UAAUA,CAAkB,GACvD,OAAO,oBAAoB,UAAUA,CAAkB,GACvDK,EAA2BL,CAAkB;AAAA,EAC/C,IAEC,CAAClB,CAAM,CAAC,GAEXoB,EAAU,MAAM;AACd,UAAMI,IAAgB,MAAM;AAC1B,MAAAF,EAAwBJ,CAAkB;AAAA,IAC5C;AAEA,kBAAO,iBAAiB,WAAWM,GAAe,EAAE,SAAS,IAAM,GAE5D,MAAM;AACX,aAAO,oBAAoB,WAAWA,CAAa;AAAA,IACrD;AAAA,EAEF,GAAG,CAAA,CAAE,GAGH,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,iBACrB,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAkB;AAAA,sBAClBC,GAAA,EAAW;AAAA,sBACXC,GAAA,EAAY,UAAU,EAAQ5B,GAAW,KAAKG,GAAU;AAAA,IACxDH,KACC,gBAAAyB;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,UAAA7B;AAAA,QACA,sBAAsBL;AAAA,QACtB,UAAUmB;AAAA,MAAA;AAAA,IAAA;AAAA,IAGd,gBAAAW,EAACK,GAAA,EAAW,sBAAsBnC,EAAA,CAAsB;AAAA,IACvDC,KAAyBC,KACxB,gBAAA4B;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,sBAAsBpC;AAAA,QACtB,UAAUC;AAAA,QACV,gBAAgBC;AAAA,MAAA;AAAA,IAAA;AAAA,sBAGnBmC,GAAA,CAAA,CAAc;AAAA,EAAA,GACjB;AAEJ;"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { ToolBarPlugin as e } from "./ToolbarPlugin/ToolbarPlugin.js";
|
|
2
2
|
import { BlockFormatPlugin as t } from "./BlockFormatPlugin/BlockFormatPlugin.js";
|
|
3
3
|
import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
|
|
4
|
-
import { LinkPlugin as
|
|
4
|
+
import { LinkPlugin as x } from "./LinkPlugin/LinkPlugin.js";
|
|
5
5
|
import { HistoryPlugin as f } from "./HistoryPlugin/HistoryPlugin.js";
|
|
6
|
-
import { T as u } from "../../../TablePlugin-
|
|
7
|
-
import { TableCellContextMenu as
|
|
8
|
-
import { T
|
|
6
|
+
import { T as u } from "../../../TablePlugin-DmE96vN7.js";
|
|
7
|
+
import { TableCellContextMenu as g } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
|
+
import { T } from "../../../TableCellResizerPlugin-DRwI83s2.js";
|
|
9
9
|
import { PasteHandlerPlugin as C } from "./PasteHandlerPlugin/PasteHandlerPlugin.js";
|
|
10
10
|
export {
|
|
11
11
|
t as BlockFormatPlugin,
|
|
12
12
|
f as HistoryPlugin,
|
|
13
|
-
|
|
13
|
+
x as LinkPlugin,
|
|
14
14
|
n as ListPlugin,
|
|
15
15
|
C as PasteHandlerPlugin,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
g as TableCellContextMenu,
|
|
17
|
+
T as TableCellResizerPlugin,
|
|
18
18
|
u as TablePlugin,
|
|
19
|
-
e as ToolBarPlugin
|
|
20
|
-
m as getLinkNodeTag
|
|
19
|
+
e as ToolBarPlugin
|
|
21
20
|
};
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface LanguageContextProps {
|
|
3
|
-
|
|
4
|
-
switchLanguage: (
|
|
3
|
+
currentLanguage: 'NL' | 'EN';
|
|
4
|
+
switchLanguage: (currentLanguage: 'NL' | 'EN') => void;
|
|
5
5
|
}
|
|
6
6
|
export declare const LanguageProvider: ({ children }: {
|
|
7
7
|
children: ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as g, useContext as s, useState as
|
|
2
|
+
import { createContext as g, useContext as s, useState as c } from "react";
|
|
3
3
|
const t = g(void 0), x = ({ children: e }) => {
|
|
4
|
-
const [n,
|
|
5
|
-
|
|
4
|
+
const [n, r] = c("EN"), o = (a) => {
|
|
5
|
+
r(a);
|
|
6
6
|
};
|
|
7
|
-
return /* @__PURE__ */ u(t.Provider, { value: {
|
|
7
|
+
return /* @__PURE__ */ u(t.Provider, { value: { currentLanguage: n, switchLanguage: o }, children: e });
|
|
8
8
|
}, d = () => {
|
|
9
9
|
const e = s(t);
|
|
10
10
|
if (!e)
|
|
@@ -1 +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
|
|
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 currentLanguage: 'NL' | 'EN';\n switchLanguage: (currentLanguage: 'NL' | 'EN') => void;\n}\n\nconst LanguageContext = createContext<LanguageContextProps | undefined>(undefined);\n\nexport const LanguageProvider = ({ children }: { children: ReactNode }) => {\n const [currentLanguage, setCurrentLanguage] = useState<'NL' | 'EN'>('EN');\n\n const switchLanguage = (currentLanguage: 'NL' | 'EN') => {\n setCurrentLanguage(currentLanguage);\n };\n\n return <LanguageContext.Provider value={{ currentLanguage, 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","currentLanguage","setCurrentLanguage","useState","switchLanguage","jsx","useLanguage","context","useContext"],"mappings":";;AASA,MAAMA,IAAkBC,EAAgD,MAAS,GAEpEC,IAAmB,CAAC,EAAE,UAAAC,QAAwC;AACzE,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAsB,IAAI,GAElEC,IAAiB,CAACH,MAAiC;AACvD,IAAAC,EAAmBD,CAAe;AAAA,EACpC;AAEA,SAAO,gBAAAI,EAACR,EAAgB,UAAhB,EAAyB,OAAO,EAAE,iBAAAI,GAAiB,gBAAAG,KAAmB,UAAAJ,GAAS;AACzF,GAEaM,IAAc,MAA4B;AACrD,QAAMC,IAAUC,EAAWX,CAAe;AAC1C,MAAI,CAACU;AACH,UAAM,IAAI,MAAM,oDAAoD;AAEtE,SAAOA;AACT;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { LexicalEditor } from 'lexical';
|
|
3
|
+
import { SearchResponse } from './Plugins/CourseCataloguePlugin/AddCatalogueLinkForm';
|
|
3
4
|
export interface RteEditorProps {
|
|
4
5
|
/** current language setting for the editor labels NOT title ans label */
|
|
5
|
-
currentLanguage?: 'NL' | 'EN';
|
|
6
|
+
currentLanguage?: 'NL' | 'EN' | 'nl' | 'en';
|
|
6
7
|
/** imported content to edit */
|
|
7
8
|
initialValue?: string;
|
|
8
9
|
/** placeholder text in current Language */
|
|
@@ -25,6 +26,10 @@ export interface RteEditorProps {
|
|
|
25
26
|
rteRef?: RefObject<LexicalEditor> | null;
|
|
26
27
|
/** updated output */
|
|
27
28
|
onChange: (content: string) => void;
|
|
29
|
+
/** callback for catalogue link search */
|
|
30
|
+
onCatalogueLinkSearch?: (query: string, type: 'course' | 'programme') => void;
|
|
31
|
+
/** updated catalogue search results */
|
|
32
|
+
catalogueSearchResponse?: SearchResponse;
|
|
28
33
|
}
|
|
29
|
-
export declare const Rte: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxHeightInRem, maxWords, rteRef, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export declare const RteEditor: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxWords, rteRef, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const Rte: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxHeightInRem, maxWords, rteRef, onChange, onCatalogueLinkSearch, catalogueSearchResponse, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const RteEditor: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxWords, rteRef, onChange, onCatalogueLinkSearch, catalogueSearchResponse, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;
|