argous 1.2.131 → 1.2.135

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 (696) hide show
  1. package/.gitlab-ci.yml +20 -20
  2. package/README.md +1 -1
  3. package/dist/actions/index.d.ts +58 -58
  4. package/dist/actions/index.js +59 -59
  5. package/dist/api/WebSocket.d.ts +25 -25
  6. package/dist/api/WebSocket.js +170 -170
  7. package/dist/api/index.d.ts +63 -62
  8. package/dist/api/index.js +762 -745
  9. package/dist/api/ws.d.ts +4 -4
  10. package/dist/api/ws.js +36 -36
  11. package/dist/components/Alert/Alert.d.ts +7 -7
  12. package/dist/components/Alert/Alert.js +68 -68
  13. package/dist/components/Alert/index.d.ts +1 -1
  14. package/dist/components/Alert/index.js +8 -8
  15. package/dist/components/ArgousAction/ArgousAction.d.ts +7 -7
  16. package/dist/components/ArgousAction/ArgousAction.js +87 -87
  17. package/dist/components/ArgousAction/index.d.ts +1 -1
  18. package/dist/components/ArgousAction/index.js +8 -8
  19. package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +13 -13
  20. package/dist/components/ArgousAvatar/ArgousAvatar.js +124 -124
  21. package/dist/components/ArgousAvatar/index.d.ts +1 -1
  22. package/dist/components/ArgousAvatar/index.js +8 -8
  23. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +75 -75
  24. package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +156 -156
  25. package/dist/components/ArgousComplexPagination/index.d.ts +1 -1
  26. package/dist/components/ArgousComplexPagination/index.js +8 -8
  27. package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +130 -130
  28. package/dist/components/ArgousComplexTable/ArgousComplexTable.js +333 -333
  29. package/dist/components/ArgousComplexTable/index.d.ts +1 -1
  30. package/dist/components/ArgousComplexTable/index.js +8 -8
  31. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +176 -176
  32. package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +155 -155
  33. package/dist/components/ArgousComplexTableBody/index.d.ts +1 -1
  34. package/dist/components/ArgousComplexTableBody/index.js +8 -8
  35. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +72 -72
  36. package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +88 -88
  37. package/dist/components/ArgousComplexTableHead/index.d.ts +1 -1
  38. package/dist/components/ArgousComplexTableHead/index.js +8 -8
  39. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +57 -57
  40. package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +70 -70
  41. package/dist/components/ArgousComplexTableToolbar/index.d.ts +1 -1
  42. package/dist/components/ArgousComplexTableToolbar/index.js +8 -8
  43. package/dist/components/ArgousInput/ArgousInput.d.ts +7 -7
  44. package/dist/components/ArgousInput/ArgousInput.js +578 -578
  45. package/dist/components/ArgousInput/index.d.ts +1 -1
  46. package/dist/components/ArgousInput/index.js +8 -8
  47. package/dist/components/ArgousPagination/ArgousPagination.d.ts +7 -7
  48. package/dist/components/ArgousPagination/ArgousPagination.js +29 -29
  49. package/dist/components/ArgousPagination/index.d.ts +1 -1
  50. package/dist/components/ArgousPagination/index.js +8 -8
  51. package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +21 -21
  52. package/dist/components/ArgousProgressBar/ArgousProgressBar.js +162 -162
  53. package/dist/components/ArgousProgressBar/index.d.ts +1 -1
  54. package/dist/components/ArgousProgressBar/index.js +8 -8
  55. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +7 -7
  56. package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +201 -201
  57. package/dist/components/ArgousSimpleTable/index.d.ts +1 -1
  58. package/dist/components/ArgousSimpleTable/index.js +8 -8
  59. package/dist/components/AutoComplete/AutoComplete.d.ts +7 -7
  60. package/dist/components/AutoComplete/AutoComplete.js +185 -185
  61. package/dist/components/AutoComplete/index.d.ts +1 -1
  62. package/dist/components/AutoComplete/index.js +8 -8
  63. package/dist/components/BarChart/BarChart.d.ts +7 -7
  64. package/dist/components/BarChart/BarChart.js +125 -125
  65. package/dist/components/BarChart/index.d.ts +1 -1
  66. package/dist/components/BarChart/index.js +8 -8
  67. package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +20 -20
  68. package/dist/components/BarraFerramentas/BarraFerramentas.js +228 -228
  69. package/dist/components/BarraFerramentas/index.d.ts +1 -1
  70. package/dist/components/BarraFerramentas/index.js +8 -8
  71. package/dist/components/Button/Button.d.ts +7 -7
  72. package/dist/components/Button/Button.js +144 -144
  73. package/dist/components/Button/index.d.ts +1 -1
  74. package/dist/components/Button/index.js +8 -8
  75. package/dist/components/Cabecalho/Cabecalho.d.ts +7 -7
  76. package/dist/components/Cabecalho/Cabecalho.js +231 -231
  77. package/dist/components/Cabecalho/index.d.ts +1 -1
  78. package/dist/components/Cabecalho/index.js +8 -8
  79. package/dist/components/Calendar/Calendar.d.ts +7 -7
  80. package/dist/components/Calendar/Calendar.js +171 -171
  81. package/dist/components/Calendar/index.d.ts +1 -1
  82. package/dist/components/Calendar/index.js +8 -8
  83. package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +8 -8
  84. package/dist/components/CartaoUsuario/CartaoUsuario.js +165 -165
  85. package/dist/components/CartaoUsuario/index.d.ts +1 -1
  86. package/dist/components/CartaoUsuario/index.js +8 -8
  87. package/dist/components/Collapse/Collapse.d.ts +59 -59
  88. package/dist/components/Collapse/Collapse.js +290 -290
  89. package/dist/components/Collapse/index.d.ts +2 -2
  90. package/dist/components/Collapse/index.js +8 -8
  91. package/dist/components/Compartilhar/Compartilhar.d.ts +6 -6
  92. package/dist/components/Compartilhar/Compartilhar.js +266 -266
  93. package/dist/components/Compartilhar/index.d.ts +1 -1
  94. package/dist/components/Compartilhar/index.js +8 -8
  95. package/dist/components/ConfirmModal/BasicModal.d.ts +38 -38
  96. package/dist/components/ConfirmModal/BasicModal.js +29 -29
  97. package/dist/components/ConfirmModal/ModalProvider.d.ts +5 -5
  98. package/dist/components/ConfirmModal/ModalProvider.js +108 -108
  99. package/dist/components/ConfirmModal/WrapperModal.d.ts +18 -18
  100. package/dist/components/ConfirmModal/WrapperModal.js +41 -41
  101. package/dist/components/ConfirmModal/index.d.ts +19 -19
  102. package/dist/components/ConfirmModal/index.js +25 -25
  103. package/dist/components/DropArea/DropArea.d.ts +20 -20
  104. package/dist/components/DropArea/DropArea.js +149 -149
  105. package/dist/components/DropArea/Html5FileSelector.d.ts +16 -16
  106. package/dist/components/DropArea/Html5FileSelector.js +229 -229
  107. package/dist/components/DropArea/index.d.ts +1 -1
  108. package/dist/components/DropArea/index.js +8 -8
  109. package/dist/components/Editor/Events.d.ts +79 -79
  110. package/dist/components/Editor/Events.js +9 -9
  111. package/dist/components/Editor/ScriptLoader.d.ts +20 -20
  112. package/dist/components/Editor/ScriptLoader.js +70 -70
  113. package/dist/components/Editor/TinyMCE.d.ts +10 -10
  114. package/dist/components/Editor/TinyMCE.js +16 -16
  115. package/dist/components/Editor/Utils.d.ts +19 -19
  116. package/dist/components/Editor/Utils.js +62 -62
  117. package/dist/components/Editor/components/Editor.d.ts +67 -67
  118. package/dist/components/Editor/components/Editor.js +351 -351
  119. package/dist/components/Editor/components/EditorPropTypes.d.ts +18 -18
  120. package/dist/components/Editor/components/EditorPropTypes.js +110 -110
  121. package/dist/components/Editor/index.d.ts +9 -9
  122. package/dist/components/Editor/index.js +12 -12
  123. package/dist/components/Editor/tinymce/tinymce.d.ts +2963 -2963
  124. package/dist/components/FilePreparer/FilePreparer.d.ts +25 -25
  125. package/dist/components/FilePreparer/FilePreparer.js +279 -279
  126. package/dist/components/FilePreparer/index.d.ts +1 -1
  127. package/dist/components/FilePreparer/index.js +8 -8
  128. package/dist/components/FileUploader/FileUploader.d.ts +8 -8
  129. package/dist/components/FileUploader/FileUploader.js +445 -445
  130. package/dist/components/FileUploader/index.d.ts +1 -1
  131. package/dist/components/FileUploader/index.js +8 -8
  132. package/dist/components/FormVisualizer/FormVisualizer.d.ts +91 -91
  133. package/dist/components/FormVisualizer/FormVisualizer.js +264 -264
  134. package/dist/components/FormVisualizer/index.d.ts +1 -1
  135. package/dist/components/FormVisualizer/index.js +8 -8
  136. package/dist/components/Highlight/Highlight.d.ts +6 -6
  137. package/dist/components/Highlight/Highlight.js +75 -75
  138. package/dist/components/Highlight/index.d.ts +1 -1
  139. package/dist/components/Highlight/index.js +8 -8
  140. package/dist/components/ImageResize/ImageResize.d.ts +27 -27
  141. package/dist/components/ImageResize/ImageResize.js +472 -472
  142. package/dist/components/ImageResize/index.d.ts +1 -1
  143. package/dist/components/ImageResize/index.js +8 -8
  144. package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +25 -25
  145. package/dist/components/ImageResizeButton/ImageResizeButton.js +89 -89
  146. package/dist/components/ImageResizeButton/index.d.ts +1 -1
  147. package/dist/components/ImageResizeButton/index.js +8 -8
  148. package/dist/components/Input/Input.d.ts +7 -7
  149. package/dist/components/Input/Input.js +328 -328
  150. package/dist/components/Input/index.d.ts +1 -1
  151. package/dist/components/Input/index.js +8 -8
  152. package/dist/components/InputTags/InputTags.d.ts +7 -7
  153. package/dist/components/InputTags/InputTags.js +129 -129
  154. package/dist/components/InputTags/index.d.ts +1 -1
  155. package/dist/components/InputTags/index.js +8 -8
  156. package/dist/components/ListSelect/ListSelect.d.ts +7 -7
  157. package/dist/components/ListSelect/ListSelect.js +126 -126
  158. package/dist/components/ListSelect/index.d.ts +1 -1
  159. package/dist/components/ListSelect/index.js +8 -8
  160. package/dist/components/MaterialButton/MaterialButton.d.ts +12 -12
  161. package/dist/components/MaterialButton/MaterialButton.js +192 -192
  162. package/dist/components/MaterialButton/index.d.ts +1 -1
  163. package/dist/components/MaterialButton/index.js +8 -8
  164. package/dist/components/MenuBar/MenuBar.d.ts +7 -7
  165. package/dist/components/MenuBar/MenuBar.js +157 -157
  166. package/dist/components/MenuBar/index.d.ts +1 -1
  167. package/dist/components/MenuBar/index.js +8 -8
  168. package/dist/components/MonthPicker/MonthPicker.d.ts +7 -7
  169. package/dist/components/MonthPicker/MonthPicker.js +288 -288
  170. package/dist/components/MonthPicker/index.d.ts +1 -1
  171. package/dist/components/MonthPicker/index.js +8 -8
  172. package/dist/components/MultipleSelect/MultipleSelect.d.ts +7 -7
  173. package/dist/components/MultipleSelect/MultipleSelect.js +139 -139
  174. package/dist/components/MultipleSelect/index.d.ts +1 -1
  175. package/dist/components/MultipleSelect/index.js +8 -8
  176. package/dist/components/OtpInput/OtpInput.d.ts +18 -18
  177. package/dist/components/OtpInput/OtpInput.js +207 -207
  178. package/dist/components/OtpInput/index.d.ts +1 -1
  179. package/dist/components/OtpInput/index.js +8 -8
  180. package/dist/components/OutputText/OutputText.d.ts +7 -7
  181. package/dist/components/OutputText/OutputText.js +89 -89
  182. package/dist/components/OutputText/index.d.ts +1 -1
  183. package/dist/components/OutputText/index.js +8 -8
  184. package/dist/components/Pagination/Pagination.d.ts +7 -7
  185. package/dist/components/Pagination/Pagination.js +64 -64
  186. package/dist/components/Pagination/index.d.ts +1 -1
  187. package/dist/components/Pagination/index.js +8 -8
  188. package/dist/components/Programa/Programa.d.ts +30 -30
  189. package/dist/components/Programa/Programa.js +201 -201
  190. package/dist/components/Programa/index.d.ts +1 -1
  191. package/dist/components/Programa/index.js +8 -8
  192. package/dist/components/ProgressBar/ProgressBar.d.ts +7 -7
  193. package/dist/components/ProgressBar/ProgressBar.js +98 -98
  194. package/dist/components/ProgressBar/index.d.ts +1 -1
  195. package/dist/components/ProgressBar/index.js +8 -8
  196. package/dist/components/Select/Select.d.ts +7 -7
  197. package/dist/components/Select/Select.js +142 -142
  198. package/dist/components/Select/index.d.ts +1 -1
  199. package/dist/components/Select/index.js +8 -8
  200. package/dist/components/SimpleTable/SimpleTable.d.ts +12 -12
  201. package/dist/components/SimpleTable/SimpleTable.js +390 -390
  202. package/dist/components/SimpleTable/index.d.ts +1 -1
  203. package/dist/components/SimpleTable/index.js +10 -10
  204. package/dist/components/Stepper/Stepper.d.ts +53 -53
  205. package/dist/components/Stepper/Stepper.js +157 -157
  206. package/dist/components/Stepper/index.d.ts +1 -1
  207. package/dist/components/Stepper/index.js +8 -8
  208. package/dist/components/TablePicker/TablePicker.d.ts +7 -7
  209. package/dist/components/TablePicker/TablePicker.js +222 -222
  210. package/dist/components/TablePicker/index.d.ts +1 -1
  211. package/dist/components/TablePicker/index.js +8 -8
  212. package/dist/components/Tabs/Tabs.d.ts +7 -7
  213. package/dist/components/Tabs/Tabs.js +76 -76
  214. package/dist/components/Tabs/index.d.ts +1 -1
  215. package/dist/components/Tabs/index.js +8 -8
  216. package/dist/components/TextArea/TextArea.d.ts +7 -7
  217. package/dist/components/TextArea/TextArea.js +148 -148
  218. package/dist/components/TextArea/index.d.ts +1 -1
  219. package/dist/components/TextArea/index.js +8 -8
  220. package/dist/components/ThreadLog/ThreadLog.d.ts +7 -7
  221. package/dist/components/ThreadLog/ThreadLog.js +225 -225
  222. package/dist/components/ThreadLog/index.d.ts +1 -1
  223. package/dist/components/ThreadLog/index.js +8 -8
  224. package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +92 -92
  225. package/dist/components/UtilAutoComplete/UtilAutoComplete.js +188 -188
  226. package/dist/components/UtilAutoComplete/index.d.ts +1 -1
  227. package/dist/components/UtilAutoComplete/index.js +8 -8
  228. package/dist/components/index.d.ts +147 -147
  229. package/dist/components/index.js +162 -162
  230. package/dist/fieldsRedux/createField.d.ts +8 -8
  231. package/dist/fieldsRedux/createField.js +149 -149
  232. package/dist/fieldsRedux/fieldsRedux.d.ts +71 -71
  233. package/dist/fieldsRedux/fieldsRedux.js +436 -436
  234. package/dist/fieldsRedux/index.d.ts +4 -4
  235. package/dist/fieldsRedux/index.js +27 -27
  236. package/dist/fieldsRedux/passFields.d.ts +5 -5
  237. package/dist/fieldsRedux/passFields.js +107 -107
  238. package/dist/reducers/argous.d.ts +76 -76
  239. package/dist/reducers/argous.js +63 -63
  240. package/dist/reducers/index.d.ts +4 -4
  241. package/dist/reducers/index.js +9 -9
  242. package/dist/types.d.ts +144 -144
  243. package/dist/utils/api.d.ts +29 -29
  244. package/dist/utils/api.js +255 -255
  245. package/dist/utils/config.d.ts +3 -3
  246. package/dist/utils/config.js +13 -13
  247. package/dist/utils/date.d.ts +8 -8
  248. package/dist/utils/date.js +60 -60
  249. package/dist/utils/index.d.ts +61 -61
  250. package/dist/utils/index.js +383 -383
  251. package/dist/utils/rippleEffect.d.ts +2 -2
  252. package/dist/utils/rippleEffect.js +173 -173
  253. package/dist/utils/store.d.ts +3 -3
  254. package/dist/utils/store.js +12 -12
  255. package/dist/utils/xmlToJson.d.ts +2 -2
  256. package/dist/utils/xmlToJson.js +158 -158
  257. package/index.js +1 -1
  258. package/lib/actions/index.ts +57 -0
  259. package/lib/api/WebSocket.js +148 -0
  260. package/lib/api/index.js +402 -0
  261. package/lib/api/ws.js +27 -0
  262. package/lib/components/Alert/Alert.d.ts +8 -0
  263. package/lib/components/Alert/Alert.js +49 -0
  264. package/lib/components/Alert/index.d.ts +2 -0
  265. package/lib/components/Alert/index.js +1 -0
  266. package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
  267. package/lib/components/ArgousAction/ArgousAction.js +78 -0
  268. package/lib/components/ArgousAction/index.d.ts +2 -0
  269. package/lib/components/ArgousAction/index.js +1 -0
  270. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  271. package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
  272. package/lib/components/ArgousAvatar/index.d.ts +2 -0
  273. package/lib/components/ArgousAvatar/index.js +1 -0
  274. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  275. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
  276. package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
  277. package/lib/components/ArgousComplexPagination/index.js +1 -0
  278. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  279. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
  280. package/lib/components/ArgousComplexTable/index.d.ts +2 -0
  281. package/lib/components/ArgousComplexTable/index.js +1 -0
  282. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  283. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
  284. package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
  285. package/lib/components/ArgousComplexTableBody/index.js +1 -0
  286. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  287. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
  288. package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
  289. package/lib/components/ArgousComplexTableHead/index.js +1 -0
  290. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  291. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
  292. package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  293. package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
  294. package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
  295. package/lib/components/ArgousInput/ArgousInput.js +616 -0
  296. package/lib/components/ArgousInput/index.d.ts +2 -0
  297. package/lib/components/ArgousInput/index.js +1 -0
  298. package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  299. package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
  300. package/lib/components/ArgousPagination/index.d.ts +2 -0
  301. package/lib/components/ArgousPagination/index.js +1 -0
  302. package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  303. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
  304. package/lib/components/ArgousProgressBar/index.d.ts +2 -0
  305. package/lib/components/ArgousProgressBar/index.js +1 -0
  306. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  307. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
  308. package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
  309. package/lib/components/ArgousSimpleTable/index.js +1 -0
  310. package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
  311. package/lib/components/AutoComplete/AutoComplete.js +189 -0
  312. package/lib/components/AutoComplete/index.d.ts +2 -0
  313. package/lib/components/AutoComplete/index.js +1 -0
  314. package/lib/components/BarChart/BarChart.d.ts +8 -0
  315. package/lib/components/BarChart/BarChart.js +92 -0
  316. package/lib/components/BarChart/index.d.ts +2 -0
  317. package/lib/components/BarChart/index.js +1 -0
  318. package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  319. package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
  320. package/lib/components/BarraFerramentas/index.d.ts +2 -0
  321. package/lib/components/BarraFerramentas/index.js +1 -0
  322. package/lib/components/Button/Button.d.ts +8 -0
  323. package/lib/components/Button/Button.js +135 -0
  324. package/lib/components/Button/index.d.ts +2 -0
  325. package/lib/components/Button/index.js +1 -0
  326. package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
  327. package/lib/components/Cabecalho/Cabecalho.js +245 -0
  328. package/lib/components/Cabecalho/index.d.ts +2 -0
  329. package/lib/components/Cabecalho/index.js +1 -0
  330. package/lib/components/Calendar/Calendar.d.ts +8 -0
  331. package/lib/components/Calendar/Calendar.js +156 -0
  332. package/lib/components/Calendar/index.d.ts +2 -0
  333. package/lib/components/Calendar/index.js +1 -0
  334. package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  335. package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
  336. package/lib/components/CartaoUsuario/index.d.ts +2 -0
  337. package/lib/components/CartaoUsuario/index.js +1 -0
  338. package/lib/components/Collapse/Collapse.d.ts +60 -0
  339. package/lib/components/Collapse/Collapse.js +317 -0
  340. package/lib/components/Collapse/index.d.ts +3 -0
  341. package/lib/components/Collapse/index.js +1 -0
  342. package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
  343. package/lib/components/Compartilhar/Compartilhar.js +314 -0
  344. package/lib/components/Compartilhar/index.d.ts +2 -0
  345. package/lib/components/Compartilhar/index.js +1 -0
  346. package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
  347. package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
  348. package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
  349. package/lib/components/ConfirmModal/index.d.ts +20 -0
  350. package/lib/components/ConfirmModal/index.js +8 -0
  351. package/lib/components/DropArea/DropArea.d.ts +21 -0
  352. package/lib/components/DropArea/DropArea.js +90 -0
  353. package/lib/components/DropArea/Html5FileSelector.js +164 -0
  354. package/lib/components/DropArea/index.d.ts +2 -0
  355. package/lib/components/DropArea/index.js +1 -0
  356. package/lib/components/Editor/Events.ts +83 -0
  357. package/lib/components/Editor/ScriptLoader.ts +96 -0
  358. package/lib/components/Editor/TinyMCE.ts +19 -0
  359. package/lib/components/Editor/Utils.ts +95 -0
  360. package/lib/components/Editor/components/Editor.tsx +375 -0
  361. package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
  362. package/lib/components/Editor/index.tsx +11 -0
  363. package/lib/components/Editor/skins/content/dark/content.css +72 -0
  364. package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
  365. package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
  366. package/lib/components/Editor/skins/content/default/content.css +67 -0
  367. package/lib/components/Editor/skins/content/default/content.min.css +8 -0
  368. package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
  369. package/lib/components/Editor/skins/content/document/content.css +72 -0
  370. package/lib/components/Editor/skins/content/document/content.min.css +8 -0
  371. package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
  372. package/lib/components/Editor/skins/content/writer/content.css +68 -0
  373. package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
  374. package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
  375. package/lib/components/Editor/skins/ui/dark/content.css +714 -0
  376. package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
  377. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
  378. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
  379. package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
  380. package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
  381. package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
  382. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
  383. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
  384. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  385. package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
  386. package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
  387. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
  388. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
  389. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
  390. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
  391. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
  392. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
  393. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
  394. package/lib/components/Editor/skins/ui/default/content.css +732 -0
  395. package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
  396. package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
  397. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
  398. package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
  399. package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
  400. package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
  401. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
  402. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
  403. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  404. package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
  405. package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
  406. package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
  407. package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
  408. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
  409. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
  410. package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
  411. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
  412. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
  413. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  414. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
  415. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
  416. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
  417. package/lib/components/Editor/tinymce/README.md +63 -0
  418. package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
  419. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
  420. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
  421. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  422. package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
  423. package/lib/components/Editor/tinymce/license.txt +504 -0
  424. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
  425. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
  426. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
  427. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
  428. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
  429. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
  430. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
  431. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
  432. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
  433. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
  434. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
  435. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
  436. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
  437. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
  438. package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
  439. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
  440. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
  441. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
  442. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +22 -0
  443. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  444. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +22 -0
  445. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  446. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
  447. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
  448. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  449. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  450. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  451. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  452. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
  453. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
  454. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
  455. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
  456. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
  457. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  458. package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
  459. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
  460. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
  461. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
  462. package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
  463. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
  464. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
  465. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
  466. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
  467. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
  468. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
  469. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  470. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
  471. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  472. package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
  473. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
  474. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
  475. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
  476. package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
  477. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
  478. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
  479. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  480. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
  481. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
  482. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
  483. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  484. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
  485. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
  486. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
  487. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
  488. package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
  489. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
  490. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
  491. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
  492. package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
  493. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
  494. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
  495. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  496. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
  497. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  498. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
  499. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  500. package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
  501. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
  502. package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
  503. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
  504. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +22 -0
  505. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
  506. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
  507. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
  508. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
  509. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
  510. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
  511. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  512. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
  513. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
  514. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
  515. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
  516. package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
  517. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
  518. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
  519. package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
  520. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
  521. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
  522. package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
  523. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
  524. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
  525. package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
  526. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
  527. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
  528. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
  529. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
  530. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
  531. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
  532. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
  533. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
  534. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  535. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
  536. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
  537. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  538. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
  539. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
  540. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
  541. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  542. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
  543. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
  544. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  545. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  546. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  547. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
  548. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  549. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
  550. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
  551. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
  552. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
  553. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  554. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
  555. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
  556. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  557. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
  558. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
  559. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
  560. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  561. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
  562. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
  563. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  564. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  565. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  566. package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
  567. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
  568. package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
  569. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
  570. package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
  571. package/lib/components/Editor/tinymce/tinymce.js +30106 -0
  572. package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
  573. package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
  574. package/lib/components/FilePreparer/FilePreparer.js +247 -0
  575. package/lib/components/FilePreparer/index.d.ts +2 -0
  576. package/lib/components/FilePreparer/index.js +1 -0
  577. package/lib/components/FileUploader/FileUploader.d.ts +9 -0
  578. package/lib/components/FileUploader/FileUploader.js +318 -0
  579. package/lib/components/FileUploader/index.d.ts +2 -0
  580. package/lib/components/FileUploader/index.js +1 -0
  581. package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  582. package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
  583. package/lib/components/FormVisualizer/index.d.ts +2 -0
  584. package/lib/components/FormVisualizer/index.js +1 -0
  585. package/lib/components/Highlight/Highlight.d.ts +7 -0
  586. package/lib/components/Highlight/Highlight.js +51 -0
  587. package/lib/components/Highlight/index.d.ts +2 -0
  588. package/lib/components/Highlight/index.js +1 -0
  589. package/lib/components/ImageResize/ImageResize.d.ts +28 -0
  590. package/lib/components/ImageResize/ImageResize.js +479 -0
  591. package/lib/components/ImageResize/index.d.ts +2 -0
  592. package/lib/components/ImageResize/index.js +1 -0
  593. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  594. package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
  595. package/lib/components/ImageResizeButton/index.d.ts +2 -0
  596. package/lib/components/ImageResizeButton/index.js +1 -0
  597. package/lib/components/Input/Input.d.ts +8 -0
  598. package/lib/components/Input/Input.js +353 -0
  599. package/lib/components/Input/index.d.ts +2 -0
  600. package/lib/components/Input/index.js +1 -0
  601. package/lib/components/InputTags/InputTags.d.ts +8 -0
  602. package/lib/components/InputTags/InputTags.js +94 -0
  603. package/lib/components/InputTags/index.d.ts +2 -0
  604. package/lib/components/InputTags/index.js +1 -0
  605. package/lib/components/ListSelect/ListSelect.d.ts +8 -0
  606. package/lib/components/ListSelect/ListSelect.js +94 -0
  607. package/lib/components/ListSelect/index.d.ts +2 -0
  608. package/lib/components/ListSelect/index.js +1 -0
  609. package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
  610. package/lib/components/MaterialButton/MaterialButton.js +177 -0
  611. package/lib/components/MaterialButton/index.d.ts +2 -0
  612. package/lib/components/MaterialButton/index.js +1 -0
  613. package/lib/components/MenuBar/MenuBar.d.ts +8 -0
  614. package/lib/components/MenuBar/MenuBar.js +139 -0
  615. package/lib/components/MenuBar/index.d.ts +2 -0
  616. package/lib/components/MenuBar/index.js +1 -0
  617. package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
  618. package/lib/components/MonthPicker/MonthPicker.js +313 -0
  619. package/lib/components/MonthPicker/index.d.ts +2 -0
  620. package/lib/components/MonthPicker/index.js +1 -0
  621. package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  622. package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
  623. package/lib/components/MultipleSelect/index.d.ts +2 -0
  624. package/lib/components/MultipleSelect/index.js +1 -0
  625. package/lib/components/OtpInput/OtpInput.tsx +244 -0
  626. package/lib/components/OtpInput/index.d.ts +2 -0
  627. package/lib/components/OtpInput/index.js +1 -0
  628. package/lib/components/OutputText/OutputText.d.ts +8 -0
  629. package/lib/components/OutputText/OutputText.js +57 -0
  630. package/lib/components/OutputText/index.d.ts +2 -0
  631. package/lib/components/OutputText/index.js +1 -0
  632. package/lib/components/Pagination/Pagination.d.ts +8 -0
  633. package/lib/components/Pagination/Pagination.js +32 -0
  634. package/lib/components/Pagination/index.d.ts +2 -0
  635. package/lib/components/Pagination/index.js +1 -0
  636. package/lib/components/Programa/Programa.d.ts +31 -0
  637. package/lib/components/Programa/Programa.js +172 -0
  638. package/lib/components/Programa/index.d.ts +2 -0
  639. package/lib/components/Programa/index.js +1 -0
  640. package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
  641. package/lib/components/ProgressBar/ProgressBar.js +71 -0
  642. package/lib/components/ProgressBar/index.d.ts +2 -0
  643. package/lib/components/ProgressBar/index.js +1 -0
  644. package/lib/components/Select/Select.d.ts +8 -0
  645. package/lib/components/Select/Select.js +117 -0
  646. package/lib/components/Select/index.d.ts +2 -0
  647. package/lib/components/Select/index.js +1 -0
  648. package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
  649. package/lib/components/SimpleTable/SimpleTable.js +504 -0
  650. package/lib/components/SimpleTable/index.d.ts +2 -0
  651. package/lib/components/SimpleTable/index.js +2 -0
  652. package/lib/components/Stepper/Stepper.d.ts +54 -0
  653. package/lib/components/Stepper/Stepper.js +222 -0
  654. package/lib/components/Stepper/index.d.ts +2 -0
  655. package/lib/components/Stepper/index.js +1 -0
  656. package/lib/components/TablePicker/TablePicker.d.ts +8 -0
  657. package/lib/components/TablePicker/TablePicker.js +238 -0
  658. package/lib/components/TablePicker/index.d.ts +2 -0
  659. package/lib/components/TablePicker/index.js +1 -0
  660. package/lib/components/Tabs/Tabs.d.ts +8 -0
  661. package/lib/components/Tabs/Tabs.js +59 -0
  662. package/lib/components/Tabs/index.d.ts +2 -0
  663. package/lib/components/Tabs/index.js +1 -0
  664. package/lib/components/TextArea/TextArea.d.ts +8 -0
  665. package/lib/components/TextArea/TextArea.js +123 -0
  666. package/lib/components/TextArea/index.d.ts +2 -0
  667. package/lib/components/TextArea/index.js +1 -0
  668. package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
  669. package/lib/components/ThreadLog/ThreadLog.js +189 -0
  670. package/lib/components/ThreadLog/index.d.ts +2 -0
  671. package/lib/components/ThreadLog/index.js +1 -0
  672. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  673. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
  674. package/lib/components/UtilAutoComplete/index.d.ts +2 -0
  675. package/lib/components/UtilAutoComplete/index.js +1 -0
  676. package/lib/components/index.d.ts +148 -0
  677. package/lib/components/index.js +146 -0
  678. package/lib/fieldsRedux/createField.d.ts +8 -0
  679. package/lib/fieldsRedux/createField.js +120 -0
  680. package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
  681. package/lib/fieldsRedux/fieldsRedux.js +391 -0
  682. package/lib/fieldsRedux/index.d.ts +4 -0
  683. package/lib/fieldsRedux/index.js +5 -0
  684. package/lib/fieldsRedux/passFields.d.ts +5 -0
  685. package/lib/fieldsRedux/passFields.js +76 -0
  686. package/lib/reducers/argous.ts +103 -0
  687. package/lib/reducers/index.ts +6 -0
  688. package/lib/types.d.ts +144 -0
  689. package/lib/utils/api.ts +153 -0
  690. package/lib/utils/config.ts +12 -0
  691. package/lib/utils/date.ts +63 -0
  692. package/lib/utils/index.ts +314 -0
  693. package/lib/utils/rippleEffect.js +211 -0
  694. package/lib/utils/store.ts +11 -0
  695. package/lib/utils/xmlToJson.js +117 -0
  696. package/package.json +107 -107
