jsl-ui 9.28.7 → 9.29.1
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/lib/core/date.d.ts +2 -0
- package/lib/core/date.js +6 -0
- package/lib/core/helper.js +11 -6
- package/lib/grid.css +3 -3
- package/lib/index.css +3 -3
- package/lib/index.js.map +1 -1
- package/package.json +9 -2
package/lib/core/date.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export declare abstract class date {
|
|
|
2
2
|
static parse(value: string, format?: string, settings?: any): Date;
|
|
3
3
|
static format(date: Date, format?: string, settings?: any): string;
|
|
4
4
|
static formatTime(value: Date, inputMode: "HourMinute" | "HourMinuteSecond"): string;
|
|
5
|
+
static toLocalDate(value: Date): Date;
|
|
6
|
+
static toUtcDate(value: Date): Date;
|
|
5
7
|
static now(): Date;
|
|
6
8
|
static addSeconds(d: any, seconds: any): Date;
|
|
7
9
|
static addMinutes(d: any, minutes: any): Date;
|
package/lib/core/date.js
CHANGED
|
@@ -295,6 +295,12 @@ monthNames string[12] - names of the months (optional)
|
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
+
static toLocalDate(value) {
|
|
299
|
+
return date.addMinutes(value, -(value.getTimezoneOffset()));
|
|
300
|
+
}
|
|
301
|
+
static toUtcDate(value) {
|
|
302
|
+
return date.addMinutes(value, +(value.getTimezoneOffset()));
|
|
303
|
+
}
|
|
298
304
|
static now() {
|
|
299
305
|
return new Date();
|
|
300
306
|
}
|
package/lib/core/helper.js
CHANGED
|
@@ -5,16 +5,21 @@ export class helper {
|
|
|
5
5
|
static newGuid() {
|
|
6
6
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { const r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); });
|
|
7
7
|
}
|
|
8
|
+
// same layout as the C# Saftware.Core.Helper.NewSeqGuid(), so guids from both sides sort sequentially (SQL Server / SqlGuid order):
|
|
9
|
+
// last 12 hex digits = days since 2020-01-01 UTC (4 digits) + UTC milliseconds of the day * 22 (8 digits)
|
|
8
10
|
static newSeqGuid() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const msPerDay = 86400000;
|
|
12
|
+
const sinceBase = new Date().getTime() - Date.UTC(2020, 0, 1);
|
|
13
|
+
let days = (Math.floor(sinceBase / msPerDay) & 0xffff).toString(16);
|
|
14
|
+
while (days.length < 4) {
|
|
15
|
+
days = "0" + days;
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
let timeOfDay = ((sinceBase % msPerDay) * 22).toString(16);
|
|
18
|
+
while (timeOfDay.length < 8) {
|
|
19
|
+
timeOfDay = "0" + timeOfDay;
|
|
15
20
|
}
|
|
16
21
|
return "xxxxxxxx-xxxx-4xxx-yxxx-".replace(/[xy]/g, function (c) { var r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); })
|
|
17
|
-
+
|
|
22
|
+
+ days + timeOfDay;
|
|
18
23
|
}
|
|
19
24
|
static newDomGuid() {
|
|
20
25
|
return "axxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { const r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); });
|
package/lib/grid.css
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
|
|
143
143
|
.slick-reorder-proxy {
|
|
144
144
|
opacity: .15;
|
|
145
|
-
filter: alpha(opacity= 15);
|
|
145
|
+
filter: alpha(opacity = 15);
|
|
146
146
|
cursor: move;
|
|
147
147
|
background: #00f;
|
|
148
148
|
display: inline-block;
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
.slick-reorder-guide {
|
|
152
152
|
opacity: .7;
|
|
153
153
|
height: 2px;
|
|
154
|
-
filter: alpha(opacity= 70);
|
|
154
|
+
filter: alpha(opacity = 70);
|
|
155
155
|
background: #00f;
|
|
156
156
|
display: inline-block;
|
|
157
157
|
}
|
|
@@ -369,7 +369,7 @@ input.editor-text, textarea.editor-text {
|
|
|
369
369
|
|
|
370
370
|
.slick-row.loading {
|
|
371
371
|
opacity: .5;
|
|
372
|
-
filter: alpha(opacity= 50);
|
|
372
|
+
filter: alpha(opacity = 50);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
.slick-cell.invalid {
|
package/lib/index.css
CHANGED
|
@@ -708,7 +708,7 @@ div.jsl-fill {
|
|
|
708
708
|
|
|
709
709
|
.slick-reorder-proxy {
|
|
710
710
|
opacity: .15;
|
|
711
|
-
filter: alpha(opacity= 15);
|
|
711
|
+
filter: alpha(opacity = 15);
|
|
712
712
|
cursor: move;
|
|
713
713
|
background: #00f;
|
|
714
714
|
display: inline-block;
|
|
@@ -717,7 +717,7 @@ div.jsl-fill {
|
|
|
717
717
|
.slick-reorder-guide {
|
|
718
718
|
opacity: .7;
|
|
719
719
|
height: 2px;
|
|
720
|
-
filter: alpha(opacity= 70);
|
|
720
|
+
filter: alpha(opacity = 70);
|
|
721
721
|
background: #00f;
|
|
722
722
|
display: inline-block;
|
|
723
723
|
}
|
|
@@ -935,7 +935,7 @@ input.editor-text, textarea.editor-text {
|
|
|
935
935
|
|
|
936
936
|
.slick-row.loading {
|
|
937
937
|
opacity: .5;
|
|
938
|
-
filter: alpha(opacity= 50);
|
|
938
|
+
filter: alpha(opacity = 50);
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
.slick-cell.invalid {
|