kwant-ui 3.33.4-dev.3 → 3.33.4-dev.4
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.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/utils/formatDate.ts +1 -4
package/dist/index.es.js
CHANGED
|
@@ -3625,7 +3625,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as
|
|
|
3625
3625
|
}
|
|
3626
3626
|
}
|
|
3627
3627
|
}
|
|
3628
|
-
`;var Bc={exports:{}};Bc.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",c="minute",i="hour",o="day",s="week",l="month",h="quarter",v="year",p="date",u="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},_={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),a=r%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(a,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),a=t.clone().add(n,l),c=r-a<0,i=t.clone().add(n+(c?-1:1),l);return+(-(n+(r-a)/(c?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:v,w:s,d:o,D:p,h:i,m:c,s:a,ms:n,Q:h}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=d;var y="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[y])},Z=function e(t,r,n){var a;if(!t)return w;if("string"==typeof t){var c=t.toLowerCase();b[c]&&(a=c),r&&(b[c]=r,a=c);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var o=t.name;b[o]=t,a=o}return!n&&a&&(w=a),a||!n&&w},O=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},M=_;M.l=Z,M.i=x,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function d(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var f=d.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(g);if(n){var a=n[2]-1||0,c=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return M},f.isValid=function(){return!(this.$d.toString()===u)},f.isSame=function(e,t){var r=O(e);return this.startOf(t)<=r&&r<=this.endOf(t)},f.isAfter=function(e,t){return O(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<O(e)},f.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var r=this,n=!!M.u(t)||t,h=M.p(e),u=function(e,t){var a=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?a:a.endOf(o)},g=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,d=this.$M,f=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case v:return n?u(1,0):u(31,11);case l:return n?u(1,d):u(0,d+1);case s:var w=this.$locale().weekStart||0,b=(m<w?m+7:m)-w;return u(n?f-b:f+(6-b),d);case o:case p:return g(_+"Hours",0);case i:return g(_+"Minutes",1);case c:return g(_+"Seconds",2);case a:return g(_+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,t){var r,s=M.p(e),h="set"+(this.$u?"UTC":""),u=(r={},r[o]=h+"Date",r[p]=h+"Date",r[l]=h+"Month",r[v]=h+"FullYear",r[i]=h+"Hours",r[c]=h+"Minutes",r[a]=h+"Seconds",r[n]=h+"Milliseconds",r)[s],g=s===o?this.$D+(t-this.$W):t;if(s===l||s===v){var m=this.clone().set(p,1);m.$d[u](g),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](g);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[M.p(e)]()},f.add=function(n,h){var p,u=this;n=Number(n);var g=M.p(h),m=function(e){var t=O(u);return M.w(t.date(t.date()+Math.round(e*n)),u)};if(g===l)return this.set(l,this.$M+n);if(g===v)return this.set(v,this.$y+n);if(g===o)return m(1);if(g===s)return m(7);var d=(p={},p[c]=t,p[i]=r,p[a]=e,p)[g]||1,f=this.$d.getTime()+n*d;return M.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",a=M.z(this),c=this.$H,i=this.$m,o=this.$M,s=r.weekdays,l=r.months,h=r.meridiem,v=function(e,r,a,c){return e&&(e[r]||e(t,n))||a[r].slice(0,c)},p=function(e){return M.s(c%12||12,e,"0")},g=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return o+1;case"MM":return M.s(o+1,2,"0");case"MMM":return v(r.monthsShort,o,l,3);case"MMMM":return v(l,o);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return v(r.weekdaysMin,t.$W,s,2);case"ddd":return v(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(c);case"HH":return M.s(c,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(c,i,!0);case"A":return g(c,i,!1);case"m":return String(i);case"mm":return M.s(i,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(n,p,u){var g,m=this,d=M.p(p),f=O(n),_=(f.utcOffset()-this.utcOffset())*t,w=this-f,b=function(){return M.m(m,f)};switch(d){case v:g=b()/12;break;case l:g=b();break;case h:g=b()/3;break;case s:g=(w-_)/6048e5;break;case o:g=(w-_)/864e5;break;case i:g=w/r;break;case c:g=w/t;break;case a:g=w/e;break;default:g=w}return u?g:M.a(g)},f.daysInMonth=function(){return this.endOf(l).$D},f.$locale=function(){return b[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=Z(e,t,!0);return n&&(r.$L=n),r},f.clone=function(){return M.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),H=E.prototype;return O.prototype=H,[["$ms",n],["$s",a],["$m",c],["$H",i],["$W",o],["$M",l],["$y",v],["$D",p]].forEach((function(e){H[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,E,O),e.$i=!0),O},O.locale=Z,O.isDayjs=x,O.unix=function(e){return O(1e3*e)},O.en=b[w],O.Ls=b,O.p={},O}();var kc=fn(Bc.exports);const Sc=(e,t)=>{if(e&&"
|
|
3628
|
+
`;var Bc={exports:{}};Bc.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",c="minute",i="hour",o="day",s="week",l="month",h="quarter",v="year",p="date",u="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},_={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),a=r%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(a,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),a=t.clone().add(n,l),c=r-a<0,i=t.clone().add(n+(c?-1:1),l);return+(-(n+(r-a)/(c?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:v,w:s,d:o,D:p,h:i,m:c,s:a,ms:n,Q:h}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=d;var y="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[y])},Z=function e(t,r,n){var a;if(!t)return w;if("string"==typeof t){var c=t.toLowerCase();b[c]&&(a=c),r&&(b[c]=r,a=c);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var o=t.name;b[o]=t,a=o}return!n&&a&&(w=a),a||!n&&w},O=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},M=_;M.l=Z,M.i=x,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function d(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var f=d.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(g);if(n){var a=n[2]-1||0,c=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return M},f.isValid=function(){return!(this.$d.toString()===u)},f.isSame=function(e,t){var r=O(e);return this.startOf(t)<=r&&r<=this.endOf(t)},f.isAfter=function(e,t){return O(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<O(e)},f.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var r=this,n=!!M.u(t)||t,h=M.p(e),u=function(e,t){var a=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?a:a.endOf(o)},g=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,d=this.$M,f=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case v:return n?u(1,0):u(31,11);case l:return n?u(1,d):u(0,d+1);case s:var w=this.$locale().weekStart||0,b=(m<w?m+7:m)-w;return u(n?f-b:f+(6-b),d);case o:case p:return g(_+"Hours",0);case i:return g(_+"Minutes",1);case c:return g(_+"Seconds",2);case a:return g(_+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,t){var r,s=M.p(e),h="set"+(this.$u?"UTC":""),u=(r={},r[o]=h+"Date",r[p]=h+"Date",r[l]=h+"Month",r[v]=h+"FullYear",r[i]=h+"Hours",r[c]=h+"Minutes",r[a]=h+"Seconds",r[n]=h+"Milliseconds",r)[s],g=s===o?this.$D+(t-this.$W):t;if(s===l||s===v){var m=this.clone().set(p,1);m.$d[u](g),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](g);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[M.p(e)]()},f.add=function(n,h){var p,u=this;n=Number(n);var g=M.p(h),m=function(e){var t=O(u);return M.w(t.date(t.date()+Math.round(e*n)),u)};if(g===l)return this.set(l,this.$M+n);if(g===v)return this.set(v,this.$y+n);if(g===o)return m(1);if(g===s)return m(7);var d=(p={},p[c]=t,p[i]=r,p[a]=e,p)[g]||1,f=this.$d.getTime()+n*d;return M.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",a=M.z(this),c=this.$H,i=this.$m,o=this.$M,s=r.weekdays,l=r.months,h=r.meridiem,v=function(e,r,a,c){return e&&(e[r]||e(t,n))||a[r].slice(0,c)},p=function(e){return M.s(c%12||12,e,"0")},g=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return o+1;case"MM":return M.s(o+1,2,"0");case"MMM":return v(r.monthsShort,o,l,3);case"MMMM":return v(l,o);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return v(r.weekdaysMin,t.$W,s,2);case"ddd":return v(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(c);case"HH":return M.s(c,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(c,i,!0);case"A":return g(c,i,!1);case"m":return String(i);case"mm":return M.s(i,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(n,p,u){var g,m=this,d=M.p(p),f=O(n),_=(f.utcOffset()-this.utcOffset())*t,w=this-f,b=function(){return M.m(m,f)};switch(d){case v:g=b()/12;break;case l:g=b();break;case h:g=b()/3;break;case s:g=(w-_)/6048e5;break;case o:g=(w-_)/864e5;break;case i:g=w/r;break;case c:g=w/t;break;case a:g=w/e;break;default:g=w}return u?g:M.a(g)},f.daysInMonth=function(){return this.endOf(l).$D},f.$locale=function(){return b[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=Z(e,t,!0);return n&&(r.$L=n),r},f.clone=function(){return M.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),H=E.prototype;return O.prototype=H,[["$ms",n],["$s",a],["$m",c],["$H",i],["$W",o],["$M",l],["$y",v],["$D",p]].forEach((function(e){H[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,E,O),e.$i=!0),O},O.locale=Z,O.isDayjs=x,O.unix=function(e){return O(1e3*e)},O.en=b[w],O.Ls=b,O.p={},O}();var kc=fn(Bc.exports);const Sc=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e};function Rc(t){const{label:r,value:n,allowRange:a=!1,rangeValue:c,onSelect:i,editMode:o,numberOfMonths:s,disableEdit:h,dateFormat:v,placeholder:g=v,datepickerProps:m}=t,d=u(null),[f,_]=p(!1),[b,y]=p([]);l((()=>{c&&y(c)}),[c]);const x=Pt((()=>{if(f||d?.current?.isOpen)return _(!1),void d?.current?.closeCalendar(!0)}),{ignore:[".rmdp-header-values",".rmdp-day"]}),Z=Pt((()=>{_(!0),d?.current?.openCalendar(!0)})),O=a&&1===b?.length?Z:x,M=w((()=>{if(n){if(Array.isArray(n)&&0===n.length)return null;return kc(Sc(n.toString(),v)).format(v)}}),[n,v]);return e(zc,{children:e(Lc,{editActive:!h&&f,setEditActive:e=>{_(e)},onMouseLeaveFromInput:()=>{_(!!d?.current?.isOpen)},editMode:!h&&o,label:r,value:a?(E=c,E.length>1?`${E[0]}-${E[1]}`:""):M(),disableEdit:h,children:e("div",{ref:O,children:e(Aa,{...m,placeholder:g,calendarRef:d,numberOfMonths:s,zIndex:1001,range:a,value:M(),onChange:e=>{if(null!==e)if(a){let t=[];e&&e[0]&&(t=[e[0]]),e&&e[1]&&(t=[...t,e[1]]),y(t),t.length>1&&(i(t),_(!1),d?.current?.closeCalendar(!0))}else i(e.format()),_(!1);else i([])},onOpenPickNewDate:!1,format:v})})})});var E}const Dc=n.div`
|
|
3629
3629
|
display: flex;
|
|
3630
3630
|
width: 100%;
|
|
3631
3631
|
|
package/dist/index.js
CHANGED
|
@@ -3625,7 +3625,7 @@
|
|
|
3625
3625
|
}
|
|
3626
3626
|
}
|
|
3627
3627
|
}
|
|
3628
|
-
`;var Da={exports:{}};Da.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",c="minute",i="hour",o="day",s="week",l="month",h="quarter",v="year",p="date",u="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},_={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),a=r%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(a,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),a=t.clone().add(n,l),c=r-a<0,i=t.clone().add(n+(c?-1:1),l);return+(-(n+(r-a)/(c?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:v,w:s,d:o,D:p,h:i,m:c,s:a,ms:n,Q:h}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=d;var y="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[y])},Z=function e(t,r,n){var a;if(!t)return w;if("string"==typeof t){var c=t.toLowerCase();b[c]&&(a=c),r&&(b[c]=r,a=c);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var o=t.name;b[o]=t,a=o}return!n&&a&&(w=a),a||!n&&w},O=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},M=_;M.l=Z,M.i=x,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function d(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var f=d.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(g);if(n){var a=n[2]-1||0,c=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return M},f.isValid=function(){return!(this.$d.toString()===u)},f.isSame=function(e,t){var r=O(e);return this.startOf(t)<=r&&r<=this.endOf(t)},f.isAfter=function(e,t){return O(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<O(e)},f.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var r=this,n=!!M.u(t)||t,h=M.p(e),u=function(e,t){var a=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?a:a.endOf(o)},g=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,d=this.$M,f=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case v:return n?u(1,0):u(31,11);case l:return n?u(1,d):u(0,d+1);case s:var w=this.$locale().weekStart||0,b=(m<w?m+7:m)-w;return u(n?f-b:f+(6-b),d);case o:case p:return g(_+"Hours",0);case i:return g(_+"Minutes",1);case c:return g(_+"Seconds",2);case a:return g(_+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,t){var r,s=M.p(e),h="set"+(this.$u?"UTC":""),u=(r={},r[o]=h+"Date",r[p]=h+"Date",r[l]=h+"Month",r[v]=h+"FullYear",r[i]=h+"Hours",r[c]=h+"Minutes",r[a]=h+"Seconds",r[n]=h+"Milliseconds",r)[s],g=s===o?this.$D+(t-this.$W):t;if(s===l||s===v){var m=this.clone().set(p,1);m.$d[u](g),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](g);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[M.p(e)]()},f.add=function(n,h){var p,u=this;n=Number(n);var g=M.p(h),m=function(e){var t=O(u);return M.w(t.date(t.date()+Math.round(e*n)),u)};if(g===l)return this.set(l,this.$M+n);if(g===v)return this.set(v,this.$y+n);if(g===o)return m(1);if(g===s)return m(7);var d=(p={},p[c]=t,p[i]=r,p[a]=e,p)[g]||1,f=this.$d.getTime()+n*d;return M.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",a=M.z(this),c=this.$H,i=this.$m,o=this.$M,s=r.weekdays,l=r.months,h=r.meridiem,v=function(e,r,a,c){return e&&(e[r]||e(t,n))||a[r].slice(0,c)},p=function(e){return M.s(c%12||12,e,"0")},g=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return o+1;case"MM":return M.s(o+1,2,"0");case"MMM":return v(r.monthsShort,o,l,3);case"MMMM":return v(l,o);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return v(r.weekdaysMin,t.$W,s,2);case"ddd":return v(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(c);case"HH":return M.s(c,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(c,i,!0);case"A":return g(c,i,!1);case"m":return String(i);case"mm":return M.s(i,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(n,p,u){var g,m=this,d=M.p(p),f=O(n),_=(f.utcOffset()-this.utcOffset())*t,w=this-f,b=function(){return M.m(m,f)};switch(d){case v:g=b()/12;break;case l:g=b();break;case h:g=b()/3;break;case s:g=(w-_)/6048e5;break;case o:g=(w-_)/864e5;break;case i:g=w/r;break;case c:g=w/t;break;case a:g=w/e;break;default:g=w}return u?g:M.a(g)},f.daysInMonth=function(){return this.endOf(l).$D},f.$locale=function(){return b[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=Z(e,t,!0);return n&&(r.$L=n),r},f.clone=function(){return M.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),H=E.prototype;return O.prototype=H,[["$ms",n],["$s",a],["$m",c],["$H",i],["$W",o],["$M",l],["$y",v],["$D",p]].forEach((function(e){H[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,E,O),e.$i=!0),O},O.locale=Z,O.isDayjs=x,O.unix=function(e){return O(1e3*e)},O.en=b[w],O.Ls=b,O.p={},O}();var Ia=Cr(Da.exports);const Ta=(e,t)=>{if(e&&"
|
|
3628
|
+
`;var Da={exports:{}};Da.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",a="second",c="minute",i="hour",o="day",s="week",l="month",h="quarter",v="year",p="date",u="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},_={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),a=r%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(a,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),a=t.clone().add(n,l),c=r-a<0,i=t.clone().add(n+(c?-1:1),l);return+(-(n+(r-a)/(c?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:v,w:s,d:o,D:p,h:i,m:c,s:a,ms:n,Q:h}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=d;var y="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[y])},Z=function e(t,r,n){var a;if(!t)return w;if("string"==typeof t){var c=t.toLowerCase();b[c]&&(a=c),r&&(b[c]=r,a=c);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var o=t.name;b[o]=t,a=o}return!n&&a&&(w=a),a||!n&&w},O=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},M=_;M.l=Z,M.i=x,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function d(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var f=d.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(g);if(n){var a=n[2]-1||0,c=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,c)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return M},f.isValid=function(){return!(this.$d.toString()===u)},f.isSame=function(e,t){var r=O(e);return this.startOf(t)<=r&&r<=this.endOf(t)},f.isAfter=function(e,t){return O(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<O(e)},f.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var r=this,n=!!M.u(t)||t,h=M.p(e),u=function(e,t){var a=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?a:a.endOf(o)},g=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,d=this.$M,f=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case v:return n?u(1,0):u(31,11);case l:return n?u(1,d):u(0,d+1);case s:var w=this.$locale().weekStart||0,b=(m<w?m+7:m)-w;return u(n?f-b:f+(6-b),d);case o:case p:return g(_+"Hours",0);case i:return g(_+"Minutes",1);case c:return g(_+"Seconds",2);case a:return g(_+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,t){var r,s=M.p(e),h="set"+(this.$u?"UTC":""),u=(r={},r[o]=h+"Date",r[p]=h+"Date",r[l]=h+"Month",r[v]=h+"FullYear",r[i]=h+"Hours",r[c]=h+"Minutes",r[a]=h+"Seconds",r[n]=h+"Milliseconds",r)[s],g=s===o?this.$D+(t-this.$W):t;if(s===l||s===v){var m=this.clone().set(p,1);m.$d[u](g),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else u&&this.$d[u](g);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[M.p(e)]()},f.add=function(n,h){var p,u=this;n=Number(n);var g=M.p(h),m=function(e){var t=O(u);return M.w(t.date(t.date()+Math.round(e*n)),u)};if(g===l)return this.set(l,this.$M+n);if(g===v)return this.set(v,this.$y+n);if(g===o)return m(1);if(g===s)return m(7);var d=(p={},p[c]=t,p[i]=r,p[a]=e,p)[g]||1,f=this.$d.getTime()+n*d;return M.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",a=M.z(this),c=this.$H,i=this.$m,o=this.$M,s=r.weekdays,l=r.months,h=r.meridiem,v=function(e,r,a,c){return e&&(e[r]||e(t,n))||a[r].slice(0,c)},p=function(e){return M.s(c%12||12,e,"0")},g=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return o+1;case"MM":return M.s(o+1,2,"0");case"MMM":return v(r.monthsShort,o,l,3);case"MMMM":return v(l,o);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return v(r.weekdaysMin,t.$W,s,2);case"ddd":return v(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(c);case"HH":return M.s(c,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(c,i,!0);case"A":return g(c,i,!1);case"m":return String(i);case"mm":return M.s(i,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(n,p,u){var g,m=this,d=M.p(p),f=O(n),_=(f.utcOffset()-this.utcOffset())*t,w=this-f,b=function(){return M.m(m,f)};switch(d){case v:g=b()/12;break;case l:g=b();break;case h:g=b()/3;break;case s:g=(w-_)/6048e5;break;case o:g=(w-_)/864e5;break;case i:g=w/r;break;case c:g=w/t;break;case a:g=w/e;break;default:g=w}return u?g:M.a(g)},f.daysInMonth=function(){return this.endOf(l).$D},f.$locale=function(){return b[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=Z(e,t,!0);return n&&(r.$L=n),r},f.clone=function(){return M.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),H=E.prototype;return O.prototype=H,[["$ms",n],["$s",a],["$m",c],["$H",i],["$W",o],["$M",l],["$y",v],["$D",p]].forEach((function(e){H[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,E,O),e.$i=!0),O},O.locale=Z,O.isDayjs=x,O.unix=function(e){return O(1e3*e)},O.en=b[w],O.Ls=b,O.p={},O}();var Ia=Cr(Da.exports);const Ta=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e};const Na=t.div`
|
|
3629
3629
|
display: flex;
|
|
3630
3630
|
width: 100%;
|
|
3631
3631
|
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
package/utils/formatDate.ts
CHANGED
|
@@ -5,10 +5,7 @@ export const formatDate = (date: string, format: string) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export const checkFormatedDate = (date: string, dateFormat: string) => {
|
|
8
|
-
if (date && dateFormat === 'MM/
|
|
9
|
-
const splittedDate = date.split('/');
|
|
10
|
-
return `${splittedDate[2]}-${splittedDate[0]}-${splittedDate[1]}`;
|
|
11
|
-
} else if (date && dateFormat === 'DD/MM/YYYY' && !dateFormat.includes('-')) {
|
|
8
|
+
if (date && dateFormat === 'DD/MM/YYYY' && !dateFormat.includes('-')) {
|
|
12
9
|
const splittedDate = date.split('/');
|
|
13
10
|
return `${splittedDate[2]}-${splittedDate[1]}-${splittedDate[0]}`;
|
|
14
11
|
}
|