@zohodesk/dot 1.0.0-temp-198.3.3 → 1.0.0-temp-187.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cli/UnValidatedFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +28 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +1 -0
- package/es/ActionButton/ActionButton.module.css +192 -192
- package/es/AlphabeticList/AlphabeticList.module.css +57 -57
- package/es/AttachmentViewer/AttachmentImage.js +68 -32
- package/es/AttachmentViewer/AttachmentViewer.js +120 -41
- package/es/AttachmentViewer/AttachmentViewer.module.css +364 -352
- package/es/AttachmentViewer/__tests__/AttachmentImage.spec.js +63 -13
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
- package/es/AttachmentViewer/props/defaultProps.js +5 -1
- package/es/AttachmentViewer/props/propTypes.js +7 -3
- package/es/AttachmentViewer/utils.js +49 -0
- package/es/ChannelIcon/ChannelIcon.module.css +225 -225
- package/es/FormAction/FormAction.module.css +100 -100
- package/es/IconButton/IconButton.module.css +22 -22
- package/es/Image/Image.js +6 -2
- package/es/Image/props/propTypes.js +3 -1
- package/es/TagWithIcon/TagWithIcon.module.css +66 -66
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/es/common/dot_boxShadow.module.css +2 -0
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
- package/es/form/fields/TextEditor/TextEditor.js +64 -64
- package/es/form/fields/TextEditor/TextEditor.module.css +73 -61
- package/es/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
- package/es/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/es/form/fields/TextEditor/props/propTypes.js +10 -3
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/es/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/es/list/Comment/Comment.module.css +29 -29
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
- package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +2 -1
- package/es/list/Dot/Dot.module.css +15 -15
- package/es/list/ListLayout/ListLayout.module.css +79 -79
- package/es/list/Subject/Subject.module.css +34 -34
- package/es/list/Thread/Thread.module.css +42 -42
- package/es/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/es/utils/editorUtils.js +6 -6
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -23
- package/es/v1/AttachmentViewer/AttachmentViewer.js +120 -41
- package/es/v1/AttachmentViewer/props/propTypes.js +7 -3
- package/es/v1/Image/Image.js +6 -2
- package/es/v1/Image/props/propTypes.js +3 -1
- package/es/v1/form/fields/TextEditor/TextEditor.js +63 -64
- package/es/v1/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/es/v1/form/fields/TextEditor/props/propTypes.js +10 -3
- package/es/v1/utils/editorUtils.js +6 -6
- package/es/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/lib/ActionButton/ActionButton.module.css +192 -192
- package/lib/AlphabeticList/AlphabeticList.module.css +57 -57
- package/lib/AttachmentViewer/AttachmentImage.js +74 -36
- package/lib/AttachmentViewer/AttachmentViewer.js +151 -70
- package/lib/AttachmentViewer/AttachmentViewer.module.css +364 -352
- package/lib/AttachmentViewer/__tests__/AttachmentImage.spec.js +64 -13
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
- package/lib/AttachmentViewer/props/defaultProps.js +5 -1
- package/lib/AttachmentViewer/props/propTypes.js +7 -3
- package/lib/AttachmentViewer/utils.js +60 -1
- package/lib/ChannelIcon/ChannelIcon.module.css +225 -225
- package/lib/FormAction/FormAction.module.css +100 -100
- package/lib/IconButton/IconButton.module.css +22 -22
- package/lib/Image/Image.js +6 -2
- package/lib/Image/props/propTypes.js +3 -1
- package/lib/TagWithIcon/TagWithIcon.module.css +66 -66
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/lib/common/dot_boxShadow.module.css +2 -0
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
- package/lib/form/fields/TextEditor/TextEditor.js +74 -74
- package/lib/form/fields/TextEditor/TextEditor.module.css +73 -61
- package/lib/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
- package/lib/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/lib/form/fields/TextEditor/props/propTypes.js +10 -3
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/lib/list/Comment/Comment.module.css +29 -29
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
- package/lib/list/Dot/Dot.module.css +15 -15
- package/lib/list/ListLayout/ListLayout.module.css +79 -79
- package/lib/list/Subject/Subject.module.css +34 -34
- package/lib/list/Thread/Thread.module.css +42 -42
- package/lib/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/lib/utils/editorUtils.js +6 -5
- package/lib/v1/AttachmentViewer/AttachmentImage.js +52 -24
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +151 -70
- package/lib/v1/AttachmentViewer/props/propTypes.js +7 -3
- package/lib/v1/Image/Image.js +6 -2
- package/lib/v1/Image/props/propTypes.js +3 -1
- package/lib/v1/form/fields/TextEditor/TextEditor.js +73 -74
- package/lib/v1/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/lib/v1/form/fields/TextEditor/props/propTypes.js +10 -3
- package/lib/v1/utils/editorUtils.js +6 -5
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/package.json +3 -3
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- package/es/DotProvider/DotProvider.js +0 -60
- package/es/DotProvider/hooks/useDotProvider.js +0 -55
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +0 -97
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +0 -1
- package/es/DotProvider/props/defaultProps.js +0 -11
- package/es/DotProvider/props/propTypes.js +0 -16
- package/es/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +0 -4
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +0 -28
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +0 -29
- package/es/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +0 -4
- package/es/DotProvider/utils/constants.js +0 -14
- package/es/DotProvider/utils/errorValidation.js +0 -17
- package/es/DotProvider/utils/getAssetsImportPromises.js +0 -17
- package/es/DotProvider/utils/sizeAssetsConfig.js +0 -12
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +0 -47
- package/es/DotProvider/utils/themeColorAssetsConfig.js +0 -221
- package/lib/DotProvider/DotProvider.js +0 -88
- package/lib/DotProvider/hooks/useDotProvider.js +0 -83
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +0 -119
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +0 -3
- package/lib/DotProvider/props/defaultProps.js +0 -20
- package/lib/DotProvider/props/propTypes.js +0 -28
- package/lib/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +0 -12
- package/lib/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +0 -39
- package/lib/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +0 -40
- package/lib/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +0 -12
- package/lib/DotProvider/utils/constants.js +0 -34
- package/lib/DotProvider/utils/errorValidation.js +0 -25
- package/lib/DotProvider/utils/getAssetsImportPromises.js +0 -22
- package/lib/DotProvider/utils/sizeAssetsConfig.js +0 -31
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +0 -69
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +0 -249
|
@@ -25,7 +25,8 @@ export default class TextEditor extends Component {
|
|
|
25
25
|
isResourceLoaded: false,
|
|
26
26
|
isEditorShow: false
|
|
27
27
|
};
|
|
28
|
-
let methods = ['editorCallback', 'handleUpload', 'handleChange', 'focusCallback', 'handleInlineUpload', 'handleDropUpload',
|
|
28
|
+
let methods = ['editorCallback', 'handleUpload', 'handleChange', 'focusCallback', 'handleInlineUpload', // 'handleDropUpload',
|
|
29
|
+
'blurCallback', 'handleGetContent', 'initializeEditor', 'clearEditorData', 'plainTextSwitchCallback', 'onWindowClick', 'toggleEditor'];
|
|
29
30
|
bind.apply(this, methods);
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -53,12 +54,13 @@ export default class TextEditor extends Component {
|
|
|
53
54
|
editorMode = '',
|
|
54
55
|
editorOptions = {},
|
|
55
56
|
needEditorFocus = true,
|
|
56
|
-
handleDropUpload,
|
|
57
|
+
// handleDropUpload,
|
|
57
58
|
fontFamily,
|
|
58
59
|
fontSize,
|
|
59
60
|
initCallback,
|
|
60
61
|
handleAlertMessage,
|
|
61
|
-
needInlineAttachment
|
|
62
|
+
needInlineAttachment,
|
|
63
|
+
customInitOption
|
|
62
64
|
} = this.props;
|
|
63
65
|
|
|
64
66
|
if (id && global.ZohoDeskEditor) {
|
|
@@ -67,7 +69,7 @@ export default class TextEditor extends Component {
|
|
|
67
69
|
content: fixEncoding(value),
|
|
68
70
|
callback: this.editorCallback,
|
|
69
71
|
imageuploadcallback: this.handleInlineUpload,
|
|
70
|
-
handleInlineDropImage: handleDropUpload ? this.handleDropUpload : undefined,
|
|
72
|
+
// handleInlineDropImage: handleDropUpload ? this.handleDropUpload : undefined,
|
|
71
73
|
contentChanged: this.handleChange,
|
|
72
74
|
focusCallback: this.focusCallback,
|
|
73
75
|
lineHeight: 'Normal',
|
|
@@ -90,13 +92,17 @@ export default class TextEditor extends Component {
|
|
|
90
92
|
htmlVersion: '<!Doctype html>'
|
|
91
93
|
};
|
|
92
94
|
|
|
93
|
-
if (!
|
|
94
|
-
|
|
95
|
+
if (!customInitOption) {
|
|
96
|
+
if (!ZohoDeskEditor_Init.init) {
|
|
97
|
+
global.editorInitialize && global.editorInitialize();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
ZohoDeskEditor_Init.init(editorMode, fontFamily, initCallback, fontSize);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
defaultObj = Object.assign(defaultObj, editorOptions);
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
const globalEditor = global.ZohoDeskEditor;
|
|
105
|
+
globalEditor && typeof globalEditor.create == 'function' && globalEditor.create(defaultObj, customInitOption);
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
|
|
@@ -121,7 +127,7 @@ export default class TextEditor extends Component {
|
|
|
121
127
|
getRef && getRef(null);
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
|
|
130
|
+
UNSAFE_componentWillReceiveProps(np) {
|
|
125
131
|
let {
|
|
126
132
|
changeEditorContent
|
|
127
133
|
} = this.props;
|
|
@@ -203,7 +209,8 @@ export default class TextEditor extends Component {
|
|
|
203
209
|
let {
|
|
204
210
|
editorCallback,
|
|
205
211
|
getRef,
|
|
206
|
-
isCustomScroll
|
|
212
|
+
isCustomScroll,
|
|
213
|
+
customCSS
|
|
207
214
|
} = this.props;
|
|
208
215
|
this.setState({
|
|
209
216
|
isEditorLoad: true,
|
|
@@ -218,18 +225,6 @@ export default class TextEditor extends Component {
|
|
|
218
225
|
global.editor[id] = editorObj;
|
|
219
226
|
}
|
|
220
227
|
|
|
221
|
-
const css = 'pre {white-space: pre-wrap}',
|
|
222
|
-
head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
223
|
-
style = document.createElement('style');
|
|
224
|
-
style.type = 'text/css';
|
|
225
|
-
|
|
226
|
-
if (style.styleSheet) {
|
|
227
|
-
style.styleSheet.cssText = css;
|
|
228
|
-
} else {
|
|
229
|
-
style.appendChild(editorObj.doc.createTextNode(css));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
head.appendChild(style);
|
|
233
228
|
editorCallback && editorCallback(editorObj);
|
|
234
229
|
const iframe = selectn('iframe.contentDocument.body', editorObj) || null;
|
|
235
230
|
const iframeHead = selectn('iframe.contentDocument.head', editorObj) || null;
|
|
@@ -245,9 +240,12 @@ export default class TextEditor extends Component {
|
|
|
245
240
|
iframe.classList.add('scroll');
|
|
246
241
|
}
|
|
247
242
|
|
|
248
|
-
let
|
|
249
|
-
|
|
250
|
-
|
|
243
|
+
let customStyleTag = document.createElement('style');
|
|
244
|
+
customStyleTag.type = 'text/css';
|
|
245
|
+
const customizedCSS = `pre {white-space: pre-wrap} ${customCSS}`;
|
|
246
|
+
const fontCSS = `@font-face {font-family: 'ZohoPuviRegular';src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2') format('woff2');font-style: normal;font-weight: normal;text-rendering: optimizeLegibility;font-display: swap}@font-face {font-family: Regular;src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');font-weight: 400;font-style: normal;font-display: swap}@font-face {font-family: 'RobotoRegular';font-weight: 400;font-style: normal;font-display: swa;src: url('https://static.zohocdn.com/webfonts/robotoregular/font.woff2')}`;
|
|
247
|
+
customStyleTag.textContent = `${customizedCSS} ${fontCSS}`;
|
|
248
|
+
iframeHead.appendChild(customStyleTag);
|
|
251
249
|
}
|
|
252
250
|
}
|
|
253
251
|
|
|
@@ -255,13 +253,26 @@ export default class TextEditor extends Component {
|
|
|
255
253
|
let {
|
|
256
254
|
id,
|
|
257
255
|
setInlineAttachmentInProgress: progress,
|
|
258
|
-
i18nKeys
|
|
256
|
+
i18nKeys,
|
|
257
|
+
inlineImageProps
|
|
259
258
|
} = this.props;
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
const {
|
|
260
|
+
fileUploadError,
|
|
261
|
+
fileNotSupported,
|
|
262
|
+
fileSizeLimitExceed,
|
|
263
|
+
fileEmptyError,
|
|
264
|
+
fileNameLimitExceed
|
|
265
|
+
} = i18nKeys;
|
|
266
|
+
const {
|
|
267
|
+
allowedFileExtensions = ["jpeg", "jpg", "png", "gif", "bmp", "ico"],
|
|
268
|
+
fileNameMaxCharacters = 200,
|
|
269
|
+
fileSizeMaxBytes = 3 * 1024 * 1024
|
|
270
|
+
} = inlineImageProps;
|
|
271
|
+
|
|
272
|
+
if (!isFileNameSizeInvalid(file.name, fileNameMaxCharacters)) {
|
|
262
273
|
if (file.size != 0) {
|
|
263
|
-
if (file.size <=
|
|
264
|
-
if (isImageFormat(file.name)) {
|
|
274
|
+
if (file.size <= fileSizeMaxBytes) {
|
|
275
|
+
if (isImageFormat(file.name, allowedFileExtensions)) {
|
|
265
276
|
progress && progress(true);
|
|
266
277
|
this.handleUpload(file).then(res => {
|
|
267
278
|
successCallback(res);
|
|
@@ -271,37 +282,33 @@ export default class TextEditor extends Component {
|
|
|
271
282
|
triggerKeyup(editorObj.doc);
|
|
272
283
|
}
|
|
273
284
|
}, () => {
|
|
274
|
-
failureCallback(
|
|
285
|
+
failureCallback(fileUploadError);
|
|
275
286
|
});
|
|
276
287
|
} else {
|
|
277
|
-
failureCallback(
|
|
288
|
+
failureCallback(fileNotSupported);
|
|
278
289
|
}
|
|
279
290
|
} else {
|
|
280
|
-
failureCallback(
|
|
291
|
+
failureCallback(fileSizeLimitExceed);
|
|
281
292
|
}
|
|
282
293
|
} else {
|
|
283
|
-
failureCallback(
|
|
294
|
+
failureCallback(fileEmptyError);
|
|
284
295
|
}
|
|
285
296
|
} else {
|
|
286
|
-
failureCallback(
|
|
297
|
+
failureCallback(fileNameLimitExceed);
|
|
287
298
|
}
|
|
288
|
-
}
|
|
299
|
+
} // handleDropUpload(file, successCallback, failureCallback) {
|
|
300
|
+
// let e = { target: { files: [file] } };
|
|
301
|
+
// let { handleDropUpload } = this.props;
|
|
302
|
+
// handleDropUpload(e).then(
|
|
303
|
+
// (res) => {
|
|
304
|
+
// successCallback(res);
|
|
305
|
+
// },
|
|
306
|
+
// () => {
|
|
307
|
+
// failureCallback();
|
|
308
|
+
// }
|
|
309
|
+
// );
|
|
310
|
+
// }
|
|
289
311
|
|
|
290
|
-
handleDropUpload(file, successCallback, failureCallback) {
|
|
291
|
-
let e = {
|
|
292
|
-
target: {
|
|
293
|
-
files: [file]
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
let {
|
|
297
|
-
handleDropUpload
|
|
298
|
-
} = this.props;
|
|
299
|
-
handleDropUpload(e).then(res => {
|
|
300
|
-
successCallback(res);
|
|
301
|
-
}, () => {
|
|
302
|
-
failureCallback();
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
312
|
|
|
306
313
|
blurCallback() {
|
|
307
314
|
let {
|
|
@@ -327,15 +334,7 @@ export default class TextEditor extends Component {
|
|
|
327
334
|
formData.append(getCSRFCookieName(), getCSRFCookie());
|
|
328
335
|
}
|
|
329
336
|
|
|
330
|
-
return onUpload(formData, file)
|
|
331
|
-
if (editorMode === 'TicketReply') {
|
|
332
|
-
return `${res.data}&from=r`;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return res.data;
|
|
336
|
-
}, err => {
|
|
337
|
-
throw err;
|
|
338
|
-
});
|
|
337
|
+
return onUpload(formData, file);
|
|
339
338
|
} catch (err) {
|
|
340
339
|
return Promise.reject();
|
|
341
340
|
}
|
|
@@ -383,7 +382,8 @@ export default class TextEditor extends Component {
|
|
|
383
382
|
loadingComponent,
|
|
384
383
|
isNightMode,
|
|
385
384
|
isReadOnly,
|
|
386
|
-
dataSelectorId
|
|
385
|
+
dataSelectorId,
|
|
386
|
+
isDisabled
|
|
387
387
|
} = this.props;
|
|
388
388
|
let {
|
|
389
389
|
isEditorLoad,
|
|
@@ -392,7 +392,7 @@ export default class TextEditor extends Component {
|
|
|
392
392
|
let editorDoc = ImgLazyLoad && global.editor && global.editor[id] ? global.editor[id].doc : null;
|
|
393
393
|
return /*#__PURE__*/React.createElement(Container, {
|
|
394
394
|
className: `${styles.textEditor} ${styles[type]} ${styles[border]}
|
|
395
|
-
${isNightMode ? styles.night : styles.light} ${isReadOnly ? styles.readOnly : ''} ${!isEditorShow ? styles.editorHide : ''}`,
|
|
395
|
+
${isNightMode ? styles.night : styles.light} ${isReadOnly ? styles.readOnly : ''} ${isDisabled ? styles.disable : ''} ${!isEditorShow ? styles.editorHide : ''}`,
|
|
396
396
|
dataId: dataId,
|
|
397
397
|
"data-isEditor": true,
|
|
398
398
|
dataSelectorId: dataSelectorId
|
|
@@ -402,8 +402,8 @@ export default class TextEditor extends Component {
|
|
|
402
402
|
dataId: dataId
|
|
403
403
|
}), editorDoc && ImgLazyLoad ? /*#__PURE__*/React.createElement(ImgLazyLoad, {
|
|
404
404
|
node: editorDoc
|
|
405
|
-
}) : null, isReadOnly ? /*#__PURE__*/React.createElement("div", {
|
|
406
|
-
|
|
405
|
+
}) : null, isReadOnly || isDisabled ? /*#__PURE__*/React.createElement("div", {
|
|
406
|
+
className: styles.readOnlyMask
|
|
407
407
|
}) : null);
|
|
408
408
|
}
|
|
409
409
|
|
|
@@ -77,20 +77,20 @@
|
|
|
77
77
|
background-color: transparent;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.small :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
81
|
-
.small :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
82
|
-
.medium :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
83
|
-
.medium :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
84
|
-
.large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
85
|
-
.large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
86
|
-
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
87
|
-
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
88
|
-
.default :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
89
|
-
.default :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
80
|
+
.small :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover,
|
|
81
|
+
.small :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel,
|
|
82
|
+
.medium :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover,
|
|
83
|
+
.medium :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel,
|
|
84
|
+
.large :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover,
|
|
85
|
+
.large :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel,
|
|
86
|
+
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover,
|
|
87
|
+
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel,
|
|
88
|
+
.default :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover,
|
|
89
|
+
.default :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel {
|
|
90
90
|
color: var(--zdt_texteditor_default_text);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.small :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
93
|
+
.small :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover, .small :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel, .medium :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover, .medium :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel, .large :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover, .large :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel, .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover, .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel, .default :global .KB_Editor_menus .KB_Editor_MultiTools>li:hover, .default :global .KB_Editor_menus .KB_Editor_MultiTools>li.KB_Editor_sel {
|
|
94
94
|
background-color: var(--zdt_texteditor_menu_li_bg);
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
/* large type editor - ticket add form editor */
|
|
102
102
|
.large :global .KB_Editor,
|
|
103
103
|
.large :global .KB_Editor_menus .KB_Editor_MultiTools,
|
|
104
|
-
.large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
104
|
+
.large :global .KB_Editor_menus .KB_Editor_MultiTools>li,
|
|
105
105
|
.default :global .KB_Editor,
|
|
106
106
|
.default :global .KB_Editor_menus .KB_Editor_MultiTools,
|
|
107
|
-
.default :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
107
|
+
.default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
108
108
|
display: -webkit-box;
|
|
109
109
|
display: -ms-flexbox;
|
|
110
110
|
display: flex;
|
|
@@ -160,24 +160,24 @@
|
|
|
160
160
|
min-height: inherit ;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
164
|
-
.default :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
163
|
+
.large :global .KB_Editor_menus .KB_Editor_MultiTools>li,
|
|
164
|
+
.default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
165
165
|
height: unset;
|
|
166
166
|
-webkit-box-align: center;
|
|
167
167
|
-ms-flex-align: center;
|
|
168
168
|
align-items: center;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
171
|
+
.large :global .KB_Editor_menus .KB_Editor_MultiTools>li, .default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
172
172
|
padding: 0 ;
|
|
173
173
|
float: unset;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
[dir=ltr] .large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
176
|
+
[dir=ltr] .large :global .KB_Editor_menus .KB_Editor_MultiTools>li, [dir=ltr] .default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
177
177
|
margin-right: 0 ;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
[dir=rtl] .large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
180
|
+
[dir=rtl] .large :global .KB_Editor_menus .KB_Editor_MultiTools>li, [dir=rtl] .default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
181
181
|
margin-left: 0 ;
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -190,14 +190,14 @@
|
|
|
190
190
|
float: unset !important;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.large :global .KB_Editor_menus
|
|
194
|
-
.default :global .KB_Editor_menus
|
|
193
|
+
.large :global .KB_Editor_menus>ul>li>span>svg,
|
|
194
|
+
.default :global .KB_Editor_menus>ul>li>span>svg {
|
|
195
195
|
width: var(--zd_size28) ;
|
|
196
196
|
height: var(--zd_size28) ;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
.large :global .KB_Editor_menus
|
|
200
|
-
.default :global .KB_Editor_menus
|
|
199
|
+
.large :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg,
|
|
200
|
+
.default :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg {
|
|
201
201
|
width: var(--zd_size8) ;
|
|
202
202
|
height: var(--zd_size8) ;
|
|
203
203
|
}
|
|
@@ -241,18 +241,18 @@
|
|
|
241
241
|
left: 0 ;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
[dir=ltr] .large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
244
|
+
[dir=ltr] .large :global .KB_Editor_menus .KB_Editor_MultiTools>li, [dir=ltr] .default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
245
245
|
margin-right: var(--zd_size2) ;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
[dir=rtl] .large :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
248
|
+
[dir=rtl] .large :global .KB_Editor_menus .KB_Editor_MultiTools>li, [dir=rtl] .default :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
249
249
|
margin-left: var(--zd_size2) ;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
/* xlarge type editor - reply area, blue print cases - full height hover style */
|
|
253
253
|
.xlarge :global .KB_Editor,
|
|
254
254
|
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools,
|
|
255
|
-
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
255
|
+
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
256
256
|
display: -webkit-box;
|
|
257
257
|
display: -ms-flexbox;
|
|
258
258
|
display: flex;
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
min-height: inherit ;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
296
|
+
.xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
297
297
|
height: unset;
|
|
298
298
|
-webkit-box-align: center;
|
|
299
299
|
-ms-flex-align: center;
|
|
@@ -302,11 +302,11 @@
|
|
|
302
302
|
float: unset;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
[dir=ltr] .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
305
|
+
[dir=ltr] .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
306
306
|
margin-right: 0 ;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
[dir=rtl] .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
309
|
+
[dir=rtl] .xlarge :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
310
310
|
margin-left: 0 ;
|
|
311
311
|
}
|
|
312
312
|
|
|
@@ -324,12 +324,12 @@
|
|
|
324
324
|
padding: var(--zd_size6) ;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
.xlarge :global .KB_Editor_menus
|
|
327
|
+
.xlarge :global .KB_Editor_menus>ul>li>span>svg {
|
|
328
328
|
width: var(--zd_size22) ;
|
|
329
329
|
height: var(--zd_size22) ;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
.xlarge :global .KB_Editor_menus
|
|
332
|
+
.xlarge :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg {
|
|
333
333
|
width: var(--zd_size8) ;
|
|
334
334
|
height: var(--zd_size8) ;
|
|
335
335
|
}
|
|
@@ -354,13 +354,13 @@
|
|
|
354
354
|
left: 0 ;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
.xlarge :global .KB_Editor_menus
|
|
357
|
+
.xlarge :global .KB_Editor_menus>ul>li>span.SnippetIcon svg {
|
|
358
358
|
width: var(--zd_size17) ;
|
|
359
359
|
height: var(--zd_size21) ;
|
|
360
360
|
padding: 0 var(--zd_size7) ;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
.xlarge :global .KB_Editor_menus
|
|
363
|
+
.xlarge :global .KB_Editor_menus>ul>li>span.TemplateIcon svg {
|
|
364
364
|
width: var(--zd_size16) ;
|
|
365
365
|
height: var(--zd_size16) ;
|
|
366
366
|
padding: 0 var(--zd_size9) ;
|
|
@@ -393,31 +393,16 @@
|
|
|
393
393
|
padding: 0 var(--zd_size7) ;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
.xlarge :global .KB_Editor_MultiTools li .Kbeditor_more_icon
|
|
396
|
+
.xlarge :global .KB_Editor_MultiTools li .Kbeditor_more_icon>svg {
|
|
397
397
|
width: var(--zd_size12) ;
|
|
398
398
|
height: var(--zd_size12) ;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
.xlarge
|
|
402
|
-
:global
|
|
403
|
-
.KB_Editor_menus
|
|
404
|
-
> ul
|
|
405
|
-
> li
|
|
406
|
-
> span:not(.KB_Editor_Bdr_div):not(.KBEditortools-Block-down-arrow):not(.Kbeditor_more_icon):not(.SnippetIcon):not(
|
|
407
|
-
.TemplateIcon
|
|
408
|
-
):not(.KB_Editor_Richtext):not(.KB_Editor_PlainText) {
|
|
401
|
+
.xlarge :global .KB_Editor_menus>ul>li>span:not(.KB_Editor_Bdr_div):not(.KBEditortools-Block-down-arrow):not(.Kbeditor_more_icon):not(.SnippetIcon):not(.TemplateIcon):not(.KB_Editor_Richtext):not(.KB_Editor_PlainText) {
|
|
409
402
|
height: var(--zd_size21) ;
|
|
410
403
|
}
|
|
411
404
|
|
|
412
|
-
.xlarge
|
|
413
|
-
:global
|
|
414
|
-
.KB_Editor_menus
|
|
415
|
-
> ul
|
|
416
|
-
> li
|
|
417
|
-
> span:not(.KB_Editor_Bdr_div):not(.KBEditortools-Block-down-arrow):not(.Kbeditor_more_icon):not(.SnippetIcon):not(
|
|
418
|
-
.TemplateIcon
|
|
419
|
-
)
|
|
420
|
-
> svg {
|
|
405
|
+
.xlarge :global .KB_Editor_menus>ul>li>span:not(.KB_Editor_Bdr_div):not(.KBEditortools-Block-down-arrow):not(.Kbeditor_more_icon):not(.SnippetIcon):not(.TemplateIcon)>svg {
|
|
421
406
|
width: var(--zd_size21) ;
|
|
422
407
|
height: var(--zd_size21) ;
|
|
423
408
|
padding: 0 var(--zd_size4) ;
|
|
@@ -442,7 +427,7 @@
|
|
|
442
427
|
/* medium type editor - snippet, bug tracker cases */
|
|
443
428
|
.medium :global .KB_Editor,
|
|
444
429
|
.medium :global .KB_Editor_menus .KB_Editor_MultiTools,
|
|
445
|
-
.medium :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
430
|
+
.medium :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
446
431
|
display: -webkit-box;
|
|
447
432
|
display: -ms-flexbox;
|
|
448
433
|
display: flex;
|
|
@@ -483,7 +468,7 @@
|
|
|
483
468
|
min-height: inherit ;
|
|
484
469
|
}
|
|
485
470
|
|
|
486
|
-
.medium :global .KB_Editor_menus .KB_Editor_MultiTools
|
|
471
|
+
.medium :global .KB_Editor_menus .KB_Editor_MultiTools>li {
|
|
487
472
|
height: unset;
|
|
488
473
|
-webkit-box-align: center;
|
|
489
474
|
-ms-flex-align: center;
|
|
@@ -496,21 +481,21 @@
|
|
|
496
481
|
line-height: 0;
|
|
497
482
|
}
|
|
498
483
|
|
|
499
|
-
.medium :global .KB_Editor_menus
|
|
484
|
+
.medium :global .KB_Editor_menus>ul>li>span>svg {
|
|
500
485
|
width: var(--zd_size22) ;
|
|
501
486
|
height: var(--zd_size22) ;
|
|
502
487
|
}
|
|
503
488
|
|
|
504
|
-
.medium :global .KB_Editor_menus
|
|
489
|
+
.medium :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg {
|
|
505
490
|
width: var(--zd_size8) ;
|
|
506
491
|
height: var(--zd_size8) ;
|
|
507
492
|
}
|
|
508
493
|
|
|
509
|
-
[dir=ltr] .medium :global .KB_Editor_menus
|
|
494
|
+
[dir=ltr] .medium :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg {
|
|
510
495
|
padding: 0 0 0 var(--zd_size2) ;
|
|
511
496
|
}
|
|
512
497
|
|
|
513
|
-
[dir=rtl] .medium :global .KB_Editor_menus
|
|
498
|
+
[dir=rtl] .medium :global .KB_Editor_menus>ul>li>span.KB_Editor_Bdr_div>svg {
|
|
514
499
|
padding: 0 var(--zd_size2) 0 0 ;
|
|
515
500
|
}
|
|
516
501
|
|
|
@@ -547,7 +532,7 @@
|
|
|
547
532
|
padding: 0 var(--zd_size3) ;
|
|
548
533
|
}
|
|
549
534
|
|
|
550
|
-
.medium :global .KB_Editor_MultiTools li .Kbeditor_more_icon
|
|
535
|
+
.medium :global .KB_Editor_MultiTools li .Kbeditor_more_icon>svg {
|
|
551
536
|
width: var(--zd_size12) ;
|
|
552
537
|
height: var(--zd_size12) ;
|
|
553
538
|
}
|
|
@@ -627,13 +612,13 @@
|
|
|
627
612
|
line-height: 0;
|
|
628
613
|
}
|
|
629
614
|
|
|
630
|
-
.small :global .KB_Editor_menus
|
|
631
|
-
.mini :global .KB_Editor_menus
|
|
615
|
+
.small :global .KB_Editor_menus>ul>li>span>svg,
|
|
616
|
+
.mini :global .KB_Editor_menus>ul>li>span>svg {
|
|
632
617
|
width: var(--zd_size25) ;
|
|
633
618
|
height: var(--zd_size25) ;
|
|
634
619
|
}
|
|
635
620
|
|
|
636
|
-
.small :global .KB_Editor_menus
|
|
621
|
+
.small :global .KB_Editor_menus>ul>li>span>svg, .mini :global .KB_Editor_menus>ul>li>span>svg {
|
|
637
622
|
padding: 0 var(--zd_size6) ;
|
|
638
623
|
}
|
|
639
624
|
|
|
@@ -745,8 +730,12 @@
|
|
|
745
730
|
order: 100;
|
|
746
731
|
}
|
|
747
732
|
|
|
733
|
+
.disable,
|
|
748
734
|
.readOnly {
|
|
749
735
|
position: relative;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.disable, .readOnly {
|
|
750
739
|
cursor: not-allowed;
|
|
751
740
|
}
|
|
752
741
|
|
|
@@ -770,6 +759,29 @@
|
|
|
770
759
|
display: none !important;
|
|
771
760
|
}
|
|
772
761
|
|
|
762
|
+
.disable :global .KB_Editor_menus {
|
|
763
|
+
position: relative;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.disable :global .KB_Editor_menus::after {
|
|
767
|
+
content: '';
|
|
768
|
+
position: absolute;
|
|
769
|
+
top: 0 ;
|
|
770
|
+
bottom: 0 ;
|
|
771
|
+
z-index: 1;
|
|
772
|
+
cursor: not-allowed;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
[dir=ltr] .disable :global .KB_Editor_menus::after {
|
|
776
|
+
left: 0 ;
|
|
777
|
+
right: 0 ;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
[dir=rtl] .disable :global .KB_Editor_menus::after {
|
|
781
|
+
right: 0 ;
|
|
782
|
+
left: 0 ;
|
|
783
|
+
}
|
|
784
|
+
|
|
773
785
|
.editorHide :global .KB_Editor {
|
|
774
786
|
position: absolute !important;
|
|
775
787
|
top: 0 ;
|
|
@@ -784,4 +796,4 @@
|
|
|
784
796
|
|
|
785
797
|
[dir=rtl] .editorHide :global .KB_Editor {
|
|
786
798
|
right: 0 ;
|
|
787
|
-
}
|
|
799
|
+
}
|
|
@@ -4,7 +4,7 @@ exports[`TextEditor rendering the defult props 1`] = `
|
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="textEditor large borderTop
|
|
7
|
-
light
|
|
7
|
+
light editorHide flex cover coldir"
|
|
8
8
|
data-id="containerComponent"
|
|
9
9
|
data-iseditor="true"
|
|
10
10
|
data-selector-id="textEditor"
|
|
@@ -12,7 +12,6 @@ export const propTypes = {
|
|
|
12
12
|
fontSize: PropTypes.string,
|
|
13
13
|
getRef: PropTypes.func,
|
|
14
14
|
handleAlertMessage: PropTypes.func,
|
|
15
|
-
handleDropUpload: PropTypes.func,
|
|
16
15
|
i18nKeys: PropTypes.shape({
|
|
17
16
|
fileUploadError: PropTypes.string,
|
|
18
17
|
fileNotSupported: PropTypes.string,
|
|
@@ -21,7 +20,7 @@ export const propTypes = {
|
|
|
21
20
|
fileSizeLimitExceed: PropTypes.string
|
|
22
21
|
}),
|
|
23
22
|
id: PropTypes.string,
|
|
24
|
-
initCallback: PropTypes.func
|
|
23
|
+
initCallback: PropTypes.func,
|
|
25
24
|
isCustomScroll: PropTypes.bool,
|
|
26
25
|
loadingComponent: PropTypes.node,
|
|
27
26
|
mode: PropTypes.string,
|
|
@@ -42,5 +41,13 @@ export const propTypes = {
|
|
|
42
41
|
getCSRFCookie: PropTypes.string,
|
|
43
42
|
isEditorDefaultOpen: PropTypes.bool,
|
|
44
43
|
toggleEdit: PropTypes.func,
|
|
45
|
-
dataSelectorId: PropTypes.string
|
|
44
|
+
dataSelectorId: PropTypes.string,
|
|
45
|
+
customInitOption: PropTypes.object,
|
|
46
|
+
customCSS: PropTypes.string,
|
|
47
|
+
isDisabled: PropTypes.bool,
|
|
48
|
+
inlineImageProps: PropTypes.shape({
|
|
49
|
+
allowedFileExtensions: PropTypes.array,
|
|
50
|
+
fileNameMaxCharacters: PropTypes.number,
|
|
51
|
+
fileSizeMaxBytes: PropTypes.number
|
|
52
|
+
})
|
|
46
53
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
.basic{
|
|
2
|
-
font-size: 0 ;
|
|
3
|
-
}
|
|
4
|
-
.lable{
|
|
5
|
-
display: inline;
|
|
6
|
-
}
|
|
7
|
-
.icon{
|
|
8
|
-
color:var(--label_text_color);
|
|
9
|
-
display: inline-block;
|
|
10
|
-
margin: 0 var(--zd_size5) ;
|
|
11
|
-
}
|
|
12
|
-
.primary {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 100% ;
|
|
15
|
-
composes:basic;
|
|
16
|
-
margin-top: var(--zd_size5) ;
|
|
17
|
-
}
|
|
18
|
-
[dir=ltr] .primary {
|
|
19
|
-
left: 0 ;
|
|
20
|
-
}
|
|
21
|
-
[dir=rtl] .primary {
|
|
22
|
-
right: 0 ;
|
|
23
|
-
}
|
|
24
|
-
.secondary {
|
|
25
|
-
composes:basic;
|
|
26
|
-
margin-top: var(--zd_size5) ;
|
|
27
|
-
}
|
|
1
|
+
.basic{
|
|
2
|
+
font-size: 0 ;
|
|
3
|
+
}
|
|
4
|
+
.lable{
|
|
5
|
+
display: inline;
|
|
6
|
+
}
|
|
7
|
+
.icon{
|
|
8
|
+
color:var(--label_text_color);
|
|
9
|
+
display: inline-block;
|
|
10
|
+
margin: 0 var(--zd_size5) ;
|
|
11
|
+
}
|
|
12
|
+
.primary {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 100% ;
|
|
15
|
+
composes:basic;
|
|
16
|
+
margin-top: var(--zd_size5) ;
|
|
17
|
+
}
|
|
18
|
+
[dir=ltr] .primary {
|
|
19
|
+
left: 0 ;
|
|
20
|
+
}
|
|
21
|
+
[dir=rtl] .primary {
|
|
22
|
+
right: 0 ;
|
|
23
|
+
}
|
|
24
|
+
.secondary {
|
|
25
|
+
composes:basic;
|
|
26
|
+
margin-top: var(--zd_size5) ;
|
|
27
|
+
}
|