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.
- package/.gitlab-ci.yml +20 -20
- package/README.md +1 -1
- package/dist/actions/index.d.ts +58 -58
- package/dist/actions/index.js +59 -59
- package/dist/api/WebSocket.d.ts +25 -25
- package/dist/api/WebSocket.js +170 -170
- package/dist/api/index.d.ts +63 -62
- package/dist/api/index.js +762 -745
- package/dist/api/ws.d.ts +4 -4
- package/dist/api/ws.js +36 -36
- package/dist/components/Alert/Alert.d.ts +7 -7
- package/dist/components/Alert/Alert.js +68 -68
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Alert/index.js +8 -8
- package/dist/components/ArgousAction/ArgousAction.d.ts +7 -7
- package/dist/components/ArgousAction/ArgousAction.js +87 -87
- package/dist/components/ArgousAction/index.d.ts +1 -1
- package/dist/components/ArgousAction/index.js +8 -8
- package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +13 -13
- package/dist/components/ArgousAvatar/ArgousAvatar.js +124 -124
- package/dist/components/ArgousAvatar/index.d.ts +1 -1
- package/dist/components/ArgousAvatar/index.js +8 -8
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +75 -75
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +156 -156
- package/dist/components/ArgousComplexPagination/index.d.ts +1 -1
- package/dist/components/ArgousComplexPagination/index.js +8 -8
- package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +130 -130
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +333 -333
- package/dist/components/ArgousComplexTable/index.d.ts +1 -1
- package/dist/components/ArgousComplexTable/index.js +8 -8
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +176 -176
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +155 -155
- package/dist/components/ArgousComplexTableBody/index.d.ts +1 -1
- package/dist/components/ArgousComplexTableBody/index.js +8 -8
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +72 -72
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +88 -88
- package/dist/components/ArgousComplexTableHead/index.d.ts +1 -1
- package/dist/components/ArgousComplexTableHead/index.js +8 -8
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +57 -57
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +70 -70
- package/dist/components/ArgousComplexTableToolbar/index.d.ts +1 -1
- package/dist/components/ArgousComplexTableToolbar/index.js +8 -8
- package/dist/components/ArgousInput/ArgousInput.d.ts +7 -7
- package/dist/components/ArgousInput/ArgousInput.js +578 -578
- package/dist/components/ArgousInput/index.d.ts +1 -1
- package/dist/components/ArgousInput/index.js +8 -8
- package/dist/components/ArgousPagination/ArgousPagination.d.ts +7 -7
- package/dist/components/ArgousPagination/ArgousPagination.js +29 -29
- package/dist/components/ArgousPagination/index.d.ts +1 -1
- package/dist/components/ArgousPagination/index.js +8 -8
- package/dist/components/ArgousProgressBar/ArgousProgressBar.d.ts +21 -21
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +162 -162
- package/dist/components/ArgousProgressBar/index.d.ts +1 -1
- package/dist/components/ArgousProgressBar/index.js +8 -8
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +7 -7
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +201 -201
- package/dist/components/ArgousSimpleTable/index.d.ts +1 -1
- package/dist/components/ArgousSimpleTable/index.js +8 -8
- package/dist/components/AutoComplete/AutoComplete.d.ts +7 -7
- package/dist/components/AutoComplete/AutoComplete.js +185 -185
- package/dist/components/AutoComplete/index.d.ts +1 -1
- package/dist/components/AutoComplete/index.js +8 -8
- package/dist/components/BarChart/BarChart.d.ts +7 -7
- package/dist/components/BarChart/BarChart.js +125 -125
- package/dist/components/BarChart/index.d.ts +1 -1
- package/dist/components/BarChart/index.js +8 -8
- package/dist/components/BarraFerramentas/BarraFerramentas.d.ts +20 -20
- package/dist/components/BarraFerramentas/BarraFerramentas.js +228 -228
- package/dist/components/BarraFerramentas/index.d.ts +1 -1
- package/dist/components/BarraFerramentas/index.js +8 -8
- package/dist/components/Button/Button.d.ts +7 -7
- package/dist/components/Button/Button.js +144 -144
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +8 -8
- package/dist/components/Cabecalho/Cabecalho.d.ts +7 -7
- package/dist/components/Cabecalho/Cabecalho.js +231 -231
- package/dist/components/Cabecalho/index.d.ts +1 -1
- package/dist/components/Cabecalho/index.js +8 -8
- package/dist/components/Calendar/Calendar.d.ts +7 -7
- package/dist/components/Calendar/Calendar.js +171 -171
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Calendar/index.js +8 -8
- package/dist/components/CartaoUsuario/CartaoUsuario.d.ts +8 -8
- package/dist/components/CartaoUsuario/CartaoUsuario.js +165 -165
- package/dist/components/CartaoUsuario/index.d.ts +1 -1
- package/dist/components/CartaoUsuario/index.js +8 -8
- package/dist/components/Collapse/Collapse.d.ts +59 -59
- package/dist/components/Collapse/Collapse.js +290 -290
- package/dist/components/Collapse/index.d.ts +2 -2
- package/dist/components/Collapse/index.js +8 -8
- package/dist/components/Compartilhar/Compartilhar.d.ts +6 -6
- package/dist/components/Compartilhar/Compartilhar.js +266 -266
- package/dist/components/Compartilhar/index.d.ts +1 -1
- package/dist/components/Compartilhar/index.js +8 -8
- package/dist/components/ConfirmModal/BasicModal.d.ts +38 -38
- package/dist/components/ConfirmModal/BasicModal.js +29 -29
- package/dist/components/ConfirmModal/ModalProvider.d.ts +5 -5
- package/dist/components/ConfirmModal/ModalProvider.js +108 -108
- package/dist/components/ConfirmModal/WrapperModal.d.ts +18 -18
- package/dist/components/ConfirmModal/WrapperModal.js +41 -41
- package/dist/components/ConfirmModal/index.d.ts +19 -19
- package/dist/components/ConfirmModal/index.js +25 -25
- package/dist/components/DropArea/DropArea.d.ts +20 -20
- package/dist/components/DropArea/DropArea.js +149 -149
- package/dist/components/DropArea/Html5FileSelector.d.ts +16 -16
- package/dist/components/DropArea/Html5FileSelector.js +229 -229
- package/dist/components/DropArea/index.d.ts +1 -1
- package/dist/components/DropArea/index.js +8 -8
- package/dist/components/Editor/Events.d.ts +79 -79
- package/dist/components/Editor/Events.js +9 -9
- package/dist/components/Editor/ScriptLoader.d.ts +20 -20
- package/dist/components/Editor/ScriptLoader.js +70 -70
- package/dist/components/Editor/TinyMCE.d.ts +10 -10
- package/dist/components/Editor/TinyMCE.js +16 -16
- package/dist/components/Editor/Utils.d.ts +19 -19
- package/dist/components/Editor/Utils.js +62 -62
- package/dist/components/Editor/components/Editor.d.ts +67 -67
- package/dist/components/Editor/components/Editor.js +351 -351
- package/dist/components/Editor/components/EditorPropTypes.d.ts +18 -18
- package/dist/components/Editor/components/EditorPropTypes.js +110 -110
- package/dist/components/Editor/index.d.ts +9 -9
- package/dist/components/Editor/index.js +12 -12
- package/dist/components/Editor/tinymce/tinymce.d.ts +2963 -2963
- package/dist/components/FilePreparer/FilePreparer.d.ts +25 -25
- package/dist/components/FilePreparer/FilePreparer.js +279 -279
- package/dist/components/FilePreparer/index.d.ts +1 -1
- package/dist/components/FilePreparer/index.js +8 -8
- package/dist/components/FileUploader/FileUploader.d.ts +8 -8
- package/dist/components/FileUploader/FileUploader.js +445 -445
- package/dist/components/FileUploader/index.d.ts +1 -1
- package/dist/components/FileUploader/index.js +8 -8
- package/dist/components/FormVisualizer/FormVisualizer.d.ts +91 -91
- package/dist/components/FormVisualizer/FormVisualizer.js +264 -264
- package/dist/components/FormVisualizer/index.d.ts +1 -1
- package/dist/components/FormVisualizer/index.js +8 -8
- package/dist/components/Highlight/Highlight.d.ts +6 -6
- package/dist/components/Highlight/Highlight.js +75 -75
- package/dist/components/Highlight/index.d.ts +1 -1
- package/dist/components/Highlight/index.js +8 -8
- package/dist/components/ImageResize/ImageResize.d.ts +27 -27
- package/dist/components/ImageResize/ImageResize.js +472 -472
- package/dist/components/ImageResize/index.d.ts +1 -1
- package/dist/components/ImageResize/index.js +8 -8
- package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +25 -25
- package/dist/components/ImageResizeButton/ImageResizeButton.js +89 -89
- package/dist/components/ImageResizeButton/index.d.ts +1 -1
- package/dist/components/ImageResizeButton/index.js +8 -8
- package/dist/components/Input/Input.d.ts +7 -7
- package/dist/components/Input/Input.js +328 -328
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +8 -8
- package/dist/components/InputTags/InputTags.d.ts +7 -7
- package/dist/components/InputTags/InputTags.js +129 -129
- package/dist/components/InputTags/index.d.ts +1 -1
- package/dist/components/InputTags/index.js +8 -8
- package/dist/components/ListSelect/ListSelect.d.ts +7 -7
- package/dist/components/ListSelect/ListSelect.js +126 -126
- package/dist/components/ListSelect/index.d.ts +1 -1
- package/dist/components/ListSelect/index.js +8 -8
- package/dist/components/MaterialButton/MaterialButton.d.ts +12 -12
- package/dist/components/MaterialButton/MaterialButton.js +192 -192
- package/dist/components/MaterialButton/index.d.ts +1 -1
- package/dist/components/MaterialButton/index.js +8 -8
- package/dist/components/MenuBar/MenuBar.d.ts +7 -7
- package/dist/components/MenuBar/MenuBar.js +157 -157
- package/dist/components/MenuBar/index.d.ts +1 -1
- package/dist/components/MenuBar/index.js +8 -8
- package/dist/components/MonthPicker/MonthPicker.d.ts +7 -7
- package/dist/components/MonthPicker/MonthPicker.js +288 -288
- package/dist/components/MonthPicker/index.d.ts +1 -1
- package/dist/components/MonthPicker/index.js +8 -8
- package/dist/components/MultipleSelect/MultipleSelect.d.ts +7 -7
- package/dist/components/MultipleSelect/MultipleSelect.js +139 -139
- package/dist/components/MultipleSelect/index.d.ts +1 -1
- package/dist/components/MultipleSelect/index.js +8 -8
- package/dist/components/OtpInput/OtpInput.d.ts +18 -18
- package/dist/components/OtpInput/OtpInput.js +207 -207
- package/dist/components/OtpInput/index.d.ts +1 -1
- package/dist/components/OtpInput/index.js +8 -8
- package/dist/components/OutputText/OutputText.d.ts +7 -7
- package/dist/components/OutputText/OutputText.js +89 -89
- package/dist/components/OutputText/index.d.ts +1 -1
- package/dist/components/OutputText/index.js +8 -8
- package/dist/components/Pagination/Pagination.d.ts +7 -7
- package/dist/components/Pagination/Pagination.js +64 -64
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/Pagination/index.js +8 -8
- package/dist/components/Programa/Programa.d.ts +30 -30
- package/dist/components/Programa/Programa.js +201 -201
- package/dist/components/Programa/index.d.ts +1 -1
- package/dist/components/Programa/index.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.d.ts +7 -7
- package/dist/components/ProgressBar/ProgressBar.js +98 -98
- package/dist/components/ProgressBar/index.d.ts +1 -1
- package/dist/components/ProgressBar/index.js +8 -8
- package/dist/components/Select/Select.d.ts +7 -7
- package/dist/components/Select/Select.js +142 -142
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +8 -8
- package/dist/components/SimpleTable/SimpleTable.d.ts +12 -12
- package/dist/components/SimpleTable/SimpleTable.js +390 -390
- package/dist/components/SimpleTable/index.d.ts +1 -1
- package/dist/components/SimpleTable/index.js +10 -10
- package/dist/components/Stepper/Stepper.d.ts +53 -53
- package/dist/components/Stepper/Stepper.js +157 -157
- package/dist/components/Stepper/index.d.ts +1 -1
- package/dist/components/Stepper/index.js +8 -8
- package/dist/components/TablePicker/TablePicker.d.ts +7 -7
- package/dist/components/TablePicker/TablePicker.js +222 -222
- package/dist/components/TablePicker/index.d.ts +1 -1
- package/dist/components/TablePicker/index.js +8 -8
- package/dist/components/Tabs/Tabs.d.ts +7 -7
- package/dist/components/Tabs/Tabs.js +76 -76
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.js +8 -8
- package/dist/components/TextArea/TextArea.d.ts +7 -7
- package/dist/components/TextArea/TextArea.js +148 -148
- package/dist/components/TextArea/index.d.ts +1 -1
- package/dist/components/TextArea/index.js +8 -8
- package/dist/components/ThreadLog/ThreadLog.d.ts +7 -7
- package/dist/components/ThreadLog/ThreadLog.js +225 -225
- package/dist/components/ThreadLog/index.d.ts +1 -1
- package/dist/components/ThreadLog/index.js +8 -8
- package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +92 -92
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +188 -188
- package/dist/components/UtilAutoComplete/index.d.ts +1 -1
- package/dist/components/UtilAutoComplete/index.js +8 -8
- package/dist/components/index.d.ts +147 -147
- package/dist/components/index.js +162 -162
- package/dist/fieldsRedux/createField.d.ts +8 -8
- package/dist/fieldsRedux/createField.js +149 -149
- package/dist/fieldsRedux/fieldsRedux.d.ts +71 -71
- package/dist/fieldsRedux/fieldsRedux.js +436 -436
- package/dist/fieldsRedux/index.d.ts +4 -4
- package/dist/fieldsRedux/index.js +27 -27
- package/dist/fieldsRedux/passFields.d.ts +5 -5
- package/dist/fieldsRedux/passFields.js +107 -107
- package/dist/reducers/argous.d.ts +76 -76
- package/dist/reducers/argous.js +63 -63
- package/dist/reducers/index.d.ts +4 -4
- package/dist/reducers/index.js +9 -9
- package/dist/types.d.ts +144 -144
- package/dist/utils/api.d.ts +29 -29
- package/dist/utils/api.js +255 -255
- package/dist/utils/config.d.ts +3 -3
- package/dist/utils/config.js +13 -13
- package/dist/utils/date.d.ts +8 -8
- package/dist/utils/date.js +60 -60
- package/dist/utils/index.d.ts +61 -61
- package/dist/utils/index.js +383 -383
- package/dist/utils/rippleEffect.d.ts +2 -2
- package/dist/utils/rippleEffect.js +173 -173
- package/dist/utils/store.d.ts +3 -3
- package/dist/utils/store.js +12 -12
- package/dist/utils/xmlToJson.d.ts +2 -2
- package/dist/utils/xmlToJson.js +158 -158
- package/index.js +1 -1
- package/lib/actions/index.ts +57 -0
- package/lib/api/WebSocket.js +148 -0
- package/lib/api/index.js +402 -0
- package/lib/api/ws.js +27 -0
- package/lib/components/Alert/Alert.d.ts +8 -0
- package/lib/components/Alert/Alert.js +49 -0
- package/lib/components/Alert/index.d.ts +2 -0
- package/lib/components/Alert/index.js +1 -0
- package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
- package/lib/components/ArgousAction/ArgousAction.js +78 -0
- package/lib/components/ArgousAction/index.d.ts +2 -0
- package/lib/components/ArgousAction/index.js +1 -0
- package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
- package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
- package/lib/components/ArgousAvatar/index.d.ts +2 -0
- package/lib/components/ArgousAvatar/index.js +1 -0
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
- package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
- package/lib/components/ArgousComplexPagination/index.js +1 -0
- package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
- package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
- package/lib/components/ArgousComplexTable/index.d.ts +2 -0
- package/lib/components/ArgousComplexTable/index.js +1 -0
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
- package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
- package/lib/components/ArgousComplexTableBody/index.js +1 -0
- package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
- package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
- package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
- package/lib/components/ArgousComplexTableHead/index.js +1 -0
- package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
- package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
- package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
- package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
- package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
- package/lib/components/ArgousInput/ArgousInput.js +616 -0
- package/lib/components/ArgousInput/index.d.ts +2 -0
- package/lib/components/ArgousInput/index.js +1 -0
- package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
- package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
- package/lib/components/ArgousPagination/index.d.ts +2 -0
- package/lib/components/ArgousPagination/index.js +1 -0
- package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
- package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
- package/lib/components/ArgousProgressBar/index.d.ts +2 -0
- package/lib/components/ArgousProgressBar/index.js +1 -0
- package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
- package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
- package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
- package/lib/components/ArgousSimpleTable/index.js +1 -0
- package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
- package/lib/components/AutoComplete/AutoComplete.js +189 -0
- package/lib/components/AutoComplete/index.d.ts +2 -0
- package/lib/components/AutoComplete/index.js +1 -0
- package/lib/components/BarChart/BarChart.d.ts +8 -0
- package/lib/components/BarChart/BarChart.js +92 -0
- package/lib/components/BarChart/index.d.ts +2 -0
- package/lib/components/BarChart/index.js +1 -0
- package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
- package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
- package/lib/components/BarraFerramentas/index.d.ts +2 -0
- package/lib/components/BarraFerramentas/index.js +1 -0
- package/lib/components/Button/Button.d.ts +8 -0
- package/lib/components/Button/Button.js +135 -0
- package/lib/components/Button/index.d.ts +2 -0
- package/lib/components/Button/index.js +1 -0
- package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
- package/lib/components/Cabecalho/Cabecalho.js +245 -0
- package/lib/components/Cabecalho/index.d.ts +2 -0
- package/lib/components/Cabecalho/index.js +1 -0
- package/lib/components/Calendar/Calendar.d.ts +8 -0
- package/lib/components/Calendar/Calendar.js +156 -0
- package/lib/components/Calendar/index.d.ts +2 -0
- package/lib/components/Calendar/index.js +1 -0
- package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
- package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
- package/lib/components/CartaoUsuario/index.d.ts +2 -0
- package/lib/components/CartaoUsuario/index.js +1 -0
- package/lib/components/Collapse/Collapse.d.ts +60 -0
- package/lib/components/Collapse/Collapse.js +317 -0
- package/lib/components/Collapse/index.d.ts +3 -0
- package/lib/components/Collapse/index.js +1 -0
- package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
- package/lib/components/Compartilhar/Compartilhar.js +314 -0
- package/lib/components/Compartilhar/index.d.ts +2 -0
- package/lib/components/Compartilhar/index.js +1 -0
- package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
- package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
- package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
- package/lib/components/ConfirmModal/index.d.ts +20 -0
- package/lib/components/ConfirmModal/index.js +8 -0
- package/lib/components/DropArea/DropArea.d.ts +21 -0
- package/lib/components/DropArea/DropArea.js +90 -0
- package/lib/components/DropArea/Html5FileSelector.js +164 -0
- package/lib/components/DropArea/index.d.ts +2 -0
- package/lib/components/DropArea/index.js +1 -0
- package/lib/components/Editor/Events.ts +83 -0
- package/lib/components/Editor/ScriptLoader.ts +96 -0
- package/lib/components/Editor/TinyMCE.ts +19 -0
- package/lib/components/Editor/Utils.ts +95 -0
- package/lib/components/Editor/components/Editor.tsx +375 -0
- package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
- package/lib/components/Editor/index.tsx +11 -0
- package/lib/components/Editor/skins/content/dark/content.css +72 -0
- package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
- package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
- package/lib/components/Editor/skins/content/default/content.css +67 -0
- package/lib/components/Editor/skins/content/default/content.min.css +8 -0
- package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
- package/lib/components/Editor/skins/content/document/content.css +72 -0
- package/lib/components/Editor/skins/content/document/content.min.css +8 -0
- package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
- package/lib/components/Editor/skins/content/writer/content.css +68 -0
- package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
- package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/content.css +714 -0
- package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
- package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/content.css +732 -0
- package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
- package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
- package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
- package/lib/components/Editor/tinymce/README.md +63 -0
- package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
- package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
- package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
- package/lib/components/Editor/tinymce/langs/README.md +3 -0
- package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
- package/lib/components/Editor/tinymce/license.txt +504 -0
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
- package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +22 -0
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +22 -0
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
- package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
- package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
- package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
- package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
- package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
- package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
- package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
- package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
- package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
- package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
- package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
- package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +22 -0
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
- package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
- package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
- package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
- package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
- package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
- package/lib/components/Editor/tinymce/tinymce.js +30106 -0
- package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
- package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
- package/lib/components/FilePreparer/FilePreparer.js +247 -0
- package/lib/components/FilePreparer/index.d.ts +2 -0
- package/lib/components/FilePreparer/index.js +1 -0
- package/lib/components/FileUploader/FileUploader.d.ts +9 -0
- package/lib/components/FileUploader/FileUploader.js +318 -0
- package/lib/components/FileUploader/index.d.ts +2 -0
- package/lib/components/FileUploader/index.js +1 -0
- package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
- package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
- package/lib/components/FormVisualizer/index.d.ts +2 -0
- package/lib/components/FormVisualizer/index.js +1 -0
- package/lib/components/Highlight/Highlight.d.ts +7 -0
- package/lib/components/Highlight/Highlight.js +51 -0
- package/lib/components/Highlight/index.d.ts +2 -0
- package/lib/components/Highlight/index.js +1 -0
- package/lib/components/ImageResize/ImageResize.d.ts +28 -0
- package/lib/components/ImageResize/ImageResize.js +479 -0
- package/lib/components/ImageResize/index.d.ts +2 -0
- package/lib/components/ImageResize/index.js +1 -0
- package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
- package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
- package/lib/components/ImageResizeButton/index.d.ts +2 -0
- package/lib/components/ImageResizeButton/index.js +1 -0
- package/lib/components/Input/Input.d.ts +8 -0
- package/lib/components/Input/Input.js +353 -0
- package/lib/components/Input/index.d.ts +2 -0
- package/lib/components/Input/index.js +1 -0
- package/lib/components/InputTags/InputTags.d.ts +8 -0
- package/lib/components/InputTags/InputTags.js +94 -0
- package/lib/components/InputTags/index.d.ts +2 -0
- package/lib/components/InputTags/index.js +1 -0
- package/lib/components/ListSelect/ListSelect.d.ts +8 -0
- package/lib/components/ListSelect/ListSelect.js +94 -0
- package/lib/components/ListSelect/index.d.ts +2 -0
- package/lib/components/ListSelect/index.js +1 -0
- package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
- package/lib/components/MaterialButton/MaterialButton.js +177 -0
- package/lib/components/MaterialButton/index.d.ts +2 -0
- package/lib/components/MaterialButton/index.js +1 -0
- package/lib/components/MenuBar/MenuBar.d.ts +8 -0
- package/lib/components/MenuBar/MenuBar.js +139 -0
- package/lib/components/MenuBar/index.d.ts +2 -0
- package/lib/components/MenuBar/index.js +1 -0
- package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
- package/lib/components/MonthPicker/MonthPicker.js +313 -0
- package/lib/components/MonthPicker/index.d.ts +2 -0
- package/lib/components/MonthPicker/index.js +1 -0
- package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
- package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
- package/lib/components/MultipleSelect/index.d.ts +2 -0
- package/lib/components/MultipleSelect/index.js +1 -0
- package/lib/components/OtpInput/OtpInput.tsx +244 -0
- package/lib/components/OtpInput/index.d.ts +2 -0
- package/lib/components/OtpInput/index.js +1 -0
- package/lib/components/OutputText/OutputText.d.ts +8 -0
- package/lib/components/OutputText/OutputText.js +57 -0
- package/lib/components/OutputText/index.d.ts +2 -0
- package/lib/components/OutputText/index.js +1 -0
- package/lib/components/Pagination/Pagination.d.ts +8 -0
- package/lib/components/Pagination/Pagination.js +32 -0
- package/lib/components/Pagination/index.d.ts +2 -0
- package/lib/components/Pagination/index.js +1 -0
- package/lib/components/Programa/Programa.d.ts +31 -0
- package/lib/components/Programa/Programa.js +172 -0
- package/lib/components/Programa/index.d.ts +2 -0
- package/lib/components/Programa/index.js +1 -0
- package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/lib/components/ProgressBar/ProgressBar.js +71 -0
- package/lib/components/ProgressBar/index.d.ts +2 -0
- package/lib/components/ProgressBar/index.js +1 -0
- package/lib/components/Select/Select.d.ts +8 -0
- package/lib/components/Select/Select.js +117 -0
- package/lib/components/Select/index.d.ts +2 -0
- package/lib/components/Select/index.js +1 -0
- package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
- package/lib/components/SimpleTable/SimpleTable.js +504 -0
- package/lib/components/SimpleTable/index.d.ts +2 -0
- package/lib/components/SimpleTable/index.js +2 -0
- package/lib/components/Stepper/Stepper.d.ts +54 -0
- package/lib/components/Stepper/Stepper.js +222 -0
- package/lib/components/Stepper/index.d.ts +2 -0
- package/lib/components/Stepper/index.js +1 -0
- package/lib/components/TablePicker/TablePicker.d.ts +8 -0
- package/lib/components/TablePicker/TablePicker.js +238 -0
- package/lib/components/TablePicker/index.d.ts +2 -0
- package/lib/components/TablePicker/index.js +1 -0
- package/lib/components/Tabs/Tabs.d.ts +8 -0
- package/lib/components/Tabs/Tabs.js +59 -0
- package/lib/components/Tabs/index.d.ts +2 -0
- package/lib/components/Tabs/index.js +1 -0
- package/lib/components/TextArea/TextArea.d.ts +8 -0
- package/lib/components/TextArea/TextArea.js +123 -0
- package/lib/components/TextArea/index.d.ts +2 -0
- package/lib/components/TextArea/index.js +1 -0
- package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
- package/lib/components/ThreadLog/ThreadLog.js +189 -0
- package/lib/components/ThreadLog/index.d.ts +2 -0
- package/lib/components/ThreadLog/index.js +1 -0
- package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
- package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
- package/lib/components/UtilAutoComplete/index.d.ts +2 -0
- package/lib/components/UtilAutoComplete/index.js +1 -0
- package/lib/components/index.d.ts +148 -0
- package/lib/components/index.js +146 -0
- package/lib/fieldsRedux/createField.d.ts +8 -0
- package/lib/fieldsRedux/createField.js +120 -0
- package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
- package/lib/fieldsRedux/fieldsRedux.js +391 -0
- package/lib/fieldsRedux/index.d.ts +4 -0
- package/lib/fieldsRedux/index.js +5 -0
- package/lib/fieldsRedux/passFields.d.ts +5 -0
- package/lib/fieldsRedux/passFields.js +76 -0
- package/lib/reducers/argous.ts +103 -0
- package/lib/reducers/index.ts +6 -0
- package/lib/types.d.ts +144 -0
- package/lib/utils/api.ts +153 -0
- package/lib/utils/config.ts +12 -0
- package/lib/utils/date.ts +63 -0
- package/lib/utils/index.ts +314 -0
- package/lib/utils/rippleEffect.js +211 -0
- package/lib/utils/store.ts +11 -0
- package/lib/utils/xmlToJson.js +117 -0
- package/package.json +107 -107
|
@@ -0,0 +1,1394 @@
|
|
|
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 Cell = function (initial) {
|
|
13
|
+
var value = initial;
|
|
14
|
+
var get = function () {
|
|
15
|
+
return value;
|
|
16
|
+
};
|
|
17
|
+
var set = function (v) {
|
|
18
|
+
value = v;
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
get: get,
|
|
22
|
+
set: set
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
|
+
|
|
28
|
+
var __assign = function () {
|
|
29
|
+
__assign = Object.assign || function __assign(t) {
|
|
30
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31
|
+
s = arguments[i];
|
|
32
|
+
for (var p in s)
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
34
|
+
t[p] = s[p];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
38
|
+
return __assign.apply(this, arguments);
|
|
39
|
+
};
|
|
40
|
+
function __spreadArrays() {
|
|
41
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
42
|
+
s += arguments[i].length;
|
|
43
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
44
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
45
|
+
r[k] = a[j];
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var typeOf = function (x) {
|
|
50
|
+
var t = typeof x;
|
|
51
|
+
if (x === null) {
|
|
52
|
+
return 'null';
|
|
53
|
+
} else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
|
|
54
|
+
return 'array';
|
|
55
|
+
} else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
|
|
56
|
+
return 'string';
|
|
57
|
+
} else {
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var isType = function (type) {
|
|
62
|
+
return function (value) {
|
|
63
|
+
return typeOf(value) === type;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
var isString = isType('string');
|
|
67
|
+
var isObject = isType('object');
|
|
68
|
+
var isArray = isType('array');
|
|
69
|
+
|
|
70
|
+
var noop = function () {
|
|
71
|
+
};
|
|
72
|
+
var constant = function (value) {
|
|
73
|
+
return function () {
|
|
74
|
+
return value;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
var identity = function (x) {
|
|
78
|
+
return x;
|
|
79
|
+
};
|
|
80
|
+
var die = function (msg) {
|
|
81
|
+
return function () {
|
|
82
|
+
throw new Error(msg);
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
var never = constant(false);
|
|
86
|
+
var always = constant(true);
|
|
87
|
+
|
|
88
|
+
var none = function () {
|
|
89
|
+
return NONE;
|
|
90
|
+
};
|
|
91
|
+
var NONE = function () {
|
|
92
|
+
var eq = function (o) {
|
|
93
|
+
return o.isNone();
|
|
94
|
+
};
|
|
95
|
+
var call = function (thunk) {
|
|
96
|
+
return thunk();
|
|
97
|
+
};
|
|
98
|
+
var id = function (n) {
|
|
99
|
+
return n;
|
|
100
|
+
};
|
|
101
|
+
var me = {
|
|
102
|
+
fold: function (n, _s) {
|
|
103
|
+
return n();
|
|
104
|
+
},
|
|
105
|
+
is: never,
|
|
106
|
+
isSome: never,
|
|
107
|
+
isNone: always,
|
|
108
|
+
getOr: id,
|
|
109
|
+
getOrThunk: call,
|
|
110
|
+
getOrDie: function (msg) {
|
|
111
|
+
throw new Error(msg || 'error: getOrDie called on none.');
|
|
112
|
+
},
|
|
113
|
+
getOrNull: constant(null),
|
|
114
|
+
getOrUndefined: constant(undefined),
|
|
115
|
+
or: id,
|
|
116
|
+
orThunk: call,
|
|
117
|
+
map: none,
|
|
118
|
+
each: noop,
|
|
119
|
+
bind: none,
|
|
120
|
+
exists: never,
|
|
121
|
+
forall: always,
|
|
122
|
+
filter: none,
|
|
123
|
+
equals: eq,
|
|
124
|
+
equals_: eq,
|
|
125
|
+
toArray: function () {
|
|
126
|
+
return [];
|
|
127
|
+
},
|
|
128
|
+
toString: constant('none()')
|
|
129
|
+
};
|
|
130
|
+
return me;
|
|
131
|
+
}();
|
|
132
|
+
var some = function (a) {
|
|
133
|
+
var constant_a = constant(a);
|
|
134
|
+
var self = function () {
|
|
135
|
+
return me;
|
|
136
|
+
};
|
|
137
|
+
var bind = function (f) {
|
|
138
|
+
return f(a);
|
|
139
|
+
};
|
|
140
|
+
var me = {
|
|
141
|
+
fold: function (n, s) {
|
|
142
|
+
return s(a);
|
|
143
|
+
},
|
|
144
|
+
is: function (v) {
|
|
145
|
+
return a === v;
|
|
146
|
+
},
|
|
147
|
+
isSome: always,
|
|
148
|
+
isNone: never,
|
|
149
|
+
getOr: constant_a,
|
|
150
|
+
getOrThunk: constant_a,
|
|
151
|
+
getOrDie: constant_a,
|
|
152
|
+
getOrNull: constant_a,
|
|
153
|
+
getOrUndefined: constant_a,
|
|
154
|
+
or: self,
|
|
155
|
+
orThunk: self,
|
|
156
|
+
map: function (f) {
|
|
157
|
+
return some(f(a));
|
|
158
|
+
},
|
|
159
|
+
each: function (f) {
|
|
160
|
+
f(a);
|
|
161
|
+
},
|
|
162
|
+
bind: bind,
|
|
163
|
+
exists: bind,
|
|
164
|
+
forall: bind,
|
|
165
|
+
filter: function (f) {
|
|
166
|
+
return f(a) ? me : NONE;
|
|
167
|
+
},
|
|
168
|
+
toArray: function () {
|
|
169
|
+
return [a];
|
|
170
|
+
},
|
|
171
|
+
toString: function () {
|
|
172
|
+
return 'some(' + a + ')';
|
|
173
|
+
},
|
|
174
|
+
equals: function (o) {
|
|
175
|
+
return o.is(a);
|
|
176
|
+
},
|
|
177
|
+
equals_: function (o, elementEq) {
|
|
178
|
+
return o.fold(never, function (b) {
|
|
179
|
+
return elementEq(a, b);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
return me;
|
|
184
|
+
};
|
|
185
|
+
var from = function (value) {
|
|
186
|
+
return value === null || value === undefined ? NONE : some(value);
|
|
187
|
+
};
|
|
188
|
+
var Optional = {
|
|
189
|
+
some: some,
|
|
190
|
+
none: none,
|
|
191
|
+
from: from
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
var nativeSlice = Array.prototype.slice;
|
|
195
|
+
var nativeIndexOf = Array.prototype.indexOf;
|
|
196
|
+
var rawIndexOf = function (ts, t) {
|
|
197
|
+
return nativeIndexOf.call(ts, t);
|
|
198
|
+
};
|
|
199
|
+
var contains = function (xs, x) {
|
|
200
|
+
return rawIndexOf(xs, x) > -1;
|
|
201
|
+
};
|
|
202
|
+
var map = function (xs, f) {
|
|
203
|
+
var len = xs.length;
|
|
204
|
+
var r = new Array(len);
|
|
205
|
+
for (var i = 0; i < len; i++) {
|
|
206
|
+
var x = xs[i];
|
|
207
|
+
r[i] = f(x, i);
|
|
208
|
+
}
|
|
209
|
+
return r;
|
|
210
|
+
};
|
|
211
|
+
var each = function (xs, f) {
|
|
212
|
+
for (var i = 0, len = xs.length; i < len; i++) {
|
|
213
|
+
var x = xs[i];
|
|
214
|
+
f(x, i);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
var eachr = function (xs, f) {
|
|
218
|
+
for (var i = xs.length - 1; i >= 0; i--) {
|
|
219
|
+
var x = xs[i];
|
|
220
|
+
f(x, i);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var filter = function (xs, pred) {
|
|
224
|
+
var r = [];
|
|
225
|
+
for (var i = 0, len = xs.length; i < len; i++) {
|
|
226
|
+
var x = xs[i];
|
|
227
|
+
if (pred(x, i)) {
|
|
228
|
+
r.push(x);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return r;
|
|
232
|
+
};
|
|
233
|
+
var foldr = function (xs, f, acc) {
|
|
234
|
+
eachr(xs, function (x) {
|
|
235
|
+
acc = f(acc, x);
|
|
236
|
+
});
|
|
237
|
+
return acc;
|
|
238
|
+
};
|
|
239
|
+
var foldl = function (xs, f, acc) {
|
|
240
|
+
each(xs, function (x) {
|
|
241
|
+
acc = f(acc, x);
|
|
242
|
+
});
|
|
243
|
+
return acc;
|
|
244
|
+
};
|
|
245
|
+
var findUntil = function (xs, pred, until) {
|
|
246
|
+
for (var i = 0, len = xs.length; i < len; i++) {
|
|
247
|
+
var x = xs[i];
|
|
248
|
+
if (pred(x, i)) {
|
|
249
|
+
return Optional.some(x);
|
|
250
|
+
} else if (until(x, i)) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return Optional.none();
|
|
255
|
+
};
|
|
256
|
+
var find = function (xs, pred) {
|
|
257
|
+
return findUntil(xs, pred, never);
|
|
258
|
+
};
|
|
259
|
+
var forall = function (xs, pred) {
|
|
260
|
+
for (var i = 0, len = xs.length; i < len; ++i) {
|
|
261
|
+
var x = xs[i];
|
|
262
|
+
if (pred(x, i) !== true) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return true;
|
|
267
|
+
};
|
|
268
|
+
var sort = function (xs, comparator) {
|
|
269
|
+
var copy = nativeSlice.call(xs, 0);
|
|
270
|
+
copy.sort(comparator);
|
|
271
|
+
return copy;
|
|
272
|
+
};
|
|
273
|
+
var get = function (xs, i) {
|
|
274
|
+
return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
|
|
275
|
+
};
|
|
276
|
+
var head = function (xs) {
|
|
277
|
+
return get(xs, 0);
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
var keys = Object.keys;
|
|
281
|
+
var hasOwnProperty = Object.hasOwnProperty;
|
|
282
|
+
var has = function (obj, key) {
|
|
283
|
+
return hasOwnProperty.call(obj, key);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
var generate = function (cases) {
|
|
287
|
+
if (!isArray(cases)) {
|
|
288
|
+
throw new Error('cases must be an array');
|
|
289
|
+
}
|
|
290
|
+
if (cases.length === 0) {
|
|
291
|
+
throw new Error('there must be at least one case');
|
|
292
|
+
}
|
|
293
|
+
var constructors = [];
|
|
294
|
+
var adt = {};
|
|
295
|
+
each(cases, function (acase, count) {
|
|
296
|
+
var keys$1 = keys(acase);
|
|
297
|
+
if (keys$1.length !== 1) {
|
|
298
|
+
throw new Error('one and only one name per case');
|
|
299
|
+
}
|
|
300
|
+
var key = keys$1[0];
|
|
301
|
+
var value = acase[key];
|
|
302
|
+
if (adt[key] !== undefined) {
|
|
303
|
+
throw new Error('duplicate key detected:' + key);
|
|
304
|
+
} else if (key === 'cata') {
|
|
305
|
+
throw new Error('cannot have a case named cata (sorry)');
|
|
306
|
+
} else if (!isArray(value)) {
|
|
307
|
+
throw new Error('case arguments must be an array');
|
|
308
|
+
}
|
|
309
|
+
constructors.push(key);
|
|
310
|
+
adt[key] = function () {
|
|
311
|
+
var args = [];
|
|
312
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
313
|
+
args[_i] = arguments[_i];
|
|
314
|
+
}
|
|
315
|
+
var argLength = args.length;
|
|
316
|
+
if (argLength !== value.length) {
|
|
317
|
+
throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
|
|
318
|
+
}
|
|
319
|
+
var match = function (branches) {
|
|
320
|
+
var branchKeys = keys(branches);
|
|
321
|
+
if (constructors.length !== branchKeys.length) {
|
|
322
|
+
throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
|
|
323
|
+
}
|
|
324
|
+
var allReqd = forall(constructors, function (reqKey) {
|
|
325
|
+
return contains(branchKeys, reqKey);
|
|
326
|
+
});
|
|
327
|
+
if (!allReqd) {
|
|
328
|
+
throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
|
|
329
|
+
}
|
|
330
|
+
return branches[key].apply(null, args);
|
|
331
|
+
};
|
|
332
|
+
return {
|
|
333
|
+
fold: function () {
|
|
334
|
+
var foldArgs = [];
|
|
335
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
336
|
+
foldArgs[_i] = arguments[_i];
|
|
337
|
+
}
|
|
338
|
+
if (foldArgs.length !== cases.length) {
|
|
339
|
+
throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);
|
|
340
|
+
}
|
|
341
|
+
var target = foldArgs[count];
|
|
342
|
+
return target.apply(null, args);
|
|
343
|
+
},
|
|
344
|
+
match: match,
|
|
345
|
+
log: function (label) {
|
|
346
|
+
console.log(label, {
|
|
347
|
+
constructors: constructors,
|
|
348
|
+
constructor: key,
|
|
349
|
+
params: args
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
return adt;
|
|
356
|
+
};
|
|
357
|
+
var Adt = { generate: generate };
|
|
358
|
+
|
|
359
|
+
var comparison = Adt.generate([
|
|
360
|
+
{
|
|
361
|
+
bothErrors: [
|
|
362
|
+
'error1',
|
|
363
|
+
'error2'
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
firstError: [
|
|
368
|
+
'error1',
|
|
369
|
+
'value2'
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
secondError: [
|
|
374
|
+
'value1',
|
|
375
|
+
'error2'
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
bothValues: [
|
|
380
|
+
'value1',
|
|
381
|
+
'value2'
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
]);
|
|
385
|
+
var partition = function (results) {
|
|
386
|
+
var errors = [];
|
|
387
|
+
var values = [];
|
|
388
|
+
each(results, function (result) {
|
|
389
|
+
result.fold(function (err) {
|
|
390
|
+
errors.push(err);
|
|
391
|
+
}, function (value) {
|
|
392
|
+
values.push(value);
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
return {
|
|
396
|
+
errors: errors,
|
|
397
|
+
values: values
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
var value = function (o) {
|
|
402
|
+
var is = function (v) {
|
|
403
|
+
return o === v;
|
|
404
|
+
};
|
|
405
|
+
var or = function (_opt) {
|
|
406
|
+
return value(o);
|
|
407
|
+
};
|
|
408
|
+
var orThunk = function (_f) {
|
|
409
|
+
return value(o);
|
|
410
|
+
};
|
|
411
|
+
var map = function (f) {
|
|
412
|
+
return value(f(o));
|
|
413
|
+
};
|
|
414
|
+
var mapError = function (_f) {
|
|
415
|
+
return value(o);
|
|
416
|
+
};
|
|
417
|
+
var each = function (f) {
|
|
418
|
+
f(o);
|
|
419
|
+
};
|
|
420
|
+
var bind = function (f) {
|
|
421
|
+
return f(o);
|
|
422
|
+
};
|
|
423
|
+
var fold = function (_, onValue) {
|
|
424
|
+
return onValue(o);
|
|
425
|
+
};
|
|
426
|
+
var exists = function (f) {
|
|
427
|
+
return f(o);
|
|
428
|
+
};
|
|
429
|
+
var forall = function (f) {
|
|
430
|
+
return f(o);
|
|
431
|
+
};
|
|
432
|
+
var toOptional = function () {
|
|
433
|
+
return Optional.some(o);
|
|
434
|
+
};
|
|
435
|
+
return {
|
|
436
|
+
is: is,
|
|
437
|
+
isValue: always,
|
|
438
|
+
isError: never,
|
|
439
|
+
getOr: constant(o),
|
|
440
|
+
getOrThunk: constant(o),
|
|
441
|
+
getOrDie: constant(o),
|
|
442
|
+
or: or,
|
|
443
|
+
orThunk: orThunk,
|
|
444
|
+
fold: fold,
|
|
445
|
+
map: map,
|
|
446
|
+
mapError: mapError,
|
|
447
|
+
each: each,
|
|
448
|
+
bind: bind,
|
|
449
|
+
exists: exists,
|
|
450
|
+
forall: forall,
|
|
451
|
+
toOptional: toOptional
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
var error = function (message) {
|
|
455
|
+
var getOrThunk = function (f) {
|
|
456
|
+
return f();
|
|
457
|
+
};
|
|
458
|
+
var getOrDie = function () {
|
|
459
|
+
return die(String(message))();
|
|
460
|
+
};
|
|
461
|
+
var or = function (opt) {
|
|
462
|
+
return opt;
|
|
463
|
+
};
|
|
464
|
+
var orThunk = function (f) {
|
|
465
|
+
return f();
|
|
466
|
+
};
|
|
467
|
+
var map = function (_f) {
|
|
468
|
+
return error(message);
|
|
469
|
+
};
|
|
470
|
+
var mapError = function (f) {
|
|
471
|
+
return error(f(message));
|
|
472
|
+
};
|
|
473
|
+
var bind = function (_f) {
|
|
474
|
+
return error(message);
|
|
475
|
+
};
|
|
476
|
+
var fold = function (onError, _) {
|
|
477
|
+
return onError(message);
|
|
478
|
+
};
|
|
479
|
+
return {
|
|
480
|
+
is: never,
|
|
481
|
+
isValue: never,
|
|
482
|
+
isError: always,
|
|
483
|
+
getOr: identity,
|
|
484
|
+
getOrThunk: getOrThunk,
|
|
485
|
+
getOrDie: getOrDie,
|
|
486
|
+
or: or,
|
|
487
|
+
orThunk: orThunk,
|
|
488
|
+
fold: fold,
|
|
489
|
+
map: map,
|
|
490
|
+
mapError: mapError,
|
|
491
|
+
each: noop,
|
|
492
|
+
bind: bind,
|
|
493
|
+
exists: never,
|
|
494
|
+
forall: always,
|
|
495
|
+
toOptional: Optional.none
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
var fromOption = function (opt, err) {
|
|
499
|
+
return opt.fold(function () {
|
|
500
|
+
return error(err);
|
|
501
|
+
}, value);
|
|
502
|
+
};
|
|
503
|
+
var Result = {
|
|
504
|
+
value: value,
|
|
505
|
+
error: error,
|
|
506
|
+
fromOption: fromOption
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
var isInlinePattern = function (pattern) {
|
|
510
|
+
return pattern.type === 'inline-command' || pattern.type === 'inline-format';
|
|
511
|
+
};
|
|
512
|
+
var isBlockPattern = function (pattern) {
|
|
513
|
+
return pattern.type === 'block-command' || pattern.type === 'block-format';
|
|
514
|
+
};
|
|
515
|
+
var sortPatterns = function (patterns) {
|
|
516
|
+
return sort(patterns, function (a, b) {
|
|
517
|
+
if (a.start.length === b.start.length) {
|
|
518
|
+
return 0;
|
|
519
|
+
}
|
|
520
|
+
return a.start.length > b.start.length ? -1 : 1;
|
|
521
|
+
});
|
|
522
|
+
};
|
|
523
|
+
var normalizePattern = function (pattern) {
|
|
524
|
+
var err = function (message) {
|
|
525
|
+
return Result.error({
|
|
526
|
+
message: message,
|
|
527
|
+
pattern: pattern
|
|
528
|
+
});
|
|
529
|
+
};
|
|
530
|
+
var formatOrCmd = function (name, onFormat, onCommand) {
|
|
531
|
+
if (pattern.format !== undefined) {
|
|
532
|
+
var formats = void 0;
|
|
533
|
+
if (isArray(pattern.format)) {
|
|
534
|
+
if (!forall(pattern.format, isString)) {
|
|
535
|
+
return err(name + ' pattern has non-string items in the `format` array');
|
|
536
|
+
}
|
|
537
|
+
formats = pattern.format;
|
|
538
|
+
} else if (isString(pattern.format)) {
|
|
539
|
+
formats = [pattern.format];
|
|
540
|
+
} else {
|
|
541
|
+
return err(name + ' pattern has non-string `format` parameter');
|
|
542
|
+
}
|
|
543
|
+
return Result.value(onFormat(formats));
|
|
544
|
+
} else if (pattern.cmd !== undefined) {
|
|
545
|
+
if (!isString(pattern.cmd)) {
|
|
546
|
+
return err(name + ' pattern has non-string `cmd` parameter');
|
|
547
|
+
}
|
|
548
|
+
return Result.value(onCommand(pattern.cmd, pattern.value));
|
|
549
|
+
} else {
|
|
550
|
+
return err(name + ' pattern is missing both `format` and `cmd` parameters');
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
if (!isObject(pattern)) {
|
|
554
|
+
return err('Raw pattern is not an object');
|
|
555
|
+
}
|
|
556
|
+
if (!isString(pattern.start)) {
|
|
557
|
+
return err('Raw pattern is missing `start` parameter');
|
|
558
|
+
}
|
|
559
|
+
if (pattern.end !== undefined) {
|
|
560
|
+
if (!isString(pattern.end)) {
|
|
561
|
+
return err('Inline pattern has non-string `end` parameter');
|
|
562
|
+
}
|
|
563
|
+
if (pattern.start.length === 0 && pattern.end.length === 0) {
|
|
564
|
+
return err('Inline pattern has empty `start` and `end` parameters');
|
|
565
|
+
}
|
|
566
|
+
var start_1 = pattern.start;
|
|
567
|
+
var end_1 = pattern.end;
|
|
568
|
+
if (end_1.length === 0) {
|
|
569
|
+
end_1 = start_1;
|
|
570
|
+
start_1 = '';
|
|
571
|
+
}
|
|
572
|
+
return formatOrCmd('Inline', function (format) {
|
|
573
|
+
return {
|
|
574
|
+
type: 'inline-format',
|
|
575
|
+
start: start_1,
|
|
576
|
+
end: end_1,
|
|
577
|
+
format: format
|
|
578
|
+
};
|
|
579
|
+
}, function (cmd, value) {
|
|
580
|
+
return {
|
|
581
|
+
type: 'inline-command',
|
|
582
|
+
start: start_1,
|
|
583
|
+
end: end_1,
|
|
584
|
+
cmd: cmd,
|
|
585
|
+
value: value
|
|
586
|
+
};
|
|
587
|
+
});
|
|
588
|
+
} else if (pattern.replacement !== undefined) {
|
|
589
|
+
if (!isString(pattern.replacement)) {
|
|
590
|
+
return err('Replacement pattern has non-string `replacement` parameter');
|
|
591
|
+
}
|
|
592
|
+
if (pattern.start.length === 0) {
|
|
593
|
+
return err('Replacement pattern has empty `start` parameter');
|
|
594
|
+
}
|
|
595
|
+
return Result.value({
|
|
596
|
+
type: 'inline-command',
|
|
597
|
+
start: '',
|
|
598
|
+
end: pattern.start,
|
|
599
|
+
cmd: 'mceInsertContent',
|
|
600
|
+
value: pattern.replacement
|
|
601
|
+
});
|
|
602
|
+
} else {
|
|
603
|
+
if (pattern.start.length === 0) {
|
|
604
|
+
return err('Block pattern has empty `start` parameter');
|
|
605
|
+
}
|
|
606
|
+
return formatOrCmd('Block', function (formats) {
|
|
607
|
+
return {
|
|
608
|
+
type: 'block-format',
|
|
609
|
+
start: pattern.start,
|
|
610
|
+
format: formats[0]
|
|
611
|
+
};
|
|
612
|
+
}, function (command, commandValue) {
|
|
613
|
+
return {
|
|
614
|
+
type: 'block-command',
|
|
615
|
+
start: pattern.start,
|
|
616
|
+
cmd: command,
|
|
617
|
+
value: commandValue
|
|
618
|
+
};
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
var denormalizePattern = function (pattern) {
|
|
623
|
+
if (pattern.type === 'block-command') {
|
|
624
|
+
return {
|
|
625
|
+
start: pattern.start,
|
|
626
|
+
cmd: pattern.cmd,
|
|
627
|
+
value: pattern.value
|
|
628
|
+
};
|
|
629
|
+
} else if (pattern.type === 'block-format') {
|
|
630
|
+
return {
|
|
631
|
+
start: pattern.start,
|
|
632
|
+
format: pattern.format
|
|
633
|
+
};
|
|
634
|
+
} else if (pattern.type === 'inline-command') {
|
|
635
|
+
if (pattern.cmd === 'mceInsertContent' && pattern.start === '') {
|
|
636
|
+
return {
|
|
637
|
+
start: pattern.end,
|
|
638
|
+
replacement: pattern.value
|
|
639
|
+
};
|
|
640
|
+
} else {
|
|
641
|
+
return {
|
|
642
|
+
start: pattern.start,
|
|
643
|
+
end: pattern.end,
|
|
644
|
+
cmd: pattern.cmd,
|
|
645
|
+
value: pattern.value
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
} else if (pattern.type === 'inline-format') {
|
|
649
|
+
return {
|
|
650
|
+
start: pattern.start,
|
|
651
|
+
end: pattern.end,
|
|
652
|
+
format: pattern.format.length === 1 ? pattern.format[0] : pattern.format
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
var createPatternSet = function (patterns) {
|
|
657
|
+
return {
|
|
658
|
+
inlinePatterns: filter(patterns, isInlinePattern),
|
|
659
|
+
blockPatterns: sortPatterns(filter(patterns, isBlockPattern))
|
|
660
|
+
};
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
var get$1 = function (patternsState) {
|
|
664
|
+
var setPatterns = function (newPatterns) {
|
|
665
|
+
var normalized = partition(map(newPatterns, normalizePattern));
|
|
666
|
+
if (normalized.errors.length > 0) {
|
|
667
|
+
var firstError = normalized.errors[0];
|
|
668
|
+
throw new Error(firstError.message + ':\n' + JSON.stringify(firstError.pattern, null, 2));
|
|
669
|
+
}
|
|
670
|
+
patternsState.set(createPatternSet(normalized.values));
|
|
671
|
+
};
|
|
672
|
+
var getPatterns = function () {
|
|
673
|
+
return __spreadArrays(map(patternsState.get().inlinePatterns, denormalizePattern), map(patternsState.get().blockPatterns, denormalizePattern));
|
|
674
|
+
};
|
|
675
|
+
return {
|
|
676
|
+
setPatterns: setPatterns,
|
|
677
|
+
getPatterns: getPatterns
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
var Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
|
682
|
+
|
|
683
|
+
var error$1 = function () {
|
|
684
|
+
var args = [];
|
|
685
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
686
|
+
args[_i] = arguments[_i];
|
|
687
|
+
}
|
|
688
|
+
var console = Global.console;
|
|
689
|
+
if (console) {
|
|
690
|
+
if (console.error) {
|
|
691
|
+
console.error.apply(console, args);
|
|
692
|
+
} else {
|
|
693
|
+
console.log.apply(console, args);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
var defaultPatterns = [
|
|
698
|
+
{
|
|
699
|
+
start: '*',
|
|
700
|
+
end: '*',
|
|
701
|
+
format: 'italic'
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
start: '**',
|
|
705
|
+
end: '**',
|
|
706
|
+
format: 'bold'
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
start: '#',
|
|
710
|
+
format: 'h1'
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
start: '##',
|
|
714
|
+
format: 'h2'
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
start: '###',
|
|
718
|
+
format: 'h3'
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
start: '####',
|
|
722
|
+
format: 'h4'
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
start: '#####',
|
|
726
|
+
format: 'h5'
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
start: '######',
|
|
730
|
+
format: 'h6'
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
start: '1. ',
|
|
734
|
+
cmd: 'InsertOrderedList'
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
start: '* ',
|
|
738
|
+
cmd: 'InsertUnorderedList'
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
start: '- ',
|
|
742
|
+
cmd: 'InsertUnorderedList'
|
|
743
|
+
}
|
|
744
|
+
];
|
|
745
|
+
var getPatternSet = function (editor) {
|
|
746
|
+
var patterns = editor.getParam('textpattern_patterns', defaultPatterns, 'array');
|
|
747
|
+
if (!isArray(patterns)) {
|
|
748
|
+
error$1('The setting textpattern_patterns should be an array');
|
|
749
|
+
return {
|
|
750
|
+
inlinePatterns: [],
|
|
751
|
+
blockPatterns: []
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
var normalized = partition(map(patterns, normalizePattern));
|
|
755
|
+
each(normalized.errors, function (err) {
|
|
756
|
+
return error$1(err.message, err.pattern);
|
|
757
|
+
});
|
|
758
|
+
return createPatternSet(normalized.values);
|
|
759
|
+
};
|
|
760
|
+
var getForcedRootBlock = function (editor) {
|
|
761
|
+
var block = editor.getParam('forced_root_block', 'p');
|
|
762
|
+
if (block === false) {
|
|
763
|
+
return '';
|
|
764
|
+
} else if (block === true) {
|
|
765
|
+
return 'p';
|
|
766
|
+
} else {
|
|
767
|
+
return block;
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
772
|
+
|
|
773
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
|
774
|
+
|
|
775
|
+
var zeroWidth = '\uFEFF';
|
|
776
|
+
var nbsp = '\xA0';
|
|
777
|
+
|
|
778
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
779
|
+
|
|
780
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
781
|
+
|
|
782
|
+
var global$5 = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
|
|
783
|
+
|
|
784
|
+
var point = function (container, offset) {
|
|
785
|
+
return {
|
|
786
|
+
container: container,
|
|
787
|
+
offset: offset
|
|
788
|
+
};
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
var isText = function (node) {
|
|
792
|
+
return node.nodeType === Node.TEXT_NODE;
|
|
793
|
+
};
|
|
794
|
+
var cleanEmptyNodes = function (dom, node, isRoot) {
|
|
795
|
+
if (node && dom.isEmpty(node) && !isRoot(node)) {
|
|
796
|
+
var parent_1 = node.parentNode;
|
|
797
|
+
dom.remove(node);
|
|
798
|
+
cleanEmptyNodes(dom, parent_1, isRoot);
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
var deleteRng = function (dom, rng, isRoot, clean) {
|
|
802
|
+
if (clean === void 0) {
|
|
803
|
+
clean = true;
|
|
804
|
+
}
|
|
805
|
+
var startParent = rng.startContainer.parentNode;
|
|
806
|
+
var endParent = rng.endContainer.parentNode;
|
|
807
|
+
rng.deleteContents();
|
|
808
|
+
if (clean && !isRoot(rng.startContainer)) {
|
|
809
|
+
if (isText(rng.startContainer) && rng.startContainer.data.length === 0) {
|
|
810
|
+
dom.remove(rng.startContainer);
|
|
811
|
+
}
|
|
812
|
+
if (isText(rng.endContainer) && rng.endContainer.data.length === 0) {
|
|
813
|
+
dom.remove(rng.endContainer);
|
|
814
|
+
}
|
|
815
|
+
cleanEmptyNodes(dom, startParent, isRoot);
|
|
816
|
+
if (startParent !== endParent) {
|
|
817
|
+
cleanEmptyNodes(dom, endParent, isRoot);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
var isBlockFormatName = function (name, formatter) {
|
|
822
|
+
var formatSet = formatter.get(name);
|
|
823
|
+
return isArray(formatSet) && head(formatSet).exists(function (format) {
|
|
824
|
+
return has(format, 'block');
|
|
825
|
+
});
|
|
826
|
+
};
|
|
827
|
+
var isReplacementPattern = function (pattern) {
|
|
828
|
+
return pattern.start.length === 0;
|
|
829
|
+
};
|
|
830
|
+
var getParentBlock = function (editor, rng) {
|
|
831
|
+
var parentBlockOpt = Optional.from(editor.dom.getParent(rng.startContainer, editor.dom.isBlock));
|
|
832
|
+
if (getForcedRootBlock(editor) === '') {
|
|
833
|
+
return parentBlockOpt.orThunk(function () {
|
|
834
|
+
return Optional.some(editor.getBody());
|
|
835
|
+
});
|
|
836
|
+
} else {
|
|
837
|
+
return parentBlockOpt;
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
var DOM = global$4.DOM;
|
|
842
|
+
var alwaysNext = function (startNode) {
|
|
843
|
+
return function (node) {
|
|
844
|
+
return startNode === node ? -1 : 0;
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
var isBoundary = function (dom) {
|
|
848
|
+
return function (node) {
|
|
849
|
+
return dom.isBlock(node) || contains([
|
|
850
|
+
'BR',
|
|
851
|
+
'IMG',
|
|
852
|
+
'HR',
|
|
853
|
+
'INPUT'
|
|
854
|
+
], node.nodeName) || dom.getContentEditable(node) === 'false';
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
var textBefore = function (node, offset, rootNode) {
|
|
858
|
+
if (isText(node) && offset >= 0) {
|
|
859
|
+
return Optional.some(point(node, offset));
|
|
860
|
+
} else {
|
|
861
|
+
var textSeeker = global$5(DOM);
|
|
862
|
+
return Optional.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).map(function (prev) {
|
|
863
|
+
return point(prev.container, prev.container.data.length);
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
var textAfter = function (node, offset, rootNode) {
|
|
868
|
+
if (isText(node) && offset >= node.length) {
|
|
869
|
+
return Optional.some(point(node, offset));
|
|
870
|
+
} else {
|
|
871
|
+
var textSeeker = global$5(DOM);
|
|
872
|
+
return Optional.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).map(function (prev) {
|
|
873
|
+
return point(prev.container, 0);
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
var scanLeft = function (node, offset, rootNode) {
|
|
878
|
+
if (!isText(node)) {
|
|
879
|
+
return Optional.none();
|
|
880
|
+
}
|
|
881
|
+
var text = node.textContent;
|
|
882
|
+
if (offset >= 0 && offset <= text.length) {
|
|
883
|
+
return Optional.some(point(node, offset));
|
|
884
|
+
} else {
|
|
885
|
+
var textSeeker = global$5(DOM);
|
|
886
|
+
return Optional.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).bind(function (prev) {
|
|
887
|
+
var prevText = prev.container.data;
|
|
888
|
+
return scanLeft(prev.container, offset + prevText.length, rootNode);
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
var scanRight = function (node, offset, rootNode) {
|
|
893
|
+
if (!isText(node)) {
|
|
894
|
+
return Optional.none();
|
|
895
|
+
}
|
|
896
|
+
var text = node.textContent;
|
|
897
|
+
if (offset <= text.length) {
|
|
898
|
+
return Optional.some(point(node, offset));
|
|
899
|
+
} else {
|
|
900
|
+
var textSeeker = global$5(DOM);
|
|
901
|
+
return Optional.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).bind(function (next) {
|
|
902
|
+
return scanRight(next.container, offset - text.length, rootNode);
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
var repeatLeft = function (dom, node, offset, process, rootNode) {
|
|
907
|
+
var search = global$5(dom, isBoundary(dom));
|
|
908
|
+
return Optional.from(search.backwards(node, offset, process, rootNode));
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
var generatePath = function (root, node, offset) {
|
|
912
|
+
if (isText(node) && (offset < 0 || offset > node.data.length)) {
|
|
913
|
+
return [];
|
|
914
|
+
}
|
|
915
|
+
var p = [offset];
|
|
916
|
+
var current = node;
|
|
917
|
+
while (current !== root && current.parentNode) {
|
|
918
|
+
var parent_1 = current.parentNode;
|
|
919
|
+
for (var i = 0; i < parent_1.childNodes.length; i++) {
|
|
920
|
+
if (parent_1.childNodes[i] === current) {
|
|
921
|
+
p.push(i);
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
current = parent_1;
|
|
926
|
+
}
|
|
927
|
+
return current === root ? p.reverse() : [];
|
|
928
|
+
};
|
|
929
|
+
var generatePathRange = function (root, startNode, startOffset, endNode, endOffset) {
|
|
930
|
+
var start = generatePath(root, startNode, startOffset);
|
|
931
|
+
var end = generatePath(root, endNode, endOffset);
|
|
932
|
+
return {
|
|
933
|
+
start: start,
|
|
934
|
+
end: end
|
|
935
|
+
};
|
|
936
|
+
};
|
|
937
|
+
var resolvePath = function (root, path) {
|
|
938
|
+
var nodePath = path.slice();
|
|
939
|
+
var offset = nodePath.pop();
|
|
940
|
+
var resolvedNode = foldl(nodePath, function (optNode, index) {
|
|
941
|
+
return optNode.bind(function (node) {
|
|
942
|
+
return Optional.from(node.childNodes[index]);
|
|
943
|
+
});
|
|
944
|
+
}, Optional.some(root));
|
|
945
|
+
return resolvedNode.bind(function (node) {
|
|
946
|
+
if (isText(node) && (offset < 0 || offset > node.data.length)) {
|
|
947
|
+
return Optional.none();
|
|
948
|
+
} else {
|
|
949
|
+
return Optional.some({
|
|
950
|
+
node: node,
|
|
951
|
+
offset: offset
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
var resolvePathRange = function (root, range) {
|
|
957
|
+
return resolvePath(root, range.start).bind(function (_a) {
|
|
958
|
+
var startNode = _a.node, startOffset = _a.offset;
|
|
959
|
+
return resolvePath(root, range.end).map(function (_a) {
|
|
960
|
+
var endNode = _a.node, endOffset = _a.offset;
|
|
961
|
+
var rng = document.createRange();
|
|
962
|
+
rng.setStart(startNode, startOffset);
|
|
963
|
+
rng.setEnd(endNode, endOffset);
|
|
964
|
+
return rng;
|
|
965
|
+
});
|
|
966
|
+
});
|
|
967
|
+
};
|
|
968
|
+
var generatePathRangeFromRange = function (root, range) {
|
|
969
|
+
return generatePathRange(root, range.startContainer, range.startOffset, range.endContainer, range.endOffset);
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
var stripPattern = function (dom, block, pattern) {
|
|
973
|
+
var firstTextNode = textAfter(block, 0, block);
|
|
974
|
+
firstTextNode.each(function (spot) {
|
|
975
|
+
var node = spot.container;
|
|
976
|
+
scanRight(node, pattern.start.length, block).each(function (end) {
|
|
977
|
+
var rng = dom.createRng();
|
|
978
|
+
rng.setStart(node, 0);
|
|
979
|
+
rng.setEnd(end.container, end.offset);
|
|
980
|
+
deleteRng(dom, rng, function (e) {
|
|
981
|
+
return e === block;
|
|
982
|
+
});
|
|
983
|
+
});
|
|
984
|
+
});
|
|
985
|
+
};
|
|
986
|
+
var applyPattern = function (editor, match) {
|
|
987
|
+
var dom = editor.dom;
|
|
988
|
+
var pattern = match.pattern;
|
|
989
|
+
var rng = resolvePathRange(dom.getRoot(), match.range).getOrDie('Unable to resolve path range');
|
|
990
|
+
getParentBlock(editor, rng).each(function (block) {
|
|
991
|
+
if (pattern.type === 'block-format') {
|
|
992
|
+
if (isBlockFormatName(pattern.format, editor.formatter)) {
|
|
993
|
+
editor.undoManager.transact(function () {
|
|
994
|
+
stripPattern(editor.dom, block, pattern);
|
|
995
|
+
editor.formatter.apply(pattern.format);
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
} else if (pattern.type === 'block-command') {
|
|
999
|
+
editor.undoManager.transact(function () {
|
|
1000
|
+
stripPattern(editor.dom, block, pattern);
|
|
1001
|
+
editor.execCommand(pattern.cmd, false, pattern.value);
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
return true;
|
|
1006
|
+
};
|
|
1007
|
+
var findPattern = function (patterns, text) {
|
|
1008
|
+
var nuText = text.replace(nbsp, ' ');
|
|
1009
|
+
return find(patterns, function (pattern) {
|
|
1010
|
+
return text.indexOf(pattern.start) === 0 || nuText.indexOf(pattern.start) === 0;
|
|
1011
|
+
});
|
|
1012
|
+
};
|
|
1013
|
+
var findPatterns = function (editor, patterns) {
|
|
1014
|
+
var dom = editor.dom;
|
|
1015
|
+
var rng = editor.selection.getRng();
|
|
1016
|
+
return getParentBlock(editor, rng).filter(function (block) {
|
|
1017
|
+
var forcedRootBlock = getForcedRootBlock(editor);
|
|
1018
|
+
var matchesForcedRootBlock = forcedRootBlock === '' && dom.is(block, 'body') || dom.is(block, forcedRootBlock);
|
|
1019
|
+
return block !== null && matchesForcedRootBlock;
|
|
1020
|
+
}).bind(function (block) {
|
|
1021
|
+
var blockText = block.textContent;
|
|
1022
|
+
var matchedPattern = findPattern(patterns, blockText);
|
|
1023
|
+
return matchedPattern.map(function (pattern) {
|
|
1024
|
+
if (global$3.trim(blockText).length === pattern.start.length) {
|
|
1025
|
+
return [];
|
|
1026
|
+
}
|
|
1027
|
+
return [{
|
|
1028
|
+
pattern: pattern,
|
|
1029
|
+
range: generatePathRange(dom.getRoot(), block, 0, block, 0)
|
|
1030
|
+
}];
|
|
1031
|
+
});
|
|
1032
|
+
}).getOr([]);
|
|
1033
|
+
};
|
|
1034
|
+
var applyMatches = function (editor, matches) {
|
|
1035
|
+
if (matches.length === 0) {
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
var bookmark = editor.selection.getBookmark();
|
|
1039
|
+
each(matches, function (match) {
|
|
1040
|
+
return applyPattern(editor, match);
|
|
1041
|
+
});
|
|
1042
|
+
editor.selection.moveToBookmark(bookmark);
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
var unique = 0;
|
|
1046
|
+
var generate$1 = function (prefix) {
|
|
1047
|
+
var date = new Date();
|
|
1048
|
+
var time = date.getTime();
|
|
1049
|
+
var random = Math.floor(Math.random() * 1000000000);
|
|
1050
|
+
unique++;
|
|
1051
|
+
return prefix + '_' + random + unique + String(time);
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
var checkRange = function (str, substr, start) {
|
|
1055
|
+
return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
|
1056
|
+
};
|
|
1057
|
+
var endsWith = function (str, suffix) {
|
|
1058
|
+
return checkRange(str, suffix, str.length - suffix.length);
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
var newMarker = function (dom, id) {
|
|
1062
|
+
return dom.create('span', {
|
|
1063
|
+
'data-mce-type': 'bookmark',
|
|
1064
|
+
id: id
|
|
1065
|
+
});
|
|
1066
|
+
};
|
|
1067
|
+
var rangeFromMarker = function (dom, marker) {
|
|
1068
|
+
var rng = dom.createRng();
|
|
1069
|
+
rng.setStartAfter(marker.start);
|
|
1070
|
+
rng.setEndBefore(marker.end);
|
|
1071
|
+
return rng;
|
|
1072
|
+
};
|
|
1073
|
+
var createMarker = function (dom, markerPrefix, pathRange) {
|
|
1074
|
+
var rng = resolvePathRange(dom.getRoot(), pathRange).getOrDie('Unable to resolve path range');
|
|
1075
|
+
var startNode = rng.startContainer;
|
|
1076
|
+
var endNode = rng.endContainer;
|
|
1077
|
+
var textEnd = rng.endOffset === 0 ? endNode : endNode.splitText(rng.endOffset);
|
|
1078
|
+
var textStart = rng.startOffset === 0 ? startNode : startNode.splitText(rng.startOffset);
|
|
1079
|
+
return {
|
|
1080
|
+
prefix: markerPrefix,
|
|
1081
|
+
end: textEnd.parentNode.insertBefore(newMarker(dom, markerPrefix + '-end'), textEnd),
|
|
1082
|
+
start: textStart.parentNode.insertBefore(newMarker(dom, markerPrefix + '-start'), textStart)
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
var removeMarker = function (dom, marker, isRoot) {
|
|
1086
|
+
cleanEmptyNodes(dom, dom.get(marker.prefix + '-end'), isRoot);
|
|
1087
|
+
cleanEmptyNodes(dom, dom.get(marker.prefix + '-start'), isRoot);
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
var matchesPattern = function (dom, block, patternContent) {
|
|
1091
|
+
return function (element, offset) {
|
|
1092
|
+
var text = element.data;
|
|
1093
|
+
var searchText = text.substring(0, offset);
|
|
1094
|
+
var startEndIndex = searchText.lastIndexOf(patternContent.charAt(patternContent.length - 1));
|
|
1095
|
+
var startIndex = searchText.lastIndexOf(patternContent);
|
|
1096
|
+
if (startIndex !== -1) {
|
|
1097
|
+
return startIndex + patternContent.length;
|
|
1098
|
+
} else if (startEndIndex !== -1) {
|
|
1099
|
+
return startEndIndex + 1;
|
|
1100
|
+
} else {
|
|
1101
|
+
return -1;
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
var findPatternStartFromSpot = function (dom, pattern, block, spot) {
|
|
1106
|
+
var startPattern = pattern.start;
|
|
1107
|
+
var startSpot = repeatLeft(dom, spot.container, spot.offset, matchesPattern(dom, block, startPattern), block);
|
|
1108
|
+
return startSpot.bind(function (spot) {
|
|
1109
|
+
if (spot.offset >= startPattern.length) {
|
|
1110
|
+
var rng = dom.createRng();
|
|
1111
|
+
rng.setStart(spot.container, spot.offset - startPattern.length);
|
|
1112
|
+
rng.setEnd(spot.container, spot.offset);
|
|
1113
|
+
return Optional.some(rng);
|
|
1114
|
+
} else {
|
|
1115
|
+
var offset = spot.offset - startPattern.length;
|
|
1116
|
+
return scanLeft(spot.container, offset, block).map(function (nextSpot) {
|
|
1117
|
+
var rng = dom.createRng();
|
|
1118
|
+
rng.setStart(nextSpot.container, nextSpot.offset);
|
|
1119
|
+
rng.setEnd(spot.container, spot.offset);
|
|
1120
|
+
return rng;
|
|
1121
|
+
}).filter(function (rng) {
|
|
1122
|
+
return rng.toString() === startPattern;
|
|
1123
|
+
}).orThunk(function () {
|
|
1124
|
+
return findPatternStartFromSpot(dom, pattern, block, point(spot.container, 0));
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
});
|
|
1128
|
+
};
|
|
1129
|
+
var findPatternStart = function (dom, pattern, node, offset, block, requireGap) {
|
|
1130
|
+
if (requireGap === void 0) {
|
|
1131
|
+
requireGap = false;
|
|
1132
|
+
}
|
|
1133
|
+
if (pattern.start.length === 0 && !requireGap) {
|
|
1134
|
+
var rng = dom.createRng();
|
|
1135
|
+
rng.setStart(node, offset);
|
|
1136
|
+
rng.setEnd(node, offset);
|
|
1137
|
+
return Optional.some(rng);
|
|
1138
|
+
}
|
|
1139
|
+
return textBefore(node, offset, block).bind(function (spot) {
|
|
1140
|
+
var start = findPatternStartFromSpot(dom, pattern, block, spot);
|
|
1141
|
+
return start.bind(function (startRange) {
|
|
1142
|
+
if (requireGap) {
|
|
1143
|
+
if (startRange.endContainer === spot.container && startRange.endOffset === spot.offset) {
|
|
1144
|
+
return Optional.none();
|
|
1145
|
+
} else if (spot.offset === 0 && startRange.endContainer.textContent.length === startRange.endOffset) {
|
|
1146
|
+
return Optional.none();
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
return Optional.some(startRange);
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
};
|
|
1153
|
+
var findPattern$1 = function (editor, block, details) {
|
|
1154
|
+
var dom = editor.dom;
|
|
1155
|
+
var root = dom.getRoot();
|
|
1156
|
+
var pattern = details.pattern;
|
|
1157
|
+
var endNode = details.position.container;
|
|
1158
|
+
var endOffset = details.position.offset;
|
|
1159
|
+
return scanLeft(endNode, endOffset - details.pattern.end.length, block).bind(function (spot) {
|
|
1160
|
+
var endPathRng = generatePathRange(root, spot.container, spot.offset, endNode, endOffset);
|
|
1161
|
+
if (isReplacementPattern(pattern)) {
|
|
1162
|
+
return Optional.some({
|
|
1163
|
+
matches: [{
|
|
1164
|
+
pattern: pattern,
|
|
1165
|
+
startRng: endPathRng,
|
|
1166
|
+
endRng: endPathRng
|
|
1167
|
+
}],
|
|
1168
|
+
position: spot
|
|
1169
|
+
});
|
|
1170
|
+
} else {
|
|
1171
|
+
var resultsOpt = findPatternsRec(editor, details.remainingPatterns, spot.container, spot.offset, block);
|
|
1172
|
+
var results_1 = resultsOpt.getOr({
|
|
1173
|
+
matches: [],
|
|
1174
|
+
position: spot
|
|
1175
|
+
});
|
|
1176
|
+
var pos = results_1.position;
|
|
1177
|
+
var start = findPatternStart(dom, pattern, pos.container, pos.offset, block, resultsOpt.isNone());
|
|
1178
|
+
return start.map(function (startRng) {
|
|
1179
|
+
var startPathRng = generatePathRangeFromRange(root, startRng);
|
|
1180
|
+
return {
|
|
1181
|
+
matches: results_1.matches.concat([{
|
|
1182
|
+
pattern: pattern,
|
|
1183
|
+
startRng: startPathRng,
|
|
1184
|
+
endRng: endPathRng
|
|
1185
|
+
}]),
|
|
1186
|
+
position: point(startRng.startContainer, startRng.startOffset)
|
|
1187
|
+
};
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
};
|
|
1192
|
+
var findPatternsRec = function (editor, patterns, node, offset, block) {
|
|
1193
|
+
var dom = editor.dom;
|
|
1194
|
+
return textBefore(node, offset, dom.getRoot()).bind(function (endSpot) {
|
|
1195
|
+
var rng = dom.createRng();
|
|
1196
|
+
rng.setStart(block, 0);
|
|
1197
|
+
rng.setEnd(node, offset);
|
|
1198
|
+
var text = rng.toString();
|
|
1199
|
+
for (var i = 0; i < patterns.length; i++) {
|
|
1200
|
+
var pattern = patterns[i];
|
|
1201
|
+
if (!endsWith(text, pattern.end)) {
|
|
1202
|
+
continue;
|
|
1203
|
+
}
|
|
1204
|
+
var patternsWithoutCurrent = patterns.slice();
|
|
1205
|
+
patternsWithoutCurrent.splice(i, 1);
|
|
1206
|
+
var result = findPattern$1(editor, block, {
|
|
1207
|
+
pattern: pattern,
|
|
1208
|
+
remainingPatterns: patternsWithoutCurrent,
|
|
1209
|
+
position: endSpot
|
|
1210
|
+
});
|
|
1211
|
+
if (result.isSome()) {
|
|
1212
|
+
return result;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
return Optional.none();
|
|
1216
|
+
});
|
|
1217
|
+
};
|
|
1218
|
+
var applyPattern$1 = function (editor, pattern, patternRange) {
|
|
1219
|
+
editor.selection.setRng(patternRange);
|
|
1220
|
+
if (pattern.type === 'inline-format') {
|
|
1221
|
+
each(pattern.format, function (format) {
|
|
1222
|
+
editor.formatter.apply(format);
|
|
1223
|
+
});
|
|
1224
|
+
} else {
|
|
1225
|
+
editor.execCommand(pattern.cmd, false, pattern.value);
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
var applyReplacementPattern = function (editor, pattern, marker, isRoot) {
|
|
1229
|
+
var markerRange = rangeFromMarker(editor.dom, marker);
|
|
1230
|
+
deleteRng(editor.dom, markerRange, isRoot);
|
|
1231
|
+
applyPattern$1(editor, pattern, markerRange);
|
|
1232
|
+
};
|
|
1233
|
+
var applyPatternWithContent = function (editor, pattern, startMarker, endMarker, isRoot) {
|
|
1234
|
+
var dom = editor.dom;
|
|
1235
|
+
var markerEndRange = rangeFromMarker(dom, endMarker);
|
|
1236
|
+
var markerStartRange = rangeFromMarker(dom, startMarker);
|
|
1237
|
+
deleteRng(dom, markerStartRange, isRoot);
|
|
1238
|
+
deleteRng(dom, markerEndRange, isRoot);
|
|
1239
|
+
var patternMarker = {
|
|
1240
|
+
prefix: startMarker.prefix,
|
|
1241
|
+
start: startMarker.end,
|
|
1242
|
+
end: endMarker.start
|
|
1243
|
+
};
|
|
1244
|
+
var patternRange = rangeFromMarker(dom, patternMarker);
|
|
1245
|
+
applyPattern$1(editor, pattern, patternRange);
|
|
1246
|
+
};
|
|
1247
|
+
var addMarkers = function (dom, matches) {
|
|
1248
|
+
var markerPrefix = generate$1('mce_textpattern');
|
|
1249
|
+
var matchesWithEnds = foldr(matches, function (acc, match) {
|
|
1250
|
+
var endMarker = createMarker(dom, markerPrefix + ('_end' + acc.length), match.endRng);
|
|
1251
|
+
return acc.concat([__assign(__assign({}, match), { endMarker: endMarker })]);
|
|
1252
|
+
}, []);
|
|
1253
|
+
return foldr(matchesWithEnds, function (acc, match) {
|
|
1254
|
+
var idx = matchesWithEnds.length - acc.length - 1;
|
|
1255
|
+
var startMarker = isReplacementPattern(match.pattern) ? match.endMarker : createMarker(dom, markerPrefix + ('_start' + idx), match.startRng);
|
|
1256
|
+
return acc.concat([__assign(__assign({}, match), { startMarker: startMarker })]);
|
|
1257
|
+
}, []);
|
|
1258
|
+
};
|
|
1259
|
+
var findPatterns$1 = function (editor, patterns, space) {
|
|
1260
|
+
var rng = editor.selection.getRng();
|
|
1261
|
+
if (rng.collapsed === false) {
|
|
1262
|
+
return [];
|
|
1263
|
+
}
|
|
1264
|
+
return getParentBlock(editor, rng).bind(function (block) {
|
|
1265
|
+
var offset = rng.startOffset - (space ? 1 : 0);
|
|
1266
|
+
return findPatternsRec(editor, patterns, rng.startContainer, offset, block);
|
|
1267
|
+
}).fold(function () {
|
|
1268
|
+
return [];
|
|
1269
|
+
}, function (result) {
|
|
1270
|
+
return result.matches;
|
|
1271
|
+
});
|
|
1272
|
+
};
|
|
1273
|
+
var applyMatches$1 = function (editor, matches) {
|
|
1274
|
+
if (matches.length === 0) {
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
var dom = editor.dom;
|
|
1278
|
+
var bookmark = editor.selection.getBookmark();
|
|
1279
|
+
var matchesWithMarkers = addMarkers(dom, matches);
|
|
1280
|
+
each(matchesWithMarkers, function (match) {
|
|
1281
|
+
var block = dom.getParent(match.startMarker.start, dom.isBlock);
|
|
1282
|
+
var isRoot = function (node) {
|
|
1283
|
+
return node === block;
|
|
1284
|
+
};
|
|
1285
|
+
if (isReplacementPattern(match.pattern)) {
|
|
1286
|
+
applyReplacementPattern(editor, match.pattern, match.endMarker, isRoot);
|
|
1287
|
+
} else {
|
|
1288
|
+
applyPatternWithContent(editor, match.pattern, match.startMarker, match.endMarker, isRoot);
|
|
1289
|
+
}
|
|
1290
|
+
removeMarker(dom, match.endMarker, isRoot);
|
|
1291
|
+
removeMarker(dom, match.startMarker, isRoot);
|
|
1292
|
+
});
|
|
1293
|
+
editor.selection.moveToBookmark(bookmark);
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
var handleEnter = function (editor, patternSet) {
|
|
1297
|
+
if (!editor.selection.isCollapsed()) {
|
|
1298
|
+
return false;
|
|
1299
|
+
}
|
|
1300
|
+
var inlineMatches = findPatterns$1(editor, patternSet.inlinePatterns, false);
|
|
1301
|
+
var blockMatches = findPatterns(editor, patternSet.blockPatterns);
|
|
1302
|
+
if (blockMatches.length > 0 || inlineMatches.length > 0) {
|
|
1303
|
+
editor.undoManager.add();
|
|
1304
|
+
editor.undoManager.extra(function () {
|
|
1305
|
+
editor.execCommand('mceInsertNewLine');
|
|
1306
|
+
}, function () {
|
|
1307
|
+
editor.insertContent(zeroWidth);
|
|
1308
|
+
applyMatches$1(editor, inlineMatches);
|
|
1309
|
+
applyMatches(editor, blockMatches);
|
|
1310
|
+
var range = editor.selection.getRng();
|
|
1311
|
+
var spot = textBefore(range.startContainer, range.startOffset, editor.dom.getRoot());
|
|
1312
|
+
editor.execCommand('mceInsertNewLine');
|
|
1313
|
+
spot.each(function (s) {
|
|
1314
|
+
var node = s.container;
|
|
1315
|
+
if (node.data.charAt(s.offset - 1) === zeroWidth) {
|
|
1316
|
+
node.deleteData(s.offset - 1, 1);
|
|
1317
|
+
cleanEmptyNodes(editor.dom, node.parentNode, function (e) {
|
|
1318
|
+
return e === editor.dom.getRoot();
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1322
|
+
});
|
|
1323
|
+
return true;
|
|
1324
|
+
}
|
|
1325
|
+
return false;
|
|
1326
|
+
};
|
|
1327
|
+
var handleInlineKey = function (editor, patternSet) {
|
|
1328
|
+
var inlineMatches = findPatterns$1(editor, patternSet.inlinePatterns, true);
|
|
1329
|
+
if (inlineMatches.length > 0) {
|
|
1330
|
+
editor.undoManager.transact(function () {
|
|
1331
|
+
applyMatches$1(editor, inlineMatches);
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
var checkKeyEvent = function (codes, event, predicate) {
|
|
1336
|
+
for (var i = 0; i < codes.length; i++) {
|
|
1337
|
+
if (predicate(codes[i], event)) {
|
|
1338
|
+
return true;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
};
|
|
1342
|
+
var checkKeyCode = function (codes, event) {
|
|
1343
|
+
return checkKeyEvent(codes, event, function (code, event) {
|
|
1344
|
+
return code === event.keyCode && global$2.modifierPressed(event) === false;
|
|
1345
|
+
});
|
|
1346
|
+
};
|
|
1347
|
+
var checkCharCode = function (chars, event) {
|
|
1348
|
+
return checkKeyEvent(chars, event, function (chr, event) {
|
|
1349
|
+
return chr.charCodeAt(0) === event.charCode;
|
|
1350
|
+
});
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
var setup = function (editor, patternsState) {
|
|
1354
|
+
var charCodes = [
|
|
1355
|
+
',',
|
|
1356
|
+
'.',
|
|
1357
|
+
';',
|
|
1358
|
+
':',
|
|
1359
|
+
'!',
|
|
1360
|
+
'?'
|
|
1361
|
+
];
|
|
1362
|
+
var keyCodes = [32];
|
|
1363
|
+
editor.on('keydown', function (e) {
|
|
1364
|
+
if (e.keyCode === 13 && !global$2.modifierPressed(e)) {
|
|
1365
|
+
if (handleEnter(editor, patternsState.get())) {
|
|
1366
|
+
e.preventDefault();
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}, true);
|
|
1370
|
+
editor.on('keyup', function (e) {
|
|
1371
|
+
if (checkKeyCode(keyCodes, e)) {
|
|
1372
|
+
handleInlineKey(editor, patternsState.get());
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
editor.on('keypress', function (e) {
|
|
1376
|
+
if (checkCharCode(charCodes, e)) {
|
|
1377
|
+
global$1.setEditorTimeout(editor, function () {
|
|
1378
|
+
handleInlineKey(editor, patternsState.get());
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
});
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
function Plugin () {
|
|
1385
|
+
global.add('textpattern', function (editor) {
|
|
1386
|
+
var patternsState = Cell(getPatternSet(editor));
|
|
1387
|
+
setup(editor, patternsState);
|
|
1388
|
+
return get$1(patternsState);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
Plugin();
|
|
1393
|
+
|
|
1394
|
+
}());
|