pds-dev-kit-web-test 2.5.627 → 2.5.628
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/dist/src/common/services/i18n/resources/en.json +14 -14
- package/dist/src/common/styles/theme.d.ts +0 -1
- package/dist/src/common/styles/theme.js +1 -1
- package/dist/src/core/pricing/translator.js +7 -8
- package/dist/src/core/pricing/types.js +1 -1
- package/dist/src/desktop/components/BoxItem/BoxItem.js +1 -1
- package/dist/src/desktop/components/Calendar/Calendar.js +46 -51
- package/dist/src/desktop/components/Calendar/CalendarContext.d.ts +3 -1
- package/dist/src/desktop/components/Calendar/CalendarContext.js +2 -1
- package/dist/src/desktop/components/Calendar/DailyView.d.ts +8 -2
- package/dist/src/desktop/components/Calendar/DailyView.js +88 -7
- package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +2 -1
- package/dist/src/desktop/components/Calendar/MonthlyView.js +81 -6
- package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +3 -0
- package/dist/src/desktop/components/Calendar/WeeklyView.js +113 -7
- package/dist/src/desktop/components/Calendar/calendarUtils.js +20 -10
- package/dist/src/desktop/components/Calendar/types.d.ts +8 -4
- package/dist/src/desktop/components/TextButton/TextButton.d.ts +2 -5
- package/dist/src/desktop/components/TextButton/TextButton.js +4 -14
- package/dist/src/desktop/components/index.d.ts +1 -2
- package/dist/src/desktop/components/index.js +2 -4
- package/dist/src/desktop/index.d.ts +1 -1
- package/dist/src/desktop/index.js +2 -3
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFA.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFB.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFE.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFL.js +5 -8
- package/dist/src/mobile/components/BoxItem/BoxItem.js +1 -1
- package/dist/src/mobile/components/TextButton/TextButton.d.ts +2 -5
- package/dist/src/mobile/components/TextButton/TextButton.js +4 -14
- package/dist/src/mobile/components/index.d.ts +1 -2
- package/dist/src/mobile/components/index.js +1 -3
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +1 -2
- package/package.json +2 -7
- package/release-note.md +2 -2
- package/dist/scripts/copy-tinymce.d.ts +0 -1
- package/dist/scripts/copy-tinymce.js +0 -32
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.d.ts +0 -34
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.js +0 -268
- package/dist/src/desktop/components/RichTextEditor/index.d.ts +0 -2
- package/dist/src/desktop/components/RichTextEditor/index.js +0 -8
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.d.ts +0 -34
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.js +0 -272
- package/dist/src/mobile/components/RichTextEditor/index.d.ts +0 -2
- package/dist/src/mobile/components/RichTextEditor/index.js +0 -8
- package/dist/tinymce/CHANGELOG.md +0 -3453
- package/dist/tinymce/README.md +0 -73
- package/dist/tinymce/bower.json +0 -27
- package/dist/tinymce/composer.json +0 -52
- package/dist/tinymce/icons/default/icons.js +0 -194
- package/dist/tinymce/icons/default/icons.min.js +0 -1
- package/dist/tinymce/icons/default/index.js +0 -7
- package/dist/tinymce/license.txt +0 -21
- package/dist/tinymce/models/dom/index.js +0 -7
- package/dist/tinymce/models/dom/model.js +0 -8040
- package/dist/tinymce/models/dom/model.min.js +0 -1
- package/dist/tinymce/notices.txt +0 -21
- package/dist/tinymce/package.json +0 -32
- package/dist/tinymce/plugins/accordion/index.js +0 -7
- package/dist/tinymce/plugins/accordion/plugin.js +0 -1054
- package/dist/tinymce/plugins/accordion/plugin.min.js +0 -5
- package/dist/tinymce/plugins/advlist/index.js +0 -7
- package/dist/tinymce/plugins/advlist/plugin.js +0 -259
- package/dist/tinymce/plugins/advlist/plugin.min.js +0 -5
- package/dist/tinymce/plugins/anchor/index.js +0 -7
- package/dist/tinymce/plugins/anchor/plugin.js +0 -214
- package/dist/tinymce/plugins/anchor/plugin.min.js +0 -5
- package/dist/tinymce/plugins/autolink/index.js +0 -7
- package/dist/tinymce/plugins/autolink/plugin.js +0 -228
- package/dist/tinymce/plugins/autolink/plugin.min.js +0 -5
- package/dist/tinymce/plugins/autoresize/index.js +0 -7
- package/dist/tinymce/plugins/autoresize/plugin.js +0 -192
- package/dist/tinymce/plugins/autoresize/plugin.min.js +0 -5
- package/dist/tinymce/plugins/autosave/index.js +0 -7
- package/dist/tinymce/plugins/autosave/plugin.js +0 -233
- package/dist/tinymce/plugins/autosave/plugin.min.js +0 -5
- package/dist/tinymce/plugins/charmap/index.js +0 -7
- package/dist/tinymce/plugins/charmap/plugin.js +0 -1658
- package/dist/tinymce/plugins/charmap/plugin.min.js +0 -5
- package/dist/tinymce/plugins/code/index.js +0 -7
- package/dist/tinymce/plugins/code/plugin.js +0 -85
- package/dist/tinymce/plugins/code/plugin.min.js +0 -5
- package/dist/tinymce/plugins/codesample/index.js +0 -7
- package/dist/tinymce/plugins/codesample/plugin.js +0 -2471
- package/dist/tinymce/plugins/codesample/plugin.min.js +0 -13
- package/dist/tinymce/plugins/directionality/index.js +0 -7
- package/dist/tinymce/plugins/directionality/plugin.js +0 -395
- package/dist/tinymce/plugins/directionality/plugin.min.js +0 -5
- package/dist/tinymce/plugins/emoticons/index.js +0 -7
- package/dist/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
- package/dist/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -1
- package/dist/tinymce/plugins/emoticons/js/emojis.js +0 -1
- package/dist/tinymce/plugins/emoticons/js/emojis.min.js +0 -1
- package/dist/tinymce/plugins/emoticons/plugin.js +0 -595
- package/dist/tinymce/plugins/emoticons/plugin.min.js +0 -5
- package/dist/tinymce/plugins/fullscreen/index.js +0 -7
- package/dist/tinymce/plugins/fullscreen/plugin.js +0 -1249
- package/dist/tinymce/plugins/fullscreen/plugin.min.js +0 -5
- package/dist/tinymce/plugins/help/index.js +0 -7
- package/dist/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/da.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/de.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/el.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/en.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/es.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/id.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/it.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -90
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -84
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -90
- package/dist/tinymce/plugins/help/plugin.js +0 -898
- package/dist/tinymce/plugins/help/plugin.min.js +0 -5
- package/dist/tinymce/plugins/image/index.js +0 -7
- package/dist/tinymce/plugins/image/plugin.js +0 -1505
- package/dist/tinymce/plugins/image/plugin.min.js +0 -5
- package/dist/tinymce/plugins/importcss/index.js +0 -7
- package/dist/tinymce/plugins/importcss/plugin.js +0 -344
- package/dist/tinymce/plugins/importcss/plugin.min.js +0 -5
- package/dist/tinymce/plugins/insertdatetime/index.js +0 -7
- package/dist/tinymce/plugins/insertdatetime/plugin.js +0 -187
- package/dist/tinymce/plugins/insertdatetime/plugin.min.js +0 -5
- package/dist/tinymce/plugins/link/index.js +0 -7
- package/dist/tinymce/plugins/link/plugin.js +0 -1242
- package/dist/tinymce/plugins/link/plugin.min.js +0 -5
- package/dist/tinymce/plugins/lists/index.js +0 -7
- package/dist/tinymce/plugins/lists/plugin.js +0 -2172
- package/dist/tinymce/plugins/lists/plugin.min.js +0 -5
- package/dist/tinymce/plugins/media/index.js +0 -7
- package/dist/tinymce/plugins/media/plugin.js +0 -1217
- package/dist/tinymce/plugins/media/plugin.min.js +0 -5
- package/dist/tinymce/plugins/nonbreaking/index.js +0 -7
- package/dist/tinymce/plugins/nonbreaking/plugin.js +0 -123
- package/dist/tinymce/plugins/nonbreaking/plugin.min.js +0 -5
- package/dist/tinymce/plugins/pagebreak/index.js +0 -7
- package/dist/tinymce/plugins/pagebreak/plugin.js +0 -117
- package/dist/tinymce/plugins/pagebreak/plugin.min.js +0 -5
- package/dist/tinymce/plugins/preview/index.js +0 -7
- package/dist/tinymce/plugins/preview/plugin.js +0 -97
- package/dist/tinymce/plugins/preview/plugin.min.js +0 -5
- package/dist/tinymce/plugins/quickbars/index.js +0 -7
- package/dist/tinymce/plugins/quickbars/plugin.js +0 -447
- package/dist/tinymce/plugins/quickbars/plugin.min.js +0 -5
- package/dist/tinymce/plugins/save/index.js +0 -7
- package/dist/tinymce/plugins/save/plugin.js +0 -118
- package/dist/tinymce/plugins/save/plugin.min.js +0 -5
- package/dist/tinymce/plugins/searchreplace/index.js +0 -7
- package/dist/tinymce/plugins/searchreplace/plugin.js +0 -1093
- package/dist/tinymce/plugins/searchreplace/plugin.min.js +0 -5
- package/dist/tinymce/plugins/table/index.js +0 -7
- package/dist/tinymce/plugins/table/plugin.js +0 -3462
- package/dist/tinymce/plugins/table/plugin.min.js +0 -5
- package/dist/tinymce/plugins/template/index.js +0 -7
- package/dist/tinymce/plugins/template/plugin.js +0 -567
- package/dist/tinymce/plugins/template/plugin.min.js +0 -5
- package/dist/tinymce/plugins/visualblocks/index.js +0 -7
- package/dist/tinymce/plugins/visualblocks/plugin.js +0 -98
- package/dist/tinymce/plugins/visualblocks/plugin.min.js +0 -5
- package/dist/tinymce/plugins/visualchars/index.js +0 -7
- package/dist/tinymce/plugins/visualchars/plugin.js +0 -560
- package/dist/tinymce/plugins/visualchars/plugin.min.js +0 -5
- package/dist/tinymce/plugins/wordcount/index.js +0 -7
- package/dist/tinymce/plugins/wordcount/plugin.js +0 -405
- package/dist/tinymce/plugins/wordcount/plugin.min.js +0 -5
- package/dist/tinymce/skins/content/dark/content.css +0 -79
- package/dist/tinymce/skins/content/dark/content.js +0 -15
- package/dist/tinymce/skins/content/dark/content.min.css +0 -14
- package/dist/tinymce/skins/content/default/content.css +0 -74
- package/dist/tinymce/skins/content/default/content.js +0 -15
- package/dist/tinymce/skins/content/default/content.min.css +0 -14
- package/dist/tinymce/skins/content/document/content.css +0 -79
- package/dist/tinymce/skins/content/document/content.js +0 -15
- package/dist/tinymce/skins/content/document/content.min.css +0 -14
- package/dist/tinymce/skins/content/tinymce-5/content.css +0 -74
- package/dist/tinymce/skins/content/tinymce-5/content.js +0 -15
- package/dist/tinymce/skins/content/tinymce-5/content.min.css +0 -14
- package/dist/tinymce/skins/content/tinymce-5-dark/content.css +0 -79
- package/dist/tinymce/skins/content/tinymce-5-dark/content.js +0 -15
- package/dist/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -14
- package/dist/tinymce/skins/content/writer/content.css +0 -75
- package/dist/tinymce/skins/content/writer/content.js +0 -15
- package/dist/tinymce/skins/content/writer/content.min.css +0 -14
- package/dist/tinymce/skins/ui/oxide/content.css +0 -798
- package/dist/tinymce/skins/ui/oxide/content.inline.css +0 -792
- package/dist/tinymce/skins/ui/oxide/content.inline.js +0 -15
- package/dist/tinymce/skins/ui/oxide/content.inline.min.css +0 -14
- package/dist/tinymce/skins/ui/oxide/content.js +0 -15
- package/dist/tinymce/skins/ui/oxide/content.min.css +0 -14
- package/dist/tinymce/skins/ui/oxide/skin.css +0 -3763
- package/dist/tinymce/skins/ui/oxide/skin.js +0 -2
- package/dist/tinymce/skins/ui/oxide/skin.min.css +0 -1
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -2
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
- package/dist/tinymce/skins/ui/oxide-dark/content.css +0 -779
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.css +0 -792
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.js +0 -15
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -14
- package/dist/tinymce/skins/ui/oxide-dark/content.js +0 -15
- package/dist/tinymce/skins/ui/oxide-dark/content.min.css +0 -14
- package/dist/tinymce/skins/ui/oxide-dark/skin.css +0 -3766
- package/dist/tinymce/skins/ui/oxide-dark/skin.js +0 -2
- package/dist/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -2
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
- package/dist/tinymce/skins/ui/tinymce-5/content.css +0 -798
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.css +0 -792
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.js +0 -15
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -14
- package/dist/tinymce/skins/ui/tinymce-5/content.js +0 -15
- package/dist/tinymce/skins/ui/tinymce-5/content.min.css +0 -14
- package/dist/tinymce/skins/ui/tinymce-5/skin.css +0 -3857
- package/dist/tinymce/skins/ui/tinymce-5/skin.js +0 -2
- package/dist/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -2
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.css +0 -779
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -792
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -15
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -14
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.js +0 -15
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -14
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -3857
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -2
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -2
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
- package/dist/tinymce/themes/silver/index.js +0 -7
- package/dist/tinymce/themes/silver/theme.js +0 -30775
- package/dist/tinymce/themes/silver/theme.min.js +0 -1
- package/dist/tinymce/tinymce.d.ts +0 -3238
- package/dist/tinymce/tinymce.js +0 -31779
- package/dist/tinymce/tinymce.min.js +0 -11
- package/scripts/copy-tinymce.js +0 -37
@@ -1,34 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export interface ImageUploadResult {
|
3
|
-
location?: string;
|
4
|
-
error?: unknown;
|
5
|
-
}
|
6
|
-
export type ImageUploadHandler = (file: File) => Promise<ImageUploadResult>;
|
7
|
-
/**
|
8
|
-
* NOTE
|
9
|
-
* toolbar에 사용하고싶은 옵션들을 배열 내부에 차례대로 작성해줍니다.
|
10
|
-
* toolbar 옵션은 아래 링크를 참고해주세요.
|
11
|
-
* https://www.tiny.cloud/docs/configure/editor-appearance/#toolbar
|
12
|
-
* ex) 'undo | redo' => ['undo', 'redo']
|
13
|
-
*/
|
14
|
-
export type RichTextEditorProps = {
|
15
|
-
toolbar: string[];
|
16
|
-
defaultText?: string;
|
17
|
-
hintText?: string;
|
18
|
-
required?: boolean;
|
19
|
-
maxLength?: number;
|
20
|
-
minLength?: number;
|
21
|
-
maxFileSize?: number;
|
22
|
-
lengthValidationText?: string;
|
23
|
-
requiredValidationText?: string;
|
24
|
-
fileSizeValidationText?: string;
|
25
|
-
height?: string | number;
|
26
|
-
tinymceScriptSrc?: string;
|
27
|
-
onChange?: (value: string) => void;
|
28
|
-
onBlur?: (value: string, count: number) => void;
|
29
|
-
onCountCharacter?: (count: number) => void;
|
30
|
-
onImageUpload?: ImageUploadHandler;
|
31
|
-
isLoadingUsed?: boolean;
|
32
|
-
};
|
33
|
-
declare function RichTextEditor({ toolbar, defaultText, hintText, maxLength, minLength, maxFileSize, required, lengthValidationText, requiredValidationText, fileSizeValidationText, height, tinymceScriptSrc, onChange, onBlur, onCountCharacter, onImageUpload, isLoadingUsed }: RichTextEditorProps): JSX.Element;
|
34
|
-
export default RichTextEditor;
|
@@ -1,272 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
4
|
-
return cooked;
|
5
|
-
};
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
7
|
-
if (k2 === undefined) k2 = k;
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
11
|
-
}
|
12
|
-
Object.defineProperty(o, k2, desc);
|
13
|
-
}) : (function(o, m, k, k2) {
|
14
|
-
if (k2 === undefined) k2 = k;
|
15
|
-
o[k2] = m[k];
|
16
|
-
}));
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
19
|
-
}) : function(o, v) {
|
20
|
-
o["default"] = v;
|
21
|
-
});
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
23
|
-
if (mod && mod.__esModule) return mod;
|
24
|
-
var result = {};
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
26
|
-
__setModuleDefault(result, mod);
|
27
|
-
return result;
|
28
|
-
};
|
29
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
30
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
31
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
32
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
33
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
34
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
35
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
36
|
-
});
|
37
|
-
};
|
38
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
39
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
40
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
41
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
42
|
-
function step(op) {
|
43
|
-
if (f) throw new TypeError("Generator is already executing.");
|
44
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
45
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
46
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
47
|
-
switch (op[0]) {
|
48
|
-
case 0: case 1: t = op; break;
|
49
|
-
case 4: _.label++; return { value: op[1], done: false };
|
50
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
51
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
52
|
-
default:
|
53
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
54
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
55
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
56
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
57
|
-
if (t[2]) _.ops.pop();
|
58
|
-
_.trys.pop(); continue;
|
59
|
-
}
|
60
|
-
op = body.call(thisArg, _);
|
61
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
62
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
63
|
-
}
|
64
|
-
};
|
65
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
66
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
67
|
-
/* eslint-disable prefer-promise-reject-errors */
|
68
|
-
var tinymce_react_1 = require("@tinymce/tinymce-react");
|
69
|
-
var react_1 = require("react");
|
70
|
-
var react_i18next_1 = require("react-i18next");
|
71
|
-
var uuid_1 = require("uuid");
|
72
|
-
var components_1 = require("../../../common/components");
|
73
|
-
var styled_components_1 = __importStar(require("styled-components"));
|
74
|
-
var MobileAlertDialog_1 = require("../MobileAlertDialog");
|
75
|
-
function RichTextEditor(_a) {
|
76
|
-
var _this = this;
|
77
|
-
var _b;
|
78
|
-
var toolbar = _a.toolbar, defaultText = _a.defaultText, hintText = _a.hintText, maxLength = _a.maxLength, minLength = _a.minLength, maxFileSize = _a.maxFileSize, required = _a.required, lengthValidationText = _a.lengthValidationText, requiredValidationText = _a.requiredValidationText, fileSizeValidationText = _a.fileSizeValidationText, _c = _a.height, height = _c === void 0 ? 600 : _c, _d = _a.tinymceScriptSrc, tinymceScriptSrc = _d === void 0 ? '/tinymce/tinymce.min.js' : _d, onChange = _a.onChange, onBlur = _a.onBlur, onCountCharacter = _a.onCountCharacter, onImageUpload = _a.onImageUpload, _e = _a.isLoadingUsed, isLoadingUsed = _e === void 0 ? true : _e;
|
79
|
-
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
80
|
-
var _f = (0, react_1.useState)(0), count = _f[0], setCount = _f[1];
|
81
|
-
var _g = (0, react_1.useState)(true), isEditorLoading = _g[0], setIsEditorLoading = _g[1];
|
82
|
-
var _h = (0, react_1.useState)(false), isFileValidationAlertDialogOpen = _h[0], setIsFilValidationAlertDialogOpen = _h[1];
|
83
|
-
var theme = (0, styled_components_1.useTheme)();
|
84
|
-
var useDarkMode = theme.mode === 'dark';
|
85
|
-
var editorRef = (0, react_1.useRef)(null);
|
86
|
-
var isEditorDirty = (0, react_1.useRef)(false);
|
87
|
-
var editorContent = (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.getContent();
|
88
|
-
var validationText = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
89
|
-
(0, react_1.useEffect)(function () {
|
90
|
-
if (defaultText && defaultText.length === 0) {
|
91
|
-
setCount(defaultText.length);
|
92
|
-
}
|
93
|
-
}, [defaultText]);
|
94
|
-
var handleInit = function (evt, editor) {
|
95
|
-
if (isLoadingUsed) {
|
96
|
-
setIsEditorLoading(false);
|
97
|
-
}
|
98
|
-
editorRef.current = editor;
|
99
|
-
var isSourceCodeToolActive = toolbar.some(function (group) {
|
100
|
-
var tools = group.split(' ');
|
101
|
-
return tools.includes('code');
|
102
|
-
});
|
103
|
-
if (isSourceCodeToolActive) {
|
104
|
-
var container = editor.getContainer();
|
105
|
-
var sourceCodeButton = container.querySelector('[aria-label="Source code"]');
|
106
|
-
if (sourceCodeButton instanceof HTMLElement) {
|
107
|
-
sourceCodeButton.style.width = 'fit-content';
|
108
|
-
sourceCodeButton.style.display = 'flex';
|
109
|
-
sourceCodeButton.style.alignItems = 'center';
|
110
|
-
var textElement = document.createElement('span');
|
111
|
-
textElement.innerHTML = 'HTML';
|
112
|
-
textElement.style.fontWeight = 'bold';
|
113
|
-
sourceCodeButton.append(textElement);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
};
|
117
|
-
var handleEditorValueChange = function (value, editor) {
|
118
|
-
var wordCount = editor.plugins.wordcount;
|
119
|
-
if (wordCount) {
|
120
|
-
var charCount = wordCount.body.getCharacterCount();
|
121
|
-
onCountCharacter === null || onCountCharacter === void 0 ? void 0 : onCountCharacter(charCount);
|
122
|
-
setCount(charCount);
|
123
|
-
}
|
124
|
-
isEditorDirty.current = true;
|
125
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
126
|
-
};
|
127
|
-
var handleEditorBlur = function () {
|
128
|
-
var _a, _b;
|
129
|
-
var editorContent = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getContent();
|
130
|
-
var wordCount = (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.plugins.wordcount;
|
131
|
-
if (editorContent && onBlur) {
|
132
|
-
onBlur(editorContent, (wordCount === null || wordCount === void 0 ? void 0 : wordCount.body.getCharacterCount()) || 0);
|
133
|
-
}
|
134
|
-
};
|
135
|
-
var handleFileChangeByFilePicker = function (cb) {
|
136
|
-
var input = document.createElement('input');
|
137
|
-
input.setAttribute('type', 'file');
|
138
|
-
input.setAttribute('accept', 'image/*');
|
139
|
-
input.addEventListener('change', function () { return __awaiter(_this, void 0, void 0, function () {
|
140
|
-
var file, result, error_1;
|
141
|
-
return __generator(this, function (_a) {
|
142
|
-
switch (_a.label) {
|
143
|
-
case 0:
|
144
|
-
file = input === null || input === void 0 ? void 0 : input.files[0];
|
145
|
-
if (!file)
|
146
|
-
return [2 /*return*/];
|
147
|
-
if (maxFileSize && file.size > maxFileSize * 1024 * 1024) {
|
148
|
-
setIsFilValidationAlertDialogOpen(true);
|
149
|
-
return [2 /*return*/];
|
150
|
-
}
|
151
|
-
if (!onImageUpload) return [3 /*break*/, 4];
|
152
|
-
_a.label = 1;
|
153
|
-
case 1:
|
154
|
-
_a.trys.push([1, 3, , 4]);
|
155
|
-
return [4 /*yield*/, onImageUpload(file)];
|
156
|
-
case 2:
|
157
|
-
result = _a.sent();
|
158
|
-
if (result.location) {
|
159
|
-
cb(result.location, { title: file.name, alt: 'image' });
|
160
|
-
}
|
161
|
-
return [3 /*break*/, 4];
|
162
|
-
case 3:
|
163
|
-
error_1 = _a.sent();
|
164
|
-
return [2 /*return*/, Promise.reject(new Error('Request failed'))];
|
165
|
-
case 4: return [2 /*return*/];
|
166
|
-
}
|
167
|
-
});
|
168
|
-
}); });
|
169
|
-
input.click();
|
170
|
-
};
|
171
|
-
var handleUploadImageByDragAndDrop = function (blobInfo) { return __awaiter(_this, void 0, void 0, function () {
|
172
|
-
var convertedFile, result, error_2;
|
173
|
-
return __generator(this, function (_a) {
|
174
|
-
switch (_a.label) {
|
175
|
-
case 0:
|
176
|
-
if (maxFileSize && blobInfo.blob().size > maxFileSize * 1024 * 1024) {
|
177
|
-
setIsFilValidationAlertDialogOpen(true);
|
178
|
-
return [2 /*return*/, Promise.reject({ remove: true })];
|
179
|
-
}
|
180
|
-
if (blobInfo.blobUri().startsWith('blob')) {
|
181
|
-
convertedFile = new File([blobInfo.blob()], (0, uuid_1.v4)());
|
182
|
-
}
|
183
|
-
if (!(convertedFile && onImageUpload)) return [3 /*break*/, 5];
|
184
|
-
_a.label = 1;
|
185
|
-
case 1:
|
186
|
-
_a.trys.push([1, 3, , 4]);
|
187
|
-
return [4 /*yield*/, onImageUpload(convertedFile)];
|
188
|
-
case 2:
|
189
|
-
result = _a.sent();
|
190
|
-
if (result.location) {
|
191
|
-
return [2 /*return*/, Promise.resolve(result.location)];
|
192
|
-
}
|
193
|
-
return [2 /*return*/, Promise.reject({ remove: true })];
|
194
|
-
case 3:
|
195
|
-
error_2 = _a.sent();
|
196
|
-
return [2 /*return*/, Promise.reject({ remove: true })];
|
197
|
-
case 4: return [3 /*break*/, 6];
|
198
|
-
case 5: return [2 /*return*/, Promise.reject({ remove: true })];
|
199
|
-
case 6: return [2 /*return*/];
|
200
|
-
}
|
201
|
-
});
|
202
|
-
}); };
|
203
|
-
if (required && isEditorDirty.current && (!editorContent || editorContent.length === 0)) {
|
204
|
-
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: requiredValidationText });
|
205
|
-
}
|
206
|
-
if (minLength && count > 0 && count < minLength) {
|
207
|
-
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
|
208
|
-
}
|
209
|
-
if (maxLength && count > 0 && count > maxLength) {
|
210
|
-
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
|
211
|
-
}
|
212
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(S_Editor, { children: [isEditorLoading && isLoadingUsed && ((0, jsx_runtime_1.jsx)(S_LoadingWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.CircularProgress, {}) })), (0, jsx_runtime_1.jsx)(tinymce_react_1.Editor, { tinymceScriptSrc: tinymceScriptSrc, onInit: handleInit, onEditorChange: handleEditorValueChange, initialValue: defaultText, init: {
|
213
|
-
images_max_width: '100%',
|
214
|
-
menubar: false,
|
215
|
-
promotion: false,
|
216
|
-
branding: true,
|
217
|
-
elementpath: false,
|
218
|
-
plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap emoticons',
|
219
|
-
editimage_cors_hosts: ['picsum.photos'],
|
220
|
-
toolbar: toolbar.join(' | '),
|
221
|
-
toolbar_sticky: false,
|
222
|
-
toolbar_sticky_offset: 108,
|
223
|
-
autosave_ask_before_unload: true,
|
224
|
-
placeholder: hintText,
|
225
|
-
autosave_interval: '30s',
|
226
|
-
autosave_prefix: '{path}{query}-{id}-',
|
227
|
-
autosave_restore_when_empty: false,
|
228
|
-
autosave_retention: '2m',
|
229
|
-
image_advtab: false,
|
230
|
-
image_title: true,
|
231
|
-
file_picker_types: 'image',
|
232
|
-
importcss_append: true,
|
233
|
-
file_picker_callback: handleFileChangeByFilePicker,
|
234
|
-
images_upload_handler: handleUploadImageByDragAndDrop,
|
235
|
-
mobile: {
|
236
|
-
toolbar: toolbar.join(' | '),
|
237
|
-
toolbar_mode: 'wrap'
|
238
|
-
},
|
239
|
-
selector: undefined,
|
240
|
-
height: height,
|
241
|
-
image_caption: true,
|
242
|
-
noneditable_class: 'mceNonEditable',
|
243
|
-
toolbar_mode: 'wrap',
|
244
|
-
skin: useDarkMode ? 'oxide-dark' : 'oxide',
|
245
|
-
content_css: useDarkMode ? 'dark' : 'default',
|
246
|
-
indent: false,
|
247
|
-
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px } img { height: auto; max-width: 100%; } p, div { overflow: hidden; } pre { white-space: pre-wrap; }',
|
248
|
-
setup: function (editor) {
|
249
|
-
editor.on('blur', handleEditorBlur);
|
250
|
-
}
|
251
|
-
} }), validationText] }), isFileValidationAlertDialogOpen && ((0, jsx_runtime_1.jsx)(MobileAlertDialog_1.MobileAlertDialog, { contentText: fileSizeValidationText, tBtn1Text: t('str_confirm'), onClickTBtn1: function () { return setIsFilValidationAlertDialogOpen(false); } }))] }));
|
252
|
-
}
|
253
|
-
var S_Editor = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-height: 500px;\n position: relative;\n\n .tox-statusbar__wordcount {\n visibility: hidden;\n }\n"], ["\n min-height: 500px;\n position: relative;\n\n .tox-statusbar__wordcount {\n visibility: hidden;\n }\n"])));
|
254
|
-
var S_LoadingWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1000;\n"], ["\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1000;\n"])));
|
255
|
-
var S_Error = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
|
256
|
-
var theme = _a.theme;
|
257
|
-
return theme.ui_cpnt_textfield_text_error;
|
258
|
-
}, function (_a) {
|
259
|
-
var theme = _a.theme;
|
260
|
-
return theme.desktopFontSize.caption2;
|
261
|
-
}, function (_a) {
|
262
|
-
var theme = _a.theme;
|
263
|
-
return theme.fontWeight.normal;
|
264
|
-
}, function (_a) {
|
265
|
-
var theme = _a.theme;
|
266
|
-
return theme.desktopLineHeight.caption2;
|
267
|
-
}, function (_a) {
|
268
|
-
var theme = _a.theme;
|
269
|
-
return theme.spacing.spacingA;
|
270
|
-
});
|
271
|
-
exports.default = RichTextEditor;
|
272
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.RichTextEditor = void 0;
|
7
|
-
var RichTextEditor_1 = require("./RichTextEditor");
|
8
|
-
Object.defineProperty(exports, "RichTextEditor", { enumerable: true, get: function () { return __importDefault(RichTextEditor_1).default; } });
|