@lotte-innovate/ui-component-test 0.0.110 → 0.0.112

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/dist/globals.css +1 -1
  2. package/dist/lib/components/Editor/index.d.ts +15 -1
  3. package/dist/lib/components/Editor/index.js +35 -8
  4. package/dist/lib/components/Editor/index.mjs +1 -1
  5. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/package.json +2 -1
  8. package/public/tinymce/CHANGELOG.md +3453 -0
  9. package/public/tinymce/README.md +73 -0
  10. package/public/tinymce/bower.json +27 -0
  11. package/public/tinymce/composer.json +52 -0
  12. package/public/tinymce/icons/default/icons.js +194 -0
  13. package/public/tinymce/icons/default/icons.min.js +1 -0
  14. package/public/tinymce/icons/default/index.js +7 -0
  15. package/public/tinymce/license.txt +21 -0
  16. package/public/tinymce/models/dom/index.js +7 -0
  17. package/public/tinymce/models/dom/model.js +8040 -0
  18. package/public/tinymce/models/dom/model.min.js +4 -0
  19. package/public/tinymce/package.json +32 -0
  20. package/public/tinymce/plugins/advlist/index.js +7 -0
  21. package/public/tinymce/plugins/advlist/plugin.js +259 -0
  22. package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
  23. package/public/tinymce/plugins/autolink/index.js +7 -0
  24. package/public/tinymce/plugins/autolink/plugin.js +228 -0
  25. package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
  26. package/public/tinymce/plugins/code/index.js +7 -0
  27. package/public/tinymce/plugins/code/plugin.js +85 -0
  28. package/public/tinymce/plugins/code/plugin.min.js +4 -0
  29. package/public/tinymce/plugins/codesample/index.js +7 -0
  30. package/public/tinymce/plugins/codesample/plugin.js +2463 -0
  31. package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
  32. package/public/tinymce/plugins/image/index.js +7 -0
  33. package/public/tinymce/plugins/image/plugin.js +1505 -0
  34. package/public/tinymce/plugins/image/plugin.min.js +4 -0
  35. package/public/tinymce/plugins/link/index.js +7 -0
  36. package/public/tinymce/plugins/link/plugin.js +1242 -0
  37. package/public/tinymce/plugins/link/plugin.min.js +4 -0
  38. package/public/tinymce/plugins/lists/index.js +7 -0
  39. package/public/tinymce/plugins/lists/plugin.js +2172 -0
  40. package/public/tinymce/plugins/lists/plugin.min.js +4 -0
  41. package/public/tinymce/plugins/table/index.js +7 -0
  42. package/public/tinymce/plugins/table/plugin.js +3462 -0
  43. package/public/tinymce/plugins/table/plugin.min.js +4 -0
  44. package/public/tinymce/skins/content/default/content.css +61 -0
  45. package/public/tinymce/skins/content/default/content.js +2 -0
  46. package/public/tinymce/skins/content/default/content.min.css +1 -0
  47. package/public/tinymce/skins/ui/oxide/content.css +785 -0
  48. package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
  49. package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
  50. package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  51. package/public/tinymce/skins/ui/oxide/content.js +2 -0
  52. package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
  53. package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
  54. package/public/tinymce/skins/ui/oxide/skin.js +2 -0
  55. package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
  56. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  57. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  58. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  59. package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
  60. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
  61. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  62. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  63. package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
  64. package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  65. package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  66. package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  67. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  68. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  69. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  70. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  71. package/public/tinymce/themes/silver/index.js +7 -0
  72. package/public/tinymce/themes/silver/theme.js +30775 -0
  73. package/public/tinymce/themes/silver/theme.min.js +384 -0
  74. package/public/tinymce/tinymce.d.ts +3238 -0
  75. package/public/tinymce/tinymce.js +31779 -0
  76. package/public/tinymce/tinymce.min.js +384 -0
@@ -1,6 +1,19 @@
1
1
  import React from 'react';
2
2
  import { IAllProps } from '@tinymce/tinymce-react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import 'tinymce/icons/default';
5
+ import 'tinymce/themes/silver';
6
+ import 'tinymce/models/dom';
7
+ import 'tinymce/skins/ui/oxide/skin.css';
8
+ import 'tinymce/plugins/advlist';
9
+ import 'tinymce/plugins/code';
10
+ import 'tinymce/plugins/emoticons';
11
+ import 'tinymce/plugins/emoticons/js/emojis';
12
+ import 'tinymce/plugins/link';
13
+ import 'tinymce/plugins/lists';
14
+ import 'tinymce/plugins/table';
15
+ import 'tinymce/skins/ui/oxide/content.css';
16
+ import 'tinymce/skins/content/default/content.css';
4
17
  export interface EditorProps extends VariantProps<typeof editorVariants> {
5
18
  tinymceScriptSrc?: string;
6
19
  }