@@ -0,0 +1,2286 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.9.0 (TBD)
8
+ */
9
+ (function () {
10
+ 'use strict';
11
+
12
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+ var typeOf = function (x) {
15
+ var t = typeof x;
16
+ if (x === null) {
17
+ return 'null';
18
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
19
+ return 'array';
20
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
21
+ return 'string';
22
+ } else {
23
+ return t;
24
+ }
25
+ };
26
+ var isType = function (type) {
27
+ return function (value) {
28
+ return typeOf(value) === type;
29
+ };
30
+ };
31
+ var isSimpleType = function (type) {
32
+ return function (value) {
33
+ return typeof value === type;
34
+ };
35
+ };
36
+ var isString = isType('string');
37
+ var isObject = isType('object');
38
+ var isArray = isType('array');
39
+ var isBoolean = isSimpleType('boolean');
40
+ var isFunction = isSimpleType('function');
41
+ var isNumber = isSimpleType('number');
42
+
43
+ var noop = function () {
44
+ };
45
+ var constant = function (value) {
46
+ return function () {
47
+ return value;
48
+ };
49
+ };
50
+ var not = function (f) {
51
+ return function (t) {
52
+ return !f(t);
53
+ };
54
+ };
55
+ var never = constant(false);
56
+ var always = constant(true);
57
+
58
+ var none = function () {
59
+ return NONE;
60
+ };
61
+ var NONE = function () {
62
+ var eq = function (o) {
63
+ return o.isNone();
64
+ };
65
+ var call = function (thunk) {
66
+ return thunk();
67
+ };
68
+ var id = function (n) {
69
+ return n;
70
+ };
71
+ var me = {
72
+ fold: function (n, _s) {
73
+ return n();
74
+ },
75
+ is: never,
76
+ isSome: never,
77
+ isNone: always,
78
+ getOr: id,
79
+ getOrThunk: call,
80
+ getOrDie: function (msg) {
81
+ throw new Error(msg || 'error: getOrDie called on none.');
82
+ },
83
+ getOrNull: constant(null),
84
+ getOrUndefined: constant(undefined),
85
+ or: id,
86
+ orThunk: call,
87
+ map: none,
88
+ each: noop,
89
+ bind: none,
90
+ exists: never,
91
+ forall: always,
92
+ filter: none,
93
+ equals: eq,
94
+ equals_: eq,
95
+ toArray: function () {
96
+ return [];
97
+ },
98
+ toString: constant('none()')
99
+ };
100
+ return me;
101
+ }();
102
+ var some = function (a) {
103
+ var constant_a = constant(a);
104
+ var self = function () {
105
+ return me;
106
+ };
107
+ var bind = function (f) {
108
+ return f(a);
109
+ };
110
+ var me = {
111
+ fold: function (n, s) {
112
+ return s(a);
113
+ },
114
+ is: function (v) {
115
+ return a === v;
116
+ },
117
+ isSome: always,
118
+ isNone: never,
119
+ getOr: constant_a,
120
+ getOrThunk: constant_a,
121
+ getOrDie: constant_a,
122
+ getOrNull: constant_a,
123
+ getOrUndefined: constant_a,
124
+ or: self,
125
+ orThunk: self,
126
+ map: function (f) {
127
+ return some(f(a));
128
+ },
129
+ each: function (f) {
130
+ f(a);
131
+ },
132
+ bind: bind,
133
+ exists: bind,
134
+ forall: bind,
135
+ filter: function (f) {
136
+ return f(a) ? me : NONE;
137
+ },
138
+ toArray: function () {
139
+ return [a];
140
+ },
141
+ toString: function () {
142
+ return 'some(' + a + ')';
143
+ },
144
+ equals: function (o) {
145
+ return o.is(a);
146
+ },
147
+ equals_: function (o, elementEq) {
148
+ return o.fold(never, function (b) {
149
+ return elementEq(a, b);
150
+ });
151
+ }
152
+ };
153
+ return me;
154
+ };
155
+ var from = function (value) {
156
+ return value === null || value === undefined ? NONE : some(value);
157
+ };
158
+ var Optional = {
159
+ some: some,
160
+ none: none,
161
+ from: from
162
+ };
163
+
164
+ var nativeSlice = Array.prototype.slice;
165
+ var nativePush = Array.prototype.push;
166
+ var map = function (xs, f) {
167
+ var len = xs.length;
168
+ var r = new Array(len);
169
+ for (var i = 0; i < len; i++) {
170
+ var x = xs[i];
171
+ r[i] = f(x, i);
172
+ }
173
+ return r;
174
+ };
175
+ var each = function (xs, f) {
176
+ for (var i = 0, len = xs.length; i < len; i++) {
177
+ var x = xs[i];
178
+ f(x, i);
179
+ }
180
+ };
181
+ var filter = function (xs, pred) {
182
+ var r = [];
183
+ for (var i = 0, len = xs.length; i < len; i++) {
184
+ var x = xs[i];
185
+ if (pred(x, i)) {
186
+ r.push(x);
187
+ }
188
+ }
189
+ return r;
190
+ };
191
+ var groupBy = function (xs, f) {
192
+ if (xs.length === 0) {
193
+ return [];
194
+ } else {
195
+ var wasType = f(xs[0]);
196
+ var r = [];
197
+ var group = [];
198
+ for (var i = 0, len = xs.length; i < len; i++) {
199
+ var x = xs[i];
200
+ var type = f(x);
201
+ if (type !== wasType) {
202
+ r.push(group);
203
+ group = [];
204
+ }
205
+ wasType = type;
206
+ group.push(x);
207
+ }
208
+ if (group.length !== 0) {
209
+ r.push(group);
210
+ }
211
+ return r;
212
+ }
213
+ };
214
+ var foldl = function (xs, f, acc) {
215
+ each(xs, function (x) {
216
+ acc = f(acc, x);
217
+ });
218
+ return acc;
219
+ };
220
+ var findUntil = function (xs, pred, until) {
221
+ for (var i = 0, len = xs.length; i < len; i++) {
222
+ var x = xs[i];
223
+ if (pred(x, i)) {
224
+ return Optional.some(x);
225
+ } else if (until(x, i)) {
226
+ break;
227
+ }
228
+ }
229
+ return Optional.none();
230
+ };
231
+ var find = function (xs, pred) {
232
+ return findUntil(xs, pred, never);
233
+ };
234
+ var flatten = function (xs) {
235
+ var r = [];
236
+ for (var i = 0, len = xs.length; i < len; ++i) {
237
+ if (!isArray(xs[i])) {
238
+ throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
239
+ }
240
+ nativePush.apply(r, xs[i]);
241
+ }
242
+ return r;
243
+ };
244
+ var bind = function (xs, f) {
245
+ return flatten(map(xs, f));
246
+ };
247
+ var reverse = function (xs) {
248
+ var r = nativeSlice.call(xs, 0);
249
+ r.reverse();
250
+ return r;
251
+ };
252
+ var get = function (xs, i) {
253
+ return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
254
+ };
255
+ var head = function (xs) {
256
+ return get(xs, 0);
257
+ };
258
+ var last = function (xs) {
259
+ return get(xs, xs.length - 1);
260
+ };
261
+
262
+ var __assign = function () {
263
+ __assign = Object.assign || function __assign(t) {
264
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
265
+ s = arguments[i];
266
+ for (var p in s)
267
+ if (Object.prototype.hasOwnProperty.call(s, p))
268
+ t[p] = s[p];
269
+ }
270
+ return t;
271
+ };
272
+ return __assign.apply(this, arguments);
273
+ };
274
+ function __spreadArrays() {
275
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
276
+ s += arguments[i].length;
277
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
278
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
279
+ r[k] = a[j];
280
+ return r;
281
+ }
282
+
283
+ var cached = function (f) {
284
+ var called = false;
285
+ var r;
286
+ return function () {
287
+ var args = [];
288
+ for (var _i = 0; _i < arguments.length; _i++) {
289
+ args[_i] = arguments[_i];
290
+ }
291
+ if (!called) {
292
+ called = true;
293
+ r = f.apply(null, args);
294
+ }
295
+ return r;
296
+ };
297
+ };
298
+
299
+ var DeviceType = function (os, browser, userAgent, mediaMatch) {
300
+ var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
301
+ var isiPhone = os.isiOS() && !isiPad;
302
+ var isMobile = os.isiOS() || os.isAndroid();
303
+ var isTouch = isMobile || mediaMatch('(pointer:coarse)');
304
+ var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
305
+ var isPhone = isiPhone || isMobile && !isTablet;
306
+ var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
307
+ var isDesktop = !isPhone && !isTablet && !iOSwebview;
308
+ return {
309
+ isiPad: constant(isiPad),
310
+ isiPhone: constant(isiPhone),
311
+ isTablet: constant(isTablet),
312
+ isPhone: constant(isPhone),
313
+ isTouch: constant(isTouch),
314
+ isAndroid: os.isAndroid,
315
+ isiOS: os.isiOS,
316
+ isWebView: constant(iOSwebview),
317
+ isDesktop: constant(isDesktop)
318
+ };
319
+ };
320
+
321
+ var firstMatch = function (regexes, s) {
322
+ for (var i = 0; i < regexes.length; i++) {
323
+ var x = regexes[i];
324
+ if (x.test(s)) {
325
+ return x;
326
+ }
327
+ }
328
+ return undefined;
329
+ };
330
+ var find$1 = function (regexes, agent) {
331
+ var r = firstMatch(regexes, agent);
332
+ if (!r) {
333
+ return {
334
+ major: 0,
335
+ minor: 0
336
+ };
337
+ }
338
+ var group = function (i) {
339
+ return Number(agent.replace(r, '$' + i));
340
+ };
341
+ return nu(group(1), group(2));
342
+ };
343
+ var detect = function (versionRegexes, agent) {
344
+ var cleanedAgent = String(agent).toLowerCase();
345
+ if (versionRegexes.length === 0) {
346
+ return unknown();
347
+ }
348
+ return find$1(versionRegexes, cleanedAgent);
349
+ };
350
+ var unknown = function () {
351
+ return nu(0, 0);
352
+ };
353
+ var nu = function (major, minor) {
354
+ return {
355
+ major: major,
356
+ minor: minor
357
+ };
358
+ };
359
+ var Version = {
360
+ nu: nu,
361
+ detect: detect,
362
+ unknown: unknown
363
+ };
364
+
365
+ var detect$1 = function (candidates, userAgent) {
366
+ var agent = String(userAgent).toLowerCase();
367
+ return find(candidates, function (candidate) {
368
+ return candidate.search(agent);
369
+ });
370
+ };
371
+ var detectBrowser = function (browsers, userAgent) {
372
+ return detect$1(browsers, userAgent).map(function (browser) {
373
+ var version = Version.detect(browser.versionRegexes, userAgent);
374
+ return {
375
+ current: browser.name,
376
+ version: version
377
+ };
378
+ });
379
+ };
380
+ var detectOs = function (oses, userAgent) {
381
+ return detect$1(oses, userAgent).map(function (os) {
382
+ var version = Version.detect(os.versionRegexes, userAgent);
383
+ return {
384
+ current: os.name,
385
+ version: version
386
+ };
387
+ });
388
+ };
389
+ var UaString = {
390
+ detectBrowser: detectBrowser,
391
+ detectOs: detectOs
392
+ };
393
+
394
+ var contains = function (str, substr) {
395
+ return str.indexOf(substr) !== -1;
396
+ };
397
+ var blank = function (r) {
398
+ return function (s) {
399
+ return s.replace(r, '');
400
+ };
401
+ };
402
+ var trim = blank(/^\s+|\s+$/g);
403
+ var isNotEmpty = function (s) {
404
+ return s.length > 0;
405
+ };
406
+ var isEmpty = function (s) {
407
+ return !isNotEmpty(s);
408
+ };
409
+
410
+ var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
411
+ var checkContains = function (target) {
412
+ return function (uastring) {
413
+ return contains(uastring, target);
414
+ };
415
+ };
416
+ var browsers = [
417
+ {
418
+ name: 'Edge',
419
+ versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
420
+ search: function (uastring) {
421
+ return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
422
+ }
423
+ },
424
+ {
425
+ name: 'Chrome',
426
+ versionRegexes: [
427
+ /.*?chrome\/([0-9]+)\.([0-9]+).*/,
428
+ normalVersionRegex
429
+ ],
430
+ search: function (uastring) {
431
+ return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
432
+ }
433
+ },
434
+ {
435
+ name: 'IE',
436
+ versionRegexes: [
437
+ /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
438
+ /.*?rv:([0-9]+)\.([0-9]+).*/
439
+ ],
440
+ search: function (uastring) {
441
+ return contains(uastring, 'msie') || contains(uastring, 'trident');
442
+ }
443
+ },
444
+ {
445
+ name: 'Opera',
446
+ versionRegexes: [
447
+ normalVersionRegex,
448
+ /.*?opera\/([0-9]+)\.([0-9]+).*/
449
+ ],
450
+ search: checkContains('opera')
451
+ },
452
+ {
453
+ name: 'Firefox',
454
+ versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
455
+ search: checkContains('firefox')
456
+ },
457
+ {
458
+ name: 'Safari',
459
+ versionRegexes: [
460
+ normalVersionRegex,
461
+ /.*?cpu os ([0-9]+)_([0-9]+).*/
462
+ ],
463
+ search: function (uastring) {
464
+ return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
465
+ }
466
+ }
467
+ ];
468
+ var oses = [
469
+ {
470
+ name: 'Windows',
471
+ search: checkContains('win'),
472
+ versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
473
+ },
474
+ {
475
+ name: 'iOS',
476
+ search: function (uastring) {
477
+ return contains(uastring, 'iphone') || contains(uastring, 'ipad');
478
+ },
479
+ versionRegexes: [
480
+ /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
481
+ /.*cpu os ([0-9]+)_([0-9]+).*/,
482
+ /.*cpu iphone os ([0-9]+)_([0-9]+).*/
483
+ ]
484
+ },
485
+ {
486
+ name: 'Android',
487
+ search: checkContains('android'),
488
+ versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
489
+ },
490
+ {
491
+ name: 'OSX',
492
+ search: checkContains('mac os x'),
493
+ versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
494
+ },
495
+ {
496
+ name: 'Linux',
497
+ search: checkContains('linux'),
498
+ versionRegexes: []
499
+ },
500
+ {
501
+ name: 'Solaris',
502
+ search: checkContains('sunos'),
503
+ versionRegexes: []
504
+ },
505
+ {
506
+ name: 'FreeBSD',
507
+ search: checkContains('freebsd'),
508
+ versionRegexes: []
509
+ },
510
+ {
511
+ name: 'ChromeOS',
512
+ search: checkContains('cros'),
513
+ versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
514
+ }
515
+ ];
516
+ var PlatformInfo = {
517
+ browsers: constant(browsers),
518
+ oses: constant(oses)
519
+ };
520
+
521
+ var edge = 'Edge';
522
+ var chrome = 'Chrome';
523
+ var ie = 'IE';
524
+ var opera = 'Opera';
525
+ var firefox = 'Firefox';
526
+ var safari = 'Safari';
527
+ var unknown$1 = function () {
528
+ return nu$1({
529
+ current: undefined,
530
+ version: Version.unknown()
531
+ });
532
+ };
533
+ var nu$1 = function (info) {
534
+ var current = info.current;
535
+ var version = info.version;
536
+ var isBrowser = function (name) {
537
+ return function () {
538
+ return current === name;
539
+ };
540
+ };
541
+ return {
542
+ current: current,
543
+ version: version,
544
+ isEdge: isBrowser(edge),
545
+ isChrome: isBrowser(chrome),
546
+ isIE: isBrowser(ie),
547
+ isOpera: isBrowser(opera),
548
+ isFirefox: isBrowser(firefox),
549
+ isSafari: isBrowser(safari)
550
+ };
551
+ };
552
+ var Browser = {
553
+ unknown: unknown$1,
554
+ nu: nu$1,
555
+ edge: constant(edge),
556
+ chrome: constant(chrome),
557
+ ie: constant(ie),
558
+ opera: constant(opera),
559
+ firefox: constant(firefox),
560
+ safari: constant(safari)
561
+ };
562
+
563
+ var windows = 'Windows';
564
+ var ios = 'iOS';
565
+ var android = 'Android';
566
+ var linux = 'Linux';
567
+ var osx = 'OSX';
568
+ var solaris = 'Solaris';
569
+ var freebsd = 'FreeBSD';
570
+ var chromeos = 'ChromeOS';
571
+ var unknown$2 = function () {
572
+ return nu$2({
573
+ current: undefined,
574
+ version: Version.unknown()
575
+ });
576
+ };
577
+ var nu$2 = function (info) {
578
+ var current = info.current;
579
+ var version = info.version;
580
+ var isOS = function (name) {
581
+ return function () {
582
+ return current === name;
583
+ };
584
+ };
585
+ return {
586
+ current: current,
587
+ version: version,
588
+ isWindows: isOS(windows),
589
+ isiOS: isOS(ios),
590
+ isAndroid: isOS(android),
591
+ isOSX: isOS(osx),
592
+ isLinux: isOS(linux),
593
+ isSolaris: isOS(solaris),
594
+ isFreeBSD: isOS(freebsd),
595
+ isChromeOS: isOS(chromeos)
596
+ };
597
+ };
598
+ var OperatingSystem = {
599
+ unknown: unknown$2,
600
+ nu: nu$2,
601
+ windows: constant(windows),
602
+ ios: constant(ios),
603
+ android: constant(android),
604
+ linux: constant(linux),
605
+ osx: constant(osx),
606
+ solaris: constant(solaris),
607
+ freebsd: constant(freebsd),
608
+ chromeos: constant(chromeos)
609
+ };
610
+
611
+ var detect$2 = function (userAgent, mediaMatch) {
612
+ var browsers = PlatformInfo.browsers();
613
+ var oses = PlatformInfo.oses();
614
+ var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
615
+ var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
616
+ var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
617
+ return {
618
+ browser: browser,
619
+ os: os,
620
+ deviceType: deviceType
621
+ };
622
+ };
623
+ var PlatformDetection = { detect: detect$2 };
624
+
625
+ var mediaMatch = function (query) {
626
+ return window.matchMedia(query).matches;
627
+ };
628
+ var platform = cached(function () {
629
+ return PlatformDetection.detect(navigator.userAgent, mediaMatch);
630
+ });
631
+ var detect$3 = function () {
632
+ return platform();
633
+ };
634
+
635
+ var compareDocumentPosition = function (a, b, match) {
636
+ return (a.compareDocumentPosition(b) & match) !== 0;
637
+ };
638
+ var documentPositionContainedBy = function (a, b) {
639
+ return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_CONTAINED_BY);
640
+ };
641
+
642
+ var ELEMENT = 1;
643
+
644
+ var fromHtml = function (html, scope) {
645
+ var doc = scope || document;
646
+ var div = doc.createElement('div');
647
+ div.innerHTML = html;
648
+ if (!div.hasChildNodes() || div.childNodes.length > 1) {
649
+ console.error('HTML does not have a single root node', html);
650
+ throw new Error('HTML must have a single root node');
651
+ }
652
+ return fromDom(div.childNodes[0]);
653
+ };
654
+ var fromTag = function (tag, scope) {
655
+ var doc = scope || document;
656
+ var node = doc.createElement(tag);
657
+ return fromDom(node);
658
+ };
659
+ var fromText = function (text, scope) {
660
+ var doc = scope || document;
661
+ var node = doc.createTextNode(text);
662
+ return fromDom(node);
663
+ };
664
+ var fromDom = function (node) {
665
+ if (node === null || node === undefined) {
666
+ throw new Error('Node cannot be null or undefined');
667
+ }
668
+ return { dom: node };
669
+ };
670
+ var fromPoint = function (docElm, x, y) {
671
+ return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
672
+ };
673
+ var SugarElement = {
674
+ fromHtml: fromHtml,
675
+ fromTag: fromTag,
676
+ fromText: fromText,
677
+ fromDom: fromDom,
678
+ fromPoint: fromPoint
679
+ };
680
+
681
+ var is = function (element, selector) {
682
+ var dom = element.dom;
683
+ if (dom.nodeType !== ELEMENT) {
684
+ return false;
685
+ } else {
686
+ var elem = dom;
687
+ if (elem.matches !== undefined) {
688
+ return elem.matches(selector);
689
+ } else if (elem.msMatchesSelector !== undefined) {
690
+ return elem.msMatchesSelector(selector);
691
+ } else if (elem.webkitMatchesSelector !== undefined) {
692
+ return elem.webkitMatchesSelector(selector);
693
+ } else if (elem.mozMatchesSelector !== undefined) {
694
+ return elem.mozMatchesSelector(selector);
695
+ } else {
696
+ throw new Error('Browser lacks native selectors');
697
+ }
698
+ }
699
+ };
700
+
701
+ var eq = function (e1, e2) {
702
+ return e1.dom === e2.dom;
703
+ };
704
+ var regularContains = function (e1, e2) {
705
+ var d1 = e1.dom;
706
+ var d2 = e2.dom;
707
+ return d1 === d2 ? false : d1.contains(d2);
708
+ };
709
+ var ieContains = function (e1, e2) {
710
+ return documentPositionContainedBy(e1.dom, e2.dom);
711
+ };
712
+ var contains$1 = function (e1, e2) {
713
+ return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
714
+ };
715
+ var is$1 = is;
716
+
717
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
718
+
719
+ var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
720
+
721
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
722
+
723
+ var keys = Object.keys;
724
+ var each$1 = function (obj, f) {
725
+ var props = keys(obj);
726
+ for (var k = 0, len = props.length; k < len; k++) {
727
+ var i = props[k];
728
+ var x = obj[i];
729
+ f(x, i);
730
+ }
731
+ };
732
+ var objAcc = function (r) {
733
+ return function (x, i) {
734
+ r[i] = x;
735
+ };
736
+ };
737
+ var internalFilter = function (obj, pred, onTrue, onFalse) {
738
+ var r = {};
739
+ each$1(obj, function (x, i) {
740
+ (pred(x, i) ? onTrue : onFalse)(x, i);
741
+ });
742
+ return r;
743
+ };
744
+ var filter$1 = function (obj, pred) {
745
+ var t = {};
746
+ internalFilter(obj, pred, objAcc(t), noop);
747
+ return t;
748
+ };
749
+
750
+ var Global = typeof window !== 'undefined' ? window : Function('return this;')();
751
+
752
+ var name = function (element) {
753
+ var r = element.dom.nodeName;
754
+ return r.toLowerCase();
755
+ };
756
+ var type = function (element) {
757
+ return element.dom.nodeType;
758
+ };
759
+ var isType$1 = function (t) {
760
+ return function (element) {
761
+ return type(element) === t;
762
+ };
763
+ };
764
+ var isElement = isType$1(ELEMENT);
765
+
766
+ var rawSet = function (dom, key, value) {
767
+ if (isString(value) || isBoolean(value) || isNumber(value)) {
768
+ dom.setAttribute(key, value + '');
769
+ } else {
770
+ console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
771
+ throw new Error('Attribute value was not simple');
772
+ }
773
+ };
774
+ var setAll = function (element, attrs) {
775
+ var dom = element.dom;
776
+ each$1(attrs, function (v, k) {
777
+ rawSet(dom, k, v);
778
+ });
779
+ };
780
+ var clone = function (element) {
781
+ return foldl(element.dom.attributes, function (acc, attr) {
782
+ acc[attr.name] = attr.value;
783
+ return acc;
784
+ }, {});
785
+ };
786
+
787
+ var parent = function (element) {
788
+ return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
789
+ };
790
+ var children = function (element) {
791
+ return map(element.dom.childNodes, SugarElement.fromDom);
792
+ };
793
+ var child = function (element, index) {
794
+ var cs = element.dom.childNodes;
795
+ return Optional.from(cs[index]).map(SugarElement.fromDom);
796
+ };
797
+ var firstChild = function (element) {
798
+ return child(element, 0);
799
+ };
800
+ var lastChild = function (element) {
801
+ return child(element, element.dom.childNodes.length - 1);
802
+ };
803
+
804
+ var before = function (marker, element) {
805
+ var parent$1 = parent(marker);
806
+ parent$1.each(function (v) {
807
+ v.dom.insertBefore(element.dom, marker.dom);
808
+ });
809
+ };
810
+ var append = function (parent, element) {
811
+ parent.dom.appendChild(element.dom);
812
+ };
813
+
814
+ var before$1 = function (marker, elements) {
815
+ each(elements, function (x) {
816
+ before(marker, x);
817
+ });
818
+ };
819
+ var append$1 = function (parent, elements) {
820
+ each(elements, function (x) {
821
+ append(parent, x);
822
+ });
823
+ };
824
+
825
+ var remove = function (element) {
826
+ var dom = element.dom;
827
+ if (dom.parentNode !== null) {
828
+ dom.parentNode.removeChild(dom);
829
+ }
830
+ };
831
+
832
+ var clone$1 = function (original, isDeep) {
833
+ return SugarElement.fromDom(original.dom.cloneNode(isDeep));
834
+ };
835
+ var deep = function (original) {
836
+ return clone$1(original, true);
837
+ };
838
+ var shallowAs = function (original, tag) {
839
+ var nu = SugarElement.fromTag(tag);
840
+ var attributes = clone(original);
841
+ setAll(nu, attributes);
842
+ return nu;
843
+ };
844
+ var mutate = function (original, tag) {
845
+ var nu = shallowAs(original, tag);
846
+ before(original, nu);
847
+ var children$1 = children(original);
848
+ append$1(nu, children$1);
849
+ remove(original);
850
+ return nu;
851
+ };
852
+
853
+ var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
854
+
855
+ var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
856
+
857
+ var matchNodeName = function (name) {
858
+ return function (node) {
859
+ return node && node.nodeName.toLowerCase() === name;
860
+ };
861
+ };
862
+ var matchNodeNames = function (regex) {
863
+ return function (node) {
864
+ return node && regex.test(node.nodeName);
865
+ };
866
+ };
867
+ var isTextNode = function (node) {
868
+ return node && node.nodeType === 3;
869
+ };
870
+ var isListNode = matchNodeNames(/^(OL|UL|DL)$/);
871
+ var isOlUlNode = matchNodeNames(/^(OL|UL)$/);
872
+ var isOlNode = matchNodeName('ol');
873
+ var isListItemNode = matchNodeNames(/^(LI|DT|DD)$/);
874
+ var isDlItemNode = matchNodeNames(/^(DT|DD)$/);
875
+ var isTableCellNode = matchNodeNames(/^(TH|TD)$/);
876
+ var isBr = matchNodeName('br');
877
+ var isFirstChild = function (node) {
878
+ return node.parentNode.firstChild === node;
879
+ };
880
+ var isTextBlock = function (editor, node) {
881
+ return node && !!editor.schema.getTextBlockElements()[node.nodeName];
882
+ };
883
+ var isBlock = function (node, blockElements) {
884
+ return node && node.nodeName in blockElements;
885
+ };
886
+ var isBogusBr = function (dom, node) {
887
+ if (!isBr(node)) {
888
+ return false;
889
+ }
890
+ return dom.isBlock(node.nextSibling) && !isBr(node.previousSibling);
891
+ };
892
+ var isEmpty$1 = function (dom, elm, keepBookmarks) {
893
+ var empty = dom.isEmpty(elm);
894
+ if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {
895
+ return false;
896
+ }
897
+ return empty;
898
+ };
899
+ var isChildOfBody = function (dom, elm) {
900
+ return dom.isChildOf(elm, dom.getRoot());
901
+ };
902
+
903
+ var shouldIndentOnTab = function (editor) {
904
+ return editor.getParam('lists_indent_on_tab', true);
905
+ };
906
+ var getForcedRootBlock = function (editor) {
907
+ var block = editor.getParam('forced_root_block', 'p');
908
+ if (block === false) {
909
+ return '';
910
+ } else if (block === true) {
911
+ return 'p';
912
+ } else {
913
+ return block;
914
+ }
915
+ };
916
+ var getForcedRootBlockAttrs = function (editor) {
917
+ return editor.getParam('forced_root_block_attrs', {});
918
+ };
919
+
920
+ var createTextBlock = function (editor, contentNode) {
921
+ var dom = editor.dom;
922
+ var blockElements = editor.schema.getBlockElements();
923
+ var fragment = dom.createFragment();
924
+ var blockName = getForcedRootBlock(editor);
925
+ var node, textBlock, hasContentNode;
926
+ if (blockName) {
927
+ textBlock = dom.create(blockName);
928
+ if (textBlock.tagName === blockName.toUpperCase()) {
929
+ dom.setAttribs(textBlock, getForcedRootBlockAttrs(editor));
930
+ }
931
+ if (!isBlock(contentNode.firstChild, blockElements)) {
932
+ fragment.appendChild(textBlock);
933
+ }
934
+ }
935
+ if (contentNode) {
936
+ while (node = contentNode.firstChild) {
937
+ var nodeName = node.nodeName;
938
+ if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
939
+ hasContentNode = true;
940
+ }
941
+ if (isBlock(node, blockElements)) {
942
+ fragment.appendChild(node);
943
+ textBlock = null;
944
+ } else {
945
+ if (blockName) {
946
+ if (!textBlock) {
947
+ textBlock = dom.create(blockName);
948
+ fragment.appendChild(textBlock);
949
+ }
950
+ textBlock.appendChild(node);
951
+ } else {
952
+ fragment.appendChild(node);
953
+ }
954
+ }
955
+ }
956
+ }
957
+ if (!blockName) {
958
+ fragment.appendChild(dom.create('br'));
959
+ } else {
960
+ if (!hasContentNode) {
961
+ textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' }));
962
+ }
963
+ }
964
+ return fragment;
965
+ };
966
+
967
+ var DOM = global$4.DOM;
968
+ var splitList = function (editor, ul, li) {
969
+ var removeAndKeepBookmarks = function (targetNode) {
970
+ global$5.each(bookmarks, function (node) {
971
+ targetNode.parentNode.insertBefore(node, li.parentNode);
972
+ });
973
+ DOM.remove(targetNode);
974
+ };
975
+ var bookmarks = DOM.select('span[data-mce-type="bookmark"]', ul);
976
+ var newBlock = createTextBlock(editor, li);
977
+ var tmpRng = DOM.createRng();
978
+ tmpRng.setStartAfter(li);
979
+ tmpRng.setEndAfter(ul);
980
+ var fragment = tmpRng.extractContents();
981
+ for (var node = fragment.firstChild; node; node = node.firstChild) {
982
+ if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
983
+ DOM.remove(node);
984
+ break;
985
+ }
986
+ }
987
+ if (!editor.dom.isEmpty(fragment)) {
988
+ DOM.insertAfter(fragment, ul);
989
+ }
990
+ DOM.insertAfter(newBlock, ul);
991
+ if (isEmpty$1(editor.dom, li.parentNode)) {
992
+ removeAndKeepBookmarks(li.parentNode);
993
+ }
994
+ DOM.remove(li);
995
+ if (isEmpty$1(editor.dom, ul)) {
996
+ DOM.remove(ul);
997
+ }
998
+ };
999
+
1000
+ var outdentDlItem = function (editor, item) {
1001
+ if (is$1(item, 'dd')) {
1002
+ mutate(item, 'dt');
1003
+ } else if (is$1(item, 'dt')) {
1004
+ parent(item).each(function (dl) {
1005
+ return splitList(editor, dl.dom, item.dom);
1006
+ });
1007
+ }
1008
+ };
1009
+ var indentDlItem = function (item) {
1010
+ if (is$1(item, 'dt')) {
1011
+ mutate(item, 'dd');
1012
+ }
1013
+ };
1014
+ var dlIndentation = function (editor, indentation, dlItems) {
1015
+ if (indentation === 'Indent') {
1016
+ each(dlItems, indentDlItem);
1017
+ } else {
1018
+ each(dlItems, function (item) {
1019
+ return outdentDlItem(editor, item);
1020
+ });
1021
+ }
1022
+ };
1023
+
1024
+ var getNormalizedPoint = function (container, offset) {
1025
+ if (isTextNode(container)) {
1026
+ return {
1027
+ container: container,
1028
+ offset: offset
1029
+ };
1030
+ }
1031
+ var node = global$1.getNode(container, offset);
1032
+ if (isTextNode(node)) {
1033
+ return {
1034
+ container: node,
1035
+ offset: offset >= container.childNodes.length ? node.data.length : 0
1036
+ };
1037
+ } else if (node.previousSibling && isTextNode(node.previousSibling)) {
1038
+ return {
1039
+ container: node.previousSibling,
1040
+ offset: node.previousSibling.data.length
1041
+ };
1042
+ } else if (node.nextSibling && isTextNode(node.nextSibling)) {
1043
+ return {
1044
+ container: node.nextSibling,
1045
+ offset: 0
1046
+ };
1047
+ }
1048
+ return {
1049
+ container: container,
1050
+ offset: offset
1051
+ };
1052
+ };
1053
+ var normalizeRange = function (rng) {
1054
+ var outRng = rng.cloneRange();
1055
+ var rangeStart = getNormalizedPoint(rng.startContainer, rng.startOffset);
1056
+ outRng.setStart(rangeStart.container, rangeStart.offset);
1057
+ var rangeEnd = getNormalizedPoint(rng.endContainer, rng.endOffset);
1058
+ outRng.setEnd(rangeEnd.container, rangeEnd.offset);
1059
+ return outRng;
1060
+ };
1061
+
1062
+ var global$6 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
1063
+
1064
+ var getParentList = function (editor, node) {
1065
+ var selectionStart = node || editor.selection.getStart(true);
1066
+ return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart));
1067
+ };
1068
+ var isParentListSelected = function (parentList, selectedBlocks) {
1069
+ return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
1070
+ };
1071
+ var findSubLists = function (parentList) {
1072
+ return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
1073
+ return isListNode(elm);
1074
+ });
1075
+ };
1076
+ var getSelectedSubLists = function (editor) {
1077
+ var parentList = getParentList(editor);
1078
+ var selectedBlocks = editor.selection.getSelectedBlocks();
1079
+ if (isParentListSelected(parentList, selectedBlocks)) {
1080
+ return findSubLists(parentList);
1081
+ } else {
1082
+ return global$5.grep(selectedBlocks, function (elm) {
1083
+ return isListNode(elm) && parentList !== elm;
1084
+ });
1085
+ }
1086
+ };
1087
+ var findParentListItemsNodes = function (editor, elms) {
1088
+ var listItemsElms = global$5.map(elms, function (elm) {
1089
+ var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
1090
+ return parentLi ? parentLi : elm;
1091
+ });
1092
+ return global$6.unique(listItemsElms);
1093
+ };
1094
+ var getSelectedListItems = function (editor) {
1095
+ var selectedBlocks = editor.selection.getSelectedBlocks();
1096
+ return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
1097
+ return isListItemNode(block);
1098
+ });
1099
+ };
1100
+ var getSelectedDlItems = function (editor) {
1101
+ return filter(getSelectedListItems(editor), isDlItemNode);
1102
+ };
1103
+ var getClosestListRootElm = function (editor, elm) {
1104
+ var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
1105
+ var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
1106
+ return root;
1107
+ };
1108
+ var findLastParentListNode = function (editor, elm) {
1109
+ var parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListRootElm(editor, elm));
1110
+ return last(parentLists);
1111
+ };
1112
+ var getSelectedLists = function (editor) {
1113
+ var firstList = findLastParentListNode(editor, editor.selection.getStart());
1114
+ var subsequentLists = filter(editor.selection.getSelectedBlocks(), isOlUlNode);
1115
+ return firstList.toArray().concat(subsequentLists);
1116
+ };
1117
+ var getSelectedListRoots = function (editor) {
1118
+ var selectedLists = getSelectedLists(editor);
1119
+ return getUniqueListRoots(editor, selectedLists);
1120
+ };
1121
+ var getUniqueListRoots = function (editor, lists) {
1122
+ var listRoots = map(lists, function (list) {
1123
+ return findLastParentListNode(editor, list).getOr(list);
1124
+ });
1125
+ return global$6.unique(listRoots);
1126
+ };
1127
+
1128
+ var lift2 = function (oa, ob, f) {
1129
+ return oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();
1130
+ };
1131
+
1132
+ var fromElements = function (elements, scope) {
1133
+ var doc = scope || document;
1134
+ var fragment = doc.createDocumentFragment();
1135
+ each(elements, function (element) {
1136
+ fragment.appendChild(element.dom);
1137
+ });
1138
+ return SugarElement.fromDom(fragment);
1139
+ };
1140
+
1141
+ var fireListEvent = function (editor, action, element) {
1142
+ return editor.fire('ListMutation', {
1143
+ action: action,
1144
+ element: element
1145
+ });
1146
+ };
1147
+
1148
+ var isSupported = function (dom) {
1149
+ return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
1150
+ };
1151
+
1152
+ var internalSet = function (dom, property, value) {
1153
+ if (!isString(value)) {
1154
+ console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
1155
+ throw new Error('CSS value must be a string: ' + value);
1156
+ }
1157
+ if (isSupported(dom)) {
1158
+ dom.style.setProperty(property, value);
1159
+ }
1160
+ };
1161
+ var set = function (element, property, value) {
1162
+ var dom = element.dom;
1163
+ internalSet(dom, property, value);
1164
+ };
1165
+
1166
+ var joinSegment = function (parent, child) {
1167
+ append(parent.item, child.list);
1168
+ };
1169
+ var joinSegments = function (segments) {
1170
+ for (var i = 1; i < segments.length; i++) {
1171
+ joinSegment(segments[i - 1], segments[i]);
1172
+ }
1173
+ };
1174
+ var appendSegments = function (head$1, tail) {
1175
+ lift2(last(head$1), head(tail), joinSegment);
1176
+ };
1177
+ var createSegment = function (scope, listType) {
1178
+ var segment = {
1179
+ list: SugarElement.fromTag(listType, scope),
1180
+ item: SugarElement.fromTag('li', scope)
1181
+ };
1182
+ append(segment.list, segment.item);
1183
+ return segment;
1184
+ };
1185
+ var createSegments = function (scope, entry, size) {
1186
+ var segments = [];
1187
+ for (var i = 0; i < size; i++) {
1188
+ segments.push(createSegment(scope, entry.listType));
1189
+ }
1190
+ return segments;
1191
+ };
1192
+ var populateSegments = function (segments, entry) {
1193
+ for (var i = 0; i < segments.length - 1; i++) {
1194
+ set(segments[i].item, 'list-style-type', 'none');
1195
+ }
1196
+ last(segments).each(function (segment) {
1197
+ setAll(segment.list, entry.listAttributes);
1198
+ setAll(segment.item, entry.itemAttributes);
1199
+ append$1(segment.item, entry.content);
1200
+ });
1201
+ };
1202
+ var normalizeSegment = function (segment, entry) {
1203
+ if (name(segment.list) !== entry.listType) {
1204
+ segment.list = mutate(segment.list, entry.listType);
1205
+ }
1206
+ setAll(segment.list, entry.listAttributes);
1207
+ };
1208
+ var createItem = function (scope, attr, content) {
1209
+ var item = SugarElement.fromTag('li', scope);
1210
+ setAll(item, attr);
1211
+ append$1(item, content);
1212
+ return item;
1213
+ };
1214
+ var appendItem = function (segment, item) {
1215
+ append(segment.list, item);
1216
+ segment.item = item;
1217
+ };
1218
+ var writeShallow = function (scope, cast, entry) {
1219
+ var newCast = cast.slice(0, entry.depth);
1220
+ last(newCast).each(function (segment) {
1221
+ var item = createItem(scope, entry.itemAttributes, entry.content);
1222
+ appendItem(segment, item);
1223
+ normalizeSegment(segment, entry);
1224
+ });
1225
+ return newCast;
1226
+ };
1227
+ var writeDeep = function (scope, cast, entry) {
1228
+ var segments = createSegments(scope, entry, entry.depth - cast.length);
1229
+ joinSegments(segments);
1230
+ populateSegments(segments, entry);
1231
+ appendSegments(cast, segments);
1232
+ return cast.concat(segments);
1233
+ };
1234
+ var composeList = function (scope, entries) {
1235
+ var cast = foldl(entries, function (cast, entry) {
1236
+ return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry);
1237
+ }, []);
1238
+ return head(cast).map(function (segment) {
1239
+ return segment.list;
1240
+ });
1241
+ };
1242
+
1243
+ var isList = function (el) {
1244
+ return is$1(el, 'OL,UL');
1245
+ };
1246
+ var hasFirstChildList = function (el) {
1247
+ return firstChild(el).map(isList).getOr(false);
1248
+ };
1249
+ var hasLastChildList = function (el) {
1250
+ return lastChild(el).map(isList).getOr(false);
1251
+ };
1252
+
1253
+ var isIndented = function (entry) {
1254
+ return entry.depth > 0;
1255
+ };
1256
+ var isSelected = function (entry) {
1257
+ return entry.isSelected;
1258
+ };
1259
+ var cloneItemContent = function (li) {
1260
+ var children$1 = children(li);
1261
+ var content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1;
1262
+ return map(content, deep);
1263
+ };
1264
+ var createEntry = function (li, depth, isSelected) {
1265
+ return parent(li).filter(isElement).map(function (list) {
1266
+ return {
1267
+ depth: depth,
1268
+ dirty: false,
1269
+ isSelected: isSelected,
1270
+ content: cloneItemContent(li),
1271
+ itemAttributes: clone(li),
1272
+ listAttributes: clone(list),
1273
+ listType: name(list)
1274
+ };
1275
+ });
1276
+ };
1277
+
1278
+ var indentEntry = function (indentation, entry) {
1279
+ switch (indentation) {
1280
+ case 'Indent':
1281
+ entry.depth++;
1282
+ break;
1283
+ case 'Outdent':
1284
+ entry.depth--;
1285
+ break;
1286
+ case 'Flatten':
1287
+ entry.depth = 0;
1288
+ }
1289
+ entry.dirty = true;
1290
+ };
1291
+
1292
+ var cloneListProperties = function (target, source) {
1293
+ target.listType = source.listType;
1294
+ target.listAttributes = __assign({}, source.listAttributes);
1295
+ };
1296
+ var cleanListProperties = function (entry) {
1297
+ entry.listAttributes = filter$1(entry.listAttributes, function (_value, key) {
1298
+ return key !== 'start';
1299
+ });
1300
+ };
1301
+ var closestSiblingEntry = function (entries, start) {
1302
+ var depth = entries[start].depth;
1303
+ var matches = function (entry) {
1304
+ return entry.depth === depth && !entry.dirty;
1305
+ };
1306
+ var until = function (entry) {
1307
+ return entry.depth < depth;
1308
+ };
1309
+ return findUntil(reverse(entries.slice(0, start)), matches, until).orThunk(function () {
1310
+ return findUntil(entries.slice(start + 1), matches, until);
1311
+ });
1312
+ };
1313
+ var normalizeEntries = function (entries) {
1314
+ each(entries, function (entry, i) {
1315
+ closestSiblingEntry(entries, i).fold(function () {
1316
+ if (entry.dirty) {
1317
+ cleanListProperties(entry);
1318
+ }
1319
+ }, function (matchingEntry) {
1320
+ return cloneListProperties(entry, matchingEntry);
1321
+ });
1322
+ });
1323
+ return entries;
1324
+ };
1325
+
1326
+ var Cell = function (initial) {
1327
+ var value = initial;
1328
+ var get = function () {
1329
+ return value;
1330
+ };
1331
+ var set = function (v) {
1332
+ value = v;
1333
+ };
1334
+ return {
1335
+ get: get,
1336
+ set: set
1337
+ };
1338
+ };
1339
+
1340
+ var parseItem = function (depth, itemSelection, selectionState, item) {
1341
+ return firstChild(item).filter(isList).fold(function () {
1342
+ itemSelection.each(function (selection) {
1343
+ if (eq(selection.start, item)) {
1344
+ selectionState.set(true);
1345
+ }
1346
+ });
1347
+ var currentItemEntry = createEntry(item, depth, selectionState.get());
1348
+ itemSelection.each(function (selection) {
1349
+ if (eq(selection.end, item)) {
1350
+ selectionState.set(false);
1351
+ }
1352
+ });
1353
+ var childListEntries = lastChild(item).filter(isList).map(function (list) {
1354
+ return parseList(depth, itemSelection, selectionState, list);
1355
+ }).getOr([]);
1356
+ return currentItemEntry.toArray().concat(childListEntries);
1357
+ }, function (list) {
1358
+ return parseList(depth, itemSelection, selectionState, list);
1359
+ });
1360
+ };
1361
+ var parseList = function (depth, itemSelection, selectionState, list) {
1362
+ return bind(children(list), function (element) {
1363
+ var parser = isList(element) ? parseList : parseItem;
1364
+ var newDepth = depth + 1;
1365
+ return parser(newDepth, itemSelection, selectionState, element);
1366
+ });
1367
+ };
1368
+ var parseLists = function (lists, itemSelection) {
1369
+ var selectionState = Cell(false);
1370
+ var initialDepth = 0;
1371
+ return map(lists, function (list) {
1372
+ return {
1373
+ sourceList: list,
1374
+ entries: parseList(initialDepth, itemSelection, selectionState, list)
1375
+ };
1376
+ });
1377
+ };
1378
+
1379
+ var outdentedComposer = function (editor, entries) {
1380
+ var normalizedEntries = normalizeEntries(entries);
1381
+ return map(normalizedEntries, function (entry) {
1382
+ var content = fromElements(entry.content);
1383
+ return SugarElement.fromDom(createTextBlock(editor, content.dom));
1384
+ });
1385
+ };
1386
+ var indentedComposer = function (editor, entries) {
1387
+ var normalizedEntries = normalizeEntries(entries);
1388
+ return composeList(editor.contentDocument, normalizedEntries).toArray();
1389
+ };
1390
+ var composeEntries = function (editor, entries) {
1391
+ return bind(groupBy(entries, isIndented), function (entries) {
1392
+ var groupIsIndented = head(entries).map(isIndented).getOr(false);
1393
+ return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);
1394
+ });
1395
+ };
1396
+ var indentSelectedEntries = function (entries, indentation) {
1397
+ each(filter(entries, isSelected), function (entry) {
1398
+ return indentEntry(indentation, entry);
1399
+ });
1400
+ };
1401
+ var getItemSelection = function (editor) {
1402
+ var selectedListItems = map(getSelectedListItems(editor), SugarElement.fromDom);
1403
+ return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
1404
+ return {
1405
+ start: start,
1406
+ end: end
1407
+ };
1408
+ });
1409
+ };
1410
+ var listIndentation = function (editor, lists, indentation) {
1411
+ var entrySets = parseLists(lists, getItemSelection(editor));
1412
+ each(entrySets, function (entrySet) {
1413
+ indentSelectedEntries(entrySet.entries, indentation);
1414
+ var composedLists = composeEntries(editor, entrySet.entries);
1415
+ each(composedLists, function (composedList) {
1416
+ fireListEvent(editor, indentation === 'Indent' ? 'IndentList' : 'OutdentList', composedList.dom);
1417
+ });
1418
+ before$1(entrySet.sourceList, composedLists);
1419
+ remove(entrySet.sourceList);
1420
+ });
1421
+ };
1422
+
1423
+ var selectionIndentation = function (editor, indentation) {
1424
+ var lists = map(getSelectedListRoots(editor), SugarElement.fromDom);
1425
+ var dlItems = map(getSelectedDlItems(editor), SugarElement.fromDom);
1426
+ var isHandled = false;
1427
+ if (lists.length || dlItems.length) {
1428
+ var bookmark = editor.selection.getBookmark();
1429
+ listIndentation(editor, lists, indentation);
1430
+ dlIndentation(editor, indentation, dlItems);
1431
+ editor.selection.moveToBookmark(bookmark);
1432
+ editor.selection.setRng(normalizeRange(editor.selection.getRng()));
1433
+ editor.nodeChanged();
1434
+ isHandled = true;
1435
+ }
1436
+ return isHandled;
1437
+ };
1438
+ var indentListSelection = function (editor) {
1439
+ return selectionIndentation(editor, 'Indent');
1440
+ };
1441
+ var outdentListSelection = function (editor) {
1442
+ return selectionIndentation(editor, 'Outdent');
1443
+ };
1444
+ var flattenListSelection = function (editor) {
1445
+ return selectionIndentation(editor, 'Flatten');
1446
+ };
1447
+
1448
+ var global$7 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
1449
+
1450
+ var DOM$1 = global$4.DOM;
1451
+ var createBookmark = function (rng) {
1452
+ var bookmark = {};
1453
+ var setupEndPoint = function (start) {
1454
+ var offsetNode, container, offset;
1455
+ container = rng[start ? 'startContainer' : 'endContainer'];
1456
+ offset = rng[start ? 'startOffset' : 'endOffset'];
1457
+ if (container.nodeType === 1) {
1458
+ offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' });
1459
+ if (container.hasChildNodes()) {
1460
+ offset = Math.min(offset, container.childNodes.length - 1);
1461
+ if (start) {
1462
+ container.insertBefore(offsetNode, container.childNodes[offset]);
1463
+ } else {
1464
+ DOM$1.insertAfter(offsetNode, container.childNodes[offset]);
1465
+ }
1466
+ } else {
1467
+ container.appendChild(offsetNode);
1468
+ }
1469
+ container = offsetNode;
1470
+ offset = 0;
1471
+ }
1472
+ bookmark[start ? 'startContainer' : 'endContainer'] = container;
1473
+ bookmark[start ? 'startOffset' : 'endOffset'] = offset;
1474
+ };
1475
+ setupEndPoint(true);
1476
+ if (!rng.collapsed) {
1477
+ setupEndPoint();
1478
+ }
1479
+ return bookmark;
1480
+ };
1481
+ var resolveBookmark = function (bookmark) {
1482
+ var restoreEndPoint = function (start) {
1483
+ var container, offset, node;
1484
+ var nodeIndex = function (container) {
1485
+ var node = container.parentNode.firstChild, idx = 0;
1486
+ while (node) {
1487
+ if (node === container) {
1488
+ return idx;
1489
+ }
1490
+ if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
1491
+ idx++;
1492
+ }
1493
+ node = node.nextSibling;
1494
+ }
1495
+ return -1;
1496
+ };
1497
+ container = node = bookmark[start ? 'startContainer' : 'endContainer'];
1498
+ offset = bookmark[start ? 'startOffset' : 'endOffset'];
1499
+ if (!container) {
1500
+ return;
1501
+ }
1502
+ if (container.nodeType === 1) {
1503
+ offset = nodeIndex(container);
1504
+ container = container.parentNode;
1505
+ DOM$1.remove(node);
1506
+ if (!container.hasChildNodes() && DOM$1.isBlock(container)) {
1507
+ container.appendChild(DOM$1.create('br'));
1508
+ }
1509
+ }
1510
+ bookmark[start ? 'startContainer' : 'endContainer'] = container;
1511
+ bookmark[start ? 'startOffset' : 'endOffset'] = offset;
1512
+ };
1513
+ restoreEndPoint(true);
1514
+ restoreEndPoint();
1515
+ var rng = DOM$1.createRng();
1516
+ rng.setStart(bookmark.startContainer, bookmark.startOffset);
1517
+ if (bookmark.endContainer) {
1518
+ rng.setEnd(bookmark.endContainer, bookmark.endOffset);
1519
+ }
1520
+ return normalizeRange(rng);
1521
+ };
1522
+
1523
+ var listToggleActionFromListName = function (listName) {
1524
+ switch (listName) {
1525
+ case 'UL':
1526
+ return 'ToggleUlList';
1527
+ case 'OL':
1528
+ return 'ToggleOlList';
1529
+ case 'DL':
1530
+ return 'ToggleDLList';
1531
+ }
1532
+ };
1533
+
1534
+ var isCustomList = function (list) {
1535
+ return /\btox\-/.test(list.className);
1536
+ };
1537
+ var listState = function (editor, listName, activate) {
1538
+ var nodeChangeHandler = function (e) {
1539
+ var inList = findUntil(e.parents, isListNode, isTableCellNode).filter(function (list) {
1540
+ return list.nodeName === listName && !isCustomList(list);
1541
+ }).isSome();
1542
+ activate(inList);
1543
+ };
1544
+ var parents = editor.dom.getParents(editor.selection.getNode());
1545
+ nodeChangeHandler({ parents: parents });
1546
+ editor.on('NodeChange', nodeChangeHandler);
1547
+ return function () {
1548
+ return editor.off('NodeChange', nodeChangeHandler);
1549
+ };
1550
+ };
1551
+
1552
+ var updateListStyle = function (dom, el, detail) {
1553
+ var type = detail['list-style-type'] ? detail['list-style-type'] : null;
1554
+ dom.setStyle(el, 'list-style-type', type);
1555
+ };
1556
+ var setAttribs = function (elm, attrs) {
1557
+ global$5.each(attrs, function (value, key) {
1558
+ elm.setAttribute(key, value);
1559
+ });
1560
+ };
1561
+ var updateListAttrs = function (dom, el, detail) {
1562
+ setAttribs(el, detail['list-attributes']);
1563
+ global$5.each(dom.select('li', el), function (li) {
1564
+ setAttribs(li, detail['list-item-attributes']);
1565
+ });
1566
+ };
1567
+ var updateListWithDetails = function (dom, el, detail) {
1568
+ updateListStyle(dom, el, detail);
1569
+ updateListAttrs(dom, el, detail);
1570
+ };
1571
+ var removeStyles = function (dom, element, styles) {
1572
+ global$5.each(styles, function (style) {
1573
+ var _a;
1574
+ return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
1575
+ });
1576
+ };
1577
+ var getEndPointNode = function (editor, rng, start, root) {
1578
+ var container = rng[start ? 'startContainer' : 'endContainer'];
1579
+ var offset = rng[start ? 'startOffset' : 'endOffset'];
1580
+ if (container.nodeType === 1) {
1581
+ container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
1582
+ }
1583
+ if (!start && isBr(container.nextSibling)) {
1584
+ container = container.nextSibling;
1585
+ }
1586
+ while (container.parentNode !== root) {
1587
+ if (isTextBlock(editor, container)) {
1588
+ return container;
1589
+ }
1590
+ if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
1591
+ return container;
1592
+ }
1593
+ container = container.parentNode;
1594
+ }
1595
+ return container;
1596
+ };
1597
+ var getSelectedTextBlocks = function (editor, rng, root) {
1598
+ var textBlocks = [], dom = editor.dom;
1599
+ var startNode = getEndPointNode(editor, rng, true, root);
1600
+ var endNode = getEndPointNode(editor, rng, false, root);
1601
+ var block;
1602
+ var siblings = [];
1603
+ for (var node = startNode; node; node = node.nextSibling) {
1604
+ siblings.push(node);
1605
+ if (node === endNode) {
1606
+ break;
1607
+ }
1608
+ }
1609
+ global$5.each(siblings, function (node) {
1610
+ if (isTextBlock(editor, node)) {
1611
+ textBlocks.push(node);
1612
+ block = null;
1613
+ return;
1614
+ }
1615
+ if (dom.isBlock(node) || isBr(node)) {
1616
+ if (isBr(node)) {
1617
+ dom.remove(node);
1618
+ }
1619
+ block = null;
1620
+ return;
1621
+ }
1622
+ var nextSibling = node.nextSibling;
1623
+ if (global$7.isBookmarkNode(node)) {
1624
+ if (isListNode(nextSibling) || isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
1625
+ block = null;
1626
+ return;
1627
+ }
1628
+ }
1629
+ if (!block) {
1630
+ block = dom.create('p');
1631
+ node.parentNode.insertBefore(block, node);
1632
+ textBlocks.push(block);
1633
+ }
1634
+ block.appendChild(node);
1635
+ });
1636
+ return textBlocks;
1637
+ };
1638
+ var hasCompatibleStyle = function (dom, sib, detail) {
1639
+ var sibStyle = dom.getStyle(sib, 'list-style-type');
1640
+ var detailStyle = detail ? detail['list-style-type'] : '';
1641
+ detailStyle = detailStyle === null ? '' : detailStyle;
1642
+ return sibStyle === detailStyle;
1643
+ };
1644
+ var applyList = function (editor, listName, detail) {
1645
+ var rng = editor.selection.getRng();
1646
+ var listItemName = 'LI';
1647
+ var root = getClosestListRootElm(editor, editor.selection.getStart(true));
1648
+ var dom = editor.dom;
1649
+ if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
1650
+ return;
1651
+ }
1652
+ listName = listName.toUpperCase();
1653
+ if (listName === 'DL') {
1654
+ listItemName = 'DT';
1655
+ }
1656
+ var bookmark = createBookmark(rng);
1657
+ var selectedTextBlocks = getSelectedTextBlocks(editor, rng, root);
1658
+ global$5.each(selectedTextBlocks, function (block) {
1659
+ var listBlock;
1660
+ var sibling = block.previousSibling;
1661
+ var parent = block.parentNode;
1662
+ if (!isListItemNode(parent)) {
1663
+ if (sibling && isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
1664
+ listBlock = sibling;
1665
+ block = dom.rename(block, listItemName);
1666
+ sibling.appendChild(block);
1667
+ } else {
1668
+ listBlock = dom.create(listName);
1669
+ block.parentNode.insertBefore(listBlock, block);
1670
+ listBlock.appendChild(block);
1671
+ block = dom.rename(block, listItemName);
1672
+ }
1673
+ removeStyles(dom, block, [
1674
+ 'margin',
1675
+ 'margin-right',
1676
+ 'margin-bottom',
1677
+ 'margin-left',
1678
+ 'margin-top',
1679
+ 'padding',
1680
+ 'padding-right',
1681
+ 'padding-bottom',
1682
+ 'padding-left',
1683
+ 'padding-top'
1684
+ ]);
1685
+ updateListWithDetails(dom, listBlock, detail);
1686
+ mergeWithAdjacentLists(editor.dom, listBlock);
1687
+ }
1688
+ });
1689
+ editor.selection.setRng(resolveBookmark(bookmark));
1690
+ };
1691
+ var isValidLists = function (list1, list2) {
1692
+ return list1 && list2 && isListNode(list1) && list1.nodeName === list2.nodeName;
1693
+ };
1694
+ var hasSameListStyle = function (dom, list1, list2) {
1695
+ var targetStyle = dom.getStyle(list1, 'list-style-type', true);
1696
+ var style = dom.getStyle(list2, 'list-style-type', true);
1697
+ return targetStyle === style;
1698
+ };
1699
+ var hasSameClasses = function (elm1, elm2) {
1700
+ return elm1.className === elm2.className;
1701
+ };
1702
+ var shouldMerge = function (dom, list1, list2) {
1703
+ return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
1704
+ };
1705
+ var mergeWithAdjacentLists = function (dom, listBlock) {
1706
+ var sibling, node;
1707
+ sibling = listBlock.nextSibling;
1708
+ if (shouldMerge(dom, listBlock, sibling)) {
1709
+ while (node = sibling.firstChild) {
1710
+ listBlock.appendChild(node);
1711
+ }
1712
+ dom.remove(sibling);
1713
+ }
1714
+ sibling = listBlock.previousSibling;
1715
+ if (shouldMerge(dom, listBlock, sibling)) {
1716
+ while (node = sibling.lastChild) {
1717
+ listBlock.insertBefore(node, listBlock.firstChild);
1718
+ }
1719
+ dom.remove(sibling);
1720
+ }
1721
+ };
1722
+ var updateList = function (editor, list, listName, detail) {
1723
+ if (list.nodeName !== listName) {
1724
+ var newList = editor.dom.rename(list, listName);
1725
+ updateListWithDetails(editor.dom, newList, detail);
1726
+ fireListEvent(editor, listToggleActionFromListName(listName), newList);
1727
+ } else {
1728
+ updateListWithDetails(editor.dom, list, detail);
1729
+ fireListEvent(editor, listToggleActionFromListName(listName), list);
1730
+ }
1731
+ };
1732
+ var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
1733
+ var parentIsList = isListNode(parentList);
1734
+ if (parentIsList && parentList.nodeName === listName && !hasListStyleDetail(detail)) {
1735
+ flattenListSelection(editor);
1736
+ } else {
1737
+ applyList(editor, listName, detail);
1738
+ var bookmark = createBookmark(editor.selection.getRng(true));
1739
+ var allLists = parentIsList ? __spreadArrays([parentList], lists) : lists;
1740
+ global$5.each(allLists, function (elm) {
1741
+ updateList(editor, elm, listName, detail);
1742
+ });
1743
+ editor.selection.setRng(resolveBookmark(bookmark));
1744
+ }
1745
+ };
1746
+ var hasListStyleDetail = function (detail) {
1747
+ return 'list-style-type' in detail;
1748
+ };
1749
+ var toggleSingleList = function (editor, parentList, listName, detail) {
1750
+ if (parentList === editor.getBody()) {
1751
+ return;
1752
+ }
1753
+ if (parentList) {
1754
+ if (parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {
1755
+ flattenListSelection(editor);
1756
+ } else {
1757
+ var bookmark = createBookmark(editor.selection.getRng(true));
1758
+ updateListWithDetails(editor.dom, parentList, detail);
1759
+ var newList = editor.dom.rename(parentList, listName);
1760
+ mergeWithAdjacentLists(editor.dom, newList);
1761
+ editor.selection.setRng(resolveBookmark(bookmark));
1762
+ applyList(editor, listName, detail);
1763
+ fireListEvent(editor, listToggleActionFromListName(listName), newList);
1764
+ }
1765
+ } else {
1766
+ applyList(editor, listName, detail);
1767
+ fireListEvent(editor, listToggleActionFromListName(listName), parentList);
1768
+ }
1769
+ };
1770
+ var toggleList = function (editor, listName, _detail) {
1771
+ var parentList = getParentList(editor);
1772
+ var selectedSubLists = getSelectedSubLists(editor);
1773
+ var detail = isObject(_detail) ? _detail : {};
1774
+ if (selectedSubLists.length > 0) {
1775
+ toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
1776
+ } else {
1777
+ toggleSingleList(editor, parentList, listName, detail);
1778
+ }
1779
+ };
1780
+
1781
+ var DOM$2 = global$4.DOM;
1782
+ var normalizeList = function (dom, ul) {
1783
+ var sibling;
1784
+ var parentNode = ul.parentNode;
1785
+ if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
1786
+ sibling = parentNode.previousSibling;
1787
+ if (sibling && sibling.nodeName === 'LI') {
1788
+ sibling.appendChild(ul);
1789
+ if (isEmpty$1(dom, parentNode)) {
1790
+ DOM$2.remove(parentNode);
1791
+ }
1792
+ } else {
1793
+ DOM$2.setStyle(parentNode, 'listStyleType', 'none');
1794
+ }
1795
+ }
1796
+ if (isListNode(parentNode)) {
1797
+ sibling = parentNode.previousSibling;
1798
+ if (sibling && sibling.nodeName === 'LI') {
1799
+ sibling.appendChild(ul);
1800
+ }
1801
+ }
1802
+ };
1803
+ var normalizeLists = function (dom, element) {
1804
+ global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
1805
+ normalizeList(dom, ul);
1806
+ });
1807
+ };
1808
+
1809
+ var findNextCaretContainer = function (editor, rng, isForward, root) {
1810
+ var node = rng.startContainer;
1811
+ var offset = rng.startOffset;
1812
+ if (isTextNode(node) && (isForward ? offset < node.data.length : offset > 0)) {
1813
+ return node;
1814
+ }
1815
+ var nonEmptyBlocks = editor.schema.getNonEmptyElements();
1816
+ if (node.nodeType === 1) {
1817
+ node = global$1.getNode(node, offset);
1818
+ }
1819
+ var walker = new global$2(node, root);
1820
+ if (isForward) {
1821
+ if (isBogusBr(editor.dom, node)) {
1822
+ walker.next();
1823
+ }
1824
+ }
1825
+ while (node = walker[isForward ? 'next' : 'prev2']()) {
1826
+ if (node.nodeName === 'LI' && !node.hasChildNodes()) {
1827
+ return node;
1828
+ }
1829
+ if (nonEmptyBlocks[node.nodeName]) {
1830
+ return node;
1831
+ }
1832
+ if (isTextNode(node) && node.data.length > 0) {
1833
+ return node;
1834
+ }
1835
+ }
1836
+ };
1837
+ var hasOnlyOneBlockChild = function (dom, elm) {
1838
+ var childNodes = elm.childNodes;
1839
+ return childNodes.length === 1 && !isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
1840
+ };
1841
+ var unwrapSingleBlockChild = function (dom, elm) {
1842
+ if (hasOnlyOneBlockChild(dom, elm)) {
1843
+ dom.remove(elm.firstChild, true);
1844
+ }
1845
+ };
1846
+ var moveChildren = function (dom, fromElm, toElm) {
1847
+ var node;
1848
+ var targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
1849
+ unwrapSingleBlockChild(dom, fromElm);
1850
+ if (!isEmpty$1(dom, fromElm, true)) {
1851
+ while (node = fromElm.firstChild) {
1852
+ targetElm.appendChild(node);
1853
+ }
1854
+ }
1855
+ };
1856
+ var mergeLiElements = function (dom, fromElm, toElm) {
1857
+ var listNode;
1858
+ var ul = fromElm.parentNode;
1859
+ if (!isChildOfBody(dom, fromElm) || !isChildOfBody(dom, toElm)) {
1860
+ return;
1861
+ }
1862
+ if (isListNode(toElm.lastChild)) {
1863
+ listNode = toElm.lastChild;
1864
+ }
1865
+ if (ul === toElm.lastChild) {
1866
+ if (isBr(ul.previousSibling)) {
1867
+ dom.remove(ul.previousSibling);
1868
+ }
1869
+ }
1870
+ var node = toElm.lastChild;
1871
+ if (node && isBr(node) && fromElm.hasChildNodes()) {
1872
+ dom.remove(node);
1873
+ }
1874
+ if (isEmpty$1(dom, toElm, true)) {
1875
+ dom.$(toElm).empty();
1876
+ }
1877
+ moveChildren(dom, fromElm, toElm);
1878
+ if (listNode) {
1879
+ toElm.appendChild(listNode);
1880
+ }
1881
+ var contains = contains$1(SugarElement.fromDom(toElm), SugarElement.fromDom(fromElm));
1882
+ var nestedLists = contains ? dom.getParents(fromElm, isListNode, toElm) : [];
1883
+ dom.remove(fromElm);
1884
+ each(nestedLists, function (list) {
1885
+ if (isEmpty$1(dom, list) && list !== dom.getRoot()) {
1886
+ dom.remove(list);
1887
+ }
1888
+ });
1889
+ };
1890
+ var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
1891
+ editor.dom.$(toLi).empty();
1892
+ mergeLiElements(editor.dom, fromLi, toLi);
1893
+ editor.selection.setCursorLocation(toLi, 0);
1894
+ };
1895
+ var mergeForward = function (editor, rng, fromLi, toLi) {
1896
+ var dom = editor.dom;
1897
+ if (dom.isEmpty(toLi)) {
1898
+ mergeIntoEmptyLi(editor, fromLi, toLi);
1899
+ } else {
1900
+ var bookmark = createBookmark(rng);
1901
+ mergeLiElements(dom, fromLi, toLi);
1902
+ editor.selection.setRng(resolveBookmark(bookmark));
1903
+ }
1904
+ };
1905
+ var mergeBackward = function (editor, rng, fromLi, toLi) {
1906
+ var bookmark = createBookmark(rng);
1907
+ mergeLiElements(editor.dom, fromLi, toLi);
1908
+ var resolvedBookmark = resolveBookmark(bookmark);
1909
+ editor.selection.setRng(resolvedBookmark);
1910
+ };
1911
+ var backspaceDeleteFromListToListCaret = function (editor, isForward) {
1912
+ var dom = editor.dom, selection = editor.selection;
1913
+ var selectionStartElm = selection.getStart();
1914
+ var root = getClosestListRootElm(editor, selectionStartElm);
1915
+ var li = dom.getParent(selection.getStart(), 'LI', root);
1916
+ if (li) {
1917
+ var ul = li.parentNode;
1918
+ if (ul === editor.getBody() && isEmpty$1(dom, ul)) {
1919
+ return true;
1920
+ }
1921
+ var rng_1 = normalizeRange(selection.getRng());
1922
+ var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng_1, isForward, root), 'LI', root);
1923
+ if (otherLi_1 && otherLi_1 !== li) {
1924
+ editor.undoManager.transact(function () {
1925
+ if (isForward) {
1926
+ mergeForward(editor, rng_1, otherLi_1, li);
1927
+ } else {
1928
+ if (isFirstChild(li)) {
1929
+ outdentListSelection(editor);
1930
+ } else {
1931
+ mergeBackward(editor, rng_1, li, otherLi_1);
1932
+ }
1933
+ }
1934
+ });
1935
+ return true;
1936
+ } else if (!otherLi_1) {
1937
+ if (!isForward && rng_1.startOffset === 0 && rng_1.endOffset === 0) {
1938
+ editor.undoManager.transact(function () {
1939
+ flattenListSelection(editor);
1940
+ });
1941
+ return true;
1942
+ }
1943
+ }
1944
+ }
1945
+ return false;
1946
+ };
1947
+ var removeBlock = function (dom, block, root) {
1948
+ var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
1949
+ dom.remove(block);
1950
+ if (parentBlock && dom.isEmpty(parentBlock)) {
1951
+ dom.remove(parentBlock);
1952
+ }
1953
+ };
1954
+ var backspaceDeleteIntoListCaret = function (editor, isForward) {
1955
+ var dom = editor.dom;
1956
+ var selectionStartElm = editor.selection.getStart();
1957
+ var root = getClosestListRootElm(editor, selectionStartElm);
1958
+ var block = dom.getParent(selectionStartElm, dom.isBlock, root);
1959
+ if (block && dom.isEmpty(block)) {
1960
+ var rng = normalizeRange(editor.selection.getRng());
1961
+ var otherLi_2 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
1962
+ if (otherLi_2) {
1963
+ editor.undoManager.transact(function () {
1964
+ removeBlock(dom, block, root);
1965
+ mergeWithAdjacentLists(dom, otherLi_2.parentNode);
1966
+ editor.selection.select(otherLi_2, true);
1967
+ editor.selection.collapse(isForward);
1968
+ });
1969
+ return true;
1970
+ }
1971
+ }
1972
+ return false;
1973
+ };
1974
+ var backspaceDeleteCaret = function (editor, isForward) {
1975
+ return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
1976
+ };
1977
+ var backspaceDeleteRange = function (editor) {
1978
+ var selectionStartElm = editor.selection.getStart();
1979
+ var root = getClosestListRootElm(editor, selectionStartElm);
1980
+ var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
1981
+ if (startListParent || getSelectedListItems(editor).length > 0) {
1982
+ editor.undoManager.transact(function () {
1983
+ editor.execCommand('Delete');
1984
+ normalizeLists(editor.dom, editor.getBody());
1985
+ });
1986
+ return true;
1987
+ }
1988
+ return false;
1989
+ };
1990
+ var backspaceDelete = function (editor, isForward) {
1991
+ return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
1992
+ };
1993
+ var setup = function (editor) {
1994
+ editor.on('keydown', function (e) {
1995
+ if (e.keyCode === global$3.BACKSPACE) {
1996
+ if (backspaceDelete(editor, false)) {
1997
+ e.preventDefault();
1998
+ }
1999
+ } else if (e.keyCode === global$3.DELETE) {
2000
+ if (backspaceDelete(editor, true)) {
2001
+ e.preventDefault();
2002
+ }
2003
+ }
2004
+ });
2005
+ };
2006
+
2007
+ var get$1 = function (editor) {
2008
+ return {
2009
+ backspaceDelete: function (isForward) {
2010
+ backspaceDelete(editor, isForward);
2011
+ }
2012
+ };
2013
+ };
2014
+
2015
+ var updateList$1 = function (editor, update) {
2016
+ var parentList = getParentList(editor);
2017
+ editor.undoManager.transact(function () {
2018
+ if (isObject(update.styles)) {
2019
+ editor.dom.setStyles(parentList, update.styles);
2020
+ }
2021
+ if (isObject(update.attrs)) {
2022
+ each$1(update.attrs, function (v, k) {
2023
+ return editor.dom.setAttrib(parentList, k, v);
2024
+ });
2025
+ }
2026
+ });
2027
+ };
2028
+
2029
+ var parseAlphabeticBase26 = function (str) {
2030
+ var chars = reverse(trim(str).split(''));
2031
+ var values = map(chars, function (char, i) {
2032
+ var charValue = char.toUpperCase().charCodeAt(0) - 'A'.charCodeAt(0) + 1;
2033
+ return Math.pow(26, i) * charValue;
2034
+ });
2035
+ return foldl(values, function (sum, v) {
2036
+ return sum + v;
2037
+ }, 0);
2038
+ };
2039
+ var composeAlphabeticBase26 = function (value) {
2040
+ value--;
2041
+ if (value < 0) {
2042
+ return '';
2043
+ } else {
2044
+ var remainder = value % 26;
2045
+ var quotient = Math.floor(value / 26);
2046
+ var rest = composeAlphabeticBase26(quotient);
2047
+ var char = String.fromCharCode('A'.charCodeAt(0) + remainder);
2048
+ return rest + char;
2049
+ }
2050
+ };
2051
+ var isUppercase = function (str) {
2052
+ return /^[A-Z]+$/.test(str);
2053
+ };
2054
+ var isLowercase = function (str) {
2055
+ return /^[a-z]+$/.test(str);
2056
+ };
2057
+ var isNumeric = function (str) {
2058
+ return /^[0-9]+$/.test(str);
2059
+ };
2060
+ var deduceListType = function (start) {
2061
+ if (isNumeric(start)) {
2062
+ return 2;
2063
+ } else if (isUppercase(start)) {
2064
+ return 0;
2065
+ } else if (isLowercase(start)) {
2066
+ return 1;
2067
+ } else if (isEmpty(start)) {
2068
+ return 3;
2069
+ } else {
2070
+ return 4;
2071
+ }
2072
+ };
2073
+ var parseStartValue = function (start) {
2074
+ switch (deduceListType(start)) {
2075
+ case 2:
2076
+ return Optional.some({
2077
+ listStyleType: Optional.none(),
2078
+ start: start
2079
+ });
2080
+ case 0:
2081
+ return Optional.some({
2082
+ listStyleType: Optional.some('upper-alpha'),
2083
+ start: parseAlphabeticBase26(start).toString()
2084
+ });
2085
+ case 1:
2086
+ return Optional.some({
2087
+ listStyleType: Optional.some('lower-alpha'),
2088
+ start: parseAlphabeticBase26(start).toString()
2089
+ });
2090
+ case 3:
2091
+ return Optional.some({
2092
+ listStyleType: Optional.none(),
2093
+ start: ''
2094
+ });
2095
+ case 4:
2096
+ return Optional.none();
2097
+ }
2098
+ };
2099
+ var parseDetail = function (detail) {
2100
+ var start = parseInt(detail.start, 10);
2101
+ if (detail.listStyleType.is('upper-alpha')) {
2102
+ return composeAlphabeticBase26(start);
2103
+ } else if (detail.listStyleType.is('lower-alpha')) {
2104
+ return composeAlphabeticBase26(start).toLowerCase();
2105
+ } else {
2106
+ return detail.start;
2107
+ }
2108
+ };
2109
+
2110
+ var open = function (editor) {
2111
+ var currentList = getParentList(editor);
2112
+ if (!isOlNode(currentList)) {
2113
+ return;
2114
+ }
2115
+ editor.windowManager.open({
2116
+ title: 'List Properties',
2117
+ body: {
2118
+ type: 'panel',
2119
+ items: [{
2120
+ type: 'input',
2121
+ name: 'start',
2122
+ label: 'Start list at number',
2123
+ inputMode: 'numeric'
2124
+ }]
2125
+ },
2126
+ initialData: {
2127
+ start: parseDetail({
2128
+ start: editor.dom.getAttrib(currentList, 'start', '1'),
2129
+ listStyleType: Optional.some(editor.dom.getStyle(currentList, 'list-style-type'))
2130
+ })
2131
+ },
2132
+ buttons: [
2133
+ {
2134
+ type: 'cancel',
2135
+ name: 'cancel',
2136
+ text: 'Cancel'
2137
+ },
2138
+ {
2139
+ type: 'submit',
2140
+ name: 'save',
2141
+ text: 'Save',
2142
+ primary: true
2143
+ }
2144
+ ],
2145
+ onSubmit: function (api) {
2146
+ var data = api.getData();
2147
+ parseStartValue(data.start).each(function (detail) {
2148
+ editor.execCommand('mceListUpdate', false, {
2149
+ attrs: { start: detail.start === '1' ? '' : detail.start },
2150
+ styles: { 'list-style-type': detail.listStyleType.getOr('') }
2151
+ });
2152
+ });
2153
+ api.close();
2154
+ }
2155
+ });
2156
+ };
2157
+
2158
+ var queryListCommandState = function (editor, listName) {
2159
+ return function () {
2160
+ var parentList = getParentList(editor);
2161
+ return parentList && parentList.nodeName === listName;
2162
+ };
2163
+ };
2164
+ var registerDialog = function (editor) {
2165
+ editor.addCommand('mceListProps', function () {
2166
+ open(editor);
2167
+ });
2168
+ };
2169
+ var register = function (editor) {
2170
+ editor.on('BeforeExecCommand', function (e) {
2171
+ var cmd = e.command.toLowerCase();
2172
+ if (cmd === 'indent') {
2173
+ indentListSelection(editor);
2174
+ } else if (cmd === 'outdent') {
2175
+ outdentListSelection(editor);
2176
+ }
2177
+ });
2178
+ editor.addCommand('InsertUnorderedList', function (ui, detail) {
2179
+ toggleList(editor, 'UL', detail);
2180
+ });
2181
+ editor.addCommand('InsertOrderedList', function (ui, detail) {
2182
+ toggleList(editor, 'OL', detail);
2183
+ });
2184
+ editor.addCommand('InsertDefinitionList', function (ui, detail) {
2185
+ toggleList(editor, 'DL', detail);
2186
+ });
2187
+ editor.addCommand('RemoveList', function () {
2188
+ flattenListSelection(editor);
2189
+ });
2190
+ registerDialog(editor);
2191
+ editor.addCommand('mceListUpdate', function (ui, detail) {
2192
+ if (isObject(detail)) {
2193
+ updateList$1(editor, detail);
2194
+ }
2195
+ });
2196
+ editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
2197
+ editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
2198
+ editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
2199
+ };
2200
+
2201
+ var setupTabKey = function (editor) {
2202
+ editor.on('keydown', function (e) {
2203
+ if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) {
2204
+ return;
2205
+ }
2206
+ editor.undoManager.transact(function () {
2207
+ if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) {
2208
+ e.preventDefault();
2209
+ }
2210
+ });
2211
+ });
2212
+ };
2213
+ var setup$1 = function (editor) {
2214
+ if (shouldIndentOnTab(editor)) {
2215
+ setupTabKey(editor);
2216
+ }
2217
+ setup(editor);
2218
+ };
2219
+
2220
+ var register$1 = function (editor) {
2221
+ var exec = function (command) {
2222
+ return function () {
2223
+ return editor.execCommand(command);
2224
+ };
2225
+ };
2226
+ if (!editor.hasPlugin('advlist')) {
2227
+ editor.ui.registry.addToggleButton('numlist', {
2228
+ icon: 'ordered-list',
2229
+ active: false,
2230
+ tooltip: 'Numbered list',
2231
+ onAction: exec('InsertOrderedList'),
2232
+ onSetup: function (api) {
2233
+ return listState(editor, 'OL', api.setActive);
2234
+ }
2235
+ });
2236
+ editor.ui.registry.addToggleButton('bullist', {
2237
+ icon: 'unordered-list',
2238
+ active: false,
2239
+ tooltip: 'Bullet list',
2240
+ onAction: exec('InsertUnorderedList'),
2241
+ onSetup: function (api) {
2242
+ return listState(editor, 'UL', api.setActive);
2243
+ }
2244
+ });
2245
+ }
2246
+ };
2247
+
2248
+ var register$2 = function (editor) {
2249
+ var listProperties = {
2250
+ text: 'List properties...',
2251
+ icon: 'ordered-list',
2252
+ onAction: function () {
2253
+ return editor.execCommand('mceListProps');
2254
+ },
2255
+ onSetup: function (api) {
2256
+ return listState(editor, 'OL', function (active) {
2257
+ return api.setDisabled(!active);
2258
+ });
2259
+ }
2260
+ };
2261
+ editor.ui.registry.addMenuItem('listprops', listProperties);
2262
+ editor.ui.registry.addContextMenu('lists', {
2263
+ update: function (node) {
2264
+ var parentList = getParentList(editor, node);
2265
+ return isOlNode(parentList) ? ['listprops'] : [];
2266
+ }
2267
+ });
2268
+ };
2269
+
2270
+ function Plugin () {
2271
+ global.add('lists', function (editor) {
2272
+ if (editor.hasPlugin('rtc', true) === false) {
2273
+ setup$1(editor);
2274
+ register(editor);
2275
+ } else {
2276
+ registerDialog(editor);
2277
+ }
2278
+ register$1(editor);
2279
+ register$2(editor);
2280
+ return get$1(editor);
2281
+ });
2282
+ }
2283
+
2284
+ Plugin();
2285
+
2286
+ }());