@uva-glass/component-library 1.52.1 → 1.54.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-zUeT_jIr.js → Lexical.prod-DNRTKPfN.js} +72 -66
- package/dist/Lexical.prod-DNRTKPfN.js.map +1 -0
- package/dist/{LexicalUtils.prod-DtRifALg.js → LexicalUtils.prod-D_BPEjfg.js} +2 -2
- package/dist/{LexicalUtils.prod-DtRifALg.js.map → LexicalUtils.prod-D_BPEjfg.js.map} +1 -1
- package/dist/{ListPlugin-CxyYg2bv.js → ListPlugin-CgNBzfIl.js} +4 -4
- package/dist/{ListPlugin-CxyYg2bv.js.map → ListPlugin-CgNBzfIl.js.map} +1 -1
- package/dist/{MultiSelect-D1FnMER4.js → MultiSelect-DQaqItEH.js} +13 -11
- package/dist/{MultiSelect-D1FnMER4.js.map → MultiSelect-DQaqItEH.js.map} +1 -1
- package/dist/RteEditor.module-BjGyWKhW.js +26 -0
- package/dist/RteEditor.module-BjGyWKhW.js.map +1 -0
- package/dist/Sortable.module-BrgGu8qp.js +24 -0
- package/dist/Sortable.module-BrgGu8qp.js.map +1 -0
- package/dist/SortableProvider-Z0e0qeQT.js +152 -0
- package/dist/SortableProvider-Z0e0qeQT.js.map +1 -0
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/Sortable.css +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +11 -9
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/Icon/icons/index.d.ts +9 -0
- package/dist/components/Icon/icons/index.js +52 -37
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +13 -11
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +4 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +26 -24
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +64 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +5 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +23 -21
- 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/ListPlugin/ListPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +22 -20
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.d.ts +2 -0
- package/dist/components/RteEditor/Plugins/index.js +10 -6
- package/dist/components/RteEditor/Plugins/index.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +569 -462
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js +9 -7
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/Sortable/Sortable.d.ts +16 -0
- package/dist/components/Sortable/Sortable.js +27 -0
- package/dist/components/Sortable/Sortable.js.map +1 -0
- package/dist/components/Sortable/Sortable.stories.d.ts +7 -0
- package/dist/components/Sortable/Sortable.stories.js +53 -0
- package/dist/components/Sortable/Sortable.stories.js.map +1 -0
- package/dist/components/Sortable/SortableProvider.d.ts +23 -0
- package/dist/components/Sortable/SortableProvider.js +10 -0
- package/dist/components/Sortable/SortableProvider.js.map +1 -0
- package/dist/components/Sortable/actions.d.ts +49 -0
- package/dist/components/Sortable/actions.js +33 -0
- package/dist/components/Sortable/actions.js.map +1 -0
- package/dist/components/Sortable/components/SortableContainer.d.ts +7 -0
- package/dist/components/Sortable/components/SortableContainer.js +9 -0
- package/dist/components/Sortable/components/SortableContainer.js.map +1 -0
- package/dist/components/Sortable/components/SortableHandle.d.ts +4 -0
- package/dist/components/Sortable/components/SortableHandle.js +11 -0
- package/dist/components/Sortable/components/SortableHandle.js.map +1 -0
- package/dist/components/Sortable/components/SortableItem.d.ts +9 -0
- package/dist/components/Sortable/components/SortableItem.js +113 -0
- package/dist/components/Sortable/components/SortableItem.js.map +1 -0
- package/dist/components/Sortable/constants.d.ts +10 -0
- package/dist/components/Sortable/constants.js +14 -0
- package/dist/components/Sortable/constants.js.map +1 -0
- package/dist/components/Sortable/index.d.ts +1 -0
- package/dist/components/Sortable/index.js +5 -0
- package/dist/components/Sortable/index.js.map +1 -0
- package/dist/components/Sortable/sortableReducer.d.ts +24 -0
- package/dist/components/Sortable/sortableReducer.js +92 -0
- package/dist/components/Sortable/sortableReducer.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +14 -12
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-DpGAANJ8.js → helpers-TSjo3aAv.js} +3 -3
- package/dist/{helpers-DpGAANJ8.js.map → helpers-TSjo3aAv.js.map} +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Lexical.prod-zUeT_jIr.js.map +0 -1
- package/dist/RteEditor.module--4R0Ql6Y.js +0 -26
- package/dist/RteEditor.module--4R0Ql6Y.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 } 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
|
|
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 } 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 <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","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;AAC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AAAd,GAAgB;AAAA,sBAC3Be,GAAc,EAAA;AAAA,EACjB,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ToolBarPlugin as
|
|
2
|
-
import { BlockFormatPlugin as
|
|
3
|
-
import { L as
|
|
1
|
+
import { ToolBarPlugin as i } from "./ToolbarPlugin/ToolbarPlugin.js";
|
|
2
|
+
import { BlockFormatPlugin as l } from "./BlockFormatPlugin/BlockFormatPlugin.js";
|
|
3
|
+
import { L as n } from "../../../ListPlugin-CgNBzfIl.js";
|
|
4
|
+
import { LinkPlugin as f } from "./LinkPlugin/LinkPlugin.js";
|
|
5
|
+
import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
|
|
4
6
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
l as BlockFormatPlugin,
|
|
8
|
+
p as HistoryPlugin,
|
|
9
|
+
f as LinkPlugin,
|
|
10
|
+
n as ListPlugin,
|
|
11
|
+
i as ToolBarPlugin
|
|
8
12
|
};
|
|
9
13
|
//# 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":";;;;;"}
|