@@ -8,5 +21,6 @@ declare const editorVariants: (props?: ({
8
21
  scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
9
22
  size?: "small" | "medium" | "large" | null | undefined;
10
23
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
- export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLDivElement>>;
24
+ export declare const initTinyMCE: () => void;
25
+ export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLTextAreaElement>>;
12
26
  export default Editor;
@@ -22,11 +22,27 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
- import { forwardRef } from 'react';
26
- import { Editor as EditorUI } from '@tinymce/tinymce-react';
25
+ import { forwardRef, useEffect } from 'react';
27
26
  import { cva } from 'class-variance-authority';
28
27
  import { scalingVariants } from '../../../lib/constants';
29
- import { cn } from '../../../lib/utils/utils';
28
+ import tinymce from 'tinymce';
29
+ /* Default icons are required. After that, import custom icons if applicable */
30
+ import 'tinymce/icons/default';
31
+ /* Required TinyMCE components */
32
+ import 'tinymce/themes/silver';
33
+ import 'tinymce/models/dom';
34
+ /* Import a skin (can be a custom skin instead of the default) */
35
+ import 'tinymce/skins/ui/oxide/skin.css';
36
+ /* Import plugins */
37
+ import 'tinymce/plugins/advlist';
38
+ import 'tinymce/plugins/code';
39
+ import 'tinymce/plugins/emoticons';
40
+ import 'tinymce/plugins/emoticons/js/emojis';
41
+ import 'tinymce/plugins/link';
42
+ import 'tinymce/plugins/lists';
43
+ import 'tinymce/plugins/table';
44
+ import 'tinymce/skins/ui/oxide/content.css';
45
+ import 'tinymce/skins/content/default/content.css';
30
46
  var editorVariants = cva('', {
31
47
  variants: {
32
48
  scaling: __assign({}, scalingVariants),
@@ -41,13 +57,24 @@ var editorVariants = cva('', {
41
57
  size: 'medium',
42
58
  },
43
59
  });
60
+ export var initTinyMCE = function () {
61
+ if (typeof window !== 'undefined') {
62
+ tinymce.init({
63
+ selector: '#tinymce',
64
+ plugins: 'link table code',
65
+ toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | code',
66
+ skin: false,
67
+ tinymceScriptSrc: '',
68
+ src: '',
69
+ });
70
+ }
71
+ };
44
72
  export var Editor = forwardRef(function (_a, ref) {
45
73
  var className = _a.className, size = _a.size, scaling = _a.scaling, tinymceScriptSrc = _a.tinymceScriptSrc, props = __rest(_a, ["className", "size", "scaling", "tinymceScriptSrc"]);
46
- return (_jsx("div", { ref: ref, className: cn(editorVariants({ size: size, scaling: scaling }), className), children: _jsx(EditorUI, __assign({ tinymceScriptSrc: "/tinymce/tinymce.min.js", initialValue: "", init: {
47
- height: '100%',
48
- menubar: false,
49
- // plugins: ['image', 'code', 'link', 'table'],
50
- } }, props)) }));
74
+ useEffect(function () {
75
+ initTinyMCE();
76
+ }, []);
77
+ return _jsx("textarea", { id: "tinymce", ref: ref });
51
78
  });
52
79
  Editor.displayName = 'Editor';
53
80
  export default Editor;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"react";import{Editor as e}from"@tinymce/tinymce-react";import{cva as i}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as n}from"../../utils/utils.mjs";var c=function(){return c=Object.assign||function(t){for(var r,e=1,i=arguments.length;e<i;e++)for(var a in r=arguments[e])Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);return t},c.apply(this,arguments)},o=function(t,r){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)r.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(e[i[a]]=t[i[a]])}return e},s=i("",{variants:{scaling:c({},a),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),m=r((function(r,i){var a=r.className,m=r.size,l=r.scaling;r.tinymceScriptSrc;var p=o(r,["className","size","scaling","tinymceScriptSrc"]);return t("div",{ref:i,className:n(s({size:m,scaling:l}),a),children:t(e,c({tinymceScriptSrc:"/tinymce/tinymce.min.js",initialValue:"",init:{height:"100%",menubar:!1}},p))})}));m.displayName="Editor";export{m as Editor,m as default};
2
+ import{jsx as t}from"react/jsx-runtime";import{forwardRef as i,useEffect as e}from"react";import{cva as n}from"class-variance-authority";import{scalingVariants as r}from"../../constants.mjs";import o from"tinymce";import"tinymce/icons/default";import"tinymce/themes/silver";import"tinymce/models/dom";import"tinymce/skins/ui/oxide/skin.css";import"tinymce/plugins/advlist";import"tinymce/plugins/code";import"tinymce/plugins/emoticons";import"tinymce/plugins/emoticons/js/emojis";import"tinymce/plugins/link";import"tinymce/plugins/lists";import"tinymce/plugins/table";import"tinymce/skins/ui/oxide/content.css";import"tinymce/skins/content/default/content.css";var c=function(){return c=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t},c.apply(this,arguments)},s=function(t,i){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.indexOf(n)<0&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)i.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(e[n[r]]=t[n[r]])}return e};n("",{variants:{scaling:c({},r),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}});var m=function(){"undefined"!=typeof window&&o.init({selector:"#tinymce",plugins:"link table code",toolbar:"undo redo | formatselect | bold italic | alignleft aligncenter alignright | code",skin:!1,tinymceScriptSrc:"",src:""})},a=i((function(i,n){return i.className,i.size,i.scaling,i.tinymceScriptSrc,s(i,["className","size","scaling","tinymceScriptSrc"]),e((function(){m()}),[]),t("textarea",{id:"tinymce",ref:n})}));a.displayName="Editor";export{a as Editor,a as default,m as initTinyMCE};
3
3
  //# sourceMappingURL=index.mjs.map