@team-monolith/cds 1.10.6 → 1.11.1

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 (55) hide show
  1. package/dist/CodleDesignSystemProvider.d.ts +0 -12
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +0 -1
  4. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +24 -15
  5. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.d.ts +12 -0
  6. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SegmentedInput.js +120 -0
  7. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.d.ts +6 -0
  8. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/TextInput.js +28 -0
  9. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox.js +5 -0
  10. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +1 -1
  11. package/package.json +2 -15
  12. package/dist/patterns/ReactEditorJS/Layout.d.ts +0 -8
  13. package/dist/patterns/ReactEditorJS/Layout.js +0 -91
  14. package/dist/patterns/ReactEditorJS/ReactEditorJS.d.ts +0 -15
  15. package/dist/patterns/ReactEditorJS/ReactEditorJS.js +0 -87
  16. package/dist/patterns/ReactEditorJS/customTools/block/Callout.d.ts +0 -38
  17. package/dist/patterns/ReactEditorJS/customTools/block/Callout.js +0 -162
  18. package/dist/patterns/ReactEditorJS/customTools/block/Delimiter.d.ts +0 -10
  19. package/dist/patterns/ReactEditorJS/customTools/block/Delimiter.js +0 -26
  20. package/dist/patterns/ReactEditorJS/customTools/block/Header.d.ts +0 -60
  21. package/dist/patterns/ReactEditorJS/customTools/block/Header.js +0 -122
  22. package/dist/patterns/ReactEditorJS/customTools/block/Image.d.ts +0 -22
  23. package/dist/patterns/ReactEditorJS/customTools/block/Image.js +0 -61
  24. package/dist/patterns/ReactEditorJS/customTools/block/NestedList.d.ts +0 -28
  25. package/dist/patterns/ReactEditorJS/customTools/block/NestedList.js +0 -74
  26. package/dist/patterns/ReactEditorJS/customTools/block/Quote.d.ts +0 -42
  27. package/dist/patterns/ReactEditorJS/customTools/block/Quote.js +0 -171
  28. package/dist/patterns/ReactEditorJS/customTools/block/Raw.d.ts +0 -30
  29. package/dist/patterns/ReactEditorJS/customTools/block/Raw.js +0 -107
  30. package/dist/patterns/ReactEditorJS/customTools/block/Table.d.ts +0 -9
  31. package/dist/patterns/ReactEditorJS/customTools/block/Table.js +0 -28
  32. package/dist/patterns/ReactEditorJS/customTools/index.d.ts +0 -16
  33. package/dist/patterns/ReactEditorJS/customTools/index.js +0 -16
  34. package/dist/patterns/ReactEditorJS/customTools/inline/Bold.d.ts +0 -52
  35. package/dist/patterns/ReactEditorJS/customTools/inline/Bold.js +0 -83
  36. package/dist/patterns/ReactEditorJS/customTools/inline/InlineCode.d.ts +0 -4
  37. package/dist/patterns/ReactEditorJS/customTools/inline/InlineCode.js +0 -7
  38. package/dist/patterns/ReactEditorJS/customTools/inline/Italic.d.ts +0 -48
  39. package/dist/patterns/ReactEditorJS/customTools/inline/Italic.js +0 -79
  40. package/dist/patterns/ReactEditorJS/customTools/inline/StrikeThrough.d.ts +0 -4
  41. package/dist/patterns/ReactEditorJS/customTools/inline/StrikeThrough.js +0 -7
  42. package/dist/patterns/ReactEditorJS/customTools/inline/Underline.d.ts +0 -4
  43. package/dist/patterns/ReactEditorJS/customTools/inline/Underline.js +0 -7
  44. package/dist/patterns/ReactEditorJS/customTools/tunes/Delete.d.ts +0 -30
  45. package/dist/patterns/ReactEditorJS/customTools/tunes/Delete.js +0 -36
  46. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveDown.d.ts +0 -34
  47. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveDown.js +0 -58
  48. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveUp.d.ts +0 -34
  49. package/dist/patterns/ReactEditorJS/customTools/tunes/MoveUp.js +0 -68
  50. package/dist/patterns/ReactEditorJS/i18n.d.ts +0 -128
  51. package/dist/patterns/ReactEditorJS/i18n.js +0 -128
  52. package/dist/patterns/ReactEditorJS/index.d.ts +0 -3
  53. package/dist/patterns/ReactEditorJS/index.js +0 -3
  54. package/dist/patterns/ReactEditorJS/tools.d.ts +0 -80
  55. package/dist/patterns/ReactEditorJS/tools.js +0 -106
