pds-dev-kit-web 2.2.216 → 2.2.218
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/scripts/copy-tinymce.d.ts +1 -0
- package/dist/scripts/copy-tinymce.js +32 -0
- package/dist/src/common/styles/scroll/scrollbarStyle.js +1 -1
- package/dist/src/common/styles/theme.d.ts +1 -0
- package/dist/src/common/styles/theme.js +1 -1
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.d.ts +34 -0
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.js +268 -0
- package/dist/src/desktop/components/RichTextEditor/index.d.ts +2 -0
- package/dist/src/desktop/components/RichTextEditor/index.js +8 -0
- package/dist/src/desktop/components/index.d.ts +2 -1
- package/dist/src/desktop/components/index.js +4 -2
- package/dist/src/desktop/index.d.ts +1 -1
- package/dist/src/desktop/index.js +3 -2
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.d.ts +34 -0
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.js +272 -0
- package/dist/src/mobile/components/RichTextEditor/index.d.ts +2 -0
- package/dist/src/mobile/components/RichTextEditor/index.js +8 -0
- package/dist/src/mobile/components/index.d.ts +2 -1
- package/dist/src/mobile/components/index.js +3 -1
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +2 -1
- package/dist/src/mobile/panels/MobileBasicModal/MobileBasicModal.d.ts +1 -1
- package/dist/src/mobile/panels/MobileBasicModal/MobileBasicModal.js +1 -1
- package/dist/tinymce/CHANGELOG.md +3453 -0
- package/dist/tinymce/README.md +73 -0
- package/dist/tinymce/bower.json +27 -0
- package/dist/tinymce/composer.json +52 -0
- package/dist/tinymce/icons/default/icons.js +194 -0
- package/dist/tinymce/icons/default/icons.min.js +1 -0
- package/dist/tinymce/icons/default/index.js +7 -0
- package/dist/tinymce/license.txt +21 -0
- package/dist/tinymce/models/dom/index.js +7 -0
- package/dist/tinymce/models/dom/model.js +8040 -0
- package/dist/tinymce/models/dom/model.min.js +1 -0
- package/dist/tinymce/notices.txt +21 -0
- package/dist/tinymce/package.json +32 -0
- package/dist/tinymce/plugins/accordion/index.js +7 -0
- package/dist/tinymce/plugins/accordion/plugin.js +1054 -0
- package/dist/tinymce/plugins/accordion/plugin.min.js +5 -0
- package/dist/tinymce/plugins/advlist/index.js +7 -0
- package/dist/tinymce/plugins/advlist/plugin.js +259 -0
- package/dist/tinymce/plugins/advlist/plugin.min.js +5 -0
- package/dist/tinymce/plugins/anchor/index.js +7 -0
- package/dist/tinymce/plugins/anchor/plugin.js +214 -0
- package/dist/tinymce/plugins/anchor/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autolink/index.js +7 -0
- package/dist/tinymce/plugins/autolink/plugin.js +228 -0
- package/dist/tinymce/plugins/autolink/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autoresize/index.js +7 -0
- package/dist/tinymce/plugins/autoresize/plugin.js +192 -0
- package/dist/tinymce/plugins/autoresize/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autosave/index.js +7 -0
- package/dist/tinymce/plugins/autosave/plugin.js +233 -0
- package/dist/tinymce/plugins/autosave/plugin.min.js +5 -0
- package/dist/tinymce/plugins/charmap/index.js +7 -0
- package/dist/tinymce/plugins/charmap/plugin.js +1658 -0
- package/dist/tinymce/plugins/charmap/plugin.min.js +5 -0
- package/dist/tinymce/plugins/code/index.js +7 -0
- package/dist/tinymce/plugins/code/plugin.js +85 -0
- package/dist/tinymce/plugins/code/plugin.min.js +5 -0
- package/dist/tinymce/plugins/codesample/index.js +7 -0
- package/dist/tinymce/plugins/codesample/plugin.js +2471 -0
- package/dist/tinymce/plugins/codesample/plugin.min.js +13 -0
- package/dist/tinymce/plugins/directionality/index.js +7 -0
- package/dist/tinymce/plugins/directionality/plugin.js +395 -0
- package/dist/tinymce/plugins/directionality/plugin.min.js +5 -0
- package/dist/tinymce/plugins/emoticons/index.js +7 -0
- package/dist/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
- package/dist/tinymce/plugins/emoticons/plugin.js +595 -0
- package/dist/tinymce/plugins/emoticons/plugin.min.js +5 -0
- package/dist/tinymce/plugins/fullscreen/index.js +7 -0
- package/dist/tinymce/plugins/fullscreen/plugin.js +1249 -0
- package/dist/tinymce/plugins/fullscreen/plugin.min.js +5 -0
- package/dist/tinymce/plugins/help/index.js +7 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/dist/tinymce/plugins/help/plugin.js +898 -0
- package/dist/tinymce/plugins/help/plugin.min.js +5 -0
- package/dist/tinymce/plugins/image/index.js +7 -0
- package/dist/tinymce/plugins/image/plugin.js +1505 -0
- package/dist/tinymce/plugins/image/plugin.min.js +5 -0
- package/dist/tinymce/plugins/importcss/index.js +7 -0
- package/dist/tinymce/plugins/importcss/plugin.js +344 -0
- package/dist/tinymce/plugins/importcss/plugin.min.js +5 -0
- package/dist/tinymce/plugins/insertdatetime/index.js +7 -0
- package/dist/tinymce/plugins/insertdatetime/plugin.js +187 -0
- package/dist/tinymce/plugins/insertdatetime/plugin.min.js +5 -0
- package/dist/tinymce/plugins/link/index.js +7 -0
- package/dist/tinymce/plugins/link/plugin.js +1242 -0
- package/dist/tinymce/plugins/link/plugin.min.js +5 -0
- package/dist/tinymce/plugins/lists/index.js +7 -0
- package/dist/tinymce/plugins/lists/plugin.js +2172 -0
- package/dist/tinymce/plugins/lists/plugin.min.js +5 -0
- package/dist/tinymce/plugins/media/index.js +7 -0
- package/dist/tinymce/plugins/media/plugin.js +1217 -0
- package/dist/tinymce/plugins/media/plugin.min.js +5 -0
- package/dist/tinymce/plugins/nonbreaking/index.js +7 -0
- package/dist/tinymce/plugins/nonbreaking/plugin.js +123 -0
- package/dist/tinymce/plugins/nonbreaking/plugin.min.js +5 -0
- package/dist/tinymce/plugins/pagebreak/index.js +7 -0
- package/dist/tinymce/plugins/pagebreak/plugin.js +117 -0
- package/dist/tinymce/plugins/pagebreak/plugin.min.js +5 -0
- package/dist/tinymce/plugins/preview/index.js +7 -0
- package/dist/tinymce/plugins/preview/plugin.js +97 -0
- package/dist/tinymce/plugins/preview/plugin.min.js +5 -0
- package/dist/tinymce/plugins/quickbars/index.js +7 -0
- package/dist/tinymce/plugins/quickbars/plugin.js +447 -0
- package/dist/tinymce/plugins/quickbars/plugin.min.js +5 -0
- package/dist/tinymce/plugins/save/index.js +7 -0
- package/dist/tinymce/plugins/save/plugin.js +118 -0
- package/dist/tinymce/plugins/save/plugin.min.js +5 -0
- package/dist/tinymce/plugins/searchreplace/index.js +7 -0
- package/dist/tinymce/plugins/searchreplace/plugin.js +1093 -0
- package/dist/tinymce/plugins/searchreplace/plugin.min.js +5 -0
- package/dist/tinymce/plugins/table/index.js +7 -0
- package/dist/tinymce/plugins/table/plugin.js +3462 -0
- package/dist/tinymce/plugins/table/plugin.min.js +5 -0
- package/dist/tinymce/plugins/template/index.js +7 -0
- package/dist/tinymce/plugins/template/plugin.js +567 -0
- package/dist/tinymce/plugins/template/plugin.min.js +5 -0
- package/dist/tinymce/plugins/visualblocks/index.js +7 -0
- package/dist/tinymce/plugins/visualblocks/plugin.js +98 -0
- package/dist/tinymce/plugins/visualblocks/plugin.min.js +5 -0
- package/dist/tinymce/plugins/visualchars/index.js +7 -0
- package/dist/tinymce/plugins/visualchars/plugin.js +560 -0
- package/dist/tinymce/plugins/visualchars/plugin.min.js +5 -0
- package/dist/tinymce/plugins/wordcount/index.js +7 -0
- package/dist/tinymce/plugins/wordcount/plugin.js +405 -0
- package/dist/tinymce/plugins/wordcount/plugin.min.js +5 -0
- package/dist/tinymce/skins/content/dark/content.css +79 -0
- package/dist/tinymce/skins/content/dark/content.js +15 -0
- package/dist/tinymce/skins/content/dark/content.min.css +14 -0
- package/dist/tinymce/skins/content/default/content.css +74 -0
- package/dist/tinymce/skins/content/default/content.js +15 -0
- package/dist/tinymce/skins/content/default/content.min.css +14 -0
- package/dist/tinymce/skins/content/document/content.css +79 -0
- package/dist/tinymce/skins/content/document/content.js +15 -0
- package/dist/tinymce/skins/content/document/content.min.css +14 -0
- package/dist/tinymce/skins/content/tinymce-5/content.css +74 -0
- package/dist/tinymce/skins/content/tinymce-5/content.js +15 -0
- package/dist/tinymce/skins/content/tinymce-5/content.min.css +14 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.css +79 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.js +15 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.min.css +14 -0
- package/dist/tinymce/skins/content/writer/content.css +75 -0
- package/dist/tinymce/skins/content/writer/content.js +15 -0
- package/dist/tinymce/skins/content/writer/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/content.css +798 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/content.js +15 -0
- package/dist/tinymce/skins/ui/oxide/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/skin.css +3763 -0
- package/dist/tinymce/skins/ui/oxide/skin.js +2 -0
- package/dist/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.css +779 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.js +15 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.css +798 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.css +3857 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.css +779 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.css +3857 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/themes/silver/index.js +7 -0
- package/dist/tinymce/themes/silver/theme.js +30775 -0
- package/dist/tinymce/themes/silver/theme.min.js +1 -0
- package/dist/tinymce/tinymce.d.ts +3238 -0
- package/dist/tinymce/tinymce.js +31779 -0
- package/dist/tinymce/tinymce.min.js +11 -0
- package/package.json +7 -2
- package/release-note.md +2 -2
- package/scripts/copy-tinymce.js +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
var fs = require('fs');
|
|
3
|
+
var path = require('path');
|
|
4
|
+
var sourceDir = path.join(__dirname, '../node_modules/tinymce');
|
|
5
|
+
var targetDir = path.join(__dirname, '../dist/tinymce');
|
|
6
|
+
function copyDir(src, dest) {
|
|
7
|
+
if (!fs.existsSync(dest)) {
|
|
8
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
9
|
+
}
|
|
10
|
+
var items = fs.readdirSync(src);
|
|
11
|
+
items.forEach(function (item) {
|
|
12
|
+
var srcPath = path.join(src, item);
|
|
13
|
+
var destPath = path.join(dest, item);
|
|
14
|
+
if (fs.statSync(srcPath).isDirectory()) {
|
|
15
|
+
copyDir(srcPath, destPath);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
fs.copyFileSync(srcPath, destPath);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
console.log('Copying TinyMCE static files to dist...');
|
|
23
|
+
if (fs.existsSync(sourceDir)) {
|
|
24
|
+
copyDir(sourceDir, targetDir);
|
|
25
|
+
console.log('TinyMCE static files copied successfully!');
|
|
26
|
+
console.log("Files copied to: ".concat(targetDir));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
console.error('TinyMCE source directory not found:', sourceDir);
|
|
30
|
+
console.log('Make sure tinymce is installed: npm install tinymce');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
@@ -11,5 +11,5 @@ exports.scrollbarStyle = (0, styled_components_1.css)(templateObject_1 || (templ
|
|
|
11
11
|
return theme.ui_container_scroll;
|
|
12
12
|
});
|
|
13
13
|
exports.scrollbarWithPaddingStyle = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n\n ::-webkit-scrollbar-track {\n margin-bottom: 24px;\n margin-top: 24px;\n }\n"], ["\n ", "\n\n ::-webkit-scrollbar-track {\n margin-bottom: 24px;\n margin-top: 24px;\n }\n"])), exports.scrollbarStyle);
|
|
14
|
-
exports.scrollInvisible = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n background: transparent;\n display: block;\n width:
|
|
14
|
+
exports.scrollInvisible = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n background: transparent;\n display: block;\n width: 0px;\n }\n scrollbar-width: auto;\n"], ["\n ::-webkit-scrollbar {\n background: transparent;\n display: block;\n width: 0px;\n }\n scrollbar-width: auto;\n"])));
|
|
15
15
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -113,4 +113,5 @@ export declare const language = "ko";
|
|
|
113
113
|
declare const theme: DefaultTheme;
|
|
114
114
|
type ToneType = 'DARK' | 'LIGHT';
|
|
115
115
|
export declare const themeByGivenTone: (tone: ToneType) => any;
|
|
116
|
+
export type AppTheme = ReturnType<typeof themeByGivenTone>;
|
|
116
117
|
export default theme;
|
|
@@ -125,6 +125,6 @@ exports.spacing = {
|
|
|
125
125
|
};
|
|
126
126
|
exports.language = 'ko';
|
|
127
127
|
var theme = __assign({ fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language }, (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {}));
|
|
128
|
-
var themeByGivenTone = function (tone) { return (__assign(__assign({}, (0, ui_colors_1.customTheme)(tone)), { fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language })); };
|
|
128
|
+
var themeByGivenTone = function (tone) { return (__assign(__assign({}, (0, ui_colors_1.customTheme)(tone)), { fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language, mode: tone === 'DARK' ? 'dark' : 'light' })); };
|
|
129
129
|
exports.themeByGivenTone = themeByGivenTone;
|
|
130
130
|
exports.default = theme;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
requirementMode?: 'none' | 'use';
|
|
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, requirementMode, lengthValidationText, requiredValidationText, fileSizeValidationText, height, tinymceScriptSrc, onChange, onBlur, onCountCharacter, onImageUpload, isLoadingUsed }: RichTextEditorProps): JSX.Element;
|
|
34
|
+
export default RichTextEditor;
|
|
@@ -0,0 +1,268 @@
|
|
|
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 DesktopAlertDialog_1 = require("../DesktopAlertDialog");
|
|
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, _c = _a.requirementMode, requirementMode = _c === void 0 ? 'none' : _c, lengthValidationText = _a.lengthValidationText, requiredValidationText = _a.requiredValidationText, fileSizeValidationText = _a.fileSizeValidationText, _d = _a.height, height = _d === void 0 ? 600 : _d, _e = _a.tinymceScriptSrc, tinymceScriptSrc = _e === void 0 ? '/tinymce/tinymce.min.js' : _e, onChange = _a.onChange, onBlur = _a.onBlur, onCountCharacter = _a.onCountCharacter, onImageUpload = _a.onImageUpload, _f = _a.isLoadingUsed, isLoadingUsed = _f === void 0 ? true : _f;
|
|
79
|
+
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
80
|
+
var _g = (0, react_1.useState)(0), count = _g[0], setCount = _g[1];
|
|
81
|
+
var _h = (0, react_1.useState)(true), isEditorLoading = _h[0], setIsEditorLoading = _h[1];
|
|
82
|
+
var _j = (0, react_1.useState)(false), isFileValidationAlertDialogOpen = _j[0], setIsFilValidationAlertDialogOpen = _j[1];
|
|
83
|
+
var editorRef = (0, react_1.useRef)(null);
|
|
84
|
+
var isEditorDirty = (0, react_1.useRef)(false);
|
|
85
|
+
var editorContent = (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.getContent();
|
|
86
|
+
var theme = (0, styled_components_1.useTheme)();
|
|
87
|
+
var useDarkMode = theme.mode === 'dark';
|
|
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 (requirementMode === 'use' &&
|
|
204
|
+
isEditorDirty.current &&
|
|
205
|
+
(!editorContent || editorContent.length === 0)) {
|
|
206
|
+
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: requiredValidationText });
|
|
207
|
+
}
|
|
208
|
+
if (minLength && count > 0 && count < minLength) {
|
|
209
|
+
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
|
|
210
|
+
}
|
|
211
|
+
if (maxLength && count > 0 && count > maxLength) {
|
|
212
|
+
validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
|
|
213
|
+
}
|
|
214
|
+
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: {
|
|
215
|
+
menubar: false,
|
|
216
|
+
promotion: false,
|
|
217
|
+
branding: false,
|
|
218
|
+
elementpath: false,
|
|
219
|
+
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',
|
|
220
|
+
editimage_cors_hosts: ['picsum.photos'],
|
|
221
|
+
toolbar: toolbar.join(' | '),
|
|
222
|
+
toolbar_sticky: false,
|
|
223
|
+
toolbar_sticky_offset: 108,
|
|
224
|
+
autosave_ask_before_unload: true,
|
|
225
|
+
placeholder: hintText,
|
|
226
|
+
autosave_interval: '30s',
|
|
227
|
+
autosave_prefix: '{path}{query}-{id}-',
|
|
228
|
+
autosave_restore_when_empty: false,
|
|
229
|
+
autosave_retention: '2m',
|
|
230
|
+
image_advtab: false,
|
|
231
|
+
image_title: true,
|
|
232
|
+
file_picker_types: 'image',
|
|
233
|
+
importcss_append: true,
|
|
234
|
+
file_picker_callback: handleFileChangeByFilePicker,
|
|
235
|
+
images_upload_handler: handleUploadImageByDragAndDrop,
|
|
236
|
+
height: height,
|
|
237
|
+
image_caption: true,
|
|
238
|
+
noneditable_class: 'mceNonEditable',
|
|
239
|
+
toolbar_mode: 'wrap',
|
|
240
|
+
skin: useDarkMode ? 'oxide-dark' : 'oxide',
|
|
241
|
+
content_css: useDarkMode ? 'dark' : 'default',
|
|
242
|
+
indent: false,
|
|
243
|
+
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; }',
|
|
244
|
+
setup: function (editor) {
|
|
245
|
+
editor.on('blur', handleEditorBlur);
|
|
246
|
+
}
|
|
247
|
+
} }), validationText] }), isFileValidationAlertDialogOpen && ((0, jsx_runtime_1.jsx)(DesktopAlertDialog_1.DesktopAlertDialog, { contentText: fileSizeValidationText, tBtn1Text: t('str_confirm'), onClickTBtn1: function () { return setIsFilValidationAlertDialogOpen(false); } }))] }));
|
|
248
|
+
}
|
|
249
|
+
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"])));
|
|
250
|
+
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"])));
|
|
251
|
+
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) {
|
|
252
|
+
var theme = _a.theme;
|
|
253
|
+
return theme.ui_cpnt_textfield_text_error;
|
|
254
|
+
}, function (_a) {
|
|
255
|
+
var theme = _a.theme;
|
|
256
|
+
return theme.desktopFontSize.caption2;
|
|
257
|
+
}, function (_a) {
|
|
258
|
+
var theme = _a.theme;
|
|
259
|
+
return theme.fontWeight.normal;
|
|
260
|
+
}, function (_a) {
|
|
261
|
+
var theme = _a.theme;
|
|
262
|
+
return theme.desktopLineHeight.caption2;
|
|
263
|
+
}, function (_a) {
|
|
264
|
+
var theme = _a.theme;
|
|
265
|
+
return theme.spacing.spacingA;
|
|
266
|
+
});
|
|
267
|
+
exports.default = RichTextEditor;
|
|
268
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,8 @@
|
|
|
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; } });
|
|
@@ -37,6 +37,7 @@ import { PriceTextField } from './PriceTextField';
|
|
|
37
37
|
import { PriceTextLabel } from './PriceTextLabel';
|
|
38
38
|
import { Radio } from './Radio';
|
|
39
39
|
import { ReactionButton } from './ReactionButton';
|
|
40
|
+
import { RichTextEditor } from './RichTextEditor';
|
|
40
41
|
import { SegmentedButtonGroup } from './SegmentedButtonGroup';
|
|
41
42
|
import { Select } from './Select';
|
|
42
43
|
import { Slider } from './Slider';
|
|
@@ -51,4 +52,4 @@ import { UploadTextButton } from './UploadTextButton';
|
|
|
51
52
|
import { UserDesktopNavBar } from './UserDesktopNavBar';
|
|
52
53
|
import { UserDesktopSideTab } from './UserDesktopSideTab';
|
|
53
54
|
import { UserDesktopTabBar } from './UserDesktopTabBar';
|
|
54
|
-
export { AdminList, AdminListHeader, AdminListItem, BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, DesktopAlertDialog, DesktopHeaderBar, DesktopTabBar, Dropdown, DynamicDesktopNavBar, DynamicDesktopNavBarTemplates, EditApplyTextField, FilterBar, FloatingActionButton, Hero, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, PageTitleTextGroup, PriceTextField, Radio, ReactionButton, SegmentedButtonGroup, Select, Slider, Snackbar, StatusBlock, TextButton, TextField, TextLabel, PriceTextLabel, UploadIconButton, UploadMainButton, UploadTextButton, UserDesktopNavBar, UserDesktopTabBar, UserDesktopSideTab, Calendar };
|
|
55
|
+
export { AdminList, AdminListHeader, AdminListItem, BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, DesktopAlertDialog, DesktopHeaderBar, DesktopTabBar, Dropdown, DynamicDesktopNavBar, DynamicDesktopNavBarTemplates, EditApplyTextField, FilterBar, FloatingActionButton, Hero, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, PageTitleTextGroup, PriceTextField, Radio, ReactionButton, RichTextEditor, SegmentedButtonGroup, Select, Slider, Snackbar, StatusBlock, TextButton, TextField, TextLabel, PriceTextLabel, UploadIconButton, UploadMainButton, UploadTextButton, UserDesktopNavBar, UserDesktopTabBar, UserDesktopSideTab, Calendar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.Calendar = exports.UserDesktopSideTab = exports.UserDesktopTabBar = exports.UserDesktopNavBar = void 0;
|
|
3
|
+
exports.UploadMainButton = exports.UploadIconButton = exports.PriceTextLabel = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.Snackbar = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.RichTextEditor = exports.ReactionButton = exports.Radio = exports.PriceTextField = exports.PageTitleTextGroup = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.Hero = exports.FloatingActionButton = exports.FilterBar = exports.EditApplyTextField = exports.DynamicDesktopNavBarTemplates = exports.DynamicDesktopNavBar = exports.Dropdown = exports.DesktopTabBar = exports.DesktopHeaderBar = exports.DesktopAlertDialog = exports.ContextMenuItem = exports.ContextMenu = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BoxItem = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = exports.AdminListItem = exports.AdminListHeader = exports.AdminList = void 0;
|
|
4
|
+
exports.Calendar = exports.UserDesktopSideTab = exports.UserDesktopTabBar = exports.UserDesktopNavBar = exports.UploadTextButton = void 0;
|
|
5
5
|
var AdminList_1 = require("./AdminList");
|
|
6
6
|
Object.defineProperty(exports, "AdminList", { enumerable: true, get: function () { return AdminList_1.AdminList; } });
|
|
7
7
|
var AdminListHeader_1 = require("./AdminListHeader");
|
|
@@ -81,6 +81,8 @@ var Radio_1 = require("./Radio");
|
|
|
81
81
|
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
|
|
82
82
|
var ReactionButton_1 = require("./ReactionButton");
|
|
83
83
|
Object.defineProperty(exports, "ReactionButton", { enumerable: true, get: function () { return ReactionButton_1.ReactionButton; } });
|
|
84
|
+
var RichTextEditor_1 = require("./RichTextEditor");
|
|
85
|
+
Object.defineProperty(exports, "RichTextEditor", { enumerable: true, get: function () { return RichTextEditor_1.RichTextEditor; } });
|
|
84
86
|
var SegmentedButtonGroup_1 = require("./SegmentedButtonGroup");
|
|
85
87
|
Object.defineProperty(exports, "SegmentedButtonGroup", { enumerable: true, get: function () { return SegmentedButtonGroup_1.SegmentedButtonGroup; } });
|
|
86
88
|
var Select_1 = require("./Select");
|
|
@@ -8,5 +8,5 @@ export { ContainersBox as WSContainersBox } from './layout/LayoutWS/ContainersBo
|
|
|
8
8
|
export { LayoutWT } from './layout/LayoutWT';
|
|
9
9
|
export { GlobalMenuContainer as WTGlobalMenuContainer } from './layout/LayoutWT/Containers';
|
|
10
10
|
export { ContainersBox as WTContainersBox } from './layout/LayoutWT/ContainersBox';
|
|
11
|
-
export { AdminList as D_AdminList, AdminListHeader as D_AdminListHeader, AdminListItem as D_AdminListItem, BasicButtonGroup as D_BasicButtonGroup, BasicChatListItem as D_BasicChatListItem, BasicFormGroup as D_BasicFormGroup, BasicList as D_BasicList, BasicListItem as D_BasicListItem, BlogTextField as D_BlogTextField, BodyTextGroup as D_BodyTextGroup, BoxItem as D_BoxItem, Card as D_Card, CardList as D_CardList, ChatBubbleListItem as D_ChatBubbleListItem, ChatList as D_ChatList, Checkbox as D_Checkbox, Chip as D_Chip, ContextMenu as D_ContextMenu, ContextMenuItem as D_ContextMenuItem, DesktopAlertDialog as D_DesktopAlertDialog, DesktopHeaderBar as D_DesktopHeaderBar, DesktopTabBar as D_DesktopTabBar, Dropdown as D_Dropdown, DynamicDesktopNavBar as D_DynamicDesktopNavBar, DynamicDesktopNavBarTemplates as D_DynamicDesktopNavBarTemplates, EditApplyTextField as D_EditApplyTextField, FilterBar as D_FilterBar, FloatingActionButton as D_FloatingActionButton, Hero as D_Hero, HorizontalFormGroup as D_HorizontalFormGroup, IconButton as D_IconButton, ImageSlide as D_ImageSlide, LottieReactionButton as D_LottieReactionButton, MainButton as D_MainButton, PageTitleTextGroup as D_PageTitleTextGroup, Radio as D_Radio, ReactionButton as D_ReactionButton, SegmentedButtonGroup as D_SegmentedButtonGroup, Select as D_Select, Slider as D_Slider, Snackbar as D_Snackbar, StatusBlock as D_StatusBlock, TextButton as D_TextButton, PriceTextField as D_PriceTextField, TextField as D_TextField, TextLabel as D_TextLabel, PriceTextLabel as D_PriceTextLabel, UploadIconButton as D_UploadIconButton, UploadMainButton as D_UploadMainButton, UploadTextButton as D_UploadTextButton, UserDesktopNavBar as D_UserDesktopNavBar, UserDesktopTabBar as D_UserDesktopTabBar, UserDesktopSideTab as D_UserDesktopSideTab, Calendar as D_Calendar } from './components';
|
|
11
|
+
export { AdminList as D_AdminList, AdminListHeader as D_AdminListHeader, AdminListItem as D_AdminListItem, BasicButtonGroup as D_BasicButtonGroup, BasicChatListItem as D_BasicChatListItem, BasicFormGroup as D_BasicFormGroup, BasicList as D_BasicList, BasicListItem as D_BasicListItem, BlogTextField as D_BlogTextField, BodyTextGroup as D_BodyTextGroup, BoxItem as D_BoxItem, Card as D_Card, CardList as D_CardList, ChatBubbleListItem as D_ChatBubbleListItem, ChatList as D_ChatList, Checkbox as D_Checkbox, Chip as D_Chip, ContextMenu as D_ContextMenu, ContextMenuItem as D_ContextMenuItem, DesktopAlertDialog as D_DesktopAlertDialog, DesktopHeaderBar as D_DesktopHeaderBar, DesktopTabBar as D_DesktopTabBar, Dropdown as D_Dropdown, DynamicDesktopNavBar as D_DynamicDesktopNavBar, DynamicDesktopNavBarTemplates as D_DynamicDesktopNavBarTemplates, EditApplyTextField as D_EditApplyTextField, FilterBar as D_FilterBar, FloatingActionButton as D_FloatingActionButton, Hero as D_Hero, HorizontalFormGroup as D_HorizontalFormGroup, IconButton as D_IconButton, ImageSlide as D_ImageSlide, LottieReactionButton as D_LottieReactionButton, MainButton as D_MainButton, PageTitleTextGroup as D_PageTitleTextGroup, Radio as D_Radio, ReactionButton as D_ReactionButton, RichTextEditor as D_RichTextEditor, SegmentedButtonGroup as D_SegmentedButtonGroup, Select as D_Select, Slider as D_Slider, Snackbar as D_Snackbar, StatusBlock as D_StatusBlock, TextButton as D_TextButton, PriceTextField as D_PriceTextField, TextField as D_TextField, TextLabel as D_TextLabel, PriceTextLabel as D_PriceTextLabel, UploadIconButton as D_UploadIconButton, UploadMainButton as D_UploadMainButton, UploadTextButton as D_UploadTextButton, UserDesktopNavBar as D_UserDesktopNavBar, UserDesktopTabBar as D_UserDesktopTabBar, UserDesktopSideTab as D_UserDesktopSideTab, Calendar as D_Calendar } from './components';
|
|
12
12
|
export { AnnotationSheet as D_AnnotationSheet, ContentSheet as D_ContentSheet, DesktopBasicModal as D_DesktopBasicModal, DesktopBasicModalWithTab as D_DesktopBasicModalWithTab, DesktopBasicModalWithTabInfoType, DesktopHeadlessModal as D_DesktopHeadlessModal, DesktopTutorialModal as D_DesktopTutorialModal, DesktopTutorialModalInfoType, SectionSheet as D_SectionSheet } from './panels';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.D_SectionSheet = exports.D_DesktopTutorialModal = exports.D_DesktopHeadlessModal = exports.D_DesktopBasicModalWithTab = exports.D_DesktopBasicModal = exports.D_ContentSheet = exports.D_AnnotationSheet = exports.D_Calendar = exports.D_UserDesktopSideTab = exports.D_UserDesktopTabBar = exports.D_UserDesktopNavBar = exports.D_UploadTextButton = exports.D_UploadMainButton = exports.D_UploadIconButton = exports.D_PriceTextLabel = exports.D_TextLabel = exports.D_TextField = exports.D_PriceTextField = exports.D_TextButton = exports.D_StatusBlock = exports.D_Snackbar = void 0;
|
|
3
|
+
exports.D_Select = exports.D_SegmentedButtonGroup = exports.D_RichTextEditor = exports.D_ReactionButton = exports.D_Radio = exports.D_PageTitleTextGroup = exports.D_MainButton = exports.D_LottieReactionButton = exports.D_ImageSlide = exports.D_IconButton = exports.D_HorizontalFormGroup = exports.D_Hero = exports.D_FloatingActionButton = exports.D_FilterBar = exports.D_EditApplyTextField = exports.D_DynamicDesktopNavBarTemplates = exports.D_DynamicDesktopNavBar = exports.D_Dropdown = exports.D_DesktopTabBar = exports.D_DesktopHeaderBar = exports.D_DesktopAlertDialog = exports.D_ContextMenuItem = exports.D_ContextMenu = exports.D_Chip = exports.D_Checkbox = exports.D_ChatList = exports.D_ChatBubbleListItem = exports.D_CardList = exports.D_Card = exports.D_BoxItem = exports.D_BodyTextGroup = exports.D_BlogTextField = exports.D_BasicListItem = exports.D_BasicList = exports.D_BasicFormGroup = exports.D_BasicChatListItem = exports.D_BasicButtonGroup = exports.D_AdminListItem = exports.D_AdminListHeader = exports.D_AdminList = exports.WTContainersBox = exports.WTGlobalMenuContainer = exports.LayoutWT = exports.WSContainersBox = exports.WSGlobalMenuContainer = exports.LayoutWS = exports.WHContainersBox = exports.LayoutWH = exports.WFContainersBox = exports.LayoutWF = void 0;
|
|
4
|
+
exports.D_SectionSheet = exports.D_DesktopTutorialModal = exports.D_DesktopHeadlessModal = exports.D_DesktopBasicModalWithTab = exports.D_DesktopBasicModal = exports.D_ContentSheet = exports.D_AnnotationSheet = exports.D_Calendar = exports.D_UserDesktopSideTab = exports.D_UserDesktopTabBar = exports.D_UserDesktopNavBar = exports.D_UploadTextButton = exports.D_UploadMainButton = exports.D_UploadIconButton = exports.D_PriceTextLabel = exports.D_TextLabel = exports.D_TextField = exports.D_PriceTextField = exports.D_TextButton = exports.D_StatusBlock = exports.D_Snackbar = exports.D_Slider = void 0;
|
|
5
5
|
// layoutWF
|
|
6
6
|
var LayoutWF_1 = require("./layout/LayoutWF");
|
|
7
7
|
Object.defineProperty(exports, "LayoutWF", { enumerable: true, get: function () { return LayoutWF_1.LayoutWF; } });
|
|
@@ -65,6 +65,7 @@ Object.defineProperty(exports, "D_MainButton", { enumerable: true, get: function
|
|
|
65
65
|
Object.defineProperty(exports, "D_PageTitleTextGroup", { enumerable: true, get: function () { return components_1.PageTitleTextGroup; } });
|
|
66
66
|
Object.defineProperty(exports, "D_Radio", { enumerable: true, get: function () { return components_1.Radio; } });
|
|
67
67
|
Object.defineProperty(exports, "D_ReactionButton", { enumerable: true, get: function () { return components_1.ReactionButton; } });
|
|
68
|
+
Object.defineProperty(exports, "D_RichTextEditor", { enumerable: true, get: function () { return components_1.RichTextEditor; } });
|
|
68
69
|
Object.defineProperty(exports, "D_SegmentedButtonGroup", { enumerable: true, get: function () { return components_1.SegmentedButtonGroup; } });
|
|
69
70
|
Object.defineProperty(exports, "D_Select", { enumerable: true, get: function () { return components_1.Select; } });
|
|
70
71
|
Object.defineProperty(exports, "D_Slider", { enumerable: true, get: function () { return components_1.Slider; } });
|
|
@@ -0,0 +1,34 @@
|
|
|
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;
|