@flozy/editor 10.0.3 → 10.0.4

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 (179) hide show
  1. package/dist/Editor/ChatEditor.js +14 -7
  2. package/dist/Editor/CommonEditor.js +30 -13
  3. package/dist/Editor/Editor.css +1 -1
  4. package/dist/Editor/Elements/AI/AIInput.js +5 -3
  5. package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -2
  7. package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
  8. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
  9. package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
  10. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
  11. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
  12. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
  13. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
  14. package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
  15. package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
  16. package/dist/Editor/Elements/Button/EditorButton.js +6 -5
  17. package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
  18. package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
  19. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
  20. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
  21. package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
  22. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
  23. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
  24. package/dist/Editor/Elements/DataView/DataView.js +5 -2
  25. package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
  26. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
  27. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
  28. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
  29. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
  30. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -2
  31. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
  32. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
  33. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
  34. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -6
  35. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
  36. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
  37. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
  38. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +12 -6
  39. package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
  40. package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
  41. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
  42. package/dist/Editor/Elements/Divider/Divider.js +5 -3
  43. package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
  44. package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
  45. package/dist/Editor/Elements/Embed/Embed.js +4 -1
  46. package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
  47. package/dist/Editor/Elements/Embed/Image.js +16 -11
  48. package/dist/Editor/Elements/Embed/Video.js +10 -7
  49. package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
  50. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
  51. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
  52. package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
  53. package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
  54. package/dist/Editor/Elements/Form/Form.js +12 -9
  55. package/dist/Editor/Elements/Form/FormButton.js +6 -2
  56. package/dist/Editor/Elements/Form/FormPopup.js +3 -2
  57. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +18 -12
  58. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
  59. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
  60. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
  61. package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
  62. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +168 -97
  63. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
  64. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
  65. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +54 -6
  66. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
  67. package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
  68. package/dist/Editor/Elements/Grid/Grid.js +13 -10
  69. package/dist/Editor/Elements/Grid/GridButton.js +9 -5
  70. package/dist/Editor/Elements/Grid/GridItem.js +13 -7
  71. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
  72. package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
  73. package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
  74. package/dist/Editor/Elements/Link/Link.js +8 -5
  75. package/dist/Editor/Elements/Link/LinkButton.js +4 -1
  76. package/dist/Editor/Elements/List/CheckList.js +14 -9
  77. package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
  78. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
  79. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
  80. package/dist/Editor/Elements/Search/SearchButton.js +6 -3
  81. package/dist/Editor/Elements/Search/SearchList.js +7 -3
  82. package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
  83. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
  84. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
  85. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
  86. package/dist/Editor/Elements/SimpleText/index.js +5 -4
  87. package/dist/Editor/Elements/Table/DragButton.js +4 -2
  88. package/dist/Editor/Elements/Table/Table.js +21 -9
  89. package/dist/Editor/Elements/Table/TablePopup.js +4 -1
  90. package/dist/Editor/Elements/Table/TableSelector.js +10 -6
  91. package/dist/Editor/Elements/Table/TableTool.js +8 -4
  92. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
  93. package/dist/Editor/MiniEditor.js +9 -3
  94. package/dist/Editor/Toolbar/Basic/index.js +2 -1
  95. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
  96. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +6 -2
  97. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
  98. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
  99. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
  100. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
  101. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +6 -2
  102. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
  103. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
  104. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
  105. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -73
  106. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +14 -7
  107. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
  108. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
  109. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +32 -27
  110. package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
  111. package/dist/Editor/Toolbar/Toolbar.js +20 -10
  112. package/dist/Editor/common/CustomDialog/index.js +8 -10
  113. package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
  114. package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
  115. package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
  116. package/dist/Editor/common/LinkSettings/index.js +20 -14
  117. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  118. package/dist/Editor/common/MentionsPopup/index.js +6 -2
  119. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +46 -22
  120. package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
  121. package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
  122. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
  123. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -2
  124. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +3 -2
  125. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
  126. package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
  127. package/dist/Editor/common/RnD/ShadowElement.js +2 -1
  128. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -3
  129. package/dist/Editor/common/RnD/Utils/gridDropItem.js +74 -9
  130. package/dist/Editor/common/RnD/Utils/index.js +3 -0
  131. package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
  132. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
  133. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
  134. package/dist/Editor/common/RnD/VirtualElement/helper.js +382 -0
  135. package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
  136. package/dist/Editor/common/RnD/VirtualElement/styles.js +157 -7
  137. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
  138. package/dist/Editor/common/RnD/index.js +76 -8
  139. package/dist/Editor/common/Section/index.js +7 -4
  140. package/dist/Editor/common/Shorthands/elements.js +18 -3
  141. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  142. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  143. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -2
  144. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  145. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  146. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +13 -9
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +6 -3
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -3
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -3
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +11 -5
  153. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +9 -5
  154. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
  155. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -2
  156. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
  157. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
  158. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
  159. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
  160. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
  161. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
  162. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  163. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
  164. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +6 -5
  165. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  166. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  167. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  168. package/dist/Editor/common/StyleBuilder/index.js +8 -5
  169. package/dist/Editor/common/Uploader.js +8 -5
  170. package/dist/Editor/helper/index.js +27 -3
  171. package/dist/Editor/hooks/useAutoScroll.js +38 -0
  172. package/dist/Editor/plugins/withHTML.js +7 -6
  173. package/dist/Editor/plugins/withLayout.js +3 -2
  174. package/dist/Editor/plugins/withLinks.js +9 -0
  175. package/dist/Editor/utils/SlateUtilityFunctions.js +20 -11
  176. package/dist/Editor/utils/brains.js +1 -2
  177. package/dist/Editor/utils/freegrid.js +3 -4
  178. package/dist/Editor/utils/helper.js +2 -2
  179. package/package.json +1 -1
