@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.
@@ -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 _b = useState(false), isClient = _b[0], setIsClient = _b[1];
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 i}from"react";import{Editor as n}from"@tinymce/tinymce-react";import{cva as r}from"class-variance-authority";import{loadTinyMCE as a}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,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o},f=r("",{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"}}),v=t((function(t,r){var s=t.className,v=t.size,g=t.scaling,y=t.init,b=p(t,["className","size","scaling","init"]),h=o(!1),k=h[0],w=h[1];return i((function(){"undefined"!=typeof window&&a().then((function(){w(!0)}))}),[]),k?e("div",{className:c(f({size:v,scaling:g}),s),ref:r,children:e(n,d({init:d({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)},b))}):null}));v.displayName="Editor";export{v as Editor,v as default};
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