amotify 0.1.48 → 0.1.50
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/bundler_style.ts +1 -1
- package/dist/@declaration/property.d.ts +10 -10
- package/dist/@styles/componentClasses/{_.css → index.css} +3 -3
- package/dist/@styles/componentClasses/{_.js → index.js} +3 -4
- package/dist/@styles/index.css +3 -3
- package/dist/@styles/index.d.ts +1 -1
- package/dist/@styles/index.js +3 -4
- package/dist/@styles/init.css +1 -1
- package/dist/@styles/style.css +3 -3
- package/dist/@styles/style.d.ts +1 -1
- package/dist/@styles/style.js +3 -4
- package/dist/@styles/var.css +1 -1
- package/dist/@utils/GenerateClassName.d.ts +2 -2
- package/dist/@utils/GenerateClassName.js +1 -1
- package/dist/@utils/LaunchReactApp.d.ts +3 -3
- package/dist/@utils/LaunchReactApp.js +1 -1
- package/dist/@utils/color.d.ts +1 -1
- package/dist/@utils/color.js +1 -1
- package/dist/@utils/config.d.ts +1 -1
- package/dist/@utils/config.js +1 -1
- package/dist/@utils/fin.js +1 -1
- package/dist/@utils/{_.d.ts → index.d.ts} +1 -1
- package/dist/@utils/index.js +1 -0
- package/dist/@utils/jsminEx.d.ts +5 -5
- package/dist/@utils/useRecycle.js +1 -1
- package/dist/@utils/useStore.d.ts +2 -2
- package/dist/@utils/useStore.js +1 -1
- package/dist/atoms/Box.d.ts +1 -1
- package/dist/atoms/Box.js +1 -1
- package/dist/atoms/FAI.d.ts +1 -1
- package/dist/atoms/Flex.d.ts +1 -1
- package/dist/atoms/Img.d.ts +1 -1
- package/dist/atoms/Img.js +1 -1
- package/dist/atoms/Logo.d.ts +15 -15
- package/dist/atoms/Logo.js +2 -2
- package/dist/atoms/P.d.ts +1 -1
- package/dist/atoms/P.js +1 -1
- package/dist/atoms/Placeholder.js +1 -1
- package/dist/atoms/Span.d.ts +1 -1
- package/dist/atoms/Span.js +1 -1
- package/dist/fn/Button.d.ts +5 -5
- package/dist/fn/Button.js +1 -1
- package/dist/fn/Cropper.d.ts +4 -4
- package/dist/fn/Cropper.js +1 -1
- package/dist/fn/Effect/Fade.js +1 -1
- package/dist/fn/Effect/Pudding.d.ts +1 -1
- package/dist/fn/Effect/Pudding.js +1 -1
- package/dist/fn/Effect/Ripple.d.ts +1 -1
- package/dist/fn/Effect/Ripple.js +1 -1
- package/dist/fn/Input/AutoHeightText.d.ts +1 -1
- package/dist/fn/Input/AutoHeightText.js +1 -1
- package/dist/fn/Input/Checker.d.ts +5 -5
- package/dist/fn/Input/Chips/Selector.d.ts +6 -6
- package/dist/fn/Input/Chips/Selector.js +1 -1
- package/dist/fn/Input/Chips/{_.d.ts → index.d.ts} +2 -2
- package/dist/fn/Input/Chips/index.js +1 -0
- package/dist/fn/Input/Contenteditable.d.ts +2 -2
- package/dist/fn/Input/Contenteditable.js +1 -1
- package/dist/fn/Input/DigitCharacters.d.ts +3 -3
- package/dist/fn/Input/DigitCharacters.js +1 -1
- package/dist/fn/Input/Filer.d.ts +5 -5
- package/dist/fn/Input/Filer.js +1 -1
- package/dist/fn/Input/Hidden.d.ts +1 -1
- package/dist/fn/Input/Hidden.js +1 -1
- package/dist/fn/Input/List.d.ts +7 -7
- package/dist/fn/Input/List.js +1 -1
- package/dist/fn/Input/Parts.d.ts +3 -3
- package/dist/fn/Input/Parts.js +1 -1
- package/dist/fn/Input/Plain.d.ts +3 -3
- package/dist/fn/Input/Plain.js +1 -1
- package/dist/fn/Input/RichSelect.d.ts +5 -5
- package/dist/fn/Input/RichSelect.js +1 -1
- package/dist/fn/Input/Search.d.ts +2 -2
- package/dist/fn/Input/Search.js +1 -1
- package/dist/fn/Input/Segmented.d.ts +8 -8
- package/dist/fn/Input/Segmented.js +1 -1
- package/dist/fn/Input/Select.d.ts +3 -3
- package/dist/fn/Input/Select.js +1 -1
- package/dist/fn/Input/Slider.d.ts +2 -2
- package/dist/fn/Input/Slider.js +1 -1
- package/dist/fn/Input/Switch.d.ts +2 -2
- package/dist/fn/Input/Switch.js +1 -1
- package/dist/fn/Input/Text.d.ts +2 -2
- package/dist/fn/Input/Text.js +1 -1
- package/dist/fn/Input/TextArea.d.ts +2 -2
- package/dist/fn/Input/TextArea.js +1 -1
- package/dist/fn/Input/Time/Picker.d.ts +1 -1
- package/dist/fn/Input/Time/Picker.js +1 -1
- package/dist/fn/Input/Time/{_.d.ts → index.d.ts} +3 -3
- package/dist/fn/Input/Time/index.js +1 -0
- package/dist/fn/Input/core.d.ts +11 -11
- package/dist/fn/Input/core.js +1 -1
- package/dist/fn/Input/{_.d.ts → index.d.ts} +7 -7
- package/dist/fn/Input/index.js +1 -0
- package/dist/fn/Layout/PageRouter.d.ts +1 -1
- package/dist/fn/Layout/PageRouter.js +1 -1
- package/dist/fn/Layout/PageViewController.d.ts +1 -1
- package/dist/fn/Layout/PageViewController.js +1 -1
- package/dist/fn/Layout/RootViewController.d.ts +3 -3
- package/dist/fn/Layout/RootViewController.js +1 -1
- package/dist/fn/Layout/SwipeView.d.ts +2 -2
- package/dist/fn/Layout/SwipeView.js +1 -1
- package/dist/fn/Layout/TabBar.d.ts +1 -1
- package/dist/fn/Layout/TabBar.js +1 -1
- package/dist/fn/Loader/corner.js +1 -1
- package/dist/fn/Loader/{_.d.ts → index.d.ts} +2 -2
- package/dist/fn/Loader/index.js +1 -0
- package/dist/fn/Loader/mini.d.ts +2 -2
- package/dist/fn/Loader/mini.js +1 -1
- package/dist/fn/Loader/top.js +1 -1
- package/dist/fn/Sheet.d.ts +13 -13
- package/dist/fn/Sheet.js +1 -1
- package/dist/fn/Snackbar.d.ts +4 -4
- package/dist/fn/Snackbar.js +1 -1
- package/dist/fn/Table/Data.d.ts +4 -4
- package/dist/fn/Table/Data.js +1 -1
- package/dist/fn/Table/Drag.d.ts +2 -2
- package/dist/fn/Table/Drag.js +1 -1
- package/dist/fn/Table/Normal.d.ts +2 -2
- package/dist/fn/Table/Normal.js +1 -1
- package/dist/fn/Table/Parts.d.ts +2 -2
- package/dist/fn/Table/Parts.js +1 -1
- package/dist/fn/Table/Wrapper.d.ts +2 -2
- package/dist/fn/Table/Wrapper.js +1 -1
- package/dist/fn/Table/cellStyling.d.ts +4 -4
- package/dist/fn/Table/{_.d.ts → index.d.ts} +4 -4
- package/dist/fn/Tooltips.d.ts +4 -4
- package/dist/fn/Tooltips.js +1 -1
- package/dist/fn/index.d.ts +10 -0
- package/dist/fn/index.js +1 -0
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/mols/Accordion.d.ts +1 -1
- package/dist/mols/Accordion.js +1 -1
- package/dist/mols/LinkifyText.d.ts +1 -1
- package/dist/mols/List.d.ts +1 -1
- package/dist/mols/Row.d.ts +1 -1
- package/dist/mols/Text.d.ts +1 -1
- package/dist/temps/designBook.js +1 -1
- package/package.json +15 -15
- package/dist/@utils/_.js +0 -1
- package/dist/fn/Input/Chips/_.js +0 -1
- package/dist/fn/Input/Time/_.js +0 -1
- package/dist/fn/Input/_.js +0 -1
- package/dist/fn/Loader/_.js +0 -1
- package/dist/fn/_.d.ts +0 -10
- package/dist/fn/_.js +0 -1
- /package/dist/@declaration/{_.d.ts → index.d.ts} +0 -0
- /package/dist/@declaration/{_.js → index.js} +0 -0
- /package/dist/@styles/componentClasses/{_.d.ts → index.d.ts} +0 -0
- /package/dist/atoms/{_.d.ts → index.d.ts} +0 -0
- /package/dist/atoms/{_.js → index.js} +0 -0
- /package/dist/fn/Effect/{_.d.ts → index.d.ts} +0 -0
- /package/dist/fn/Effect/{_.js → index.js} +0 -0
- /package/dist/fn/Layout/{_.d.ts → index.d.ts} +0 -0
- /package/dist/fn/Layout/{_.js → index.js} +0 -0
- /package/dist/fn/Table/{_.js → index.js} +0 -0
- /package/dist/mols/{_.d.ts → index.d.ts} +0 -0
- /package/dist/mols/{_.js → index.js} +0 -0
- /package/dist/orgs/{_.d.ts → index.d.ts} +0 -0
- /package/dist/orgs/{_.js → index.js} +0 -0
- /package/dist/temps/{_.d.ts → index.d.ts} +0 -0
- /package/dist/temps/{_.js → index.js} +0 -0
package/dist/fn/Table/Data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s,c as R,d as q}from"../../chunk-VY3566IV.js";import{Fragment as W,jsx as n,jsxs as x}from"react/jsx-runtime";import{useState as F,useEffect as G}from"react";import{$$ as I,useStore as L}from"../../@utils/_";import B from"../../atoms/Box";import M from"../../atoms/Flex";import K from"../../atoms/FAI";import Y from"../../atoms/Span";import Z from"../../mols/Column";import A from"../../mols/Row";import E from"../Button";import U from"../Sheet";import O from"../Input/_";import{faArrowUp as ee}from"@fortawesome/free-solid-svg-icons/faArrowUp";import{faArrowDown as te}from"@fortawesome/free-solid-svg-icons/faArrowDown";import{faArrowRight as re}from"@fortawesome/free-solid-svg-icons/faArrowRight";import{faFilter as oe}from"@fortawesome/free-solid-svg-icons/faFilter";import P from"./Parts";import ne from"./Wrapper";import{DefaultCellSystemStyles as V}from"./cellStyling";import{TableClasses as b}from"../../@styles/componentClasses/_";const f={__memoryID:I.uuid.gen(),Header:t=>{let{val_status:e,set_status:r,KeywordFilterRows:i}=s({},t),{order:u,filter:o}=e,[w,S]=u.current,c=[],g=[...e.head];e.checker&&c.push(n(P.TH,R(s(s(R(s({},e.cellStyles),{fontWeight:"2.normal",position:"sticky",top:0,unitWidth:4,padding:0}),V({top:!0,bottom:!e.rows.length,left:!0,right:!e.colLength})),e.cellStylesCallback?e.cellStylesCallback({top:!0,bottom:!e.rows.length,left:!0,right:!e.colLength,rowIndex:0,colIndex:0,isBody:!1,isHeader:!0}):{}),{className:[b("Cell"),e.cellClassName].join(" "),freeCSS:{zIndex:2},children:n(B,{flexCenter:!0,children:n(O.Checker,{label:null,value:!1,onUpdateValidValue:({value:l})=>{let h=e.rows;h.forEach(C=>{C.checked=l}),r(R(s({},e),{rows:h}))}})})})));for(let l=0;l<e.colLength;l++){let h=g[l];if(!h)continue;let C=h.children||h.data,a=u.enabled&&u.column[l],d=o.enabled&&o.column[l],p=a?n(K,{fontSize:"1.mini",fontColor:l==w?"1.clear":"5.translucent",icon:l==w?S=="DESC"?te:ee:re}):null,_=n(W,{});if(d){let k=i.map(T=>{var N;return(N=T[l])==null?void 0:N.data});k=[...new Set(k)].order({direction:"ASC"});let v=o.current[l];if(v){let T=k.filter(y=>!v.includes(y)),N=[];k.forEach(y=>{y&&N.push({value:y,label:n(B,{flexSizing:"auto",children:y})})});let j="BUTTON-"+e.componentID+"-"+l,J=e.componentID+"-"+l,X={sheetID:J,parent:"#"+j,gravityPoint:23,type:"custom",content:x(M,{flexType:"col",border:!0,boxShadow:"3.remark",backgroundColor:"layer.1",borderRadius:1,freeCSS:{minWidth:12*20,maxWidth:12*30},children:[n(Z,{gap:"1/3",overflow:"auto",padding:"2/3",freeCSS:{maxHeight:12*30},children:n(O.Checkbox,{tone:"cloud",icon:!0,value:T,display:"flex",gap:"1/2",override:"force",options:N,hideInput:!0,name:"DTFilter-col-"+l+"-table-"+e.componentID,cellStyles:{flexSizing:"auto",padding:"2/3"},onUpdateValidValue:({value:y})=>{let H=k.filter(Q=>!y.includes(Q)),$=s({},e);$.filter.current[l]=H,r($)}})}),x(A.Separate,{gap:"2/3",padding:"2/3",horizontalAlign:"right",children:[n(E.Button.Border.S,{isRounded:!0,onClick:()=>{U.close(J)},children:"\u9589\u3058\u308B"}),n(E.Button.Prime.S,{color:"theme",isRounded:!0,ssEffectsOnActive:"shrink",onClick:()=>{let y=[];v.length||(y=k);let H=s({},e);H.filter.current[l]=y,r(H)},children:"\u5168\u9078\u629E"})]})]})};U.refresh(X,!0),_=n(B,{className:b("FilterRegion"),children:n(E.Button.Sub.S,{ssSphere:2.5,fontSize:"1.mini",className:b("Filtering_"+!!v.length),id:j,onClick:y=>{y.stopPropagation(),U.open(X)},children:n(K,{icon:oe})})})}}h=R(s(s(s(s({},e.cellStyles),h),V({top:!0,bottom:!e.rows.length,left:l==Number(e.checker),right:l==e.colLength-1})),e.cellStylesCallback?e.cellStylesCallback({top:!0,bottom:!e.rows.length,left:l==Number(e.checker),right:l==e.colLength-1,rowIndex:0,colIndex:l,isBody:!1,isHeader:!0}):{}),{ssPushable:a,className:[b("Cell"),e.cellClassName,h.className].join(" ")}),c.push(n(P.TH,R(s({fontWeight:"2.normal",position:"sticky",top:0},h),{freeCSS:s({zIndex:2},h.freeCSS),onClick:k=>{if(a){let v=s({},e),T=[l,w===l&&S=="ASC"?"DESC":"ASC"];v.order.current=T,r(v),e.onOrderChanged&&e.onOrderChanged(T)}},children:x(M,{flexType:"row-r",flexWrap:!1,height:1,borderRadius:"inherit",flexCenter:!0,children:[_,x(M,{flexSizing:0,position:"relative",borderRadius:"inherit",gap:"1/3",flexWrap:!1,horizontalAlign:"center",children:[p,C]})]})})))}return n(P.Row,{className:[b("Row"),b("HeadRow")].join(" "),children:c})},Body:t=>{let{val_status:e,PageRows:r}=t,i=[];if(r.forEach((u,o)=>{let w=[...u],S=[];e.checker&&S.push(n(P.TH,R(s(s(s({unitWidth:4,padding:0,borderRight:!0},e.cellStyles),V({top:o==0&&!e.head,bottom:o==r.length-1,left:!0,right:!e.colLength})),e.cellStylesCallback?e.cellStylesCallback({top:o==0&&!e.head,bottom:o==r.length-1,left:!0,right:!e.colLength,rowIndex:o,colIndex:0,isBody:!0,isHeader:!1}):{}),{className:[b("Cell"),e.cellClassName].join(" "),children:n(B,{flexCenter:!0,children:n(O.Checker,{label:null,value:u.checked,override:"force",onUpdateValidValue:({value:c})=>{let g=e.rows;g[o].checked=c,t.set_status(R(s({},e),{rows:g}))}})})}))),w.forEach((c,g)=>{if(!c)return;let a=c,{type:l="td"}=a,h=q(a,["type"]);h=R(s(s(s(s({},e.cellStyles),h),V({top:o==0&&!e.head,bottom:o==r.length-1,left:e.checker?!1:g==0,right:g==e.colLength-1})),e.cellStylesCallback?e.cellStylesCallback({top:o==0&&!e.head,bottom:o==r.length-1,left:e.checker?!1:g==0,right:g==e.colLength-1,rowIndex:o,colIndex:g,isBody:!0,isHeader:!1}):{}),{className:[b("Cell"),e.cellClassName,h.className].join(" ")});let C=P[l=="td"?"TD":"TH"];S.push(n(C,s({},h),g))}),i.push(n(P.Row,{className:[b("Row"),b("BodyRow")].join(" "),children:S,onClick:c=>{e.onRowClick&&e.onRowClick(JSON.parse(u.rowID),c)}},o))}),!r.length){let u=n(B,{padding:2,fontColor:"4.thin",freeCSS:{textAlign:"center"},borderTop:"1.thin",children:"\u30C6\u30FC\u30D6\u30EB\u304C\u3042\u308A\u307E\u305B\u3093"});e.noRecords&&(u=n(W,{children:e.noRecords})),i.push(n(P.Row,{className:[b("Row"),b("BodyRow"),b("DataNotFound")].join(" "),children:n(P.TD,{colSpan:e.colLength,className:b("Cell"),children:u})},"dataNotFound"))}return n(W,{children:i})},Core:t=>{let{val_status:e,set_status:r}=t,{searchKeyword:i,filter:u,order:o,paging:w}=e,S=[...e.rows],c=[...e.rows],g=[...e.rows],l=[...e.rows];if(i&&(c=S.filter(a=>(a.__sys4SearchKey||"").match(new RegExp(i,"i"))?1:0),g=[...c],l=[...c]),u.enabled)for(let a=0;a<e.colLength;a++){let d=u.column[a],p=u.current[a];d&&p&&p.length&&(g=g.filter(_=>!p.includes(_[a].data)),l=[...g])}o.enabled&&(g=g.order({direction:o.current[1],keys:[o.current[0],"orderIndex"]}),l=[...g]);{let{currentPageIndex:a,rowLength:d}=w;l=[...l].splice((a-1)*d,d)}let h=f.__memoryID+"_"+e.tableID,C={tableComponentDidMount:!0,totalRows:S.length,pageRows:l.length,filteredRows:g.length,filter:e.filter,order:e.order,paging:e.paging,searchKeyword:e.searchKeyword};return L.update({key:h,value:{status:C,updatePageIndex:a=>{let d=Math.min(Math.max(1,a),e.paging.pageLength),p=s({},e);p.paging.currentPageIndex=d,r(p)},updateRowLength:a=>{let d=s({},e);d.paging={rowLength:a,currentPageIndex:1,pageLength:Math.ceil(g.length/a)},r(d)},updateKeyword:a=>{I.interval.clear("InputSearchTime"),I.interval.standBy("InputSearchTime",200,()=>{let d=s({},e);d.searchKeyword=a,d.paging.currentPageIndex=1,d.filter.current=d.filter.current.map(()=>[]),r(d)})},getRowData:()=>{let a=[...S];return o.enabled&&(a=a.order({direction:o.current[1],keys:[o.current[0],"orderIndex"]})),a.forEach(d=>{d.currentPage=!1,d.filtered=!1}),l.forEach(d=>{let{rowID:p}=d;a.find(_=>_.rowID==p).currentPage=!0}),g.forEach(d=>{let{rowID:p}=d;a.find(_=>_.rowID==p).filtered=!0}),a}}}),G(()=>{let a=f.Propagations[e.tableID]||[];Object.keys(a).forEach(d=>{let p=L.get(d);p!=null&&p.refresh&&p.refresh()})}),n(B,{className:b("TableBase"),children:x(P.Table,{className:b("Table"),children:[n(f.Header,{val_status:e,set_status:r,KeywordFilterRows:c}),n(f.Body,{val_status:e,set_status:r,PageRows:l})]})})},Propagations:{},DataLeveler:t=>{var e,r;return t=s({},t),t.filter=(e=t.filter)!=null?e:!1,t.filter=Array.from({length:t.colLength}).map((i,u)=>{var o;return I.is.boolean(t.filter)?t.filter:(o=t.filter[u])!=null?o:!1}),t.order=(r=t.order)!=null?r:!0,t.order=Array.from({length:t.colLength}).map((i,u)=>{var o;return I.is.boolean(t.order)?t.order:(o=t.order[u])!=null?o:!0}),t=s({checker:!1,searchKeyword:"",filter:!1,order:!0,defaultOrder:[0,"ASC"]},t),t.rows.forEach((i,u)=>{i.rowID=JSON.stringify(i.rowID||u);let o=[];i.forEach((w,S)=>{let{data:c,children:g,orderIndex:l}=w;w.orderIndex=I.is.exist(l)?String(l):String(c),w.children=g||String(c),o.push(String(w.data))}),i.__sys4SearchKey=o.join("/")}),n(f.StateManager,s({eventID:I.uuid.gen()},t))},StateManager:t=>{let{colLength:e,eventID:r,checker:i=!1,searchKeyword:u="",filter:o,order:w,defaultOrder:S=[0,"ASC"],pageRowLength:c=30}=t,[g]=F(I.uuid.gen()),l={tableID:t.tableID||g,componentID:g,colLength:e,checker:i,searchKeyword:u,filter:{enabled:o!==!1,column:o,current:Array.from({length:e},()=>[])},order:{enabled:w!==!1,column:w,current:S},paging:{rowLength:c,pageLength:Math.ceil(t.rows.length/c),currentPageIndex:1},head:t.head,rows:t.rows,noRecords:t.noRecords,cellStyles:t.cellStyles||{},cellClassName:t.cellClassName||"",cellStylesCallback:t.cellStylesCallback,onRowClick:t.onRowClick,onOrderChanged:t.onOrderChanged},[h,C]=F(l),[a,d]=F(t.eventID);return a!=t.eventID&&(d(t.eventID),C(l)),n(f.Core,{val_status:h,set_status:C})}},m={__memoryID:f.__memoryID,useStatus:t=>{var o;let[e]=F(I.uuid.gen()),[r,i]=F(I.uuid.gen()),u=f.__memoryID+"_"+t;return G(()=>(f.Propagations[t]=R(s({},f.Propagations[t]),{[e]:1}),L.set({key:e,value:{refresh:()=>{i(I.uuid.gen())}}}),()=>{delete f.Propagations[t][e]}),[]),((o=L.get(u))==null?void 0:o.status)||{tableComponentDidMount:!1}},getRowData:t=>{let e=L.get(f.__memoryID+"_"+t);if(e!=null&&e.getRowData)return e.getRowData()},setPageIndex:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updatePageIndex&&r.updatePageIndex(e)},setRowLength:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updateRowLength&&r.updateRowLength(e)},setSearchKeyword:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updateKeyword&&r.updateKeyword(e)}},z={SearchInput:t=>{let e=m.useStatus(t.tableID);return e.tableComponentDidMount?n(O.Text.Normal,{placeholder:"\u691C\u7D22...",clearButton:!0,padding:"2/3",paddingRight:3,rightIcon:n(O.Comps.RightIcon,{fontColor:"5.translucent",right:"2/3",children:n(K.Search,{})}),override:"force",value:e.searchKeyword,onUpdateValidValue:({value:r})=>{m.setSearchKeyword(t.tableID,r)}}):null},Info:t=>{let e=m.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=e.filteredRows.ratio(e.totalRows)||0;return x(M,{verticalAlign:"baseline",gap:"1/2",fontSize:"1.mini",fontColor:"3.blur",children:[n(Y,{fontSize:"4.thirdTitle",fontColor:"theme",children:e.filteredRows.toLocaleString()}),"/ ",e.totalRows.toLocaleString(),"\u4EF6 (",r,"%)"]})},Paging:t=>{let e=m.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=[];for(let i=0;i<e.paging.pageLength;i++)r.push({value:i+1,label:(i+1).toString()});return x(A.Center,{children:[x(A.Center,{gap:"1/2",children:["\u30DA\u30FC\u30B8 :",n(O.Select,{enableUnSelected:!1,padding:["1/3","2/3"],rightIcon:!1,placeholder:"",override:"force",value:e.paging.currentPageIndex,options:r,onUpdateValidValue:({value:i})=>{m.setPageIndex(t.tableID,i)}}),"/ ",e.paging.pageLength]}),x(A.Right,{gap:"1/2",children:[n(E.Button.Sub.R,{ssSphere:3,onClick:()=>{if(e.paging.currentPageIndex==1){m.setPageIndex(t.tableID,e.paging.pageLength);return}m.setPageIndex(t.tableID,e.paging.currentPageIndex-1)},children:n(K.ChevronLeft,{})}),n(E.Button.Sub.R,{ssSphere:3,onClick:()=>{if(e.paging.currentPageIndex==e.paging.pageLength){m.setPageIndex(t.tableID,1);return}m.setPageIndex(t.tableID,e.paging.currentPageIndex+1)},children:n(K.ChevronRight,{})})]})]})},RowLength:t=>{let e=m.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=e.paging.rowLength,i=0,u=t.lengthSelect.map(o=>(i|=+(o==r),{value:o,label:o.toString()}));return i||u.push({value:r,label:r.toString()}),u=u.order({direction:"ASC",keys:["value"]}),x(A.Center,{gap:"1/2",children:["\u4EF6\u6570 :",n(O.Select,{enableUnSelected:!1,rightIcon:!1,placeholder:"\u9078\u629E",override:"force",padding:["1/3","2/3"],value:e.paging.rowLength,options:u,onUpdateValidValue:({value:o})=>{m.setRowLength(t.tableID,o)}})]})}},le=t=>n(ne,R(s({},t),{type:"data",JSXChildren:f.DataLeveler})),D=le;D.__memoryID=f.__memoryID,D.useStatus=m.useStatus,D.getRowData=m.getRowData,D.setPageIndex=m.setPageIndex,D.setRowLength=m.setRowLength,D.setSearchKeyword=m.setSearchKeyword,D.Info=z.Info,D.Paging=z.Paging,D.RowLength=z.RowLength,D.SearchInput=z.SearchInput;export{D as Data,D as default};
|
|
1
|
+
import{b as s,c as R,d as q}from"../../chunk-VY3566IV.js";import{Fragment as W,jsx as n,jsxs as x}from"react/jsx-runtime";import{useState as F,useEffect as G}from"react";import{$$ as I,useStore as L}from"../../@utils";import B from"../../atoms/Box";import M from"../../atoms/Flex";import K from"../../atoms/FAI";import Y from"../../atoms/Span";import Z from"../../mols/Column";import A from"../../mols/Row";import E from"../Button";import U from"../Sheet";import O from"../Input";import{faArrowUp as ee}from"@fortawesome/free-solid-svg-icons/faArrowUp";import{faArrowDown as te}from"@fortawesome/free-solid-svg-icons/faArrowDown";import{faArrowRight as re}from"@fortawesome/free-solid-svg-icons/faArrowRight";import{faFilter as oe}from"@fortawesome/free-solid-svg-icons/faFilter";import P from"./Parts";import ne from"./Wrapper";import{DefaultCellSystemStyles as V}from"./cellStyling";import{TableClasses as m}from"../../@styles/componentClasses";const f={__memoryID:I.uuid.gen(),Header:t=>{let{val_status:e,set_status:r,KeywordFilterRows:i}=s({},t),{order:u,filter:o}=e,[w,S]=u.current,c=[],g=[...e.head];e.checker&&c.push(n(P.TH,R(s(s(R(s({},e.cellStyles),{fontWeight:"2.normal",position:"sticky",top:0,unitWidth:4,padding:0}),V({top:!0,bottom:!e.rows.length,left:!0,right:!e.colLength})),e.cellStylesCallback?e.cellStylesCallback({top:!0,bottom:!e.rows.length,left:!0,right:!e.colLength,rowIndex:0,colIndex:0,isBody:!1,isHeader:!0}):{}),{className:[m("Cell"),e.cellClassName].join(" "),freeCSS:{zIndex:2},children:n(B,{flexCenter:!0,children:n(O.Checker,{label:null,value:!1,onUpdateValidValue:({value:l})=>{let h=e.rows;h.forEach(C=>{C.checked=l}),r(R(s({},e),{rows:h}))}})})})));for(let l=0;l<e.colLength;l++){let h=g[l];if(!h)continue;let C=h.children||h.data,a=u.enabled&&u.column[l],d=o.enabled&&o.column[l],p=a?n(K,{fontSize:"1.mini",fontColor:l==w?"1.clear":"5.translucent",icon:l==w?S=="DESC"?te:ee:re}):null,_=n(W,{});if(d){let k=i.map(T=>{var N;return(N=T[l])==null?void 0:N.data});k=[...new Set(k)].order({direction:"ASC"});let v=o.current[l];if(v){let T=k.filter(y=>!v.includes(y)),N=[];k.forEach(y=>{y&&N.push({value:y,label:n(B,{flexSizing:"auto",children:y})})});let j="BUTTON-"+e.componentID+"-"+l,J=e.componentID+"-"+l,X={sheetID:J,parent:"#"+j,gravityPoint:23,type:"custom",content:x(M,{flexType:"col",border:!0,boxShadow:"3.remark",backgroundColor:"layer.1",borderRadius:1,freeCSS:{minWidth:12*20,maxWidth:12*30},children:[n(Z,{gap:"1/3",overflow:"auto",padding:"2/3",freeCSS:{maxHeight:12*30},children:n(O.Checkbox,{tone:"cloud",icon:!0,value:T,display:"flex",gap:"1/2",override:"force",options:N,hideInput:!0,name:"DTFilter-col-"+l+"-table-"+e.componentID,cellStyles:{flexSizing:"auto",padding:"2/3"},onUpdateValidValue:({value:y})=>{let H=k.filter(Q=>!y.includes(Q)),$=s({},e);$.filter.current[l]=H,r($)}})}),x(A.Separate,{gap:"2/3",padding:"2/3",horizontalAlign:"right",children:[n(E.Button.Border.S,{isRounded:!0,onClick:()=>{U.close(J)},children:"\u9589\u3058\u308B"}),n(E.Button.Prime.S,{color:"theme",isRounded:!0,ssEffectsOnActive:"shrink",onClick:()=>{let y=[];v.length||(y=k);let H=s({},e);H.filter.current[l]=y,r(H)},children:"\u5168\u9078\u629E"})]})]})};U.refresh(X,!0),_=n(B,{className:m("FilterRegion"),children:n(E.Button.Sub.S,{ssSphere:2.5,fontSize:"1.mini",className:m("Filtering_"+!!v.length),id:j,onClick:y=>{y.stopPropagation(),U.open(X)},children:n(K,{icon:oe})})})}}h=R(s(s(s(s({},e.cellStyles),h),V({top:!0,bottom:!e.rows.length,left:l==Number(e.checker),right:l==e.colLength-1})),e.cellStylesCallback?e.cellStylesCallback({top:!0,bottom:!e.rows.length,left:l==Number(e.checker),right:l==e.colLength-1,rowIndex:0,colIndex:l,isBody:!1,isHeader:!0}):{}),{ssPushable:a,className:[m("Cell"),e.cellClassName,h.className].join(" ")}),c.push(n(P.TH,R(s({fontWeight:"2.normal",position:"sticky",top:0},h),{freeCSS:s({zIndex:2},h.freeCSS),onClick:k=>{if(a){let v=s({},e),T=[l,w===l&&S=="ASC"?"DESC":"ASC"];v.order.current=T,r(v),e.onOrderChanged&&e.onOrderChanged(T)}},children:x(M,{flexType:"row-r",flexWrap:!1,height:1,borderRadius:"inherit",flexCenter:!0,children:[_,x(M,{flexSizing:0,position:"relative",borderRadius:"inherit",gap:"1/3",flexWrap:!1,horizontalAlign:"center",children:[p,C]})]})})))}return n(P.Row,{className:[m("Row"),m("HeadRow")].join(" "),children:c})},Body:t=>{let{val_status:e,PageRows:r}=t,i=[];if(r.forEach((u,o)=>{let w=[...u],S=[];e.checker&&S.push(n(P.TH,R(s(s(s({unitWidth:4,padding:0,borderRight:!0},e.cellStyles),V({top:o==0&&!e.head,bottom:o==r.length-1,left:!0,right:!e.colLength})),e.cellStylesCallback?e.cellStylesCallback({top:o==0&&!e.head,bottom:o==r.length-1,left:!0,right:!e.colLength,rowIndex:o,colIndex:0,isBody:!0,isHeader:!1}):{}),{className:[m("Cell"),e.cellClassName].join(" "),children:n(B,{flexCenter:!0,children:n(O.Checker,{label:null,value:u.checked,override:"force",onUpdateValidValue:({value:c})=>{let g=e.rows;g[o].checked=c,t.set_status(R(s({},e),{rows:g}))}})})}))),w.forEach((c,g)=>{if(!c)return;let a=c,{type:l="td"}=a,h=q(a,["type"]);h=R(s(s(s(s({},e.cellStyles),h),V({top:o==0&&!e.head,bottom:o==r.length-1,left:e.checker?!1:g==0,right:g==e.colLength-1})),e.cellStylesCallback?e.cellStylesCallback({top:o==0&&!e.head,bottom:o==r.length-1,left:e.checker?!1:g==0,right:g==e.colLength-1,rowIndex:o,colIndex:g,isBody:!0,isHeader:!1}):{}),{className:[m("Cell"),e.cellClassName,h.className].join(" ")});let C=P[l=="td"?"TD":"TH"];S.push(n(C,s({},h),g))}),i.push(n(P.Row,{className:[m("Row"),m("BodyRow")].join(" "),children:S,onClick:c=>{e.onRowClick&&e.onRowClick(JSON.parse(u.rowID),c)}},o))}),!r.length){let u=n(B,{padding:2,fontColor:"4.thin",freeCSS:{textAlign:"center"},borderTop:"1.thin",children:"\u30C6\u30FC\u30D6\u30EB\u304C\u3042\u308A\u307E\u305B\u3093"});e.noRecords&&(u=n(W,{children:e.noRecords})),i.push(n(P.Row,{className:[m("Row"),m("BodyRow"),m("DataNotFound")].join(" "),children:n(P.TD,{colSpan:e.colLength,className:m("Cell"),children:u})},"dataNotFound"))}return n(W,{children:i})},Core:t=>{let{val_status:e,set_status:r}=t,{searchKeyword:i,filter:u,order:o,paging:w}=e,S=[...e.rows],c=[...e.rows],g=[...e.rows],l=[...e.rows];if(i&&(c=S.filter(a=>(a.__sys4SearchKey||"").match(new RegExp(i,"i"))?1:0),g=[...c],l=[...c]),u.enabled)for(let a=0;a<e.colLength;a++){let d=u.column[a],p=u.current[a];d&&p&&p.length&&(g=g.filter(_=>!p.includes(_[a].data)),l=[...g])}o.enabled&&(g=g.order({direction:o.current[1],keys:[o.current[0],"orderIndex"]}),l=[...g]);{let{currentPageIndex:a,rowLength:d}=w;l=[...l].splice((a-1)*d,d)}let h=f.__memoryID+"_"+e.tableID,C={tableComponentDidMount:!0,totalRows:S.length,pageRows:l.length,filteredRows:g.length,filter:e.filter,order:e.order,paging:e.paging,searchKeyword:e.searchKeyword};return L.update({key:h,value:{status:C,updatePageIndex:a=>{let d=Math.min(Math.max(1,a),e.paging.pageLength),p=s({},e);p.paging.currentPageIndex=d,r(p)},updateRowLength:a=>{let d=s({},e);d.paging={rowLength:a,currentPageIndex:1,pageLength:Math.ceil(g.length/a)},r(d)},updateKeyword:a=>{I.interval.clear("InputSearchTime"),I.interval.standBy("InputSearchTime",200,()=>{let d=s({},e);d.searchKeyword=a,d.paging.currentPageIndex=1,d.filter.current=d.filter.current.map(()=>[]),r(d)})},getRowData:()=>{let a=[...S];return o.enabled&&(a=a.order({direction:o.current[1],keys:[o.current[0],"orderIndex"]})),a.forEach(d=>{d.currentPage=!1,d.filtered=!1}),l.forEach(d=>{let{rowID:p}=d;a.find(_=>_.rowID==p).currentPage=!0}),g.forEach(d=>{let{rowID:p}=d;a.find(_=>_.rowID==p).filtered=!0}),a}}}),G(()=>{let a=f.Propagations[e.tableID]||[];Object.keys(a).forEach(d=>{let p=L.get(d);p!=null&&p.refresh&&p.refresh()})}),n(B,{className:m("TableBase"),children:x(P.Table,{className:m("Table"),children:[n(f.Header,{val_status:e,set_status:r,KeywordFilterRows:c}),n(f.Body,{val_status:e,set_status:r,PageRows:l})]})})},Propagations:{},DataLeveler:t=>{var e,r;return t=s({},t),t.filter=(e=t.filter)!=null?e:!1,t.filter=Array.from({length:t.colLength}).map((i,u)=>{var o;return I.is.boolean(t.filter)?t.filter:(o=t.filter[u])!=null?o:!1}),t.order=(r=t.order)!=null?r:!0,t.order=Array.from({length:t.colLength}).map((i,u)=>{var o;return I.is.boolean(t.order)?t.order:(o=t.order[u])!=null?o:!0}),t=s({checker:!1,searchKeyword:"",filter:!1,order:!0,defaultOrder:[0,"ASC"]},t),t.rows.forEach((i,u)=>{i.rowID=JSON.stringify(i.rowID||u);let o=[];i.forEach((w,S)=>{let{data:c,children:g,orderIndex:l}=w;w.orderIndex=I.is.exist(l)?String(l):String(c),w.children=g||String(c),o.push(String(w.data))}),i.__sys4SearchKey=o.join("/")}),n(f.StateManager,s({eventID:I.uuid.gen()},t))},StateManager:t=>{let{colLength:e,eventID:r,checker:i=!1,searchKeyword:u="",filter:o,order:w,defaultOrder:S=[0,"ASC"],pageRowLength:c=30}=t,[g]=F(I.uuid.gen()),l={tableID:t.tableID||g,componentID:g,colLength:e,checker:i,searchKeyword:u,filter:{enabled:o!==!1,column:o,current:Array.from({length:e},()=>[])},order:{enabled:w!==!1,column:w,current:S},paging:{rowLength:c,pageLength:Math.ceil(t.rows.length/c),currentPageIndex:1},head:t.head,rows:t.rows,noRecords:t.noRecords,cellStyles:t.cellStyles||{},cellClassName:t.cellClassName||"",cellStylesCallback:t.cellStylesCallback,onRowClick:t.onRowClick,onOrderChanged:t.onOrderChanged},[h,C]=F(l),[a,d]=F(t.eventID);return a!=t.eventID&&(d(t.eventID),C(l)),n(f.Core,{val_status:h,set_status:C})}},b={__memoryID:f.__memoryID,useStatus:t=>{var o;let[e]=F(I.uuid.gen()),[r,i]=F(I.uuid.gen()),u=f.__memoryID+"_"+t;return G(()=>(f.Propagations[t]=R(s({},f.Propagations[t]),{[e]:1}),L.set({key:e,value:{refresh:()=>{i(I.uuid.gen())}}}),()=>{delete f.Propagations[t][e]}),[]),((o=L.get(u))==null?void 0:o.status)||{tableComponentDidMount:!1}},getRowData:t=>{let e=L.get(f.__memoryID+"_"+t);if(e!=null&&e.getRowData)return e.getRowData()},setPageIndex:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updatePageIndex&&r.updatePageIndex(e)},setRowLength:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updateRowLength&&r.updateRowLength(e)},setSearchKeyword:(t,e)=>{let r=L.get(f.__memoryID+"_"+t);r!=null&&r.updateKeyword&&r.updateKeyword(e)}},z={SearchInput:t=>{let e=b.useStatus(t.tableID);return e.tableComponentDidMount?n(O.Text.Normal,{placeholder:"\u691C\u7D22...",clearButton:!0,padding:"2/3",paddingRight:3,rightIcon:n(O.Comps.RightIcon,{fontColor:"5.translucent",right:"2/3",children:n(K.Search,{})}),override:"force",value:e.searchKeyword,onUpdateValidValue:({value:r})=>{b.setSearchKeyword(t.tableID,r)}}):null},Info:t=>{let e=b.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=e.filteredRows.ratio(e.totalRows)||0;return x(M,{verticalAlign:"baseline",gap:"1/2",fontSize:"1.mini",fontColor:"3.blur",children:[n(Y,{fontSize:"4.thirdTitle",fontColor:"theme",children:e.filteredRows.toLocaleString()}),"/ ",e.totalRows.toLocaleString(),"\u4EF6 (",r,"%)"]})},Paging:t=>{let e=b.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=[];for(let i=0;i<e.paging.pageLength;i++)r.push({value:i+1,label:(i+1).toString()});return x(A.Center,{children:[x(A.Center,{gap:"1/2",children:["\u30DA\u30FC\u30B8 :",n(O.Select,{enableUnSelected:!1,padding:["1/3","2/3"],rightIcon:!1,placeholder:"",override:"force",value:e.paging.currentPageIndex,options:r,onUpdateValidValue:({value:i})=>{b.setPageIndex(t.tableID,i)}}),"/ ",e.paging.pageLength]}),x(A.Right,{gap:"1/2",children:[n(E.Button.Sub.R,{ssSphere:3,onClick:()=>{if(e.paging.currentPageIndex==1){b.setPageIndex(t.tableID,e.paging.pageLength);return}b.setPageIndex(t.tableID,e.paging.currentPageIndex-1)},children:n(K.ChevronLeft,{})}),n(E.Button.Sub.R,{ssSphere:3,onClick:()=>{if(e.paging.currentPageIndex==e.paging.pageLength){b.setPageIndex(t.tableID,1);return}b.setPageIndex(t.tableID,e.paging.currentPageIndex+1)},children:n(K.ChevronRight,{})})]})]})},RowLength:t=>{let e=b.useStatus(t.tableID);if(!e.tableComponentDidMount)return null;let r=e.paging.rowLength,i=0,u=t.lengthSelect.map(o=>(i|=+(o==r),{value:o,label:o.toString()}));return i||u.push({value:r,label:r.toString()}),u=u.order({direction:"ASC",keys:["value"]}),x(A.Center,{gap:"1/2",children:["\u4EF6\u6570 :",n(O.Select,{enableUnSelected:!1,rightIcon:!1,placeholder:"\u9078\u629E",override:"force",padding:["1/3","2/3"],value:e.paging.rowLength,options:u,onUpdateValidValue:({value:o})=>{b.setRowLength(t.tableID,o)}})]})}},le=t=>n(ne,R(s({},t),{type:"data",JSXChildren:f.DataLeveler})),D=le;D.__memoryID=f.__memoryID,D.useStatus=b.useStatus,D.getRowData=b.getRowData,D.setPageIndex=b.setPageIndex,D.setRowLength=b.setRowLength,D.setSearchKeyword=b.setSearchKeyword,D.Info=z.Info,D.Paging=z.Paging,D.RowLength=z.RowLength,D.SearchInput=z.SearchInput;export{D as Data,D as default};
|
package/dist/fn/Table/Drag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableTypes } from '
|
|
1
|
+
import { TableTypes } from '.';
|
|
2
2
|
import TableParts from './Parts';
|
|
3
3
|
declare namespace Drag {
|
|
4
4
|
type Cell = TableParts.Cell;
|
|
@@ -14,5 +14,5 @@ declare namespace Drag {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
declare const Drag: (
|
|
17
|
+
declare const Drag: (para: Drag.Input) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export { Drag, Drag as default };
|
package/dist/fn/Table/Drag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as w,e as I}from"../../chunk-VY3566IV.js";import{Fragment as J,jsx as
|
|
1
|
+
import{b as a,c as w,e as I}from"../../chunk-VY3566IV.js";import{Fragment as J,jsx as n,jsxs as j}from"react/jsx-runtime";import{useState as k,useEffect as x}from"react";import{$$ as T,$$fromRoot as N,useStore as R}from"../../@utils";import v from"../../atoms/FAI";import M from"../Button";import L from"../Tooltips";import b from"./Parts";import z from"./Wrapper";import{faGripVertical as O}from"@fortawesome/free-solid-svg-icons/faGripVertical";import{DefaultCellSystemStyles as S}from"./cellStyling";import{TableClasses as g}from"../../@styles/componentClasses";const E={HeadRow:e=>{let{cellStyles:t={},cellClassName:m="",cellStylesCallback:r,colLength:s,head:o,rows:i}=e;if(!o)return null;let c=[];for(let p=0;p<s;p++){let u=o[p],D=b[u.type=="th"?"TH":"TD"];c.push(n(D,a(w(a(a(a({},t),S({top:!0,bottom:!i.length,left:p==0,right:p==s-1})),r?r({top:!0,bottom:!i.length,left:p==0,right:p==s-1,rowIndex:0,colIndex:p,isBody:!1,isHeader:!0}):{}),{className:[g("Cell"),m,u.className].join(" ")}),u)))}return n(b.Row,{className:[g("Row"),g("HeadRow")].join(" "),children:c})},BodyRows:e=>{let{cellStyles:t={},cellClassName:m="",cellStylesCallback:r,head:s,rows:o,colLength:i,onOrderChanged:c}=e,[p]=k(T.uuid.gen()),[u,D]=k({rows:o,origin:0,to:NaN}),B=[];if(u.rows.forEach((y,l)=>{let h=[];h.push(n(b.TH,w(a(a(a({padding:0,borderRight:!0},t),S({top:l==0&&!s,bottom:l==o.length-1,left:!0,right:!1})),r?r({top:l==0&&!s,bottom:l==o.length-1,left:!0,right:!1,rowIndex:l,colIndex:0,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),g("Draggable"),m].join(" "),children:n(M.Button.Clear.R,{className:g("DragableButton"),fontColor:"4.thin",fontSize:"3.paragraph",margin:"auto",tabIndex:-1,ssSphere:3,onMouseDown:d=>{C.Start(d,{id:p,index:l,rows:u.rows,maxLength:o.length})},onTouchStart:d=>{C.Start(d,{id:p,index:l,rows:u.rows,maxLength:o.length})},children:n(v,{icon:O})})}),"DragOrigin")),y.forEach((d,f)=>{d=a({},d);let H=b[d.type=="th"?"TH":"TD"];h.push(n(H,a(w(a(a(a({},t),S({top:!!s&&!s.length,bottom:l==o.length-1,left:!1,right:f==i-2})),r?r({top:!!s&&!s.length,bottom:l==o.length-1,left:!1,right:f==i-2,rowIndex:l,colIndex:f,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),m,d.className].join(" ")}),d)))}),B.push(n(b.Row,{id:"TableRow-"+p+"-"+l,"data-rowId":l,className:[g("Row"),g("BodyRow")].join(" "),children:h},l))}),!isNaN(u.to)){let{origin:y,to:l}=u,h=[];h.push(n(b.TH,{backgroundColor:"theme.opa.low",padding:0,borderRight:"2.normal",className:[g("Cell"),g("Draggable"),m].join(" "),children:n(v.ArrowRight,{fontColor:"theme"})},"dragButton")),u.rows[y].forEach((f,H)=>{f=a({},f);let $=b[f.type=="th"?"TH":"TD"];h.push(n($,a(w(a(a(a({},t),S({top:!1,bottom:!1,left:!1,right:!1})),r?r({top:!1,bottom:!1,left:!1,right:!1,rowIndex:-1,colIndex:-1,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),m,f.className].join(" "),backgroundColor:"theme.opa.low"}),f)))}),B.splice(l,0,n(b.Row,{className:[g("Row"),g("Pre")].join(" "),children:h},"preSet"))}return x(()=>{R.set({key:p,value:{swap:(y,l)=>{if(l||l==0){let h=u.rows[y],d=[...u.rows];d.splice(y,1),d.splice(l-(y<l?1:0),0,h),D({rows:d,origin:0,to:NaN}),c(d.map(f=>JSON.parse(f.rowID)))}},preSet:y=>{let{origin:l,index:h}=y;D({rows:u.rows,origin:l,to:h})}}})}),x(()=>()=>{R.delete(p)},[]),n(J,{children:B})},Drag:e=>(e=a({},e),e.colLength=e.colLength+1,e.head&&(e.head=[{children:n(M.Button.Clear.R,{ssSphere:3,fontSize:"3.paragraph",fontColor:"theme",onMouseOver:t=>{L.open({parent:t.currentTarget,content:j(L.Comps.Body,{children:[n(v,{icon:O}),"\u30DC\u30BF\u30F3\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9806\u5E8F\u3092\u5909\u66F4"]})})},children:n(v.QuestionCircle,{})}),padding:[0,1],unitWidth:4},...e.head]),e.rows=e.rows.map((t,m)=>(t.rowID=JSON.stringify(t.rowID||m),t)),j(b.Table,{className:g("Table"),children:[n(E.HeadRow,a({},e)),n(E.BodyRows,a({},e))]}))},P=e=>n(z,w(a({type:"drag"},e),{JSXChildren:E.Drag})),C={Start:function(e,t){return I(this,null,function*(){e.stopPropagation(),e.preventDefault();let{id:m,index:r,rows:s,maxLength:o}=t;N("#TableRow-"+m+"-"+r).addClass(g("DraggerOrigin")),T(document).addEvent({eventID:"DragMouseMove",eventType:"mousemove",callback:i=>{C.Move(i,t)},options:{passive:!1}}).addEvent({eventID:"DragTouchMove",eventType:"touchmove",callback:i=>{C.Move(i,t)},options:{passive:!1}}).addEvent({eventID:"DragMouseUp",eventType:"mouseup",callback:i=>{C.End(i,t)}}).addEvent({eventID:"DragTouchEnd",eventType:"touchend",callback:i=>{C.End(i,t)}})})},Move:function(e,t){let{id:m,maxLength:r}=t,s=T.getCursor(e).y-T.getScreenSize().scrollY;for(let o=0;o<r;o++){let i=N("#TableRow-"+m+"-"+o),{top:c,bottom:p,height:u}=i.position();o==0&&s<c?t.insertIndex=0:o===r-1&&p<=s?t.insertIndex=r:s>=c&&s<p&&(t.insertIndex=o+1)}{let{index:o,insertIndex:i}=t,c=R.get(m);c&&c.preSet&&c.preSet({origin:o,index:i})}return e.stopPropagation(),e.preventDefault(),!1},End:function(e,t){let{id:m,index:r,insertIndex:s}=t,o=R.get(m);o&&o.swap&&o.swap(r,s),N("#TableRow-"+m+"-"+r).removeClass(g("DraggerOrigin")),T(document).removeEvent(["DragMouseMove","DragTouchMove","DragMouseUp","DragTouchEnd"])}};export{P as Drag,P as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableTypes } from '
|
|
1
|
+
import { TableTypes } from '.';
|
|
2
2
|
import TableParts from './Parts';
|
|
3
3
|
declare namespace Normal {
|
|
4
4
|
type Cell = TableParts.Cell;
|
|
@@ -12,5 +12,5 @@ declare namespace Normal {
|
|
|
12
12
|
onRowClick?: TableTypes.OnRowClick;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
declare const Normal: (
|
|
15
|
+
declare const Normal: (para: Normal.Input) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export { Normal, Normal as default };
|
package/dist/fn/Table/Normal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,c as f}from"../../chunk-VY3566IV.js";import{Fragment as H,jsx as a,jsxs as B}from"react/jsx-runtime";import w from"./Parts";import d from"./Wrapper";import{DefaultCellSystemStyles as N}from"./cellStyling";import{TableClasses as
|
|
1
|
+
import{b as e,c as f}from"../../chunk-VY3566IV.js";import{Fragment as H,jsx as a,jsxs as B}from"react/jsx-runtime";import w from"./Parts";import d from"./Wrapper";import{DefaultCellSystemStyles as N}from"./cellStyling";import{TableClasses as r}from"../../@styles/componentClasses";const c={HeadRow:l=>{let{cellStyles:s={},cellClassName:i="",cellStylesCallback:n,colLength:y,head:m,rows:h}=l;if(!m)return null;let C=[];return m.forEach((p,t)=>{let o=w[p.type=="th"?"TH":"TD"];C.push(a(o,e(f(e(e(e({},s),N({top:!0,bottom:!h.length,left:t==0,right:t==y-1})),n?n({top:!0,bottom:!h.length,left:t==0,right:t==y-1,rowIndex:0,colIndex:t,isBody:!1,isHeader:!0}):{}),{className:[r("Cell"),i,p.className].join(" ")}),p)))}),a(w.Row,{className:[r("Row"),r("HeadRow")].join(" "),children:C})},BodyRows:l=>{let{cellStyles:s={},cellClassName:i="",cellStylesCallback:n,head:y,rows:m,colLength:h,onRowClick:C}=l,p=[];return m.forEach((t,o)=>{let b=[];t.forEach((R,u)=>{let g=w[R.type=="th"?"TH":"TD"];b.push(a(g,e(f(e(e(e({},s),N({top:o==0&&!y,bottom:o==m.length-1,left:u==0,right:u==h-1})),n?n({top:o==0&&!y,bottom:o==m.length-1,left:u==0,right:u==h-1,rowIndex:o,colIndex:u,isBody:!0,isHeader:!1}):{}),{className:[r("Cell"),i,R.className].join(" ")}),R)))}),p.push(a(w.Row,{className:[r("Row"),r("BodyRow")].join(" "),children:b,onClick:R=>{C&&C(t.rowID,R)}},o))}),a(H,{children:p})},Normal:l=>(l=e({},l),l.rows=l.rows.map((s,i)=>(s.rowID=s.rowID||i,s)),B(w.Table,{className:r("Table"),children:[a(c.HeadRow,e({},l)),a(c.BodyRows,e({},l))]}))},T=l=>a(d,f(e({type:"normal"},l),{JSXChildren:c.Normal}));export{T as Normal,T as default};
|
package/dist/fn/Table/Parts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TagProperty } from '../../@declaration
|
|
1
|
+
import { TagProperty } from '../../@declaration';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TableTypes } from '
|
|
3
|
+
import { TableTypes } from '.';
|
|
4
4
|
declare namespace TableParts {
|
|
5
5
|
type Table = TagProperty.BasicElement & TableTypes.customTableHTMLAttributes<HTMLTableElement>;
|
|
6
6
|
type TableHead = TagProperty.BasicElement & TableTypes.customTableHTMLAttributes<HTMLTableSectionElement>;
|
package/dist/fn/Table/Parts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,c as r}from"../../chunk-VY3566IV.js";import{jsx as a}from"react/jsx-runtime";import{GenerateClassName as l}from"../../@utils
|
|
1
|
+
import{b as t,c as r}from"../../chunk-VY3566IV.js";import{jsx as a}from"react/jsx-runtime";import{GenerateClassName as l}from"../../@utils";import b from"../../atoms/FAI";const o={Table:e=>{let T=l(e);return a("table",r(t({},T),{border:T.border}))},Head:e=>a("thead",t({},l(e))),Body:e=>a("tbody",t({},l(e))),Row:e=>a("tr",t({},l(e))),TH:e=>a("th",t({},l(e))),TD:e=>a("td",t({},l(e))),RightIndicator:{type:"td",unitWidth:4,children:a(b.AngleRight,{fontColor:"theme",fontSize:"4.thirdTitle"})}};export{o as TableParts,o as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableTypes } from '
|
|
2
|
+
import { TableTypes } from '.';
|
|
3
3
|
declare namespace Wrapper {
|
|
4
4
|
type Input = TableTypes.UniInput & {
|
|
5
5
|
type: TableTypes.Types;
|
|
6
|
-
JSXChildren: (
|
|
6
|
+
JSXChildren: (para: any) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
declare const Wrapper: React.FC<Wrapper.Input>;
|
package/dist/fn/Table/Wrapper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,c as n,d as
|
|
1
|
+
import{b as o,c as n,d as s}from"../../chunk-VY3566IV.js";import{jsx as a}from"react/jsx-runtime";import{$$ as u,GenerateClassName as C}from"../../@utils";import f from"../../atoms/Box";import{DefaultCellStyles as c}from"./cellStyling";import{TableClasses as l}from"../../@styles/componentClasses";const y=e=>{let{JSXChildren:i}=e;(!e.tone||e.tone=="auto")&&(e.tone="border",e.type=="drag"&&(e.tone="rowBorder"));let t=n(o({tableID:e.tableID||u.uuid.gen(),tone:e.tone},e),{cellStyles:o(o({},c(e.type,e.tone)),e.cellStyles)});e.tone!="plain"&&(t.backgroundColor=t.backgroundColor||"layer.1",t.borderRadius=t.borderRadius||"1.tone.primary");let r=C(t),{className:p,style:m}=r,b=s(r,["className","style"]),d=[p,l("Wrap"),l("TableType_"+e.type),l("RowClickable_"+!!t.onRowClick)].join(" ");return a(f,{className:d,style:m,children:a(i,o({},b))})};export{y as Wrapper,y as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TagProperty } from '../../@declaration
|
|
2
|
-
import { TableTypes } from '
|
|
3
|
-
export declare const DefaultCellStyles: (type: TableTypes.Types, tone: TableTypes.Tones) => TagProperty.
|
|
1
|
+
import { TagProperty } from '../../@declaration';
|
|
2
|
+
import { TableTypes } from '.';
|
|
3
|
+
export declare const DefaultCellStyles: (type: TableTypes.Types, tone: TableTypes.Tones) => TagProperty.Para;
|
|
4
4
|
export declare const DefaultCellSystemStyles: (args: {
|
|
5
5
|
top: boolean;
|
|
6
6
|
bottom: boolean;
|
|
7
7
|
left: boolean;
|
|
8
8
|
right: boolean;
|
|
9
|
-
}) => TagProperty.
|
|
9
|
+
}) => TagProperty.Para;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TagProperty } from '../../@declaration
|
|
1
|
+
import { TagProperty } from '../../@declaration';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare namespace TableTypes {
|
|
4
4
|
type customTableHTMLAttributes<T> = Omit<React.TableHTMLAttributes<T>, 'border'>;
|
|
@@ -18,13 +18,13 @@ export declare namespace TableTypes {
|
|
|
18
18
|
tableID?: string;
|
|
19
19
|
tone?: Tones;
|
|
20
20
|
colLength: number;
|
|
21
|
-
cellStyles?: TagProperty.
|
|
21
|
+
cellStyles?: TagProperty.Para;
|
|
22
22
|
cellClassName?: string;
|
|
23
23
|
cellStylesCallback?: {
|
|
24
|
-
(
|
|
24
|
+
(para: StylesCallbackInput): TagProperty.Para;
|
|
25
25
|
};
|
|
26
26
|
className?: string;
|
|
27
|
-
} & TagProperty.
|
|
27
|
+
} & TagProperty.Para;
|
|
28
28
|
type OnRowClick = {
|
|
29
29
|
(rowIDOrIndex: any, event: React.MouseEvent<HTMLTableRowElement, MouseEvent>): void;
|
|
30
30
|
};
|
package/dist/fn/Tooltips.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TagProperty, ReactElement } from '../@declaration
|
|
3
|
-
import { $$ } from '../@utils
|
|
2
|
+
import { TagProperty, ReactElement } from '../@declaration';
|
|
3
|
+
import { $$ } from '../@utils';
|
|
4
4
|
import Box from '../atoms/Box';
|
|
5
5
|
import Sheet from './Sheet';
|
|
6
6
|
declare namespace Tooltips {
|
|
7
7
|
type Methods = {
|
|
8
8
|
__memoryID: string;
|
|
9
|
-
open(
|
|
9
|
+
open(para: Input): void;
|
|
10
10
|
close(tipsID: string): void;
|
|
11
11
|
closeALL(): void;
|
|
12
12
|
Comps: {
|
|
13
13
|
Body: React.FC<Box.Input>;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
type
|
|
16
|
+
type Input = {
|
|
17
17
|
tipsID?: string;
|
|
18
18
|
tipsGroups?: string | string[];
|
|
19
19
|
parent: $$.Args;
|
package/dist/fn/Tooltips.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,d as s}from"../chunk-VY3566IV.js";import{jsx as
|
|
1
|
+
import{b as e,d as s}from"../chunk-VY3566IV.js";import{jsx as u}from"react/jsx-runtime";import{$$ as p}from"../@utils";import d from"../atoms/Box";import t from"./Sheet";const n={__memoryID:p.uuid.gen(),open:o=>{let r=o,{tipsID:i=p.uuid.gen(),tipsGroups:l=[]}=r,a=s(r,["tipsID","tipsGroups"]);t.open(e({sheetID:i,sheetGroups:["tooltips",...l],close_option:e({aroundClick:!0,parentBlur:!0,escapeKeyDown:!0,pageTransit:!0},o.close_option),type:"custom"},a))},close:o=>{o&&t.close(o)},closeALL:()=>{t.closeGroup("tooltips")},Comps:{Body:o=>u(d,e({padding:"1/2",backgroundColor:"dark",borderRadius:"2.tone.secondary",fontColor:"white",boxShadow:"0.normal"},o))}};export{n as Tooltips,n as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Effect';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export * from './Input';
|
|
4
|
+
export * from './Layout';
|
|
5
|
+
export * from './Table';
|
|
6
|
+
export * from './Sheet';
|
|
7
|
+
export * from './Snackbar';
|
|
8
|
+
export * from './Loader';
|
|
9
|
+
export * from './Tooltips';
|
|
10
|
+
export * from './Cropper';
|
package/dist/fn/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Effect";export*from"./Button";export*from"./Input";export*from"./Layout";export*from"./Table";export*from"./Sheet";export*from"./Snackbar";export*from"./Loader";export*from"./Tooltips";export*from"./Cropper";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as utils from './@utils
|
|
3
|
-
export * from './@utils
|
|
4
|
-
import * as atoms from './atoms
|
|
5
|
-
export * from './atoms
|
|
6
|
-
import * as mols from './mols
|
|
7
|
-
export * from './mols
|
|
8
|
-
export * from './orgs
|
|
9
|
-
export * from './temps
|
|
10
|
-
import * as fn from './fn
|
|
11
|
-
export * from './fn
|
|
2
|
+
import * as utils from './@utils';
|
|
3
|
+
export * from './@utils';
|
|
4
|
+
import * as atoms from './atoms';
|
|
5
|
+
export * from './atoms';
|
|
6
|
+
import * as mols from './mols';
|
|
7
|
+
export * from './mols';
|
|
8
|
+
export * from './orgs';
|
|
9
|
+
export * from './temps';
|
|
10
|
+
import * as fn from './fn';
|
|
11
|
+
export * from './fn';
|
|
12
12
|
declare const amotify: {
|
|
13
13
|
Effect: {
|
|
14
14
|
Ripple: import("./fn/Effect/Ripple").Ripple.Methods;
|
|
@@ -392,10 +392,10 @@ declare const amotify: {
|
|
|
392
392
|
isAvocado: boolean;
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
ReadStyleSet: <T>(
|
|
396
|
-
GenerateClassName: <T_1>(
|
|
395
|
+
ReadStyleSet: <T>(para: T) => T;
|
|
396
|
+
GenerateClassName: <T_1>(para: T_1) => T_1;
|
|
397
397
|
React: typeof utils.React;
|
|
398
|
-
LaunchReactApp: (
|
|
398
|
+
LaunchReactApp: (para: utils.LaunchReactApp.Input) => void;
|
|
399
399
|
$$fromRoot: (args: any) => utils.$$.Chains;
|
|
400
400
|
};
|
|
401
401
|
export { amotify, amotify as default, };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./chunk-VY3566IV.js";import*as m from"./@utils
|
|
1
|
+
import{b as o}from"./chunk-VY3566IV.js";import*as m from"./@utils";export*from"./@utils";import*as t from"./atoms";export*from"./atoms";import*as f from"./mols";export*from"./mols";import*as p from"./orgs";export*from"./orgs";import*as s from"./temps";export*from"./temps";import*as a from"./fn";export*from"./fn";const r=o(o(o(o(o(o({},m),t),f),p),s),a);export{r as amotify,r as default};
|
package/dist/mols/Accordion.d.ts
CHANGED
package/dist/mols/Accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as g,d as H}from"../chunk-VY3566IV.js";import{jsx as y}from"react/jsx-runtime";import{useState as m,useEffect as w,useRef as R}from"react";import{$$ as a,$$fromRoot as l,useStore as r}from"../@utils
|
|
1
|
+
import{b as g,d as H}from"../chunk-VY3566IV.js";import{jsx as y}from"react/jsx-runtime";import{useState as m,useEffect as w,useRef as R}from"react";import{$$ as a,$$fromRoot as l,useStore as r}from"../@utils";import{Box as A}from"../atoms/Box";import{AccordionClasses as I}from"../@styles/componentClasses";const _=o=>{o=g({},o);let v=o,{accordionID:t="",slideAnimation:x="fast",defaultOpen:f=!1,override:D=!1}=v,C=H(v,["accordionID","slideAnimation","defaultOpen","override"]),[d]=m(a.uuid.gen()),[p]=m(a.uuid.gen()),[s,c]=m(f);s!=f&&D&&c(f);const h=R(!1);return w(()=>{let n=l('[data-accordion-content-id="'+p+'"]')[0];if(n){let i=n.offsetHeight,e=0;x=="fast"?(e=i/1e3,e=Math.max(e,.2)):x=="slow"&&(e=i/300),l("#"+d).css({transition:e+"s"})}},[]),w(()=>{let n=l("#"+d),i=l('[data-accordion-content-id="'+p+'"]')[0];if(h.current){if(i){let e=i.offsetHeight;a.is.exist(e)&&(s?n.css({maxHeight:e+1+"px"}).await(200).css({maxHeight:"unset",overflow:o.overflow||"unset"}):n.css({maxHeight:e+1+"px"}).await(100).css({maxHeight:"0px",overflow:"hidden"}))}}else if(h.current=!0,i){let e=i.offsetHeight;a.is.exist(e)&&(s?n.css({maxHeight:e+1+"px"}).await(200).css({maxHeight:"unset",overflow:o.overflow||"unset"}):n.css({maxHeight:"0px",overflow:"hidden"}))}},[s]),t&&r.set({key:"Accordion-"+t,value:{open:()=>{c(!0)},close:()=>{c(!1)},toggle:()=>{c(!s)}}}),y(A,{className:[I("Wrap"),I("Open_"+s)].join(" "),id:d,children:y(A,g({"data-accordion-content-id":p},C))})},u=_;u.fn={open:o=>{let t=r.get("Accordion-"+o);!t||t.open()},close:o=>{let t=r.get("Accordion-"+o);!t||t.close()},toggle:o=>{let t=r.get("Accordion-"+o);!t||t.toggle()}};export{u as Accordion,u as default};
|
package/dist/mols/List.d.ts
CHANGED
package/dist/mols/Row.d.ts
CHANGED
package/dist/mols/Text.d.ts
CHANGED
package/dist/temps/designBook.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as I}from"../chunk-VY3566IV.js";import{Fragment as d,jsx as e,jsxs as t}from"react/jsx-runtime";import S from"react";import{$$ as w,Config as G}from"../@utils
|
|
1
|
+
import{e as I}from"../chunk-VY3566IV.js";import{Fragment as d,jsx as e,jsxs as t}from"react/jsx-runtime";import S from"react";import{$$ as w,Config as G}from"../@utils";import{Box as o,Span as V,Grid as p,Flex as c,FAI as g,Img as T,Logo as l,Placeholder as U}from"../atoms";import{List as v,LinkifyText as Y,Accordion as H,Row as B,Column as h,Text as n}from"../mols";import{Layout as k,Table as m,Input as i,Button as r,Sheet as O,Snackbar as z,Tooltips as F,Loader as C,Effect as q,Cropper as J}from"../fn";const W={_:()=>t(d,{children:[e(W.DarkMode,{}),e(W.ThemeColor,{})]}),DarkMode:()=>t(B.Separate,{children:[e(o,{isSemiBoldFont:!0,fontSize:"4.thirdTitle",children:"Dark Mode"}),e(c,{gap:2,children:e(i.Segmented.Border,{value:G.get().darkMode,textAlign:"left",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"dim",label:"Dim"},{value:"auto",label:"Auto"}],flexCenter:!0,onUpdateValidValue:({value:a})=>{let u=a[0];G.update.darkMode(u)}})})]}),ThemeColor:()=>{const a=x=>{G.update.themeColor(x)};let u=[];const s=["comun","leaf","heart","droplet","brick","flower","lip","wine","theater","bat","poizon","eggplant","ufo","alien","tombstone","ninja","moon","rain","unicorn","axe","gem","soap","drizzle","building","fish","icicles","water","tree1","tree2","tree3","battery","seedle","greenTea","oak","salad","cloudy","lemon","angel","parasol","pizza","thunder","latte","island","shovel","coffee","carrot","cactus","volcano","choco","industry","gun","galaxy","line","twitter","amazon","facebook","android","slackBlue","slackGreen","slackRed","slackYellow","slackBase","googleBlue","googleGreen","googleYellow","googleRed"];for(let x of s)u.push(e(r.Button.Prime.R,{padding:[1,1.5],fontColor:"white",borderRadius:"1.tone.primary",textAlign:"left",backgroundColor:x,onClick:()=>{a(x)},children:e(n.Supplement,{children:x.toCapital()})}));return t(B.Separate,{children:[e(n.SubTitle,{children:"ThemeColor"}),e(p,{gridCols:5,gap:"1/3",children:u})]})}},R={_:()=>t(d,{children:[t(c,{gap:1,flexChilds:"even",flexNewLine:!0,children:[e(o,{padding:2,ssCardBox:!0,flexCenter:!0,children:"Hello"}),e(o,{padding:2,ssCardBox:"border",flexCenter:!0,children:"Hello"}),e(o,{padding:2,ssCardBox:"cloud",flexCenter:!0,children:"Hello"})]}),t(c,{gap:1,children:[e(o,{flexCenter:!0,children:e(U,{unitWidth:6,unitHeight:6,children:"Placeholder",isRounded:!0})}),t(p,{gridCols:3,gap:1,flexSizing:"auto",children:[e(o,{backgroundColor:"layer.1",padding:2}),e(o,{backgroundColor:"layer.2",padding:2}),e(o,{backgroundColor:"layer.3",padding:2}),e(o,{backgroundColor:"layer.4",padding:2}),e(o,{backgroundColor:"layer.5",padding:2}),e(o,{backgroundColor:"layer.6",padding:2})]}),t(p,{gridCols:3,gap:"1/2",flexSizing:"auto",ssCardBox:!0,children:[e(o,{flexCenter:!0,fontColor:"1.clear",children:"FontColor1"}),e(o,{flexCenter:!0,fontColor:"2.normal",children:"FontColor2"}),e(o,{flexCenter:!0,fontColor:"3.blur",children:"FontColor3"}),e(o,{flexCenter:!0,fontColor:"4.thin",children:"FontColor4"}),e(o,{flexCenter:!0,fontColor:"5.translucent",children:"FontColor5"})]})]}),e(R.Fonts,{}),e(R.Box,{}),e(R.Flex,{}),e(R.Grid,{}),e(R.Others,{})]}),Fonts:()=>t(o,{ssCardBox:!0,children:[e(n.SubTitle,{padding:1,borderBottom:!0,children:"Font"}),t(o,{overflow:"auto",padding:1,children:[e(n.Description,{padding:1,children:`<Box
|
|
2
2
|
fontSize={ 0 ~ 8 }
|
|
3
3
|
>
|
|
4
4
|
some text
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amotify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"description": "UI FW for React",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"./@styles/index": "./dist/@styles/index.css",
|
|
65
65
|
"./@styles/var": "./dist/@styles/var.css",
|
|
66
66
|
"./@styles/init": "./dist/@styles/init.css",
|
|
67
|
-
"./@declaration": "./dist/@declaration/
|
|
68
|
-
"./@utils": "./dist/@utils/
|
|
69
|
-
"./@atoms": "./dist/atoms/
|
|
70
|
-
"./@mols": "./dist/mols/
|
|
71
|
-
"./@orgs": "./dist/orgs/
|
|
72
|
-
"./@temps": "./dist/temps/
|
|
73
|
-
"./@fn": "./dist/fn/
|
|
67
|
+
"./@declaration": "./dist/@declaration/index.js",
|
|
68
|
+
"./@utils": "./dist/@utils/index.js",
|
|
69
|
+
"./@atoms": "./dist/atoms/index.js",
|
|
70
|
+
"./@mols": "./dist/mols/index.js",
|
|
71
|
+
"./@orgs": "./dist/orgs/index.js",
|
|
72
|
+
"./@temps": "./dist/temps/index.js",
|
|
73
|
+
"./@fn": "./dist/fn/index.js"
|
|
74
74
|
},
|
|
75
75
|
"typesVersions": {
|
|
76
76
|
"*": {
|
|
@@ -90,25 +90,25 @@
|
|
|
90
90
|
"dist/@styles/init"
|
|
91
91
|
],
|
|
92
92
|
"@declaration": [
|
|
93
|
-
"dist/@declaration/
|
|
93
|
+
"dist/@declaration/index"
|
|
94
94
|
],
|
|
95
95
|
"@utils": [
|
|
96
|
-
"dist/@utils/
|
|
96
|
+
"dist/@utils/index"
|
|
97
97
|
],
|
|
98
98
|
"@atoms": [
|
|
99
|
-
"dist/atoms/
|
|
99
|
+
"dist/atoms/index"
|
|
100
100
|
],
|
|
101
101
|
"@mols": [
|
|
102
|
-
"dist/mols/
|
|
102
|
+
"dist/mols/index"
|
|
103
103
|
],
|
|
104
104
|
"@orgs": [
|
|
105
|
-
"dist/orgs/
|
|
105
|
+
"dist/orgs/index"
|
|
106
106
|
],
|
|
107
107
|
"@temps": [
|
|
108
|
-
"dist/temps/
|
|
108
|
+
"dist/temps/index"
|
|
109
109
|
],
|
|
110
110
|
"@fn": [
|
|
111
|
-
"dist/fn/
|
|
111
|
+
"dist/fn/index"
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
114
|
}
|
package/dist/@utils/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"../@declaration/_";export*from"./jsminEx";export*from"./config";export*from"./useStore";export*from"./useRecycle";export*from"./collectForm";export*from"./pageTransit";export*from"./color";export*from"./GenerateClassName";export*from"./LaunchReactApp";export*from"./getElement";export*from"./fin";
|
package/dist/fn/Input/Chips/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as u,c as h,d as N}from"../../../chunk-VY3566IV.js";import{jsx as a,jsxs as b}from"react/jsx-runtime";import{useState as v,useEffect as L,useRef as H}from"react";import{$$ as B,$$fromRoot as T}from"../../../@utils/_";import Q from"../../../atoms/Box";import P from"../../../atoms/FAI";import X from"../../../mols/Row";import U from"../../Button";import Y from"../../Sheet";import{Wrapper as Z,BoxWrapper as j,CommonEffects as ee,DefaultStyles as te}from"../core";import ne from"../Hidden";import W from"./Selector";function oe(e){let{value:r,params:c}=e,{required:o}=c,s=[];return o&&!r.length&&s.push({type:"invalid",label:"\u4E00\u3064\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044"}),{ok:!s.filter(({type:f})=>f=="invalid").length,notice:s}}const le=e=>{let $=e,{required:r,form:c,name:o,checkValidationAtFirst:s,onValidate:f,onUpdateValue:O,onUpdateValidValue:M,value:F=[],limit:A,leftIndicator:ie,rightIndicator:pe,leftIcon:ue,rightIcon:re,SelectedCellComponent:g,AddButtonComponent:x,componentID:ce,defaultOptions:se,enableFormSubmit:de,onDynamicSearch:me}=$,q=N($,["required","form","name","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","limit","leftIndicator","rightIndicator","leftIcon","rightIcon","SelectedCellComponent","AddButtonComponent","componentID","defaultOptions","enableFormSubmit","onDynamicSearch"]);x=x;let[p]=v(B.uuid.gen()),[d,R]=v({componentID:e.componentID||"",dataValue:F.map(t=>t),eventID:B.uuid.gen(),eventType:"init"}),[D,z]=v({ok:!1,notice:[]}),[n,G]=v([...F]);ee({params:e,val_status:d,set_status:R,val_validate:D,set_validate:z,DefaultValidation:oe,onUpdateValue:O,onUpdateValidValue:M,ExtraOverrideParams:{formatValue:n,dataValue:n.map(t=>t)},ExtraStoreParams:{searchTimer:null}});const C=t=>{G(t),R(h(u({},d),{dataValue:t.map(i=>i),eventID:B.uuid.gen(),eventType:"update"}))};let E=`[data-chips-input-wrapper="${p}"]`;const y=()=>{W.openSelector({parent:E,gravityPoint:e.selectorGravityPoint,SelectorCellComponent:e.SelectorCellComponent,selectorID:p,options:e.defaultOptions||[],selected:n,limit:e.limit,onDynamicSearch:e.onDynamicSearch,onUpdated:t=>{C(t.values)},onClosed:()=>{T(E).focus()}})};let S=A&&A<=n.length;const _=H(!1);L(()=>{_.current?S&&(Y.close(p),T(`[data-chips-input-wrapper="${p}"]`).focus()):_.current=!0},[n]);let J=n.map(t=>{let{value:i,label:k}=t;g=g;const I=()=>{let l=n.findIndex(w=>w.value==i);if(l==-1)return;let m=[...n];m.splice(l,1),C(m),m.length||setTimeout(()=>{T(`[data-chips-input-wrapper="${p}"]`).focus()},200)};return a(g,{value:i,label:k,removeCallback:I,defaultRemoveButton:a(U.Button.Sub.S,{flexSizing:"none",color:"cloud",backgroundColor:"cloud",flexCenter:!0,isRounded:!0,freeCSS:{aspectRatio:"1/1"},onClick:()=>{I()},children:a(P.Times,{})}),openCallback:()=>{y()}},JSON.stringify(i))});return b(j,{val_status:d,set_status:R,val_validate:D,params:e,children:[a(ne,{"data-value":JSON.stringify(d.dataValue.map(t=>t.value)),name:o,form:c,"data-input-type":"chips-"+["single","multi"][+(e.limit!=1)],"data-validation":D.ok,componentID:d.componentID,"data-focusor":p}),b("button",h(u({"data-chips-input-wrapper":p,onKeyDown:t=>{let{key:i,ctrlKey:k,metaKey:I,keyCode:l}=t,m=k||I;if(l>=48&&l<=57||l>=65&&l<=90||l>=96&&l<=105){if(S)return;y()}else if(i!="Tab"){if(i=="Backspace"){if(!n.length)return;if(m)C([]);else{let K=[...n];K.pop(),C(K)}}}},onClick:()=>{S||y()}},q),{children:[!S&&a(x,{selected:n,openCallback:y}),J]}))]})},ae=e=>{let c=[...e.value||[]].splice(0,e.limit||65535);return a(le,h(u({SelectedCellComponent:o=>{let{value:s,label:f,removeCallback:O}=o;return b(X.Left,{ssCardBox:!0,padding:"1/3",gap:0,isRounded:!0,textAlign:"left",children:[a(Q,{padding:[0,"1/2"],children:f}),o.defaultRemoveButton]})},AddButtonComponent:o=>e.limit&&e.limit<=o.selected.length?null:b(U.Button.Sub.R,{color:"cloud",padding:"1/2",onClick:()=>{o.openCallback()},children:[a(P.Plus,{}),"\u8FFD\u52A0\u3059\u308B"]})},e),{value:c}))},V=e=>{e=u({},e),e=u({gap:1,display:"flex",horizontalAlign:"left",verticalAlign:"center",flexWrap:!0},e);let r=te.Boxish(e);return a(Z,{componentID:e.componentID,children:ae,params:r})};V.fn=W;export{V as Chips,V as default};
|
package/dist/fn/Input/Time/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Y,b as o,c as _,d as H}from"../../../chunk-VY3566IV.js";import{Fragment as ke,jsx as T,jsxs as Z}from"react/jsx-runtime";import{useState as W,useEffect as X,useRef as re}from"react";import{$$ as b,$$fromRoot as ie,Config as z,useStore as O}from"../../../@utils/_";import ae from"../../../atoms/Box";import ne from"../../../atoms/FAI";import q from"../../Button";import G from"../../Tooltips";import{faClock as le}from"@fortawesome/free-solid-svg-icons/faClock";import{faCalendarAlt as oe}from"@fortawesome/free-solid-svg-icons/faCalendarAlt";import{Wrapper as se,BoxWrapper as ue,SubmitForm as pe,CommonEffects as me,DefaultStyles as ce}from"../core";import de from"../Hidden";import fe from"../Select";import he from"../Parts";import ge from"./Picker";const A=" ~ ",ye={clock:{defaultValue:"--:--",format:/^\d{2}\D\d{2}$/,ranges:[{type:"hour",from:0,length:2},{type:"minute",from:3,length:2}],sets:1},date:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2}],sets:1},week:{defaultValue:"----\u5E74\u7B2C--\u9031",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4,region:6},{type:"week",from:6,length:2,region:3}],sets:1},month:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:3}],sets:1},year:{defaultValue:"----\u5E74",format:/^\d{4}$/,ranges:[{type:"year",from:0,length:4,region:5}],sets:1},dates:{defaultValue:"----/--/--",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2},{type:"date",from:8,length:2,region:5},{type:"year",from:10+A.length,length:4},{type:"month",from:15+A.length,length:2},{type:"date",from:18+A.length,length:2}],sets:2},months:{defaultValue:"----\u5E74--\u6708",format:/^\d{4}\D\d{2}$/,ranges:[{type:"year",from:0,length:4},{type:"month",from:5,length:2,region:6},{type:"year",from:8+A.length,length:4},{type:"month",from:13+A.length,length:2,region:3}],sets:2},dateWareki:{defaultValue:"----\u5E74--\u6708--\u65E5",format:/^\d{4}\D\d{2}\D\d{2}$/,ranges:[{type:"dateWareki",from:0,length:4,region:5},{type:"month",from:5,length:2,region:3},{type:"date",from:8,length:2,region:3}],sets:1}},P=e=>{let{restrict:l,value:v,era:t}=e,D=b.flatArray(v||""),{defaultValue:h,format:d,ranges:m,sets:i}=ye[l],u=[],n=l=="clock"?":":"/";for(let a=0;a<D.length;a++)D[a]=String(D[a]).replace(/\D/ig,n);for(let a=0;a<i;a++){let c=D[a]||"";if(!c.match(d))D[a]="",u.push(h);else{let x=h;c.split(/\D/).forEach((S,R)=>{if(R==0&&l=="dateWareki"){let g=Number(S);t!="year"&&(g>=2019?t=="reiwa"?g-=2018:t=="heisei"&&(g=31):g>=1989?t=="heisei"?g-=1988:t=="shouwa"&&(g=64):g>=1926?t=="shouwa"?g-=1925:t=="taisho"&&(g=15):g>=1912?t=="taisho"?g-=1911:t=="meiji"&&(g=45):g>=1868&&(g-=1867)),S=g.zeroEmbed(4)}x=x.replace(new RegExp("------------------".slice(0,S.length)),S)}),u.push(x)}}return{formatValue:u.join(A),dataValue:["dates","months"].includes(l)?D:D[0],ranges:m}};function ve(e){let{params:l}=e,{restrict:v,min:t,max:D,required:h}=l,d=[],m=b.flatArray(e.value),i={empty:!1,escalated:1,filled:!0,correct:!0,prohibited:!1};(()=>{let u=v=="clock"?":":"/";for(let n=0;n<m.length;n++)m[n]=String(m[n]).replace(/\D/ig,u);for(let n=0;n<m.length;n++){let a=m[n],c=m[n-1];a.removeLetters()||(i.empty=!0),n>0&&(i.escalated&=+(a>=c))}i.escalated&&(i.empty||(v.match(/clock/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:(Number(a)>23||Number(c)>59)&&(i.correct=!1)}):v.match(/date/)?m.forEach(n=>{let[a,c,x]=n.split(/\D+/);if(!a||!c||!x)i.filled=!1;else{let S=b.Time(n);(!S.validate||n!=S.toFormatYMD())&&(i.correct=!1)}}):v.match(/week/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);if(!a||!c)i.filled=!1;else{let x=b.Time(a+"/01/01").weekday,R=b.Time(a+"/01/0"+(7-x+1)).addWeek(Number(c)-1);a!=String(R.year)&&(i.correct=!1)}}):v.match(/month/)?m.forEach(n=>{let[a,c]=n.split(/\D+/);!a||!c?i.filled=!1:b.Time([a,c,"01"].join("/")).validate||(i.correct=!1)}):v.match(/year/),i.filled&&i.correct&&m.forEach(n=>{{let a=Number(String(n).replace(/\D/ig,""));if(t&&Number(String(t).replace(/\D/ig,""))>a&&(i.prohibited=!0),D){let c=Number(String(D).replace(/\D/ig,""));a>c&&(i.prohibited=!0)}}})))})();{let{empty:u,escalated:n,filled:a,correct:c,prohibited:x}=i;u&&h&&(d=[{type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}]),n||d.push({type:"invalid",label:"\u6642\u7CFB\u5217\u3092\u6B63\u3057\u304F\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}),c||d.push({type:"invalid",label:"\u7121\u52B9\u306A\u5024\u304C\u5165\u529B\u3055\u308C\u3066\u3044\u307E\u3059"}),a||d.push({type:"invalid",label:"\u6700\u5F8C\u307E\u3067\u5024\u3092\u57CB\u3081\u3066\u304F\u3060\u3055\u3044"}),x&&d.push({type:"invalid",label:Z(ke,{children:[T(ae,{children:"\u5165\u529B\u7BC4\u56F2\u304C\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059"}),"[",t||"\u4E0B\u9650\u7121\u3057","] ~ [",D||"\u4E0A\u9650\u7121\u3057","]"]})})}return{ok:!d.filter(({type:u})=>u=="invalid").length,notice:d}}const Q={picker:{launch:e=>{let l=e.tipsID||b.uuid.gen();G.open(_(o({gravityPoint:e.gravityPoint||24,padding:"1/2",tipsID:l},e),{close_option:o({aroundClick:!0,parentBlur:!1},e.close_option),content:T(ge,{restrict:e.restrict,min:e.min,max:e.max,era:e.era,defaultValue:e.defaultValue,tipsID:l,onValueUpdate:(v,t)=>{e.onValueUpdate(v,t)}})}))},remove:e=>{G.close(e)}}},De=e=>{let U=e,{tone:l,required:v,restrict:t="clock",componentID:D,era:h,form:d,name:m,min:i,max:u,className:n,enableFormSubmit:a,checkValidationAtFirst:c,onKeyDown:x,onValidate:S,onUpdateValue:R,onUpdateValidValue:g,value:$="",leftIndicator:J,rightIndicator:F}=U,f=H(U,["tone","required","restrict","componentID","era","form","name","min","max","className","enableFormSubmit","checkValidationAtFirst","onKeyDown","onValidate","onUpdateValue","onUpdateValidValue","value","leftIndicator","rightIndicator"]),[r,C]=W(h),[s,V]=W(_(o({componentID:e.componentID||""},P({restrict:t,value:$,era:r})),{eventType:"init",eventID:b.uuid.gen()})),[y,M]=W({ok:!1,notice:[]}),[I,k]=W({active:!1,index:0,prevIndex:-1});me({type:"time",params:e,val_status:s,set_status:V,val_validate:y,set_validate:M,DefaultValidation:ve,onUpdateValue:R,onUpdateValidValue:g,ExtraOverrideParams:o({},P({restrict:t,value:$,era:r}))});const E=re(!1);return X(()=>{if(E.current){V(o(o({},s),P({restrict:t,value:s.dataValue,era:r})));let p=O.get("refreshEra_"+s.componentID);p&&p.refreshEra(r)}else E.current=!0},[r]),O.update({key:s.componentID,value:{openPicker:()=>{e.disabled||Q.picker.launch({parent:"#Picker-"+s.componentID,tipsID:"PickerTips-"+s.componentID,restrict:t,min:i,max:u,defaultValue:s.dataValue,era:r,onValueUpdate:(p,w)=>{V(_(o(o({},s),P({restrict:t,value:p,era:w})),{eventType:"update",eventID:b.uuid.gen()})),C(w)}})},resetEra:p=>{C(p),V(_(o(o({},s),P({restrict:t,value:"",era:r})),{eventType:"update",eventID:b.uuid.gen()}))}}}),X(()=>{let{index:p,active:w}=I;if(w){p=Math.max(p,0),p=Math.min(p,s.ranges.length-1);let{from:B,length:L}=s.ranges[p],j=ie("#"+e.id)[0];j&&j.setSelectionRange(B,B+L)}},[I]),Z(ue,{val_status:s,set_status:V,val_validate:y,params:e,children:[T(de,{name:m,"data-input-type":"time","data-form":d,"data-validation":y.ok,componentID:s.componentID,"data-value":JSON.stringify(["dates","months"].includes(t)?!s.dataValue[0]||!s.dataValue[1]?null:s.dataValue:s.dataValue||null)}),z.get().isTouchDevice?T(q.Button.Plain,{className:n,freeCSS:{textAlign:"left"},children:s.formatValue,onClick:p=>{let w=O.get(s.componentID);w&&w.openPicker(),p.stopPropagation()}}):T("input",o({type:"text",inputMode:"numeric","data-input-type":"time","data-form-name":d,value:s.formatValue,className:n,tabIndex:z.get().isTouchDevice?-1:0,onKeyDown:p=>{Ie({restrict:t,event:p,val_era:r,val_status:s,set_status:V,val_focus:I,set_focus:k}),x&&x(p),a&&pe(p)},onKeyUp:p=>{p.key=="Tab"&&k(_(o({},I),{active:!0}))},onClick:p=>{let w=p.target.selectionEnd,B=0;s.ranges.forEach((L,j)=>{let{from:K,length:ee,region:te}=L;K<=w&&w<=K+(te||ee)&&(B=j)}),k(_(o({},I),{active:!0,index:B})),p.preventDefault()},onChange:()=>{}},f))]})},Ie=e=>{let{val_era:l,restrict:v,event:t,val_status:D,set_status:h,val_focus:d,set_focus:m}=e,{key:i,shiftKey:u,ctrlKey:n,metaKey:a}=t,c=n||a,{selectionStart:x,selectionEnd:S}=t.target,{index:R,prevIndex:g}=d,{ranges:$,formatValue:J}=D,F=$.length-1;if(["Tab","ArrowLeft","ArrowRight"].includes(i)){let f=0;if(i=="Tab"){let r=+!u*2-1;if(f=d.index+r,f<0||f>F)return}else{let r=i=="ArrowLeft"?-1:i=="ArrowRight"?1:0;c||x==0&&S==String(D.formatValue).length?f=r==1?F:0:f=Math.max(0,Math.min(R+r,F))}m(_(o({},d),{index:f,prevIndex:R})),t.preventDefault()}if(["Backspace","ArrowUp","ArrowDown","0","1","2","3","4","5","6","7","8","9"].includes(i)){t.preventDefault();let f=R;f=Math.max(f,0),f=Math.min(f,F);let{type:r,from:C,length:s}=$[f],V=J.slice(C,C+s),y;if(i=="Backspace")y="------".slice(0,s);else if(["ArrowUp","ArrowDown"].includes(i)){let M=i=="ArrowUp"?1:-1;V=V|0,y=V+M;let[I,k,E]=r=="dateWareki"?l=="year"?[0,2999,4]:l=="reiwa"?[1,2999,4]:l=="heisei"?[1,31,4]:l=="shouwa"?[1,64,4]:l=="taisho"?[1,15,4]:l=="meiji"?[1,45,4]:[0,0,0]:r=="minute"?[0,59,2]:r=="hour"?[0,23,2]:r=="date"?[1,31,2]:r=="week"?[1,53,2]:r=="month"?[1,12,2]:r=="year"?[0,2999,4]:[0,0,0];y>k?y=I:y<I&&(y=k),y=Number(y).zeroEmbed(E)}else if(["0","1","2","3","4","5","6","7","8","9"].includes(i)){let M=V|0,I=i,k=`${M}${I}`;if(g!=R&&g>=0&&(M=0,k="0"+I),r=="year"||r=="dateWareki"&&l=="year")Number(k)>1e4?y=I:y=k,(y|0)>1e3&&f++;else if(["hour","minute","date","week","month"].includes(r)||r=="dateWareki"&&l!="year"){let E=r=="dateWareki"?l=="reiwa"?100:l=="heisei"?31:l=="shouwa"?64:l=="taisho"?15:l=="meiji"?45:0:r=="minute"?59:r=="hour"?23:r=="date"?31:r=="week"?53:r=="month"?12:0;y=(k|0)>E?I:k,(Number(I)>Number(String(E)[0])||V=="0000".slice(0,String(E).length)&&(k!="0000".slice(0,String(E).length)||["minute","hour"].includes(r)&&g==R)||(k|0)>=Y(10,String(E).length-1))&&f++}r=="year"||r=="dateWareki"?y=(y|0).zeroEmbed(4):y=(y|0).zeroEmbed(2)}{let M=String(J).partReplace(C,String(y)),I=M.split(A).map(k=>k.replace(/(^\D|\D$)/,"").split(/\D+/).join(v=="clock"?":":"/").replace(/(^\D|\D$)/,""));if(v=="dateWareki"){let k=I[0].split(/\D/),[E,U,p]=k;k.length==3&&E&&(I=[[Number(E)-1+Number({year:1,reiwa:2019,heisei:1989,shouwa:1926,taisho:1912,meiji:1868}[l]),U,p].join("/")])}f=Math.max(f,0),f=Math.min(f,F),h(_(o({},D),{dataValue:["dates","months"].includes(v)?I:I[0],formatValue:M,eventType:"update",eventID:b.uuid.gen()})),m(_(o({},d),{index:f,prevIndex:d.index}))}}},N={Origin:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());if(e.componentID=l,b.is.nullish(e.rightIndicator)){let v=(e.restrict||"").match(/clock/)?le:oe;e.rightIndicator=T(he.RightIndicator,{padding:0,children:T(q.Button.Sub.R,{color:"cloud",border:"unset",padding:[0,1],fontColor:"theme",borderRadius:"inherit",backgroundColor:"inherit",flexCenter:!0,height:1,ssEffectsOnActive:["ripple.cloud"],tabIndex:-1,id:"Picker-"+e.componentID,onClick:()=>{let t=O.get(e.componentID);t&&t.openPicker()},children:T(ne,{icon:v})})})}return T(se,{componentID:e.componentID,children:De,params:ce.Boxish(e)})},Clock:e=>T(N.Origin,o({restrict:"clock",era:"clock"},e)),Date:e=>T(N.Origin,o({restrict:"date"},e)),Week:e=>T(N.Origin,o({restrict:"week"},e)),Month:e=>T(N.Origin,o({restrict:"month"},e)),Year:e=>T(N.Origin,o({restrict:"year"},e)),DateWareki:e=>{e=o({},e);let[l]=W(e.componentID||b.uuid.gen());e.componentID=l;let{defaultEra:v="wareki"}=e,[t,D]=W((()=>{let h="year";if(v=="wareki"&&(h="reiwa",e.value)){let[d,m,i]=e.value.split(/\D/);if(d&&m&&i){let u=Number(d);u>=2019?(u-=2019,h="reiwa"):u>=1989?(u-=1989,h="heisei"):u>=1926?(u-=1926,h="shouwa"):u>=1912?(u-=1912,h="taisho"):u>=1868&&(u-=1868,h="meiji"),u+=1}}return h})());return X(()=>{O.set({key:"refreshEra_"+l,value:{refreshEra:h=>{D(h)}}})},[]),T(N.Origin,_(o({restrict:"dateWareki",leftIndicator:T(fe,{enableUnSelected:!1,value:t,tone:e.tone,override:"force",flexCenter:!0,borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3",height:1,freeCSS:{whiteSpace:"nowrap"},options:[{value:"year",label:"\u897F\u66A6"},{value:"reiwa",label:"\u4EE4\u548C"},{value:"heisei",label:"\u5E73\u6210"},{value:"shouwa",label:"\u662D\u548C"},{value:"taisho",label:"\u5927\u6B63"},{value:"meiji",label:"\u660E\u6CBB"}],onUpdateValidValue:({value:h,eventType:d})=>{D(h);let m=O.get(e.componentID);m&&m.resetEra&&m.resetEra(h)}})},e),{era:t}))},Periods:{Date:e=>T(N.Origin,o({restrict:"dates"},e)),Month:e=>T(N.Origin,o({restrict:"months"},e))},fn:Q};export{N as Time,N as default};
|
package/dist/fn/Input/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../chunk-VY3566IV.js";import o from"./Plain";import i from"./Hidden";import a from"./Text";import p from"./TextArea";import m from"./AutoHeightText";import n from"./Contenteditable";import l from"./DigitCharacters";import c from"./Time/_";import s from"./Select";import d from"./RichSelect";import*as r from"./List";import x from"./Chips/_";import h from"./Search";import _ from"./Filer";import y from"./Slider";import C from"./Switch";import T from"./Checker";import u from"./Segmented";import f from"./Parts";var t;(e=>(e.Plain=o,e.Hidden=i,e.Text=a,e.TextArea=p,e.AutoHeightText=m,e.Contenteditable=n,e.DigitCharacters=l,e.Time=c,e.Select=s,e.RichSelect=d,e.List=r.List,e.Radio=r.Radio,e.Checkbox=r.Checkbox,e.Checker=T,e.Chips=x,e.Search=h,e.Filer=_,e.Slider=y,e.Switch=C,e.Segmented=u,e.Comps=f))(t||(t={}));export{t as Input,t as default};
|
package/dist/fn/Loader/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-VY3566IV.js";import{jsx as i,jsxs as I}from"react/jsx-runtime";import{Config as m,useStore as p,$$fromRoot as d}from"../../@utils/_";import L from"../../atoms/Box";import{LoaderClasses as l}from"../../@styles/componentClasses/_";import{Top as C}from"./top";import{Mini as s}from"./mini";import{Corner as f}from"./corner";const n=o=>{let t=o.color;return{S:e=>i(s,a({size:"S",color:t},e)),R:e=>i(s,a({size:"R",color:t},e)),L:e=>i(s,a({size:"L",color:t},e)),XL:e=>i(s,a({size:"XL",color:t},e)),MAX:e=>i(s,a({size:"MAX",color:t},e))}},c={Wrapper:()=>I(L,{className:["AMOTIFY_be",l("Wrapper")].join(" "),children:[i(C,{}),i(f,{})]}),Theme:n({color:"theme"}),Posi:n({color:"posi"}),Nega:n({color:"nega"}),Warn:n({color:"warn"}),White:n({color:"white"}),Cloud:n({color:"cloud"}),fn:{top:{active:()=>{let o=p.get("Loader-top-"+m.get().sessionUID+"-corner");o&&o.active()},stop:()=>{let o=p.get("Loader-top-"+m.get().sessionUID+"-corner");o&&o.stop()}},corner:{active:()=>{let o=p.get("Loader-corner-"+m.get().sessionUID+"-corner");o&&o.active()},stop:()=>{let o=p.get("Loader-corner-"+m.get().sessionUID+"-corner");o&&o.stop()}},mini:{active:(o="")=>{d("."+l("MiniLoader")).for(t=>{let{dataset:{componentId:e}={}}=t;if(!e)return;let r=p.get(e);r&&r.active&&r.active(o)})},stop:(o="")=>{d("."+l("MiniLoader")).for(t=>{let{dataset:{componentId:e}={}}=t;if(!e)return;let r=p.get(e);r&&r.stop&&r.stop(o)})},stopALL:()=>{d("."+l("MiniLoader")).for(o=>{let{dataset:{componentId:t}={}}=o;if(!t)return;let e=p.get(t);e&&e.stopForce&&e.stopForce()})}},stopALL:()=>{c.fn.top.stop(),c.fn.corner.stop(),c.fn.mini.stopALL()}}};export{c as Loader,c as default};
|
package/dist/fn/_.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './Effect/_';
|
|
2
|
-
export * from './Button';
|
|
3
|
-
export * from './Input/_';
|
|
4
|
-
export * from './Layout/_';
|
|
5
|
-
export * from './Table/_';
|
|
6
|
-
export * from './Sheet';
|
|
7
|
-
export * from './Snackbar';
|
|
8
|
-
export * from './Loader/_';
|
|
9
|
-
export * from './Tooltips';
|
|
10
|
-
export * from './Cropper';
|
package/dist/fn/_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./Effect/_";export*from"./Button";export*from"./Input/_";export*from"./Layout/_";export*from"./Table/_";export*from"./Sheet";export*from"./Snackbar";export*from"./Loader/_";export*from"./Tooltips";export*from"./Cropper";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|