@@ -6,7 +6,8 @@ const Select = props => {
6
6
  const {
7
7
  classes,
8
8
  data,
9
- onSelectTemplate
9
+ onSelectTemplate,
10
+ translation
10
11
  } = props;
11
12
  return /*#__PURE__*/_jsx(Box, {
12
13
  className: "template-card-action",
@@ -19,7 +20,7 @@ const Select = props => {
19
20
  children: /*#__PURE__*/_jsx(Button, {
20
21
  className: "blueBtn",
21
22
  onClick: onSelectTemplate(data),
22
- children: "Select"
23
+ children: translation("Select")
23
24
  })
24
25
  });
25
26
  };
@@ -27,8 +28,12 @@ const ButtonTemplateCard = props => {
27
28
  const {
28
29
  classes,
29
30
  m,
30
- onSelectTemplate
31
+ onSelectTemplate,
32
+ customProps
31
33
  } = props;
34
+ const {
35
+ translation
36
+ } = customProps;
32
37
  return /*#__PURE__*/_jsx(Grid, {
33
38
  item: true,
34
39
  xs: 3,
@@ -45,7 +50,8 @@ const ButtonTemplateCard = props => {
45
50
  }), /*#__PURE__*/_jsx(Select, {
46
51
  classes: classes,
47
52
  onSelectTemplate: onSelectTemplate,
48
- data: m
53
+ data: m,
54
+ translation: translation
49
55
  })]
50
56
  })
51
57
  })
@@ -6,7 +6,8 @@ const Select = props => {
6
6
  const {
7
7
  classes,
8
8
  data,
9
- onSelectTemplate
9
+ onSelectTemplate,
10
+ translation
10
11
  } = props;
11
12
  return /*#__PURE__*/_jsx(Box, {
12
13
  className: "template-card-action",
@@ -18,7 +19,7 @@ const Select = props => {
18
19
  children: /*#__PURE__*/_jsx(Button, {
19
20
  className: "blueBtn",
20
21
  onClick: onSelectTemplate(data),
21
- children: "Select"
22
+ children: translation("Select")
22
23
  })
23
24
  });
24
25
  };
@@ -27,8 +28,12 @@ const FullViewCard = props => {
27
28
  classes,
28
29
  m,
29
30
  onSelectTemplate,
30
- height = 'smallCard'
31
+ height = 'smallCard',
32
+ customProps
31
33
  } = props;
34
+ const {
35
+ translation
36
+ } = customProps;
32
37
  return /*#__PURE__*/_jsx(Grid, {
33
38
  item: true,
34
39
  xs: 12,
@@ -46,7 +51,8 @@ const FullViewCard = props => {
46
51
  }), /*#__PURE__*/_jsx(Select, {
47
52
  classes: classes,
48
53
  onSelectTemplate: onSelectTemplate,
49
- data: m
54
+ data: m,
55
+ translation: translation
50
56
  })]
51
57
  })
