@micromerce/formbuilder-react 1.0.656 → 1.0.659

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 (529) hide show
  1. package/dist/{src/index.d.ts → index.d.ts} +1 -3
  2. package/package.json +6 -4
  3. package/dist/components/Checkbox/Checkbox.module.scss +0 -10
  4. package/dist/components/FormBuilder/FormBuilder.module.scss +0 -94
  5. package/dist/components/FormFooter/FormFooter.module.scss +0 -65
  6. package/dist/components/FormGroup/FormGroup.module.scss +0 -69
  7. package/dist/components/FormList/FormList.module.scss +0 -173
  8. package/dist/components/Group/Group.module.scss +0 -28
  9. package/dist/components/Input/Input.module.scss +0 -3
  10. package/dist/components/InputFreeSolo/InputFreeSolo.module.scss +0 -29
  11. package/dist/components/MrnInput/MrnInput.module.scss +0 -31
  12. package/dist/components/MultiSelect/MultiSelect.module.scss +0 -13
  13. package/dist/components/PasswordInput/PasswordInput.module.scss +0 -26
  14. package/dist/components/Select/Select.module.scss +0 -15
  15. package/dist/components/Textarea/Textarea.module.scss +0 -14
  16. package/dist/components/addressGroup/AddressGroup.module.scss +0 -72
  17. package/dist/src/assets/icons/error/Error.js +0 -6
  18. package/dist/src/assets/icons/error/Error.js.map +0 -1
  19. package/dist/src/components/Checkbox/Checkbox.js +0 -37
  20. package/dist/src/components/Checkbox/Checkbox.js.map +0 -1
  21. package/dist/src/components/Checkbox/index.js +0 -2
  22. package/dist/src/components/Checkbox/index.js.map +0 -1
  23. package/dist/src/components/ControlWrapper/ControlWrapper.js +0 -37
  24. package/dist/src/components/ControlWrapper/ControlWrapper.js.map +0 -1
  25. package/dist/src/components/ControlWrapper/index.js +0 -2
  26. package/dist/src/components/ControlWrapper/index.js.map +0 -1
  27. package/dist/src/components/DateRangeGroup/DateRangeGroup.js +0 -69
  28. package/dist/src/components/DateRangeGroup/DateRangeGroup.js.map +0 -1
  29. package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js +0 -59
  30. package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js.map +0 -1
  31. package/dist/src/components/DateRangeGroup/components/CalendarModal.js +0 -90
  32. package/dist/src/components/DateRangeGroup/components/CalendarModal.js.map +0 -1
  33. package/dist/src/components/DateRangeGroup/index.js +0 -2
  34. package/dist/src/components/DateRangeGroup/index.js.map +0 -1
  35. package/dist/src/components/ErrorBoundary/ErrorBoundary.js +0 -22
  36. package/dist/src/components/ErrorBoundary/ErrorBoundary.js.map +0 -1
  37. package/dist/src/components/FileUploader/FileUploader.js +0 -30
  38. package/dist/src/components/FileUploader/FileUploader.js.map +0 -1
  39. package/dist/src/components/FileUploader/index.js +0 -2
  40. package/dist/src/components/FileUploader/index.js.map +0 -1
  41. package/dist/src/components/FormBuilder/FormBuilder.js +0 -74
  42. package/dist/src/components/FormBuilder/FormBuilder.js.map +0 -1
  43. package/dist/src/components/FormBuilder/index.js +0 -2
  44. package/dist/src/components/FormBuilder/index.js.map +0 -1
  45. package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js +0 -50
  46. package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js.map +0 -1
  47. package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js +0 -2
  48. package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js.map +0 -1
  49. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js +0 -2
  50. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js.map +0 -1
  51. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js +0 -15
  52. package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js.map +0 -1
  53. package/dist/src/components/FormFooter/FormFooter.js +0 -46
  54. package/dist/src/components/FormFooter/FormFooter.js.map +0 -1
  55. package/dist/src/components/FormFooter/components/Switch.js +0 -15
  56. package/dist/src/components/FormFooter/components/Switch.js.map +0 -1
  57. package/dist/src/components/FormFooter/index.js +0 -2
  58. package/dist/src/components/FormFooter/index.js.map +0 -1
  59. package/dist/src/components/FormGroup/FormGroup.js +0 -18
  60. package/dist/src/components/FormGroup/FormGroup.js.map +0 -1
  61. package/dist/src/components/FormGroup/index.js +0 -2
  62. package/dist/src/components/FormGroup/index.js.map +0 -1
  63. package/dist/src/components/FormList/FormList.js +0 -66
  64. package/dist/src/components/FormList/FormList.js.map +0 -1
  65. package/dist/src/components/FormList/index.js +0 -2
  66. package/dist/src/components/FormList/index.js.map +0 -1
  67. package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js +0 -4
  68. package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js.map +0 -1
  69. package/dist/src/components/GeneralFormGroup/index.js +0 -2
  70. package/dist/src/components/GeneralFormGroup/index.js.map +0 -1
  71. package/dist/src/components/Group/Group.js +0 -32
  72. package/dist/src/components/Group/Group.js.map +0 -1
  73. package/dist/src/components/Group/index.js +0 -2
  74. package/dist/src/components/Group/index.js.map +0 -1
  75. package/dist/src/components/Input/Input.js +0 -57
  76. package/dist/src/components/Input/Input.js.map +0 -1
  77. package/dist/src/components/Input/index.js +0 -2
  78. package/dist/src/components/Input/index.js.map +0 -1
  79. package/dist/src/components/Input/input.styles.js +0 -24
  80. package/dist/src/components/Input/input.styles.js.map +0 -1
  81. package/dist/src/components/InputFreeSolo/InputFreeSolo.js +0 -67
  82. package/dist/src/components/InputFreeSolo/InputFreeSolo.js.map +0 -1
  83. package/dist/src/components/InputFreeSolo/index.js +0 -2
  84. package/dist/src/components/InputFreeSolo/index.js.map +0 -1
  85. package/dist/src/components/MrnInput/MrnInput.js +0 -64
  86. package/dist/src/components/MrnInput/MrnInput.js.map +0 -1
  87. package/dist/src/components/MrnInput/hooks/useMrn.js +0 -92
  88. package/dist/src/components/MrnInput/hooks/useMrn.js.map +0 -1
  89. package/dist/src/components/MrnInput/index.js +0 -2
  90. package/dist/src/components/MrnInput/index.js.map +0 -1
  91. package/dist/src/components/MrnInput/services/fetchMrn.js +0 -30
  92. package/dist/src/components/MrnInput/services/fetchMrn.js.map +0 -1
  93. package/dist/src/components/MrnInput/ui-helper/Link/Link.js +0 -15
  94. package/dist/src/components/MrnInput/ui-helper/Link/Link.js.map +0 -1
  95. package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js +0 -35
  96. package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js.map +0 -1
  97. package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js +0 -11
  98. package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js.map +0 -1
  99. package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js +0 -19
  100. package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js.map +0 -1
  101. package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js +0 -8
  102. package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js.map +0 -1
  103. package/dist/src/components/MultiSelect/MultiSelect.js +0 -61
  104. package/dist/src/components/MultiSelect/MultiSelect.js.map +0 -1
  105. package/dist/src/components/MultiSelect/index.js +0 -2
  106. package/dist/src/components/MultiSelect/index.js.map +0 -1
  107. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js +0 -21
  108. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js.map +0 -1
  109. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js +0 -2
  110. package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js.map +0 -1
  111. package/dist/src/components/PasswordInput/PasswordInput.js +0 -21
  112. package/dist/src/components/PasswordInput/PasswordInput.js.map +0 -1
  113. package/dist/src/components/PasswordInput/index.js +0 -2
  114. package/dist/src/components/PasswordInput/index.js.map +0 -1
  115. package/dist/src/components/QueryControl/QueryControl.js +0 -95
  116. package/dist/src/components/QueryControl/QueryControl.js.map +0 -1
  117. package/dist/src/components/QueryControl/data/defaultControls.js +0 -95
  118. package/dist/src/components/QueryControl/data/defaultControls.js.map +0 -1
  119. package/dist/src/components/QueryControl/index.js +0 -2
  120. package/dist/src/components/QueryControl/index.js.map +0 -1
  121. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js +0 -8
  122. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js.map +0 -1
  123. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js +0 -14
  124. package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js.map +0 -1
  125. package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js +0 -2
  126. package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js.map +0 -1
  127. package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js +0 -39
  128. package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js.map +0 -1
  129. package/dist/src/components/QueryControl/utils/allControlsHidden/index.js +0 -2
  130. package/dist/src/components/QueryControl/utils/allControlsHidden/index.js.map +0 -1
  131. package/dist/src/components/QueryControl/utils/getMatchingControls.js +0 -19
  132. package/dist/src/components/QueryControl/utils/getMatchingControls.js.map +0 -1
  133. package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js +0 -38
  134. package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js.map +0 -1
  135. package/dist/src/components/QueryControl/utils/hasExpertControl/index.js +0 -2
  136. package/dist/src/components/QueryControl/utils/hasExpertControl/index.js.map +0 -1
  137. package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js +0 -9
  138. package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js.map +0 -1
  139. package/dist/src/components/QueryControl/utils/hideGroup/index.js +0 -2
  140. package/dist/src/components/QueryControl/utils/hideGroup/index.js.map +0 -1
  141. package/dist/src/components/Select/Select.js +0 -67
  142. package/dist/src/components/Select/Select.js.map +0 -1
  143. package/dist/src/components/Select/index.js +0 -2
  144. package/dist/src/components/Select/index.js.map +0 -1
  145. package/dist/src/components/Select/utils/getSelectedOption.js +0 -8
  146. package/dist/src/components/Select/utils/getSelectedOption.js.map +0 -1
  147. package/dist/src/components/Textarea/Textarea.js +0 -55
  148. package/dist/src/components/Textarea/Textarea.js.map +0 -1
  149. package/dist/src/components/Textarea/Textarea.types.js +0 -2
  150. package/dist/src/components/Textarea/Textarea.types.js.map +0 -1
  151. package/dist/src/components/Textarea/aiWrapper/aiAction.js +0 -21
  152. package/dist/src/components/Textarea/aiWrapper/aiAction.js.map +0 -1
  153. package/dist/src/components/Textarea/aiWrapper/aiLayout.js +0 -21
  154. package/dist/src/components/Textarea/aiWrapper/aiLayout.js.map +0 -1
  155. package/dist/src/components/Textarea/aiWrapper/index.js +0 -29
  156. package/dist/src/components/Textarea/aiWrapper/index.js.map +0 -1
  157. package/dist/src/components/Textarea/aiWrapper/useAi.js +0 -74
  158. package/dist/src/components/Textarea/aiWrapper/useAi.js.map +0 -1
  159. package/dist/src/components/Textarea/editors/Default.js +0 -26
  160. package/dist/src/components/Textarea/editors/Default.js.map +0 -1
  161. package/dist/src/components/Textarea/editors/Html.js +0 -9
  162. package/dist/src/components/Textarea/editors/Html.js.map +0 -1
  163. package/dist/src/components/Textarea/editors/Json.js +0 -9
  164. package/dist/src/components/Textarea/editors/Json.js.map +0 -1
  165. package/dist/src/components/Textarea/editors/Markdown.js +0 -20
  166. package/dist/src/components/Textarea/editors/Markdown.js.map +0 -1
  167. package/dist/src/components/Textarea/editors/Richtext.js +0 -13
  168. package/dist/src/components/Textarea/editors/Richtext.js.map +0 -1
  169. package/dist/src/components/Textarea/index.js +0 -2
  170. package/dist/src/components/Textarea/index.js.map +0 -1
  171. package/dist/src/components/addressGroup/AddressGroup.js +0 -39
  172. package/dist/src/components/addressGroup/AddressGroup.js.map +0 -1
  173. package/dist/src/components/addressGroup/index.js +0 -2
  174. package/dist/src/components/addressGroup/index.js.map +0 -1
  175. package/dist/src/components/addressGroup/utils/Countries.js +0 -1249
  176. package/dist/src/components/addressGroup/utils/Countries.js.map +0 -1
  177. package/dist/src/components/plate/PlateEditor.d.ts +0 -10
  178. package/dist/src/components/plate/PlateEditor.js +0 -38
  179. package/dist/src/components/plate/PlateEditor.js.map +0 -1
  180. package/dist/src/components/plate/PlateEditorContent.d.ts +0 -24
  181. package/dist/src/components/plate/PlateEditorContent.js +0 -45
  182. package/dist/src/components/plate/PlateEditorContent.js.map +0 -1
  183. package/dist/src/components/plate/components/align-dropdown-menu.d.ts +0 -2
  184. package/dist/src/components/plate/components/align-dropdown-menu.js +0 -33
  185. package/dist/src/components/plate/components/align-dropdown-menu.js.map +0 -1
  186. package/dist/src/components/plate/components/blockquote-element.d.ts +0 -21
  187. package/dist/src/components/plate/components/blockquote-element.js +0 -8
  188. package/dist/src/components/plate/components/blockquote-element.js.map +0 -1
  189. package/dist/src/components/plate/components/button.d.ts +0 -14
  190. package/dist/src/components/plate/components/button.js +0 -38
  191. package/dist/src/components/plate/components/button.js.map +0 -1
  192. package/dist/src/components/plate/components/caption.d.ts +0 -43
  193. package/dist/src/components/plate/components/caption.js +0 -25
  194. package/dist/src/components/plate/components/caption.js.map +0 -1
  195. package/dist/src/components/plate/components/checkbox.d.ts +0 -3
  196. package/dist/src/components/plate/components/checkbox.js +0 -7
  197. package/dist/src/components/plate/components/checkbox.js.map +0 -1
  198. package/dist/src/components/plate/components/code-block-combobox.d.ts +0 -48
  199. package/dist/src/components/plate/components/code-block-combobox.js +0 -131
  200. package/dist/src/components/plate/components/code-block-combobox.js.map +0 -1
  201. package/dist/src/components/plate/components/code-block-element.d.ts +0 -22
  202. package/dist/src/components/plate/components/code-block-element.js +0 -13
  203. package/dist/src/components/plate/components/code-block-element.js.map +0 -1
  204. package/dist/src/components/plate/components/code-leaf.d.ts +0 -19
  205. package/dist/src/components/plate/components/code-leaf.js +0 -8
  206. package/dist/src/components/plate/components/code-leaf.js.map +0 -1
  207. package/dist/src/components/plate/components/code-line-element.d.ts +0 -21
  208. package/dist/src/components/plate/components/code-line-element.js +0 -6
  209. package/dist/src/components/plate/components/code-line-element.js.map +0 -1
  210. package/dist/src/components/plate/components/code-syntax-leaf.d.ts +0 -19
  211. package/dist/src/components/plate/components/code-syntax-leaf.js +0 -11
  212. package/dist/src/components/plate/components/code-syntax-leaf.js.map +0 -1
  213. package/dist/src/components/plate/components/color-constants.d.ts +0 -10
  214. package/dist/src/components/plate/components/color-constants.js +0 -430
  215. package/dist/src/components/plate/components/color-constants.js.map +0 -1
  216. package/dist/src/components/plate/components/color-dropdown-menu-items.d.ts +0 -18
  217. package/dist/src/components/plate/components/color-dropdown-menu-items.js +0 -21
  218. package/dist/src/components/plate/components/color-dropdown-menu-items.js.map +0 -1
  219. package/dist/src/components/plate/components/color-dropdown-menu.d.ts +0 -12
  220. package/dist/src/components/plate/components/color-dropdown-menu.js +0 -18
  221. package/dist/src/components/plate/components/color-dropdown-menu.js.map +0 -1
  222. package/dist/src/components/plate/components/color-input.d.ts +0 -2
  223. package/dist/src/components/plate/components/color-input.js +0 -15
  224. package/dist/src/components/plate/components/color-input.js.map +0 -1
  225. package/dist/src/components/plate/components/color-picker.d.ts +0 -18
  226. package/dist/src/components/plate/components/color-picker.js +0 -19
  227. package/dist/src/components/plate/components/color-picker.js.map +0 -1
  228. package/dist/src/components/plate/components/colors-custom.d.ts +0 -10
  229. package/dist/src/components/plate/components/colors-custom.js +0 -21
  230. package/dist/src/components/plate/components/colors-custom.js.map +0 -1
  231. package/dist/src/components/plate/components/command.d.ts +0 -76
  232. package/dist/src/components/plate/components/command.js +0 -18
  233. package/dist/src/components/plate/components/command.js.map +0 -1
  234. package/dist/src/components/plate/components/comment-leaf.d.ts +0 -3
  235. package/dist/src/components/plate/components/comment-leaf.js +0 -23
  236. package/dist/src/components/plate/components/comment-leaf.js.map +0 -1
  237. package/dist/src/components/plate/components/dialog.d.ts +0 -12
  238. package/dist/src/components/plate/components/dialog.js +0 -16
  239. package/dist/src/components/plate/components/dialog.js.map +0 -1
  240. package/dist/src/components/plate/components/dropdown-menu.d.ts +0 -29
  241. package/dist/src/components/plate/components/dropdown-menu.js +0 -51
  242. package/dist/src/components/plate/components/dropdown-menu.js.map +0 -1
  243. package/dist/src/components/plate/components/excalidraw-element.d.ts +0 -21
  244. package/dist/src/components/plate/components/excalidraw-element.js +0 -12
  245. package/dist/src/components/plate/components/excalidraw-element.js.map +0 -1
  246. package/dist/src/components/plate/components/fixed-toolbar-buttons.d.ts +0 -1
  247. package/dist/src/components/plate/components/fixed-toolbar-buttons.js +0 -25
  248. package/dist/src/components/plate/components/fixed-toolbar-buttons.js.map +0 -1
  249. package/dist/src/components/plate/components/fixed-toolbar.d.ts +0 -1
  250. package/dist/src/components/plate/components/fixed-toolbar.js +0 -4
  251. package/dist/src/components/plate/components/fixed-toolbar.js.map +0 -1
  252. package/dist/src/components/plate/components/heading-element.d.ts +0 -24
  253. package/dist/src/components/plate/components/heading-element.js +0 -30
  254. package/dist/src/components/plate/components/heading-element.js.map +0 -1
  255. package/dist/src/components/plate/components/highlight-leaf.d.ts +0 -19
  256. package/dist/src/components/plate/components/highlight-leaf.js +0 -5
  257. package/dist/src/components/plate/components/highlight-leaf.js.map +0 -1
  258. package/dist/src/components/plate/components/hr-element.d.ts +0 -21
  259. package/dist/src/components/plate/components/hr-element.js +0 -11
  260. package/dist/src/components/plate/components/hr-element.js.map +0 -1
  261. package/dist/src/components/plate/components/image-element.d.ts +0 -21
  262. package/dist/src/components/plate/components/image-element.js +0 -19
  263. package/dist/src/components/plate/components/image-element.js.map +0 -1
  264. package/dist/src/components/plate/components/indent-list-toolbar-button.d.ts +0 -18
  265. package/dist/src/components/plate/components/indent-list-toolbar-button.js +0 -12
  266. package/dist/src/components/plate/components/indent-list-toolbar-button.js.map +0 -1
  267. package/dist/src/components/plate/components/indent-todo-marker-component.d.ts +0 -3
  268. package/dist/src/components/plate/components/indent-todo-marker-component.js +0 -14
  269. package/dist/src/components/plate/components/indent-todo-marker-component.js.map +0 -1
  270. package/dist/src/components/plate/components/indent-todo-toolbar-button.d.ts +0 -15
  271. package/dist/src/components/plate/components/indent-todo-toolbar-button.js +0 -11
  272. package/dist/src/components/plate/components/indent-todo-toolbar-button.js.map +0 -1
  273. package/dist/src/components/plate/components/indent-toolbar-button.d.ts +0 -15
  274. package/dist/src/components/plate/components/indent-toolbar-button.js +0 -10
  275. package/dist/src/components/plate/components/indent-toolbar-button.js.map +0 -1
  276. package/dist/src/components/plate/components/inline-combobox.d.ts +0 -29
  277. package/dist/src/components/plate/components/inline-combobox.js +0 -156
  278. package/dist/src/components/plate/components/inline-combobox.js.map +0 -1
  279. package/dist/src/components/plate/components/input.d.ts +0 -8
  280. package/dist/src/components/plate/components/input.js +0 -20
  281. package/dist/src/components/plate/components/input.js.map +0 -1
  282. package/dist/src/components/plate/components/insert-dropdown-menu.d.ts +0 -12
  283. package/dist/src/components/plate/components/insert-dropdown-menu.js +0 -179
  284. package/dist/src/components/plate/components/insert-dropdown-menu.js.map +0 -1
  285. package/dist/src/components/plate/components/kbd-leaf.d.ts +0 -19
  286. package/dist/src/components/plate/components/kbd-leaf.js +0 -5
  287. package/dist/src/components/plate/components/kbd-leaf.js.map +0 -1
  288. package/dist/src/components/plate/components/line-height-dropdown-menu.d.ts +0 -2
  289. package/dist/src/components/plate/components/line-height-dropdown-menu.js +0 -12
  290. package/dist/src/components/plate/components/line-height-dropdown-menu.js.map +0 -1
  291. package/dist/src/components/plate/components/link-element.d.ts +0 -21
  292. package/dist/src/components/plate/components/link-element.js +0 -10
  293. package/dist/src/components/plate/components/link-element.js.map +0 -1
  294. package/dist/src/components/plate/components/link-floating-toolbar.d.ts +0 -5
  295. package/dist/src/components/plate/components/link-floating-toolbar.js +0 -54
  296. package/dist/src/components/plate/components/link-floating-toolbar.js.map +0 -1
  297. package/dist/src/components/plate/components/link-toolbar-button.d.ts +0 -15
  298. package/dist/src/components/plate/components/link-toolbar-button.js +0 -11
  299. package/dist/src/components/plate/components/link-toolbar-button.js.map +0 -1
  300. package/dist/src/components/plate/components/mark-toolbar-button.d.ts +0 -18
  301. package/dist/src/components/plate/components/mark-toolbar-button.js +0 -11
  302. package/dist/src/components/plate/components/mark-toolbar-button.js.map +0 -1
  303. package/dist/src/components/plate/components/media-embed-element.d.ts +0 -21
  304. package/dist/src/components/plate/components/media-embed-element.js +0 -23
  305. package/dist/src/components/plate/components/media-embed-element.js.map +0 -1
  306. package/dist/src/components/plate/components/media-popover.d.ts +0 -7
  307. package/dist/src/components/plate/components/media-popover.js +0 -30
  308. package/dist/src/components/plate/components/media-popover.js.map +0 -1
  309. package/dist/src/components/plate/components/mention-element.d.ts +0 -26
  310. package/dist/src/components/plate/components/mention-element.js +0 -12
  311. package/dist/src/components/plate/components/mention-element.js.map +0 -1
  312. package/dist/src/components/plate/components/mention-input-element.d.ts +0 -25
  313. package/dist/src/components/plate/components/mention-input-element.js +0 -89
  314. package/dist/src/components/plate/components/mention-input-element.js.map +0 -1
  315. package/dist/src/components/plate/components/outdent-toolbar-button.d.ts +0 -15
  316. package/dist/src/components/plate/components/outdent-toolbar-button.js +0 -10
  317. package/dist/src/components/plate/components/outdent-toolbar-button.js.map +0 -1
  318. package/dist/src/components/plate/components/paragraph-element.d.ts +0 -20
  319. package/dist/src/components/plate/components/paragraph-element.js +0 -4
  320. package/dist/src/components/plate/components/paragraph-element.js.map +0 -1
  321. package/dist/src/components/plate/components/placeholder.d.ts +0 -6
  322. package/dist/src/components/plate/components/placeholder.js +0 -37
  323. package/dist/src/components/plate/components/placeholder.js.map +0 -1
  324. package/dist/src/components/plate/components/popover.d.ts +0 -7
  325. package/dist/src/components/plate/components/popover.js +0 -11
  326. package/dist/src/components/plate/components/popover.js.map +0 -1
  327. package/dist/src/components/plate/components/resizable.d.ts +0 -40
  328. package/dist/src/components/plate/components/resizable.js +0 -38
  329. package/dist/src/components/plate/components/resizable.js.map +0 -1
  330. package/dist/src/components/plate/components/separator.d.ts +0 -4
  331. package/dist/src/components/plate/components/separator.js +0 -20
  332. package/dist/src/components/plate/components/separator.js.map +0 -1
  333. package/dist/src/components/plate/components/slash-input-element.d.ts +0 -22
  334. package/dist/src/components/plate/components/slash-input-element.js +0 -64
  335. package/dist/src/components/plate/components/slash-input-element.js.map +0 -1
  336. package/dist/src/components/plate/components/table-cell-element.d.ts +0 -47
  337. package/dist/src/components/plate/components/table-cell-element.js +0 -35
  338. package/dist/src/components/plate/components/table-cell-element.js.map +0 -1
  339. package/dist/src/components/plate/components/table-element.d.ts +0 -24
  340. package/dist/src/components/plate/components/table-element.js +0 -46
  341. package/dist/src/components/plate/components/table-element.js.map +0 -1
  342. package/dist/src/components/plate/components/table-row-element.d.ts +0 -23
  343. package/dist/src/components/plate/components/table-row-element.js +0 -7
  344. package/dist/src/components/plate/components/table-row-element.js.map +0 -1
  345. package/dist/src/components/plate/components/todo-list-element.d.ts +0 -21
  346. package/dist/src/components/plate/components/todo-list-element.js +0 -12
  347. package/dist/src/components/plate/components/todo-list-element.js.map +0 -1
  348. package/dist/src/components/plate/components/toolbar.d.ts +0 -29
  349. package/dist/src/components/plate/components/toolbar.js +0 -51
  350. package/dist/src/components/plate/components/toolbar.js.map +0 -1
  351. package/dist/src/components/plate/components/tooltip.d.ts +0 -12
  352. package/dist/src/components/plate/components/tooltip.js +0 -26
  353. package/dist/src/components/plate/components/tooltip.js.map +0 -1
  354. package/dist/src/components/plate/components/turn-into-dropdown-menu.d.ts +0 -2
  355. package/dist/src/components/plate/components/turn-into-dropdown-menu.js +0 -93
  356. package/dist/src/components/plate/components/turn-into-dropdown-menu.js.map +0 -1
  357. package/dist/src/components/plate/icons.d.ts +0 -85
  358. package/dist/src/components/plate/icons.js +0 -101
  359. package/dist/src/components/plate/icons.js.map +0 -1
  360. package/dist/src/components/plate/lib/autoformat-rules.d.ts +0 -10
  361. package/dist/src/components/plate/lib/autoformat-rules.js +0 -271
  362. package/dist/src/components/plate/lib/autoformat-rules.js.map +0 -1
  363. package/dist/src/components/plate/usePlateEditor.d.ts +0 -4
  364. package/dist/src/components/plate/usePlateEditor.js +0 -384
  365. package/dist/src/components/plate/usePlateEditor.js.map +0 -1
  366. package/dist/src/components/states/error/index.js +0 -15
  367. package/dist/src/components/states/error/index.js.map +0 -1
  368. package/dist/src/context/FormData.js +0 -109
  369. package/dist/src/context/FormData.js.map +0 -1
  370. package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js +0 -36
  371. package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js.map +0 -1
  372. package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js +0 -16
  373. package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js.map +0 -1
  374. package/dist/src/hooks/useDependent/useDependent.js +0 -86
  375. package/dist/src/hooks/useDependent/useDependent.js.map +0 -1
  376. package/dist/src/hooks/useValueGenerator/useValueGenerator.js +0 -99
  377. package/dist/src/hooks/useValueGenerator/useValueGenerator.js.map +0 -1
  378. package/dist/src/index.js +0 -19
  379. package/dist/src/index.js.map +0 -1
  380. package/dist/src/styles/Hidden.styles.js +0 -16
  381. package/dist/src/styles/Hidden.styles.js.map +0 -1
  382. package/dist/src/styles/Skeleton.js +0 -40
  383. package/dist/src/styles/Skeleton.js.map +0 -1
  384. package/dist/src/styles/Textfield.styles.js +0 -34
  385. package/dist/src/styles/Textfield.styles.js.map +0 -1
  386. package/dist/src/testutils.js +0 -22
  387. package/dist/src/testutils.js.map +0 -1
  388. package/dist/src/types/controlProps.js +0 -2
  389. package/dist/src/types/controlProps.js.map +0 -1
  390. package/dist/src/types/index.js +0 -2
  391. package/dist/src/types/index.js.map +0 -1
  392. package/dist/src/ui/menu/hooks/useMenu.js +0 -41
  393. package/dist/src/ui/menu/hooks/useMenu.js.map +0 -1
  394. package/dist/src/ui/menu/index.js +0 -13
  395. package/dist/src/ui/menu/index.js.map +0 -1
  396. package/dist/src/ui/menu/test/createControl.js +0 -30
  397. package/dist/src/ui/menu/test/createControl.js.map +0 -1
  398. package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js +0 -82
  399. package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js.map +0 -1
  400. package/dist/src/ui-helper/HeaderCollapseButton/index.js +0 -9
  401. package/dist/src/ui-helper/HeaderCollapseButton/index.js.map +0 -1
  402. package/dist/src/ui-helper/notifications/Error.js +0 -77
  403. package/dist/src/ui-helper/notifications/Error.js.map +0 -1
  404. package/dist/src/ui-helper/notifications/images/background.js +0 -7
  405. package/dist/src/ui-helper/notifications/images/background.js.map +0 -1
  406. package/dist/src/ui-helper/notifications/images/spinner.js +0 -6
  407. package/dist/src/ui-helper/notifications/images/spinner.js.map +0 -1
  408. package/dist/src/ui-helper/notifications/images/under-improvement.js +0 -6
  409. package/dist/src/ui-helper/notifications/images/under-improvement.js.map +0 -1
  410. package/dist/src/utils/findFormControlError/index.js +0 -24
  411. package/dist/src/utils/findFormControlError/index.js.map +0 -1
  412. package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js +0 -22
  413. package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js.map +0 -1
  414. package/dist/styles/formControl.module.scss +0 -59
  415. package/dist/tailwind.config.d.ts +0 -1
  416. package/dist/tailwind.config.js +0 -17
  417. package/dist/tailwind.config.js.map +0 -1
  418. package/dist/webpack.common.d.ts +0 -63
  419. package/dist/webpack.common.js +0 -76
  420. package/dist/webpack.common.js.map +0 -1
  421. package/dist/webpack.dev.d.ts +0 -65
  422. package/dist/webpack.dev.js +0 -11
  423. package/dist/webpack.dev.js.map +0 -1
  424. package/dist/webpack.prod.d.ts +0 -65
  425. package/dist/webpack.prod.js +0 -10
  426. package/dist/webpack.prod.js.map +0 -1
  427. /package/dist/{src/assets → assets}/icons/error/Error.d.ts +0 -0
  428. /package/dist/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
  429. /package/dist/{src/components → components}/Checkbox/index.d.ts +0 -0
  430. /package/dist/{src/components → components}/ControlWrapper/ControlWrapper.d.ts +0 -0
  431. /package/dist/{src/components → components}/ControlWrapper/index.d.ts +0 -0
  432. /package/dist/{src/components → components}/DateRangeGroup/DateRangeGroup.d.ts +0 -0
  433. /package/dist/{src/components → components}/DateRangeGroup/DateRangeGroup.styles.d.ts +0 -0
  434. /package/dist/{src/components → components}/DateRangeGroup/components/CalendarModal.d.ts +0 -0
  435. /package/dist/{src/components → components}/DateRangeGroup/index.d.ts +0 -0
  436. /package/dist/{src/components → components}/ErrorBoundary/ErrorBoundary.d.ts +0 -0
  437. /package/dist/{src/components → components}/FileUploader/FileUploader.d.ts +0 -0
  438. /package/dist/{src/components → components}/FileUploader/index.d.ts +0 -0
  439. /package/dist/{src/components → components}/FormBuilder/FormBuilder.d.ts +0 -0
  440. /package/dist/{src/components → components}/FormBuilder/index.d.ts +0 -0
  441. /package/dist/{src/components → components}/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +0 -0
  442. /package/dist/{src/components → components}/FormBuilder/utils/extractFormControlValues/index.d.ts +0 -0
  443. /package/dist/{src/components → components}/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +0 -0
  444. /package/dist/{src/components → components}/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +0 -0
  445. /package/dist/{src/components → components}/FormFooter/FormFooter.d.ts +0 -0
  446. /package/dist/{src/components → components}/FormFooter/components/Switch.d.ts +0 -0
  447. /package/dist/{src/components → components}/FormFooter/index.d.ts +0 -0
  448. /package/dist/{src/components → components}/FormGroup/FormGroup.d.ts +0 -0
  449. /package/dist/{src/components → components}/FormGroup/index.d.ts +0 -0
  450. /package/dist/{src/components → components}/FormList/FormList.d.ts +0 -0
  451. /package/dist/{src/components → components}/FormList/index.d.ts +0 -0
  452. /package/dist/{src/components → components}/GeneralFormGroup/GeneralFormGroup.d.ts +0 -0
  453. /package/dist/{src/components → components}/GeneralFormGroup/index.d.ts +0 -0
  454. /package/dist/{src/components → components}/Group/Group.d.ts +0 -0
  455. /package/dist/{src/components → components}/Group/index.d.ts +0 -0
  456. /package/dist/{src/components → components}/Input/Input.d.ts +0 -0
  457. /package/dist/{src/components → components}/Input/index.d.ts +0 -0
  458. /package/dist/{src/components → components}/Input/input.styles.d.ts +0 -0
  459. /package/dist/{src/components → components}/InputFreeSolo/InputFreeSolo.d.ts +0 -0
  460. /package/dist/{src/components → components}/InputFreeSolo/index.d.ts +0 -0
  461. /package/dist/{src/components → components}/MrnInput/MrnInput.d.ts +0 -0
  462. /package/dist/{src/components → components}/MrnInput/hooks/useMrn.d.ts +0 -0
  463. /package/dist/{src/components → components}/MrnInput/index.d.ts +0 -0
  464. /package/dist/{src/components → components}/MrnInput/services/fetchMrn.d.ts +0 -0
  465. /package/dist/{src/components → components}/MrnInput/ui-helper/Link/Link.d.ts +0 -0
  466. /package/dist/{src/components → components}/MrnInput/utils/mrnUtils/mrnUtils.d.ts +0 -0
  467. /package/dist/{src/components → components}/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +0 -0
  468. /package/dist/{src/components → components}/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +0 -0
  469. /package/dist/{src/components → components}/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +0 -0
  470. /package/dist/{src/components → components}/MultiSelect/MultiSelect.d.ts +0 -0
  471. /package/dist/{src/components → components}/MultiSelect/index.d.ts +0 -0
  472. /package/dist/{src/components → components}/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +0 -0
  473. /package/dist/{src/components → components}/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +0 -0
  474. /package/dist/{src/components → components}/PasswordInput/PasswordInput.d.ts +0 -0
  475. /package/dist/{src/components → components}/PasswordInput/index.d.ts +0 -0
  476. /package/dist/{src/components → components}/QueryControl/QueryControl.d.ts +0 -0
  477. /package/dist/{src/components → components}/QueryControl/data/defaultControls.d.ts +0 -0
  478. /package/dist/{src/components → components}/QueryControl/index.d.ts +0 -0
  479. /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +0 -0
  480. /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +0 -0
  481. /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/index.d.ts +0 -0
  482. /package/dist/{src/components → components}/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +0 -0
  483. /package/dist/{src/components → components}/QueryControl/utils/allControlsHidden/index.d.ts +0 -0
  484. /package/dist/{src/components → components}/QueryControl/utils/getMatchingControls.d.ts +0 -0
  485. /package/dist/{src/components → components}/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +0 -0
  486. /package/dist/{src/components → components}/QueryControl/utils/hasExpertControl/index.d.ts +0 -0
  487. /package/dist/{src/components → components}/QueryControl/utils/hideGroup/hideGroup.d.ts +0 -0
  488. /package/dist/{src/components → components}/QueryControl/utils/hideGroup/index.d.ts +0 -0
  489. /package/dist/{src/components → components}/Select/Select.d.ts +0 -0
  490. /package/dist/{src/components → components}/Select/index.d.ts +0 -0
  491. /package/dist/{src/components → components}/Select/utils/getSelectedOption.d.ts +0 -0
  492. /package/dist/{src/components → components}/Textarea/Textarea.d.ts +0 -0
  493. /package/dist/{src/components → components}/Textarea/Textarea.types.d.ts +0 -0
  494. /package/dist/{src/components → components}/Textarea/aiWrapper/aiAction.d.ts +0 -0
  495. /package/dist/{src/components → components}/Textarea/aiWrapper/aiLayout.d.ts +0 -0
  496. /package/dist/{src/components → components}/Textarea/aiWrapper/index.d.ts +0 -0
  497. /package/dist/{src/components → components}/Textarea/aiWrapper/useAi.d.ts +0 -0
  498. /package/dist/{src/components → components}/Textarea/editors/Default.d.ts +0 -0
  499. /package/dist/{src/components → components}/Textarea/editors/Html.d.ts +0 -0
  500. /package/dist/{src/components → components}/Textarea/editors/Json.d.ts +0 -0
  501. /package/dist/{src/components → components}/Textarea/editors/Markdown.d.ts +0 -0
  502. /package/dist/{src/components → components}/Textarea/editors/Richtext.d.ts +0 -0
  503. /package/dist/{src/components → components}/Textarea/index.d.ts +0 -0
  504. /package/dist/{src/components → components}/addressGroup/AddressGroup.d.ts +0 -0
  505. /package/dist/{src/components → components}/addressGroup/index.d.ts +0 -0
  506. /package/dist/{src/components → components}/addressGroup/utils/Countries.d.ts +0 -0
  507. /package/dist/{src/components → components}/states/error/index.d.ts +0 -0
  508. /package/dist/{src/context → context}/FormData.d.ts +0 -0
  509. /package/dist/{src/hooks → hooks}/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +0 -0
  510. /package/dist/{src/hooks → hooks}/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +0 -0
  511. /package/dist/{src/hooks → hooks}/useDependent/useDependent.d.ts +0 -0
  512. /package/dist/{src/hooks → hooks}/useValueGenerator/useValueGenerator.d.ts +0 -0
  513. /package/dist/{src/styles → styles}/Hidden.styles.d.ts +0 -0
  514. /package/dist/{src/styles → styles}/Skeleton.d.ts +0 -0
  515. /package/dist/{src/styles → styles}/Textfield.styles.d.ts +0 -0
  516. /package/dist/{src/testutils.d.ts → testutils.d.ts} +0 -0
  517. /package/dist/{src/types → types}/controlProps.d.ts +0 -0
  518. /package/dist/{src/types → types}/index.d.ts +0 -0
  519. /package/dist/{src/ui → ui}/menu/hooks/useMenu.d.ts +0 -0
  520. /package/dist/{src/ui → ui}/menu/index.d.ts +0 -0
  521. /package/dist/{src/ui → ui}/menu/test/createControl.d.ts +0 -0
  522. /package/dist/{src/ui → ui}/menu/utils/detemineSubmenuTabs/index.d.ts +0 -0
  523. /package/dist/{src/ui-helper → ui-helper}/HeaderCollapseButton/index.d.ts +0 -0
  524. /package/dist/{src/ui-helper → ui-helper}/notifications/Error.d.ts +0 -0
  525. /package/dist/{src/ui-helper → ui-helper}/notifications/images/background.d.ts +0 -0
  526. /package/dist/{src/ui-helper → ui-helper}/notifications/images/spinner.d.ts +0 -0
  527. /package/dist/{src/ui-helper → ui-helper}/notifications/images/under-improvement.d.ts +0 -0
  528. /package/dist/{src/utils → utils}/findFormControlError/index.d.ts +0 -0
  529. /package/dist/{src/utils → utils}/hasGroupRequiredFieldsWithValues/index.d.ts +0 -0
