@sigtes/ui 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs.js +897 -771
- package/dist/components.es.js +34589 -32502
- package/dist/models/date/date.d.ts +2 -0
- package/dist/models.cjs.js +1 -1
- package/dist/models.es.js +74 -70
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ declare function now(): string;
|
|
|
6
6
|
declare function differenceInDays(date1: Date, date2: Date): number;
|
|
7
7
|
declare function addDays(date: Date, days: number): Date;
|
|
8
8
|
declare function format(date: Date, format: string): string;
|
|
9
|
+
declare function toUTCDateString(date: Date): string;
|
|
9
10
|
export declare const date: {
|
|
10
11
|
getLocalDate: typeof getLocalDate;
|
|
11
12
|
getLocalDateTime: typeof getLocalDateTime;
|
|
@@ -15,5 +16,6 @@ export declare const date: {
|
|
|
15
16
|
differenceInDays: typeof differenceInDays;
|
|
16
17
|
addDays: typeof addDays;
|
|
17
18
|
format: typeof format;
|
|
19
|
+
toUTCDateString: typeof toUTCDateString;
|
|
18
20
|
};
|
|
19
21
|
export {};
|
package/dist/models.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("dayjs");function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h={exports:{}},H=h.exports,S;function j(){return S||(S=1,(function(e,u){(function(f,s){e.exports=s(n)})(H,(function(f){function s(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var _=s(f),Y={name:"pt-br",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(i){return i+"º"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return _.default.locale(Y,null,!0),Y}))})(h)),h.exports}j();var m={exports:{}},q=m.exports,T;function w(){return T||(T=1,(function(e,u){(function(f,s){e.exports=s()})(q,(function(){var f="minute",s=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(Y,i,l){var r=i.prototype;l.utc=function(t){var o={date:t,utc:!0,args:arguments};return new i(o)},r.utc=function(t){var o=l(this.toDate(),{locale:this.$L,utc:!0});return t?o.add(this.utcOffset(),f):o},r.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var y=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),y.call(this,t)};var U=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else U.call(this)};var C=r.utcOffset;r.utcOffset=function(t,o){var d=this.$utils().u;if(d(t))return this.$u?0:d(this.$offset)?C.call(this):this.$offset;if(typeof t=="string"&&(t=(function($){$===void 0&&($="");var v=$.match(s);if(!v)return null;var D=(""+v[0]).match(_)||["-",0,0],b=D[0],g=60*+D[1]+ +D[2];return g===0?0:b==="+"?g:-g})(t),t===null))return this;var c=Math.abs(t)<=16?60*t:t;if(c===0)return this.utc(o);var a=this.clone();if(o)return a.$offset=c,a.$u=!1,a;var p=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(c+p,f)).$offset=c,a.$x.$localOffset=p,a};var L=r.format;r.format=function(t){var o=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return L.call(this,o)},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var O=r.toDate;r.toDate=function(t){return t==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():O.call(this)};var M=r.diff;r.diff=function(t,o,d){if(t&&this.$u===t.$u)return M.call(this,t,o,d);var c=this.local(),a=l(t).local();return M.call(c,a,o,d)}}}))})(m)),m.exports}var z=w();const B=x(z);n.extend(B);n.locale("pt-br");function P(e){return n(String(e)).format("DD/MM/YYYY")}function k(e){return n(e).utc().add(1,"day").format("YYYY-MM-DD")}function F(e){return n(String(e)).format("DD/MM/YYYY hh:mm:ss")}function I(e){if(e)return n(String(e)).utc().format("DD/MM/YYYY")}function E(){return n(new Date).format("YYYY-MM-DD")}function R(e,u){return n(e).diff(n(u),"day")}function W(e,u){return n(e).add(u,"day").toDate()}function Z(e,u){return n(new Date(e)).format(u)}function A(e){return`${e.getUTCDate().toString().padStart(2,"0")}/${e.getUTCMonth().toString().padStart(2,"0")}/${e.getUTCFullYear()}`}const G={getLocalDate:P,getLocalDateTime:F,getUTCDate:I,getUTCtoDateMoreOneDay:k,now:E,differenceInDays:R,addDays:W,format:Z,toUTCDateString:A};exports.date=G;
|
package/dist/models.es.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
1
|
+
import n from "dayjs";
|
|
2
|
+
function H(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
5
|
+
var d = { exports: {} }, b = d.exports, T;
|
|
6
6
|
function j() {
|
|
7
|
-
return
|
|
8
|
-
(function(f,
|
|
9
|
-
e.exports =
|
|
10
|
-
})(
|
|
11
|
-
function
|
|
12
|
-
return
|
|
7
|
+
return T || (T = 1, (function(e, u) {
|
|
8
|
+
(function(f, s) {
|
|
9
|
+
e.exports = s(n);
|
|
10
|
+
})(b, (function(f) {
|
|
11
|
+
function s(i) {
|
|
12
|
+
return i && typeof i == "object" && "default" in i ? i : { default: i };
|
|
13
13
|
}
|
|
14
|
-
var _ =
|
|
15
|
-
return
|
|
14
|
+
var _ = s(f), Y = { name: "pt-br", weekdays: "domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_sáb".split("_"), weekdaysMin: "Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"), months: "janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(i) {
|
|
15
|
+
return i + "º";
|
|
16
16
|
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [às] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [às] HH:mm" }, relativeTime: { future: "em %s", past: "há %s", s: "poucos segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um mês", MM: "%d meses", y: "um ano", yy: "%d anos" } };
|
|
17
17
|
return _.default.locale(Y, null, !0), Y;
|
|
18
18
|
}));
|
|
19
|
-
})(
|
|
19
|
+
})(d)), d.exports;
|
|
20
20
|
}
|
|
21
21
|
j();
|
|
22
|
-
var m = { exports: {} }, q = m.exports,
|
|
22
|
+
var m = { exports: {} }, q = m.exports, S;
|
|
23
23
|
function w() {
|
|
24
|
-
return
|
|
25
|
-
(function(f,
|
|
26
|
-
e.exports =
|
|
24
|
+
return S || (S = 1, (function(e, u) {
|
|
25
|
+
(function(f, s) {
|
|
26
|
+
e.exports = s();
|
|
27
27
|
})(q, (function() {
|
|
28
|
-
var f = "minute",
|
|
29
|
-
return function(Y,
|
|
30
|
-
var r =
|
|
28
|
+
var f = "minute", s = /[+-]\d\d(?::?\d\d)?/g, _ = /([+-]|\d\d)/g;
|
|
29
|
+
return function(Y, i, l) {
|
|
30
|
+
var r = i.prototype;
|
|
31
31
|
l.utc = function(t) {
|
|
32
32
|
var o = { date: t, utc: !0, args: arguments };
|
|
33
|
-
return new
|
|
33
|
+
return new i(o);
|
|
34
34
|
}, r.utc = function(t) {
|
|
35
35
|
var o = l(this.toDate(), { locale: this.$L, utc: !0 });
|
|
36
36
|
return t ? o.add(this.utcOffset(), f) : o;
|
|
37
37
|
}, r.local = function() {
|
|
38
38
|
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
|
39
39
|
};
|
|
40
|
-
var
|
|
40
|
+
var y = r.parse;
|
|
41
41
|
r.parse = function(t) {
|
|
42
|
-
t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset),
|
|
42
|
+
t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset), y.call(this, t);
|
|
43
43
|
};
|
|
44
|
-
var
|
|
44
|
+
var U = r.init;
|
|
45
45
|
r.init = function() {
|
|
46
46
|
if (this.$u) {
|
|
47
47
|
var t = this.$d;
|
|
48
48
|
this.$y = t.getUTCFullYear(), this.$M = t.getUTCMonth(), this.$D = t.getUTCDate(), this.$W = t.getUTCDay(), this.$H = t.getUTCHours(), this.$m = t.getUTCMinutes(), this.$s = t.getUTCSeconds(), this.$ms = t.getUTCMilliseconds();
|
|
49
|
-
} else
|
|
49
|
+
} else U.call(this);
|
|
50
50
|
};
|
|
51
|
-
var
|
|
51
|
+
var C = r.utcOffset;
|
|
52
52
|
r.utcOffset = function(t, o) {
|
|
53
|
-
var
|
|
54
|
-
if (
|
|
55
|
-
if (typeof t == "string" && (t = (function(
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
if (!
|
|
59
|
-
var
|
|
60
|
-
return M === 0 ? 0 :
|
|
53
|
+
var h = this.$utils().u;
|
|
54
|
+
if (h(t)) return this.$u ? 0 : h(this.$offset) ? C.call(this) : this.$offset;
|
|
55
|
+
if (typeof t == "string" && (t = (function($) {
|
|
56
|
+
$ === void 0 && ($ = "");
|
|
57
|
+
var v = $.match(s);
|
|
58
|
+
if (!v) return null;
|
|
59
|
+
var D = ("" + v[0]).match(_) || ["-", 0, 0], O = D[0], M = 60 * +D[1] + +D[2];
|
|
60
|
+
return M === 0 ? 0 : O === "+" ? M : -M;
|
|
61
61
|
})(t), t === null)) return this;
|
|
62
62
|
var c = Math.abs(t) <= 16 ? 60 * t : t;
|
|
63
63
|
if (c === 0) return this.utc(o);
|
|
64
|
-
var
|
|
65
|
-
if (o) return
|
|
66
|
-
var
|
|
67
|
-
return (
|
|
64
|
+
var a = this.clone();
|
|
65
|
+
if (o) return a.$offset = c, a.$u = !1, a;
|
|
66
|
+
var p = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
67
|
+
return (a = this.local().add(c + p, f)).$offset = c, a.$x.$localOffset = p, a;
|
|
68
68
|
};
|
|
69
|
-
var
|
|
69
|
+
var x = r.format;
|
|
70
70
|
r.format = function(t) {
|
|
71
71
|
var o = t || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
72
|
-
return
|
|
72
|
+
return x.call(this, o);
|
|
73
73
|
}, r.valueOf = function() {
|
|
74
74
|
var t = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
75
75
|
return this.$d.valueOf() - 6e4 * t;
|
|
@@ -80,59 +80,63 @@ function w() {
|
|
|
80
80
|
}, r.toString = function() {
|
|
81
81
|
return this.toDate().toUTCString();
|
|
82
82
|
};
|
|
83
|
-
var
|
|
83
|
+
var L = r.toDate;
|
|
84
84
|
r.toDate = function(t) {
|
|
85
|
-
return t === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() :
|
|
85
|
+
return t === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : L.call(this);
|
|
86
86
|
};
|
|
87
|
-
var
|
|
88
|
-
r.diff = function(t, o,
|
|
89
|
-
if (t && this.$u === t.$u) return
|
|
90
|
-
var c = this.local(),
|
|
91
|
-
return
|
|
87
|
+
var g = r.diff;
|
|
88
|
+
r.diff = function(t, o, h) {
|
|
89
|
+
if (t && this.$u === t.$u) return g.call(this, t, o, h);
|
|
90
|
+
var c = this.local(), a = l(t).local();
|
|
91
|
+
return g.call(c, a, o, h);
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
}));
|
|
95
95
|
})(m)), m.exports;
|
|
96
96
|
}
|
|
97
97
|
var z = w();
|
|
98
|
-
const B = /* @__PURE__ */
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
const B = /* @__PURE__ */ H(z);
|
|
99
|
+
n.extend(B);
|
|
100
|
+
n.locale("pt-br");
|
|
101
101
|
function k(e) {
|
|
102
|
-
return
|
|
102
|
+
return n(String(e)).format("DD/MM/YYYY");
|
|
103
|
+
}
|
|
104
|
+
function F(e) {
|
|
105
|
+
return n(e).utc().add(1, "day").format("YYYY-MM-DD");
|
|
103
106
|
}
|
|
104
107
|
function I(e) {
|
|
105
|
-
return
|
|
108
|
+
return n(String(e)).format("DD/MM/YYYY hh:mm:ss");
|
|
106
109
|
}
|
|
107
110
|
function P(e) {
|
|
108
|
-
return i(String(e)).format("DD/MM/YYYY hh:mm:ss");
|
|
109
|
-
}
|
|
110
|
-
function E(e) {
|
|
111
111
|
if (e)
|
|
112
|
-
return
|
|
112
|
+
return n(String(e)).utc().format("DD/MM/YYYY");
|
|
113
|
+
}
|
|
114
|
+
function E() {
|
|
115
|
+
return n(/* @__PURE__ */ new Date()).format("YYYY-MM-DD");
|
|
113
116
|
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
117
|
+
function R(e, u) {
|
|
118
|
+
return n(e).diff(n(u), "day");
|
|
116
119
|
}
|
|
117
|
-
function
|
|
118
|
-
return
|
|
120
|
+
function W(e, u) {
|
|
121
|
+
return n(e).add(u, "day").toDate();
|
|
119
122
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
123
|
+
function Z(e, u) {
|
|
124
|
+
return n(new Date(e)).format(u);
|
|
122
125
|
}
|
|
123
|
-
function
|
|
124
|
-
return
|
|
126
|
+
function A(e) {
|
|
127
|
+
return `${e.getUTCDate().toString().padStart(2, "0")}/${e.getUTCMonth().toString().padStart(2, "0")}/${e.getUTCFullYear()}`;
|
|
125
128
|
}
|
|
126
|
-
const
|
|
129
|
+
const J = {
|
|
127
130
|
getLocalDate: k,
|
|
128
|
-
getLocalDateTime:
|
|
129
|
-
getUTCDate:
|
|
130
|
-
getUTCtoDateMoreOneDay:
|
|
131
|
-
now:
|
|
131
|
+
getLocalDateTime: I,
|
|
132
|
+
getUTCDate: P,
|
|
133
|
+
getUTCtoDateMoreOneDay: F,
|
|
134
|
+
now: E,
|
|
132
135
|
differenceInDays: R,
|
|
133
136
|
addDays: W,
|
|
134
|
-
format: Z
|
|
137
|
+
format: Z,
|
|
138
|
+
toUTCDateString: A
|
|
135
139
|
};
|
|
136
140
|
export {
|
|
137
|
-
|
|
141
|
+
J as date
|
|
138
142
|
};
|