52
58
  })
@@ -11,9 +11,13 @@ function MiniColorPicker(props) {
11
11
  format,
12
12
  classes,
13
13
  id,
14
- editor
14
+ editor,
15
+ customProps
15
16
  } = props;
16
17
  const [openColorTool, setOpenColorTool] = useState(null);
18
+ const {
19
+ translation
20
+ } = customProps;
17
21
  return /*#__PURE__*/_jsxs("div", {
18
22
  children: [/*#__PURE__*/_jsxs(Button, {
19
23
  className: "fontColorBtn",
@@ -29,7 +33,7 @@ function MiniColorPicker(props) {
29
33
  activeMark: activeMark,
30
34
  editor: editor,
31
35
  showHex: false,
32
- title: "Text Color",
36
+ title: translation("Text Color"),
33
37
  id: id,
34
38
  classes: classes,
35
39
  forMiniTool: true,
@@ -15,45 +15,52 @@ function Label({
15
15
  }), " ", label]
16
16
  });
17
17
  }
18
- const alignmentOptions = [{
19
- id: 17,
20
- value: "alignLeft",
21
- type: "block",
22
- title: /*#__PURE__*/_jsx(Label, {
23
- icon: "alignLeft",
24
- label: "Left Align"
25
- }),
26
- label: /*#__PURE__*/_jsx(Icon, {
27
- icon: "alignLeft"
28
- })
29
- }, {
30
- id: 18,
31
- value: "alignCenter",
32
- type: "block",
33
- title: /*#__PURE__*/_jsx(Label, {
34
- icon: "alignCenter",
35
- label: "Center Align"
36
- }),
37
- label: /*#__PURE__*/_jsx(Icon, {
38
- icon: "alignCenter"
39
- })
40
- }, {
41
- id: 19,
42
- value: "alignRight",
43
- type: "block",
44
- title: /*#__PURE__*/_jsx(Label, {
45
- icon: "alignRight",
46
- label: "Right Align"
47
- }),
48
- label: /*#__PURE__*/_jsx(Icon, {
49
- icon: "alignRight"
50
- })
51
- }];
18
+ function getAlignmentOptions(translation) {
19
+ return [{
20
+ id: 17,
21
+ value: "alignLeft",
22
+ type: "block",
23
+ title: /*#__PURE__*/_jsx(Label, {
24
+ icon: "alignLeft",
25
+ label: translation("Left Align")
26
+ }),
27
+ label: /*#__PURE__*/_jsx(Icon, {
28
+ icon: "alignLeft"
29
+ })
30
+ }, {
31
+ id: 18,
32
+ value: "alignCenter",
33
+ type: "block",
34
+ title: /*#__PURE__*/_jsx(Label, {
35
+ icon: "alignCenter",
36
+ label: translation("Center Align")
37
+ }),
38
+ label: /*#__PURE__*/_jsx(Icon, {
39
+ icon: "alignCenter"
40
+ })
41
+ }, {
42
+ id: 19,
43
+ value: "alignRight",
44
+ type: "block",
45
+ title: /*#__PURE__*/_jsx(Label, {
46
+ icon: "alignRight",
47
+ label: translation("Right Align")
48
+ }),
49
+ label: /*#__PURE__*/_jsx(Icon, {
50
+ icon: "alignRight"
51
+ })
52
+ }];
53
+ }
52
54
  function SelectAlignment({
53
55
  editor,
54
56
  classes,
55
- closeMainPopup
57
+ closeMainPopup,
58
+ customProps
56
59
  }) {
60
+ const {
61
+ translation
62
+ } = customProps;
63
+ const alignmentOptions = getAlignmentOptions(translation);
57
64
  const selected = useMemo(() => {
58
65
  return alignmentOptions.find(t => isBlockActive(editor, t.value));
59
66
  }, [alignmentOptions, isBlockActive, editor]);
@@ -16,61 +16,68 @@ function Label({
16
16
  }), " ", label]
17
17
  });
