forstok-ui-lib 7.5.1 → 7.5.2

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/index.mjs CHANGED
@@ -4425,7 +4425,7 @@ function P(e,t){if(!1===e||null==e)throw new Error(t)}function Y(e,t){if(!e){"un
4425
4425
  border: 1px solid var(--ck-clr-ln);
4426
4426
  border-radius: var(--ter-rd);
4427
4427
  `}
4428
- `,Xo=d(((r,i)=>{var{dateFormat:n="MMM dd, yyyy",name:a,evChange:d,isField:c,saveFormat:C,showFormat:s,evChangeCustom:p,value:h,isForceUpdate:g,setForceUpdate:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1}=r,w=z(r,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty"]);const[F,f]=o(h||(v?null:new Date)),y=e=>{f(e),d&&d(a,e),c&&p&&p(a,e?E(e).format(C):e)};return l((()=>{if(g){const e=h||(v?null:new Date);f(e),x&&x(!1)}}),[g,x,h,v]),t(Po,Object.assign({$isError:m},w["data-qa-id"]&&{"data-qa-id":w["data-qa-id"]},{children:[e(D,{selected:F,name:a,portalId:"popup-portal",dateFormat:n,onChange:y,showTimeInput:u,onKeyDown:e=>e.preventDefault(),ref:i}),v&&F?e(Yo,{onClick:()=>y(null),title:"clear",children:e("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),To={rangeDate:"lastsecondweek",startDate:E().clone().subtract(13,"days").format("YYYY-MM-DD"),endDate:E().clone().format("YYYY-MM-DD"),placeholder:"Last 14 days",minDate:E().clone().subtract(89,"days").format("YYYY-MM-DD")},No={startDate:E().clone().subtract(13,"days"),endDate:E().clone(),minDate:E().clone().subtract(89,"days")},So=t=>{const{$mode:r,startDate:i,endDate:n,minDate:a,maxDate:d,evModDate:C,isForceUpdate:s,setForceUpdate:p}=t,h=a||No.minDate;let g=i||No.startDate,x=n||No.endDate;h>g&&(g=h),d&&d<x&&(x=d);const[m,u]=o([g,x]);l((()=>{s&&(g&&x&&u([g,x]),p&&p(!1))}),[s,p,g,x]);const v={generateConfig:k,value:m,onChange:(e,t)=>{e&&(u(e),C(e[0],e[1]))}},w=c(null);return e(Ho,{className:"_refRangeContainer",$mode:r,children:e(B,Object.assign({onOpenChange:e=>{var t,r;const i=null===(r=null===(t=w.current)||void 0===t?void 0:t.nativeElement)||void 0===r?void 0:r.closest("._refRangeContainer");i&&(e?i.classList.add("is-actived"):i.classList.remove("is-actived"))},allowEmpty:!0,allowClear:!1,locale:O,ref:w,separator:"-",format:"MMM D, YYYY",placeholder:["Start Date","End Date"],minDate:h,maxDate:d||E().clone(),defaultValue:m,suffixIcon:e(pa,{$width:"14px",$name:"calendar"}),prevIcon:e(pa,{$width:"12px",$name:"arrow-left"}),nextIcon:e(pa,{$width:"12px",$name:"arrow-right"}),superPrevIcon:e(pa,{$width:"12px",$name:"arrow-left-double"}),superNextIcon:e(pa,{$width:"12px",$name:"arrow-right-double"}),presets:[{label:"Today",value:[E().clone(),E()]},{label:"Last 7 days",value:[E().subtract(6,"days"),E()]},{label:"Last 14 days",value:[E().subtract(13,"days"),E()]},{label:"Last 30 days",value:[E().subtract(29,"days"),E()]},{label:"Last 90 days",value:[E().subtract(89,"days"),E()]}]},v))})},qo=d(((r,i)=>{const{dateFormat:n="MMM dd, yyyy",name:a,evChange:d,isField:c,saveFormat:C,showFormat:s,evChangeCustom:p,value:h,reset:g,setReset:x,isForceUpdate:m,setForceUpdate:u,isError:v=!1,showTimeInput:w=!1,allowEmpty:F=!1,placeholderText:f,portalId:y,isIcon:A,disabled:b}=r,B=z(r,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","reset","setReset","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty","placeholderText","portalId","isIcon","disabled"]),[k,O]=o(void 0!==h?h:F?null:new Date),M=e=>{O(e),d&&d(a,e),c&&p&&p(a,e?E(e).format(C):e)};return l((()=>{if(g&&(O(null),x&&x(!1)),m){const e=h||(F?null:new Date);O(e),u&&u(!1)}}),[m,u,h,F,g,x]),t(Po,Object.assign({$isError:v},B["data-tip"]&&{"data-tip":B["data-tip"],"data-place":B["data-place"],"data-type":B["data-type"]},B["data-qa-id"]&&{"data-qa-id":B["data-qa-id"]},{children:[A&&e(pa,{$name:"calendar",$width:"20px"}),e(D,Object.assign({selected:k,name:a,dateFormat:n,onChange:M,showTimeInput:w,onKeyDown:e=>e.preventDefault(),placeholderText:f,ref:i},b&&{disabled:!0},y&&{portalId:y})),F&&k?e(Yo,{onClick:()=>M(null),title:"clear",children:e("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Uo=i.div`
4428
+ `,Xo=d(((r,i)=>{var{dateFormat:n="MMM dd, yyyy",name:a,evChange:d,isField:c,saveFormat:C,showFormat:s,evChangeCustom:p,value:h,isForceUpdate:g,setForceUpdate:x,isError:m=!1,showTimeInput:u=!1,allowEmpty:v=!1}=r,w=z(r,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty"]);const[F,f]=o(h||(v?null:new Date)),y=e=>{f(e),d&&d(a,e),c&&p&&p(a,e?E(e).format(C):e)};return l((()=>{if(g){const e=h||(v?null:new Date);f(e),x&&x(!1)}}),[g,x,h,v]),t(Po,Object.assign({$isError:m},w["data-qa-id"]&&{"data-qa-id":w["data-qa-id"]},{children:[e(D,{selected:F,name:a,portalId:"popup-portal",dateFormat:n,onChange:y,showTimeInput:u,onKeyDown:e=>e.preventDefault(),ref:i}),v&&F?e(Yo,{onClick:()=>y(null),title:"clear",children:e("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),To={rangeDate:"lastsecondweek",startDate:E().clone().subtract(13,"days").format("YYYY-MM-DD"),endDate:E().clone().format("YYYY-MM-DD"),placeholder:"Last 14 days",minDate:E().clone().subtract(89,"days").format("YYYY-MM-DD")},No={startDate:E().clone().subtract(13,"days"),endDate:E().clone(),minDate:E().clone().subtract(89,"days")},So=t=>{const{$mode:r,startDate:i,endDate:n,minDate:a,maxDate:d,evModDate:C,isForceUpdate:s,setForceUpdate:p}=t,h=a||No.minDate;let g=i||No.startDate,x=n||No.endDate;h>g&&(g=h),d&&d<x&&(x=d);const[m,u]=o([g,x]);l((()=>{s&&(g&&x&&u([g,x]),p&&p(!1))}),[s,p,g,x]);const v={generateConfig:k,value:m,onChange:(e,t)=>{e&&(u(e),C(e[0],e[1]))}},w=c(null);return e(Ho,{className:"_refRangeContainer",$mode:r,children:e(B,Object.assign({onOpenChange:e=>{var t,r;const i=null===(r=null===(t=w.current)||void 0===t?void 0:t.nativeElement)||void 0===r?void 0:r.closest("._refRangeContainer");i&&(e?i.classList.add("is-actived"):i.classList.remove("is-actived"))},allowEmpty:!0,allowClear:!1,locale:O,ref:w,separator:"-",format:"MMM D, YYYY",placeholder:["Start Date","End Date"],minDate:h,maxDate:d||E().clone(),suffixIcon:e(pa,{$width:"14px",$name:"calendar"}),prevIcon:e(pa,{$width:"12px",$name:"arrow-left"}),nextIcon:e(pa,{$width:"12px",$name:"arrow-right"}),superPrevIcon:e(pa,{$width:"12px",$name:"arrow-left-double"}),superNextIcon:e(pa,{$width:"12px",$name:"arrow-right-double"}),presets:[{label:"Today",value:[E().clone(),E()]},{label:"Last 7 days",value:[E().subtract(6,"days"),E()]},{label:"Last 14 days",value:[E().subtract(13,"days"),E()]},{label:"Last 30 days",value:[E().subtract(29,"days"),E()]},{label:"Last 90 days",value:[E().subtract(89,"days"),E()]}]},v))})},qo=d(((r,i)=>{const{dateFormat:n="MMM dd, yyyy",name:a,evChange:d,isField:c,saveFormat:C,showFormat:s,evChangeCustom:p,value:h,reset:g,setReset:x,isForceUpdate:m,setForceUpdate:u,isError:v=!1,showTimeInput:w=!1,allowEmpty:F=!1,placeholderText:f,portalId:y,isIcon:A,disabled:b}=r,B=z(r,["dateFormat","name","evChange","isField","saveFormat","showFormat","evChangeCustom","value","reset","setReset","isForceUpdate","setForceUpdate","isError","showTimeInput","allowEmpty","placeholderText","portalId","isIcon","disabled"]),[k,O]=o(void 0!==h?h:F?null:new Date),M=e=>{O(e),d&&d(a,e),c&&p&&p(a,e?E(e).format(C):e)};return l((()=>{if(g&&(O(null),x&&x(!1)),m){const e=h||(F?null:new Date);O(e),u&&u(!1)}}),[m,u,h,F,g,x]),t(Po,Object.assign({$isError:v},B["data-tip"]&&{"data-tip":B["data-tip"],"data-place":B["data-place"],"data-type":B["data-type"]},B["data-qa-id"]&&{"data-qa-id":B["data-qa-id"]},{children:[A&&e(pa,{$name:"calendar",$width:"20px"}),e(D,Object.assign({selected:k,name:a,dateFormat:n,onChange:M,showTimeInput:w,onKeyDown:e=>e.preventDefault(),placeholderText:f,ref:i},b&&{disabled:!0},y&&{portalId:y})),F&&k?e(Yo,{onClick:()=>M(null),title:"clear",children:e("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})})}):null]}))})),Uo=i.div`
4429
4429
  display: grid;
4430
4430
  `,Vo=({dateTimeData:i})=>{const n=E(i,"YYYY-MM-DD HH:mm:ss ZZ").format("D MMM YYYY,"),a=E(i,"YYYY-MM-DD HH:mm:ss ZZ").format("hh:mm A");return e(Uo,{children:i?t(r,{children:[e("span",{children:n}),e("span",{children:a})]}):"-"})},Wo=i.div`
4431
4431
  display: grid;