@team-monolith/cds 1.10.0 → 1.10.2

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 (42) hide show
  1. package/dist/icons/Custom.d.ts +1 -0
  2. package/dist/patterns/LexicalEditor/LexicalCustomConfigContext.d.ts +6 -0
  3. package/dist/patterns/LexicalEditor/LexicalCustomConfigContext.js +5 -0
  4. package/dist/patterns/LexicalEditor/LexicalEditor.d.ts +4 -0
  5. package/dist/patterns/LexicalEditor/LexicalEditor.js +5 -2
  6. package/dist/patterns/LexicalEditor/Plugins.d.ts +1 -0
  7. package/dist/patterns/LexicalEditor/Plugins.js +4 -3
  8. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +16 -9
  9. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/ProblemSelectNode.d.ts +45 -0
  10. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/ProblemSelectNode.js +74 -0
  11. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox.d.ts +11 -0
  12. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox.js +73 -0
  13. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.d.ts +9 -0
  14. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +85 -0
  15. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.d.ts +14 -0
  16. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +91 -0
  17. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageDialog.d.ts +10 -0
  18. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageDialog.js +109 -0
  19. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageUploadedDialogBody.d.ts +9 -0
  20. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageUploadedDialogBody.js +50 -0
  21. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageUriDialogBody.d.ts +8 -0
  22. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/InsertImageUriDialogBody.js +17 -0
  23. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.d.ts +8 -0
  24. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +146 -0
  25. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/index.d.ts +1 -0
  26. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/index.js +1 -0
  27. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/index.d.ts +2 -0
  28. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/index.js +2 -0
  29. package/dist/patterns/LexicalEditor/plugins/ActionsPlugin/index.d.ts +9 -0
  30. package/dist/patterns/LexicalEditor/plugins/ActionsPlugin/index.js +24 -0
  31. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +15 -0
  32. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +13 -1
  33. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/InsertImageDialog.js +7 -6
  34. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/InsertImageUploadedDialogBody.d.ts +13 -4
  35. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/InsertImageUploadedDialogBody.js +5 -6
  36. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/InsertImageUriDialogBody.d.ts +9 -4
  37. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/InsertImageUriDialogBody.js +4 -7
  38. package/dist/patterns/LexicalEditor/plugins/ProblemSelectPlugin/index.d.ts +5 -0
  39. package/dist/patterns/LexicalEditor/plugins/ProblemSelectPlugin/index.js +20 -0
  40. package/dist/patterns/LexicalEditor/theme.d.ts +1 -0
  41. package/dist/patterns/LexicalEditor/theme.js +7 -0
  42. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
2
+ import { $insertNodeToNearestRoot } from "@lexical/utils";
3
+ import { COMMAND_PRIORITY_EDITOR, createCommand, } from "lexical";
4
+ import { useEffect } from "react";
5
+ import { $createProblemSelectNode, ProblemSelectNode, } from "../../nodes/ProblemSelectNode";
6
+ export const INSERT_PROBLEM_SELECT_COMMAND = createCommand("INSERT_PROBLEM_SELECT_COMMAND");
7
+ export default function ProblemInputPlugin() {
8
+ const [editor] = useLexicalComposerContext();
9
+ useEffect(() => {
10
+ if (!editor.hasNodes([ProblemSelectNode])) {
11
+ throw new Error("ProblemSelectNode: ProblemSelectNode not registered on editor");
12
+ }
13
+ editor.registerCommand(INSERT_PROBLEM_SELECT_COMMAND, (payload) => {
14
+ const problemInputNode = $createProblemSelectNode(payload);
15
+ $insertNodeToNearestRoot(problemInputNode);
16
+ return true;
17
+ }, COMMAND_PRIORITY_EDITOR);
18
+ }, [editor]);
19
+ return null;
20
+ }
@@ -29,4 +29,5 @@ export declare function getTheme(theme: Theme): {
29
29
  strikethrough: string;
30
30
  };
31
31
  problemInput: string;
32
+ problemSelect: string;
32
33
  };
@@ -252,6 +252,13 @@ export function getTheme(theme) {
252
252
  flex: 1;
253
253
  gap: 4px;
254
254
  margin-bottom: 8px;
255
+ `,
256
+ problemSelect: css `
257
+ display: flex;
258
+ flex-direction: column;
259
+ flex: 1;
260
+ gap: 4px;
261
+ margin-bottom: 8px;
255
262
  `,
256
263
  };
257
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,