nxt-pick-datetime 10.0.0 → 13.0.0
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/{esm2015/lib/class/date-time-adapter.class.js → esm2020/lib/class/date-time-adapter.class.mjs} +0 -0
- package/{esm2015/lib/class/date-time-format.class.js → esm2020/lib/class/date-time-format.class.mjs} +1 -1
- package/esm2020/lib/class/date-time.class.mjs +161 -0
- package/{esm2015/lib/class/dialog-config.class.js → esm2020/lib/class/dialog-config.class.mjs} +0 -0
- package/esm2020/lib/class/dialog-ref.class.mjs +121 -0
- package/esm2020/lib/date-time/calendar/calendar.component.mjs +345 -0
- package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +145 -0
- package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +438 -0
- package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +359 -0
- package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +369 -0
- package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +264 -0
- package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +529 -0
- package/{esm2015/lib/date-time/date-time-picker-container/date-time-picker-container.animations.js → esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs} +1 -1
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +390 -0
- package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +624 -0
- package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +61 -0
- package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +68 -0
- package/esm2020/lib/date-time/date-time.module.mjs +88 -0
- package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +25 -0
- package/esm2020/lib/date-time/timer/timer.component.mjs +292 -0
- package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +88 -0
- package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +243 -0
- package/esm2020/lib/dialog/dialog.module.mjs +34 -0
- package/esm2020/lib/dialog/dialog.service.mjs +240 -0
- package/{esm2015/lib/utils/object.js → esm2020/lib/utils/object.mjs} +0 -0
- package/esm2020/moment-adapter/date-time-adapter.class.mjs +215 -0
- package/{esm2015/moment-adapter/date-time-format.class.js → esm2020/moment-adapter/date-time-format.class.mjs} +0 -0
- package/esm2020/moment-adapter/moment-adapter.module.mjs +41 -0
- package/esm2020/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +5 -0
- package/{esm2015/moment-adapter/public-api.js → esm2020/moment-adapter/public-api.mjs} +0 -0
- package/esm2020/native-adapter/date-time-adapter.class.mjs +344 -0
- package/{esm2015/native-adapter/date-time-format.class.js → esm2020/native-adapter/date-time-format.class.mjs} +0 -0
- package/esm2020/native-adapter/native-adapter.module.mjs +35 -0
- package/esm2020/native-adapter/nxt-pick-datetime-native-adapter.mjs +5 -0
- package/{esm2015/native-adapter/public-api.js → esm2020/native-adapter/public-api.mjs} +0 -0
- package/esm2020/nxt-pick-datetime.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +269 -0
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +1 -0
- package/fesm2015/{nxt-pick-datetime-native-adapter.js → nxt-pick-datetime-native-adapter.mjs} +41 -27
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +1 -0
- package/fesm2015/nxt-pick-datetime.mjs +4974 -0
- package/fesm2015/nxt-pick-datetime.mjs.map +1 -0
- package/{fesm2015/nxt-pick-datetime-moment-adapter.js → fesm2020/nxt-pick-datetime-moment-adapter.mjs} +48 -27
- package/fesm2020/nxt-pick-datetime-moment-adapter.mjs.map +1 -0
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs +390 -0
- package/fesm2020/nxt-pick-datetime-native-adapter.mjs.map +1 -0
- package/{fesm2015/nxt-pick-datetime.js → fesm2020/nxt-pick-datetime.mjs} +2207 -1967
- package/fesm2020/nxt-pick-datetime.mjs.map +1 -0
- package/lib/class/date-time.class.d.ts +3 -0
- package/lib/class/dialog-ref.class.d.ts +2 -0
- package/lib/date-time/calendar/calendar.component.d.ts +3 -0
- package/lib/date-time/calendar-body/calendar-body.component.d.ts +3 -0
- package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +3 -0
- package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +3 -0
- package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +3 -0
- package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +3 -0
- package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +3 -0
- package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +3 -0
- package/lib/date-time/date-time-picker-input.directive.d.ts +3 -0
- package/lib/date-time/date-time-picker-intl.service.d.ts +3 -0
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +3 -0
- package/lib/date-time/date-time.module.d.ts +21 -0
- package/lib/date-time/number-fixed-len.pipe.d.ts +3 -0
- package/lib/date-time/timer/timer.component.d.ts +3 -0
- package/lib/date-time/timer-box/timer-box.component.d.ts +3 -0
- package/lib/dialog/dialog-container/dialog-container.component.d.ts +5 -2
- package/lib/dialog/dialog.module.d.ts +9 -0
- package/lib/dialog/dialog.service.d.ts +6 -2
- package/moment-adapter/date-time-adapter.class.d.ts +3 -0
- package/moment-adapter/moment-adapter.module.d.ts +7 -0
- package/moment-adapter/nxt-pick-datetime-moment-adapter.d.ts +1 -3
- package/moment-adapter/package.json +6 -7
- package/native-adapter/date-time-adapter.class.d.ts +3 -0
- package/native-adapter/native-adapter.module.d.ts +8 -0
- package/native-adapter/nxt-pick-datetime-native-adapter.d.ts +1 -3
- package/native-adapter/package.json +6 -7
- package/nxt-pick-datetime.d.ts +1 -14
- package/package.json +48 -13
- package/bundles/nxt-pick-datetime-moment-adapter.umd.js +0 -577
- package/bundles/nxt-pick-datetime-moment-adapter.umd.js.map +0 -1
- package/bundles/nxt-pick-datetime-moment-adapter.umd.min.js +0 -17
- package/bundles/nxt-pick-datetime-moment-adapter.umd.min.js.map +0 -1
- package/bundles/nxt-pick-datetime-native-adapter.umd.js +0 -706
- package/bundles/nxt-pick-datetime-native-adapter.umd.js.map +0 -1
- package/bundles/nxt-pick-datetime-native-adapter.umd.min.js +0 -16
- package/bundles/nxt-pick-datetime-native-adapter.umd.min.js.map +0 -1
- package/bundles/nxt-pick-datetime.umd.js +0 -5809
- package/bundles/nxt-pick-datetime.umd.js.map +0 -1
- package/bundles/nxt-pick-datetime.umd.min.js +0 -17
- package/bundles/nxt-pick-datetime.umd.min.js.map +0 -1
- package/esm2015/lib/class/date-time.class.js +0 -151
- package/esm2015/lib/class/dialog-ref.class.js +0 -113
- package/esm2015/lib/date-time/calendar/calendar.component.js +0 -331
- package/esm2015/lib/date-time/calendar-body/calendar-body.component.js +0 -144
- package/esm2015/lib/date-time/calendar-month-view/calendar-month-view.component.js +0 -425
- package/esm2015/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.js +0 -347
- package/esm2015/lib/date-time/calendar-year-view/calendar-year-view.component.js +0 -356
- package/esm2015/lib/date-time/date-time-inline/date-time-inline.component.js +0 -246
- package/esm2015/lib/date-time/date-time-picker/date-time-picker.component.js +0 -511
- package/esm2015/lib/date-time/date-time-picker-container/date-time-picker-container.component.js +0 -373
- package/esm2015/lib/date-time/date-time-picker-input.directive.js +0 -592
- package/esm2015/lib/date-time/date-time-picker-intl.service.js +0 -59
- package/esm2015/lib/date-time/date-time-picker-trigger.directive.js +0 -63
- package/esm2015/lib/date-time/date-time.module.js +0 -60
- package/esm2015/lib/date-time/number-fixed-len.pipe.js +0 -21
- package/esm2015/lib/date-time/timer/timer.component.js +0 -287
- package/esm2015/lib/date-time/timer-box/timer-box.component.js +0 -77
- package/esm2015/lib/dialog/dialog-container/dialog-container.component.js +0 -202
- package/esm2015/lib/dialog/dialog.module.js +0 -26
- package/esm2015/lib/dialog/dialog.service.js +0 -225
- package/esm2015/moment-adapter/date-time-adapter.class.js +0 -206
- package/esm2015/moment-adapter/moment-adapter.module.js +0 -28
- package/esm2015/moment-adapter/nxt-pick-datetime-moment-adapter.js +0 -8
- package/esm2015/native-adapter/date-time-adapter.class.js +0 -342
- package/esm2015/native-adapter/native-adapter.module.js +0 -26
- package/esm2015/native-adapter/nxt-pick-datetime-native-adapter.js +0 -8
- package/esm2015/nxt-pick-datetime.js +0 -19
- package/fesm2015/nxt-pick-datetime-moment-adapter.js.map +0 -1
- package/fesm2015/nxt-pick-datetime-native-adapter.js.map +0 -1
- package/fesm2015/nxt-pick-datetime.js.map +0 -1
- package/moment-adapter/nxt-pick-datetime-moment-adapter.metadata.json +0 -1
- package/native-adapter/nxt-pick-datetime-native-adapter.metadata.json +0 -1
- package/nxt-pick-datetime.metadata.json +0 -1
|
@@ -1,706 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/core'), require('nxt-pick-datetime')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('nxt-pick-datetime/native-adapter', ['exports', '@angular/cdk/platform', '@angular/core', 'nxt-pick-datetime'], factory) :
|
|
4
|
-
(global = global || self, factory((global['nxt-pick-datetime'] = global['nxt-pick-datetime'] || {}, global['nxt-pick-datetime']['native-adapter'] = {}), global.ng.cdk.platform, global.ng.core, global['nxt-pick-datetime']));
|
|
5
|
-
}(this, (function (exports, platform, core, nxtPickDatetime) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
var extendStatics = function (d, b) {
|
|
23
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
25
|
-
function (d, b) { for (var p in b)
|
|
26
|
-
if (b.hasOwnProperty(p))
|
|
27
|
-
d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
extendStatics(d, b);
|
|
32
|
-
function __() { this.constructor = d; }
|
|
33
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
-
}
|
|
35
|
-
var __assign = function () {
|
|
36
|
-
__assign = Object.assign || function __assign(t) {
|
|
37
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
38
|
-
s = arguments[i];
|
|
39
|
-
for (var p in s)
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
41
|
-
t[p] = s[p];
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
};
|
|
45
|
-
return __assign.apply(this, arguments);
|
|
46
|
-
};
|
|
47
|
-
function __rest(s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s)
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
function __decorate(decorators, target, key, desc) {
|
|
60
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
62
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
63
|
-
else
|
|
64
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
65
|
-
if (d = decorators[i])
|
|
66
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
|
-
}
|
|
69
|
-
function __param(paramIndex, decorator) {
|
|
70
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
71
|
-
}
|
|
72
|
-
function __metadata(metadataKey, metadataValue) {
|
|
73
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
74
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
75
|
-
}
|
|
76
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
77
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
78
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
79
|
-
function fulfilled(value) { try {
|
|
80
|
-
step(generator.next(value));
|
|
81
|
-
}
|
|
82
|
-
catch (e) {
|
|
83
|
-
reject(e);
|
|
84
|
-
} }
|
|
85
|
-
function rejected(value) { try {
|
|
86
|
-
step(generator["throw"](value));
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
reject(e);
|
|
90
|
-
} }
|
|
91
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
92
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function __generator(thisArg, body) {
|
|
96
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
97
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
98
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
99
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
100
|
-
function step(op) {
|
|
101
|
-
if (f)
|
|
102
|
-
throw new TypeError("Generator is already executing.");
|
|
103
|
-
while (_)
|
|
104
|
-
try {
|
|
105
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
106
|
-
return t;
|
|
107
|
-
if (y = 0, t)
|
|
108
|
-
op = [op[0] & 2, t.value];
|
|
109
|
-
switch (op[0]) {
|
|
110
|
-
case 0:
|
|
111
|
-
case 1:
|
|
112
|
-
t = op;
|
|
113
|
-
break;
|
|
114
|
-
case 4:
|
|
115
|
-
_.label++;
|
|
116
|
-
return { value: op[1], done: false };
|
|
117
|
-
case 5:
|
|
118
|
-
_.label++;
|
|
119
|
-
y = op[1];
|
|
120
|
-
op = [0];
|
|
121
|
-
continue;
|
|
122
|
-
case 7:
|
|
123
|
-
op = _.ops.pop();
|
|
124
|
-
_.trys.pop();
|
|
125
|
-
continue;
|
|
126
|
-
default:
|
|
127
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
128
|
-
_ = 0;
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
132
|
-
_.label = op[1];
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
136
|
-
_.label = t[1];
|
|
137
|
-
t = op;
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
if (t && _.label < t[2]) {
|
|
141
|
-
_.label = t[2];
|
|
142
|
-
_.ops.push(op);
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
if (t[2])
|
|
146
|
-
_.ops.pop();
|
|
147
|
-
_.trys.pop();
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
op = body.call(thisArg, _);
|
|
151
|
-
}
|
|
152
|
-
catch (e) {
|
|
153
|
-
op = [6, e];
|
|
154
|
-
y = 0;
|
|
155
|
-
}
|
|
156
|
-
finally {
|
|
157
|
-
f = t = 0;
|
|
158
|
-
}
|
|
159
|
-
if (op[0] & 5)
|
|
160
|
-
throw op[1];
|
|
161
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
165
|
-
if (k2 === undefined)
|
|
166
|
-
k2 = k;
|
|
167
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
168
|
-
}) : (function (o, m, k, k2) {
|
|
169
|
-
if (k2 === undefined)
|
|
170
|
-
k2 = k;
|
|
171
|
-
o[k2] = m[k];
|
|
172
|
-
});
|
|
173
|
-
function __exportStar(m, exports) {
|
|
174
|
-
for (var p in m)
|
|
175
|
-
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
176
|
-
__createBinding(exports, m, p);
|
|
177
|
-
}
|
|
178
|
-
function __values(o) {
|
|
179
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
180
|
-
if (m)
|
|
181
|
-
return m.call(o);
|
|
182
|
-
if (o && typeof o.length === "number")
|
|
183
|
-
return {
|
|
184
|
-
next: function () {
|
|
185
|
-
if (o && i >= o.length)
|
|
186
|
-
o = void 0;
|
|
187
|
-
return { value: o && o[i++], done: !o };
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
191
|
-
}
|
|
192
|
-
function __read(o, n) {
|
|
193
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
194
|
-
if (!m)
|
|
195
|
-
return o;
|
|
196
|
-
var i = m.call(o), r, ar = [], e;
|
|
197
|
-
try {
|
|
198
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
199
|
-
ar.push(r.value);
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
e = { error: error };
|
|
203
|
-
}
|
|
204
|
-
finally {
|
|
205
|
-
try {
|
|
206
|
-
if (r && !r.done && (m = i["return"]))
|
|
207
|
-
m.call(i);
|
|
208
|
-
}
|
|
209
|
-
finally {
|
|
210
|
-
if (e)
|
|
211
|
-
throw e.error;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return ar;
|
|
215
|
-
}
|
|
216
|
-
function __spread() {
|
|
217
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
218
|
-
ar = ar.concat(__read(arguments[i]));
|
|
219
|
-
return ar;
|
|
220
|
-
}
|
|
221
|
-
function __spreadArrays() {
|
|
222
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
223
|
-
s += arguments[i].length;
|
|
224
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
225
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
226
|
-
r[k] = a[j];
|
|
227
|
-
return r;
|
|
228
|
-
}
|
|
229
|
-
;
|
|
230
|
-
function __await(v) {
|
|
231
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
232
|
-
}
|
|
233
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
234
|
-
if (!Symbol.asyncIterator)
|
|
235
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
236
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
237
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
238
|
-
function verb(n) { if (g[n])
|
|
239
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
240
|
-
function resume(n, v) { try {
|
|
241
|
-
step(g[n](v));
|
|
242
|
-
}
|
|
243
|
-
catch (e) {
|
|
244
|
-
settle(q[0][3], e);
|
|
245
|
-
} }
|
|
246
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
247
|
-
function fulfill(value) { resume("next", value); }
|
|
248
|
-
function reject(value) { resume("throw", value); }
|
|
249
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
250
|
-
resume(q[0][0], q[0][1]); }
|
|
251
|
-
}
|
|
252
|
-
function __asyncDelegator(o) {
|
|
253
|
-
var i, p;
|
|
254
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
255
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
256
|
-
}
|
|
257
|
-
function __asyncValues(o) {
|
|
258
|
-
if (!Symbol.asyncIterator)
|
|
259
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
260
|
-
var m = o[Symbol.asyncIterator], i;
|
|
261
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
262
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
263
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
264
|
-
}
|
|
265
|
-
function __makeTemplateObject(cooked, raw) {
|
|
266
|
-
if (Object.defineProperty) {
|
|
267
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
cooked.raw = raw;
|
|
271
|
-
}
|
|
272
|
-
return cooked;
|
|
273
|
-
}
|
|
274
|
-
;
|
|
275
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
276
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
277
|
-
}) : function (o, v) {
|
|
278
|
-
o["default"] = v;
|
|
279
|
-
};
|
|
280
|
-
function __importStar(mod) {
|
|
281
|
-
if (mod && mod.__esModule)
|
|
282
|
-
return mod;
|
|
283
|
-
var result = {};
|
|
284
|
-
if (mod != null)
|
|
285
|
-
for (var k in mod)
|
|
286
|
-
if (Object.hasOwnProperty.call(mod, k))
|
|
287
|
-
__createBinding(result, mod, k);
|
|
288
|
-
__setModuleDefault(result, mod);
|
|
289
|
-
return result;
|
|
290
|
-
}
|
|
291
|
-
function __importDefault(mod) {
|
|
292
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
293
|
-
}
|
|
294
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
295
|
-
if (!privateMap.has(receiver)) {
|
|
296
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
297
|
-
}
|
|
298
|
-
return privateMap.get(receiver);
|
|
299
|
-
}
|
|
300
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
301
|
-
if (!privateMap.has(receiver)) {
|
|
302
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
303
|
-
}
|
|
304
|
-
privateMap.set(receiver, value);
|
|
305
|
-
return value;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/** The default month names to use if Intl API is not available. */
|
|
309
|
-
var DEFAULT_MONTH_NAMES = {
|
|
310
|
-
long: [
|
|
311
|
-
'January',
|
|
312
|
-
'February',
|
|
313
|
-
'March',
|
|
314
|
-
'April',
|
|
315
|
-
'May',
|
|
316
|
-
'June',
|
|
317
|
-
'July',
|
|
318
|
-
'August',
|
|
319
|
-
'September',
|
|
320
|
-
'October',
|
|
321
|
-
'November',
|
|
322
|
-
'December'
|
|
323
|
-
],
|
|
324
|
-
short: [
|
|
325
|
-
'Jan',
|
|
326
|
-
'Feb',
|
|
327
|
-
'Mar',
|
|
328
|
-
'Apr',
|
|
329
|
-
'May',
|
|
330
|
-
'Jun',
|
|
331
|
-
'Jul',
|
|
332
|
-
'Aug',
|
|
333
|
-
'Sep',
|
|
334
|
-
'Oct',
|
|
335
|
-
'Nov',
|
|
336
|
-
'Dec'
|
|
337
|
-
],
|
|
338
|
-
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']
|
|
339
|
-
};
|
|
340
|
-
/** The default day of the week names to use if Intl API is not available. */
|
|
341
|
-
var DEFAULT_DAY_OF_WEEK_NAMES = {
|
|
342
|
-
long: [
|
|
343
|
-
'Sunday',
|
|
344
|
-
'Monday',
|
|
345
|
-
'Tuesday',
|
|
346
|
-
'Wednesday',
|
|
347
|
-
'Thursday',
|
|
348
|
-
'Friday',
|
|
349
|
-
'Saturday'
|
|
350
|
-
],
|
|
351
|
-
short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
352
|
-
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
|
|
353
|
-
};
|
|
354
|
-
var ɵ0 = function (i) { return String(i + 1); };
|
|
355
|
-
/** The default date names to use if Intl API is not available. */
|
|
356
|
-
var DEFAULT_DATE_NAMES = range(31, ɵ0);
|
|
357
|
-
/** Whether the browser supports the Intl API. */
|
|
358
|
-
var SUPPORTS_INTL_API = typeof Intl !== 'undefined';
|
|
359
|
-
/**
|
|
360
|
-
* Matches strings that have the form of a valid RFC 3339 string
|
|
361
|
-
* (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date
|
|
362
|
-
* because the regex will match strings an with out of bounds month, date, etc.
|
|
363
|
-
*/
|
|
364
|
-
var ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
365
|
-
/** Creates an array and fills it with values. */
|
|
366
|
-
function range(length, valueFunction) {
|
|
367
|
-
var valuesArray = Array(length);
|
|
368
|
-
for (var i = 0; i < length; i++) {
|
|
369
|
-
valuesArray[i] = valueFunction(i);
|
|
370
|
-
}
|
|
371
|
-
return valuesArray;
|
|
372
|
-
}
|
|
373
|
-
var NativeDateTimeAdapter = /** @class */ (function (_super) {
|
|
374
|
-
__extends(NativeDateTimeAdapter, _super);
|
|
375
|
-
function NativeDateTimeAdapter(platform, owlDateTimeLocale) {
|
|
376
|
-
var _this = _super.call(this) || this;
|
|
377
|
-
_super.prototype.setLocale.call(_this, owlDateTimeLocale);
|
|
378
|
-
// IE does its own time zone correction, so we disable this on IE.
|
|
379
|
-
_this.useUtcForDisplay = !platform.TRIDENT;
|
|
380
|
-
_this._clampDate = platform.TRIDENT || platform.EDGE;
|
|
381
|
-
return _this;
|
|
382
|
-
}
|
|
383
|
-
NativeDateTimeAdapter.prototype.getYear = function (date) {
|
|
384
|
-
return date.getFullYear();
|
|
385
|
-
};
|
|
386
|
-
NativeDateTimeAdapter.prototype.getMonth = function (date) {
|
|
387
|
-
return date.getMonth();
|
|
388
|
-
};
|
|
389
|
-
NativeDateTimeAdapter.prototype.getDay = function (date) {
|
|
390
|
-
return date.getDay();
|
|
391
|
-
};
|
|
392
|
-
NativeDateTimeAdapter.prototype.getDate = function (date) {
|
|
393
|
-
return date.getDate();
|
|
394
|
-
};
|
|
395
|
-
NativeDateTimeAdapter.prototype.getHours = function (date) {
|
|
396
|
-
return date.getHours();
|
|
397
|
-
};
|
|
398
|
-
NativeDateTimeAdapter.prototype.getMinutes = function (date) {
|
|
399
|
-
return date.getMinutes();
|
|
400
|
-
};
|
|
401
|
-
NativeDateTimeAdapter.prototype.getSeconds = function (date) {
|
|
402
|
-
return date.getSeconds();
|
|
403
|
-
};
|
|
404
|
-
NativeDateTimeAdapter.prototype.getTime = function (date) {
|
|
405
|
-
return date.getTime();
|
|
406
|
-
};
|
|
407
|
-
NativeDateTimeAdapter.prototype.getNumDaysInMonth = function (date) {
|
|
408
|
-
var lastDateOfMonth = this.createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0);
|
|
409
|
-
return this.getDate(lastDateOfMonth);
|
|
410
|
-
};
|
|
411
|
-
NativeDateTimeAdapter.prototype.differenceInCalendarDays = function (dateLeft, dateRight) {
|
|
412
|
-
if (this.isValid(dateLeft) && this.isValid(dateRight)) {
|
|
413
|
-
var dateLeftStartOfDay = this.createDate(this.getYear(dateLeft), this.getMonth(dateLeft), this.getDate(dateLeft));
|
|
414
|
-
var dateRightStartOfDay = this.createDate(this.getYear(dateRight), this.getMonth(dateRight), this.getDate(dateRight));
|
|
415
|
-
var timeStampLeft = this.getTime(dateLeftStartOfDay) -
|
|
416
|
-
dateLeftStartOfDay.getTimezoneOffset() *
|
|
417
|
-
this.milliseondsInMinute;
|
|
418
|
-
var timeStampRight = this.getTime(dateRightStartOfDay) -
|
|
419
|
-
dateRightStartOfDay.getTimezoneOffset() *
|
|
420
|
-
this.milliseondsInMinute;
|
|
421
|
-
return Math.round((timeStampLeft - timeStampRight) / this.millisecondsInDay);
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
return null;
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
NativeDateTimeAdapter.prototype.getYearName = function (date) {
|
|
428
|
-
if (SUPPORTS_INTL_API) {
|
|
429
|
-
var dtf = new Intl.DateTimeFormat(this.locale, {
|
|
430
|
-
year: 'numeric',
|
|
431
|
-
timeZone: 'utc'
|
|
432
|
-
});
|
|
433
|
-
return this.stripDirectionalityCharacters(this._format(dtf, date));
|
|
434
|
-
}
|
|
435
|
-
return String(this.getYear(date));
|
|
436
|
-
};
|
|
437
|
-
NativeDateTimeAdapter.prototype.getMonthNames = function (style) {
|
|
438
|
-
var _this = this;
|
|
439
|
-
if (SUPPORTS_INTL_API) {
|
|
440
|
-
var dtf_1 = new Intl.DateTimeFormat(this.locale, {
|
|
441
|
-
month: style,
|
|
442
|
-
timeZone: 'utc'
|
|
443
|
-
});
|
|
444
|
-
return range(12, function (i) { return _this.stripDirectionalityCharacters(_this._format(dtf_1, new Date(2017, i, 1))); });
|
|
445
|
-
}
|
|
446
|
-
return DEFAULT_MONTH_NAMES[style];
|
|
447
|
-
};
|
|
448
|
-
NativeDateTimeAdapter.prototype.getDayOfWeekNames = function (style) {
|
|
449
|
-
var _this = this;
|
|
450
|
-
if (SUPPORTS_INTL_API) {
|
|
451
|
-
var dtf_2 = new Intl.DateTimeFormat(this.locale, {
|
|
452
|
-
weekday: style,
|
|
453
|
-
timeZone: 'utc'
|
|
454
|
-
});
|
|
455
|
-
return range(7, function (i) { return _this.stripDirectionalityCharacters(_this._format(dtf_2, new Date(2017, 0, i + 1))); });
|
|
456
|
-
}
|
|
457
|
-
return DEFAULT_DAY_OF_WEEK_NAMES[style];
|
|
458
|
-
};
|
|
459
|
-
NativeDateTimeAdapter.prototype.getDateNames = function () {
|
|
460
|
-
var _this = this;
|
|
461
|
-
if (SUPPORTS_INTL_API) {
|
|
462
|
-
var dtf_3 = new Intl.DateTimeFormat(this.locale, {
|
|
463
|
-
day: 'numeric',
|
|
464
|
-
timeZone: 'utc'
|
|
465
|
-
});
|
|
466
|
-
return range(31, function (i) { return _this.stripDirectionalityCharacters(_this._format(dtf_3, new Date(2017, 0, i + 1))); });
|
|
467
|
-
}
|
|
468
|
-
return DEFAULT_DATE_NAMES;
|
|
469
|
-
};
|
|
470
|
-
NativeDateTimeAdapter.prototype.toIso8601 = function (date) {
|
|
471
|
-
return date.toISOString();
|
|
472
|
-
};
|
|
473
|
-
NativeDateTimeAdapter.prototype.isEqual = function (dateLeft, dateRight) {
|
|
474
|
-
if (this.isValid(dateLeft) && this.isValid(dateRight)) {
|
|
475
|
-
return dateLeft.getTime() === dateRight.getTime();
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
return false;
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
NativeDateTimeAdapter.prototype.isSameDay = function (dateLeft, dateRight) {
|
|
482
|
-
if (this.isValid(dateLeft) && this.isValid(dateRight)) {
|
|
483
|
-
var dateLeftStartOfDay = this.clone(dateLeft);
|
|
484
|
-
var dateRightStartOfDay = this.clone(dateRight);
|
|
485
|
-
dateLeftStartOfDay.setHours(0, 0, 0, 0);
|
|
486
|
-
dateRightStartOfDay.setHours(0, 0, 0, 0);
|
|
487
|
-
return (dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime());
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
return false;
|
|
491
|
-
}
|
|
492
|
-
};
|
|
493
|
-
NativeDateTimeAdapter.prototype.isValid = function (date) {
|
|
494
|
-
return date && !isNaN(date.getTime());
|
|
495
|
-
};
|
|
496
|
-
NativeDateTimeAdapter.prototype.invalid = function () {
|
|
497
|
-
return new Date(NaN);
|
|
498
|
-
};
|
|
499
|
-
NativeDateTimeAdapter.prototype.isDateInstance = function (obj) {
|
|
500
|
-
return obj instanceof Date;
|
|
501
|
-
};
|
|
502
|
-
NativeDateTimeAdapter.prototype.addCalendarYears = function (date, amount) {
|
|
503
|
-
return this.addCalendarMonths(date, amount * 12);
|
|
504
|
-
};
|
|
505
|
-
NativeDateTimeAdapter.prototype.addCalendarMonths = function (date, amount) {
|
|
506
|
-
var result = this.clone(date);
|
|
507
|
-
amount = Number(amount);
|
|
508
|
-
var desiredMonth = result.getMonth() + amount;
|
|
509
|
-
var dateWithDesiredMonth = new Date(0);
|
|
510
|
-
dateWithDesiredMonth.setFullYear(result.getFullYear(), desiredMonth, 1);
|
|
511
|
-
dateWithDesiredMonth.setHours(0, 0, 0, 0);
|
|
512
|
-
var daysInMonth = this.getNumDaysInMonth(dateWithDesiredMonth);
|
|
513
|
-
// Set the last day of the new month
|
|
514
|
-
// if the original date was the last day of the longer month
|
|
515
|
-
result.setMonth(desiredMonth, Math.min(daysInMonth, result.getDate()));
|
|
516
|
-
return result;
|
|
517
|
-
};
|
|
518
|
-
NativeDateTimeAdapter.prototype.addCalendarDays = function (date, amount) {
|
|
519
|
-
var result = this.clone(date);
|
|
520
|
-
amount = Number(amount);
|
|
521
|
-
result.setDate(result.getDate() + amount);
|
|
522
|
-
return result;
|
|
523
|
-
};
|
|
524
|
-
NativeDateTimeAdapter.prototype.setHours = function (date, amount) {
|
|
525
|
-
var result = this.clone(date);
|
|
526
|
-
result.setHours(amount);
|
|
527
|
-
return result;
|
|
528
|
-
};
|
|
529
|
-
NativeDateTimeAdapter.prototype.setMinutes = function (date, amount) {
|
|
530
|
-
var result = this.clone(date);
|
|
531
|
-
result.setMinutes(amount);
|
|
532
|
-
return result;
|
|
533
|
-
};
|
|
534
|
-
NativeDateTimeAdapter.prototype.setSeconds = function (date, amount) {
|
|
535
|
-
var result = this.clone(date);
|
|
536
|
-
result.setSeconds(amount);
|
|
537
|
-
return result;
|
|
538
|
-
};
|
|
539
|
-
NativeDateTimeAdapter.prototype.createDate = function (year, month, date, hours, minutes, seconds) {
|
|
540
|
-
if (hours === void 0) { hours = 0; }
|
|
541
|
-
if (minutes === void 0) { minutes = 0; }
|
|
542
|
-
if (seconds === void 0) { seconds = 0; }
|
|
543
|
-
if (month < 0 || month > 11) {
|
|
544
|
-
throw Error("Invalid month index \"" + month + "\". Month index has to be between 0 and 11.");
|
|
545
|
-
}
|
|
546
|
-
if (date < 1) {
|
|
547
|
-
throw Error("Invalid date \"" + date + "\". Date has to be greater than 0.");
|
|
548
|
-
}
|
|
549
|
-
if (hours < 0 || hours > 23) {
|
|
550
|
-
throw Error("Invalid hours \"" + hours + "\". Hours has to be between 0 and 23.");
|
|
551
|
-
}
|
|
552
|
-
if (minutes < 0 || minutes > 59) {
|
|
553
|
-
throw Error("Invalid minutes \"" + minutes + "\". Minutes has to between 0 and 59.");
|
|
554
|
-
}
|
|
555
|
-
if (seconds < 0 || seconds > 59) {
|
|
556
|
-
throw Error("Invalid seconds \"" + seconds + "\". Seconds has to be between 0 and 59.");
|
|
557
|
-
}
|
|
558
|
-
var result = this.createDateWithOverflow(year, month, date, hours, minutes, seconds);
|
|
559
|
-
// Check that the date wasn't above the upper bound for the month, causing the month to overflow
|
|
560
|
-
// For example, createDate(2017, 1, 31) would try to create a date 2017/02/31 which is invalid
|
|
561
|
-
if (result.getMonth() !== month) {
|
|
562
|
-
throw Error("Invalid date \"" + date + "\" for month with index \"" + month + "\".");
|
|
563
|
-
}
|
|
564
|
-
return result;
|
|
565
|
-
};
|
|
566
|
-
NativeDateTimeAdapter.prototype.clone = function (date) {
|
|
567
|
-
return this.createDate(this.getYear(date), this.getMonth(date), this.getDate(date), this.getHours(date), this.getMinutes(date), this.getSeconds(date));
|
|
568
|
-
};
|
|
569
|
-
NativeDateTimeAdapter.prototype.now = function () {
|
|
570
|
-
return new Date();
|
|
571
|
-
};
|
|
572
|
-
NativeDateTimeAdapter.prototype.format = function (date, displayFormat) {
|
|
573
|
-
if (!this.isValid(date)) {
|
|
574
|
-
throw Error('JSNativeDate: Cannot format invalid date.');
|
|
575
|
-
}
|
|
576
|
-
if (SUPPORTS_INTL_API) {
|
|
577
|
-
if (this._clampDate &&
|
|
578
|
-
(date.getFullYear() < 1 || date.getFullYear() > 9999)) {
|
|
579
|
-
date = this.clone(date);
|
|
580
|
-
date.setFullYear(Math.max(1, Math.min(9999, date.getFullYear())));
|
|
581
|
-
}
|
|
582
|
-
displayFormat = Object.assign(Object.assign({}, displayFormat), { timeZone: 'utc' });
|
|
583
|
-
var dtf = new Intl.DateTimeFormat(this.locale, displayFormat);
|
|
584
|
-
return this.stripDirectionalityCharacters(this._format(dtf, date));
|
|
585
|
-
}
|
|
586
|
-
return this.stripDirectionalityCharacters(date.toDateString());
|
|
587
|
-
};
|
|
588
|
-
NativeDateTimeAdapter.prototype.parse = function (value, _parseFormat) {
|
|
589
|
-
// There is no way using the native JS Date to set the parse format or locale
|
|
590
|
-
if (typeof value === 'number') {
|
|
591
|
-
return new Date(value);
|
|
592
|
-
}
|
|
593
|
-
return value ? new Date(Date.parse(value)) : null;
|
|
594
|
-
};
|
|
595
|
-
/**
|
|
596
|
-
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
597
|
-
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
598
|
-
* invalid date for all other values.
|
|
599
|
-
*/
|
|
600
|
-
NativeDateTimeAdapter.prototype.deserialize = function (value) {
|
|
601
|
-
if (typeof value === 'string') {
|
|
602
|
-
if (!value) {
|
|
603
|
-
return null;
|
|
604
|
-
}
|
|
605
|
-
// The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the
|
|
606
|
-
// string is the right format first.
|
|
607
|
-
if (ISO_8601_REGEX.test(value)) {
|
|
608
|
-
var date = new Date(value);
|
|
609
|
-
if (this.isValid(date)) {
|
|
610
|
-
return date;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return _super.prototype.deserialize.call(this, value);
|
|
615
|
-
};
|
|
616
|
-
/**
|
|
617
|
-
* Creates a date but allows the month and date to overflow.
|
|
618
|
-
*/
|
|
619
|
-
NativeDateTimeAdapter.prototype.createDateWithOverflow = function (year, month, date, hours, minutes, seconds) {
|
|
620
|
-
if (hours === void 0) { hours = 0; }
|
|
621
|
-
if (minutes === void 0) { minutes = 0; }
|
|
622
|
-
if (seconds === void 0) { seconds = 0; }
|
|
623
|
-
var result = new Date(year, month, date, hours, minutes, seconds);
|
|
624
|
-
if (year >= 0 && year < 100) {
|
|
625
|
-
result.setFullYear(this.getYear(result) - 1900);
|
|
626
|
-
}
|
|
627
|
-
return result;
|
|
628
|
-
};
|
|
629
|
-
/**
|
|
630
|
-
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
631
|
-
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
632
|
-
* date parsing.
|
|
633
|
-
*/
|
|
634
|
-
NativeDateTimeAdapter.prototype.stripDirectionalityCharacters = function (str) {
|
|
635
|
-
return str.replace(/[\u200e\u200f]/g, '');
|
|
636
|
-
};
|
|
637
|
-
/**
|
|
638
|
-
* When converting Date object to string, javascript built-in functions may return wrong
|
|
639
|
-
* results because it applies its internal DST rules. The DST rules around the world change
|
|
640
|
-
* very frequently, and the current valid rule is not always valid in previous years though.
|
|
641
|
-
* We work around this problem building a new Date object which has its internal UTC
|
|
642
|
-
* representation with the local date and time.
|
|
643
|
-
*/
|
|
644
|
-
NativeDateTimeAdapter.prototype._format = function (dtf, date) {
|
|
645
|
-
var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
646
|
-
return dtf.format(d);
|
|
647
|
-
};
|
|
648
|
-
return NativeDateTimeAdapter;
|
|
649
|
-
}(nxtPickDatetime.DateTimeAdapter));
|
|
650
|
-
NativeDateTimeAdapter.decorators = [
|
|
651
|
-
{ type: core.Injectable }
|
|
652
|
-
];
|
|
653
|
-
NativeDateTimeAdapter.ctorParameters = function () { return [
|
|
654
|
-
{ type: platform.Platform },
|
|
655
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [nxtPickDatetime.OWL_DATE_TIME_LOCALE,] }] }
|
|
656
|
-
]; };
|
|
657
|
-
|
|
658
|
-
var OWL_NATIVE_DATE_TIME_FORMATS = {
|
|
659
|
-
parseInput: null,
|
|
660
|
-
fullPickerInput: { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' },
|
|
661
|
-
datePickerInput: { year: 'numeric', month: 'numeric', day: 'numeric' },
|
|
662
|
-
timePickerInput: { hour: 'numeric', minute: 'numeric' },
|
|
663
|
-
monthYearLabel: { year: 'numeric', month: 'short' },
|
|
664
|
-
dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
|
|
665
|
-
monthYearA11yLabel: { year: 'numeric', month: 'long' }
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
var NativeDateTimeModule = /** @class */ (function () {
|
|
669
|
-
function NativeDateTimeModule() {
|
|
670
|
-
}
|
|
671
|
-
return NativeDateTimeModule;
|
|
672
|
-
}());
|
|
673
|
-
NativeDateTimeModule.decorators = [
|
|
674
|
-
{ type: core.NgModule, args: [{
|
|
675
|
-
imports: [platform.PlatformModule],
|
|
676
|
-
providers: [
|
|
677
|
-
{ provide: nxtPickDatetime.DateTimeAdapter, useClass: NativeDateTimeAdapter }
|
|
678
|
-
]
|
|
679
|
-
},] }
|
|
680
|
-
];
|
|
681
|
-
var ɵ0$1 = OWL_NATIVE_DATE_TIME_FORMATS;
|
|
682
|
-
var OwlNativeDateTimeModule = /** @class */ (function () {
|
|
683
|
-
function OwlNativeDateTimeModule() {
|
|
684
|
-
}
|
|
685
|
-
return OwlNativeDateTimeModule;
|
|
686
|
-
}());
|
|
687
|
-
OwlNativeDateTimeModule.decorators = [
|
|
688
|
-
{ type: core.NgModule, args: [{
|
|
689
|
-
imports: [NativeDateTimeModule],
|
|
690
|
-
providers: [{ provide: nxtPickDatetime.OWL_DATE_TIME_FORMATS, useValue: ɵ0$1 }]
|
|
691
|
-
},] }
|
|
692
|
-
];
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Generated bundle index. Do not edit.
|
|
696
|
-
*/
|
|
697
|
-
|
|
698
|
-
exports.OwlNativeDateTimeModule = OwlNativeDateTimeModule;
|
|
699
|
-
exports.ɵa = NativeDateTimeModule;
|
|
700
|
-
exports.ɵb = NativeDateTimeAdapter;
|
|
701
|
-
exports.ɵc = OWL_NATIVE_DATE_TIME_FORMATS;
|
|
702
|
-
|
|
703
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
704
|
-
|
|
705
|
-
})));
|
|
706
|
-
//# sourceMappingURL=nxt-pick-datetime-native-adapter.umd.js.map
|