@blocklet/labels 1.5.32 → 1.5.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/label/label-picker.d.ts +3 -1
- package/dist/index.es.js +324 -321
- package/dist/index.umd.js +3 -3
- package/package.json +4 -3
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(i,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("@mui/icons-material/ExpandMore"),require("@mui/material/Box"),require("@mui/material/styles"),require("react-arborist"),require("@iconify/react"),require("react/jsx-runtime"),require("lodash/omit"),require("react-select"),require("@mui/material/Typography"),require("@mui/material/Button"),require("@mui/material/IconButton"),require("@mui/icons-material/DeleteOutlineOutlined"),require("@mui/icons-material/EditOutlined"),require("@mui/icons-material/Add"),require("@mui/material/TextField"),require("@mui/base/ClickAwayListener"),require("react-color"),require("@arcblock/ux/lib/Dialog"),require("@mui/material"),require("@mui/icons-material/Translate"),require("@mui/material/Popover"),require("@arcblock/ux/lib/Locale/context"),require("@mui/material/Alert"),require("@mui/icons-material/Edit"),require("@mui/icons-material/LabelOutlined"),require("@mui/material/ClickAwayListener"),require("@mui/material/Chip")):typeof define=="function"&&define.amd?define(["exports","react","@mui/icons-material/ExpandMore","@mui/material/Box","@mui/material/styles","react-arborist","@iconify/react","react/jsx-runtime","lodash/omit","react-select","@mui/material/Typography","@mui/material/Button","@mui/material/IconButton","@mui/icons-material/DeleteOutlineOutlined","@mui/icons-material/EditOutlined","@mui/icons-material/Add","@mui/material/TextField","@mui/base/ClickAwayListener","react-color","@arcblock/ux/lib/Dialog","@mui/material","@mui/icons-material/Translate","@mui/material/Popover","@arcblock/ux/lib/Locale/context","@mui/material/Alert","@mui/icons-material/Edit","@mui/icons-material/LabelOutlined","@mui/material/ClickAwayListener","@mui/material/Chip"],u):(i=typeof globalThis<"u"?globalThis:i||self,u(i.DiscussKitComponents={},i.React,i.ExpandMoreIcon,i.Box,i.styles,i.reactArborist,i.react$1,i.jsxRuntime,i.omit,i.Select,i.Typography,i.Button,i.IconButton,i.DeleteOutlineOutlinedIcon,i.EditOutlinedIcon,i.AddIcon,i.TextField,i.ClickAwayListener,i.reactColor,i.Dialog,i.material,i.TranslateIcon,i.Popover,i.context,i.Alert,i.EditIcon,i.LabelOutlinedIcon,i.ClickAwayListener$1,i.Chip))})(this,function(i,u,Q,U,N,Y,Z,e,G,E,X,R,ee,te,re,ne,le,oe,ae,se,A,ie,de,F,ce,ue,fe,he,pe){"use strict";const I=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},j=I(Q),p=I(U),ge=I(G),me=I(E),ye=I(X),O=I(R),L=I(ee),xe=I(te),Ce=I(re),ve=I(ne),P=I(le),be=I(oe),W=I(se),Se=I(ie),Ie=I(de),we=I(ce),_e=I(ue),ke=I(fe),Ae=I(he),Oe=I(pe),Te=t=>e.jsx("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...t,children:e.jsx("path",{fill:"currentColor",d:"M5 19q-.825 0-1.413-.587Q3 17.825 3 17V7q0-.825.587-1.412Q4.175 5 5 5h10q.5 0 .938.225q.437.225.712.625l3.525 5q.375.525.375 1.15q0 .625-.375 1.15l-3.525 5q-.275.4-.712.625Q15.5 19 15 19Z"})}),Le=t=>e.jsx("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...t,children:e.jsx("path",{fill:"currentColor",d:"m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4Z"})}),V=u.createContext({});function qe({selectable:t=!1,selected:r=[],onSelect:s,renderItem:l,children:o}){const n=h=>r.indexOf(h)!==-1,a=h=>{Array.from(new Set(r).add(h)),s==null||s(h)},d=u.useMemo(()=>({selectable:t,selected:r,isSelected:n,select:a,renderItem:l}),[r]);return e.jsx(V.Provider,{value:d,children:o})}const ze=t=>{var r;return t.isLeaf||!((r=t.data.children)!=null&&r.length)};function Be({node:t}){return ze(t)?e.jsx("span",{}):t.isOpen?e.jsx(j.default,{style:{fontSize:20}}):e.jsx(j.default,{style:{fontSize:20,transform:"rotate(-90deg)"}})}function Ee({node:t,style:r,dragHandle:s}){const{selectable:l,select:o,isSelected:n,renderItem:a}=u.useContext(V),{data:d}=t,h=d.icon?e.jsx(Z.Icon,{icon:d.icon,style:{fontSize:18}}):e.jsx(Te,{style:{fontSize:18,color:d.color||"#ddd"}}),m=f=>{f.stopPropagation(),t.isInternal&&t.toggle()},x=f=>{f.stopPropagation(),l&&o(t.id)},C=e.jsxs(e.Fragment,{children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flex:1},children:[e.jsx(p.default,{sx:{display:"flex",cursor:"pointer"},onClick:m,children:e.jsx(Be,{node:t})}),e.jsx(p.default,{sx:{display:"flex",alignItems:"center",width:22,height:22},children:h}),e.jsx(p.default,{component:"span",sx:{color:"grey.700"},children:t.data.name})]}),l&&n(t.id)&&e.jsx(Le,{})]});return e.jsxs(p.default,{className:"label-tree-item",style:r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},ref:s,onClick:x,children:[!a&&C,!!a&&a(C,t.data)]})}const Pe=N.styled(p.default)`
|
|
2
2
|
> div,
|
|
3
3
|
> div > div,
|
|
4
4
|
> div > div > div {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
.label-tree-item {
|
|
12
12
|
width: 100%;
|
|
13
13
|
}
|
|
14
|
-
`;function q({data:t,selectable:r,selected:s=[],onSelect:l,rowHeight:o=28,renderItem:n,sx:a,...
|
|
14
|
+
`;function q({data:t,selectable:r,selected:s=[],onSelect:l,rowHeight:o=28,renderItem:n,sx:a,...d}){const h=u.useRef(),m=[...Array.isArray(a)?a:[a]],[x,C]=u.useState(0),f=u.useCallback(()=>{var v,S;C((((S=(v=h.current)==null?void 0:v.visibleNodes)==null?void 0:S.length)||0)*o)},[o]);u.useEffect(()=>{f()},[t,f]);const y=()=>{setTimeout(f)};return e.jsx(qe,{selectable:r,selected:s,onSelect:l,renderItem:n,children:e.jsx(Pe,{...d,sx:m,children:e.jsx(Y.Tree,{data:t,rowHeight:o,height:x,indent:32,ref:h,onToggle:y,children:Ee})})})}const z=t=>t.reduce((r,s)=>{var l;return r.push(s),(l=s.children)!=null&&l.length&&r.push(...z(s.children)),r},[]),H=t=>t.map(r=>{var s;return(s=r.children)!=null&&s.length&&(r.children=H(r.children)),r}),Me=(t,r=null)=>{try{return JSON.parse(t)}catch{return r}},J=t=>{const r=t.reduce((o,n)=>(o[n.id]=o[n.id]||{},n.parentId&&(o[n.id].parent=n.parentId,o[n.parentId]=o[n.parentId]||{},o[n.parentId].children=o[n.parentId].children||[],o[n.parentId].children.push(n.id)),o),{}),s=t.map(({parentId:o,translation:n,...a})=>({...a,translation:Me(n),children:[]})),l=s.reduce((o,n)=>({...o,[n.id]:n}),{});return s.forEach(o=>{const n=r[o.id];n.parent&&l[n.parent]&&(o.parent=l[n.parent]),n.children&&(o.children=n.children.map(a=>l[a]))}),s.filter(o=>!o.parent)},De=t=>{const{options:r,getValue:s,selectProps:l,selectOption:o}=t,n=s(),a=d=>{const h=r.find(m=>m.data.id===d);h&&o(h)};return e.jsxs(e.Fragment,{children:[e.jsx(E.components.MenuList,{...ge.default(t,["addon"]),children:e.jsx(p.default,{sx:{px:2,py:1},children:e.jsx(q,{data:l.data,selectable:!0,onSelect:a,selected:n.map(d=>d.data.id)})})}),t.addon]})},Ne=({children:t,...r})=>{const[s,l]=t,o=Array.isArray(s)?s.length:0;return e.jsxs(E.components.ValueContainer,{...r,children:[e.jsx(p.default,{component:"span",sx:{fontSize:13,fontWeight:"bold"},children:o?"Labels":"Filter by labels"}),!!o&&e.jsx(p.default,{sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:22,height:22,ml:1,borderRadius:"100%",fontSize:12,bgcolor:"grey.200"},children:o}),l]})},Fe={control:t=>({...t,minHeight:31}),valueContainer:t=>({...t,display:"flex"}),dropdownIndicator:t=>({...t,padding:"0 4px"}),clearIndicator:t=>({...t,padding:"4px"})};function $({data:t,value:r=[],editable:s=!1,addon:l,onChange:o,compact:n,isMulti:a=!0,maxHeight:d=264,...h}){const m=u.useRef(null),x=u.useMemo(()=>z(t).map(g=>({data:g,label:g.name,value:g.id})),[t]),C=x.reduce((g,k)=>({...g,[k.data.id]:k}),{}),f=Array.isArray(r)?r:[r],y=f.map(g=>C[g]),v=u.useRef({prev:f.map(g=>C[g].data)}),S=(g,k)=>{!a||!Array.isArray(g)?o(g?[g.data]:[]):v.current.current=g.map(c=>c.data),["clear","remove-value"].includes(k.action)&&m.current&&setTimeout(()=>{var c;return(c=m==null?void 0:m.current)==null?void 0:c.blur()},1)},D=()=>{v.current.current&&JSON.stringify(v.current.prev.map(k=>k.id))!==JSON.stringify(v.current.current.map(k=>k.id))&&(o(v.current.current),v.current.prev=v.current.current)};return e.jsx(p.default,{...h,children:e.jsx(me.default,{ref:m,defaultValue:y,options:x,onChange:S,components:{MenuList:g=>e.jsx(De,{...g,addon:l}),...n&&{ValueContainer:Ne}},placeholder:"Select labels",styles:{...n&&Fe,menu:g=>({...g,...s&&{paddingBottom:"36px"},zIndex:99}),menuList:g=>({...g,overflowY:"auto",maxHeight:`${d}px`})},theme:g=>({...g,colors:{...g.colors,primary25:"#ddd",primary50:"#ddd",primary:"#ddd"}}),isSearchable:!1,isMulti:a,closeMenuOnSelect:!a,onMenuClose:D,isClearable:!0,data:t})})}var B=function(){return B=Object.assign||function(r){for(var s,l=1,o=arguments.length;l<o;l++){s=arguments[l];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(r[n]=s[n])}return r},B.apply(this,arguments)};function je(t,r){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var l=s.call(t),o,n=[],a;try{for(;(r===void 0||r-- >0)&&!(o=l.next()).done;)n.push(o.value)}catch(d){a={error:d}}finally{try{o&&!o.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}return n}typeof SuppressedError=="function"&&SuppressedError;var We=function(t){return typeof t=="function"},Ve=function(t){var r=je(u.useState(t),2),s=r[0],l=r[1],o=u.useCallback(function(n){l(function(a){var d=We(n)?n(a):n;return d?B(B({},a),d):a})},[]);return[s,o]};const He=Ve;function Je({I18NProps:t,...r}){const{languages:s}=F.useLocaleContext(),{translation:l,onChange:o}=t,[n,a]=u.useState(null),d=x=>{const C=x.currentTarget.closest(".MuiInputBase-root");C&&a(C)},h=()=>{a(null)},m=s.filter(x=>x.code!=="en");return e.jsx(A.TextField,{...r,InputProps:{endAdornment:e.jsxs(A.InputAdornment,{position:"end",children:[e.jsx(A.IconButton,{edge:"end",onClick:d,children:e.jsx(Se.default,{})}),e.jsx(Ie.default,{open:!!n,anchorEl:n,onClose:h,transformOrigin:{vertical:"top",horizontal:"right"},anchorOrigin:{vertical:"bottom",horizontal:"right"},PaperProps:{sx:{width:n==null?void 0:n.clientWidth,maxHeight:200,overflowY:"auto",bgcolor:"grey.50"}},elevation:1,sx:{mt:2},children:e.jsx(A.Box,{sx:{p:2},children:m.map(({code:x,name:C})=>e.jsxs(A.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between","& + &":{mt:1}},children:[e.jsx(A.Box,{sx:{flex:"0 0 120px"},children:C}),e.jsx(A.Box,{sx:{flex:1},children:e.jsx(A.TextField,{value:l[x]||"",size:"small",sx:{width:1},onChange:f=>o({...l,[x]:f.target.value})})})]},x))})})]})}})}function $e({open:t,initialLabel:r,onSubmit:s,onClose:l,...o}){const n=!(r!=null&&r.id),[a,d]=He({name:(r==null?void 0:r.name)||"",color:(r==null?void 0:r.color)||"#ddd",slug:(r==null?void 0:r.id)||"",translation:(r==null?void 0:r.translation)||{}}),h=S=>/^#([0-9A-F]{3}){1,2}$/i.test(S),m=u.useMemo(()=>n?a.name&&a.color&&a.slug&&h(a.color):a.name&&a.color&&h(a.color),[a,n]),[x,C]=u.useState(!1),f=()=>{s({...r,name:a.name,color:a.color,id:a.slug,translation:a.translation})},y=S=>{d({color:S.hex}),setTimeout(()=>C(!1))},v=S=>{d({color:S.target.value})};return e.jsx(W.default,{open:t,showCloseButton:!0,maxWidth:"lg",title:n?"Create label":"Edit label",actions:e.jsxs(e.Fragment,{children:[e.jsx(O.default,{color:"inherit",variant:"contained",size:"small",onClick:l,children:"Cancel"}),e.jsx(O.default,{color:"primary",variant:"contained",size:"small",onClick:f,disabled:!m,children:n?"Create":"Save Changes"})]}),onClose:l,...o,children:e.jsxs(p.default,{width:600,minHeight:280,children:[e.jsx(Je,{label:"Name",value:a.name,placeholder:"New label",size:"small",fullWidth:!0,onChange:S=>d({name:S.target.value}),I18NProps:{translation:a.translation,onChange:S=>d({translation:S})}}),e.jsx(P.default,{label:"Slug",value:a.slug,size:"small",fullWidth:!0,disabled:!n,onChange:S=>d({slug:S.target.value}),sx:{mt:2}}),(r==null?void 0:r.parent)&&e.jsx(P.default,{label:"Parent",value:r.parent.name,size:"small",fullWidth:!0,disabled:!0,sx:{mt:2}}),e.jsx(be.default,{onClickAway:()=>C(!1),children:e.jsxs(p.default,{sx:{position:"relative",mt:2},children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(p.default,{sx:{width:30,height:30,bgcolor:a.color,borderRadius:1},onClick:()=>C(!0)}),e.jsx(P.default,{label:"",value:a.color,size:"small",onChange:v,inputProps:{maxLength:7},sx:{width:100,".MuiInputBase-root":{height:32}}})]}),x&&e.jsx(p.default,{sx:{position:"absolute",top:48,zIndex:1},children:e.jsx(ae.GithubPicker,{color:a.color,onChangeComplete:y})})]})})]})})}function Ke({open:t,label:r,onSubmit:s,onClose:l,...o}){return e.jsx(W.default,{open:t,showCloseButton:!0,maxWidth:"md",title:"Delete",actions:e.jsxs(e.Fragment,{children:[e.jsx(O.default,{color:"inherit",variant:"contained",size:"small",onClick:l,children:"Cancel"}),e.jsx(O.default,{color:"primary",variant:"contained",size:"small",onClick:s,children:"Delete"})]}),onClose:l,...o,children:e.jsxs(p.default,{width:600,minHeight:280,children:[e.jsx(we.default,{severity:"info",sx:{mb:2},children:"Are you sure you want to delete these labels ?"}),e.jsx(q,{data:[r]})]})})}const Qe=N.styled(q)`
|
|
15
15
|
.label-tree-item {
|
|
16
16
|
&:before {
|
|
17
17
|
content: '';
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
padding: 0 16px;
|
|
33
33
|
}
|
|
34
|
-
`;function
|
|
34
|
+
`;function Ue({locale:t,value:r}){return e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flex:"0 0 auto",px:1,py:.25,fontSize:12,bgcolor:"grey.300",borderRadius:2},children:[e.jsx(p.default,{sx:{pr:.5,borderRight:1,borderColor:"grey.400"},children:t}),e.jsx(p.default,{sx:{pl:.5},children:r})]})}function Ye({data:t,api:r,...s}){const[l,o]=u.useState(null),[n,a]=u.useState(null),[d,h]=u.useState(H(t)),m=u.useMemo(()=>z(d),[d]),x=u.useMemo(()=>{const c=(b,_)=>b.map(w=>(_&&(w.parent=_),w.children&&(w.children=c(w.children,w)),w));return c(d)},[d]),C=c=>{var b,_;c.parent?(c.parent.children=(_=(b=c.parent)==null?void 0:b.children)==null?void 0:_.map(w=>w.id===c.id?{...c}:w),C(c.parent)):h(d.map(w=>w.id===c.id?{...c}:w))},f=c=>{c.parent?(c.parent.children=c.parent.children||[],c.parent.children.push(c),h([...d])):h([...d,c])},y=c=>{var b;c.parent?c.parent.children=(b=c.parent.children)==null?void 0:b.filter(_=>_.id!==c.id):h(d.filter(_=>_.id!==c.id))},v=c=>{if(l)return;o({id:"",name:"New label",parent:c,color:"#dddddd"})},S=c=>{l||o(c)},D=async c=>{if(!l)return;const{parent:b,children:_,translation:w,...T}=c;l.id?(await r.updateLabel({...T,translation:JSON.stringify(w),parentId:b==null?void 0:b.id}),C(c)):(await r.createLabel({...T,translation:JSON.stringify(w),parentId:b==null?void 0:b.id}),f(c)),o(null)},g=async()=>{!n||(await r.deleteLabel(n.id),y(n),a(null))},k=(c,b)=>e.jsxs(e.Fragment,{children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.jsx(p.default,{children:c}),b.translation&&e.jsx(p.default,{sx:{display:"flex",alignItems:"center",gap:.5,ml:2},children:Object.keys(b.translation).map(_=>{var T;const w=(T=b.translation)==null?void 0:T[_];return w?e.jsx(Ue,{locale:_,value:w},_):null})})]}),e.jsxs(p.default,{sx:{display:"flex",gap:1,flex:"0 0 auto"},children:[e.jsx(L.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>v(b),children:e.jsx(ve.default,{sx:{fontSize:20}})}),e.jsx(L.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>S(b),children:e.jsx(Ce.default,{sx:{fontSize:18}})}),e.jsx(L.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>a(b),children:e.jsx(xe.default,{sx:{fontSize:20}})})]})]});return e.jsxs(p.default,{...s,children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(ye.default,{component:"h2",variant:"h6",children:"Manage labels"}),e.jsx(O.default,{color:"primary",variant:"contained",size:"small",sx:{textTransform:"none"},onClick:()=>v(),children:"New label"})]}),e.jsxs(p.default,{sx:{mt:2,border:1,borderColor:"grey.300",borderRadius:1,overflow:"hidden"},children:[e.jsxs(p.default,{sx:{p:2,fontSize:14,fontWeight:"bold",bgcolor:"grey.200"},children:[m.length," labels"]}),e.jsx(p.default,{sx:{pt:.5},children:e.jsx(Qe,{data:x,selected:[],renderItem:k,rowHeight:64})})]}),e.jsx($e,{open:!!l,onClose:()=>o(null),initialLabel:l,onSubmit:D},l==null?void 0:l.id),e.jsx(Ke,{open:!!n,onClose:()=>a(null),label:n,onSubmit:g},n==null?void 0:n.id)]})}const K=u.createContext({}),M=()=>u.useContext(K),Ze=()=>{const{updateLabels:t}=M();u.useEffect(()=>()=>{t()},[])};function Ge({fetchLabels:t,children:r}){const{locale:s}=F.useLocaleContext(),[l,o]=u.useState({loading:!0,labels:[],updateCounter:1});u.useEffect(()=>{(async()=>{try{o(v=>({...v,loading:!0}));const y=await t();o(v=>({...v,loading:!1,labels:J(y)}))}catch(y){console.error(y),o(v=>({...v,loading:!1,labels:[]}))}})()},[l.updateCounter]);const n=u.useMemo(()=>{var y;return(y=l.labels)!=null&&y.length?z(l.labels).reduce((v,S)=>({...v,[S.id]:S}),{}):{}},[l.labels]),a=u.useCallback(f=>{var y;return{...f,name:((y=f.translation)==null?void 0:y[s])||f.name}},[s]),d=u.useCallback(f=>f.filter(Boolean).map(y=>n[y]).map(a),[n,a]),h=u.useCallback(f=>(f==null?void 0:f.split(","))||[],[]),m=u.useCallback((f=[])=>{if(!!(f!=null&&f.length))return f.join(",")},[]),x=u.useMemo(()=>l.labels.map(a),[l.labels,a]),C=u.useMemo(()=>({loading:l.loading,labels:l.labels||[],updateLabels:()=>o(f=>({...f,updateCounter:++l.updateCounter})),getLabelsById:d,parseLabelIds:h,stringifyLabelIds:m,localizedLabels:x}),[l,d,h,m,x]);return e.jsx(K.Provider,{value:C,children:r})}function Xe({labels:t,editable:r,onChange:s,sx:l}){const o=!(t!=null&&t.length),{labels:n,loading:a,getLabelsById:d}=M(),[h,m]=u.useState(!1);if(a||!r&&o)return null;const x=y=>{s==null||s(y),setTimeout(()=>{m(!1)},300)};if(h)return e.jsx(Ae.default,{onClickAway:()=>h&&m(!1),children:e.jsx("div",{children:e.jsx($,{data:n,value:t||[],onChange:x})})});const C=d(t||[]),f=[{display:"flex",gap:1,alignItems:"center",flexWrap:"wrap"},...Array.isArray(l)?l:[l]];return e.jsxs(p.default,{sx:f,children:[C.map(y=>y?e.jsx(Oe.default,{label:y.name,variant:"filled",size:"small",sx:{borderRadius:1}},y.id):null),r&&!o&&e.jsx(L.default,{color:"inherit",size:"small",onClick:()=>m(!0),sx:{color:"grey.400"},children:e.jsx(_e.default,{sx:{fontSize:20}})}),r&&o&&e.jsx(O.default,{color:"inherit",variant:"outlined",startIcon:e.jsx(ke.default,{}),onClick:()=>m(!0),children:"Edit labels"})]})}i.LabelManager=Ye,i.LabelPicker=$,i.LabelTree=q,i.Labels=Xe,i.LabelsProvider=Ge,i.transformLabels=J,i.useLabelsContext=M,i.useLabelsUpdateOnDestroy=Ze,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/labels",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.34",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./dist/index.es.js",
|
|
13
13
|
"require": "./dist/index.umd.js"
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
"./src/*": "./src/*"
|
|
15
16
|
},
|
|
16
17
|
"scripts": {
|
|
17
18
|
"dev": "npm run storybook",
|
|
@@ -74,5 +75,5 @@
|
|
|
74
75
|
"resolutions": {
|
|
75
76
|
"react": "^18.2.0"
|
|
76
77
|
},
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "3ff1c28b65f182e70e1701c01e98306893b28046"
|
|
78
79
|
}
|