18
18
  }
19
- const listOptions = [{
20
- id: 15,
21
- value: "orderedList",
22
- type: "block",
23
- title: /*#__PURE__*/_jsx(Label, {
24
- icon: "orderedList",
25
- label: "Ordered List"
26
- }),
27
- label: /*#__PURE__*/_jsx(Icon, {
28
- icon: "orderedList"
29
- }),
30
- group: "list"
31
- }, {
32
- id: 16,
33
- value: "unorderedList",
34
- type: "block",
35
- title: /*#__PURE__*/_jsx(Label, {
36
- icon: "unorderedList",
37
- label: "Bulleted List"
38
- }),
39
- label: /*#__PURE__*/_jsx(Icon, {
40
- icon: "unorderedList"
41
- }),
42
- group: "list"
43
- }, {
44
- id: 43,
45
- value: "check-list-item",
46
- type: "block",
47
- title: /*#__PURE__*/_jsx(Label, {
48
- icon: "check-list-item",
49
- label: "Check List"
50
- }),
51
- label: /*#__PURE__*/_jsx(Icon, {
52
- icon: "check-list-item"
53
- }),
54
- group: "list"
55
- }, {
56
- id: 30,
57
- value: "accordion",
58
- type: "accordion",
59
- group: "list",
60
- component: "AccordionButton",
61
- title: /*#__PURE__*/_jsx(Label, {
62
- icon: "accordion",
63
- label: "Accordion"
64
- }),
65
- label: /*#__PURE__*/_jsx(Icon, {
66
- icon: "accordion"
67
- })
68
- }];
19
+ function getListOptions(translation) {
20
+ return [{
21
+ id: 15,
22
+ value: "orderedList",
23
+ type: "block",
24
+ title: /*#__PURE__*/_jsx(Label, {
25
+ icon: "orderedList",
26
+ label: translation("Ordered List")
27
+ }),
28
+ label: /*#__PURE__*/_jsx(Icon, {
29
+ icon: "orderedList"
30
+ }),
31
+ group: "list"
32
+ }, {
33
+ id: 16,
34
+ value: "unorderedList",
35
+ type: "block",
36
+ title: /*#__PURE__*/_jsx(Label, {
37
+ icon: "unorderedList",
38
+ label: translation("Bulleted List")
39
+ }),
40
+ label: /*#__PURE__*/_jsx(Icon, {
41
+ icon: "unorderedList"
42
+ }),
43
+ group: "list"
44
+ }, {
45
+ id: 43,
46
+ value: "check-list-item",
47
+ type: "block",
48
+ title: /*#__PURE__*/_jsx(Label, {
49
+ icon: "check-list-item",
50
+ label: translation("Check List")
51
+ }),
52
+ label: /*#__PURE__*/_jsx(Icon, {
53
+ icon: "check-list-item"
54
+ }),
55
+ group: "list"
56
+ }, {
57
+ id: 30,
58
+ value: "accordion",
59
+ type: "accordion",
60
+ group: "list",
61
+ component: "AccordionButton",
62
+ title: /*#__PURE__*/_jsx(Label, {
63
+ icon: "accordion",
64
+ label: translation("Accordion")
65
+ }),
66
+ label: /*#__PURE__*/_jsx(Icon, {
67
+ icon: "accordion"
68
+ })
69
+ }];
70
+ }
69
71
  function SelectList({
70
72
  editor,
71
73
  classes,
72
- closeMainPopup
74
+ closeMainPopup,
75
+ customProps
73
76
  }) {
77
+ const {
78
+ translation
79
+ } = customProps;
80
+ const listOptions = getListOptions(translation);
74
81
  const selectedList = useMemo(() => {
75
82
  return listOptions.find(t => isBlockActive(editor, t.value));
76
83
  }, [listOptions, isBlockActive, editor]);
@@ -13,34 +13,41 @@ function Label({
13
13
  }), " ", type]
