@lotte-innovate/ui-component-test 0.2.59 → 0.2.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/Editor/index.d.ts +1 -0
- package/dist/lib/components/Editor/index.js +3 -3
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/langs/it.js +2 -0
- package/dist/lib/utils/langs/it.mjs +3 -0
- package/dist/lib/utils/langs/it.mjs.map +1 -0
- package/dist/lib/utils/langs/ja.d.ts +0 -0
- package/dist/lib/utils/langs/ja.js +2 -0
- package/dist/lib/utils/langs/ja.mjs +3 -0
- package/dist/lib/utils/langs/ja.mjs.map +1 -0
- package/dist/lib/utils/langs/ko_KR.d.ts +0 -0
- package/dist/lib/utils/langs/ko_KR.mjs.map +1 -0
- package/dist/lib/utils/langs/vi.d.ts +0 -0
- package/dist/lib/utils/langs/vi.js +2 -0
- package/dist/lib/utils/langs/vi.mjs +3 -0
- package/dist/lib/utils/langs/vi.mjs.map +1 -0
- package/dist/lib/utils/langs/zh_CN.d.ts +0 -0
- package/dist/lib/utils/langs/zh_CN.js +2 -0
- package/dist/lib/utils/langs/zh_CN.mjs +3 -0
- package/dist/lib/utils/langs/zh_CN.mjs.map +1 -0
- package/dist/lib/utils/useLoadTinyMCE.js +13 -1
- package/dist/lib/utils/useLoadTinyMCE.mjs +1 -1
- package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/utils/ko_KR.mjs.map +0 -1
- /package/dist/lib/utils/{ko_KR.d.ts → langs/it.d.ts} +0 -0
- /package/dist/lib/utils/{ko_KR.js → langs/ko_KR.js} +0 -0
- /package/dist/lib/utils/{ko_KR.mjs → langs/ko_KR.mjs} +0 -0
@@ -3,6 +3,7 @@ import { IAllProps } from '@tinymce/tinymce-react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
4
|
import 'tinymce/skins/ui/oxide/skin.css';
|
5
5
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
6
|
+
language?: 'ko_KR' | 'zh_CN' | 'ja' | 'it' | 'vi';
|
6
7
|
}
|
7
8
|
declare const editorVariants: (props?: ({
|
8
9
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
@@ -47,8 +47,8 @@ var editorVariants = cva('', {
|
|
47
47
|
},
|
48
48
|
});
|
49
49
|
export var Editor = forwardRef(function (_a, ref) {
|
50
|
-
var className = _a.className, size = _a.size, scaling = _a.scaling, init = _a.init, props = __rest(_a, ["className", "size", "scaling", "init"]);
|
51
|
-
var
|
50
|
+
var className = _a.className, size = _a.size, scaling = _a.scaling, init = _a.init, _b = _a.language, language = _b === void 0 ? 'en' : _b, props = __rest(_a, ["className", "size", "scaling", "init", "language"]);
|
51
|
+
var _c = useState(false), isClient = _c[0], setIsClient = _c[1];
|
52
52
|
useEffect(function () {
|
53
53
|
if (typeof window !== 'undefined') {
|
54
54
|
loadTinyMCE().then(function () {
|
@@ -59,7 +59,7 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
59
59
|
if (!isClient) {
|
60
60
|
return null;
|
61
61
|
}
|
62
|
-
return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ init: __assign({ width: '100%', height: '100%', promotion: false, 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 charmap accordion', menubar: 'file edit view insert format tools table', toolbar: 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl', autosave_ask_before_unload: true, autosave_interval: '30s', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, image_caption: true, quickbars_selection_toolbar: '', toolbar_mode: 'sliding', skin: false, content_css: false, content_style: "".concat(contentUiSkinCss, "\n").concat(contentCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"), setup: function (editor) {
|
62
|
+
return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ init: __assign({ language: language, width: '100%', height: '100%', promotion: false, 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 charmap accordion', menubar: 'file edit view insert format tools table', toolbar: 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl', autosave_ask_before_unload: true, autosave_interval: '30s', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, image_caption: true, quickbars_selection_toolbar: '', toolbar_mode: 'sliding', skin: false, content_css: false, content_style: "".concat(contentUiSkinCss, "\n").concat(contentCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"), setup: function (editor) {
|
63
63
|
editor.ui.registry.addButton('inlinecode', {
|
64
64
|
icon: 'sourcecode',
|
65
65
|
tooltip: 'Inline code',
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as o,useEffect as
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as o,useEffect as n}from"react";import{Editor as i}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinyMCE as r}from"../../utils/useLoadTinyMCE.mjs";import{scalingVariants as s}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";import{marked as l}from"marked";import"tinymce/skins/ui/oxide/skin.css";import m from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import u from"!!raw-loader!tinymce/skins/content/default/content.css";var d=function(){return d=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o},f=a("",{variants:{scaling:d({},s),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),g=t((function(t,a){var s=t.className,g=t.size,v=t.scaling,y=t.init,b=t.language,h=void 0===b?"en":b,k=p(t,["className","size","scaling","init","language"]),w=o(!1),_=w[0],x=w[1];return n((function(){"undefined"!=typeof window&&r().then((function(){x(!0)}))}),[]),_?e("div",{className:c(f({size:g,scaling:v}),s),ref:a,children:e(i,d({init:d({language:h,width:"100%",height:"100%",promotion:!1,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 charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",skin:!1,content_css:!1,content_style:"".concat(m,"\n").concat(u,"\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"),setup:function(e){e.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.on("init",(function(){e.formatter.register("code",{inline:"code",remove:"all"})})),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),o=l(t);e.setContent(o)}})}},y)},k))}):null}));g.displayName="Editor";export{g as Editor,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|