@@ -1,10 +0,0 @@
1
- import type { AutoformatBlockRule, AutoformatRule } from "@udecode/plate-autoformat";
2
- import type { SlateEditor } from "@udecode/plate-common";
3
- export declare const preFormat: AutoformatBlockRule["preFormat"];
4
- export declare const format: (editor: SlateEditor, customFormatting: any) => void;
5
- export declare const formatList: (editor: SlateEditor, elementType: string) => void;
6
- export declare const autoformatMarks: AutoformatRule[];
7
- export declare const autoformatBlocks: AutoformatRule[];
8
- export declare const autoformatLists: AutoformatRule[];
9
- export declare const autoformatIndentLists: AutoformatRule[];
10
- export declare const autoformatRules: AutoformatRule[];
@@ -1,271 +0,0 @@
1
- import { autoformatArrow, autoformatLegal, autoformatLegalHtml, autoformatMath, autoformatPunctuation, autoformatSmartQuotes, } from "@udecode/plate-autoformat";
2
- import { BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin, SubscriptPlugin, SuperscriptPlugin, UnderlinePlugin, } from "@udecode/plate-basic-marks/react";
3
- import { BlockquotePlugin } from "@udecode/plate-block-quote/react";
4
- import { insertEmptyCodeBlock } from "@udecode/plate-code-block";
5
- import { CodeBlockPlugin, CodeLinePlugin, } from "@udecode/plate-code-block/react";
6
- import { getParentNode, insertNodes, isBlock, isElement, isType, setNodes, } from "@udecode/plate-common";
7
- import { ParagraphPlugin } from "@udecode/plate-common/react";
8
- import { HEADING_KEYS } from "@udecode/plate-heading";
9
- import { HighlightPlugin } from "@udecode/plate-highlight/react";
10
- import { HorizontalRulePlugin } from "@udecode/plate-horizontal-rule/react";
11
- import { INDENT_LIST_KEYS, ListStyleType, toggleIndentList, } from "@udecode/plate-indent-list";
12
- import { toggleList, unwrapList } from "@udecode/plate-list";
13
- import { BulletedListPlugin, ListItemPlugin, NumberedListPlugin, TodoListPlugin, } from "@udecode/plate-list/react";
14
- import { openNextToggles, TogglePlugin } from "@udecode/plate-toggle/react";
15
- export const preFormat = (editor) => unwrapList(editor);
16
- export const format = (editor, customFormatting) => {
17
- if (editor.selection) {
18
- const parentEntry = getParentNode(editor, editor.selection);
19
- if (!parentEntry)
20
- return;
21
- const [node] = parentEntry;
22
- if (isElement(node) &&
23
- !isType(editor, node, CodeBlockPlugin.key) &&
24
- !isType(editor, node, CodeLinePlugin.key)) {
25
- customFormatting();
26
- }
27
- }
28
- };
29
- export const formatList = (editor, elementType) => {
30
- format(editor, () => toggleList(editor, {
31
- type: elementType,
32
- }));
33
- };
34
- export const autoformatMarks = [
35
- {
36
- match: "***",
37
- mode: "mark",
38
- type: [BoldPlugin.key, ItalicPlugin.key],
39
- },
40
- {
41
- match: "__*",
42
- mode: "mark",
43
- type: [UnderlinePlugin.key, ItalicPlugin.key],
44
- },
45
- {
46
- match: "__**",
47
- mode: "mark",
48
- type: [UnderlinePlugin.key, BoldPlugin.key],
49
- },
50
- {
51
- match: "___***",
52
- mode: "mark",
53
- type: [UnderlinePlugin.key, BoldPlugin.key, ItalicPlugin.key],
54
- },
55
- {
56
- match: "**",
57
- mode: "mark",
58
- type: BoldPlugin.key,
59
- },
60
- {
61
- match: "__",
62
- mode: "mark",
63
- type: UnderlinePlugin.key,
64
- },
65
- {
66
- match: "*",
67
- mode: "mark",
68
- type: ItalicPlugin.key,
69
- },
70
- {
71
- match: "_",
72
- mode: "mark",
73
- type: ItalicPlugin.key,
74
- },
75
- {
76
- match: "~~",
77
- mode: "mark",
78
- type: StrikethroughPlugin.key,
79
- },
80
- {
81
- match: "^",
82
- mode: "mark",
83
- type: SuperscriptPlugin.key,
84
- },
85
- {
86
- match: "~",
87
- mode: "mark",
88
- type: SubscriptPlugin.key,
89
- },
90
- {
91
- match: "==",
92
- mode: "mark",
93
- type: HighlightPlugin.key,
94
- },
95
- {
96
- match: "≡",
97
- mode: "mark",
98
- type: HighlightPlugin.key,
99
- },
100
- {
101
- match: "`",
102
- mode: "mark",
103
- type: CodePlugin.key,
104
- },
105
- ];
106
- export const autoformatBlocks = [
107
- {
108
- match: "# ",
109
- mode: "block",
110
- preFormat,
111
- type: HEADING_KEYS.h1,
112
- },
113
- {
114
- match: "## ",
115
- mode: "block",
116
- preFormat,
117
- type: HEADING_KEYS.h2,
118
- },
119
- {
120
- match: "### ",
121
- mode: "block",
122
- preFormat,
123
- type: HEADING_KEYS.h3,
124
- },
125
- {
126
- match: "#### ",
127
- mode: "block",
128
- preFormat,
129
- type: HEADING_KEYS.h4,
130
- },
131
- {
132
- match: "##### ",
133
- mode: "block",
134
- preFormat,
135
- type: HEADING_KEYS.h5,
136
- },
137
- {
138
- match: "###### ",
139
- mode: "block",
140
- preFormat,
141
- type: HEADING_KEYS.h6,
142
- },
143
- {
144
- match: "> ",
145
- mode: "block",
146
- preFormat,
147
- type: BlockquotePlugin.key,
148
- },
149
- {
150
- format: (editor) => {
151
- insertEmptyCodeBlock(editor, {
152
- defaultType: ParagraphPlugin.key,
153
- insertNodesOptions: { select: true },
154
- });
155
- },
156
- match: "```",
157
- mode: "block",
158
- preFormat,
159
- triggerAtBlockStart: false,
160
- type: CodeBlockPlugin.key,
161
- },
162
- {
163
- match: "+ ",
164
- mode: "block",
165
- preFormat: openNextToggles,
166
- type: TogglePlugin.key,
167
- },
168
- {
169
- format: (editor) => {
170
- setNodes(editor, { type: HorizontalRulePlugin.key });
171
- insertNodes(editor, {
172
- children: [{ text: "" }],
173
- type: ParagraphPlugin.key,
174
- });
175
- },
176
- match: ["---", "—-", "___ "],
177
- mode: "block",
178
- type: HorizontalRulePlugin.key,
179
- },
180
- ];
181
- export const autoformatLists = [
182
- {
183
- format: (editor) => formatList(editor, BulletedListPlugin.key),
184
- match: ["* ", "- "],
185
- mode: "block",
186
- preFormat,
187
- type: ListItemPlugin.key,
188
- },
189
- {
190
- format: (editor) => formatList(editor, NumberedListPlugin.key),
191
- match: ["^\\d+\\.$ ", "^\\d+\\)$ "],
192
- matchByRegex: true,
193
- mode: "block",
194
- preFormat,
195
- type: ListItemPlugin.key,
196
- },
197
- {
198
- match: "[] ",
199
- mode: "block",
200
- type: TodoListPlugin.key,
201
- },
202
- {
203
- format: (editor) => setNodes(editor, { checked: true, type: TodoListPlugin.key }, {
204
- match: (n) => isBlock(editor, n),
205
- }),
206
- match: "[x] ",
207
- mode: "block",
208
- type: TodoListPlugin.key,
209
- },
210
- ];
211
- export const autoformatIndentLists = [
212
- {
213
- format: (editor) => {
214
- toggleIndentList(editor, {
215
- listStyleType: ListStyleType.Disc,
216
- });
217
- },
218
- match: ["* ", "- "],
219
- mode: "block",
220
- type: "list",
221
- },
222
- {
223
- format: (editor) => toggleIndentList(editor, {
224
- listStyleType: ListStyleType.Decimal,
225
- }),
226
- match: ["^\\d+\\.$ ", "^\\d+\\)$ "],
227
- matchByRegex: true,
228
- mode: "block",
229
- type: "list",
230
- },
231
- {
232
- format: (editor) => {
233
- toggleIndentList(editor, {
234
- listStyleType: INDENT_LIST_KEYS.todo,
235
- });
236
- setNodes(editor, {
237
- checked: false,
238
- listStyleType: INDENT_LIST_KEYS.todo,
239
- });
240
- },
241
- match: ["[] "],
242
- mode: "block",
243
- type: "list",
244
- },
245
- {
246
- format: (editor) => {
247
- toggleIndentList(editor, {
248
- listStyleType: INDENT_LIST_KEYS.todo,
249
- });
250
- setNodes(editor, {
251
- checked: true,
252
- listStyleType: INDENT_LIST_KEYS.todo,
253
- });
254
- },
255
- match: ["[x] "],
256
- mode: "block",
257
- type: "list",
258
- },
259
- ];
260
- export const autoformatRules = [
261
- ...autoformatBlocks,
262
- ...autoformatMarks,
263
- ...autoformatSmartQuotes,
264
- ...autoformatPunctuation,
265
- ...autoformatLegal,
266
- ...autoformatLegalHtml,
267
- ...autoformatArrow,
268
- ...autoformatMath,
269
- ...autoformatIndentLists,
270
- ];
271
- //# sourceMappingURL=autoformat-rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoformat-rules.js","sourceRoot":"","sources":["../../../../../src/components/plate/lib/autoformat-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf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,CAAC"}
@@ -1,4 +0,0 @@
1
- declare const usePlateEditor: ({ value }: {
2
- value: any;
3
- }) => any;
4
- export default usePlateEditor;
@@ -1,384 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- // PLUGINS
4
- import { AlignPlugin } from "@udecode/plate-alignment/react";
5
- import { AutoformatPlugin } from "@udecode/plate-autoformat/react";
6
- import { BasicMarksPlugin, BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin, SubscriptPlugin, SuperscriptPlugin, UnderlinePlugin, } from "@udecode/plate-basic-marks/react";
7
- import { BlockquotePlugin } from "@udecode/plate-block-quote/react";
8
- import { ExitBreakPlugin, SoftBreakPlugin } from "@udecode/plate-break/react";
9
- import { CaptionPlugin } from "@udecode/plate-caption/react";
10
- import { isCodeBlockEmpty, isSelectionAtCodeBlockStart, unwrapCodeBlock, } from "@udecode/plate-code-block";
11
- import { CodeBlockPlugin, CodeLinePlugin, CodeSyntaxPlugin, } from "@udecode/plate-code-block/react";
12
- import { CommentsPlugin } from "@udecode/plate-comments/react";
13
- import { isBlockAboveEmpty, isSelectionAtBlockStart, someNode, } from "@udecode/plate-common";
14
- import { createPlateEditor, ParagraphPlugin, PlateLeaf, } from "@udecode/plate-common/react";
15
- import { EmojiPlugin } from "@udecode/plate-emoji/react";
16
- import { ExcalidrawPlugin } from "@udecode/plate-excalidraw/react";
17
- import { FontBackgroundColorPlugin, FontColorPlugin, FontSizePlugin, } from "@udecode/plate-font/react";
18
- import { HEADING_KEYS, HEADING_LEVELS } from "@udecode/plate-heading";
19
- import { HeadingPlugin } from "@udecode/plate-heading/react";
20
- import { HighlightPlugin } from "@udecode/plate-highlight/react";
21
- import { HorizontalRulePlugin } from "@udecode/plate-horizontal-rule/react";
22
- import { IndentListPlugin } from "@udecode/plate-indent-list/react";
23
- import { IndentPlugin } from "@udecode/plate-indent/react";
24
- import { KbdPlugin } from "@udecode/plate-kbd/react";
25
- import { LineHeightPlugin } from "@udecode/plate-line-height/react";
26
- import { LinkPlugin } from "@udecode/plate-link/react";
27
- import { BulletedListPlugin, ListPlugin, NumberedListPlugin, TodoListPlugin, } from "@udecode/plate-list/react";
28
- import { ImagePlugin, MediaEmbedPlugin } from "@udecode/plate-media/react";
29
- import { MentionInputPlugin, MentionPlugin, } from "@udecode/plate-mention/react";
30
- import { NodeIdPlugin } from "@udecode/plate-node-id";
31
- import { ResetNodePlugin } from "@udecode/plate-reset-node/react";
32
- import { SelectOnBackspacePlugin } from "@udecode/plate-select";
33
- import { BlockSelectionPlugin } from "@udecode/plate-selection/react";
34
- import { SlashInputPlugin, SlashPlugin, } from "@udecode/plate-slash-command/react";
35
- import { TabbablePlugin } from "@udecode/plate-tabbable/react";
36
- import { TableCellHeaderPlugin, TableCellPlugin, TablePlugin, TableRowPlugin, } from "@udecode/plate-table/react";
37
- import { TogglePlugin } from "@udecode/plate-toggle/react";
38
- import { TrailingBlockPlugin } from "@udecode/plate-trailing-block";
39
- // import { DragOverCursorPlugin } from "./components/cursor-overlay";
40
- // COMPONENTS
41
- import { BlockquoteElement } from "./components/blockquote-element";
42
- import { CodeBlockElement } from "./components/code-block-element";
43
- import { CodeLeaf } from "./components/code-leaf";
44
- import { CodeLineElement } from "./components/code-line-element";
45
- import { CodeSyntaxLeaf } from "./components/code-syntax-leaf";
46
- import { CommentLeaf } from "./components/comment-leaf";
47
- import { ExcalidrawElement } from "./components/excalidraw-element";
48
- import { HeadingElement } from "./components/heading-element";
49
- import { HighlightLeaf } from "./components/highlight-leaf";
50
- import { HrElement } from "./components/hr-element";
51
- import { ImageElement } from "./components/image-element";
52
- import { TodoLi, TodoMarker } from "./components/indent-todo-marker-component";
53
- import { KbdLeaf } from "./components/kbd-leaf";
54
- import { LinkElement } from "./components/link-element";
55
- import { LinkFloatingToolbar } from "./components/link-floating-toolbar";
56
- import { MediaEmbedElement } from "./components/media-embed-element";
57
- import { MentionElement } from "./components/mention-element";
58
- import { MentionInputElement } from "./components/mention-input-element";
59
- import { ParagraphElement } from "./components/paragraph-element";
60
- import { withPlaceholders } from "./components/placeholder";
61
- import { SlashInputElement } from "./components/slash-input-element";
62
- import { TableCellElement, TableCellHeaderElement, } from "./components/table-cell-element";
63
- import { TableElement } from "./components/table-element";
64
- import { TableRowElement } from "./components/table-row-element";
65
- import { TodoListElement } from "./components/todo-list-element";
66
- // UTILS
67
- import { withProps } from "@udecode/cn";
68
- import { autoformatRules } from "./lib/autoformat-rules";
69
- const usePlateEditor = ({ value = [] }) => {
70
- const editor = createPlateEditor({
71
- plugins: [
72
- HeadingPlugin,
73
- BlockquotePlugin,
74
- CodeBlockPlugin,
75
- CodeLinePlugin,
76
- CodeSyntaxPlugin,
77
- HorizontalRulePlugin,
78
- BasicMarksPlugin,
79
- TodoListPlugin,
80
- // Nodes
81
- HeadingPlugin,
82
- BlockquotePlugin,
83
- CodeBlockPlugin,
84
- CodeLinePlugin,
85
- CodeSyntaxPlugin,
86
- HorizontalRulePlugin,
87
- TogglePlugin,
88
- LinkPlugin.configure({
89
- render: { afterEditable: () => _jsx(LinkFloatingToolbar, {}) },
90
- }),
91
- ImagePlugin,
92
- MediaEmbedPlugin,
93
- CaptionPlugin.configure({
94
- options: { plugins: [ImagePlugin, MediaEmbedPlugin] },
95
- }),
96
- MentionPlugin,
97
- MentionInputPlugin,
98
- TablePlugin,
99
- TableRowPlugin,
100
- TableCellPlugin,
101
- TableCellHeaderPlugin,
102
- TodoListPlugin,
103
- ExcalidrawPlugin,
104
- // Marks
105
- BoldPlugin,
106
- ItalicPlugin,
107
- UnderlinePlugin,
108
- StrikethroughPlugin,
109
- CodePlugin,
110
- SubscriptPlugin,
111
- SuperscriptPlugin,
112
- FontColorPlugin,
113
- FontBackgroundColorPlugin,
114
- FontSizePlugin,
115
- HighlightPlugin,
116
- KbdPlugin,
117
- // Block Style
118
- AlignPlugin.configure({
119
- inject: {
120
- targetPlugins: [ParagraphPlugin.key, ...HEADING_LEVELS],
121
- },
122
- }),
123
- IndentPlugin.configure({
124
- inject: {
125
- targetPlugins: [
126
- ParagraphPlugin.key,
127
- BlockquotePlugin.key,
128
- CodeBlockPlugin.key,
129
- TogglePlugin.key,
130
- ...HEADING_LEVELS,
131
- ],
132
- },
133
- }),
134
- IndentListPlugin.configure({
135
- inject: {
136
- targetPlugins: [
137
- ParagraphPlugin.key,
138
- BlockquotePlugin.key,
139
- CodeBlockPlugin.key,
140
- TogglePlugin.key,
141
- ...HEADING_LEVELS,
142
- ],
143
- },
144
- options: {
145
- listStyleTypes: {
146
- todo: {
147
- liComponent: TodoLi,
148
- markerComponent: TodoMarker,
149
- type: "todo",
150
- },
151
- },
152
- },
153
- }),
154
- LineHeightPlugin.configure({
155
- inject: {
156
- nodeProps: {
157
- defaultNodeValue: 1.5,
158
- validNodeValues: [1, 1.2, 1.5, 2, 3],
159
- },
160
- targetPlugins: [ParagraphPlugin.key, ...HEADING_LEVELS],
161
- },
162
- }),
163
- ListPlugin,
164
- BulletedListPlugin,
165
- NumberedListPlugin,
166
- // TABLE
167
- TablePlugin,
168
- TableRowPlugin,
169
- TableCellPlugin,
170
- TableCellHeaderPlugin,
171
- TabbablePlugin.configure(({ editor }) => ({
172
- options: {
173
- query: () => {
174
- if (isSelectionAtBlockStart(editor))
175
- return false;
176
- return !someNode(editor, {
177
- match: (n) => {
178
- return !!(n.type &&
179
- ([
180
- TablePlugin.key,
181
- TodoListPlugin.key,
182
- CodeBlockPlugin.key,
183
- ].includes(n.type) ||
184
- n.listStyleType));
185
- },
186
- });
187
- },
188
- },
189
- })),
190
- ResetNodePlugin.configure({
191
- options: {
192
- rules: [
193
- {
194
- types: [BlockquotePlugin.key, TodoListPlugin.key],
195
- defaultType: ParagraphPlugin.key,
196
- hotkey: "Enter",
197
- predicate: isBlockAboveEmpty,
198
- },
199
- {
200
- types: [BlockquotePlugin.key, TodoListPlugin.key],
201
- defaultType: ParagraphPlugin.key,
202
- hotkey: "Backspace",
203
- predicate: isSelectionAtBlockStart,
204
- },
205
- {
206
- types: [CodeBlockPlugin.key],
207
- defaultType: ParagraphPlugin.key,
208
- onReset: unwrapCodeBlock,
209
- hotkey: "Enter",
210
- predicate: isCodeBlockEmpty,
211
- },
212
- {
213
- types: [CodeBlockPlugin.key],
214
- defaultType: ParagraphPlugin.key,
215
- onReset: unwrapCodeBlock,
216
- hotkey: "Backspace",
217
- predicate: isSelectionAtCodeBlockStart,
218
- },
219
- ],
220
- },
221
- }),
222
- // Functionality
223
- SlashPlugin,
224
- SlashInputPlugin,
225
- AutoformatPlugin.configure({
226
- options: {
227
- rules: autoformatRules,
228
- enableUndoOnDelete: true,
229
- },
230
- }),
231
- BlockSelectionPlugin,
232
- EmojiPlugin,
233
- ExitBreakPlugin.configure({
234
- options: {
235
- rules: [
236
- {
237
- hotkey: "mod+enter",
238
- },
239
- {
240
- hotkey: "mod+shift+enter",
241
- before: true,
242
- },
243
- {
244
- hotkey: "enter",
245
- query: {
246
- start: true,
247
- end: true,
248
- allow: HEADING_LEVELS,
249
- },
250
- relative: true,
251
- level: 1,
252
- },
253
- ],
254
- },
255
- }),
256
- NodeIdPlugin,
257
- ResetNodePlugin.configure({
258
- options: {
259
- rules: [
260
- {
261
- types: [BlockquotePlugin.key, TodoListPlugin.key],
262
- defaultType: ParagraphPlugin.key,
263
- hotkey: "Enter",
264
- predicate: isBlockAboveEmpty,
265
- },
266
- {
267
- types: [BlockquotePlugin.key, TodoListPlugin.key],
268
- defaultType: ParagraphPlugin.key,
269
- hotkey: "Backspace",
270
- predicate: isSelectionAtBlockStart,
271
- },
272
- {
273
- types: [CodeBlockPlugin.key],
274
- defaultType: ParagraphPlugin.key,
275
- onReset: unwrapCodeBlock,
276
- hotkey: "Enter",
277
- predicate: isCodeBlockEmpty,
278
- },
279
- {
280
- types: [CodeBlockPlugin.key],
281
- defaultType: ParagraphPlugin.key,
282
- onReset: unwrapCodeBlock,
283
- hotkey: "Backspace",
284
- predicate: isSelectionAtCodeBlockStart,
285
- },
286
- ],
287
- },
288
- }),
289
- SelectOnBackspacePlugin.configure({
290
- options: {
291
- query: {
292
- allow: [ImagePlugin.key, HorizontalRulePlugin.key],
293
- },
294
- },
295
- }),
296
- SoftBreakPlugin.configure({
297
- options: {
298
- rules: [
299
- { hotkey: "shift+enter" },
300
- {
301
- hotkey: "enter",
302
- query: {
303
- allow: [
304
- CodeBlockPlugin.key,
305
- BlockquotePlugin.key,
306
- TableCellPlugin.key,
307
- TableCellHeaderPlugin.key,
308
- ],
309
- },
310
- },
311
- ],
312
- },
313
- }),
314
- TabbablePlugin.configure(({ editor }) => ({
315
- options: {
316
- query: () => {
317
- if (isSelectionAtBlockStart(editor))
318
- return false;
319
- return !someNode(editor, {
320
- match: (n) => {
321
- return !!(n.type &&
322
- ([
323
- TablePlugin.key,
324
- TodoListPlugin.key,
325
- CodeBlockPlugin.key,
326
- ].includes(n.type) ||
327
- n.listStyleType));
328
- },
329
- });
330
- },
331
- },
332
- })),
333
- TrailingBlockPlugin.configure({
334
- options: { type: ParagraphPlugin.key },
335
- }),
336
- // DragOverCursorPlugin,
337
- ],
338
- override: {
339
- components: withPlaceholders({
340
- [BlockquotePlugin.key]: BlockquoteElement,
341
- [CodeBlockPlugin.key]: CodeBlockElement,
342
- [CodeLinePlugin.key]: CodeLineElement,
343
- [CodeSyntaxPlugin.key]: CodeSyntaxLeaf,
344
- [HorizontalRulePlugin.key]: HrElement,
345
- [HEADING_KEYS.h1]: withProps(HeadingElement, { variant: "h1" }),
346
- [HEADING_KEYS.h2]: withProps(HeadingElement, { variant: "h2" }),
347
- [HEADING_KEYS.h3]: withProps(HeadingElement, { variant: "h3" }),
348
- [HEADING_KEYS.h4]: withProps(HeadingElement, { variant: "h4" }),
349
- [HEADING_KEYS.h5]: withProps(HeadingElement, { variant: "h5" }),
350
- [HEADING_KEYS.h6]: withProps(HeadingElement, { variant: "h6" }),
351
- [ImagePlugin.key]: ImageElement,
352
- [LinkPlugin.key]: LinkElement,
353
- [MediaEmbedPlugin.key]: MediaEmbedElement,
354
- [MentionPlugin.key]: MentionElement,
355
- [MentionInputPlugin.key]: MentionInputElement,
356
- [ParagraphPlugin.key]: ParagraphElement,
357
- [TablePlugin.key]: TableElement,
358
- [TableRowPlugin.key]: TableRowElement,
359
- [TableCellPlugin.key]: TableCellElement,
360
- [TableCellHeaderPlugin.key]: TableCellHeaderElement,
361
- [TodoListPlugin.key]: TodoListElement,
362
- [ExcalidrawPlugin.key]: ExcalidrawElement,
363
- [HighlightPlugin.key]: HighlightLeaf,
364
- [BoldPlugin.key]: withProps(PlateLeaf, { as: "strong" }),
365
- [CodePlugin.key]: CodeLeaf,
366
- [ItalicPlugin.key]: withProps(PlateLeaf, { as: "em" }),
367
- [StrikethroughPlugin.key]: withProps(PlateLeaf, { as: "s" }),
368
- [SubscriptPlugin.key]: withProps(PlateLeaf, { as: "sub" }),
369
- [SuperscriptPlugin.key]: withProps(PlateLeaf, { as: "sup" }),
370
- [UnderlinePlugin.key]: withProps(PlateLeaf, { as: "u" }),
371
- [KbdPlugin.key]: KbdLeaf,
372
- [CommentsPlugin.key]: CommentLeaf,
373
- [SlashInputPlugin.key]: SlashInputElement,
374
- [ListPlugin.key]: withProps(PlateLeaf, { as: "ul" }),
375
- [BulletedListPlugin.key]: withProps(PlateLeaf, { as: "ul" }),
376
- [NumberedListPlugin.key]: withProps(PlateLeaf, { as: "ol" }),
377
- }),
378
- },
379
- value: value,
380
- });
381
- return editor;
382
- };
383
- export default usePlateEditor;
384
- //# sourceMappingURL=usePlateEditor.js.map