@team-monolith/cds 1.119.2 → 1.119.3
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/@types/emotion.d.ts +160 -160
- package/README.md +37 -37
- package/dist/CdsProvider.d.ts +2 -2
- package/dist/CdsProvider.js +5 -15
- package/dist/components/AlertDialog/AlertDialog.js +54 -54
- package/dist/components/AlertDialog/AlertDialogActions.js +7 -7
- package/dist/components/AlertDialog/AlertDialogContent.js +8 -8
- package/dist/components/AlertDialog/AlertDialogTitle.js +34 -34
- package/dist/components/AnimatedButton.js +32 -32
- package/dist/components/Banner.js +51 -51
- package/dist/components/Book/Book.js +174 -174
- package/dist/components/Button.js +179 -179
- package/dist/components/CheckboxInput.js +148 -148
- package/dist/components/FileTypeAlertDialog.js +4 -4
- package/dist/components/Input.js +53 -53
- package/dist/components/InputBase.js +72 -72
- package/dist/components/Modal.js +4 -4
- package/dist/components/OverflowTooltip.js +4 -4
- package/dist/components/Pagination.js +56 -56
- package/dist/components/PinInput.js +64 -64
- package/dist/components/Popover.js +27 -27
- package/dist/components/RadioInput.js +73 -73
- package/dist/components/SquareButton.js +109 -109
- package/dist/components/Switch.js +69 -69
- package/dist/components/SwitchButton.js +107 -107
- package/dist/components/Tag.js +72 -72
- package/dist/components/Tooltip.js +19 -19
- package/dist/foundation/breakpoints.js +16 -16
- package/dist/i18n/i18n.d.ts +14 -3
- package/dist/i18n/i18n.js +32 -34
- package/dist/icons/custom/colored/AiHelper.d.ts +1 -1
- package/dist/icons/custom/colored/AiHelper.js +1 -1
- package/dist/icons/custom/colored/AiQuizColor.d.ts +1 -1
- package/dist/icons/custom/colored/AiQuizColor.js +1 -1
- package/dist/icons/custom/colored/BadgeColor.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeColor.js +1 -1
- package/dist/icons/custom/colored/BadgeGold.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeGold.js +1 -1
- package/dist/icons/custom/colored/BadgeGreen.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeGreen.js +1 -1
- package/dist/icons/custom/colored/BadgeSilver.d.ts +1 -1
- package/dist/icons/custom/colored/BadgeSilver.js +1 -1
- package/dist/icons/custom/colored/Basic.d.ts +1 -1
- package/dist/icons/custom/colored/Basic.js +1 -1
- package/dist/icons/custom/colored/BasicPlus.d.ts +1 -1
- package/dist/icons/custom/colored/BasicPlus.js +1 -1
- package/dist/icons/custom/colored/BoardColor.d.ts +1 -1
- package/dist/icons/custom/colored/BoardColor.js +1 -1
- package/dist/icons/custom/colored/CastCloudyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastCloudyColor.js +1 -1
- package/dist/icons/custom/colored/CastPartlyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastPartlyColor.js +1 -1
- package/dist/icons/custom/colored/CastRainbowColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastRainbowColor.js +1 -1
- package/dist/icons/custom/colored/CastSunnyColor.d.ts +1 -1
- package/dist/icons/custom/colored/CastSunnyColor.js +1 -1
- package/dist/icons/custom/colored/ClapBronze.d.ts +1 -1
- package/dist/icons/custom/colored/ClapBronze.js +1 -1
- package/dist/icons/custom/colored/ClapGold.d.ts +1 -1
- package/dist/icons/custom/colored/ClapGold.js +1 -1
- package/dist/icons/custom/colored/ClapSilver.d.ts +1 -1
- package/dist/icons/custom/colored/ClapSilver.js +1 -1
- package/dist/icons/custom/colored/Class.d.ts +1 -1
- package/dist/icons/custom/colored/Class.js +1 -1
- package/dist/icons/custom/colored/CodapColor.d.ts +1 -1
- package/dist/icons/custom/colored/CodapColor.js +1 -1
- package/dist/icons/custom/colored/EbookColor.d.ts +1 -1
- package/dist/icons/custom/colored/EbookColor.js +1 -1
- package/dist/icons/custom/colored/EmbeddedColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmbeddedColor.js +1 -1
- package/dist/icons/custom/colored/EmoClapColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoClapColor.js +1 -1
- package/dist/icons/custom/colored/EmoGoodColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoGoodColor.js +1 -1
- package/dist/icons/custom/colored/EmoGreatColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoGreatColor.js +1 -1
- package/dist/icons/custom/colored/EmoHeartColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoHeartColor.js +1 -1
- package/dist/icons/custom/colored/EmoHundredColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoHundredColor.js +1 -1
- package/dist/icons/custom/colored/EmoNeutralColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoNeutralColor.js +1 -1
- package/dist/icons/custom/colored/EmoStarsColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoStarsColor.js +1 -1
- package/dist/icons/custom/colored/EmoThumbupColor.d.ts +1 -1
- package/dist/icons/custom/colored/EmoThumbupColor.js +1 -1
- package/dist/icons/custom/colored/Empty.d.ts +1 -1
- package/dist/icons/custom/colored/Empty.js +1 -1
- package/dist/icons/custom/colored/EntryColor.d.ts +1 -1
- package/dist/icons/custom/colored/EntryColor.js +1 -1
- package/dist/icons/custom/colored/FilenameAllColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameAllColor.js +1 -1
- package/dist/icons/custom/colored/FilenameDocColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameDocColor.js +1 -1
- package/dist/icons/custom/colored/FilenameHwpColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameHwpColor.js +1 -1
- package/dist/icons/custom/colored/FilenameImgColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameImgColor.js +1 -1
- package/dist/icons/custom/colored/FilenameMp4Color.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameMp4Color.js +1 -1
- package/dist/icons/custom/colored/FilenamePdfColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenamePdfColor.js +1 -1
- package/dist/icons/custom/colored/FilenamePptColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenamePptColor.js +1 -1
- package/dist/icons/custom/colored/FilenameXlsColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameXlsColor.js +1 -1
- package/dist/icons/custom/colored/FilenameZipColor.d.ts +1 -1
- package/dist/icons/custom/colored/FilenameZipColor.js +1 -1
- package/dist/icons/custom/colored/Google.d.ts +1 -1
- package/dist/icons/custom/colored/Google.js +1 -1
- package/dist/icons/custom/colored/HandFill.d.ts +1 -1
- package/dist/icons/custom/colored/HandFill.js +1 -1
- package/dist/icons/custom/colored/JudgeColor.d.ts +1 -1
- package/dist/icons/custom/colored/JudgeColor.js +1 -1
- package/dist/icons/custom/colored/MakecodeColor.d.ts +1 -1
- package/dist/icons/custom/colored/MakecodeColor.js +1 -1
- package/dist/icons/custom/colored/Master.d.ts +1 -1
- package/dist/icons/custom/colored/Master.js +1 -1
- package/dist/icons/custom/colored/Material.d.ts +1 -1
- package/dist/icons/custom/colored/Material.js +1 -1
- package/dist/icons/custom/colored/MedalBronze.d.ts +1 -1
- package/dist/icons/custom/colored/MedalBronze.js +1 -1
- package/dist/icons/custom/colored/MedalGold.d.ts +1 -1
- package/dist/icons/custom/colored/MedalGold.js +1 -1
- package/dist/icons/custom/colored/MedalSilver.d.ts +1 -1
- package/dist/icons/custom/colored/MedalSilver.js +1 -1
- package/dist/icons/custom/colored/Pro.d.ts +1 -1
- package/dist/icons/custom/colored/Pro.js +1 -1
- package/dist/icons/custom/colored/Problem.d.ts +1 -1
- package/dist/icons/custom/colored/Problem.js +1 -1
- package/dist/icons/custom/colored/PythonColor.d.ts +1 -1
- package/dist/icons/custom/colored/PythonColor.js +1 -1
- package/dist/icons/custom/colored/QuizColor.d.ts +1 -1
- package/dist/icons/custom/colored/QuizColor.js +1 -1
- package/dist/icons/custom/colored/ResourceColor.d.ts +1 -1
- package/dist/icons/custom/colored/ResourceColor.js +1 -1
- package/dist/icons/custom/colored/ScratchColor.d.ts +1 -1
- package/dist/icons/custom/colored/ScratchColor.js +1 -1
- package/dist/icons/custom/colored/TypeHelper.d.ts +1 -1
- package/dist/icons/custom/colored/TypeHelper.js +1 -1
- package/dist/icons/custom/colored/Whale.d.ts +1 -1
- package/dist/icons/custom/colored/Whale.js +1 -1
- package/dist/icons/custom/colored/WorksheetColor.d.ts +1 -1
- package/dist/icons/custom/colored/WorksheetColor.js +1 -1
- package/dist/icons/custom/colored/ai-helper.svg +4 -4
- package/dist/icons/custom/colored/ai-quiz-color.svg +20 -20
- package/dist/icons/custom/colored/badge-color.svg +4 -4
- package/dist/icons/custom/colored/badge-gold.svg +11 -11
- package/dist/icons/custom/colored/badge-green.svg +11 -11
- package/dist/icons/custom/colored/badge-silver.svg +11 -11
- package/dist/icons/custom/colored/basic-plus.svg +31 -31
- package/dist/icons/custom/colored/basic.svg +3 -3
- package/dist/icons/custom/colored/board-color.svg +5 -5
- package/dist/icons/custom/colored/cast-cloudy-color.svg +6 -6
- package/dist/icons/custom/colored/cast-partly-color.svg +7 -7
- package/dist/icons/custom/colored/cast-rainbow-color.svg +13 -13
- package/dist/icons/custom/colored/cast-sunny-color.svg +4 -4
- package/dist/icons/custom/colored/clap-bronze.svg +8 -8
- package/dist/icons/custom/colored/clap-gold.svg +8 -8
- package/dist/icons/custom/colored/clap-silver.svg +8 -8
- package/dist/icons/custom/colored/class.svg +13 -13
- package/dist/icons/custom/colored/codap-color.svg +13 -13
- package/dist/icons/custom/colored/ebook-color.svg +5 -5
- package/dist/icons/custom/colored/embedded-color.svg +38 -38
- package/dist/icons/custom/colored/emo-clap-color.svg +252 -252
- package/dist/icons/custom/colored/emo-good-color.svg +68 -68
- package/dist/icons/custom/colored/emo-great-color.svg +67 -67
- package/dist/icons/custom/colored/emo-heart-color.svg +239 -239
- package/dist/icons/custom/colored/emo-hundred-color.svg +194 -194
- package/dist/icons/custom/colored/emo-neutral-color.svg +76 -76
- package/dist/icons/custom/colored/emo-stars-color.svg +121 -121
- package/dist/icons/custom/colored/emo-thumbup-color.svg +238 -238
- package/dist/icons/custom/colored/empty.svg +1 -1
- package/dist/icons/custom/colored/entry-color.svg +4 -4
- package/dist/icons/custom/colored/filename-all-color.svg +4 -4
- package/dist/icons/custom/colored/filename-doc-color.svg +5 -5
- package/dist/icons/custom/colored/filename-hwp-color.svg +6 -6
- package/dist/icons/custom/colored/filename-img-color.svg +6 -6
- package/dist/icons/custom/colored/filename-mp4-color.svg +5 -5
- package/dist/icons/custom/colored/filename-pdf-color.svg +12 -12
- package/dist/icons/custom/colored/filename-ppt-color.svg +6 -6
- package/dist/icons/custom/colored/filename-xls-color.svg +5 -5
- package/dist/icons/custom/colored/filename-zip-color.svg +5 -5
- package/dist/icons/custom/colored/google.svg +13 -13
- package/dist/icons/custom/colored/hand-fill.svg +4 -4
- package/dist/icons/custom/colored/judge-color.svg +6 -6
- package/dist/icons/custom/colored/makecode-color.svg +4 -4
- package/dist/icons/custom/colored/master.svg +12 -12
- package/dist/icons/custom/colored/material.svg +6 -6
- package/dist/icons/custom/colored/medal-bronze.svg +9 -9
- package/dist/icons/custom/colored/medal-gold.svg +9 -9
- package/dist/icons/custom/colored/medal-silver.svg +9 -9
- package/dist/icons/custom/colored/pro.svg +4 -4
- package/dist/icons/custom/colored/problem.svg +7 -7
- package/dist/icons/custom/colored/python-color.svg +4 -4
- package/dist/icons/custom/colored/quiz-color.svg +12 -12
- package/dist/icons/custom/colored/resource-color.svg +13 -13
- package/dist/icons/custom/colored/scratch-color.svg +6 -6
- package/dist/icons/custom/colored/type-helper.svg +9 -9
- package/dist/icons/custom/colored/whale.svg +7 -7
- package/dist/icons/custom/colored/worksheet-color.svg +5 -5
- package/dist/icons/custom/default/AiQuiz.d.ts +1 -1
- package/dist/icons/custom/default/AiQuiz.js +1 -1
- package/dist/icons/custom/default/Badge.d.ts +1 -1
- package/dist/icons/custom/default/Badge.js +1 -1
- package/dist/icons/custom/default/Board.d.ts +1 -1
- package/dist/icons/custom/default/Board.js +1 -1
- package/dist/icons/custom/default/CastCloudy.d.ts +1 -1
- package/dist/icons/custom/default/CastCloudy.js +1 -1
- package/dist/icons/custom/default/CastPartly.d.ts +1 -1
- package/dist/icons/custom/default/CastPartly.js +1 -1
- package/dist/icons/custom/default/CastRainbow.d.ts +1 -1
- package/dist/icons/custom/default/CastRainbow.js +1 -1
- package/dist/icons/custom/default/CastSunny.d.ts +1 -1
- package/dist/icons/custom/default/CastSunny.js +1 -1
- package/dist/icons/custom/default/Codap.d.ts +1 -1
- package/dist/icons/custom/default/Codap.js +1 -1
- package/dist/icons/custom/default/Ebook.d.ts +1 -1
- package/dist/icons/custom/default/Ebook.js +1 -1
- package/dist/icons/custom/default/Embedded.d.ts +1 -1
- package/dist/icons/custom/default/Embedded.js +1 -1
- package/dist/icons/custom/default/EmoClap.d.ts +1 -1
- package/dist/icons/custom/default/EmoClap.js +1 -1
- package/dist/icons/custom/default/EmoGood.d.ts +1 -1
- package/dist/icons/custom/default/EmoGood.js +1 -1
- package/dist/icons/custom/default/EmoGreat.d.ts +1 -1
- package/dist/icons/custom/default/EmoGreat.js +1 -1
- package/dist/icons/custom/default/EmoHeart.d.ts +1 -1
- package/dist/icons/custom/default/EmoHeart.js +1 -1
- package/dist/icons/custom/default/EmoHundred.d.ts +1 -1
- package/dist/icons/custom/default/EmoHundred.js +1 -1
- package/dist/icons/custom/default/EmoNeutral.d.ts +1 -1
- package/dist/icons/custom/default/EmoNeutral.js +1 -1
- package/dist/icons/custom/default/EmoStars.d.ts +1 -1
- package/dist/icons/custom/default/EmoStars.js +1 -1
- package/dist/icons/custom/default/EmoThumbup.d.ts +1 -1
- package/dist/icons/custom/default/EmoThumbup.js +1 -1
- package/dist/icons/custom/default/Entry.d.ts +1 -1
- package/dist/icons/custom/default/Entry.js +1 -1
- package/dist/icons/custom/default/Fab.d.ts +1 -1
- package/dist/icons/custom/default/Fab.js +1 -1
- package/dist/icons/custom/default/Grant.d.ts +1 -1
- package/dist/icons/custom/default/Grant.js +1 -1
- package/dist/icons/custom/default/GrantAlt.d.ts +1 -1
- package/dist/icons/custom/default/GrantAlt.js +1 -1
- package/dist/icons/custom/default/HandLine.d.ts +1 -1
- package/dist/icons/custom/default/HandLine.js +1 -1
- package/dist/icons/custom/default/Judge.d.ts +1 -1
- package/dist/icons/custom/default/Judge.js +1 -1
- package/dist/icons/custom/default/Makecode.d.ts +1 -1
- package/dist/icons/custom/default/Makecode.js +1 -1
- package/dist/icons/custom/default/Pdf.d.ts +1 -1
- package/dist/icons/custom/default/Pdf.js +1 -1
- package/dist/icons/custom/default/Python.d.ts +1 -1
- package/dist/icons/custom/default/Python.js +1 -1
- package/dist/icons/custom/default/Quiz.d.ts +1 -1
- package/dist/icons/custom/default/Quiz.js +1 -1
- package/dist/icons/custom/default/Resource.d.ts +1 -1
- package/dist/icons/custom/default/Resource.js +1 -1
- package/dist/icons/custom/default/Scratch.d.ts +1 -1
- package/dist/icons/custom/default/Scratch.js +1 -1
- package/dist/icons/custom/default/ScrollAlt.d.ts +1 -1
- package/dist/icons/custom/default/ScrollAlt.js +1 -1
- package/dist/icons/custom/default/ScrollFill.d.ts +1 -1
- package/dist/icons/custom/default/ScrollFill.js +1 -1
- package/dist/icons/custom/default/ScrollLine.d.ts +1 -1
- package/dist/icons/custom/default/ScrollLine.js +1 -1
- package/dist/icons/custom/default/Symbol.d.ts +1 -1
- package/dist/icons/custom/default/Symbol.js +1 -1
- package/dist/icons/custom/default/Worksheet.d.ts +1 -1
- package/dist/icons/custom/default/Worksheet.js +1 -1
- package/dist/icons/custom/default/ai-quiz.svg +8 -8
- package/dist/icons/custom/default/badge.svg +4 -4
- package/dist/icons/custom/default/board.svg +5 -5
- package/dist/icons/custom/default/cast-cloudy.svg +3 -3
- package/dist/icons/custom/default/cast-partly.svg +4 -4
- package/dist/icons/custom/default/cast-rainbow.svg +12 -12
- package/dist/icons/custom/default/cast-sunny.svg +3 -3
- package/dist/icons/custom/default/codap.svg +11 -11
- package/dist/icons/custom/default/ebook.svg +3 -3
- package/dist/icons/custom/default/embedded.svg +4 -4
- package/dist/icons/custom/default/emo-clap.svg +6 -6
- package/dist/icons/custom/default/emo-good.svg +12 -12
- package/dist/icons/custom/default/emo-great.svg +12 -12
- package/dist/icons/custom/default/emo-heart.svg +5 -5
- package/dist/icons/custom/default/emo-hundred.svg +3 -3
- package/dist/icons/custom/default/emo-neutral.svg +14 -14
- package/dist/icons/custom/default/emo-stars.svg +14 -14
- package/dist/icons/custom/default/emo-thumbup.svg +3 -3
- package/dist/icons/custom/default/entry.svg +4 -4
- package/dist/icons/custom/default/fab.svg +10 -10
- package/dist/icons/custom/default/grant-alt.svg +5 -5
- package/dist/icons/custom/default/grant.svg +4 -4
- package/dist/icons/custom/default/hand-line.svg +3 -3
- package/dist/icons/custom/default/judge.svg +3 -3
- package/dist/icons/custom/default/makecode.svg +5 -5
- package/dist/icons/custom/default/pdf.svg +3 -3
- package/dist/icons/custom/default/python.svg +7 -7
- package/dist/icons/custom/default/quiz.svg +4 -4
- package/dist/icons/custom/default/resource.svg +11 -11
- package/dist/icons/custom/default/scratch.svg +3 -3
- package/dist/icons/custom/default/scroll-alt.svg +5 -5
- package/dist/icons/custom/default/scroll-fill.svg +4 -4
- package/dist/icons/custom/default/scroll-line.svg +5 -5
- package/dist/icons/custom/default/symbol.svg +4 -4
- package/dist/icons/custom/default/worksheet.svg +4 -4
- package/dist/icons/custom/svgrColoredTemplate.js +27 -27
- package/dist/icons/custom/svgrDefaultTemplate.js +27 -27
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/patterns/Accordion.js +20 -20
- package/dist/patterns/Dropdown/DropdownItem/DropdownItem.js +60 -60
- package/dist/patterns/Dropdown/DropdownMenu/DropdownMenu.js +27 -27
- package/dist/patterns/Dropdown/DropdownMenu/style.js +19 -19
- package/dist/patterns/LexicalEditor/Plugins.js +37 -38
- package/dist/patterns/LexicalEditor/components/FileSelectInput.js +30 -31
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +4 -4
- package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +15 -15
- package/dist/patterns/LexicalEditor/components/InsertVideoDialog/InsertVideoDialog.js +17 -17
- package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +5 -3
- package/dist/patterns/LexicalEditor/hr.svg +3 -3
- package/dist/patterns/LexicalEditor/nodes/FileNode/FileComponent.js +44 -44
- package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +25 -25
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +8 -8
- package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageResizer.js +60 -60
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +21 -21
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +49 -49
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormPlaceholder.js +3 -1
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +73 -73
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +5 -5
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.js +7 -7
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxComponent.js +69 -69
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxEdit.js +3 -3
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +30 -29
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +29 -29
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +54 -54
- package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +64 -64
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/Evaluation.js +75 -75
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +19 -19
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +12 -10
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +29 -29
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +53 -53
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +8 -8
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/iconData.d.ts +2 -1
- package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/iconData.js +4 -5
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +26 -26
- package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +54 -54
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxComponent.js +54 -54
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +5 -5
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +22 -22
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +42 -42
- package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +74 -74
- package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +6 -6
- package/dist/patterns/LexicalEditor/nodes/index.d.ts +0 -3
- package/dist/patterns/LexicalEditor/nodes/index.js +0 -3
- package/dist/patterns/LexicalEditor/nodes/nodes.d.ts +2 -4
- package/dist/patterns/LexicalEditor/nodes/nodes.js +0 -6
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdder.js +51 -51
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +12 -11
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/menu.svg +7 -7
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/plus.svg +2 -2
- package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +60 -123
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuItem.js +32 -32
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuList.js +32 -32
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.d.ts +2 -0
- package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +52 -118
- package/dist/patterns/LexicalEditor/plugins/DragDropPastePlugin/index.js +4 -2
- package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +49 -49
- package/dist/patterns/LexicalEditor/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatPopup.js +36 -36
- package/dist/patterns/LexicalEditor/plugins/ParagraphPlaceholderPlugin/index.js +7 -7
- package/dist/patterns/LexicalEditor/theme.d.ts +0 -6
- package/dist/patterns/LexicalEditor/theme.js +243 -281
- package/dist/patterns/SegmentedControl/SegmentedControlButton.js +10 -10
- package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +8 -8
- package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +2 -2
- package/dist/patterns/Tabs.js +43 -43
- package/dist/patterns/ToggleButtonGroup/ToggleButton.js +40 -40
- package/dist/patterns/ToggleButtonGroup/ToggleButtonGroup.js +11 -11
- package/dist/texts.d.ts +2 -1
- package/dist/texts.js +11 -12
- package/dist/utils/hover.js +12 -12
- package/dist/utils/reset.js +19 -19
- package/dist/utils/visuallyHidden.js +10 -10
- package/package.json +109 -110
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.d.ts +0 -32
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContainerNode.js +0 -131
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.d.ts +0 -23
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleContentNode.js +0 -88
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.d.ts +0 -24
- package/dist/patterns/LexicalEditor/nodes/toggleNodes/ToggleTitleNode.js +0 -105
- package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.d.ts +0 -9
- package/dist/patterns/LexicalEditor/plugins/TogglePlugin/index.js +0 -146
- package/dist/patterns/LexicalEditor/utils/toggleUtils.d.ts +0 -9
- package/dist/patterns/LexicalEditor/utils/toggleUtils.js +0 -18
package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js
CHANGED
|
@@ -15,12 +15,12 @@ import { LexicalTypeaheadMenuPlugin, MenuOption, useBasicTypeaheadTriggerMatch,
|
|
|
15
15
|
import { $createHeadingNode, $createQuoteNode } from "@lexical/rich-text";
|
|
16
16
|
import { $setBlocksType } from "@lexical/selection";
|
|
17
17
|
import { INSERT_TABLE_COMMAND } from "@lexical/table";
|
|
18
|
-
import { $createParagraphNode, $
|
|
18
|
+
import { $createParagraphNode, $getSelection, $isRangeSelection, } from "lexical";
|
|
19
19
|
import { useCallback, useMemo, useState } from "react";
|
|
20
20
|
import * as ReactDOM from "react-dom";
|
|
21
21
|
import { css as cssToClassName } from "@emotion/css";
|
|
22
22
|
import { ComponentPickerMenuList } from "./ComponentPickerMenuList";
|
|
23
|
-
import { TextIcon, H1Icon, H2Icon, H3Icon, ListUnorderedIcon, ListOrderedIcon, DoubleQuotesLIcon, CodeViewIcon, SeparatorIcon, ImageLineIcon, VideoLineIcon, InputMethodLineIcon, ListRadioIcon, LayoutColumnLineIcon, FileList2LineIcon, EmojiStickerLineIcon, File3LineIcon,
|
|
23
|
+
import { TextIcon, H1Icon, H2Icon, H3Icon, ListUnorderedIcon, ListOrderedIcon, DoubleQuotesLIcon, CodeViewIcon, SeparatorIcon, ImageLineIcon, VideoLineIcon, InputMethodLineIcon, ListRadioIcon, LayoutColumnLineIcon, FileList2LineIcon, EmojiStickerLineIcon, File3LineIcon, } from "../../../../icons";
|
|
24
24
|
import { ZINDEX } from "../../../../utils/zIndex";
|
|
25
25
|
import { css, useTheme } from "@emotion/react";
|
|
26
26
|
import { INSERT_PROBLEM_INPUT_COMMAND } from "../ProblemInputPlugin";
|
|
@@ -35,11 +35,8 @@ import { InsertVideoDialog } from "../../components/InsertVideoDialog";
|
|
|
35
35
|
import { INSERT_VIDEO_COMMAND } from "../VideosPlugin";
|
|
36
36
|
import { UploadFileDialog } from "../../components/UploadFileDialog";
|
|
37
37
|
import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
|
|
38
|
-
import { i18n } from "../../../../i18n/i18n";
|
|
39
38
|
import { useTranslation } from "react-i18next";
|
|
40
39
|
import { getTexts } from "../../../../texts";
|
|
41
|
-
import { INSERT_TOGGLE_COMMAND } from "../TogglePlugin";
|
|
42
|
-
import { $isToggleTitleNode } from "../../nodes";
|
|
43
40
|
// import useModal from "../../hooks/useModal";
|
|
44
41
|
// import catTypingGif from "../../images/cat-typing.gif";
|
|
45
42
|
// import { INSERT_IMAGE_COMMAND, InsertImageDialog } from "../ImagesPlugin";
|
|
@@ -61,16 +58,6 @@ export class ComponentPickerOption extends MenuOption {
|
|
|
61
58
|
this.onSelect = options.onSelect.bind(this);
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
|
-
function isSelectionInsideToggleTitle(editor) {
|
|
65
|
-
return editor.getEditorState().read(() => {
|
|
66
|
-
const selection = $getSelection();
|
|
67
|
-
if (!$isRangeSelection(selection)) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
const titleNode = $findMatchingParent(selection.anchor.getNode(), (node) => $isToggleTitleNode(node));
|
|
71
|
-
return Boolean(titleNode);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
61
|
function getDynamicOptions(editor, queryString) {
|
|
75
62
|
const options = [];
|
|
76
63
|
// Lexical 원본 코드를 가져왔기 때문에 코드 변경을 최소화하기위함
|
|
@@ -92,9 +79,9 @@ function getDynamicOptions(editor, queryString) {
|
|
|
92
79
|
}
|
|
93
80
|
return options;
|
|
94
81
|
}
|
|
95
|
-
function getSheetContextOptions(editor, theme) {
|
|
82
|
+
function getSheetContextOptions(editor, theme, t) {
|
|
96
83
|
return [
|
|
97
|
-
new ComponentPickerOption(
|
|
84
|
+
new ComponentPickerOption(t("선택형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
98
85
|
icon: _jsx(ListRadioIcon, { color: theme.color.foreground.primary }),
|
|
99
86
|
// eslint-disable-next-line i18next/no-literal-string
|
|
100
87
|
keywords: ["sheet select", "선택형 입력"],
|
|
@@ -112,28 +99,24 @@ function getSheetContextOptions(editor, theme) {
|
|
|
112
99
|
allowMultipleAnswers: false,
|
|
113
100
|
}),
|
|
114
101
|
}),
|
|
115
|
-
new ComponentPickerOption(
|
|
102
|
+
new ComponentPickerOption(t("3단계 평가 입력 칸"), {
|
|
116
103
|
icon: _jsx(EmojiStickerLineIcon, { color: theme.color.foreground.primary }),
|
|
117
104
|
// eslint-disable-next-line i18next/no-literal-string
|
|
118
105
|
keywords: ["self evaluation", "3단계 평가 입력"],
|
|
119
106
|
onSelect: () => editor.dispatchCommand(INSERT_SELF_EVALUATION_COMMAND, {
|
|
120
107
|
iconType: "emoji",
|
|
121
|
-
labels: [
|
|
122
|
-
i18n.t("아주 잘했어요!"),
|
|
123
|
-
i18n.t("보통이에요."),
|
|
124
|
-
i18n.t("잘 모르겠어요."),
|
|
125
|
-
],
|
|
108
|
+
labels: [t("아주 잘했어요!"), t("보통이에요."), t("잘 모르겠어요.")],
|
|
126
109
|
evaluations: [
|
|
127
110
|
{
|
|
128
111
|
question: {
|
|
129
|
-
text: getTexts("placeholderEvaluationItem"),
|
|
112
|
+
text: getTexts(t, "placeholderEvaluationItem"),
|
|
130
113
|
},
|
|
131
114
|
selectedLabelIndex: null,
|
|
132
115
|
},
|
|
133
116
|
],
|
|
134
117
|
}),
|
|
135
118
|
}),
|
|
136
|
-
new ComponentPickerOption(
|
|
119
|
+
new ComponentPickerOption(t("단답형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
137
120
|
icon: _jsx(InputMethodLineIcon, { color: theme.color.foreground.primary }),
|
|
138
121
|
// eslint-disable-next-line i18next/no-literal-string
|
|
139
122
|
keywords: ["sheet short input", "단답형 입력"],
|
|
@@ -143,7 +126,7 @@ function getSheetContextOptions(editor, theme) {
|
|
|
143
126
|
placeholder: "",
|
|
144
127
|
}),
|
|
145
128
|
}),
|
|
146
|
-
new ComponentPickerOption(
|
|
129
|
+
new ComponentPickerOption(t("서술형 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
147
130
|
icon: _jsx(FileList2LineIcon, { color: theme.color.foreground.primary }),
|
|
148
131
|
// eslint-disable-next-line i18next/no-literal-string
|
|
149
132
|
keywords: ["sheet long input", "서술형 입력"],
|
|
@@ -153,17 +136,17 @@ function getSheetContextOptions(editor, theme) {
|
|
|
153
136
|
placeholder: "",
|
|
154
137
|
}),
|
|
155
138
|
}),
|
|
156
|
-
new ComponentDrawerOption(
|
|
157
|
-
width: 100%;
|
|
158
|
-
height: 1px;
|
|
159
|
-
background: ${theme.color.background.neutralAltActive};
|
|
160
|
-
margin: 4px 0;
|
|
139
|
+
new ComponentDrawerOption(t("활동지 메뉴구분선"), (_jsx("div", { css: css `
|
|
140
|
+
width: 100%;
|
|
141
|
+
height: 1px;
|
|
142
|
+
background: ${theme.color.background.neutralAltActive};
|
|
143
|
+
margin: 4px 0;
|
|
161
144
|
` }))),
|
|
162
145
|
];
|
|
163
146
|
}
|
|
164
|
-
function getQuizContextOptions(editor, theme) {
|
|
147
|
+
function getQuizContextOptions(editor, theme, t) {
|
|
165
148
|
return [
|
|
166
|
-
new ComponentPickerOption(
|
|
149
|
+
new ComponentPickerOption(t("주관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
167
150
|
icon: _jsx(InputMethodLineIcon, { color: theme.color.foreground.primary }),
|
|
168
151
|
// eslint-disable-next-line i18next/no-literal-string
|
|
169
152
|
keywords: ["problem input", "주관식 입력"],
|
|
@@ -181,7 +164,7 @@ function getQuizContextOptions(editor, theme) {
|
|
|
181
164
|
ignoreWhitespace: true,
|
|
182
165
|
}),
|
|
183
166
|
}),
|
|
184
|
-
new ComponentPickerOption(
|
|
167
|
+
new ComponentPickerOption(t("객관식 입력 칸", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
185
168
|
icon: _jsx(ListRadioIcon, { color: theme.color.foreground.primary }),
|
|
186
169
|
// eslint-disable-next-line i18next/no-literal-string
|
|
187
170
|
keywords: ["problem select", "객관식 입력"],
|
|
@@ -201,56 +184,18 @@ function getQuizContextOptions(editor, theme) {
|
|
|
201
184
|
});
|
|
202
185
|
},
|
|
203
186
|
}),
|
|
204
|
-
new ComponentDrawerOption(
|
|
205
|
-
width: 100%;
|
|
206
|
-
height: 1px;
|
|
207
|
-
background: ${theme.color.background.neutralAltActive};
|
|
208
|
-
margin: 4px 0;
|
|
187
|
+
new ComponentDrawerOption(t("퀴즈 메뉴구분선"), (_jsx("div", { css: css `
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 1px;
|
|
190
|
+
background: ${theme.color.background.neutralAltActive};
|
|
191
|
+
margin: 4px 0;
|
|
209
192
|
` }))),
|
|
210
193
|
];
|
|
211
194
|
}
|
|
212
|
-
function getToggleTitleOptions(props) {
|
|
213
|
-
const { editor } = props;
|
|
214
|
-
return [
|
|
215
|
-
new ComponentPickerOption(i18n.t("본문", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
216
|
-
icon: _jsx(TextIcon, {}),
|
|
217
|
-
// eslint-disable-next-line i18next/no-literal-string
|
|
218
|
-
keywords: ["normal", "paragraph", "p", "text", "본문", "단락", "내용"],
|
|
219
|
-
onSelect: () => editor.update(() => {
|
|
220
|
-
const selection = $getSelection();
|
|
221
|
-
if ($isRangeSelection(selection)) {
|
|
222
|
-
$setBlocksType(selection, () => $createParagraphNode());
|
|
223
|
-
}
|
|
224
|
-
}),
|
|
225
|
-
}),
|
|
226
|
-
...[1, 2, 3].map((n) => {
|
|
227
|
-
const titleMap = {
|
|
228
|
-
1: i18n.t("큰 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
229
|
-
2: i18n.t("중간 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
230
|
-
3: i18n.t("작은 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
231
|
-
};
|
|
232
|
-
const iconMap = {
|
|
233
|
-
1: _jsx(H1Icon, {}),
|
|
234
|
-
2: _jsx(H2Icon, {}),
|
|
235
|
-
3: _jsx(H3Icon, {}),
|
|
236
|
-
};
|
|
237
|
-
return new ComponentPickerOption(titleMap[n], {
|
|
238
|
-
icon: iconMap[n],
|
|
239
|
-
keywords: ["heading", "header", `h${n}`, titleMap[n]],
|
|
240
|
-
onSelect: () => editor.update(() => {
|
|
241
|
-
const selection = $getSelection();
|
|
242
|
-
if ($isRangeSelection(selection)) {
|
|
243
|
-
$setBlocksType(selection, () => $createHeadingNode(`h${n}`));
|
|
244
|
-
}
|
|
245
|
-
}),
|
|
246
|
-
});
|
|
247
|
-
}),
|
|
248
|
-
];
|
|
249
|
-
}
|
|
250
195
|
export function getBaseOptions(props) {
|
|
251
|
-
const { editor, theme, setImageOpen, setVideoOpen, setFileOpen, isSheetEnabled, isQuizEnabled, showFileUpload, } = props;
|
|
196
|
+
const { editor, theme, t, setImageOpen, setVideoOpen, setFileOpen, isSheetEnabled, isQuizEnabled, showFileUpload, } = props;
|
|
252
197
|
const baseOptions = [
|
|
253
|
-
new ComponentPickerOption(
|
|
198
|
+
new ComponentPickerOption(t("본문", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
254
199
|
icon: _jsx(TextIcon, {}),
|
|
255
200
|
// eslint-disable-next-line i18next/no-literal-string
|
|
256
201
|
keywords: ["normal", "paragraph", "p", "text", "본문", "단락", "내용"],
|
|
@@ -263,9 +208,9 @@ export function getBaseOptions(props) {
|
|
|
263
208
|
}),
|
|
264
209
|
...[1, 2, 3].map((n) => {
|
|
265
210
|
const titleMap = {
|
|
266
|
-
1:
|
|
267
|
-
2:
|
|
268
|
-
3:
|
|
211
|
+
1: t("큰 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
212
|
+
2: t("중간 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
213
|
+
3: t("작은 제목", { context: "렉시컬 드롭다운 메뉴" }),
|
|
269
214
|
};
|
|
270
215
|
const iconMap = {
|
|
271
216
|
1: _jsx(H1Icon, {}),
|
|
@@ -283,22 +228,17 @@ export function getBaseOptions(props) {
|
|
|
283
228
|
}),
|
|
284
229
|
});
|
|
285
230
|
}),
|
|
286
|
-
new ComponentPickerOption(
|
|
231
|
+
new ComponentPickerOption(t("일반 목록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
287
232
|
icon: _jsx(ListUnorderedIcon, {}),
|
|
288
233
|
keywords: ["bulleted list", "unordered list", "ul"],
|
|
289
234
|
onSelect: () => editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined),
|
|
290
235
|
}),
|
|
291
|
-
new ComponentPickerOption(
|
|
236
|
+
new ComponentPickerOption(t("숫자 목록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
292
237
|
icon: _jsx(ListOrderedIcon, {}),
|
|
293
238
|
keywords: ["numbered list", "ordered list", "ol"],
|
|
294
239
|
onSelect: () => editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined),
|
|
295
240
|
}),
|
|
296
|
-
new ComponentPickerOption(
|
|
297
|
-
icon: _jsx(PlayList2FillIcon, {}),
|
|
298
|
-
keywords: ["toggle", "collapsible"],
|
|
299
|
-
onSelect: () => editor.dispatchCommand(INSERT_TOGGLE_COMMAND, undefined),
|
|
300
|
-
}),
|
|
301
|
-
new ComponentPickerOption(i18n.t("인용 블록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
241
|
+
new ComponentPickerOption(t("인용 블록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
302
242
|
icon: _jsx(DoubleQuotesLIcon, {}),
|
|
303
243
|
keywords: ["block quote"],
|
|
304
244
|
onSelect: () => editor.update(() => {
|
|
@@ -308,7 +248,7 @@ export function getBaseOptions(props) {
|
|
|
308
248
|
}
|
|
309
249
|
}),
|
|
310
250
|
}),
|
|
311
|
-
new ComponentPickerOption(
|
|
251
|
+
new ComponentPickerOption(t("코드 블록", { context: "렉시컬 드롭다운 메뉴" }), {
|
|
312
252
|
icon: _jsx(CodeViewIcon, {}),
|
|
313
253
|
keywords: ["javascript", "python", "js", "codeblock"],
|
|
314
254
|
onSelect: () => editor.update(() => {
|
|
@@ -327,17 +267,17 @@ export function getBaseOptions(props) {
|
|
|
327
267
|
}
|
|
328
268
|
}),
|
|
329
269
|
}),
|
|
330
|
-
new ComponentPickerOption(
|
|
270
|
+
new ComponentPickerOption(t("구분선"), {
|
|
331
271
|
icon: _jsx(SeparatorIcon, {}),
|
|
332
272
|
keywords: ["horizontal rule", "divider", "hr"],
|
|
333
273
|
onSelect: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined),
|
|
334
274
|
}),
|
|
335
|
-
new ComponentPickerOption(
|
|
275
|
+
new ComponentPickerOption(t("이미지"), {
|
|
336
276
|
icon: _jsx(ImageLineIcon, {}),
|
|
337
277
|
keywords: ["image", "photo", "picture", "file"],
|
|
338
278
|
onSelect: () => setImageOpen(true),
|
|
339
279
|
}),
|
|
340
|
-
new ComponentPickerOption(
|
|
280
|
+
new ComponentPickerOption(t("동영상"), {
|
|
341
281
|
icon: _jsx(VideoLineIcon, {}),
|
|
342
282
|
keywords: ["video", "movie"],
|
|
343
283
|
onSelect: () => setVideoOpen(true),
|
|
@@ -348,15 +288,15 @@ export function getBaseOptions(props) {
|
|
|
348
288
|
const isLabMode = localStorage.getItem("labMode") === "true";
|
|
349
289
|
// isQuizEnabled이거나 devMode이면 퀴즈 컨텍스트 메뉴를 꼭대기에 추가합니다.
|
|
350
290
|
if (isQuizEnabled || isDevMode) {
|
|
351
|
-
baseOptions.unshift(...getQuizContextOptions(editor, theme));
|
|
291
|
+
baseOptions.unshift(...getQuizContextOptions(editor, theme, t));
|
|
352
292
|
}
|
|
353
293
|
// isSheetEnabled이거나 devMode이면 활동지 컨텍스트 메뉴를 꼭대기에 추가합니다.
|
|
354
294
|
if (isSheetEnabled || isDevMode) {
|
|
355
|
-
baseOptions.unshift(...getSheetContextOptions(editor, theme));
|
|
295
|
+
baseOptions.unshift(...getSheetContextOptions(editor, theme, t));
|
|
356
296
|
}
|
|
357
297
|
// devMode || labMode이면 칼럼 컨텍스트 메뉴를 추가합니다. (일부공개)
|
|
358
298
|
if (isDevMode || isLabMode) {
|
|
359
|
-
baseOptions.push(new ComponentPickerOption(
|
|
299
|
+
baseOptions.push(new ComponentPickerOption(t("칼럼"), {
|
|
360
300
|
icon: _jsx(LayoutColumnLineIcon, {}),
|
|
361
301
|
keywords: ["columns", "layout", "grid"],
|
|
362
302
|
onSelect: () => editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr"),
|
|
@@ -364,7 +304,7 @@ export function getBaseOptions(props) {
|
|
|
364
304
|
}
|
|
365
305
|
// showFileUpload 이면 파일블록을 추가합니다.
|
|
366
306
|
if (showFileUpload || isDevMode) {
|
|
367
|
-
baseOptions.push(new ComponentPickerOption(
|
|
307
|
+
baseOptions.push(new ComponentPickerOption(t("파일 게시"), {
|
|
368
308
|
icon: _jsx(File3LineIcon, {}),
|
|
369
309
|
keywords: ["file", "upload"],
|
|
370
310
|
onSelect: () => setFileOpen(true),
|
|
@@ -378,30 +318,24 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
378
318
|
const [editor] = useLexicalComposerContext();
|
|
379
319
|
const theme = useTheme();
|
|
380
320
|
const [queryString, setQueryString] = useState(null);
|
|
381
|
-
const [isInsideToggleTitle, setIsInsideToggleTitle] = useState(() => isSelectionInsideToggleTitle(editor));
|
|
382
321
|
const [imageOpen, setImageOpen] = useState(false);
|
|
383
322
|
const [videoOpen, setVideoOpen] = useState(false);
|
|
384
323
|
const [fileOpen, setFileOpen] = useState(false);
|
|
385
324
|
const checkForTriggerMatch = useBasicTypeaheadTriggerMatch("/", {
|
|
386
325
|
minLength: 0,
|
|
387
326
|
});
|
|
388
|
-
const handleQueryChange = useCallback((nextQuery) => {
|
|
389
|
-
setQueryString(nextQuery);
|
|
390
|
-
setIsInsideToggleTitle(() => isSelectionInsideToggleTitle(editor));
|
|
391
|
-
}, [editor]);
|
|
392
327
|
const options = useMemo(() => {
|
|
393
|
-
const baseOptions =
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
});
|
|
328
|
+
const baseOptions = getBaseOptions({
|
|
329
|
+
editor,
|
|
330
|
+
theme,
|
|
331
|
+
t,
|
|
332
|
+
setImageOpen,
|
|
333
|
+
setVideoOpen,
|
|
334
|
+
isSheetEnabled,
|
|
335
|
+
isQuizEnabled,
|
|
336
|
+
setFileOpen,
|
|
337
|
+
showFileUpload,
|
|
338
|
+
});
|
|
405
339
|
if (!queryString) {
|
|
406
340
|
return baseOptions;
|
|
407
341
|
}
|
|
@@ -413,7 +347,7 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
413
347
|
option.keywords.some((keyword) => regex.test(keyword)))),
|
|
414
348
|
];
|
|
415
349
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
416
|
-
}, [editor, queryString
|
|
350
|
+
}, [editor, queryString]);
|
|
417
351
|
const onSelectOption = useCallback((selectedOption, nodeToRemove, closeMenu, matchingString) => {
|
|
418
352
|
if (selectedOption instanceof ComponentDrawerOption) {
|
|
419
353
|
return;
|
|
@@ -434,8 +368,8 @@ export function ComponentPickerMenuPlugin(props) {
|
|
|
434
368
|
editor.dispatchCommand(INSERT_VIDEO_COMMAND, props);
|
|
435
369
|
}, onClose: () => setVideoOpen(false), shouldReset: true }), _jsx(UploadFileDialog, { open: fileOpen, onClose: () => setFileOpen(false), onChange: (props) => {
|
|
436
370
|
editor.dispatchCommand(UPLOAD_FILE_COMMAND, props);
|
|
437
|
-
} }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange:
|
|
438
|
-
z-index: ${ZINDEX.DIALOG + 1};
|
|
371
|
+
} }), _jsx(LexicalTypeaheadMenuPlugin, { onQueryChange: setQueryString, onSelectOption: onSelectOption, triggerFn: checkForTriggerMatch, options: options, anchorClassName: cssToClassName `
|
|
372
|
+
z-index: ${ZINDEX.DIALOG + 1};
|
|
439
373
|
`, menuRenderFn: (anchorElementRef, { selectedIndex, selectOptionAndCleanUp, setHighlightedIndex }) => anchorElementRef.current && options.length
|
|
440
374
|
? ReactDOM.createPortal(_jsx(ComponentPickerMenuList, { options: options, selectedIndex: selectedIndex, selectOptionAndCleanUp: selectOptionAndCleanUp, setHighlightedIndex: setHighlightedIndex }), anchorElementRef.current)
|
|
441
375
|
: null })] }));
|
|
@@ -24,6 +24,7 @@ import { CdsContext } from "../../../../CdsProvider";
|
|
|
24
24
|
import { UPLOAD_FILE_COMMAND } from "../FilePlugin";
|
|
25
25
|
import moment from "moment";
|
|
26
26
|
import { getTexts } from "../../../../texts";
|
|
27
|
+
import { useTranslation } from "react-i18next";
|
|
27
28
|
const ACCEPTABLE_IMAGE_TYPES = [
|
|
28
29
|
"image/",
|
|
29
30
|
"image/heic",
|
|
@@ -42,6 +43,7 @@ export function DragDropPastePlugin() {
|
|
|
42
43
|
const cdsContext = useContext(CdsContext);
|
|
43
44
|
const uploadByFile = (_a = cdsContext.lexical) === null || _a === void 0 ? void 0 : _a.uploadByFile;
|
|
44
45
|
const showFileError = (_b = cdsContext.lexical) === null || _b === void 0 ? void 0 : _b.showFileError;
|
|
46
|
+
const { t } = useTranslation();
|
|
45
47
|
// eslint-disable-next-line arrow-body-style
|
|
46
48
|
useEffect(() => {
|
|
47
49
|
return editor.registerCommand(DRAG_DROP_PASTE, (files) => {
|
|
@@ -60,7 +62,7 @@ export function DragDropPastePlugin() {
|
|
|
60
62
|
}
|
|
61
63
|
else {
|
|
62
64
|
if (file.size >= MAX_FILE_SIZE) {
|
|
63
|
-
showFileError === null || showFileError === void 0 ? void 0 : showFileError("upload", getTexts("errorFileTooLarge"));
|
|
65
|
+
showFileError === null || showFileError === void 0 ? void 0 : showFileError("upload", getTexts(t, "errorFileTooLarge"));
|
|
64
66
|
}
|
|
65
67
|
else {
|
|
66
68
|
const result = yield uploadByFile(file);
|
|
@@ -76,6 +78,6 @@ export function DragDropPastePlugin() {
|
|
|
76
78
|
}))();
|
|
77
79
|
return true;
|
|
78
80
|
}, COMMAND_PRIORITY_LOW);
|
|
79
|
-
}, [editor, showFileError, uploadByFile]);
|
|
81
|
+
}, [editor, showFileError, uploadByFile, t]);
|
|
80
82
|
return null;
|
|
81
83
|
}
|
|
@@ -164,57 +164,57 @@ export function FloatingLinkEditor(props) {
|
|
|
164
164
|
editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
|
|
165
165
|
}, children: _jsx(DeleteBinLineIcon, {}) })] })] })) }));
|
|
166
166
|
}
|
|
167
|
-
const Container = styled.div `
|
|
168
|
-
position: absolute;
|
|
169
|
-
top: 0;
|
|
170
|
-
left: 0;
|
|
171
|
-
z-index: 10;
|
|
172
|
-
will-change: transform;
|
|
173
|
-
|
|
174
|
-
display: flex;
|
|
175
|
-
padding: 0px 4px;
|
|
176
|
-
align-items: center;
|
|
177
|
-
gap: 4px;
|
|
178
|
-
|
|
179
|
-
border-radius: 8px;
|
|
180
|
-
// 메뉴가 활성화되지 않아도 클릭한 영역을 따라 다니도록 개발되었습니다.
|
|
181
|
-
// border가 있으면 활성화되지 않은 상태에서도 노출되므로 border를 제거합니다.
|
|
182
|
-
/* border: 1px solid #e8e8eb; */
|
|
183
|
-
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
184
|
-
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
185
|
-
|
|
186
|
-
width: 400px;
|
|
167
|
+
const Container = styled.div `
|
|
168
|
+
position: absolute;
|
|
169
|
+
top: 0;
|
|
170
|
+
left: 0;
|
|
171
|
+
z-index: 10;
|
|
172
|
+
will-change: transform;
|
|
173
|
+
|
|
174
|
+
display: flex;
|
|
175
|
+
padding: 0px 4px;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 4px;
|
|
178
|
+
|
|
179
|
+
border-radius: 8px;
|
|
180
|
+
// 메뉴가 활성화되지 않아도 클릭한 영역을 따라 다니도록 개발되었습니다.
|
|
181
|
+
// border가 있으면 활성화되지 않은 상태에서도 노출되므로 border를 제거합니다.
|
|
182
|
+
/* border: 1px solid #e8e8eb; */
|
|
183
|
+
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
184
|
+
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
185
|
+
|
|
186
|
+
width: 400px;
|
|
187
187
|
`;
|
|
188
|
-
const Buttons = styled.div `
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
gap: 4px;
|
|
188
|
+
const Buttons = styled.div `
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: 4px;
|
|
192
192
|
`;
|
|
193
|
-
const Button = styled.button `
|
|
194
|
-
// reset
|
|
195
|
-
border: none;
|
|
196
|
-
outline: none;
|
|
197
|
-
background: none;
|
|
198
|
-
cursor: pointer;
|
|
199
|
-
|
|
200
|
-
padding: 8px 4px;
|
|
201
|
-
|
|
202
|
-
svg {
|
|
203
|
-
width: 18px;
|
|
204
|
-
height: 18px;
|
|
205
|
-
}
|
|
193
|
+
const Button = styled.button `
|
|
194
|
+
// reset
|
|
195
|
+
border: none;
|
|
196
|
+
outline: none;
|
|
197
|
+
background: none;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
|
|
200
|
+
padding: 8px 4px;
|
|
201
|
+
|
|
202
|
+
svg {
|
|
203
|
+
width: 18px;
|
|
204
|
+
height: 18px;
|
|
205
|
+
}
|
|
206
206
|
`;
|
|
207
|
-
const Link = styled.a `
|
|
208
|
-
width: 100%;
|
|
209
|
-
padding: 0px 8px;
|
|
210
|
-
|
|
211
|
-
/* Default/Paragraph/16px-Rg */
|
|
212
|
-
font-family: ${({ theme }) => theme.fontFamily.ui};
|
|
213
|
-
font-size: 16px;
|
|
214
|
-
font-style: normal;
|
|
215
|
-
font-weight: 400;
|
|
216
|
-
line-height: 24px; /* 150% */
|
|
207
|
+
const Link = styled.a `
|
|
208
|
+
width: 100%;
|
|
209
|
+
padding: 0px 8px;
|
|
210
|
+
|
|
211
|
+
/* Default/Paragraph/16px-Rg */
|
|
212
|
+
font-family: ${({ theme }) => theme.fontFamily.ui};
|
|
213
|
+
font-size: 16px;
|
|
214
|
+
font-style: normal;
|
|
215
|
+
font-weight: 400;
|
|
216
|
+
line-height: 24px; /* 150% */
|
|
217
217
|
`;
|
|
218
|
-
const StyledInput = styled(Input) `
|
|
219
|
-
margin: 4px 0px;
|
|
218
|
+
const StyledInput = styled(Input) `
|
|
219
|
+
margin: 4px 0px;
|
|
220
220
|
`;
|
|
@@ -19,41 +19,41 @@ export const FloatingTextFormatPopup = forwardRef(function FloatingTextFormatPop
|
|
|
19
19
|
editor.dispatchCommand(FORMAT_TEXT_COMMAND, "code");
|
|
20
20
|
}, active: Boolean(isCode), "aria-label": "Insert code block", children: _jsx(CodeFillIcon, {}) }), _jsx(IconButton, { type: "button", onClick: insertLink, active: Boolean(isLink), "aria-label": "Insert link", children: _jsx(LinkIcon, {}) })] })) }));
|
|
21
21
|
});
|
|
22
|
-
const Container = styled.div `
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
z-index: 10;
|
|
27
|
-
will-change: transform;
|
|
28
|
-
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
padding: 0px 4px;
|
|
31
|
-
align-items: flex-start;
|
|
32
|
-
gap: 4px;
|
|
33
|
-
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
border: 1px solid #e8e8eb;
|
|
36
|
-
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
37
|
-
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
22
|
+
const Container = styled.div `
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
z-index: 10;
|
|
27
|
+
will-change: transform;
|
|
28
|
+
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
padding: 0px 4px;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
border: 1px solid #e8e8eb;
|
|
36
|
+
background: ${({ theme }) => theme.color.background.neutralBase};
|
|
37
|
+
box-shadow: 0px 3px 15px -3px rgba(13, 20, 33, 0.13);
|
|
38
38
|
`;
|
|
39
|
-
const IconButton = styled.button `
|
|
40
|
-
border: none;
|
|
41
|
-
outline: none;
|
|
42
|
-
|
|
43
|
-
display: flex;
|
|
44
|
-
padding: 8px 4px;
|
|
45
|
-
align-items: center;
|
|
46
|
-
gap: 4px;
|
|
47
|
-
|
|
48
|
-
background: #fff;
|
|
49
|
-
|
|
50
|
-
svg {
|
|
51
|
-
width: 18px;
|
|
52
|
-
height: 18px;
|
|
53
|
-
${({ theme, active }) => active && `color: ${theme.color.foreground.primary};`}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
background: ${({ theme }) => theme.color.background.neutralAlt};
|
|
58
|
-
}
|
|
39
|
+
const IconButton = styled.button `
|
|
40
|
+
border: none;
|
|
41
|
+
outline: none;
|
|
42
|
+
|
|
43
|
+
display: flex;
|
|
44
|
+
padding: 8px 4px;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 4px;
|
|
47
|
+
|
|
48
|
+
background: #fff;
|
|
49
|
+
|
|
50
|
+
svg {
|
|
51
|
+
width: 18px;
|
|
52
|
+
height: 18px;
|
|
53
|
+
${({ theme, active }) => active && `color: ${theme.color.foreground.primary};`}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background: ${({ theme }) => theme.color.background.neutralAlt};
|
|
58
|
+
}
|
|
59
59
|
`;
|
|
@@ -3,13 +3,13 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
|
|
|
3
3
|
import { $getSelection, $isParagraphNode, $isRangeSelection } from "lexical";
|
|
4
4
|
import { css as cssToClassName } from "@emotion/css";
|
|
5
5
|
import { useTheme } from "@emotion/react";
|
|
6
|
-
const getPlaceholderClassName = (theme) => cssToClassName `
|
|
7
|
-
&::before {
|
|
8
|
-
position: absolute;
|
|
9
|
-
content: attr(data-placeholder);
|
|
10
|
-
color: ${theme.color.foreground.neutralBaseDisabled};
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
}
|
|
6
|
+
const getPlaceholderClassName = (theme) => cssToClassName `
|
|
7
|
+
&::before {
|
|
8
|
+
position: absolute;
|
|
9
|
+
content: attr(data-placeholder);
|
|
10
|
+
color: ${theme.color.foreground.neutralBaseDisabled};
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
}
|
|
13
13
|
`;
|
|
14
14
|
export const ParagraphPlaceholderPlugin = ({ placeholder, }) => {
|
|
15
15
|
const [editor] = useLexicalComposerContext();
|
|
@@ -36,10 +36,4 @@ export declare function getTheme(theme: Theme, editable: boolean): {
|
|
|
36
36
|
layoutContainer: string;
|
|
37
37
|
layoutItem: string | false;
|
|
38
38
|
selfEvaluation: string;
|
|
39
|
-
toggle: {
|
|
40
|
-
container: string;
|
|
41
|
-
title: string;
|
|
42
|
-
iconBtn: string;
|
|
43
|
-
content: string;
|
|
44
|
-
};
|
|
45
39
|
};
|