14
14
  });
15
15
  }
16
- const superSubscriptOptions = [{
17
- id: 9,
18
- format: "superscript",
19
- type: "mark",
20
- title: /*#__PURE__*/_jsx(Label, {
16
+ function getSubcriptOptions(translation) {
17
+ return [{
18
+ id: 9,
19
+ format: "superscript",
20
+ type: "mark",
21
+ title: /*#__PURE__*/_jsx(Label, {
22
+ label: "X²",
23
+ type: translation("Superscript")
24
+ }),
21
25
  label: "X²",
22
- type: "Superscript"
23
- }),
24
- label: "X²",
25
- group: "superSubscript",
26
- value: "superscript"
27
- }, {
28
- id: 10,
29
- format: "subscript",
30
- type: "mark",
31
- title: /*#__PURE__*/_jsx(Label, {
26
+ group: "superSubscript",
27
+ value: "superscript"
28
+ }, {
29
+ id: 10,
30
+ format: "subscript",
31
+ type: "mark",
32
+ title: /*#__PURE__*/_jsx(Label, {
33
+ label: "X₂",
34
+ type: translation("Subscript")
35
+ }),
32
36
  label: "X₂",
33
- type: "Subscript"
34
- }),
35
- label: "X₂",
36
- group: "superSubscript",
37
- value: "subscript"
38
- }];
37
+ group: "superSubscript",
38
+ value: "subscript"
39
+ }];
40
+ }
39
41
  function SelectSuperSubscript({
40
42
  editor,
41
43
  classes,
42
- closeMainPopup
44
+ closeMainPopup,
45
+ customProps
43
46
  }) {
47
+ const {
48
+ translation
49
+ } = customProps;
50
+ const superSubscriptOptions = getSubcriptOptions(translation);
44
51
  const selectedMark = useMemo(() => {
45
52
  return superSubscriptOptions.find(option => activeMark(editor, option.format));
46
53
  }, [editor]);
@@ -8,12 +8,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  function Label({
10
10
  label,
11
- type
11
+ type,
12
+ translation
12
13
  }) {
13
14
  return /*#__PURE__*/_jsxs("span", {
14
15
  children: [/*#__PURE__*/_jsx("strong", {
15
16
  children: label
16
- }), " ", type]
17
+ }), " ", translation(type)]
17
18
  });
18
19
  }
19
20
  function DisplayHeaderLabel({
@@ -25,85 +26,98 @@ function DisplayHeaderLabel({
25
26
  })]
26
27
  });
27
28
  }
