inviton-powerduck 0.0.154 → 0.0.155
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/app/powerduck-initializer.ts +3 -3
- package/common/api-http.ts +20 -14
- package/common/css/ladda-themeless-zoomin.min.css +89 -89
- package/common/enum-translation/day-translator.ts +3 -2
- package/common/excel/excel-reader.ts +2 -9
- package/common/extensions/array-extensions.ts +116 -0
- package/common/extensions/string-extensions.ts +92 -0
- package/common/extensions/temporal-extensions.ts +115 -0
- package/common/scroll-utils.ts +2 -1
- package/common/temporal-helpers.ts +551 -0
- package/common/timezone-helper.ts +39 -29
- package/common/utils/cookie.ts +11 -8
- package/common/utils/date-localization-utils.ts +25 -19
- package/common/utils/date-utils.ts +37 -47
- package/common/utils/form-utils.ts +3 -1
- package/common/utils/language-utils.ts +21 -27
- package/common/utils/temporal-utils.ts +43 -0
- package/common/utils/upload-image-helper.ts +1 -1
- package/common/utils/utils.ts +14 -14
- package/common/validation.ts +17 -5
- package/components/chart-js/line-chart-flot.tsx +9 -9
- package/components/chart-js/thirdparty/flot/jquery.flot.categories.min.js +93 -93
- package/components/chart-js/thirdparty/flot/jquery.flot.crosshair.min.js +83 -83
- package/components/chart-js/thirdparty/flot/jquery.flot.navigate.min.js +270 -270
- package/components/chart-js/thirdparty/flot/jquery.flot.pie.min.js +507 -507
- package/components/chart-js/thirdparty/flot/jquery.flot.resize.js +7 -9
- package/components/chart-js/thirdparty/flot/jquery.flot.resize.min.js +9 -11
- package/components/chart-js/thirdparty/flot/jquery.flot.stack.min.js +104 -104
- package/components/chart-js/ts/line-chart-contracts.ts +2 -2
- package/components/container-with-breakpoints/ts/breakpoint-handler.ts +2 -2
- package/components/counter/testall.tsx +89 -75
- package/components/datatable/datatable.tsx +2379 -2375
- package/components/datatable/export-excel-modal.tsx +12 -14
- package/components/datatable/ts/reorder.ts +4 -2
- package/components/dropdown/index.tsx +48 -22
- package/components/dropdown/mobile/legacy_fdd.ts +10 -11
- package/components/dropzone/gallery-dropzone.tsx +394 -382
- package/components/fullcalendar/fullcalendar-draggable-event.tsx +8 -7
- package/components/fullcalendar/timegrid-calendar.tsx +60 -67
- package/components/image-crop/image-cropping-modal.tsx +9 -8
- package/components/image-crop/upload-and-crop.tsx +162 -162
- package/components/image-crop/vendor/jquery.Jcrop.min.css +344 -344
- package/components/import/import-mapper.tsx +2 -2
- package/components/input/daterange-picker.tsx +502 -521
- package/components/input/datetime-picker.tsx +45 -50
- package/components/input/plugins/daterangepicker/daterangepicker.min.css +400 -400
- package/components/input/plugins/daterangepicker/jquery.daterangepicker.min.js +346 -339
- package/components/input/plugins/daterangepicker/jquery.daterangepicker.ts +580 -402
- package/components/input/radio-button-group.tsx +2 -2
- package/components/input/ts/dateInputHelper.ts +1 -0
- package/components/input/wysiwig.tsx +12 -7
- package/components/svg/skilift-svg.tsx +6 -6
- package/package.json +2 -1
- package/common/date-wrapper.ts +0 -422
- package/common/utils/array-extend.ts +0 -215
- package/common/utils/array-remove.ts +0 -10
- package/common/utils/array-sort.ts +0 -56
- package/common/utils/capitalize-string.ts +0 -11
- package/common/utils/format-string.ts +0 -14
- package/common/utils/latinize-string.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dateNow, getTime } from '../../../../common/temporal-helpers';
|
|
1
2
|
/* Flot plugin for automatically redrawing plots as the placeholder resizes.
|
|
2
3
|
|
|
3
4
|
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
|
@@ -137,17 +138,14 @@ can just fix the size of their placeholders.
|
|
|
137
138
|
}
|
|
138
139
|
if (!e.requestAnimationFrame) {
|
|
139
140
|
e.requestAnimationFrame = (function () {
|
|
140
|
-
return (
|
|
141
|
-
e.webkitRequestAnimationFrame
|
|
141
|
+
return (e.webkitRequestAnimationFrame
|
|
142
142
|
|| e.mozRequestAnimationFrame
|
|
143
143
|
|| e.oRequestAnimationFrame
|
|
144
|
-
|| e.msRequestAnimationFrame
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
);
|
|
144
|
+
|| e.msRequestAnimationFrame || function (t, i) {
|
|
145
|
+
return e.setTimeout(() => {
|
|
146
|
+
t(getTime(dateNow()));
|
|
147
|
+
}, n[l]);
|
|
148
|
+
});
|
|
151
149
|
})();
|
|
152
150
|
}
|
|
153
151
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dateNow, getTime } from '../../../../common/temporal-helpers';
|
|
1
2
|
/* Javascript plotting library for jQuery, version 0.8.3.
|
|
2
3
|
|
|
3
4
|
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
|
@@ -105,17 +106,14 @@ Licensed under the MIT license.
|
|
|
105
106
|
}
|
|
106
107
|
if (!e.requestAnimationFrame) {
|
|
107
108
|
e.requestAnimationFrame = (function () {
|
|
108
|
-
return (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
e.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, n[l]);
|
|
117
|
-
}
|
|
118
|
-
);
|
|
109
|
+
return (e.webkitRequestAnimationFrame ||
|
|
110
|
+
e.mozRequestAnimationFrame ||
|
|
111
|
+
e.oRequestAnimationFrame ||
|
|
112
|
+
e.msRequestAnimationFrame || function (t, i) {
|
|
113
|
+
return e.setTimeout(function () {
|
|
114
|
+
t(getTime(dateNow()));
|
|
115
|
+
}, n[l]);
|
|
116
|
+
});
|
|
119
117
|
})();
|
|
120
118
|
}
|
|
121
119
|
if (!e.cancelAnimationFrame) {
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
/* Javascript plotting library for jQuery, version 0.8.3.
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
|
4
|
-
Licensed under the MIT license.
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
(function ($) {
|
|
8
|
-
var options = { series: { stack: null } };
|
|
9
|
-
function init(plot) {
|
|
10
|
-
function findMatchingSeries(s, allseries) {
|
|
11
|
-
var res = null;
|
|
12
|
-
for (var i = 0; i < allseries.length; ++i) {
|
|
13
|
-
if (s == allseries[i]) break;
|
|
14
|
-
if (allseries[i].stack == s.stack) res = allseries[i];
|
|
15
|
-
}
|
|
16
|
-
return res;
|
|
17
|
-
}
|
|
18
|
-
function stackData(plot, s, datapoints) {
|
|
19
|
-
if (s.stack == null || s.stack === false) return;
|
|
20
|
-
var other = findMatchingSeries(s, plot.getData());
|
|
21
|
-
if (!other) return;
|
|
22
|
-
var ps = datapoints.pointsize,
|
|
23
|
-
points = datapoints.points,
|
|
24
|
-
otherps = other.datapoints.pointsize,
|
|
25
|
-
otherpoints = other.datapoints.points,
|
|
26
|
-
newpoints = [],
|
|
27
|
-
px,
|
|
28
|
-
py,
|
|
29
|
-
intery,
|
|
30
|
-
qx,
|
|
31
|
-
qy,
|
|
32
|
-
bottom,
|
|
33
|
-
withlines = s.lines.show,
|
|
34
|
-
horizontal = s.bars.horizontal,
|
|
35
|
-
withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
|
|
36
|
-
withsteps = withlines && s.lines.steps,
|
|
37
|
-
fromgap = true,
|
|
38
|
-
keyOffset = horizontal ? 1 : 0,
|
|
39
|
-
accumulateOffset = horizontal ? 0 : 1,
|
|
40
|
-
i = 0,
|
|
41
|
-
j = 0,
|
|
42
|
-
l,
|
|
43
|
-
m;
|
|
44
|
-
while (true) {
|
|
45
|
-
if (i >= points.length) break;
|
|
46
|
-
l = newpoints.length;
|
|
47
|
-
if (points[i] == null) {
|
|
48
|
-
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
49
|
-
i += ps;
|
|
50
|
-
} else if (j >= otherpoints.length) {
|
|
51
|
-
if (!withlines) {
|
|
52
|
-
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
53
|
-
}
|
|
54
|
-
i += ps;
|
|
55
|
-
} else if (otherpoints[j] == null) {
|
|
56
|
-
for (m = 0; m < ps; ++m) newpoints.push(null);
|
|
57
|
-
fromgap = true;
|
|
58
|
-
j += otherps;
|
|
59
|
-
} else {
|
|
60
|
-
px = points[i + keyOffset];
|
|
61
|
-
py = points[i + accumulateOffset];
|
|
62
|
-
qx = otherpoints[j + keyOffset];
|
|
63
|
-
qy = otherpoints[j + accumulateOffset];
|
|
64
|
-
bottom = 0;
|
|
65
|
-
if (px == qx) {
|
|
66
|
-
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
67
|
-
newpoints[l + accumulateOffset] += qy;
|
|
68
|
-
bottom = qy;
|
|
69
|
-
i += ps;
|
|
70
|
-
j += otherps;
|
|
71
|
-
} else if (px > qx) {
|
|
72
|
-
if (withlines && i > 0 && points[i - ps] != null) {
|
|
73
|
-
intery = py + ((points[i - ps + accumulateOffset] - py) * (qx - px)) / (points[i - ps + keyOffset] - px);
|
|
74
|
-
newpoints.push(qx);
|
|
75
|
-
newpoints.push(intery + qy);
|
|
76
|
-
for (m = 2; m < ps; ++m) newpoints.push(points[i + m]);
|
|
77
|
-
bottom = qy;
|
|
78
|
-
}
|
|
79
|
-
j += otherps;
|
|
80
|
-
} else {
|
|
81
|
-
if (fromgap && withlines) {
|
|
82
|
-
i += ps;
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
86
|
-
if (withlines && j > 0 && otherpoints[j - otherps] != null)
|
|
87
|
-
bottom = qy + ((otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx)) / (otherpoints[j - otherps + keyOffset] - qx);
|
|
88
|
-
newpoints[l + accumulateOffset] += bottom;
|
|
89
|
-
i += ps;
|
|
90
|
-
}
|
|
91
|
-
fromgap = false;
|
|
92
|
-
if (l != newpoints.length && withbottom) newpoints[l + 2] += bottom;
|
|
93
|
-
}
|
|
94
|
-
if (withsteps && l != newpoints.length && l > 0 && newpoints[l] != null && newpoints[l] != newpoints[l - ps] && newpoints[l + 1] != newpoints[l - ps + 1]) {
|
|
95
|
-
for (m = 0; m < ps; ++m) newpoints[l + ps + m] = newpoints[l + m];
|
|
96
|
-
newpoints[l + 1] = newpoints[l - ps + 1];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
datapoints.points = newpoints;
|
|
100
|
-
}
|
|
101
|
-
plot.hooks.processDatapoints.push(stackData);
|
|
102
|
-
}
|
|
103
|
-
$.plot.plugins.push({ init: init, options: options, name: "stack", version: "1.2" });
|
|
104
|
-
})(jQuery);
|
|
1
|
+
/* Javascript plotting library for jQuery, version 0.8.3.
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
|
4
|
+
Licensed under the MIT license.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
(function ($) {
|
|
8
|
+
var options = { series: { stack: null } };
|
|
9
|
+
function init(plot) {
|
|
10
|
+
function findMatchingSeries(s, allseries) {
|
|
11
|
+
var res = null;
|
|
12
|
+
for (var i = 0; i < allseries.length; ++i) {
|
|
13
|
+
if (s == allseries[i]) break;
|
|
14
|
+
if (allseries[i].stack == s.stack) res = allseries[i];
|
|
15
|
+
}
|
|
16
|
+
return res;
|
|
17
|
+
}
|
|
18
|
+
function stackData(plot, s, datapoints) {
|
|
19
|
+
if (s.stack == null || s.stack === false) return;
|
|
20
|
+
var other = findMatchingSeries(s, plot.getData());
|
|
21
|
+
if (!other) return;
|
|
22
|
+
var ps = datapoints.pointsize,
|
|
23
|
+
points = datapoints.points,
|
|
24
|
+
otherps = other.datapoints.pointsize,
|
|
25
|
+
otherpoints = other.datapoints.points,
|
|
26
|
+
newpoints = [],
|
|
27
|
+
px,
|
|
28
|
+
py,
|
|
29
|
+
intery,
|
|
30
|
+
qx,
|
|
31
|
+
qy,
|
|
32
|
+
bottom,
|
|
33
|
+
withlines = s.lines.show,
|
|
34
|
+
horizontal = s.bars.horizontal,
|
|
35
|
+
withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
|
|
36
|
+
withsteps = withlines && s.lines.steps,
|
|
37
|
+
fromgap = true,
|
|
38
|
+
keyOffset = horizontal ? 1 : 0,
|
|
39
|
+
accumulateOffset = horizontal ? 0 : 1,
|
|
40
|
+
i = 0,
|
|
41
|
+
j = 0,
|
|
42
|
+
l,
|
|
43
|
+
m;
|
|
44
|
+
while (true) {
|
|
45
|
+
if (i >= points.length) break;
|
|
46
|
+
l = newpoints.length;
|
|
47
|
+
if (points[i] == null) {
|
|
48
|
+
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
49
|
+
i += ps;
|
|
50
|
+
} else if (j >= otherpoints.length) {
|
|
51
|
+
if (!withlines) {
|
|
52
|
+
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
53
|
+
}
|
|
54
|
+
i += ps;
|
|
55
|
+
} else if (otherpoints[j] == null) {
|
|
56
|
+
for (m = 0; m < ps; ++m) newpoints.push(null);
|
|
57
|
+
fromgap = true;
|
|
58
|
+
j += otherps;
|
|
59
|
+
} else {
|
|
60
|
+
px = points[i + keyOffset];
|
|
61
|
+
py = points[i + accumulateOffset];
|
|
62
|
+
qx = otherpoints[j + keyOffset];
|
|
63
|
+
qy = otherpoints[j + accumulateOffset];
|
|
64
|
+
bottom = 0;
|
|
65
|
+
if (px == qx) {
|
|
66
|
+
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
67
|
+
newpoints[l + accumulateOffset] += qy;
|
|
68
|
+
bottom = qy;
|
|
69
|
+
i += ps;
|
|
70
|
+
j += otherps;
|
|
71
|
+
} else if (px > qx) {
|
|
72
|
+
if (withlines && i > 0 && points[i - ps] != null) {
|
|
73
|
+
intery = py + ((points[i - ps + accumulateOffset] - py) * (qx - px)) / (points[i - ps + keyOffset] - px);
|
|
74
|
+
newpoints.push(qx);
|
|
75
|
+
newpoints.push(intery + qy);
|
|
76
|
+
for (m = 2; m < ps; ++m) newpoints.push(points[i + m]);
|
|
77
|
+
bottom = qy;
|
|
78
|
+
}
|
|
79
|
+
j += otherps;
|
|
80
|
+
} else {
|
|
81
|
+
if (fromgap && withlines) {
|
|
82
|
+
i += ps;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
|
86
|
+
if (withlines && j > 0 && otherpoints[j - otherps] != null)
|
|
87
|
+
bottom = qy + ((otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx)) / (otherpoints[j - otherps + keyOffset] - qx);
|
|
88
|
+
newpoints[l + accumulateOffset] += bottom;
|
|
89
|
+
i += ps;
|
|
90
|
+
}
|
|
91
|
+
fromgap = false;
|
|
92
|
+
if (l != newpoints.length && withbottom) newpoints[l + 2] += bottom;
|
|
93
|
+
}
|
|
94
|
+
if (withsteps && l != newpoints.length && l > 0 && newpoints[l] != null && newpoints[l] != newpoints[l - ps] && newpoints[l + 1] != newpoints[l - ps + 1]) {
|
|
95
|
+
for (m = 0; m < ps; ++m) newpoints[l + ps + m] = newpoints[l + m];
|
|
96
|
+
newpoints[l + 1] = newpoints[l - ps + 1];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
datapoints.points = newpoints;
|
|
100
|
+
}
|
|
101
|
+
plot.hooks.processDatapoints.push(stackData);
|
|
102
|
+
}
|
|
103
|
+
$.plot.plugins.push({ init: init, options: options, name: "stack", version: "1.2" });
|
|
104
|
+
})(jQuery);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Temporal } from '@js-temporal/polyfill';
|
|
2
2
|
|
|
3
3
|
export interface LineChartTicksX {
|
|
4
4
|
maxTicksLimit: number;
|
|
@@ -17,7 +17,7 @@ export interface LineChartDataSet {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface LineChartDataItem {
|
|
20
|
-
caption:
|
|
20
|
+
caption: Temporal.PlainDateTime | string;
|
|
21
21
|
value: number;
|
|
22
22
|
uuid?: string;
|
|
23
23
|
tooltipSuffix?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { remove } from '../../../common/extensions/array-extensions';
|
|
2
2
|
|
|
3
3
|
if ((window as any).__powerduckBreakpointHandler == null) {
|
|
4
4
|
(window as any).__powerduckBreakpointHandler = {
|
|
@@ -18,7 +18,7 @@ export class BreakpointHandler {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
static removeResizeHandler(handler: () => any) {
|
|
21
|
-
|
|
21
|
+
(BreakpointHandler.handlers as any[])[remove](handler);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
static bindResizeHandler() {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
/* eslint-disable ts/no-use-before-define */
|
|
2
|
+
/* eslint-disable no-alert */
|
|
1
3
|
import type { BreadcrumbItem } from '../app/breadcrumb';
|
|
2
4
|
|
|
3
5
|
import type { AppMenuItem } from '../app/menu';
|
|
6
|
+
|
|
4
7
|
import type { CardHeaderDropdownArgs } from '../card/card-header-with-options';
|
|
5
8
|
import type { DropdownListOption } from '../dropdown';
|
|
9
|
+
import type { ImageDropdownDataItem } from '../dropdown/image-dropdown';
|
|
6
10
|
import type { TimegridCalendarAddClickedArgs, TimegridCalendarEvent } from '../fullcalendar/timegrid-calendar';
|
|
11
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
7
12
|
import { Prop, toNative } from 'vue-facing-decorator';
|
|
8
13
|
import TsxComponent, { Component } from '../../app/vuetsx';
|
|
9
14
|
import { PowerduckViewModelBase } from '../../common/base-component';
|
|
10
|
-
import { DateWrapper } from '../../common/date-wrapper';
|
|
11
15
|
import Accordion from '../accordion/accordion';
|
|
12
16
|
import { AccordionPage } from '../accordion/accordion-page';
|
|
13
17
|
import BootstrapToggle, { BootstrapToggleSize } from '../bootstrap-toggle';
|
|
@@ -23,6 +27,8 @@ import DropdownList, { MultiselectMode } from '../dropdown';
|
|
|
23
27
|
import DropdownButton from '../dropdown-button/dropdown-button';
|
|
24
28
|
import DropdownButtonItem from '../dropdown-button/dropdown-button-item';
|
|
25
29
|
import DropdownButtonSeparator from '../dropdown-button/dropdown-button-separator';
|
|
30
|
+
import CountryDropdown from '../dropdown/country-dropdown';
|
|
31
|
+
import ImageDropdown from '../dropdown/image-dropdown';
|
|
26
32
|
import Fieldset from '../form/fieldset';
|
|
27
33
|
import FlexContainer from '../form/flex-container';
|
|
28
34
|
import FooterButtons from '../form/footer-buttons';
|
|
@@ -44,8 +50,6 @@ import ModalSectionWrapper from '../modal-wrap/modal-section-wrapper';
|
|
|
44
50
|
import Modal, { ModalSize } from '../modal/modal';
|
|
45
51
|
import ModalBody from '../modal/modal-body';
|
|
46
52
|
import ModalFooter from '../modal/modal-footer';
|
|
47
|
-
import CountryDropdown from '../dropdown/country-dropdown';
|
|
48
|
-
import ImageDropdown, { ImageDropdownDataItem } from '../dropdown/image-dropdown';
|
|
49
53
|
|
|
50
54
|
interface TagItem {
|
|
51
55
|
id: string;
|
|
@@ -66,6 +70,8 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
66
70
|
selectedTagIds: string[] = [];
|
|
67
71
|
count: number = 0;
|
|
68
72
|
selectedImageDropdownItems: ImageDropdownDataItem[] = null;
|
|
73
|
+
date: Temporal.PlainDateTime = Temporal.PlainDateTime.from('2026-04-04');
|
|
74
|
+
dateRange: any = null;
|
|
69
75
|
|
|
70
76
|
protected get breadcrumbItems(): BreadcrumbItem[] {
|
|
71
77
|
return [
|
|
@@ -115,19 +121,8 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
addTimeEvent(e: TimegridCalendarAddClickedArgs) {
|
|
118
|
-
const startTime =
|
|
119
|
-
startTime.
|
|
120
|
-
startTime.setMonth(e.defaultDate.getMonth());
|
|
121
|
-
startTime.setFullYear(e.defaultDate.getFullYear());
|
|
122
|
-
startTime.setHours(e.defaultDate.getHours());
|
|
123
|
-
startTime.setMinutes(e.defaultDate.getMinutes());
|
|
124
|
-
|
|
125
|
-
const endTime = DateWrapper.getCurrent();
|
|
126
|
-
endTime.setDate(e.defaultDate.getDate());
|
|
127
|
-
endTime.setMonth(e.defaultDate.getMonth());
|
|
128
|
-
endTime.setFullYear(e.defaultDate.getFullYear());
|
|
129
|
-
endTime.setHours(e.defaultDate.getHours() + 1);
|
|
130
|
-
endTime.setMinutes(e.defaultDate.getMinutes());
|
|
124
|
+
const startTime = e.defaultDate;
|
|
125
|
+
const endTime = startTime.add({ hours: 1 });
|
|
131
126
|
|
|
132
127
|
this.timeEvents.push({
|
|
133
128
|
id: `idd${Math.random() * (999999999 - 1)}${1}`,
|
|
@@ -142,8 +137,8 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
142
137
|
getImageDropdownSource(): ImageDropdownDataItem[] {
|
|
143
138
|
return [
|
|
144
139
|
{ id: 1, text: 'Kazuyoshi Funaki', subtitle: 'Nagano 98', imageUrl: 'https://upload.wikimedia.org/wikipedia/commons/6/69/Kazuyoshi_Funaki_%28JAP%29_2014.jpg' },
|
|
145
|
-
{ id: 2, text: 'Masahiko Harada', subtitle: 'Nagano 98', imageUrl: 'https://img.olympics.com/images/image/private/t_1-1_300/f_auto/primary/kvwgfkitbetfq96l0jcd' }
|
|
146
|
-
]
|
|
140
|
+
{ id: 2, text: 'Masahiko Harada', subtitle: 'Nagano 98', imageUrl: 'https://img.olympics.com/images/image/private/t_1-1_300/f_auto/primary/kvwgfkitbetfq96l0jcd' },
|
|
141
|
+
];
|
|
147
142
|
}
|
|
148
143
|
|
|
149
144
|
getTagDropdown(): typeof DropdownList.prototype {
|
|
@@ -218,8 +213,20 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
218
213
|
this.color = e;
|
|
219
214
|
}}
|
|
220
215
|
/>
|
|
221
|
-
<DaterangePicker
|
|
222
|
-
|
|
216
|
+
<DaterangePicker
|
|
217
|
+
label="Range picker"
|
|
218
|
+
autoClose={true}
|
|
219
|
+
value={this.dateRange}
|
|
220
|
+
changed={(e) => {
|
|
221
|
+
this.dateRange = e
|
|
222
|
+
}}
|
|
223
|
+
/>
|
|
224
|
+
<DatetimePicker label="Pick a date"
|
|
225
|
+
value={this.date}
|
|
226
|
+
showTime={true}
|
|
227
|
+
changed={(e) => {
|
|
228
|
+
this.date = e;
|
|
229
|
+
}} />
|
|
223
230
|
<NumericInput
|
|
224
231
|
label="Spinner number input"
|
|
225
232
|
value={this.numberVal}
|
|
@@ -397,11 +404,19 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
397
404
|
label="Custom override"
|
|
398
405
|
multiselect={true}
|
|
399
406
|
multiselectMode={MultiselectMode.Checkboxes}
|
|
400
|
-
customRenderOption={(
|
|
401
|
-
|
|
407
|
+
customRenderOption={(
|
|
408
|
+
h,
|
|
409
|
+
item,
|
|
410
|
+
originator,
|
|
411
|
+
) => {
|
|
412
|
+
return (<CustomDropdownItem text={item.text} />);
|
|
402
413
|
}}
|
|
403
|
-
customRenderSelectionResult={(
|
|
404
|
-
|
|
414
|
+
customRenderSelectionResult={(
|
|
415
|
+
h,
|
|
416
|
+
item,
|
|
417
|
+
originator,
|
|
418
|
+
) => {
|
|
419
|
+
return (<CustomDropdownItem text={item.text} />);
|
|
405
420
|
}}
|
|
406
421
|
changed={(v) => {
|
|
407
422
|
this.selectedOptions = v.id;
|
|
@@ -409,19 +424,20 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
409
424
|
/>
|
|
410
425
|
|
|
411
426
|
<CountryDropdown
|
|
412
|
-
label=
|
|
427
|
+
label="krajina"
|
|
413
428
|
/>
|
|
414
429
|
|
|
415
430
|
<ImageDropdown
|
|
416
431
|
options={this.getImageDropdownSource()}
|
|
417
432
|
buttons={[
|
|
418
433
|
{
|
|
419
|
-
iconCss: 'icon icon-pencil',
|
|
434
|
+
iconCss: 'icon icon-pencil',
|
|
435
|
+
clicked: (e) => {
|
|
420
436
|
console.log('it was clicked');
|
|
421
|
-
}
|
|
422
|
-
}
|
|
437
|
+
},
|
|
438
|
+
},
|
|
423
439
|
]}
|
|
424
|
-
label=
|
|
440
|
+
label="Osoby"
|
|
425
441
|
selected={this.selectedImageDropdownItems}
|
|
426
442
|
tagsAdded={(e) => {
|
|
427
443
|
console.log(JSON.stringify(e));
|
|
@@ -536,51 +552,41 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
536
552
|
<FullCalendarDraggableEvent
|
|
537
553
|
title="Event druhaov"
|
|
538
554
|
dataRow={{ druha: 'jedna' }}
|
|
539
|
-
startDate={
|
|
540
|
-
1900,
|
|
541
|
-
1,
|
|
542
|
-
1,
|
|
543
|
-
10,
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
10,
|
|
553
|
-
45,
|
|
554
|
-
0,
|
|
555
|
-
0,
|
|
556
|
-
)}
|
|
555
|
+
startDate={Temporal.PlainDateTime.from({
|
|
556
|
+
year: 1900,
|
|
557
|
+
month: 1,
|
|
558
|
+
day: 1,
|
|
559
|
+
hour: 10,
|
|
560
|
+
})}
|
|
561
|
+
endDate={Temporal.PlainDateTime.from({
|
|
562
|
+
year: 1900,
|
|
563
|
+
month: 1,
|
|
564
|
+
day: 1,
|
|
565
|
+
hour: 10,
|
|
566
|
+
minute: 45,
|
|
567
|
+
})}
|
|
557
568
|
/>
|
|
558
569
|
<FullCalendarDraggableEvent
|
|
559
570
|
title="Ej bardzo dva"
|
|
560
571
|
dataRow={{ druha: 'kurva' }}
|
|
561
|
-
startDate={
|
|
562
|
-
1900,
|
|
563
|
-
1,
|
|
564
|
-
1,
|
|
565
|
-
10,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
11,
|
|
575
|
-
30,
|
|
576
|
-
0,
|
|
577
|
-
0,
|
|
578
|
-
)}
|
|
572
|
+
startDate={Temporal.PlainDateTime.from({
|
|
573
|
+
year: 1900,
|
|
574
|
+
month: 1,
|
|
575
|
+
day: 1,
|
|
576
|
+
hour: 10,
|
|
577
|
+
})}
|
|
578
|
+
endDate={Temporal.PlainDateTime.from({
|
|
579
|
+
year: 1900,
|
|
580
|
+
month: 1,
|
|
581
|
+
day: 1,
|
|
582
|
+
hour: 10,
|
|
583
|
+
minute: 45,
|
|
584
|
+
})}
|
|
579
585
|
/>
|
|
580
586
|
</div>
|
|
581
587
|
{/* <TimegridCalendar
|
|
582
|
-
minDate={
|
|
583
|
-
maxDate={
|
|
588
|
+
minDate={createDateUniversal(2020, 2, 3)}
|
|
589
|
+
maxDate={createDateUniversal(2020, 2, 7, 10, 0, 0)}
|
|
584
590
|
viewType={this.timeViewType as any}
|
|
585
591
|
resources={[
|
|
586
592
|
{ id: "a", title: "Room a", building: "druha", dataRow: {} },
|
|
@@ -620,25 +626,33 @@ class TestAllComponentsPageComponent extends PowerduckViewModelBase {
|
|
|
620
626
|
}
|
|
621
627
|
|
|
622
628
|
interface FormArgs {
|
|
623
|
-
text: string
|
|
629
|
+
text: string;
|
|
624
630
|
}
|
|
625
631
|
|
|
626
632
|
@Component
|
|
627
633
|
class CustomDropdownItemComponent extends TsxComponent<FormArgs> implements FormArgs {
|
|
628
634
|
count: number = 0;
|
|
629
|
-
@Prop() text: string
|
|
635
|
+
@Prop() text: string;
|
|
630
636
|
|
|
631
637
|
render(h) {
|
|
632
|
-
return (
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
638
|
+
return (
|
|
639
|
+
<div>
|
|
640
|
+
<div onClick={(e) => {
|
|
641
|
+
// alert('wtf?');
|
|
642
|
+
this.count += 1;
|
|
643
|
+
}}
|
|
644
|
+
>
|
|
645
|
+
{this.text}
|
|
646
|
+
{' '}
|
|
647
|
+
dpc count
|
|
648
|
+
{this.count}
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
);
|
|
636
652
|
}
|
|
637
653
|
}
|
|
638
654
|
|
|
639
655
|
const CustomDropdownItem = toNative(CustomDropdownItemComponent);
|
|
640
656
|
|
|
641
|
-
|
|
642
|
-
|
|
643
657
|
const TestAllComponentsPage = toNative(TestAllComponentsPageComponent);
|
|
644
658
|
export default TestAllComponentsPage;
|