@lotte-innovate/ui-component-test 0.0.157 → 0.0.158

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/README.md +8 -9
  2. package/dist/globals.css +2 -2
  3. package/dist/lib/Typography/Text/index.mjs +1 -1
  4. package/dist/lib/color/constants.js +1 -1
  5. package/dist/lib/color/constants.mjs +1 -1
  6. package/dist/lib/color/constants.mjs.map +1 -1
  7. package/dist/lib/components/Avatar/index.js +1 -0
  8. package/dist/lib/components/Avatar/index.mjs +1 -1
  9. package/dist/lib/components/Badge/index.js +3 -3
  10. package/dist/lib/components/Badge/index.mjs +1 -1
  11. package/dist/lib/components/Box/index.js +2 -2
  12. package/dist/lib/components/Box/index.mjs +1 -1
  13. package/dist/lib/components/Box/index.mjs.map +1 -1
  14. package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +2 -2
  15. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +1 -1
  16. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  17. package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +3 -3
  18. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +1 -1
  19. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  20. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.js +2 -2
  21. package/dist/lib/components/Breadcrumb/BreadcrumbRoot.mjs +1 -1
  22. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +1 -1
  23. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
  24. package/dist/lib/components/Container/index.js +2 -2
  25. package/dist/lib/components/Container/index.mjs +1 -1
  26. package/dist/lib/components/Container/index.mjs.map +1 -1
  27. package/dist/lib/components/Datepicker/index.d.ts +2 -1
  28. package/dist/lib/components/Datepicker/index.js +6 -3
  29. package/dist/lib/components/Datepicker/index.mjs +1 -1
  30. package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
  31. package/dist/lib/components/Dialog/DialogCancel.js +1 -1
  32. package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
  33. package/dist/lib/components/Dialog/DialogContent.js +1 -1
  34. package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
  35. package/dist/lib/components/Dialog/DialogRoot.d.ts +2 -2
  36. package/dist/lib/components/Dialog/DialogTrigger.js +1 -0
  37. package/dist/lib/components/Dialog/DialogTrigger.mjs +1 -0
  38. package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  39. package/dist/lib/components/Dialog/index.d.ts +1 -1
  40. package/dist/lib/components/Dialog/index.js +16 -16
  41. package/dist/lib/components/Dialog/index.mjs.map +1 -1
  42. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +3 -3
  43. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
  44. package/dist/lib/components/Editor/index.d.ts +0 -1
  45. package/dist/lib/components/Editor/index.js +11 -2
  46. package/dist/lib/components/Editor/index.mjs +1 -1
  47. package/dist/lib/components/Flex/index.js +2 -2
  48. package/dist/lib/components/Flex/index.mjs +1 -1
  49. package/dist/lib/components/Flex/index.mjs.map +1 -1
  50. package/dist/lib/components/Gnb/GnbInfo.js +2 -2
  51. package/dist/lib/components/Gnb/GnbInfo.mjs +1 -1
  52. package/dist/lib/components/Gnb/GnbLogo.js +1 -1
  53. package/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  54. package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  55. package/dist/lib/components/Gnb/GnbMenuItem.js +1 -1
  56. package/dist/lib/components/Gnb/GnbMenuItem.mjs +1 -1
  57. package/dist/lib/components/Grid/NumberingPagination.js +64 -22
  58. package/dist/lib/components/Grid/NumberingPagination.mjs +1 -1
  59. package/dist/lib/components/Grid/NumberingPagination.mjs.map +1 -1
  60. package/dist/lib/components/Grid/index.d.ts +1 -0
  61. package/dist/lib/components/Grid/index.js +57 -39
  62. package/dist/lib/components/Grid/index.mjs +1 -1
  63. package/dist/lib/components/Grid/useGrid.js +30 -14
  64. package/dist/lib/components/Grid/useGrid.mjs +1 -1
  65. package/dist/lib/components/IconButton/index.js +10 -10
  66. package/dist/lib/components/IconButton/index.mjs +1 -1
  67. package/dist/lib/components/Modal/ModalAction.js +1 -1
  68. package/dist/lib/components/Modal/ModalAction.mjs +1 -1
  69. package/dist/lib/components/Modal/ModalCancel.mjs +1 -1
  70. package/dist/lib/components/Modal/ModalTitle.js +1 -1
  71. package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
  72. package/dist/lib/components/Radio/index.js +3 -2
  73. package/dist/lib/components/Radio/index.mjs +1 -1
  74. package/dist/lib/components/SearchBar/index.js +2 -2
  75. package/dist/lib/components/SearchBar/index.mjs +1 -1
  76. package/dist/lib/components/Select/index.d.ts +2 -2
  77. package/dist/lib/components/Select/index.js +1 -1
  78. package/dist/lib/components/Select/index.mjs +1 -1
  79. package/dist/lib/components/SideBar/index.d.ts +27 -0
  80. package/dist/lib/components/SideBar/index.js +17 -4
  81. package/dist/lib/components/SideBar/index.mjs +1 -1
  82. package/dist/lib/components/Table/index.d.ts +1 -1
  83. package/dist/lib/components/Table/index.js +17 -10
  84. package/dist/lib/components/Table/index.mjs +1 -1
  85. package/dist/lib/components/Tabs/DynamicTabs.d.ts +4 -2
  86. package/dist/lib/components/Tabs/DynamicTabs.js +21 -16
  87. package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
  88. package/dist/lib/components/TextField/index.js +3 -5
  89. package/dist/lib/components/TextField/index.mjs +1 -1
  90. package/dist/lib/components/Tree/index.d.ts +1 -0
  91. package/dist/lib/components/Tree/index.js +22 -1
  92. package/dist/lib/components/Tree/index.mjs +1 -1
  93. package/dist/lib/components/Tree/index.mjs.map +1 -1
  94. package/dist/lib/index.mjs +1 -1
  95. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  96. package/dist/lib/utils/useLoadTinyMCE.d.ts +1 -37
  97. package/dist/lib/utils/useLoadTinyMCE.js +151 -36
  98. package/dist/lib/utils/useLoadTinyMCE.mjs +2 -0
  99. package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -0
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +1 -1
  102. package/dist/lib/is-client-ctx.d.ts +0 -4
  103. package/dist/lib/is-client-ctx.js +0 -11
  104. package/dist/lib/is-client-ctx.mjs +0 -2
  105. package/dist/lib/is-client-ctx.mjs.map +0 -1
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as r,Fragment as e,jsxs as o}from"react/jsx-runtime";import a,{useState as t}from"react";import{cva as i}from"class-variance-authority";import{cn as n}from"../../utils/utils.mjs";import{radiusVariants as l,bgColorStyle as s}from"../../constants.mjs";import{Theme as c,TextField as u}from"@radix-ui/themes";import{useTheme as d}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as m}from"../../color/constants.mjs";import p from"../../Typography/Text/index.mjs";import{IconButton as f}from"../IconButton/index.mjs";import{EyeOpenIcon as h,EyeClosedIcon as g}from"@radix-ui/react-icons";import{useIsClient as v}from"../../is-client-ctx.mjs";var y=function(){return y=Object.assign||function(r){for(var e,o=1,a=arguments.length;o<a;o++)for(var t in e=arguments[o])Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r},y.apply(this,arguments)},x=function(r,e){var o={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&e.indexOf(a)<0&&(o[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(a=Object.getOwnPropertySymbols(r);t<a.length;t++)e.indexOf(a[t])<0&&Object.prototype.propertyIsEnumerable.call(r,a[t])&&(o[a[t]]=r[a[t]])}return o},j=i("",{variants:{radius:y({},l.base),color:s()}}),w=a.forwardRef((function(a,i){var l,s,w,b=a.className,N=a.color,T=a.size,z=a.appearance,S=a.scaling,R=a.radius,B=a.children,C=a.validationType,P=a.regex,M=a.warningMessage,F=a.onChange,I=a.onBlur,$=x(a,["className","color","size","appearance","scaling","radius","children","validationType","regex","warningMessage","onChange","onBlur"]),k=d().theme,D=t(!1),E=D[0],U=D[1],V=t(null!==(l=$.defaultValue)&&void 0!==l?l:""),_=V[0],q=V[1],A=t(!1),G=A[0],H=A[1],J="2";"small"===T&&(J="1"),"large"===T&&(J="3");var K={scaling:null!==(s=null!=S?S:k.themeScaling)&&void 0!==s?s:"100%",radius:null!=R?R:k.themeRadius,color:null!==(w=null!=N?N:k.themeColor)&&void 0!==w?w:m},L=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,Q=/^[0-9]+$/,W="";return"number"==C&&(W="숫자만 입력 가능합니다."),"email"==C&&(W="이메일 형식에 어긋납니다."),v()?o("div",{children:[r(c,{scaling:K.scaling,accentColor:K.color,hasBackground:!1,children:o(u.Root,y({ref:i,variant:z,size:J,type:"password"!==C||G?"text":"password",radius:K.radius,color:K.color,className:n(j({radius:K.radius}),b),onChange:function(r){r.target.value&&P?U(!0):"number"!=C||!r.target.value||P||Q.test(r.target.value)?(U(!1),q(r.target.value),F&&F(r)):U(!0)},value:_,onBlur:function(r){I&&I(r),"email"!=C||!r.target.value||L.test(r.target.value)?U(!1):U(!0)}},$,{children:[B,"password"==C&&r(O.Slot,{side:"right",children:r(f,{appearance:"ghost",color:"slate",onMouseDown:function(r){return H(!0)},onMouseUp:function(r){return H(!1)},children:r(G?h:g,{height:"14",width:"14"})})})]}))}),E&&r(p,{size:"1",color:K.color,children:M||W})]}):r(e,{})}));w.displayName="TextField.Root";var b=a.forwardRef((function(e,o){var a=e.className,t=e.color,i=e.side,l=e.radius,s=e.children,c=x(e,["className","color","side","radius","children"]);return r(u.Slot,y({ref:o,color:t,side:i,className:n(j({radius:l}),a)},c,{children:s}))}));b.displayName="TextField.Slot";var O={Root:w,Slot:b};export{w as Root,b as Slot,O as default};
2
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import o,{useState as a}from"react";import{cva as t}from"class-variance-authority";import{cn as n}from"../../utils/utils.mjs";import{radiusVariants as i,bgColorStyle as l}from"../../constants.mjs";import{Theme as s,TextField as c}from"@radix-ui/themes";import{useTheme as u}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";import{Text as m}from"../../Typography/Text/index.mjs";import{IconButton as p}from"../IconButton/index.mjs";import{EyeOpenIcon as f,EyeClosedIcon as h}from"@radix-ui/react-icons";var g=function(){return g=Object.assign||function(r){for(var e,o=1,a=arguments.length;o<a;o++)for(var t in e=arguments[o])Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r},g.apply(this,arguments)},v=function(r,e){var o={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&e.indexOf(a)<0&&(o[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(a=Object.getOwnPropertySymbols(r);t<a.length;t++)e.indexOf(a[t])<0&&Object.prototype.propertyIsEnumerable.call(r,a[t])&&(o[a[t]]=r[a[t]])}return o},y=t("",{variants:{radius:g({},i.base),color:l()}}),x=o.forwardRef((function(o,t){var i,l,x,w=o.className,b=o.color,O=o.size,N=o.appearance,T=o.scaling,z=o.radius,S=o.children,R=o.validationType,B=o.regex,C=o.warningMessage,P=o.onChange,M=o.onBlur,F=v(o,["className","color","size","appearance","scaling","radius","children","validationType","regex","warningMessage","onChange","onBlur"]),I=u().theme,$=a(!1),k=$[0],D=$[1],E=a(null!==(i=F.defaultValue)&&void 0!==i?i:""),U=E[0],V=E[1],_=a(!1),q=_[0],A=_[1],G="2";"small"===O&&(G="1"),"large"===O&&(G="3");var H={scaling:null!==(l=null!=T?T:I.themeScaling)&&void 0!==l?l:"100%",radius:null!=z?z:I.themeRadius,color:null!==(x=null!=b?b:I.themeColor)&&void 0!==x?x:d},J=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,K=/^[0-9]+$/,L="";return"number"==R&&(L="숫자만 입력 가능합니다."),"email"==R&&(L="이메일 형식에 어긋납니다."),"password"==(null==F?void 0:F.type)&&delete F.type,r("div",{children:[e(s,{scaling:H.scaling,accentColor:H.color,hasBackground:!1,children:r(c.Root,g({ref:t,variant:N,size:G,type:"password"!==R||q?"text":"password",radius:H.radius,color:H.color,className:n(y({radius:H.radius}),w),onChange:function(r){r.target.value&&B?D(!0):"number"!=R||!r.target.value||B||K.test(r.target.value)?(D(!1),V(r.target.value),P&&P(r)):D(!0)},value:U,onBlur:function(r){M&&M(r),"email"!=R||!r.target.value||J.test(r.target.value)?D(!1):D(!0)}},F,{children:[S,"password"==R&&e(j.Slot,{side:"right",children:e(p,{appearance:"ghost",color:"slate",onMouseDown:function(r){return A(!0)},onMouseUp:function(r){return A(!1)},children:e(q?f:h,{height:"14",width:"14"})})})]}))}),k&&e(m,{size:"1",color:H.color,children:C||L})]})}));x.displayName="TextField.Root";var w=o.forwardRef((function(r,o){var a=r.className,t=r.color,i=r.side,l=r.radius,s=r.children,u=v(r,["className","color","side","radius","children"]);return e(c.Slot,g({ref:o,color:t,side:i,className:n(y({radius:l}),a)},u,{children:s}))}));w.displayName="TextField.Slot";var j={Root:x,Slot:w};export{x as Root,w as Slot,j as default};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -7,6 +7,7 @@ export interface TreeProps extends React.InputHTMLAttributes<HTMLInputElement>,
7
7
  items: any;
8
8
  treeId: string;
9
9
  isSearch?: boolean;
10
+ keyword?: string;
10
11
  }
11
12
  declare const treeVariants: (props?: ({
12
13
  color?: string | null | undefined;
@@ -92,7 +92,7 @@ var treeProvider = null;
92
92
  var Tree = React.forwardRef(function (_a, ref) {
93
93
  var _b;
94
94
  var _c, _d;
95
- var items = _a.items, treeId = _a.treeId, className = _a.className, color = _a.color, isSearch = _a.isSearch, props = __rest(_a, ["items", "treeId", "className", "color", "isSearch"]);
95
+ var items = _a.items, treeId = _a.treeId, className = _a.className, color = _a.color, isSearch = _a.isSearch, keyword = _a.keyword, props = __rest(_a, ["items", "treeId", "className", "color", "isSearch", "keyword"]);
96
96
  var _e = useState(''), search = _e[0], setSearch = _e[1];
97
97
  var tree = useRef(null);
98
98
  var _f = useState({}), treeData = _f[0], setTreeData = _f[1];
@@ -152,6 +152,21 @@ var Tree = React.forwardRef(function (_a, ref) {
152
152
  });
153
153
  }
154
154
  }, [findItemPath, search]);
155
+ useEffect(function () {
156
+ if (keyword) {
157
+ findItemPath(keyword).then(function (path) {
158
+ var _a;
159
+ if (path) {
160
+ // wait for full path including leaf, to make sure it loaded in
161
+ (_a = tree.current) === null || _a === void 0 ? void 0 : _a.expandSubsequently(path).then(function () {
162
+ var _a, _b;
163
+ (_a = tree.current) === null || _a === void 0 ? void 0 : _a.selectItems([path[path.length - 1]]);
164
+ (_b = tree.current) === null || _b === void 0 ? void 0 : _b.focusItem(path[path.length - 1]);
165
+ });
166
+ }
167
+ });
168
+ }
169
+ }, [keyword]);
155
170
  useEffect(function () {
156
171
  if (items) {
157
172
  var results_1 = [];
@@ -177,6 +192,12 @@ var Tree = React.forwardRef(function (_a, ref) {
177
192
  setTreeData(t_1);
178
193
  }
179
194
  }, [items]);
195
+ useEffect(function () {
196
+ if (Object.keys(treeData).length > 0 && treeProvider) {
197
+ treeProvider === null || treeProvider === void 0 ? void 0 : treeProvider.onDidChangeTreeDataEmitter.emit(Object.keys(treeData));
198
+ console.log(Object.keys(treeData));
199
+ }
200
+ }, [treeData]);
180
201
  return (_jsxs("div", { className: "text-slate-12", children: [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, getItemTitle: function (item) {
181
202
  return item.data;
182
203
  }, viewState: (_b = {},
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{primaryColorStyle as n}from"../../constants.mjs";import o,{useState as a,useRef as i,useCallback as l,useEffect as c}from"react";import{StaticTreeDataProvider as u,UncontrolledTreeEnvironment as s,Tree as f}from"react-complex-tree";import d from"../TextField/index.mjs";import{Button as m}from"../Button/index.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";import{useTheme as h}from"../../theme/ThemeProvider.mjs";var v=function(){return v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((n=n.apply(e,t||[])).next())}))},b=function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},x=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},g=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function w(e,t){var r=[];return Object.values(e).forEach((function(e){e[t]&&r.push(e.index)})),r}r("",{variants:{color:n()}});var I=null,j=o.forwardRef((function(r,n){var o,j,O,S=r.items,P=r.treeId;r.className;var T=r.color,k=r.isSearch,E=x(r,["items","treeId","className","color","isSearch"]),N=a(""),C=N[0],F=N[1],R=i(null),B=a({}),L=B[0],A=B[1],q=w(S,"isFocusd"),z=w(S,"isExpanded"),D=w(S,"isSelected");I=new u(L,(function(e,t){return v(v({},e),{data:t})}));var G=h().theme,H={color:null!==(j=null!=T?T:G.themeColor)&&void 0!==j?j:p},J=l((function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return y(void 0,g([e],t,!0),void 0,(function(e,t){var r,n,o,a,i;return void 0===t&&(t="root"),b(this,(function(l){switch(l.label){case 0:return I?[4,I.getTreeItem(t)]:[2];case 1:return(r=l.sent()).data.toLowerCase().includes(e.toLowerCase())?[2,[r.index]]:[4,Promise.all(null!==(i=null===(a=r.children)||void 0===a?void 0:a.map((function(t){return J(e,t)})))&&void 0!==i?i:[])];case 2:return n=l.sent(),o=n.find((function(e){return null!==e})),o?[2,g([r.index],o,!0)]:[2,null]}}))}))}),[I]),K=l((function(e){e.preventDefault(),C&&J(C).then((function(e){var t;e&&(null===(t=R.current)||void 0===t||t.expandSubsequently(e).then((function(){var t,r;null===(t=R.current)||void 0===t||t.selectItems([e[e.length-1]]),null===(r=R.current)||void 0===r||r.focusItem(e[e.length-1])})))}))}),[J,C]);return c((function(){if(S){var e=[],t=[];S.map((function(e){t.push.apply(t,e.children)})),S.forEach((function(r){t.includes(r.index)||e.push(r.index)}));var r={};r.root={index:"root",isFolder:!0,children:e,data:"Root item"},S.map((function(e){r[e.index]=v(v({},e),{isFolder:e.children.length>0})})),A(r)}}),[S]),e("div",{className:"text-slate-12",children:[k&&e("div",{className:"flex",children:[t(d.Root,{color:H.color,value:C,onChange:function(e){return F(e.target.value)},placeholder:"검색어를 입력하세요",className:"mr-2"}),t(m,{color:H.color,onClick:K,children:"검색"})]}),t(s,v({ref:n,dataProvider:I,getItemTitle:function(e){return e.data},viewState:(o={},o[P]={focusedItem:null!==(O=q[0])&&void 0!==O?O:"",expandedItems:z,selectedItems:D},o),keyboardBindings:v({renameItem:["enter"],abortRenameItem:["control+z"]},E.keyboardBindings)},E,{canSearch:!1,children:t(f,{ref:R,treeId:P,rootItem:"root",treeLabel:"Tree Example"})}))]})}));j.displayName="Tree";export{j as Tree,I as treeProvider};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";import{primaryColorStyle as r}from"../../constants.mjs";import o,{useState as l,useRef as i,useCallback as a,useEffect as c}from"react";import{StaticTreeDataProvider as u,UncontrolledTreeEnvironment as s,Tree as f}from"react-complex-tree";import d from"../TextField/index.mjs";import{Button as m}from"../Button/index.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";import{useTheme as h}from"../../theme/ThemeProvider.mjs";var v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},y=function(e,t,n,r){return new(n||(n=Promise))((function(o,l){function i(e){try{c(r.next(e))}catch(e){l(e)}}function a(e){try{c(r.throw(e))}catch(e){l(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))},b=function(e,t){var n,r,o,l,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},g=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function w(e,t){var n=[];return Object.values(e).forEach((function(e){e[t]&&n.push(e.index)})),n}n("",{variants:{color:r()}});var j=null,I=o.forwardRef((function(n,r){var o,I,O,k=n.items,S=n.treeId;n.className;var T=n.color,P=n.isSearch,E=n.keyword,C=x(n,["items","treeId","className","color","isSearch","keyword"]),N=l(""),F=N[0],R=N[1],B=i(null),D=l({}),L=D[0],q=D[1],A=w(k,"isFocusd"),z=w(k,"isExpanded"),G=w(k,"isSelected");j=new u(L,(function(e,t){return v(v({},e),{data:t})}));var H=h().theme,J={color:null!==(I=null!=T?T:H.themeColor)&&void 0!==I?I:p},K=a((function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return y(void 0,g([e],t,!0),void 0,(function(e,t){var n,r,o,l,i;return void 0===t&&(t="root"),b(this,(function(a){switch(a.label){case 0:return j?[4,j.getTreeItem(t)]:[2];case 1:return(n=a.sent()).data.toLowerCase().includes(e.toLowerCase())?[2,[n.index]]:[4,Promise.all(null!==(i=null===(l=n.children)||void 0===l?void 0:l.map((function(t){return K(e,t)})))&&void 0!==i?i:[])];case 2:return r=a.sent(),o=r.find((function(e){return null!==e})),o?[2,g([n.index],o,!0)]:[2,null]}}))}))}),[j]),M=a((function(e){e.preventDefault(),F&&K(F).then((function(e){var t;e&&(null===(t=B.current)||void 0===t||t.expandSubsequently(e).then((function(){var t,n;null===(t=B.current)||void 0===t||t.selectItems([e[e.length-1]]),null===(n=B.current)||void 0===n||n.focusItem(e[e.length-1])})))}))}),[K,F]);return c((function(){E&&K(E).then((function(e){var t;e&&(null===(t=B.current)||void 0===t||t.expandSubsequently(e).then((function(){var t,n;null===(t=B.current)||void 0===t||t.selectItems([e[e.length-1]]),null===(n=B.current)||void 0===n||n.focusItem(e[e.length-1])})))}))}),[E]),c((function(){if(k){var e=[],t=[];k.map((function(e){t.push.apply(t,e.children)})),k.forEach((function(n){t.includes(n.index)||e.push(n.index)}));var n={};n.root={index:"root",isFolder:!0,children:e,data:"Root item"},k.map((function(e){n[e.index]=v(v({},e),{isFolder:e.children.length>0})})),q(n)}}),[k]),c((function(){Object.keys(L).length>0&&j&&(null==j||j.onDidChangeTreeDataEmitter.emit(Object.keys(L)),console.log(Object.keys(L)))}),[L]),e("div",{className:"text-slate-12",children:[P&&e("div",{className:"flex",children:[t(d.Root,{color:J.color,value:F,onChange:function(e){return R(e.target.value)},placeholder:"검색어를 입력하세요",className:"mr-2"}),t(m,{color:J.color,onClick:M,children:"검색"})]}),t(s,v({ref:r,dataProvider:j,getItemTitle:function(e){return e.data},viewState:(o={},o[S]={focusedItem:null!==(O=A[0])&&void 0!==O?O:"",expandedItems:z,selectedItems:G},o),keyboardBindings:v({renameItem:["enter"],abortRenameItem:["control+z"]},C.keyboardBindings)},C,{canSearch:!1,children:t(f,{ref:B,treeId:S,rootItem:"root",treeLabel:"Tree Example"})}))]})}));I.displayName="Tree";export{I as Tree,j as treeProvider};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../lib/components/Tree/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { cva } from 'class-variance-authority';\nimport { primaryColorStyle } from '../../../lib/constants';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { StaticTreeDataProvider, Tree as ComplexTree, UncontrolledTreeEnvironment, } from 'react-complex-tree';\nimport TextField from '../TextField';\nimport Button from '../Button';\nimport { MAIN_COLOR } from '../../../lib/color/constants';\nimport { useTheme } from '../../../lib/theme';\nvar treeVariants = cva('', {\n variants: {\n color: primaryColorStyle(),\n },\n});\nfunction findItems(arr, key) {\n var results = [];\n Object.values(arr).forEach(function (item) {\n if (item[key]) {\n results.push(item.index);\n }\n });\n return results;\n}\nvar treeProvider = null;\nvar Tree = React.forwardRef(function (_a, ref) {\n var _b;\n var _c, _d;\n var items = _a.items, treeId = _a.treeId, className = _a.className, color = _a.color, isSearch = _a.isSearch, props = __rest(_a, [\"items\", \"treeId\", \"className\", \"color\", \"isSearch\"]);\n var _e = useState(''), search = _e[0], setSearch = _e[1];\n var tree = useRef(null);\n var _f = useState({}), treeData = _f[0], setTreeData = _f[1];\n var focusedItem = findItems(items, 'isFocusd');\n var expandedItems = findItems(items, 'isExpanded');\n var selectedItems = findItems(items, 'isSelected');\n treeProvider = new StaticTreeDataProvider(treeData, function (item, data) { return (__assign(__assign({}, item), { data: data })); });\n var theme = useTheme().theme;\n var contextValue = {\n color: (_c = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _c !== void 0 ? _c : MAIN_COLOR,\n };\n var findItemPath = useCallback(function (search_1) {\n var args_1 = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args_1[_i - 1] = arguments[_i];\n }\n return __awaiter(void 0, __spreadArray([search_1], args_1, true), void 0, function (search, searchRoot) {\n var item, searchedItems, result;\n var _a, _b;\n if (searchRoot === void 0) { searchRoot = 'root'; }\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (!treeProvider)\n return [2 /*return*/];\n return [4 /*yield*/, treeProvider.getTreeItem(searchRoot)];\n case 1:\n item = _c.sent();\n if (item.data.toLowerCase().includes(search.toLowerCase())) {\n return [2 /*return*/, [item.index]];\n }\n 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 : [])];\n case 2:\n searchedItems = _c.sent();\n result = searchedItems.find(function (item) { return item !== null; });\n if (!result) {\n return [2 /*return*/, null];\n }\n return [2 /*return*/, __spreadArray([item.index], result, true)];\n }\n });\n });\n }, [treeProvider]);\n var find = useCallback(function (e) {\n e.preventDefault();\n if (search) {\n findItemPath(search).then(function (path) {\n var _a;\n if (path) {\n // wait for full path including leaf, to make sure it loaded in\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.expandSubsequently(path).then(function () {\n var _a, _b;\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.selectItems([path[path.length - 1]]);\n (_b = tree.current) === null || _b === void 0 ? void 0 : _b.focusItem(path[path.length - 1]);\n });\n }\n });\n }\n }, [findItemPath, search]);\n useEffect(function () {\n if (items) {\n var results_1 = [];\n var children_1 = [];\n items.map(function (item) {\n children_1.push.apply(children_1, item.children);\n });\n items.forEach(function (item) {\n if (!children_1.includes(item.index)) {\n results_1.push(item.index);\n }\n });\n var t_1 = {};\n t_1['root'] = {\n index: 'root',\n isFolder: true,\n children: results_1,\n data: 'Root item',\n };\n items.map(function (item) {\n t_1[item.index] = __assign(__assign({}, item), { isFolder: item.children.length > 0 });\n });\n setTreeData(t_1);\n }\n }, [items]);\n return (_jsxs(\"div\", { className: \"text-slate-12\", children: [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, getItemTitle: function (item) {\n return item.data;\n }, viewState: (_b = {},\n _b[treeId] = {\n focusedItem: (_d = focusedItem[0]) !== null && _d !== void 0 ? _d : '',\n expandedItems: expandedItems,\n selectedItems: selectedItems,\n },\n _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\" }) }))] }));\n});\nTree.displayName = 'Tree';\nexport { Tree, treeProvider };\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","__rest","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__spreadArray","to","from","pack","ar","l","Array","slice","concat","findItems","arr","key","results","values","forEach","item","index","cva","variants","color","primaryColorStyle","treeProvider","Tree","React","forwardRef","_a","ref","_b","_c","_d","items","treeId","className","isSearch","props","_e","useState","search","setSearch","tree","useRef","_f","treeData","setTreeData","focusedItem","expandedItems","selectedItems","StaticTreeDataProvider","data","theme","useTheme","contextValue","themeColor","MAIN_COLOR","findItemPath","useCallback","search_1","args_1","_i","searchRoot","searchedItems","getTreeItem","toLowerCase","includes","all","children","map","child","find","preventDefault","path","current","expandSubsequently","selectItems","focusItem","useEffect","results_1","children_1","t_1","isFolder","_jsxs","_jsx","TextField","Root","onChange","target","placeholder","Button","onClick","UncontrolledTreeEnvironment","dataProvider","getItemTitle","viewState","keyboardBindings","renameItem","abortRenameItem","canSearch","ComplexTree","rootItem","treeLabel","displayName"],"mappings":"mhBAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAwC,SAAUC,EAASC,EAAYC,EAAGC,GAE1E,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUN,MAAMG,EAASC,GAAc,KAAKS,OACtE,GACA,EACIM,EAA4C,SAAUhB,EAASiB,GAC/D,IAAsGC,EAAGC,EAAGhC,EAAGiC,EAA3GC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAW,EAAPpC,EAAE,GAAQ,MAAMA,EAAE,GAAI,OAAOA,EAAE,EAAK,EAAEqC,KAAM,GAAIC,IAAK,IAChG,OAAOL,EAAI,CAAEV,KAAMgB,EAA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BnB,GAAKkE,iBAAkBrJ,EAAS,CAAEsJ,WAAY,CAAC,SAAUC,gBAAiB,CAAC,cAAgB7D,EAAM2D,mBAAqB3D,EAAO,CAAE8D,WAAW,EAAO/B,SAAUgB,EAAKgB,EAAa,CAAEvE,IAAKa,EAAMR,OAAQA,EAAQmE,SAAU,OAAQC,UAAW,sBAC3P,IACA7E,EAAK8E,YAAc"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../lib/components/Tree/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { cva } from 'class-variance-authority';\nimport { primaryColorStyle } from '../../../lib/constants';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { StaticTreeDataProvider, Tree as ComplexTree, UncontrolledTreeEnvironment, } from 'react-complex-tree';\nimport TextField from '../TextField';\nimport Button from '../Button';\nimport { MAIN_COLOR } from '../../../lib/color/constants';\nimport { useTheme } from '../../../lib/theme';\nvar treeVariants = cva('', {\n variants: {\n color: primaryColorStyle(),\n },\n});\nfunction findItems(arr, key) {\n var results = [];\n Object.values(arr).forEach(function (item) {\n if (item[key]) {\n results.push(item.index);\n }\n });\n return results;\n}\nvar treeProvider = null;\nvar Tree = React.forwardRef(function (_a, ref) {\n var _b;\n var _c, _d;\n var items = _a.items, treeId = _a.treeId, className = _a.className, color = _a.color, isSearch = _a.isSearch, keyword = _a.keyword, props = __rest(_a, [\"items\", \"treeId\", \"className\", \"color\", \"isSearch\", \"keyword\"]);\n var _e = useState(''), search = _e[0], setSearch = _e[1];\n var tree = useRef(null);\n var _f = useState({}), treeData = _f[0], setTreeData = _f[1];\n var focusedItem = findItems(items, 'isFocusd');\n var expandedItems = findItems(items, 'isExpanded');\n var selectedItems = findItems(items, 'isSelected');\n treeProvider = new StaticTreeDataProvider(treeData, function (item, data) { return (__assign(__assign({}, item), { data: data })); });\n var theme = useTheme().theme;\n var contextValue = {\n color: (_c = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _c !== void 0 ? _c : MAIN_COLOR,\n };\n var findItemPath = useCallback(function (search_1) {\n var args_1 = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args_1[_i - 1] = arguments[_i];\n }\n return __awaiter(void 0, __spreadArray([search_1], args_1, true), void 0, function (search, searchRoot) {\n var item, searchedItems, result;\n var _a, _b;\n if (searchRoot === void 0) { searchRoot = 'root'; }\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (!treeProvider)\n return [2 /*return*/];\n return [4 /*yield*/, treeProvider.getTreeItem(searchRoot)];\n case 1:\n item = _c.sent();\n if (item.data.toLowerCase().includes(search.toLowerCase())) {\n return [2 /*return*/, [item.index]];\n }\n 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 : [])];\n case 2:\n searchedItems = _c.sent();\n result = searchedItems.find(function (item) { return item !== null; });\n if (!result) {\n return [2 /*return*/, null];\n }\n return [2 /*return*/, __spreadArray([item.index], result, true)];\n }\n });\n });\n }, [treeProvider]);\n var find = useCallback(function (e) {\n e.preventDefault();\n if (search) {\n findItemPath(search).then(function (path) {\n var _a;\n if (path) {\n // wait for full path including leaf, to make sure it loaded in\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.expandSubsequently(path).then(function () {\n var _a, _b;\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.selectItems([path[path.length - 1]]);\n (_b = tree.current) === null || _b === void 0 ? void 0 : _b.focusItem(path[path.length - 1]);\n });\n }\n });\n }\n }, [findItemPath, search]);\n useEffect(function () {\n if (keyword) {\n findItemPath(keyword).then(function (path) {\n var _a;\n if (path) {\n // wait for full path including leaf, to make sure it loaded in\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.expandSubsequently(path).then(function () {\n var _a, _b;\n (_a = tree.current) === null || _a === void 0 ? void 0 : _a.selectItems([path[path.length - 1]]);\n (_b = tree.current) === null || _b === void 0 ? void 0 : _b.focusItem(path[path.length - 1]);\n });\n }\n });\n }\n }, [keyword]);\n useEffect(function () {\n if (items) {\n var results_1 = [];\n var children_1 = [];\n items.map(function (item) {\n children_1.push.apply(children_1, item.children);\n });\n items.forEach(function (item) {\n if (!children_1.includes(item.index)) {\n results_1.push(item.index);\n }\n });\n var t_1 = {};\n t_1['root'] = {\n index: 'root',\n isFolder: true,\n children: results_1,\n data: 'Root item',\n };\n items.map(function (item) {\n t_1[item.index] = __assign(__assign({}, item), { isFolder: item.children.length > 0 });\n });\n setTreeData(t_1);\n }\n }, [items]);\n useEffect(function () {\n if (Object.keys(treeData).length > 0 && treeProvider) {\n treeProvider === null || treeProvider === void 0 ? void 0 : treeProvider.onDidChangeTreeDataEmitter.emit(Object.keys(treeData));\n console.log(Object.keys(treeData));\n }\n }, [treeData]);\n return (_jsxs(\"div\", { className: \"text-slate-12\", children: [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, getItemTitle: function (item) {\n return item.data;\n }, viewState: (_b = {},\n _b[treeId] = {\n focusedItem: (_d = focusedItem[0]) !== null && _d !== void 0 ? _d : '',\n expandedItems: expandedItems,\n selectedItems: selectedItems,\n },\n _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\" }) }))] }));\n});\nTree.displayName = 'Tree';\nexport { Tree, treeProvider };\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","__rest","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__spreadArray","to","from","pack","ar","l","Array","slice","concat","findItems","arr","key","results","values","forEach","item","index","cva","variants","color","primaryColorStyle","treeProvider","Tree","React","forwardRef","_a","ref","_b","_c","_d","items","treeId","className","isSearch","keyword","props","_e","useState","search","setSearch","tree","useRef","_f","treeData","setTreeData","focusedItem","expandedItems","selectedItems","StaticTreeDataProvider","data","theme","useTheme","contextValue","themeColor","MAIN_COLOR","findItemPath","useCallback","search_1","args_1","_i","searchRoot","searchedItems","getTreeItem","toLowerCase","includes","all","children","map","child","find","preventDefault","path","current","expandSubsequently","selectItems","focusItem","useEffect","results_1","children_1","t_1","isFolder","keys","onDidChangeTreeDataEmitter","emit","console","log","_jsxs","_jsx","TextField","Root","onChange","target","placeholder","Button","onClick","UncontrolledTreeEnvironment","dataProvider","getItemTitle","viewState","keyboardBindings","renameItem","abortRenameItem","canSearch","ComplexTree","rootItem","treeLabel","displayName"],"mappings":"mhBAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAwC,SAAUC,EAASC,EAAYC,EAAGC,GAE1E,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUN,MAAMG,EAASC,GAAc,KAAKS,OACtE,GACA,EACIM,EAA4C,SAAUhB,EAASiB,GAC/D,IAAsGC,EAAGC,EAAGhC,EAAGiC,EAA3GC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAW,EAAPpC,EAAE,GAAQ,MAAMA,EAAE,G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C,KAAK1I,OAAOwI,KAAKtC,IACrHyC,QAAQC,IAAI5I,OAAOwI,KAAKtC,IAEpC,GAAO,CAACA,IACI2C,EAAM,MAAO,CAAEtD,UAAW,gBAAiBkC,SAAU,CAACjC,GAAaqD,EAAM,MAAO,CAAEtD,UAAW,OAAQkC,SAAU,CAACqB,EAAKC,EAAUC,KAAM,CAAEtE,MAAOiC,EAAajC,MAAOnD,MAAOsE,EAAQoD,SAAU,SAAUvH,GAAK,OAAOoE,EAAUpE,EAAEwH,OAAO3H,MAAO,EAAI4H,YAAa,aAA2D5D,UAAW,SAAWuD,EAAKM,EAAQ,CAAE1E,MAAOiC,EAAajC,MAAO2E,QAASzB,EAAMH,SAAU,UAAwBqB,EAAKQ,EAA6BvJ,EAAS,CAAEkF,IAAKA,EAAKsE,aAAc3E,EAAc4E,aAAc,SAAUlF,GAC3gB,OAAOA,EAAKkC,IAChC,EAAmBiD,WAAYvE,EAAK,CAAE,EAClBA,EAAGI,GAAU,CACTc,YAAuC,QAAzBhB,EAAKgB,EAAY,UAAuB,IAAPhB,EAAgBA,EAAK,GACpEiB,cAAeA,EACfC,cAAeA,GAEnBpB,GAAKwE,iBAAkB3J,EAAS,CAAE4J,WAAY,CAAC,SAAUC,gBAAiB,CAAC,cAAgBlE,EAAMgE,mBAAqBhE,EAAO,CAAEmE,WAAW,EAAOpC,SAAUqB,EAAKgB,EAAa,CAAE7E,IAAKc,EAAMT,OAAQA,EAAQyE,SAAU,OAAQC,UAAW,sBAC3P,IACAnF,EAAKoF,YAAc"}
@@ -1,2 +1,2 @@
1
- export{default as Accordion}from"./components/Accordion/index.mjs";export{default as AlertDialog}from"./components/AlertDialog/index.mjs";export{default as AspectRatio}from"./components/AspectRatio/index.mjs";export{default as Avatar}from"./components/Avatar/index.mjs";export{default as Badge}from"./components/Badge/index.mjs";export{Box}from"./components/Box/index.mjs";export{default as Breadcrumb}from"./components/Breadcrumb/index.mjs";export{Button}from"./components/Button/index.mjs";export{Calendar}from"./components/Calendar/index.mjs";export{default as Callout}from"./components/Callout/index.mjs";export{default as Card}from"./components/Card/index.mjs";export{Checkbox}from"./components/Checkbox/index.mjs";export{default as CheckboxCard}from"./components/CheckboxCard/index.mjs";export{default as CheckboxGroup}from"./components/CheckboxGroup/index.mjs";export{default as ContextMenu}from"./components/ContextMenu/index.mjs";export{default as Collapsible}from"./components/Collapsible/index.mjs";export{Container}from"./components/Container/index.mjs";export{default as DataList}from"./components/DataList/index.mjs";export{Datepicker}from"./components/Datepicker/index.mjs";export{default as Dialog}from"./components/Dialog/index.mjs";export{default as DropdownMenu}from"./components/DropdownMenu/index.mjs";export{Editor}from"./components/Editor/index.mjs";export{Flex}from"./components/Flex/index.mjs";export{default as DynamicTabs}from"./components/Tabs/DynamicTabs.mjs";export{Footer}from"./components/Footer/index.mjs";export{default as Gnb}from"./components/Gnb/index.mjs";export{GridLayout}from"./components/GridLayout/index.mjs";export{default as HoverCard}from"./components/HoverCard/index.mjs";export{IconButton}from"./components/IconButton/index.mjs";export{Inset}from"./components/Inset/index.mjs";export{Label}from"./components/Label/index.mjs";export{default as Menubar}from"./components/Menubar/index.mjs";export{default as Modal}from"./components/Modal/index.mjs";export{default as NavigationMenu}from"./components/NavigationMenu/index.mjs";export{default as Popover}from"./components/Popover/index.mjs";export{Progress}from"./components/Progress/index.mjs";export{Radio}from"./components/Radio/index.mjs";export{default as RadioCards}from"./components/RadioCards/index.mjs";export{default as RadioGroup}from"./components/RadioGroup/index.mjs";export{ScrollArea}from"./components/ScrollArea/index.mjs";export{SearchBar}from"./components/SearchBar/index.mjs";export{default as SegmentedControl}from"./components/SegmentedControl/index.mjs";export{default as Select}from"./components/Select/index.mjs";export{Separator}from"./components/Separator/index.mjs";export{default as Sidebar}from"./components/SideBar/index.mjs";export{Skeleton}from"./components/Skeleton/index.mjs";export{Slider}from"./components/Slider/index.mjs";export{Spinner}from"./components/Spinner/index.mjs";export{default as Table}from"./components/Table/index.mjs";export{default as TabNav}from"./components/TabNav/index.mjs";export{default as Tabs}from"./components/Tabs/index.mjs";export{TextArea}from"./components/TextArea/index.mjs";export{default as TextField}from"./components/TextField/index.mjs";export{default as Timeline}from"./components/Timeline/index.mjs";export{default as Toast}from"./components/Toast/index.mjs";export{Toggle}from"./components/Toggle/index.mjs";export{ToggleWithText}from"./components/Toggle/ToggleWithText.mjs";export{default as ToggleGroup}from"./components/ToggleGroup/index.mjs";export{ToggleSwitch}from"./components/ToggleSwitch/index.mjs";export{default as Tooltip}from"./components/Tooltip/index.mjs";export{default as BarChart}from"./components/BarChart/index.mjs";export{BubbleChart}from"./components/BubbleChart/index.mjs";export{RadarChart}from"./components/RadarChart/index.mjs";export{default as LineChart}from"./components/LineChart/index.mjs";export{default as PieChart}from"./components/PieChart/index.mjs";export{default as DoughnutChart}from"./components/DoughnutChart/index.mjs";export{default as Grid}from"./components/Grid/index.mjs";export{useGrid}from"./components/Grid/useGrid.mjs";export{Tree,treeProvider}from"./components/Tree/index.mjs";export{Header}from"./Typography/Header/index.mjs";export{default as Text}from"./Typography/Text/index.mjs";export{default as LuiThemeProvider,useTheme}from"./theme/ThemeProvider.mjs";
1
+ export{default as Accordion}from"./components/Accordion/index.mjs";export{default as AlertDialog}from"./components/AlertDialog/index.mjs";export{default as AspectRatio}from"./components/AspectRatio/index.mjs";export{default as Avatar}from"./components/Avatar/index.mjs";export{default as Badge}from"./components/Badge/index.mjs";export{Box}from"./components/Box/index.mjs";export{default as Breadcrumb}from"./components/Breadcrumb/index.mjs";export{Button}from"./components/Button/index.mjs";export{Calendar}from"./components/Calendar/index.mjs";export{default as Callout}from"./components/Callout/index.mjs";export{default as Card}from"./components/Card/index.mjs";export{Checkbox}from"./components/Checkbox/index.mjs";export{default as CheckboxCard}from"./components/CheckboxCard/index.mjs";export{default as CheckboxGroup}from"./components/CheckboxGroup/index.mjs";export{default as ContextMenu}from"./components/ContextMenu/index.mjs";export{default as Collapsible}from"./components/Collapsible/index.mjs";export{Container}from"./components/Container/index.mjs";export{default as DataList}from"./components/DataList/index.mjs";export{Datepicker}from"./components/Datepicker/index.mjs";export{default as Dialog}from"./components/Dialog/index.mjs";export{default as DropdownMenu}from"./components/DropdownMenu/index.mjs";export{Editor}from"./components/Editor/index.mjs";export{Flex}from"./components/Flex/index.mjs";export{default as DynamicTabs}from"./components/Tabs/DynamicTabs.mjs";export{Footer}from"./components/Footer/index.mjs";export{default as Gnb}from"./components/Gnb/index.mjs";export{GridLayout}from"./components/GridLayout/index.mjs";export{default as HoverCard}from"./components/HoverCard/index.mjs";export{IconButton}from"./components/IconButton/index.mjs";export{Inset}from"./components/Inset/index.mjs";export{Label}from"./components/Label/index.mjs";export{default as Menubar}from"./components/Menubar/index.mjs";export{default as Modal}from"./components/Modal/index.mjs";export{default as NavigationMenu}from"./components/NavigationMenu/index.mjs";export{default as Popover}from"./components/Popover/index.mjs";export{Progress}from"./components/Progress/index.mjs";export{Radio}from"./components/Radio/index.mjs";export{default as RadioCards}from"./components/RadioCards/index.mjs";export{default as RadioGroup}from"./components/RadioGroup/index.mjs";export{ScrollArea}from"./components/ScrollArea/index.mjs";export{SearchBar}from"./components/SearchBar/index.mjs";export{default as SegmentedControl}from"./components/SegmentedControl/index.mjs";export{default as Select}from"./components/Select/index.mjs";export{Separator}from"./components/Separator/index.mjs";export{default as Sidebar}from"./components/SideBar/index.mjs";export{Skeleton}from"./components/Skeleton/index.mjs";export{Slider}from"./components/Slider/index.mjs";export{Spinner}from"./components/Spinner/index.mjs";export{default as Table}from"./components/Table/index.mjs";export{default as TabNav}from"./components/TabNav/index.mjs";export{default as Tabs}from"./components/Tabs/index.mjs";export{TextArea}from"./components/TextArea/index.mjs";export{default as TextField}from"./components/TextField/index.mjs";export{default as Timeline}from"./components/Timeline/index.mjs";export{default as Toast}from"./components/Toast/index.mjs";export{Toggle}from"./components/Toggle/index.mjs";export{ToggleWithText}from"./components/Toggle/ToggleWithText.mjs";export{default as ToggleGroup}from"./components/ToggleGroup/index.mjs";export{ToggleSwitch}from"./components/ToggleSwitch/index.mjs";export{default as Tooltip}from"./components/Tooltip/index.mjs";export{default as BarChart}from"./components/BarChart/index.mjs";export{BubbleChart}from"./components/BubbleChart/index.mjs";export{RadarChart}from"./components/RadarChart/index.mjs";export{default as LineChart}from"./components/LineChart/index.mjs";export{default as PieChart}from"./components/PieChart/index.mjs";export{default as DoughnutChart}from"./components/DoughnutChart/index.mjs";export{default as Grid}from"./components/Grid/index.mjs";export{useGrid}from"./components/Grid/useGrid.mjs";export{Tree,treeProvider}from"./components/Tree/index.mjs";export{Header}from"./Typography/Header/index.mjs";export{Text}from"./Typography/Text/index.mjs";export{default as LuiThemeProvider,useTheme}from"./theme/ThemeProvider.mjs";
2
2
  //# sourceMappingURL=index.mjs.map