@lotte-innovate/ui-component-test 0.2.63 → 0.2.65
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/components/BarChart/index.js +1 -0
- package/dist/lib/components/BarChart/index.mjs +1 -0
- package/dist/lib/components/BarChart/index.mjs.map +1 -1
- package/dist/lib/components/BubbleChart/index.js +1 -0
- package/dist/lib/components/BubbleChart/index.mjs +1 -0
- package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/components/DoughnutChart/index.js +1 -0
- package/dist/lib/components/DoughnutChart/index.mjs +1 -0
- package/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
- package/dist/lib/components/Editor/index.js +7 -7
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/components/LineChart/index.js +1 -0
- package/dist/lib/components/LineChart/index.mjs +1 -0
- package/dist/lib/components/LineChart/index.mjs.map +1 -1
- package/dist/lib/components/PieChart/index.js +1 -0
- package/dist/lib/components/PieChart/index.mjs +1 -0
- package/dist/lib/components/PieChart/index.mjs.map +1 -1
- package/dist/lib/components/RadarChart/index.js +1 -0
- package/dist/lib/components/RadarChart/index.mjs +1 -0
- package/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/components/Tree/index.d.ts +19 -0
- package/dist/lib/components/Tree/index.js +190 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as r}from"react/jsx-runtime";import{Bar as t}from"react-chartjs-2";import{Chart as o,CategoryScale as e,LinearScale as a,BarElement as i,Tooltip as s,Legend as n}from"chart.js/auto";import{scalingVariants as l}from"../../constants.mjs";import{cva as c}from"class-variance-authority";import{cn as d}from"../../utils/utils.mjs";import{chartColorList as m,chartAlphaColorList as p}from"../../color/constants.mjs";import{useDarkMode as f}from"../../utils/useDarkMode.mjs";var u=function(){return u=Object.assign||function(r){for(var t,o=1,e=arguments.length;o<e;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r},u.apply(this,arguments)},g=function(r,t){var o={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&t.indexOf(e)<0&&(o[e]=r[e]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(e=Object.getOwnPropertySymbols(r);a<e.length;a++)t.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(r,e[a])&&(o[e[a]]=r[e[a]])}return o};o.register(e,a,i,s,n);var h=c("",{variants:{scaling:u({},l)},defaultVariants:{scaling:"100%"}}),b=function(o){var e=o.className,a=o.title,i=o.datasets,s=o.labels,n=o.scaling,l=o.legend,c=o.width,b=o.height,x=o.indexAxis,y=o.appearance,j=void 0===y?"solid":y,v=o.isColorMixed,O=void 0===v||v,C=g(o,["className","title","datasets","labels","scaling","legend","width","height","indexAxis","appearance","isColorMixed"]),w=f()[1];return i.forEach((function(r,t){r.backgroundColor||(i[t]=u(u({},r),O?{backgroundColor:"solid"===j?m.mixed:p.mixed,borderColor:m.mixed}:{backgroundColor:"solid"===j?m.sorting:p.sorting,borderColor:m.sorting}))})),r(t,u({data:{labels:s,datasets:i},options:{plugins:{title:a,legend:l},indexAxis:x,scales:u({},w.linescale)},className:d(h({scaling:n}),e),width:c,height:b},C))};b.displayName="BarChart";export{b as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as t}from"react/jsx-runtime";import{Bubble as r}from"react-chartjs-2";import{Chart as a,registerables as e}from"chart.js";import{scalingVariants as o}from"../../constants.mjs";import{cva as i}from"class-variance-authority";import{chartColorList as s,chartAlphaColorList as l}from"../../color/constants.mjs";import n from"chartjs-plugin-datalabels";import{useDarkMode as c}from"../../utils/useDarkMode.mjs";import{cn as p}from"../../utils/utils.mjs";var d=function(){return d=Object.assign||function(t){for(var r,a=1,e=arguments.length;a<e;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},d.apply(this,arguments)},f=function(t,r){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(a[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(a[e[o]]=t[e[o]])}return a},m=function(t,r,a){if(a||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))};a.register.apply(a,m(m([],e,!1),[n],!1)),a.defaults.set("plugins.datalabels",{display:!1});var u=i("",{variants:{scaling:d({},o)},defaultVariants:{scaling:"100%"}}),g=function(a){var e=a.className,o=a.title,i=a.legend,n=a.datalabels,m=a.datasets,g=a.scaling,h=a.width,y=a.height,b=a.appearance,v=void 0===b?"solid":b,j=a.isColorMixed,O=void 0===j||j,x=f(a,["className","title","legend","datalabels","datasets","scaling","width","height","appearance","isColorMixed"]),w=c()[1],C=function(t,r){return"solid"===r?t?s.mixed:s.sorting:"soft"===r?t?l.mixed:l.sorting:void 0};return m.forEach((function(t,r){var a=C(O,v),e=C(O,"solid");a&&e&&(t.backgroundColor=a[r],t.borderColor=e[r])})),t(r,d({data:{datasets:m},options:{plugins:{title:o,legend:i,datalabels:n},scales:d({},w.linescale)},className:p(u({scaling:g}),e),width:h,height:y},x))};g.displayName="BubbleChart";export{g as BubbleChart,g as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as t}from"react/jsx-runtime";import{Doughnut as a}from"react-chartjs-2";import{Chart as r,ArcElement as e,Tooltip as o,Legend as s,plugins as l}from"chart.js/auto";import i from"chartjs-plugin-datalabels";import{cn as n}from"../../utils/utils.mjs";import{cva as c}from"class-variance-authority";import{scalingVariants as p}from"../../constants.mjs";import{chartColorList as d,chartAlphaColorList as m}from"../../color/constants.mjs";var f=function(){return f=Object.assign||function(t){for(var a,r=1,e=arguments.length;r<e;r++)for(var o in a=arguments[r])Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);return t},f.apply(this,arguments)},u=function(t,a){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&a.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)a.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r};r.register(e,o,s,l,i),r.defaults.set("plugins.datalabels",{display:!1});var g=c("",{variants:{scaling:f({},p)},defaultVariants:{scaling:"100%"}}),b=function(r){var e=r.labels,o=r.title,s=r.legend,l=r.datasets,i=r.datalabels,c=r.scaling,p=r.className,b=r.appearance,y=void 0===b?"solid":b,j=r.isColorMixed,v=void 0===j||j,h=u(r,["labels","title","legend","datasets","datalabels","scaling","className","appearance","isColorMixed"]),O=function(t,a){return"solid"===a?t?d.mixed:d.sorting:"soft"===a?t?m.mixed:m.sorting:void 0};return l.forEach((function(t,a){l[a]=f(f({},t),{backgroundColor:O(v,y),borderColor:O(v,"solid")})})),t(a,f({data:{labels:e,datasets:l},options:{plugins:{title:o,legend:s,datalabels:i}},className:n(g({scaling:c}),p)},h))};b.displayName="DoughnutChart";export{b as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -68,13 +68,13 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
68
68
|
radiusTheme = '12px';
|
69
69
|
if (editorStyle.radius === 'full')
|
70
70
|
radiusTheme = '16px';
|
71
|
-
useEffect(
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}, []);
|
71
|
+
// useEffect(() => {
|
72
|
+
// if (typeof window !== 'undefined') {
|
73
|
+
// loadTinyMCE().then(() => {
|
74
|
+
// setIsClient(true);
|
75
|
+
// });
|
76
|
+
// }
|
77
|
+
// }, []);
|
78
78
|
useEffect(function () {
|
79
79
|
if (editorRef.current) {
|
80
80
|
var editorContainer = editorRef.current.getContainer();
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as i}from"react/jsx-runtime";import{forwardRef as t,useState as n,useRef as e,useEffect as o}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as s}from"class-variance-authority";import"tinymce/tinymce.js";import"tinymce/themes/silver/theme.js";import"tinymce/models/dom/model.js";import"tinymce/icons/default/icons.js";import"tinymce/plugins/advlist/plugin.js";import"tinymce/plugins/code/plugin.js";import"tinymce/plugins/codesample/plugin.js";import"tinymce/plugins/link/plugin.js";import"tinymce/plugins/lists/plugin.js";import"tinymce/plugins/table/plugin.js";import"tinymce/plugins/image/plugin.js";import"tinymce/plugins/preview/plugin.js";import"tinymce/plugins/importcss/plugin.js";import"tinymce/plugins/searchreplace/plugin.js";import"tinymce/plugins/autolink/plugin.js";import"tinymce/plugins/autosave/plugin.js";import"tinymce/plugins/save/plugin.js";import"tinymce/plugins/directionality/plugin.js";import"tinymce/plugins/visualblocks/plugin.js";import"tinymce/plugins/visualchars/plugin.js";import"tinymce/plugins/fullscreen/plugin.js";import"tinymce/plugins/media/plugin.js";import"tinymce/plugins/charmap/plugin.js";import"tinymce/plugins/pagebreak/plugin.js";import"tinymce/plugins/nonbreaking/plugin.js";import"tinymce/plugins/anchor/plugin.js";import"tinymce/plugins/insertdatetime/plugin.js";import"tinymce/plugins/wordcount/plugin.js";import"tinymce/plugins/quickbars/plugin.js";import"tinymce/plugins/emoticons/plugin.js";import"tinymce/plugins/accordion/plugin.js";import"../../utils/langs/ko_KR.mjs";import"../../utils/langs/it.mjs";import"../../utils/langs/ja.mjs";import"../../utils/langs/vi.mjs";import"../../utils/langs/zh_CN.mjs";import{radiusVariants as a,scalingVariants as l}from"../../constants.mjs";import{cn as m}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";import{marked as p}from"marked";import"tinymce/skins/ui/oxide/skin.css";import u from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import g from"!!raw-loader!tinymce/skins/content/default/content.css";var d=function(){return d=Object.assign||function(i){for(var t,n=1,e=arguments.length;n<e;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o]);return i},d.apply(this,arguments)},y=function(i,t){var n={};for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.indexOf(e)<0&&(n[e]=i[e]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(i);o<e.length;o++)t.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(i,e[o])&&(n[e[o]]=i[e[o]])}return n},f=s("",{variants:{radius:d({},a.base),scaling:d({},l),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),j=t((function(t,s){var a=t.className,l=t.size,j=t.scaling,v=t.radius,h=t.init,b=t.language,k=void 0===b?"en":b,w=y(t,["className","size","scaling","radius","init","language"]),x=n(!1);x[0],x[1];var _=e(null),O=c().theme,N={radius:null!=v?v:O.themeRadius,scaling:null!=j?j:O.themeScaling,size:l},z="8px";return"none"===N.radius&&(z="0px"),"small"===N.radius&&(z="4px"),"large"===N.radius&&(z="12px"),"full"===N.radius&&(z="16px"),o((function(){
|
2
|
+
import{jsx as i}from"react/jsx-runtime";import{forwardRef as t,useState as n,useRef as e,useEffect as o}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as s}from"class-variance-authority";import"tinymce/tinymce.js";import"tinymce/themes/silver/theme.js";import"tinymce/models/dom/model.js";import"tinymce/icons/default/icons.js";import"tinymce/plugins/advlist/plugin.js";import"tinymce/plugins/code/plugin.js";import"tinymce/plugins/codesample/plugin.js";import"tinymce/plugins/link/plugin.js";import"tinymce/plugins/lists/plugin.js";import"tinymce/plugins/table/plugin.js";import"tinymce/plugins/image/plugin.js";import"tinymce/plugins/preview/plugin.js";import"tinymce/plugins/importcss/plugin.js";import"tinymce/plugins/searchreplace/plugin.js";import"tinymce/plugins/autolink/plugin.js";import"tinymce/plugins/autosave/plugin.js";import"tinymce/plugins/save/plugin.js";import"tinymce/plugins/directionality/plugin.js";import"tinymce/plugins/visualblocks/plugin.js";import"tinymce/plugins/visualchars/plugin.js";import"tinymce/plugins/fullscreen/plugin.js";import"tinymce/plugins/media/plugin.js";import"tinymce/plugins/charmap/plugin.js";import"tinymce/plugins/pagebreak/plugin.js";import"tinymce/plugins/nonbreaking/plugin.js";import"tinymce/plugins/anchor/plugin.js";import"tinymce/plugins/insertdatetime/plugin.js";import"tinymce/plugins/wordcount/plugin.js";import"tinymce/plugins/quickbars/plugin.js";import"tinymce/plugins/emoticons/plugin.js";import"tinymce/plugins/accordion/plugin.js";import"../../utils/langs/ko_KR.mjs";import"../../utils/langs/it.mjs";import"../../utils/langs/ja.mjs";import"../../utils/langs/vi.mjs";import"../../utils/langs/zh_CN.mjs";import{radiusVariants as a,scalingVariants as l}from"../../constants.mjs";import{cn as m}from"../../utils/utils.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";import{marked as p}from"marked";import"tinymce/skins/ui/oxide/skin.css";import u from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import g from"!!raw-loader!tinymce/skins/content/default/content.css";var d=function(){return d=Object.assign||function(i){for(var t,n=1,e=arguments.length;n<e;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o]);return i},d.apply(this,arguments)},y=function(i,t){var n={};for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.indexOf(e)<0&&(n[e]=i[e]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(i);o<e.length;o++)t.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(i,e[o])&&(n[e[o]]=i[e[o]])}return n},f=s("",{variants:{radius:d({},a.base),scaling:d({},l),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),j=t((function(t,s){var a=t.className,l=t.size,j=t.scaling,v=t.radius,h=t.init,b=t.language,k=void 0===b?"en":b,w=y(t,["className","size","scaling","radius","init","language"]),x=n(!1);x[0],x[1];var _=e(null),O=c().theme,N={radius:null!=v?v:O.themeRadius,scaling:null!=j?j:O.themeScaling,size:l},z="8px";return"none"===N.radius&&(z="0px"),"small"===N.radius&&(z="4px"),"large"===N.radius&&(z="12px"),"full"===N.radius&&(z="16px"),o((function(){if(_.current){var i=_.current.getContainer();i&&(i.style.borderRadius="".concat(z))}}),[z]),i("div",{className:m(f(N),a),ref:s,children:i(r,d({onInit:function(i,t){return _.current=t},init:d({language:k,width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media 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(u,"\n").concat(g,"\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"),setup:function(i){i.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){i.formatter.toggle("code")}}),i.on("init",(function(){i.formatter.register("code",{inline:"code",remove:"all"})})),i.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=i.getContent({format:"text"}),n=p(t);i.setContent(n)}}),i.on("init",(function(){i.getContainer().style.borderRadius=z}))}},h)},w))})}));j.displayName="Editor";export{j as Editor,j as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as t}from"react/jsx-runtime";import{Line as r}from"react-chartjs-2";import{Chart as e,CategoryScale as o,LinearScale as a,LineElement as i,PointElement as s,Tooltip as l,Legend as n}from"chart.js/auto";import{scalingVariants as c}from"../../constants.mjs";import{cva as d}from"class-variance-authority";import{cn as p}from"../../utils/utils.mjs";import{chartColorList as m,chartAlphaColorList as u}from"../../color/constants.mjs";import{useDarkMode as f}from"../../utils/useDarkMode.mjs";var g=function(){return g=Object.assign||function(t){for(var r,e=1,o=arguments.length;e<o;e++)for(var a in r=arguments[e])Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);return t},g.apply(this,arguments)},h=function(t,r){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(t);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(e[o[a]]=t[o[a]])}return e};e.register(o,a,i,s,l,n);var b=d("",{variants:{scaling:g({},c)},defaultVariants:{scaling:"100%"}}),v=function(e){var o=e.className,a=e.title,i=e.datasets,s=e.labels,l=e.scaling,n=e.legend,c=e.width,d=e.height,v=e.indexAxis,x=e.appearance,y=void 0===x?"solid":x,j=e.scales,O=e.isColorMixed,w=void 0===O||O,C=h(e,["className","title","datasets","labels","scaling","legend","width","height","indexAxis","appearance","scales","isColorMixed"]),N=f()[1],P=w?m.mixed:m.sorting,k=w?u.mixed:u.sorting;return i.forEach((function(t,r){var e,o;i[r]=g(g({},t),{borderColor:null!==(e=t.borderColor)&&void 0!==e?e:P[r%P.length],backgroundColor:(null!==(o=t.backgroundColor)&&void 0!==o?o:"solid"==y)?P[r%P.length]:k[r%P.length]})})),t(r,g({data:{labels:s,datasets:i},options:{plugins:{title:a,legend:n},indexAxis:v,scales:g(g({},N.linescale),j)},className:p(b({scaling:l}),o),width:c,height:d},C))};v.displayName="LineChart";export{v as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as t}from"react/jsx-runtime";import{Pie as a}from"react-chartjs-2";import{Chart as r,ArcElement as e,Tooltip as o,Legend as s,plugins as l}from"chart.js";import i from"chartjs-plugin-datalabels";import{cn as n}from"../../utils/utils.mjs";import{cva as c}from"class-variance-authority";import{scalingVariants as p}from"../../constants.mjs";import{chartColorList as d,chartAlphaColorList as m}from"../../color/constants.mjs";var f=function(){return f=Object.assign||function(t){for(var a,r=1,e=arguments.length;r<e;r++)for(var o in a=arguments[r])Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);return t},f.apply(this,arguments)},u=function(t,a){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&a.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)a.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r};r.register(e,o,s,l,i),r.defaults.set("plugins.datalabels",{display:!1});var g=c("",{variants:{scaling:f({},p)},defaultVariants:{scaling:"100%"}}),b=function(r){var e=r.labels,o=r.title,s=r.legend,l=r.datasets,i=r.datalabels,c=r.scaling,p=r.className,b=r.appearance,y=void 0===b?"solid":b,j=r.isColorMixed,v=void 0===j||j,O=u(r,["labels","title","legend","datasets","datalabels","scaling","className","appearance","isColorMixed"]),h=function(t,a){return"solid"===a?t?d.mixed:d.sorting:"soft"===a?t?m.mixed:m.sorting:void 0};return l.forEach((function(t,a){l[a]=f(f({},t),{backgroundColor:h(v,y),borderColor:h(v,"solid")})})),t(a,f({data:{labels:e,datasets:l},options:{plugins:{title:o,legend:s,datalabels:i}},className:n(g({scaling:c}),p)},O))};b.displayName="PieChart";export{b as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,2 +1,3 @@
|
|
1
|
+
"use client";
|
1
2
|
import{jsx as t}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";import{scalingVariants as r}from"../../constants.mjs";import{Radar as e}from"react-chartjs-2";import{cn as o}from"../../utils/utils.mjs";import{Chart as s,registerables as l}from"chart.js";import{chartColorList as i,chartAlphaColorList as n}from"../../color/constants.mjs";import{useDarkMode as c}from"../../utils/useDarkMode.mjs";import p from"chartjs-plugin-datalabels";var d=function(){return d=Object.assign||function(t){for(var a,r=1,e=arguments.length;r<e;r++)for(var o in a=arguments[r])Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);return t},d.apply(this,arguments)},f=function(t,a){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&a.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)a.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r},m=function(t,a,r){if(r||2===arguments.length)for(var e,o=0,s=a.length;o<s;o++)!e&&o in a||(e||(e=Array.prototype.slice.call(a,0,o)),e[o]=a[o]);return t.concat(e||Array.prototype.slice.call(a))};s.register.apply(s,m(m([],l,!1),[p],!1)),s.defaults.set("plugins.datalabels",{display:!1});var u=a("",{variants:{scaling:d({},r)},defaultVariants:{scaling:"100%"}}),g=function(a){var r=a.className,s=a.title,l=a.legend,p=a.datalabels,m=a.datasets,g=a.labels,h=a.width,y=a.height,b=a.scaling,v=a.appearance,j=void 0===v?"solid":v,O=a.isColorMixed,x=void 0===O||O,w=f(a,["className","title","legend","datalabels","datasets","labels","width","height","scaling","appearance","isColorMixed"]),C=c(!0)[1],M=function(t,a){return"solid"===a?t?i.mixed:i.sorting:"soft"===a?t?n.mixed:n.sorting:void 0};return m.forEach((function(t,a){var r=M(x,j),e=M(x,"solid");r&&e&&(t.backgroundColor=r[a],t.borderColor=e[a])})),t(e,d({data:{labels:g,datasets:m},options:{plugins:{title:s,legend:l,datalabels:p},scales:d({r:{suggestedMin:50,suggestedMax:100}},C.linescale)},className:o(u({scaling:b}),r),width:h,height:y},w))};g.displayName="RadarChart";export{g as RadarChart,g as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
2
|
+
import { IColor } from '../../../lib/types';
|
3
|
+
import React from 'react';
|
4
|
+
import { StaticTreeDataProvider } from 'react-complex-tree';
|
5
|
+
import 'react-complex-tree/lib/style-modern.css';
|
6
|
+
export interface TreeProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof treeVariants> {
|
7
|
+
color?: IColor;
|
8
|
+
items: any;
|
9
|
+
treeId: string;
|
10
|
+
isSearch?: boolean;
|
11
|
+
}
|
12
|
+
declare const treeVariants: (props?: ({
|
13
|
+
color?: string | null | undefined;
|
14
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
15
|
+
declare let treeProvider: StaticTreeDataProvider | null;
|
16
|
+
declare const Tree: React.ForwardRefExoticComponent<Omit<Omit<import("react-complex-tree").UncontrolledTreeEnvironmentProps<unknown, string> & {
|
17
|
+
ref?: React.Ref<import("react-complex-tree").TreeEnvironmentRef<unknown, string>> | undefined;
|
18
|
+
}, "ref">, "children" | "viewState" | "canSearch" | "dataProvider"> & TreeProps & React.RefAttributes<import("react-complex-tree").TreeEnvironmentRef<unknown, string>>>;
|
19
|
+
export { Tree, treeProvider };
|
@@ -0,0 +1,190 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
19
|
+
});
|
20
|
+
};
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
25
|
+
function step(op) {
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
28
|
+
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;
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
30
|
+
switch (op[0]) {
|
31
|
+
case 0: case 1: t = op; break;
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
35
|
+
default:
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
40
|
+
if (t[2]) _.ops.pop();
|
41
|
+
_.trys.pop(); continue;
|
42
|
+
}
|
43
|
+
op = body.call(thisArg, _);
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
46
|
+
}
|
47
|
+
};
|
48
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
49
|
+
var t = {};
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
51
|
+
t[p] = s[p];
|
52
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
53
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
55
|
+
t[p[i]] = s[p[i]];
|
56
|
+
}
|
57
|
+
return t;
|
58
|
+
};
|
59
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
60
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
61
|
+
if (ar || !(i in from)) {
|
62
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
63
|
+
ar[i] = from[i];
|
64
|
+
}
|
65
|
+
}
|
66
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
67
|
+
};
|
68
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
69
|
+
import { cva } from 'class-variance-authority';
|
70
|
+
import { primaryColorStyle } from '../../../lib/constants';
|
71
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
72
|
+
import { StaticTreeDataProvider, Tree as ComplexTree, UncontrolledTreeEnvironment, } from 'react-complex-tree';
|
73
|
+
import 'react-complex-tree/lib/style-modern.css';
|
74
|
+
import TextField from '../TextField';
|
75
|
+
import Button from '../Button';
|
76
|
+
import { MAIN_COLOR } from '../../../lib/color/constants';
|
77
|
+
import { useTheme } from '../../../lib/theme';
|
78
|
+
var treeVariants = cva('', {
|
79
|
+
variants: {
|
80
|
+
color: primaryColorStyle(),
|
81
|
+
},
|
82
|
+
});
|
83
|
+
function findItems(arr, key) {
|
84
|
+
var results = [];
|
85
|
+
Object.values(arr).forEach(function (item) {
|
86
|
+
if (item[key]) {
|
87
|
+
results.push(item.index);
|
88
|
+
}
|
89
|
+
});
|
90
|
+
return results;
|
91
|
+
}
|
92
|
+
var treeProvider = null;
|
93
|
+
var Tree = React.forwardRef(function (_a, ref) {
|
94
|
+
var _b;
|
95
|
+
var _c, _d;
|
96
|
+
var items = _a.items, treeId = _a.treeId, className = _a.className, color = _a.color, isSearch = _a.isSearch, props = __rest(_a, ["items", "treeId", "className", "color", "isSearch"]);
|
97
|
+
var _e = useState(''), search = _e[0], setSearch = _e[1];
|
98
|
+
var tree = useRef(null);
|
99
|
+
var _f = useState({}), treeData = _f[0], setTreeData = _f[1];
|
100
|
+
var focusedItem = findItems(items, 'isFocusd');
|
101
|
+
var expandedItems = findItems(items, 'isExpanded');
|
102
|
+
var selectedItems = findItems(items, 'isSelected');
|
103
|
+
treeProvider = new StaticTreeDataProvider(treeData, function (item, data) { return (__assign(__assign({}, item), { data: data })); });
|
104
|
+
var theme = useTheme().theme;
|
105
|
+
var contextValue = {
|
106
|
+
color: (_c = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _c !== void 0 ? _c : MAIN_COLOR,
|
107
|
+
};
|
108
|
+
var findItemPath = useCallback(function (search_1) {
|
109
|
+
var args_1 = [];
|
110
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
111
|
+
args_1[_i - 1] = arguments[_i];
|
112
|
+
}
|
113
|
+
return __awaiter(void 0, __spreadArray([search_1], args_1, true), void 0, function (search, searchRoot) {
|
114
|
+
var item, searchedItems, result;
|
115
|
+
var _a, _b;
|
116
|
+
if (searchRoot === void 0) { searchRoot = 'root'; }
|
117
|
+
return __generator(this, function (_c) {
|
118
|
+
switch (_c.label) {
|
119
|
+
case 0:
|
120
|
+
if (!treeProvider)
|
121
|
+
return [2 /*return*/];
|
122
|
+
return [4 /*yield*/, treeProvider.getTreeItem(searchRoot)];
|
123
|
+
case 1:
|
124
|
+
item = _c.sent();
|
125
|
+
if (item.data.toLowerCase().includes(search.toLowerCase())) {
|
126
|
+
return [2 /*return*/, [item.index]];
|
127
|
+
}
|
128
|
+
return [4 /*yield*/, Promise.all((_b = (_a = item.children) === null || _a === void 0 ? void 0 : _a.map(function (child) { return findItemPath(search, child); })) !== null && _b !== void 0 ? _b : [])];
|
129
|
+
case 2:
|
130
|
+
searchedItems = _c.sent();
|
131
|
+
result = searchedItems.find(function (item) { return item !== null; });
|
132
|
+
if (!result) {
|
133
|
+
return [2 /*return*/, null];
|
134
|
+
}
|
135
|
+
return [2 /*return*/, __spreadArray([item.index], result, true)];
|
136
|
+
}
|
137
|
+
});
|
138
|
+
});
|
139
|
+
}, [treeProvider]);
|
140
|
+
var find = useCallback(function (e) {
|
141
|
+
e.preventDefault();
|
142
|
+
if (search) {
|
143
|
+
findItemPath(search).then(function (path) {
|
144
|
+
var _a;
|
145
|
+
if (path) {
|
146
|
+
// wait for full path including leaf, to make sure it loaded in
|
147
|
+
(_a = tree.current) === null || _a === void 0 ? void 0 : _a.expandSubsequently(path).then(function () {
|
148
|
+
var _a, _b;
|
149
|
+
(_a = tree.current) === null || _a === void 0 ? void 0 : _a.selectItems([path[path.length - 1]]);
|
150
|
+
(_b = tree.current) === null || _b === void 0 ? void 0 : _b.focusItem(path[path.length - 1]);
|
151
|
+
});
|
152
|
+
}
|
153
|
+
});
|
154
|
+
}
|
155
|
+
}, [findItemPath, search]);
|
156
|
+
useEffect(function () {
|
157
|
+
if (items) {
|
158
|
+
var results_1 = [];
|
159
|
+
var children_1 = [];
|
160
|
+
items.map(function (item) {
|
161
|
+
children_1.push.apply(children_1, item.children);
|
162
|
+
});
|
163
|
+
items.forEach(function (item) {
|
164
|
+
if (!children_1.includes(item.index)) {
|
165
|
+
results_1.push(item.index);
|
166
|
+
}
|
167
|
+
});
|
168
|
+
var t_1 = {};
|
169
|
+
t_1['root'] = {
|
170
|
+
index: 'root',
|
171
|
+
isFolder: true,
|
172
|
+
children: results_1,
|
173
|
+
data: 'Root item',
|
174
|
+
};
|
175
|
+
items.map(function (item) {
|
176
|
+
t_1[item.index] = __assign(__assign({}, item), { isFolder: item.children.length > 0 });
|
177
|
+
});
|
178
|
+
setTreeData(t_1);
|
179
|
+
}
|
180
|
+
}, [items]);
|
181
|
+
return (_jsxs("div", { className: "text-slate-12", children: [_jsx("style", { children: "\n :root {\n --rct-bar-color: \"\";\n }\n " }), isSearch && (_jsxs("div", { className: "flex", children: [_jsx(TextField.Root, { color: contextValue.color, value: search, onChange: function (e) { return setSearch(e.target.value); }, placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694", className: "mr-2" }), _jsx(Button, { color: contextValue.color, onClick: find, children: "\uAC80\uC0C9" })] })), _jsx(UncontrolledTreeEnvironment, __assign({ ref: ref, dataProvider: treeProvider, viewState: (_b = {},
|
182
|
+
_b[treeId] = {
|
183
|
+
focusedItem: (_d = focusedItem[0]) !== null && _d !== void 0 ? _d : '',
|
184
|
+
expandedItems: expandedItems,
|
185
|
+
selectedItems: selectedItems,
|
186
|
+
},
|
187
|
+
_b), keyboardBindings: __assign({ renameItem: ['enter'], abortRenameItem: ['control+z'] }, props.keyboardBindings) }, props, { canSearch: false, children: _jsx(ComplexTree, { ref: tree, treeId: treeId, rootItem: "root", treeLabel: "Tree Example" }) }))] }));
|
188
|
+
});
|
189
|
+
Tree.displayName = 'Tree';
|
190
|
+
export { Tree, treeProvider };
|