28
- const typographyOptions = [{
29
- id: 11,
30
- format: "headingOne",
31
- type: "block",
32
- title: /*#__PURE__*/_jsx(Label, {
33
- label: "H1",
34
- type: "Header"
35
- }),
36
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
37
- type: 1
38
- }),
39
- group: "typography",
40
- value: "headingOne"
41
- }, {
42
- id: 12,
43
- format: "headingTwo",
44
- type: "block",
45
- title: /*#__PURE__*/_jsx(Label, {
46
- label: "H2",
47
- type: "Header"
48
- }),
49
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
50
- type: 2
51
- }),
52
- group: "typography",
53
- value: "headingTwo"
54
- }, {
55
- id: 13,
56
- format: "headingThree",
57
- type: "block",
58
- title: /*#__PURE__*/_jsx(Label, {
59
- label: "H3",
60
- type: "Header"
61
- }),
62
- label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
63
- type: 3
64
- }),
65
- group: "typography",
66
- value: "headingThree"
67
- }, {
68
- id: 14,
69
- format: "fontSize",
70
- type: "mark",
71
- title: /*#__PURE__*/_jsx(Label, {
29
+ function getTypographyOptions(translation) {
30
+ return [{
31
+ id: 11,
32
+ format: "headingOne",
33
+ type: "block",
34
+ title: /*#__PURE__*/_jsx(Label, {
35
+ label: "H1",
36
+ type: "Header",
37
+ translation: translation
38
+ }),
39
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
40
+ type: 1
41
+ }),
42
+ group: "typography",
43
+ value: "headingOne"
44
+ }, {
45
+ id: 12,
46
+ format: "headingTwo",
47
+ type: "block",
48
+ title: /*#__PURE__*/_jsx(Label, {
49
+ label: "H2",
50
+ type: "Header",
51
+ translation: translation
52
+ }),
53
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
54
+ type: 2
55
+ }),
56
+ group: "typography",
57
+ value: "headingTwo"
58
+ }, {
59
+ id: 13,
60
+ format: "headingThree",
61
+ type: "block",
62
+ title: /*#__PURE__*/_jsx(Label, {
63
+ label: "H3",
64
+ type: "Header",
65
+ translation: translation
66
+ }),
67
+ label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
68
+ type: 3
69
+ }),
70
+ group: "typography",
71
+ value: "headingThree"
72
+ }, {
73
+ id: 14,
74
+ format: "fontSize",
75
+ type: "mark",
76
+ title: /*#__PURE__*/_jsx(Label, {
77
+ label: "L",
78
+ type: "Large",
79
+ translation: translation
80
+ }),
72
81
  label: "L",
73
- type: "Large"
74
- }),
75
- label: "L",
76
- group: "typography",
77
- value: "huge"
78
- }, {
79
- id: 15,
80
- format: "fontSize",
81
- type: "mark",
82
- title: /*#__PURE__*/_jsx(Label, {
82
+ group: "typography",
83
+ value: "huge"
84
+ }, {
85
+ id: 15,
86
+ format: "fontSize",
87
+ type: "mark",
88
+ title: /*#__PURE__*/_jsx(Label, {
89
+ label: "M",
90
+ type: "Medium",
91
+ translation: translation
92
+ }),
83
93
  label: "M",
84
- type: "Medium"
85
- }),
86
- label: "M",
87
- group: "typography",
88
- value: "medium"
89
- }, {
90
- id: 16,
91
- format: "fontSize",
92
- type: "mark",
93
- title: /*#__PURE__*/_jsx(Label, {
94
+ group: "typography",
95
+ value: "medium"
96
+ }, {
97
+ id: 16,
98
+ format: "fontSize",
99
+ type: "mark",
100
+ title: /*#__PURE__*/_jsx(Label, {
101
+ label: "S",
102
+ type: "Small",
103
+ translation: translation
104
+ }),
94
105
  label: "S",
95
- type: "Small"
96
- }),
97
- label: "S",
98
- group: "typography",
99
- value: "small"
100
- }];
106
+ group: "typography",
107
+ value: "small"
108
+ }];
109
+ }
101
110
  function SelectTypography({
102
111
  editor,
103
112
  classes,
104
- closeMainPopup
113
+ closeMainPopup,
114
+ customProps
105
115
  }) {
106
116
  const [size] = useWindowResize();
117
+ const {
118
+ translation
119
+ } = customProps;
120
+ const typographyOptions = getTypographyOptions(translation);
107
121
  const updateMarkData = newVal => {
108
122
  const val = activeMark(editor, "fontSize");
109
123
  let upData = {
@@ -56,20 +56,23 @@ const MiniTextFormat = props => {
56
56
  }), /*#__PURE__*/_jsx(SelectTypography, {
57
57
  classes: classes,
58
58
  editor: editor,
59
- closeMainPopup: closeMainPopup
59
+ closeMainPopup: closeMainPopup,
60
+ customProps: customProps
60
61
  }), /*#__PURE__*/_jsx("div", {
61
62
  className: "verticalLine"
62
63
  }), /*#__PURE__*/_jsx(SelectList, {
63
64
  classes: classes,
64
65
  editor: editor,
65
- closeMainPopup: closeMainPopup
66
+ closeMainPopup: closeMainPopup,
67
+ customProps: customProps
66
68
  }), /*#__PURE__*/_jsx("div", {
67
69
  className: "verticalLine mr-1"
68
70
  }), /*#__PURE__*/_jsx(SelectAlignment, {
69
71
  fontAlign: fontAlign,
70
72
  classes: classes,
71
73
  editor: editor,
72
- closeMainPopup: closeMainPopup
74
+ closeMainPopup: closeMainPopup,
75
+ customProps: customProps
73
76
  }), /*#__PURE__*/_jsx("div", {
74
77
  className: "verticalLine mr-1"
75
78
  }), /*#__PURE__*/_jsx(SelectFontSize, {
@@ -80,20 +83,23 @@ const MiniTextFormat = props => {
80
83
  }), fontStyle?.map((m, i) => {
81
84
  return /*#__PURE__*/_jsx(MarkButton, {
82
85
  editor: editor,
83
- ...m
86
+ ...m,
87
+ customProps: customProps
84
88
  }, `pptool_mark_${i}_${m.id}`);
85
89
  }), /*#__PURE__*/_jsx(MiniColorPicker, {
86
90
  format: textColorFormat,
87
91
  classes: classes,
88
92
  activeColor: activeColor,
89
93
  id: "11_cc",
90
- editor: editor
94
+ editor: editor,
95
+ customProps: customProps
91
96
  }), /*#__PURE__*/_jsx(MiniColorPicker, {
92
97
  format: textBgFormat,
93
98
  classes: classes,
94
99
  activeColor: activeBg,
95
100
  id: "12_cc",
96
- editor: editor
101
+ editor: editor,
102
+ customProps: customProps
97
103
  }), /*#__PURE__*/_jsx("div", {
98
104
  className: "verticalLine ml-1 mr-1"
99
105
  }), /*#__PURE__*/_jsx(LinkButton, {
@@ -126,7 +132,8 @@ const MiniTextFormat = props => {
126
132
  children: [/*#__PURE__*/_jsx(PopperHeader, {
127
133
  title: "Text Settings",
128
134
  classes: classes,
129
- onClose: () => setAnchorEl(null)
135
+ onClose: () => setAnchorEl(null),
136
+ customProps: customProps
130
137
  }), /*#__PURE__*/_jsx(TextFormat, {
131
138
  editor: editor,
132
139
  classes: classes,
@@ -35,9 +35,13 @@ const PopperHeader = props => {
35
35
  fullScreen,
36
36
  toggleFullscreen,
37
37
  search,
38
- onSearch
38
+ onSearch,
39
+ customProps
39
40
  } = props;
40
41
  const [openSearch, setOpenSearch] = useState(false);
42
+ const {
43
+ translation
44
+ } = customProps;
41
45
  const handleSearchButton = () => {
42
46
  setOpenSearch(!openSearch);
43
47
  };
@@ -61,7 +65,7 @@ const PopperHeader = props => {
61
65
  fontWeight: "700",
62
66
  color: "#000"
63
67
  },
64
- children: title
68
+ children: translation(title)
65
69
  }), /*#__PURE__*/_jsxs(Grid, {
66
70
  sx: classes.textFormatLabel,
67
71
  justifyContent: "end",
@@ -82,7 +86,7 @@ const PopperHeader = props => {
82
86
  handleChange: onSearch
83
87
  })]
84
88
  }) : null, needFullscreen ? /*#__PURE__*/_jsx(Tooltip, {
85
- title: "Toggle Fullscreen",
89
+ title: translation("toggleFullScreen"),
86
90
  arrow: true,
87
91
  children: /*#__PURE__*/_jsx(IconButton, {
88
92
  style: {
@@ -94,7 +98,7 @@ const PopperHeader = props => {
94
98
  children: fullScreen ? /*#__PURE__*/_jsx(CloseFullscreenIcon, {}) : /*#__PURE__*/_jsx(ToggleFullScreenIcon, {})
95
99
  })
96
100
  }) : null, /*#__PURE__*/_jsx(Tooltip, {
97
- title: "Close",
101
+ title: translation("Close"),
98
102
  arrow: true,
99
103
  children: /*#__PURE__*/_jsx(IconButton, {
100
104
  sx: classes.closeBtn,