@@ -1,7 +0,0 @@
1
- import EditorJSUnderline from "@editorjs/underline";
2
- import { underlineSvg } from "../../../../icons";
3
- export class Underline extends EditorJSUnderline {
4
- get toolboxIcon() {
5
- return `<img src="${underlineSvg}" />`;
6
- }
7
- }
@@ -1,30 +0,0 @@
1
- import { BlockTune, API } from "@editorjs/editorjs";
2
- import { TunesMenuConfig } from "@editorjs/editorjs/types/tools";
3
- export declare class Delete implements BlockTune {
4
- /**
5
- * Set Tool is Tune
6
- */
7
- static readonly isTune = true;
8
- /**
9
- * Property that contains Editor.js API methods
10
- *
11
- * @see {@link docs/api.md}
12
- */
13
- private readonly api;
14
- /**
15
- * DeleteTune constructor
16
- *
17
- * @param {API} api - Editor's API
18
- */
19
- constructor({ api }: {
20
- api: API;
21
- });
22
- /**
23
- * Tune's appearance in block settings menu
24
- */
25
- render(): TunesMenuConfig;
26
- /**
27
- * Delete block conditions passed
28
- */
29
- handleClick(): void;
30
- }
@@ -1,36 +0,0 @@
1
- import { closeFillSvg } from "../../../../icons";
2
- // https://github.com/codex-team/editor.js/blob/next/src/components/block-tunes/block-tune-delete.ts
3
- export class Delete {
4
- /**
5
- * DeleteTune constructor
6
- *
7
- * @param {API} api - Editor's API
8
- */
9
- constructor({ api }) {
10
- this.api = api;
11
- }
12
- /**
13
- * Tune's appearance in block settings menu
14
- */
15
- render() {
16
- return {
17
- icon: `<img src="${closeFillSvg}" />`,
18
- title: this.api.i18n.t("Delete"),
19
- name: "delete",
20
- confirmation: {
21
- title: this.api.i18n.t("Click to delete"),
22
- onActivate: () => this.handleClick(),
23
- },
24
- };
25
- }
26
- /**
27
- * Delete block conditions passed
28
- */
29
- handleClick() {
30
- this.api.blocks.delete();
31
- }
32
- }
33
- /**
34
- * Set Tool is Tune
35
- */
36
- Delete.isTune = true;
@@ -1,34 +0,0 @@
1
- import { BlockTune, API } from "@editorjs/editorjs";
2
- import { TunesMenuConfig } from "@editorjs/editorjs/types/tools";
3
- export declare class MoveDown implements BlockTune {
4
- /**
5
- * Set Tool is Tune
6
- */
7
- static readonly isTune = true;
8
- /**
9
- * Property that contains Editor.js API methods
10
- *
11
- * @see {@link docs/api.md}
12
- */
13
- private readonly api;
14
- /**
15
- * Styles
16
- */
17
- private CSS;
18
- /**
19
- * MoveDownTune constructor
20
- *
21
- * @param {API} api — Editor's API
22
- */
23
- constructor({ api }: {
24
- api: API;
25
- });
26
- /**
27
- * Tune's appearance in block settings menu
28
- */
29
- render(): TunesMenuConfig;
30
- /**
31
- * Handle clicks on 'move down' button
32
- */
33
- handleClick(): void;
34
- }
@@ -1,58 +0,0 @@
1
- import { arrowDownLineSvg } from "../../../../icons";
2
- // https://github.com/codex-team/editor.js/blob/next/src/components/block-tunes/block-tune-move-down.ts
3
- export class MoveDown {
4
- /**
5
- * MoveDownTune constructor
6
- *
7
- * @param {API} api — Editor's API
8
- */
9
- constructor({ api }) {
10
- /**
11
- * Styles
12
- */
13
- this.CSS = {
14
- animation: "wobble",
15
- };
16
- this.api = api;
17
- }
18
- /**
19
- * Tune's appearance in block settings menu
20
- */
21
- render() {
22
- return {
23
- icon: `<img src="${arrowDownLineSvg}" />`,
24
- title: this.api.i18n.t("Move down"),
25
- onActivate: () => this.handleClick(),
26
- name: "move-down",
27
- };
28
- }
29
- /**
30
- * Handle clicks on 'move down' button
31
- */
32
- handleClick() {
33
- const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();
34
- const nextBlock = this.api.blocks.getBlockByIndex(currentBlockIndex + 1);
35
- // If Block is last do nothing
36
- if (!nextBlock) {
37
- throw new Error("Unable to move Block down since it is already the last");
38
- }
39
- const nextBlockElement = nextBlock.holder;
40
- const nextBlockCoords = nextBlockElement.getBoundingClientRect();
41
- let scrollOffset = Math.abs(window.innerHeight - nextBlockElement.offsetHeight);
42
- /**
43
- * Next block ends on screen.
44
- * Increment scroll by next block's height to save element onscreen-position
45
- */
46
- if (nextBlockCoords.top < window.innerHeight) {
47
- scrollOffset = window.scrollY + nextBlockElement.offsetHeight;
48
- }
49
- window.scrollTo(0, scrollOffset);
50
- /** Change blocks positions */
51
- this.api.blocks.move(currentBlockIndex + 1);
52
- this.api.toolbar.toggleBlockSettings(true);
53
- }
54
- }
55
- /**
56
- * Set Tool is Tune
57
- */
58
- MoveDown.isTune = true;
@@ -1,34 +0,0 @@
1
- import { BlockTune, API } from "@editorjs/editorjs";
2
- import { TunesMenuConfig } from "@editorjs/editorjs/types/tools";
3
- export declare class MoveUp implements BlockTune {
4
- /**
5
- * Set Tool is Tune
6
- */
7
- static readonly isTune = true;
8
- /**
9
- * Property that contains Editor.js API methods
10
- *
11
- * @see {@link docs/api.md}
12
- */
13
- private readonly api;
14
- /**
15
- * Styles
16
- */
17
- private CSS;
18
- /**
19
- * MoveUpTune constructor
20
- *
21
- * @param {API} api - Editor's API
22
- */
23
- constructor({ api }: {
24
- api: API;
25
- });
26
- /**
27
- * Tune's appearance in block settings menu
28
- */
29
- render(): TunesMenuConfig;
30
- /**
31
- * Move current block up
32
- */
33
- handleClick(): void;
34
- }
@@ -1,68 +0,0 @@
1
- import { arrowUpLineSvg } from "../../../../icons";
2
- // https://github.com/codex-team/editor.js/blob/next/src/components/block-tunes/block-tune-move-up.ts
3
- export class MoveUp {
4
- /**
5
- * MoveUpTune constructor
6
- *
7
- * @param {API} api - Editor's API
8
- */
9
- constructor({ api }) {
10
- /**
11
- * Styles
12
- */
13
- this.CSS = {
14
- animation: "wobble",
15
- };
16
- this.api = api;
17
- }
18
- /**
19
- * Tune's appearance in block settings menu
20
- */
21
- render() {
22
- return {
23
- icon: `<img src="${arrowUpLineSvg}" />`,
24
- title: this.api.i18n.t("Move up"),
25
- onActivate: () => this.handleClick(),
26
- name: "move-up",
27
- };
28
- }
29
- /**
30
- * Move current block up
31
- */
32
- handleClick() {
33
- const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();
34
- const currentBlock = this.api.blocks.getBlockByIndex(currentBlockIndex);
35
- const previousBlock = this.api.blocks.getBlockByIndex(currentBlockIndex - 1);
36
- if (currentBlockIndex === 0 || !currentBlock || !previousBlock) {
37
- throw new Error("Unable to move Block up since it is already the first");
38
- }
39
- const currentBlockElement = currentBlock.holder;
40
- const previousBlockElement = previousBlock.holder;
41
- /**
42
- * Here is two cases:
43
- * - when previous block has negative offset and part of it is visible on window, then we scroll
44
- * by window's height and add offset which is mathematically difference between two blocks
45
- *
46
- * - when previous block is visible and has offset from the window,
47
- * than we scroll window to the difference between this offsets.
48
- */
49
- const currentBlockCoords = currentBlockElement.getBoundingClientRect(), previousBlockCoords = previousBlockElement.getBoundingClientRect();
50
- let scrollUpOffset;
51
- if (previousBlockCoords.top > 0) {
52
- scrollUpOffset =
53
- Math.abs(currentBlockCoords.top) - Math.abs(previousBlockCoords.top);
54
- }
55
- else {
56
- scrollUpOffset =
57
- Math.abs(currentBlockCoords.top) + previousBlockCoords.height;
58
- }
59
- window.scrollBy(0, -1 * scrollUpOffset);
60
- /** Change blocks positions */
61
- this.api.blocks.move(currentBlockIndex - 1);
62
- this.api.toolbar.toggleBlockSettings(true);
63
- }
64
- }
65
- /**
66
- * Set Tool is Tune
67
- */
68
- MoveUp.isTune = true;
@@ -1,128 +0,0 @@
1
- declare const I18n: {
2
- messages: {
3
- ui: {
4
- blockTunes: {
5
- toggler: {
6
- "Click to tune": string;
7
- "or drag to move": string;
8
- };
9
- };
10
- inlineToolbar: {
11
- converter: {
12
- "Convert to": string;
13
- };
14
- };
15
- toolbar: {
16
- toolbox: {
17
- Add: string;
18
- };
19
- };
20
- popover: {
21
- Filter: string;
22
- "Nothing found": string;
23
- };
24
- };
25
- toolNames: {
26
- Text: string;
27
- HeadingBig: string;
28
- HeadingMedium: string;
29
- HeadingSmall: string;
30
- ListUnordered: string;
31
- ListOrdered: string;
32
- Warning: string;
33
- Code: string;
34
- Quote: string;
35
- Callout: string;
36
- Delimiter: string;
37
- Table: string;
38
- Image: string;
39
- Link: string;
40
- Marker: string;
41
- Bold: string;
42
- Italic: string;
43
- InlineCode: string;
44
- Toggle: string;
45
- StrikeThrough: string;
46
- Underline: string;
47
- };
48
- tools: {
49
- header: {
50
- header: string;
51
- sub_header: string;
52
- sub_sub_header: string;
53
- };
54
- sub_header: {
55
- header: string;
56
- sub_header: string;
57
- sub_sub_header: string;
58
- };
59
- sub_sub_header: {
60
- header: string;
61
- sub_header: string;
62
- sub_sub_header: string;
63
- };
64
- bulleted_list: {
65
- Ordered: string;
66
- Unordered: string;
67
- };
68
- numbered_list: {
69
- Ordered: string;
70
- Unordered: string;
71
- };
72
- quote: {
73
- Grey: string;
74
- Red: string;
75
- Yellow: string;
76
- Blue: string;
77
- Green: string;
78
- };
79
- callout: {
80
- Grey: string;
81
- Red: string;
82
- Yellow: string;
83
- Blue: string;
84
- Green: string;
85
- };
86
- link: {
87
- "Add a link": string;
88
- };
89
- raw: {
90
- "Light Theme": string;
91
- "Dark Theme": string;
92
- };
93
- stub: {
94
- "The block can not be displayed correctly.": string;
95
- };
96
- table: {
97
- "With headings": string;
98
- "Without headings": string;
99
- Heading: string;
100
- "Add column to left": string;
101
- "Add column to right": string;
102
- "Delete column": string;
103
- "Add row above": string;
104
- "Add row below": string;
105
- "Delete row": string;
106
- };
107
- image: {
108
- "With border": string;
109
- "Stretch image": string;
110
- "With background": string;
111
- Caption: string;
112
- };
113
- };
114
- blockTunes: {
115
- delete: {
116
- Delete: string;
117
- "Click to delete": string;
118
- };
119
- moveUp: {
120
- "Move up": string;
121
- };
122
- moveDown: {
123
- "Move down": string;
124
- };
125
- };
126
- };
127
- };
128
- export default I18n;
@@ -1,128 +0,0 @@
1
- const I18n = {
2
- messages: {
3
- ui: {
4
- blockTunes: {
5
- toggler: {
6
- "Click to tune": "클릭하여 변환",
7
- "or drag to move": "드래그하여 이동",
8
- },
9
- },
10
- inlineToolbar: {
11
- converter: {
12
- "Convert to": "블록 유형 변경",
13
- },
14
- },
15
- toolbar: {
16
- toolbox: {
17
- Add: "추가하기",
18
- },
19
- },
20
- popover: {
21
- Filter: "찾기",
22
- "Nothing found": "항목이 없습니다.",
23
- },
24
- },
25
- toolNames: {
26
- Text: "본문",
27
- HeadingBig: "큰 제목",
28
- HeadingMedium: "중간 제목",
29
- HeadingSmall: "작은 제목",
30
- ListUnordered: "일반 목록",
31
- ListOrdered: "숫자 목록",
32
- Warning: "경고",
33
- Code: "코드 블록",
34
- Quote: "인용 블록",
35
- Callout: "주목 블록",
36
- Delimiter: "구분선",
37
- Table: "표",
38
- Image: "이미지",
39
- Link: "링크",
40
- Marker: "마커",
41
- Bold: "굵게",
42
- Italic: "기울임",
43
- InlineCode: "인라인 코드",
44
- Toggle: "토글",
45
- StrikeThrough: "취소선",
46
- Underline: "밑줄",
47
- },
48
- tools: {
49
- header: {
50
- header: "큰 제목",
51
- sub_header: "중간 제목",
52
- sub_sub_header: "작은 제목",
53
- },
54
- sub_header: {
55
- header: "큰 제목",
56
- sub_header: "중간 제목",
57
- sub_sub_header: "작은 제목",
58
- },
59
- sub_sub_header: {
60
- header: "큰 제목",
61
- sub_header: "중간 제목",
62
- sub_sub_header: "작은 제목",
63
- },
64
- bulleted_list: {
65
- Ordered: "숫자 목록",
66
- Unordered: "일반 목록",
67
- },
68
- numbered_list: {
69
- Ordered: "숫자 목록",
70
- Unordered: "일반 목록",
71
- },
72
- quote: {
73
- Grey: "회색",
74
- Red: "빨간색",
75
- Yellow: "노란색",
76
- Blue: "파란색",
77
- Green: "초록색",
78
- },
79
- callout: {
80
- Grey: "회색",
81
- Red: "빨간색",
82
- Yellow: "노란색",
83
- Blue: "파란색",
84
- Green: "초록색",
85
- },
86
- link: {
87
- "Add a link": "링크 추가하기",
88
- },
89
- raw: {
90
- "Light Theme": "밝은 배경",
91
- "Dark Theme": "어두운 배경",
92
- },
93
- stub: {
94
- "The block can not be displayed correctly.": "이 블록은 올바르게 표시될 수 없습니다.",
95
- },
96
- table: {
97
- "With headings": "제목 행 있음",
98
- "Without headings": "제목 행 없음",
99
- Heading: "제목",
100
- "Add column to left": "왼쪽에 열 추가",
101
- "Add column to right": "오른쪽에 열 추가",
102
- "Delete column": "이 열 삭제",
103
- "Add row above": "위에 행 추가",
104
- "Add row below": "아래에 행 추가",
105
- "Delete row": "이 행 삭제",
106
- },
107
- image: {
108
- "With border": "테두리 넣기",
109
- "Stretch image": "이미지 폭 넓게",
110
- "With background": "배경 넣기",
111
- Caption: "캡션 넣기",
112
- },
113
- },
114
- blockTunes: {
115
- delete: {
116
- Delete: "블록 삭제",
117
- "Click to delete": "클릭하여 삭제하기",
118
- },
119
- moveUp: {
120
- "Move up": "위로 이동",
121
- },
122
- moveDown: {
123
- "Move down": "아래로 이동",
124
- },
125
- },
126
- },
127
- };
128
- export default I18n;
@@ -1,3 +0,0 @@
1
- import TOOLS from "./tools";
2
- export * from "./ReactEditorJS";
3
- export { TOOLS };
@@ -1,3 +0,0 @@
1
- import TOOLS from "./tools";
2
- export * from "./ReactEditorJS";
3
- export { TOOLS };
@@ -1,80 +0,0 @@
1
- import { Bold, HeaderBig, HeaderMedium, HeaderSmall, ListOrdered, ListUnordered, Raw, Delimiter, Table, Image, Quote, Callout, Italic, InlineCode, StrikeThrough, Underline, MoveDown, MoveUp, Delete } from "./customTools";
2
- declare const TOOLS: {
3
- paragraph: {
4
- class: any;
5
- toolbox: {
6
- icon: string;
7
- };
8
- };
9
- header: {
10
- class: typeof HeaderBig;
11
- inlineToolbar: string[];
12
- };
13
- sub_header: {
14
- class: typeof HeaderMedium;
15
- inlineToolbar: string[];
16
- };
17
- sub_sub_header: {
18
- class: typeof HeaderSmall;
19
- inlineToolbar: string[];
20
- };
21
- bulleted_list: {
22
- class: typeof ListUnordered;
23
- inlineToolbar: string[];
24
- pasteConfig: {
25
- tags: string[];
26
- };
27
- };
28
- numbered_list: {
29
- class: typeof ListOrdered;
30
- inlineToolbar: string[];
31
- config: {
32
- defaultStyle: string;
33
- };
34
- pasteConfig: {
35
- tags: string[];
36
- };
37
- };
38
- quote: typeof Quote;
39
- callout: typeof Callout;
40
- raw: {
41
- class: typeof Raw;
42
- config: {
43
- placeholder: string;
44
- };
45
- };
46
- delimiter: typeof Delimiter;
47
- table: {
48
- class: typeof Table;
49
- config: {
50
- withHeadings: boolean;
51
- };
52
- };
53
- image: {
54
- class: typeof Image;
55
- };
56
- bold: {
57
- class: typeof Bold;
58
- shortcut: string;
59
- };
60
- italic: {
61
- class: typeof Italic;
62
- shortcut: string;
63
- };
64
- inlineCode: {
65
- class: typeof InlineCode;
66
- shortcut: string;
67
- };
68
- strikeThrough: {
69
- class: typeof StrikeThrough;
70
- shortcut: string;
71
- };
72
- underline: {
73
- class: typeof Underline;
74
- shortcut: string;
75
- };
76
- moveUp: typeof MoveUp;
77
- delete: typeof Delete;
78
- moveDown: typeof MoveDown;
79
- };
80
- export default TOOLS;