@sumaris-net/ngx-components 1.18.7 → 1.19.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/bundles/sumaris-net.ngx-components.umd.js +779 -420
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +4 -0
- package/esm2015/public_api.js +10 -5
- package/esm2015/src/app/admin/admin-routing.module.js +3 -1
- package/esm2015/src/app/admin/admin.module.js +2 -1
- package/esm2015/src/app/admin/users/list/users.js +45 -7
- package/esm2015/src/app/core/services/local-settings.service.js +5 -5
- package/esm2015/src/app/core/services/platform.service.js +3 -4
- package/esm2015/src/app/shared/material/datetime/material.date.js +82 -70
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +3 -3
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +7 -5
- package/esm2015/src/app/shared/validator/validators.js +2 -2
- package/esm2015/src/app/social/message/message.form.js +73 -0
- package/esm2015/src/app/social/message/message.modal.js +96 -0
- package/esm2015/src/app/social/message/message.model.js +65 -0
- package/esm2015/src/app/social/message/message.service.js +87 -0
- package/esm2015/src/app/social/social.errors.js +6 -0
- package/esm2015/src/app/social/social.module.js +12 -15
- package/esm2015/src/app/social/user-event/user-event.fragments.js +27 -0
- package/esm2015/src/app/social/user-event/user-event.model.js +46 -0
- package/esm2015/src/app/social/user-event/user-event.service.js +367 -0
- package/esm2015/src/app/social/user-event/user-events.table.js +154 -0
- package/fesm2015/sumaris-net.ngx-components.js +710 -403
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +4 -3
- package/public_api.d.ts +9 -4
- package/src/app/admin/users/list/users.d.ts +10 -6
- package/src/app/core/services/local-settings.service.d.ts +3 -2
- package/src/app/shared/material/datetime/material.date.d.ts +6 -8
- package/src/app/shared/material/datetime/material.datetime.d.ts +2 -2
- package/src/app/social/message/message.form.d.ts +27 -0
- package/src/app/social/message/message.modal.d.ts +36 -0
- package/src/app/social/message/message.model.d.ts +31 -0
- package/src/app/social/message/message.service.d.ts +24 -0
- package/src/app/social/{services/errors.d.ts → social.errors.d.ts} +2 -1
- package/src/app/social/social.module.d.ts +0 -2
- package/src/app/social/{services/social.fragments.d.ts → user-event/user-event.fragments.d.ts} +1 -1
- package/src/app/social/{services/model → user-event}/user-event.model.d.ts +1 -1
- package/src/app/social/{services → user-event}/user-event.service.d.ts +4 -3
- package/src/app/social/{list → user-event}/user-events.table.d.ts +2 -2
- package/src/assets/i18n/en-US.json +4 -4
- package/src/assets/i18n/en.json +5 -4
- package/src/assets/i18n/fr.json +24 -4
- package/src/theme/_ionic.globals.scss +2 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/admin/services/errors.js +0 -6
- package/esm2015/src/app/social/list/user-events.table.js +0 -154
- package/esm2015/src/app/social/services/errors.js +0 -5
- package/esm2015/src/app/social/services/model/user-event.model.js +0 -46
- package/esm2015/src/app/social/services/social.fragments.js +0 -27
- package/esm2015/src/app/social/services/user-event.service.js +0 -367
- package/src/app/admin/services/errors.d.ts +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/table'), require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/toolbar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/select'), require('@angular/material/card'), require('@angular/material/tabs'), require('@angular/material/stepper'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/radio'), require('@angular/material/badge'), require('@angular/material/slide-toggle'), require('@angular/material/dialog'), require('@angular/material/autocomplete'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('moment-timezone'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/material/divider'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-color-picker'), require('@ionic-native/native-audio/ngx'), require('@ionic-native/vibration/ngx'), require('@ionic-native/audio-management/ngx'), require('@ionic-native/native-audio/ngx/index'), require('@ionic-native/vibration/ngx/index'), require('@ionic-native/audio-management/ngx/index'), require('uuid/v4'), require('@angular/cdk/drag-drop'), require('ngx-markdown'), require('tweetnacl'), require('@ionic/storage'), require('zone.js/dist/zone-error'), require('@ionic-native/splash-screen/ngx'), require('@ionic-native/network/ngx'), require('ionic-cache'), require('ionic-cache/dist/cache.service'), require('@ionic-native/network/ngx/index'), require('@ionic-native/splash-screen/ngx/index'), require('@ionic-native/status-bar/ngx'), require('@angular/cdk/platform'), require('@ionic-native/in-app-browser/ngx'), require('@apollo/client/core'), require('apollo-angular'), require('@apollo/client/link/ws'), require('@apollo/client/utilities'), require('@apollo/client/link/retry'), require('apollo-link-queue'), require('apollo-link-serialize'), require('apollo-link-logger'), require('apollo-angular/http'), require('apollo3-cache-persist'), require('@ionic-native/downloader/ngx'), require('@ionic-native/status-bar/ngx/index'), require('@ionic-native/keyboard/ngx/index'), require('@ionic-native/in-app-browser/ngx/index'), require('@ionic-native/downloader/ngx/index'), require('@angular/cdk/text-field'), require('@e-is/ngx-material-table'), require('@angular/cdk/collections'), require('ngx-jdenticon'), require('tweetnacl-util'), require('scrypt-async'), require('hammerjs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@sumaris-net/ngx-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/table', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/material/core', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/toolbar', '@angular/material/icon', '@angular/material/button', '@angular/material/menu', '@angular/material/select', '@angular/material/card', '@angular/material/tabs', '@angular/material/stepper', '@angular/material/list', '@angular/material/button-toggle', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/radio', '@angular/material/badge', '@angular/material/slide-toggle', '@angular/material/dialog', '@angular/material/autocomplete', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/animations', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', 'moment-timezone', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/material/divider', '@angular/material/tooltip', '@angular/material/chips', '@angular/router', '@angular/platform-browser', '@angular/common/http', 'ngx-color-picker', '@ionic-native/native-audio/ngx', '@ionic-native/vibration/ngx', '@ionic-native/audio-management/ngx', '@ionic-native/native-audio/ngx/index', '@ionic-native/vibration/ngx/index', '@ionic-native/audio-management/ngx/index', 'uuid/v4', '@angular/cdk/drag-drop', 'ngx-markdown', 'tweetnacl', '@ionic/storage', 'zone.js/dist/zone-error', '@ionic-native/splash-screen/ngx', '@ionic-native/network/ngx', 'ionic-cache', 'ionic-cache/dist/cache.service', '@ionic-native/network/ngx/index', '@ionic-native/splash-screen/ngx/index', '@ionic-native/status-bar/ngx', '@angular/cdk/platform', '@ionic-native/in-app-browser/ngx', '@apollo/client/core', 'apollo-angular', '@apollo/client/link/ws', '@apollo/client/utilities', '@apollo/client/link/retry', 'apollo-link-queue', 'apollo-link-serialize', 'apollo-link-logger', 'apollo-angular/http', 'apollo3-cache-persist', '@ionic-native/downloader/ngx', '@ionic-native/status-bar/ngx/index', '@ionic-native/keyboard/ngx/index', '@ionic-native/in-app-browser/ngx/index', '@ionic-native/downloader/ngx/index', '@angular/cdk/text-field', '@e-is/ngx-material-table', '@angular/cdk/collections', 'ngx-jdenticon', 'tweetnacl-util', 'scrypt-async', 'hammerjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global[
|
|
5
|
-
}
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sumaris-net'] = global['sumaris-net'] || {}, global['sumaris-net']['ngx-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.animations, global['ngx-translate'].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global['moment-timezone'], global['ionic-native'].keyboard.ngx, global['angular2-text-mask'], global['ngx-material-timepicker'], global.ng.material.datepicker, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global['ngx-color-picker'], global['ionic-native']['native-audio'].ngx, global['ionic-native'].vibration.ngx, global['ionic-native']['audio-management'].ngx, global['ionic-native']['native-audio'].ngx.index, global['ionic-native'].vibration.ngx.index, global['ionic-native']['audio-management'].ngx.index, global.uuid.v4, global.ng.cdk.dragDrop, global['ngx-markdown'], global.tweetnacl, global.ionic.storage, null, global['ionic-native']['splash-screen'].ngx, global['ionic-native'].network.ngx, global['ionic-cache'], global['ionic-cache/dist/cache'].service, global['ionic-native'].network.ngx.index, global['ionic-native']['splash-screen'].ngx.index, global['ionic-native']['status-bar'].ngx, global.ng.cdk.platform, global['ionic-native']['in-app-browser'].ngx, global.apollo.client.core, global['apollo-angular'], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global['apollo-link-queue'], global['apollo-link-serialize'], global['apollo-link-logger'], global['apollo-angular'].http, global['apollo3-cache-persist'], global['ionic-native'].downloader.ngx, global['ionic-native']['status-bar'].ngx.index, global['ionic-native'].keyboard.ngx.index, global['ionic-native']['in-app-browser'].ngx.index, global['ionic-native'].downloader.ngx.index, global.ng.cdk.textField, global['e-is']['ngx-material-table'], global.ng.cdk.collections, global['ngx-jdenticon']));
|
|
5
|
+
}(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, animations, i1$2, i1$5, momentImported, i1$1, momentTZImported, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, textField, ngxMaterialTable, collections, ngxJdenticon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -15,46 +15,23 @@
|
|
|
15
15
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
16
|
Object.defineProperty(n, k, d.get ? d : {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () {
|
|
18
|
+
get: function () {
|
|
19
|
+
return e[k];
|
|
20
|
+
}
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
|
-
n[
|
|
25
|
+
n['default'] = e;
|
|
24
26
|
return Object.freeze(n);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
29
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
30
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
-
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1);
|
|
32
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
33
|
-
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
34
29
|
var momentImported__namespace = /*#__PURE__*/_interopNamespace(momentImported);
|
|
35
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
|
|
36
30
|
var momentTZImported__namespace = /*#__PURE__*/_interopNamespace(momentTZImported);
|
|
37
|
-
var i3__namespace$3 = /*#__PURE__*/_interopNamespace(i3);
|
|
38
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
39
|
-
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
40
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2$2);
|
|
41
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3$1);
|
|
42
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
43
31
|
var uuidv4Imported__namespace = /*#__PURE__*/_interopNamespace(uuidv4Imported);
|
|
44
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
45
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
46
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
47
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
48
|
-
var i2__namespace$4 = /*#__PURE__*/_interopNamespace(i2$4);
|
|
49
|
-
var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
|
|
50
32
|
var QueueLink__default = /*#__PURE__*/_interopDefaultLegacy(QueueLink);
|
|
51
33
|
var SerializingLink__default = /*#__PURE__*/_interopDefaultLegacy(SerializingLink);
|
|
52
34
|
var loggerLink__default = /*#__PURE__*/_interopDefaultLegacy(loggerLink);
|
|
53
|
-
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$3);
|
|
54
|
-
var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
|
|
55
|
-
var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
|
|
56
|
-
var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
|
|
57
|
-
var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
|
|
58
35
|
|
|
59
36
|
var ENVIRONMENT = new i0.InjectionToken('ENV');
|
|
60
37
|
var Environment = /** @class */ (function () {
|
|
@@ -1373,7 +1350,7 @@
|
|
|
1373
1350
|
}
|
|
1374
1351
|
return false;
|
|
1375
1352
|
};
|
|
1376
|
-
var ɵ0
|
|
1353
|
+
var ɵ0 = isIpad;
|
|
1377
1354
|
var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
|
|
1378
1355
|
var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
|
|
1379
1356
|
var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
|
|
@@ -1436,14 +1413,14 @@
|
|
|
1436
1413
|
};
|
|
1437
1414
|
return MatAutocompleteFieldUtils;
|
|
1438
1415
|
}());
|
|
1439
|
-
var noop
|
|
1440
|
-
var ɵ0$
|
|
1416
|
+
var noop = function (_) { };
|
|
1417
|
+
var ɵ0$1 = noop;
|
|
1441
1418
|
var MatAutocompleteField = /** @class */ (function () {
|
|
1442
1419
|
function MatAutocompleteField(cd, formGroupDir) {
|
|
1443
1420
|
this.cd = cd;
|
|
1444
1421
|
this.formGroupDir = formGroupDir;
|
|
1445
|
-
this._onChangeCallback = noop
|
|
1446
|
-
this._onTouchedCallback = noop
|
|
1422
|
+
this._onChangeCallback = noop;
|
|
1423
|
+
this._onTouchedCallback = noop;
|
|
1447
1424
|
this.logPrefix = '[mat-autocomplete] ';
|
|
1448
1425
|
this.formControlName = null;
|
|
1449
1426
|
this.required = false;
|
|
@@ -2269,7 +2246,7 @@
|
|
|
2269
2246
|
};
|
|
2270
2247
|
return DateFormatPipe;
|
|
2271
2248
|
}());
|
|
2272
|
-
DateFormatPipe.ɵprov =
|
|
2249
|
+
DateFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0.ɵɵinject(i1$1.MomentDateAdapter), i0.ɵɵinject(i1$2.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
2273
2250
|
DateFormatPipe.decorators = [
|
|
2274
2251
|
{ type: i0.Pipe, args: [{
|
|
2275
2252
|
name: 'dateFormat'
|
|
@@ -2281,7 +2258,7 @@
|
|
|
2281
2258
|
{ type: i1$2.TranslateService }
|
|
2282
2259
|
]; };
|
|
2283
2260
|
|
|
2284
|
-
var moment
|
|
2261
|
+
var moment = momentImported__namespace;
|
|
2285
2262
|
var DateDiffDurationPipe = /** @class */ (function () {
|
|
2286
2263
|
function DateDiffDurationPipe(dateAdapter, translate) {
|
|
2287
2264
|
var _this = this;
|
|
@@ -2298,10 +2275,10 @@
|
|
|
2298
2275
|
return this.format(startDate, endDate);
|
|
2299
2276
|
};
|
|
2300
2277
|
DateDiffDurationPipe.prototype.format = function (startDate, endDate) {
|
|
2301
|
-
var duration = moment
|
|
2278
|
+
var duration = moment.duration(endDate.diff(startDate));
|
|
2302
2279
|
if (duration.asMinutes() < 0)
|
|
2303
2280
|
return '';
|
|
2304
|
-
var timeDuration = moment
|
|
2281
|
+
var timeDuration = moment(0)
|
|
2305
2282
|
.hour(duration.hours())
|
|
2306
2283
|
.minute(duration.minutes());
|
|
2307
2284
|
var days = Math.floor(duration.asDays());
|
|
@@ -2309,7 +2286,7 @@
|
|
|
2309
2286
|
};
|
|
2310
2287
|
return DateDiffDurationPipe;
|
|
2311
2288
|
}());
|
|
2312
|
-
DateDiffDurationPipe.ɵprov =
|
|
2289
|
+
DateDiffDurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0.ɵɵinject(i1$3.DateAdapter), i0.ɵɵinject(i1$2.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
2313
2290
|
DateDiffDurationPipe.decorators = [
|
|
2314
2291
|
{ type: i0.Pipe, args: [{
|
|
2315
2292
|
name: 'dateDiffDuration'
|
|
@@ -2331,7 +2308,7 @@
|
|
|
2331
2308
|
};
|
|
2332
2309
|
return DateFromNowPipe;
|
|
2333
2310
|
}());
|
|
2334
|
-
DateFromNowPipe.ɵprov =
|
|
2311
|
+
DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1$1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
2335
2312
|
DateFromNowPipe.decorators = [
|
|
2336
2313
|
{ type: i0.Pipe, args: [{
|
|
2337
2314
|
name: 'dateFromNow'
|
|
@@ -2400,7 +2377,7 @@
|
|
|
2400
2377
|
value *= -1;
|
|
2401
2378
|
}
|
|
2402
2379
|
}
|
|
2403
|
-
var degrees = roundFloat
|
|
2380
|
+
var degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2404
2381
|
// Add sign
|
|
2405
2382
|
var sign = negative ? '-' : '+';
|
|
2406
2383
|
if (opts.placeholderChar) {
|
|
@@ -2451,7 +2428,7 @@
|
|
|
2451
2428
|
}
|
|
2452
2429
|
var degrees = Math.trunc(value);
|
|
2453
2430
|
var minutes = Math.trunc((value - degrees) * 60);
|
|
2454
|
-
var seconds = roundFloat
|
|
2431
|
+
var seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2455
2432
|
while (seconds >= 60) {
|
|
2456
2433
|
seconds -= 60;
|
|
2457
2434
|
minutes += 1;
|
|
@@ -2519,7 +2496,7 @@
|
|
|
2519
2496
|
}
|
|
2520
2497
|
}
|
|
2521
2498
|
var degrees = Math.trunc(value);
|
|
2522
|
-
var minutes = roundFloat
|
|
2499
|
+
var minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2523
2500
|
while (minutes >= 60) {
|
|
2524
2501
|
minutes -= 60;
|
|
2525
2502
|
degrees += 1;
|
|
@@ -2570,15 +2547,15 @@
|
|
|
2570
2547
|
return NaN;
|
|
2571
2548
|
}
|
|
2572
2549
|
if (pattern === 'DD')
|
|
2573
|
-
return roundFloat
|
|
2550
|
+
return roundFloat(degrees, maxDecimals);
|
|
2574
2551
|
var minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2575
2552
|
var seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2576
2553
|
var direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2577
2554
|
var sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2578
2555
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2579
|
-
return roundFloat
|
|
2556
|
+
return roundFloat(degrees, maxDecimals);
|
|
2580
2557
|
}
|
|
2581
|
-
function roundFloat
|
|
2558
|
+
function roundFloat(input, maxDecimals) {
|
|
2582
2559
|
if (maxDecimals > 0) {
|
|
2583
2560
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
2584
2561
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2601,7 +2578,7 @@
|
|
|
2601
2578
|
};
|
|
2602
2579
|
return LatLongFormatPipe;
|
|
2603
2580
|
}());
|
|
2604
|
-
LatLongFormatPipe.ɵprov =
|
|
2581
|
+
LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2605
2582
|
LatLongFormatPipe.decorators = [
|
|
2606
2583
|
{ type: i0.Pipe, args: [{
|
|
2607
2584
|
name: 'latLongFormat'
|
|
@@ -2614,7 +2591,7 @@
|
|
|
2614
2591
|
}
|
|
2615
2592
|
return LatitudeFormatPipe;
|
|
2616
2593
|
}());
|
|
2617
|
-
LatitudeFormatPipe.ɵprov =
|
|
2594
|
+
LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2618
2595
|
LatitudeFormatPipe.decorators = [
|
|
2619
2596
|
{ type: i0.Pipe, args: [{
|
|
2620
2597
|
name: 'latitudeFormat'
|
|
@@ -2627,7 +2604,7 @@
|
|
|
2627
2604
|
}
|
|
2628
2605
|
return LongitudeFormatPipe;
|
|
2629
2606
|
}());
|
|
2630
|
-
LongitudeFormatPipe.ɵprov =
|
|
2607
|
+
LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2631
2608
|
LongitudeFormatPipe.decorators = [
|
|
2632
2609
|
{ type: i0.Pipe, args: [{
|
|
2633
2610
|
name: 'longitudeFormat'
|
|
@@ -2650,7 +2627,7 @@
|
|
|
2650
2627
|
};
|
|
2651
2628
|
return NumberFormatPipe;
|
|
2652
2629
|
}());
|
|
2653
|
-
NumberFormatPipe.ɵprov =
|
|
2630
|
+
NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2654
2631
|
NumberFormatPipe.decorators = [
|
|
2655
2632
|
{ type: i0.Pipe, args: [{
|
|
2656
2633
|
name: 'numberFormat'
|
|
@@ -2693,7 +2670,7 @@
|
|
|
2693
2670
|
};
|
|
2694
2671
|
return HighlightPipe;
|
|
2695
2672
|
}());
|
|
2696
|
-
HighlightPipe.ɵprov =
|
|
2673
|
+
HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2697
2674
|
HighlightPipe.decorators = [
|
|
2698
2675
|
{ type: i0.Pipe, args: [{
|
|
2699
2676
|
name: 'highlight'
|
|
@@ -2761,7 +2738,7 @@
|
|
|
2761
2738
|
{ type: i0.Pipe, args: [{ name: 'fileSize' },] }
|
|
2762
2739
|
];
|
|
2763
2740
|
|
|
2764
|
-
var moment$
|
|
2741
|
+
var moment$1 = momentImported__namespace;
|
|
2765
2742
|
var tz = momentTZImported__namespace;
|
|
2766
2743
|
var DATE_UNIX_TIMESTAMP = 'X';
|
|
2767
2744
|
var DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2839,32 +2816,32 @@
|
|
|
2839
2816
|
if (!value || momentImported.isMoment(value))
|
|
2840
2817
|
return value;
|
|
2841
2818
|
// Parse the input value, as a ISO date time
|
|
2842
|
-
var date = moment$
|
|
2819
|
+
var date = moment$1(value, DATE_ISO_PATTERN);
|
|
2843
2820
|
if (date.isValid())
|
|
2844
2821
|
return date;
|
|
2845
2822
|
// Not valid: trying to convert from unix timestamp
|
|
2846
2823
|
if (typeof value === 'string') {
|
|
2847
2824
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2848
2825
|
if (value.length === 10) {
|
|
2849
|
-
return moment$
|
|
2826
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2850
2827
|
}
|
|
2851
2828
|
else if (value.length === 13) {
|
|
2852
|
-
return moment$
|
|
2829
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2853
2830
|
}
|
|
2854
2831
|
}
|
|
2855
2832
|
console.warn('Unable to parse date: ' + value);
|
|
2856
2833
|
return undefined;
|
|
2857
2834
|
}
|
|
2858
2835
|
function fromUnixTimestamp(timeInSec) {
|
|
2859
|
-
return moment$
|
|
2836
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2860
2837
|
}
|
|
2861
2838
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2862
|
-
return moment$
|
|
2839
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2863
2840
|
}
|
|
2864
2841
|
function toDuration(value, unit) {
|
|
2865
2842
|
if (!value)
|
|
2866
2843
|
return undefined;
|
|
2867
|
-
var duration = moment$
|
|
2844
|
+
var duration = moment$1.duration(value, unit);
|
|
2868
2845
|
// fix 990+ ms
|
|
2869
2846
|
if (duration.milliseconds() >= 990) {
|
|
2870
2847
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2894,7 +2871,7 @@
|
|
|
2894
2871
|
};
|
|
2895
2872
|
return DurationPipe;
|
|
2896
2873
|
}());
|
|
2897
|
-
DurationPipe.ɵprov =
|
|
2874
|
+
DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$2.TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2898
2875
|
DurationPipe.decorators = [
|
|
2899
2876
|
{ type: i0.Pipe, args: [{
|
|
2900
2877
|
name: 'duration'
|
|
@@ -2918,7 +2895,7 @@
|
|
|
2918
2895
|
};
|
|
2919
2896
|
return MathAbsPipe;
|
|
2920
2897
|
}());
|
|
2921
|
-
MathAbsPipe.ɵprov =
|
|
2898
|
+
MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2922
2899
|
MathAbsPipe.decorators = [
|
|
2923
2900
|
{ type: i0.Pipe, args: [{
|
|
2924
2901
|
name: 'mathAbs'
|
|
@@ -2933,7 +2910,7 @@
|
|
|
2933
2910
|
};
|
|
2934
2911
|
return EvenPipe;
|
|
2935
2912
|
}());
|
|
2936
|
-
EvenPipe.ɵprov =
|
|
2913
|
+
EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2937
2914
|
EvenPipe.decorators = [
|
|
2938
2915
|
{ type: i0.Pipe, args: [{
|
|
2939
2916
|
name: 'even'
|
|
@@ -2948,7 +2925,7 @@
|
|
|
2948
2925
|
};
|
|
2949
2926
|
return OddPipe;
|
|
2950
2927
|
}());
|
|
2951
|
-
OddPipe.ɵprov =
|
|
2928
|
+
OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2952
2929
|
OddPipe.decorators = [
|
|
2953
2930
|
{ type: i0.Pipe, args: [{
|
|
2954
2931
|
name: 'odd'
|
|
@@ -3080,7 +3057,7 @@
|
|
|
3080
3057
|
};
|
|
3081
3058
|
return MapGetPipe;
|
|
3082
3059
|
}());
|
|
3083
|
-
MapGetPipe.ɵprov =
|
|
3060
|
+
MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
3084
3061
|
MapGetPipe.decorators = [
|
|
3085
3062
|
{ type: i0.Pipe, args: [{
|
|
3086
3063
|
name: 'mapGet'
|
|
@@ -3097,7 +3074,7 @@
|
|
|
3097
3074
|
};
|
|
3098
3075
|
return MapKeysPipe;
|
|
3099
3076
|
}());
|
|
3100
|
-
MapKeysPipe.ɵprov =
|
|
3077
|
+
MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
3101
3078
|
MapKeysPipe.decorators = [
|
|
3102
3079
|
{ type: i0.Pipe, args: [{
|
|
3103
3080
|
name: 'mapKeys'
|
|
@@ -3114,7 +3091,7 @@
|
|
|
3114
3091
|
};
|
|
3115
3092
|
return MapValuesPipe;
|
|
3116
3093
|
}());
|
|
3117
|
-
MapValuesPipe.ɵprov =
|
|
3094
|
+
MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
3118
3095
|
MapValuesPipe.decorators = [
|
|
3119
3096
|
{ type: i0.Pipe, args: [{
|
|
3120
3097
|
name: 'mapValues'
|
|
@@ -3130,7 +3107,7 @@
|
|
|
3130
3107
|
};
|
|
3131
3108
|
return IsNotNilOrBlankPipe;
|
|
3132
3109
|
}());
|
|
3133
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
3110
|
+
IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
3134
3111
|
IsNotNilOrBlankPipe.decorators = [
|
|
3135
3112
|
{ type: i0.Pipe, args: [{
|
|
3136
3113
|
name: 'isNotNilOrBlank'
|
|
@@ -3145,7 +3122,7 @@
|
|
|
3145
3122
|
};
|
|
3146
3123
|
return IsNilOrBlankPipe;
|
|
3147
3124
|
}());
|
|
3148
|
-
IsNilOrBlankPipe.ɵprov =
|
|
3125
|
+
IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
3149
3126
|
IsNilOrBlankPipe.decorators = [
|
|
3150
3127
|
{ type: i0.Pipe, args: [{
|
|
3151
3128
|
name: 'isNilOrBlank'
|
|
@@ -3160,7 +3137,7 @@
|
|
|
3160
3137
|
};
|
|
3161
3138
|
return ToStringPipe;
|
|
3162
3139
|
}());
|
|
3163
|
-
ToStringPipe.ɵprov =
|
|
3140
|
+
ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
3164
3141
|
ToStringPipe.decorators = [
|
|
3165
3142
|
{ type: i0.Pipe, args: [{
|
|
3166
3143
|
name: 'toString'
|
|
@@ -3175,7 +3152,7 @@
|
|
|
3175
3152
|
};
|
|
3176
3153
|
return StrLengthPipe;
|
|
3177
3154
|
}());
|
|
3178
|
-
StrLengthPipe.ɵprov =
|
|
3155
|
+
StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
3179
3156
|
StrLengthPipe.decorators = [
|
|
3180
3157
|
{ type: i0.Pipe, args: [{
|
|
3181
3158
|
name: 'strLength'
|
|
@@ -3190,7 +3167,7 @@
|
|
|
3190
3167
|
};
|
|
3191
3168
|
return StrIncludesPipe;
|
|
3192
3169
|
}());
|
|
3193
|
-
StrIncludesPipe.ɵprov =
|
|
3170
|
+
StrIncludesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
|
|
3194
3171
|
StrIncludesPipe.decorators = [
|
|
3195
3172
|
{ type: i0.Pipe, args: [{
|
|
3196
3173
|
name: 'strIncludes'
|
|
@@ -3281,7 +3258,7 @@
|
|
|
3281
3258
|
};
|
|
3282
3259
|
return TranslateContextService;
|
|
3283
3260
|
}());
|
|
3284
|
-
TranslateContextService.ɵprov =
|
|
3261
|
+
TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$2.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
3285
3262
|
TranslateContextService.decorators = [
|
|
3286
3263
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
3287
3264
|
];
|
|
@@ -3338,7 +3315,7 @@
|
|
|
3338
3315
|
};
|
|
3339
3316
|
return PropertyGetPipe;
|
|
3340
3317
|
}());
|
|
3341
|
-
PropertyGetPipe.ɵprov =
|
|
3318
|
+
PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
3342
3319
|
PropertyGetPipe.decorators = [
|
|
3343
3320
|
{ type: i0.Pipe, args: [{
|
|
3344
3321
|
name: 'propertyGet'
|
|
@@ -3364,7 +3341,7 @@
|
|
|
3364
3341
|
ngInit: [{ type: i0.Output }]
|
|
3365
3342
|
};
|
|
3366
3343
|
|
|
3367
|
-
var moment$
|
|
3344
|
+
var moment$2 = momentImported__namespace;
|
|
3368
3345
|
// @dynamic
|
|
3369
3346
|
var SharedValidators = /** @class */ (function () {
|
|
3370
3347
|
function SharedValidators() {
|
|
@@ -3447,7 +3424,7 @@
|
|
|
3447
3424
|
};
|
|
3448
3425
|
SharedValidators.validDate = function (control) {
|
|
3449
3426
|
var value = control.value;
|
|
3450
|
-
var date = !value || moment$
|
|
3427
|
+
var date = !value || moment$2.isMoment(value) ? value : moment$2(value, DATE_ISO_PATTERN);
|
|
3451
3428
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3452
3429
|
return { validDate: true };
|
|
3453
3430
|
}
|
|
@@ -4654,7 +4631,7 @@
|
|
|
4654
4631
|
};
|
|
4655
4632
|
return FormErrorTranslator;
|
|
4656
4633
|
}());
|
|
4657
|
-
FormErrorTranslator.ɵprov =
|
|
4634
|
+
FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
4658
4635
|
FormErrorTranslator.decorators = [
|
|
4659
4636
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4660
4637
|
];
|
|
@@ -4739,7 +4716,7 @@
|
|
|
4739
4716
|
};
|
|
4740
4717
|
return FormGetPipe;
|
|
4741
4718
|
}());
|
|
4742
|
-
FormGetPipe.ɵprov =
|
|
4719
|
+
FormGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4743
4720
|
FormGetPipe.decorators = [
|
|
4744
4721
|
{ type: i0.Pipe, args: [{
|
|
4745
4722
|
name: 'formGet'
|
|
@@ -4754,7 +4731,7 @@
|
|
|
4754
4731
|
};
|
|
4755
4732
|
return FormGetControlPipe;
|
|
4756
4733
|
}());
|
|
4757
|
-
FormGetControlPipe.ɵprov =
|
|
4734
|
+
FormGetControlPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4758
4735
|
FormGetControlPipe.decorators = [
|
|
4759
4736
|
{ type: i0.Pipe, args: [{
|
|
4760
4737
|
name: 'formGetControl'
|
|
@@ -4769,7 +4746,7 @@
|
|
|
4769
4746
|
};
|
|
4770
4747
|
return FormGetArrayPipe;
|
|
4771
4748
|
}());
|
|
4772
|
-
FormGetArrayPipe.ɵprov =
|
|
4749
|
+
FormGetArrayPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4773
4750
|
FormGetArrayPipe.decorators = [
|
|
4774
4751
|
{ type: i0.Pipe, args: [{
|
|
4775
4752
|
name: 'formGetArray'
|
|
@@ -4784,7 +4761,7 @@
|
|
|
4784
4761
|
};
|
|
4785
4762
|
return FormGetGroupPipe;
|
|
4786
4763
|
}());
|
|
4787
|
-
FormGetGroupPipe.ɵprov =
|
|
4764
|
+
FormGetGroupPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4788
4765
|
FormGetGroupPipe.decorators = [
|
|
4789
4766
|
{ type: i0.Pipe, args: [{
|
|
4790
4767
|
name: 'formGetGroup'
|
|
@@ -5130,9 +5107,9 @@
|
|
|
5130
5107
|
var hour = parseInt(durationParts[0] || '0');
|
|
5131
5108
|
var minute = parseInt(durationParts[1] || '0');
|
|
5132
5109
|
var value = hour + (minute + 0.5) / 60;
|
|
5133
|
-
return roundFloat(value, maxDecimals);
|
|
5110
|
+
return roundFloat$1(value, maxDecimals);
|
|
5134
5111
|
}
|
|
5135
|
-
function roundFloat(input, maxDecimals) {
|
|
5112
|
+
function roundFloat$1(input, maxDecimals) {
|
|
5136
5113
|
if (maxDecimals > 0) {
|
|
5137
5114
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
5138
5115
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -5156,17 +5133,17 @@
|
|
|
5156
5133
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
5157
5134
|
}
|
|
5158
5135
|
};
|
|
5159
|
-
var noop$
|
|
5136
|
+
var noop$1 = function () {
|
|
5160
5137
|
};
|
|
5161
|
-
var ɵ0$
|
|
5138
|
+
var ɵ0$2 = noop$1;
|
|
5162
5139
|
var MatLatLongField = /** @class */ (function () {
|
|
5163
5140
|
function MatLatLongField(translate, formBuilder, cd, formGroupDir) {
|
|
5164
5141
|
this.translate = translate;
|
|
5165
5142
|
this.formBuilder = formBuilder;
|
|
5166
5143
|
this.cd = cd;
|
|
5167
5144
|
this.formGroupDir = formGroupDir;
|
|
5168
|
-
this._onChangeCallback = noop$
|
|
5169
|
-
this._onTouchedCallback = noop$
|
|
5145
|
+
this._onChangeCallback = noop$1;
|
|
5146
|
+
this._onTouchedCallback = noop$1;
|
|
5170
5147
|
this._subscription = new rxjs.Subscription();
|
|
5171
5148
|
this.disabling = false;
|
|
5172
5149
|
this.writing = false;
|
|
@@ -5517,14 +5494,14 @@
|
|
|
5517
5494
|
},] }
|
|
5518
5495
|
];
|
|
5519
5496
|
|
|
5520
|
-
var DEFAULT_VALUE_ACCESSOR
|
|
5497
|
+
var DEFAULT_VALUE_ACCESSOR = {
|
|
5521
5498
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5522
5499
|
useExisting: i0.forwardRef(function () { return MatDate; }),
|
|
5523
5500
|
multi: true
|
|
5524
5501
|
};
|
|
5525
|
-
var
|
|
5526
|
-
var noop$
|
|
5527
|
-
var ɵ0$
|
|
5502
|
+
var TEXT_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5503
|
+
var noop$2 = function () { };
|
|
5504
|
+
var ɵ0$3 = noop$2;
|
|
5528
5505
|
var MatDate = /** @class */ (function () {
|
|
5529
5506
|
function MatDate(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5530
5507
|
this.dateAdapter = dateAdapter;
|
|
@@ -5533,13 +5510,13 @@
|
|
|
5533
5510
|
this.cd = cd;
|
|
5534
5511
|
this.keyboard = keyboard;
|
|
5535
5512
|
this.formGroupDir = formGroupDir;
|
|
5536
|
-
this._onChangeCallback = noop$
|
|
5537
|
-
this._onTouchedCallback = noop$
|
|
5513
|
+
this._onChangeCallback = noop$2;
|
|
5514
|
+
this._onTouchedCallback = noop$2;
|
|
5538
5515
|
this._subscription = new rxjs.Subscription();
|
|
5539
5516
|
this._writing = true;
|
|
5540
5517
|
this._disabling = false;
|
|
5541
5518
|
this._readonly = false;
|
|
5542
|
-
this.
|
|
5519
|
+
this.mask = TEXT_MASK;
|
|
5543
5520
|
this.floatLabel = 'auto';
|
|
5544
5521
|
this.compact = false;
|
|
5545
5522
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5598,22 +5575,24 @@
|
|
|
5598
5575
|
this.formControl.setValidators(this.required ? [this.formControl.validator, i1.Validators.required, SharedValidators.validDate] :
|
|
5599
5576
|
[this.formControl.validator, SharedValidators.validDate]);
|
|
5600
5577
|
}
|
|
5601
|
-
// Create the
|
|
5602
|
-
this.
|
|
5578
|
+
// Create the text control
|
|
5579
|
+
this.textControl = this.formBuilder.control(null,
|
|
5580
|
+
// Important: should copy errors from the model formControl
|
|
5581
|
+
function () { return _this.formControl.errors; });
|
|
5603
5582
|
// Get patterns to display date
|
|
5604
5583
|
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
5605
5584
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
5606
5585
|
.subscribe(function (pattern) { return _this.updatePattern(pattern); }));
|
|
5607
|
-
this._subscription.add(this.
|
|
5586
|
+
this._subscription.add(this.textControl.valueChanges
|
|
5608
5587
|
.subscribe(function (value) { return _this.onFormChange(value); }));
|
|
5609
5588
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5610
5589
|
this._subscription.add(this.formControl.statusChanges
|
|
5611
5590
|
.pipe(operators.filter(function (_) { return !_this.readonly && !_this._writing && !_this._disabling; }) // Skip
|
|
5612
5591
|
)
|
|
5613
5592
|
.subscribe(function () {
|
|
5614
|
-
_this.
|
|
5615
|
-
if (_this.formControl.touched && !_this.
|
|
5616
|
-
_this.
|
|
5593
|
+
_this.textControl.updateValueAndValidity({ emitEvent: false });
|
|
5594
|
+
if (_this.formControl.touched && !_this.textControl.touched) {
|
|
5595
|
+
_this.textControl.markAsTouched();
|
|
5617
5596
|
}
|
|
5618
5597
|
_this.markForCheck();
|
|
5619
5598
|
}));
|
|
@@ -5629,27 +5608,25 @@
|
|
|
5629
5608
|
this._writing = true;
|
|
5630
5609
|
// DEBUG
|
|
5631
5610
|
//console.debug("[mat-date] writeValue() with:", value);
|
|
5632
|
-
// Convert into date
|
|
5611
|
+
// Convert into date
|
|
5612
|
+
// Important: do a clone()
|
|
5633
5613
|
var date = momentImported.isMoment(value) ? value.clone() : fromDateISOString(value);
|
|
5634
5614
|
if (!date || !date.isValid()) {
|
|
5635
|
-
this.
|
|
5615
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5636
5616
|
if (this.formControl.value) {
|
|
5637
5617
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5638
5618
|
this._onChangeCallback(null);
|
|
5639
5619
|
}
|
|
5640
5620
|
}
|
|
5641
5621
|
else {
|
|
5642
|
-
//
|
|
5643
|
-
|
|
5644
|
-
//
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
if (this.dayControl.value !== dayStr) {
|
|
5651
|
-
// Update control
|
|
5652
|
-
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
5622
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
5623
|
+
date = (this.timezone && date.tz(this.timezone) || date)
|
|
5624
|
+
// Reset hour
|
|
5625
|
+
.startOf('day');
|
|
5626
|
+
var dayStr = this.dateAdapter.format(date, this.datePattern);
|
|
5627
|
+
if (this.textControl.value !== dayStr) {
|
|
5628
|
+
// Update day control
|
|
5629
|
+
this.textControl.patchValue(dayStr, { emitEvent: false });
|
|
5653
5630
|
}
|
|
5654
5631
|
}
|
|
5655
5632
|
this._writing = false;
|
|
@@ -5666,10 +5643,10 @@
|
|
|
5666
5643
|
return;
|
|
5667
5644
|
this._disabling = true;
|
|
5668
5645
|
if (isDisabled) {
|
|
5669
|
-
this.
|
|
5646
|
+
this.textControl.disable({ emitEvent: false });
|
|
5670
5647
|
}
|
|
5671
5648
|
else {
|
|
5672
|
-
this.
|
|
5649
|
+
this.textControl.enable({ emitEvent: false });
|
|
5673
5650
|
}
|
|
5674
5651
|
this._disabling = false;
|
|
5675
5652
|
this.markForCheck();
|
|
@@ -5686,12 +5663,12 @@
|
|
|
5686
5663
|
.locale(this.locale) // set as time as locale time
|
|
5687
5664
|
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5688
5665
|
.utc(true);
|
|
5689
|
-
dateStr = this.dateAdapter.format(date, this.
|
|
5666
|
+
dateStr = this.dateAdapter.format(date, this.datePattern) || null;
|
|
5690
5667
|
}
|
|
5691
|
-
if (this.
|
|
5668
|
+
if (this.textControl.value !== dateStr) {
|
|
5692
5669
|
// DEBUG
|
|
5693
5670
|
//console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5694
|
-
this.
|
|
5671
|
+
this.textControl.setValue(dateStr, {
|
|
5695
5672
|
emitEvent: true // Will call onFormChange
|
|
5696
5673
|
});
|
|
5697
5674
|
}
|
|
@@ -5746,7 +5723,7 @@
|
|
|
5746
5723
|
});
|
|
5747
5724
|
};
|
|
5748
5725
|
MatDate.prototype.clear = function () {
|
|
5749
|
-
this.
|
|
5726
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5750
5727
|
this.formControl.setValue(null, { emitEvent: false });
|
|
5751
5728
|
this._onChangeCallback(null);
|
|
5752
5729
|
this.markAsTouched();
|
|
@@ -5755,43 +5732,70 @@
|
|
|
5755
5732
|
/* -- private method -- */
|
|
5756
5733
|
MatDate.prototype.updatePattern = function (pattern) {
|
|
5757
5734
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5758
|
-
if (this.
|
|
5759
|
-
this.
|
|
5760
|
-
this.dayPattern = pattern;
|
|
5735
|
+
if (this.datePattern !== pattern) {
|
|
5736
|
+
this.datePattern = pattern;
|
|
5761
5737
|
this.markForCheck();
|
|
5762
5738
|
}
|
|
5763
5739
|
};
|
|
5764
5740
|
MatDate.prototype.checkIfTouched = function (opts) {
|
|
5765
|
-
if (this.
|
|
5741
|
+
if (this.textControl.touched) {
|
|
5766
5742
|
this._onTouchedCallback();
|
|
5767
5743
|
if (!opts || opts.emitEvent !== false) {
|
|
5768
5744
|
this.markForCheck();
|
|
5769
5745
|
}
|
|
5770
5746
|
}
|
|
5771
5747
|
};
|
|
5772
|
-
MatDate.prototype.onFormChange = function (
|
|
5748
|
+
MatDate.prototype.onFormChange = function (value) {
|
|
5773
5749
|
if (this._writing)
|
|
5774
5750
|
return; // Skip if call by self
|
|
5775
5751
|
this._writing = true;
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5752
|
+
// DEBUG
|
|
5753
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5754
|
+
/*if (this.dayControl.invalid) {
|
|
5755
|
+
this.formControl.markAsPending({onlySelf: true});
|
|
5756
|
+
this.formControl.setErrors({
|
|
5757
|
+
...this.formControl.errors,
|
|
5758
|
+
...this.dayControl.errors
|
|
5759
|
+
});
|
|
5760
|
+
this.formControl.markAsDirty();
|
|
5761
|
+
this._writing = false;
|
|
5762
|
+
return;
|
|
5763
|
+
}*/
|
|
5764
|
+
if (value) {
|
|
5765
|
+
// Make to remove placeholder chars
|
|
5766
|
+
while (value.indexOf(this.placeholderChar) !== -1) {
|
|
5767
|
+
value = value.replace(this.placeholderChar, '');
|
|
5768
|
+
}
|
|
5769
|
+
// Force '0' for empty month (otherwise moment will use the current month)
|
|
5770
|
+
value = value.replace('//', '/0/')
|
|
5771
|
+
// Force '0' for empty year (otherwise moment will use the current year)
|
|
5772
|
+
.replace(/\/$/, '/0');
|
|
5786
5773
|
}
|
|
5787
|
-
// Parse
|
|
5788
|
-
var
|
|
5774
|
+
// Parse date (strict = false)
|
|
5775
|
+
var date = isNotNilOrBlank(value) && this.dateAdapter.parse(value, this.datePattern) || null;
|
|
5789
5776
|
// Move to the expected TZ, and keep the local hour (= midnight) to have midnight at local time
|
|
5790
|
-
|
|
5791
|
-
|
|
5777
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date) || null;
|
|
5778
|
+
date = date && date
|
|
5792
5779
|
.startOf('day') // Reset hour
|
|
5793
|
-
.utc()
|
|
5794
|
-
|
|
5780
|
+
.utc() // Convert to UTC (avoid TZ offset in final string)
|
|
5781
|
+
|| null;
|
|
5782
|
+
// Convert to model value (ISO date string)
|
|
5783
|
+
// IMPORTANT: If date is invalid, then keep the invalid string value
|
|
5784
|
+
// to allow SharedValidators.validDate() to raise an error
|
|
5785
|
+
var formControlValue = date && date.isValid() ? toDateISOString(date) : (value || null);
|
|
5786
|
+
if (this.formControl.value !== formControlValue) {
|
|
5787
|
+
// DEBUG
|
|
5788
|
+
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5789
|
+
// Apply to form control. => Will call writeValue()
|
|
5790
|
+
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5791
|
+
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5792
|
+
// Changes comes from inside function: use the callback
|
|
5793
|
+
this._onChangeCallback(formControlValue);
|
|
5794
|
+
// Check if need to update controls
|
|
5795
|
+
this.checkIfTouched();
|
|
5796
|
+
}
|
|
5797
|
+
// Force the day control to update its validity (same errors as formControl - see ngOnInit())
|
|
5798
|
+
this.textControl.updateValueAndValidity();
|
|
5795
5799
|
this._writing = false;
|
|
5796
5800
|
};
|
|
5797
5801
|
MatDate.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
@@ -5818,21 +5822,6 @@
|
|
|
5818
5822
|
});
|
|
5819
5823
|
});
|
|
5820
5824
|
};
|
|
5821
|
-
MatDate.prototype.emitChange = function (value) {
|
|
5822
|
-
// Get the model value
|
|
5823
|
-
var dateStr = toDateISOString(value) || null;
|
|
5824
|
-
if (this.formControl.value !== dateStr) {
|
|
5825
|
-
// DEBUG
|
|
5826
|
-
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5827
|
-
// Apply to form control. => Will call writeValue()
|
|
5828
|
-
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5829
|
-
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5830
|
-
// Changes comes from inside function: use the callback
|
|
5831
|
-
this._onChangeCallback(dateStr);
|
|
5832
|
-
// Check if need to update controls
|
|
5833
|
-
this.checkIfTouched();
|
|
5834
|
-
}
|
|
5835
|
-
};
|
|
5836
5825
|
MatDate.prototype.updateTabIndex = function () {
|
|
5837
5826
|
var _this = this;
|
|
5838
5827
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
@@ -5846,7 +5835,7 @@
|
|
|
5846
5835
|
});
|
|
5847
5836
|
};
|
|
5848
5837
|
MatDate.prototype.markAsTouched = function (opts) {
|
|
5849
|
-
this.
|
|
5838
|
+
this.textControl.markAsTouched(opts);
|
|
5850
5839
|
this._onTouchedCallback();
|
|
5851
5840
|
this.markForCheck();
|
|
5852
5841
|
};
|
|
@@ -5861,16 +5850,16 @@
|
|
|
5861
5850
|
MatDate.decorators = [
|
|
5862
5851
|
{ type: i0.Component, args: [{
|
|
5863
5852
|
selector: 'mat-date-field',
|
|
5864
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern:
|
|
5853
|
+
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: datePattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"textControl\"\n [textMask]=\"{mask: mask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"textControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <!-- errors -->\n <mat-error *ngIf=\"formControl.touched && formControl.errors|mapKeys|arrayFirst; let errorKey\">\n <ng-container [ngSwitch]=\"errorKey\">\n <span *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</span>\n <span *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE</span>\n <span *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</span>\n <span *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</span>\n <span *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</span>\n <span *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</span>\n <span *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</span>\n <span *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</span>\n </ng-container>\n </mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"\n ></mat-datepicker>\n\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
5865
5854
|
providers: [
|
|
5866
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5855
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5867
5856
|
],
|
|
5868
5857
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5869
5858
|
styles: [":host{display:inline-block;width:100%;position:relative}:host [no-padding]{--ion-grid-column-padding:0}:host [nowrap]{flex-wrap:nowrap}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md,mat-form-field ion-datetime{padding:0!important}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
|
|
5870
5859
|
},] }
|
|
5871
5860
|
];
|
|
5872
5861
|
MatDate.ctorParameters = function () { return [
|
|
5873
|
-
{ type: i1$
|
|
5862
|
+
{ type: i1$1.MomentDateAdapter },
|
|
5874
5863
|
{ type: i1$2.TranslateService },
|
|
5875
5864
|
{ type: i1.FormBuilder },
|
|
5876
5865
|
{ type: i0.ChangeDetectorRef },
|
|
@@ -5897,16 +5886,16 @@
|
|
|
5897
5886
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
5898
5887
|
};
|
|
5899
5888
|
|
|
5900
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
5889
|
+
var DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5901
5890
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5902
5891
|
useExisting: i0.forwardRef(function () { return MatDateTime; }),
|
|
5903
5892
|
multi: true
|
|
5904
5893
|
};
|
|
5905
|
-
var DAY_MASK
|
|
5894
|
+
var DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5906
5895
|
var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5907
|
-
var HOUR_MASK
|
|
5908
|
-
var noop$
|
|
5909
|
-
var ɵ0$
|
|
5896
|
+
var HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5897
|
+
var noop$3 = function () { };
|
|
5898
|
+
var ɵ0$4 = noop$3;
|
|
5910
5899
|
var MatDateTime = /** @class */ (function () {
|
|
5911
5900
|
function MatDateTime(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5912
5901
|
this.dateAdapter = dateAdapter;
|
|
@@ -5915,14 +5904,14 @@
|
|
|
5915
5904
|
this.cd = cd;
|
|
5916
5905
|
this.keyboard = keyboard;
|
|
5917
5906
|
this.formGroupDir = formGroupDir;
|
|
5918
|
-
this._onChangeCallback = noop$
|
|
5919
|
-
this._onTouchedCallback = noop$
|
|
5907
|
+
this._onChangeCallback = noop$3;
|
|
5908
|
+
this._onTouchedCallback = noop$3;
|
|
5920
5909
|
this._subscription = new rxjs.Subscription();
|
|
5921
5910
|
this._writing = true;
|
|
5922
5911
|
this._disabling = false;
|
|
5923
5912
|
this._readonly = false;
|
|
5924
|
-
this.dayMask = DAY_MASK
|
|
5925
|
-
this.hourMask = HOUR_MASK
|
|
5913
|
+
this.dayMask = DAY_MASK;
|
|
5914
|
+
this.hourMask = HOUR_MASK;
|
|
5926
5915
|
this.floatLabel = 'auto';
|
|
5927
5916
|
this.compact = false;
|
|
5928
5917
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -6281,14 +6270,14 @@
|
|
|
6281
6270
|
selector: 'mat-date-time-field',
|
|
6282
6271
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (hourControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"hourControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"hourControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"hourControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
6283
6272
|
providers: [
|
|
6284
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6273
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
6285
6274
|
],
|
|
6286
6275
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6287
6276
|
styles: [":host{display:inline-block;width:100%;position:relative;--ion-grid-column-padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md{padding:0!important}ion-row.no-wrap{flex-wrap:nowrap}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
|
|
6288
6277
|
},] }
|
|
6289
6278
|
];
|
|
6290
6279
|
MatDateTime.ctorParameters = function () { return [
|
|
6291
|
-
{ type: i1$
|
|
6280
|
+
{ type: i1$1.MomentDateAdapter },
|
|
6292
6281
|
{ type: i1$2.TranslateService },
|
|
6293
6282
|
{ type: i1.FormBuilder },
|
|
6294
6283
|
{ type: i0.ChangeDetectorRef },
|
|
@@ -6315,15 +6304,15 @@
|
|
|
6315
6304
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
6316
6305
|
};
|
|
6317
6306
|
|
|
6318
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6307
|
+
var DEFAULT_VALUE_ACCESSOR$2 = {
|
|
6319
6308
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6320
6309
|
useExisting: i0.forwardRef(function () { return MatDateShort; }),
|
|
6321
6310
|
multi: true
|
|
6322
6311
|
};
|
|
6323
|
-
var DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
6312
|
+
var DAY_MASK$1 = [/\d/, /\d/, /\d/, /\d/];
|
|
6324
6313
|
var noop$4 = function () {
|
|
6325
6314
|
};
|
|
6326
|
-
var ɵ0$
|
|
6315
|
+
var ɵ0$5 = noop$4;
|
|
6327
6316
|
var MatDateShort = /** @class */ (function () {
|
|
6328
6317
|
function MatDateShort(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
6329
6318
|
this.dateAdapter = dateAdapter;
|
|
@@ -6336,7 +6325,7 @@
|
|
|
6336
6325
|
this._onTouchedCallback = noop$4;
|
|
6337
6326
|
this.writing = true;
|
|
6338
6327
|
this.disabling = false;
|
|
6339
|
-
this.dayMask = DAY_MASK;
|
|
6328
|
+
this.dayMask = DAY_MASK$1;
|
|
6340
6329
|
this.disabled = false;
|
|
6341
6330
|
this.floatLabel = 'auto';
|
|
6342
6331
|
this.readonly = false;
|
|
@@ -6613,7 +6602,7 @@
|
|
|
6613
6602
|
selector: 'mat-date-short-field',
|
|
6614
6603
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_YEAR_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker1)\"\n (keyup.escape)=\"preventEvent($event)\"\n (click)=\"matInput.select()\"\n [required]=\"required\"\n [tabindex]=\"tabindex\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker1)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker1\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker1)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n\n <mat-datepicker #datePicker1\n startView=\"multi-year\"\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n (yearSelected)=\"closeDatePicker($event, datePicker1)\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n",
|
|
6615
6604
|
providers: [
|
|
6616
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6605
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
6617
6606
|
],
|
|
6618
6607
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6619
6608
|
styles: [":host{display:inline-block;width:100%;position:relative}:host [no-padding]{--ion-grid-column-padding:0}:host [nowrap]{flex-wrap:nowrap}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md,mat-form-field ion-datetime{padding:0!important}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
|
|
@@ -6684,16 +6673,16 @@
|
|
|
6684
6673
|
},] }
|
|
6685
6674
|
];
|
|
6686
6675
|
|
|
6687
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6676
|
+
var DEFAULT_VALUE_ACCESSOR$3 = {
|
|
6688
6677
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6689
6678
|
useExisting: i0.forwardRef(function () { return MatDuration; }),
|
|
6690
6679
|
multi: true
|
|
6691
6680
|
};
|
|
6692
6681
|
var HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
6693
|
-
var HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6694
|
-
var noop$
|
|
6682
|
+
var HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6683
|
+
var noop$5 = function () {
|
|
6695
6684
|
};
|
|
6696
|
-
var ɵ0$6 = noop$
|
|
6685
|
+
var ɵ0$6 = noop$5;
|
|
6697
6686
|
var MatDuration = /** @class */ (function () {
|
|
6698
6687
|
function MatDuration(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
6699
6688
|
this.dateAdapter = dateAdapter;
|
|
@@ -6702,11 +6691,11 @@
|
|
|
6702
6691
|
this.cd = cd;
|
|
6703
6692
|
this.formGroupDir = formGroupDir;
|
|
6704
6693
|
this._subscription = new rxjs.Subscription();
|
|
6705
|
-
this._onChangeCallback = noop$
|
|
6706
|
-
this._onTouchedCallback = noop$
|
|
6694
|
+
this._onChangeCallback = noop$5;
|
|
6695
|
+
this._onTouchedCallback = noop$5;
|
|
6707
6696
|
this.writing = true;
|
|
6708
6697
|
this.disabling = false;
|
|
6709
|
-
this.hourMask = HOUR_MASK;
|
|
6698
|
+
this.hourMask = HOUR_MASK$1;
|
|
6710
6699
|
this.disabled = false;
|
|
6711
6700
|
this.floatLabel = 'auto';
|
|
6712
6701
|
this.readonly = false;
|
|
@@ -6899,7 +6888,7 @@
|
|
|
6899
6888
|
selector: 'mat-duration-field',
|
|
6900
6889
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{ formControl.value|duration }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput type=\"text\"\n autocomplete=\"off\"\n [formControl]=\"textControl\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.DURATION_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keydown.tab)=\"moveCaretToSeparator($event, true)\"\n (keydown.shift.tab)=\"moveCaretToSeparator($event, false)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n\n <!-- errors -->\n <mat-error *ngIf=\"!formControl.hasError('required') && textControl.hasError('pattern')\" translate>ERROR.FIELD_NOT_VALID_PATTERN</mat-error>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('min')\">\n {{(compact ? 'ERROR.FIELD_MIN_COMPACT' : 'ERROR.FIELD_MIN') | translate:formControl.errors.min }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('max')\">\n {{(compact ? 'ERROR.FIELD_MAX_COMPACT' : 'ERROR.FIELD_MAX') | translate:formControl.errors.max }}</mat-error>\n\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n</ng-template>\n\n",
|
|
6901
6890
|
providers: [
|
|
6902
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6891
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6903
6892
|
],
|
|
6904
6893
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6905
6894
|
styles: [":host{display:inline-block;min-width:140px;position:relative;--ion-grid-column-padding:0}:host,mat-form-field{width:100%}mat-form-field .mat-form-field-subscript-wrapper{overflow:visible;top:100%}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}mat-error{text-align:right;width:100%}"]
|
|
@@ -6959,22 +6948,22 @@
|
|
|
6959
6948
|
},] }
|
|
6960
6949
|
];
|
|
6961
6950
|
|
|
6962
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6951
|
+
var DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6963
6952
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6964
6953
|
useExisting: i0.forwardRef(function () { return MatBooleanField; }),
|
|
6965
6954
|
multi: true
|
|
6966
6955
|
};
|
|
6967
|
-
var noop$
|
|
6956
|
+
var noop$6 = function () {
|
|
6968
6957
|
};
|
|
6969
|
-
var ɵ0$
|
|
6958
|
+
var ɵ0$7 = noop$6;
|
|
6970
6959
|
var MatBooleanField = /** @class */ (function () {
|
|
6971
6960
|
function MatBooleanField(translate, formBuilder, cd, formGroupDir) {
|
|
6972
6961
|
this.translate = translate;
|
|
6973
6962
|
this.formBuilder = formBuilder;
|
|
6974
6963
|
this.cd = cd;
|
|
6975
6964
|
this.formGroupDir = formGroupDir;
|
|
6976
|
-
this._onChangeCallback = noop$
|
|
6977
|
-
this._onTouchedCallback = noop$
|
|
6965
|
+
this._onChangeCallback = noop$6;
|
|
6966
|
+
this._onTouchedCallback = noop$6;
|
|
6978
6967
|
this._writing = false;
|
|
6979
6968
|
this.showRadio = false;
|
|
6980
6969
|
this.disabled = false;
|
|
@@ -7149,7 +7138,7 @@
|
|
|
7149
7138
|
selector: 'mat-boolean-field',
|
|
7150
7139
|
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value == null && 'COMMON.EMPTY_OPTION' || (formControl.value === true && yesLabel) || noLabel) | translate }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio {{classList}}\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{yesLabel|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span>{{yesLabel|translate}}</span>\n </mat-radio-button> \n <mat-radio-button #noButton [value]=\"false\">\n <span>{{noLabel|translate}}</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox {{classList}}\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label> </ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <div class=\"mat-form-field-buttons\"\n [style.--buttons-col-count]=\"buttonsColCount\"\n *ngIf=\"!formControl.disabled; else disabledLabel\">\n <!-- yes -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === true) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && yesIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{yesLabel|translate}}\n </ion-button>\n\n <!-- No button -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex !== undefined ? (_tabindex + 1) : undefined\"\n (click)=\"writeValue(false, $event)\"\n (keyup.enter)=\"writeValue(false, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === false) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && noIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{noLabel|translate}}\n </ion-button>\n </div>\n <ng-template #disabledLabel>\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ng-template>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n<ng-template #matSuffixTemplate>\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
7151
7140
|
providers: [
|
|
7152
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
7141
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
7153
7142
|
],
|
|
7154
7143
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
7155
7144
|
styles: [":host{width:100%}.mat-form-field.mat-boolean-field-radio{margin-top:-2px}.mat-form-field.mat-boolean-field-button{margin-top:-4px}.mat-form-field .mat-form-field-buttons{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}.mat-form-field .mat-form-field-buttons .mat-form-field-button{--flex-basis:calc(100% / var(--buttons-col-count, 2));flex:0 1 var(--flex-basis);max-width:min(var(--flex-basis),150px);white-space:normal;padding:0 2px;height:40px}"]
|
|
@@ -7236,7 +7225,6 @@
|
|
|
7236
7225
|
return MatNumpadEvent;
|
|
7237
7226
|
}(KeyboardEvent));
|
|
7238
7227
|
|
|
7239
|
-
exports.AnimationState = void 0;
|
|
7240
7228
|
(function (AnimationState) {
|
|
7241
7229
|
AnimationState["ENTER"] = "enter";
|
|
7242
7230
|
AnimationState["ENTER_INPUT"] = "enter-input";
|
|
@@ -7404,7 +7392,7 @@
|
|
|
7404
7392
|
};
|
|
7405
7393
|
return MatNumpadDomService;
|
|
7406
7394
|
}());
|
|
7407
|
-
MatNumpadDomService.ɵprov =
|
|
7395
|
+
MatNumpadDomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$4.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
7408
7396
|
MatNumpadDomService.decorators = [
|
|
7409
7397
|
{ type: i0.Injectable, args: [{
|
|
7410
7398
|
providedIn: 'root'
|
|
@@ -7810,7 +7798,7 @@
|
|
|
7810
7798
|
},] }
|
|
7811
7799
|
];
|
|
7812
7800
|
|
|
7813
|
-
var DEFAULT_VALUE_ACCESSOR = {
|
|
7801
|
+
var DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7814
7802
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7815
7803
|
useExisting: i0.forwardRef(function () { return MatSwipeField; }),
|
|
7816
7804
|
multi: true
|
|
@@ -8130,7 +8118,7 @@
|
|
|
8130
8118
|
{ type: i0.Component, args: [{
|
|
8131
8119
|
selector: 'mat-swipe-field',
|
|
8132
8120
|
template: "<mat-form-field [floatLabel]=\"showSlides && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n [class]=\"classList\"\n [class.mat-form-field-disabled]=\"disabled\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n </mat-label>\n <input matInput #fakeInput type=\"text\"\n [formControl]=\"formControl\"\n [readonly]=\"true\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showSlides\"\n [tabindex]=\"tabindex\">\n\n <div class=\"slides-container\" [class.hidden]=\"!showSlides\">\n <ion-slides #slides\n [options]=\"slidesOptions\"\n (ionSlidesDidLoad)=\"slidesLoaded()\"\n (ionSlideReachStart)=\"reachStart(true)\"\n (ionSlideReachEnd)=\"reachEnd(true)\"\n (ionSlideNextEnd)=\"reachStart(false)\"\n (ionSlidePrevEnd)=\"reachEnd(false)\"\n (ionSlideDidChange)=\"slideChanged()\"\n >\n <ion-slide *ngFor=\"let item of $items | async\">\n <ion-label>{{ displayWith(item) }}</ion-label>\n </ion-slide>\n\n </ion-slides>\n </div>\n\n <button #prevButton\n mat-icon-button\n type=\"button\"\n class=\"button-prev\"\n [hidden]=\"!showSlides\"\n [disabled]=\"previousDisabled\"\n (click)=\"previous()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button #nextButton\n mat-icon-button\n type=\"button\"\n class=\"button-next\"\n [hidden]=\"!showSlides\"\n [disabled]=\"nextDisabled\"\n (click)=\"next()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n\n</mat-form-field>\n",
|
|
8133
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
8121
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
8134
8122
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
8135
8123
|
styles: [":host{display:inline-block;width:100%;position:relative}input.hidden{display:none}.slides-container .swiper-slide{font-size:16px!important}.slides-container.hidden{visibility:hidden;height:0!important}.button-next,.button-prev{position:absolute;top:calc(50% - 20px);z-index:10}.button-prev{left:0;right:auto}.button-next{left:auto;right:0}"]
|
|
8136
8124
|
},] }
|
|
@@ -8191,14 +8179,14 @@
|
|
|
8191
8179
|
},] }
|
|
8192
8180
|
];
|
|
8193
8181
|
|
|
8194
|
-
var noop$
|
|
8195
|
-
var ɵ0$
|
|
8182
|
+
var noop$7 = function () { };
|
|
8183
|
+
var ɵ0$8 = noop$7;
|
|
8196
8184
|
var MatChipsField = /** @class */ (function () {
|
|
8197
8185
|
function MatChipsField(cd, formGroupDir) {
|
|
8198
8186
|
this.cd = cd;
|
|
8199
8187
|
this.formGroupDir = formGroupDir;
|
|
8200
|
-
this._onChangeCallback = noop$
|
|
8201
|
-
this._onTouchedCallback = noop$
|
|
8188
|
+
this._onChangeCallback = noop$7;
|
|
8189
|
+
this._onTouchedCallback = noop$7;
|
|
8202
8190
|
this.logPrefix = '[mat-chips] ';
|
|
8203
8191
|
this.formControlName = null;
|
|
8204
8192
|
this.required = false;
|
|
@@ -9169,7 +9157,7 @@
|
|
|
9169
9157
|
};
|
|
9170
9158
|
return ProgressBarService;
|
|
9171
9159
|
}());
|
|
9172
|
-
ProgressBarService.ɵprov =
|
|
9160
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
9173
9161
|
ProgressBarService.decorators = [
|
|
9174
9162
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9175
9163
|
];
|
|
@@ -9216,7 +9204,7 @@
|
|
|
9216
9204
|
};
|
|
9217
9205
|
return AppGestureConfig;
|
|
9218
9206
|
}(i1$6.HammerGestureConfig));
|
|
9219
|
-
AppGestureConfig.ɵprov =
|
|
9207
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
9220
9208
|
AppGestureConfig.decorators = [
|
|
9221
9209
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9222
9210
|
];
|
|
@@ -9483,7 +9471,7 @@
|
|
|
9483
9471
|
};
|
|
9484
9472
|
return MatPaginatorI18n;
|
|
9485
9473
|
}(paginator.MatPaginatorIntl));
|
|
9486
|
-
MatPaginatorI18n.ɵprov =
|
|
9474
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
9487
9475
|
MatPaginatorI18n.decorators = [
|
|
9488
9476
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9489
9477
|
];
|
|
@@ -9575,17 +9563,17 @@
|
|
|
9575
9563
|
return rgbArrayToHex(rgb.map(function (v) { return 255 - v; }));
|
|
9576
9564
|
}
|
|
9577
9565
|
|
|
9578
|
-
var noop = function () {
|
|
9566
|
+
var noop$8 = function () {
|
|
9579
9567
|
};
|
|
9580
|
-
var ɵ0$
|
|
9568
|
+
var ɵ0$9 = noop$8;
|
|
9581
9569
|
var AppFormField = /** @class */ (function () {
|
|
9582
9570
|
function AppFormField(translate, cd, injector, formGroupDir) {
|
|
9583
9571
|
this.translate = translate;
|
|
9584
9572
|
this.cd = cd;
|
|
9585
9573
|
this.injector = injector;
|
|
9586
9574
|
this.formGroupDir = formGroupDir;
|
|
9587
|
-
this._onChangeCallback = noop;
|
|
9588
|
-
this._onTouchedCallback = noop;
|
|
9575
|
+
this._onChangeCallback = noop$8;
|
|
9576
|
+
this._onTouchedCallback = noop$8;
|
|
9589
9577
|
this.readonly = false;
|
|
9590
9578
|
this.compact = false;
|
|
9591
9579
|
this.floatLabel = 'auto';
|
|
@@ -10143,7 +10131,7 @@
|
|
|
10143
10131
|
};
|
|
10144
10132
|
return AudioProvider;
|
|
10145
10133
|
}(StartableService));
|
|
10146
|
-
AudioProvider.ɵprov =
|
|
10134
|
+
AudioProvider.ɵprov = i0.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$2.NativeAudio, 8), i0.ɵɵinject(i3$1.Vibration, 8), i0.ɵɵinject(i4.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
|
|
10147
10135
|
AudioProvider.decorators = [
|
|
10148
10136
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
10149
10137
|
];
|
|
@@ -10253,7 +10241,7 @@
|
|
|
10253
10241
|
};
|
|
10254
10242
|
return Hotkeys;
|
|
10255
10243
|
}());
|
|
10256
|
-
Hotkeys.ɵprov =
|
|
10244
|
+
Hotkeys.ɵprov = i0.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0.ɵɵinject(i1$6.EventManager), i0.ɵɵinject(i2.MatDialog), i0.ɵɵinject(i1$4.DOCUMENT), i0.ɵɵinject(i1$5.ModalController), i0.ɵɵinject(i1$5.PopoverController)); }, token: Hotkeys, providedIn: "root" });
|
|
10257
10245
|
Hotkeys.decorators = [
|
|
10258
10246
|
{ type: i0.Injectable, args: [{
|
|
10259
10247
|
providedIn: 'root'
|
|
@@ -10458,7 +10446,7 @@
|
|
|
10458
10446
|
return Base64ImageReader;
|
|
10459
10447
|
}());
|
|
10460
10448
|
|
|
10461
|
-
var uuidv4
|
|
10449
|
+
var uuidv4 = uuidv4Imported__namespace;
|
|
10462
10450
|
var FileService = /** @class */ (function () {
|
|
10463
10451
|
function FileService(platform,
|
|
10464
10452
|
//private transfer: FileTransfer,
|
|
@@ -10504,7 +10492,7 @@
|
|
|
10504
10492
|
lastSlashIndex = source.lastIndexOf('/');
|
|
10505
10493
|
if (lastSlashIndex === -1)
|
|
10506
10494
|
throw new Error('Invalid URL: ' + source);
|
|
10507
|
-
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
10495
|
+
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
10508
10496
|
if (!(responseType === 'file' && this.canUseFileSystem)) return [3 /*break*/, 4];
|
|
10509
10497
|
console.warn("WARN: [file] Fetching image {" + source + "} in local file...");
|
|
10510
10498
|
targetFilePath = this._imageDirectory + fileName;
|
|
@@ -10567,7 +10555,7 @@
|
|
|
10567
10555
|
};
|
|
10568
10556
|
return FileService;
|
|
10569
10557
|
}());
|
|
10570
|
-
FileService.ɵprov =
|
|
10558
|
+
FileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
10571
10559
|
FileService.decorators = [
|
|
10572
10560
|
{ type: i0.Injectable, args: [{
|
|
10573
10561
|
providedIn: 'root',
|
|
@@ -10734,7 +10722,7 @@
|
|
|
10734
10722
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
10735
10723
|
|
|
10736
10724
|
var scrypt = require('scrypt-async');
|
|
10737
|
-
var sha256
|
|
10725
|
+
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
10738
10726
|
var sha512 = require('hash.js/lib/hash/sha/512');
|
|
10739
10727
|
var nacl = {
|
|
10740
10728
|
sign: tweetnacl.sign,
|
|
@@ -10840,7 +10828,7 @@
|
|
|
10840
10828
|
* Hash (using SHA256) a message
|
|
10841
10829
|
*/
|
|
10842
10830
|
CryptoService.prototype.sha256 = function (message) {
|
|
10843
|
-
return sha256
|
|
10831
|
+
return sha256().update(message).digest('hex');
|
|
10844
10832
|
};
|
|
10845
10833
|
/**
|
|
10846
10834
|
* Hash (using SHA512) a message
|
|
@@ -10854,7 +10842,7 @@
|
|
|
10854
10842
|
};
|
|
10855
10843
|
return CryptoService;
|
|
10856
10844
|
}());
|
|
10857
|
-
CryptoService.ɵprov =
|
|
10845
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
10858
10846
|
CryptoService.decorators = [
|
|
10859
10847
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
10860
10848
|
];
|
|
@@ -11724,7 +11712,7 @@
|
|
|
11724
11712
|
onRefresh: [{ type: i0.Input }]
|
|
11725
11713
|
};
|
|
11726
11714
|
|
|
11727
|
-
var moment$
|
|
11715
|
+
var moment$3 = momentImported__namespace;
|
|
11728
11716
|
var SETTINGS_STORAGE_KEY = 'settings';
|
|
11729
11717
|
var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
11730
11718
|
// fixme: this constant points to static environment
|
|
@@ -12026,11 +12014,11 @@
|
|
|
12026
12014
|
if (!feature) {
|
|
12027
12015
|
feature = {
|
|
12028
12016
|
name: featureName.toLowerCase(),
|
|
12029
|
-
lastSyncDate: moment$
|
|
12017
|
+
lastSyncDate: moment$3().toISOString()
|
|
12030
12018
|
};
|
|
12031
12019
|
}
|
|
12032
12020
|
else {
|
|
12033
|
-
feature.lastSyncDate = moment$
|
|
12021
|
+
feature.lastSyncDate = moment$3().toISOString();
|
|
12034
12022
|
}
|
|
12035
12023
|
this.saveOfflineFeature(feature);
|
|
12036
12024
|
};
|
|
@@ -12224,7 +12212,7 @@
|
|
|
12224
12212
|
if (!page || !page.title || !page.path)
|
|
12225
12213
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
12226
12214
|
// Set time
|
|
12227
|
-
page.time = page.time || moment$
|
|
12215
|
+
page.time = page.time || moment$3();
|
|
12228
12216
|
// Clean the title (remove <small> tags)
|
|
12229
12217
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
12230
12218
|
var tagIndex = page.title.indexOf('</small>');
|
|
@@ -12241,18 +12229,18 @@
|
|
|
12241
12229
|
};
|
|
12242
12230
|
return LocalSettingsService;
|
|
12243
12231
|
}(StartableService));
|
|
12244
|
-
LocalSettingsService.ɵprov =
|
|
12232
|
+
LocalSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
|
|
12245
12233
|
LocalSettingsService.decorators = [
|
|
12246
12234
|
{ type: i0.Injectable, args: [{
|
|
12247
|
-
providedIn: 'root'
|
|
12248
|
-
deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
12235
|
+
providedIn: 'root'
|
|
12236
|
+
//deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
12249
12237
|
},] }
|
|
12250
12238
|
];
|
|
12251
12239
|
LocalSettingsService.ctorParameters = function () { return [
|
|
12252
12240
|
{ type: i1$2.TranslateService },
|
|
12253
12241
|
{ type: i1$5.Platform },
|
|
12254
12242
|
{ type: i3$2.Storage },
|
|
12255
|
-
{ type:
|
|
12243
|
+
{ type: Environment, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
|
|
12256
12244
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_LOCAL_SETTINGS,] }] },
|
|
12257
12245
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_LOCAL_SETTINGS_OPTIONS,] }] }
|
|
12258
12246
|
]; };
|
|
@@ -13122,7 +13110,7 @@
|
|
|
13122
13110
|
};
|
|
13123
13111
|
return NetworkService;
|
|
13124
13112
|
}(StartableService));
|
|
13125
|
-
NetworkService.ɵprov =
|
|
13113
|
+
NetworkService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0.ɵɵinject(i1$4.DOCUMENT), i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i1$5.ModalController), i0.ɵɵinject(CryptoService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i9.Network, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i1$2.TranslateService, 8), i0.ɵɵinject(i1$5.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
|
|
13126
13114
|
NetworkService.decorators = [
|
|
13127
13115
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
13128
13116
|
];
|
|
@@ -13142,7 +13130,7 @@
|
|
|
13142
13130
|
{ type: i1$5.ToastController, decorators: [{ type: i0.Optional }] }
|
|
13143
13131
|
]; };
|
|
13144
13132
|
|
|
13145
|
-
var ErrorCodes
|
|
13133
|
+
var ErrorCodes = {
|
|
13146
13134
|
UNKNOWN_ERROR: 0,
|
|
13147
13135
|
LOAD_ACCOUNT_ERROR: 1,
|
|
13148
13136
|
BAD_PASSWORD: 2,
|
|
@@ -13559,7 +13547,7 @@
|
|
|
13559
13547
|
case 13:
|
|
13560
13548
|
err_1 = _b.sent();
|
|
13561
13549
|
console.error(err_1);
|
|
13562
|
-
throw { code: ErrorCodes
|
|
13550
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err_1 };
|
|
13563
13551
|
case 14:
|
|
13564
13552
|
// Emit update event
|
|
13565
13553
|
if (!opts || opts.emitEvent !== false) {
|
|
@@ -14336,7 +14324,7 @@
|
|
|
14336
14324
|
}(StartableService));
|
|
14337
14325
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
14338
14326
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
14339
|
-
EntitiesStorage.ɵprov =
|
|
14327
|
+
EntitiesStorage.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(ProgressBarService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
|
|
14340
14328
|
EntitiesStorage.decorators = [
|
|
14341
14329
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
14342
14330
|
];
|
|
@@ -14492,10 +14480,10 @@
|
|
|
14492
14480
|
function referentialsToString(values, properties, separator) {
|
|
14493
14481
|
return (values || []).map(function (v) { return referentialToString(v, properties); }).join(separator || ', ');
|
|
14494
14482
|
}
|
|
14495
|
-
var ɵ0$
|
|
14483
|
+
var ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
14496
14484
|
var StatusList = Object.freeze([
|
|
14497
14485
|
{
|
|
14498
|
-
id: ɵ0$
|
|
14486
|
+
id: ɵ0$a,
|
|
14499
14487
|
icon: 'checkmark',
|
|
14500
14488
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
14501
14489
|
},
|
|
@@ -14798,7 +14786,7 @@
|
|
|
14798
14786
|
(data.lastName || '')) || '';
|
|
14799
14787
|
}
|
|
14800
14788
|
|
|
14801
|
-
var uuidv4 = uuidv4Imported__namespace;
|
|
14789
|
+
var uuidv4$1 = uuidv4Imported__namespace;
|
|
14802
14790
|
var _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14803
14791
|
var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14804
14792
|
/**
|
|
@@ -14842,7 +14830,7 @@
|
|
|
14842
14830
|
// Skip if not tracked
|
|
14843
14831
|
if (!context || !context.tracked)
|
|
14844
14832
|
return forward(operation);
|
|
14845
|
-
var id = context.serializationKey || uuidv4();
|
|
14833
|
+
var id = context.serializationKey || uuidv4$1();
|
|
14846
14834
|
console.debug("[apollo-tracker-link] Watching tracked query {" + operation.operationName + "#" + id + "}");
|
|
14847
14835
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
14848
14836
|
var cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -15473,14 +15461,14 @@
|
|
|
15473
15461
|
mutationLinks = void 0;
|
|
15474
15462
|
// Add queue to store tracked queries, when offline
|
|
15475
15463
|
if (enableTrackMutationQueries) {
|
|
15476
|
-
serializingLink = new SerializingLink__default[
|
|
15464
|
+
serializingLink = new SerializingLink__default['default']();
|
|
15477
15465
|
trackerLink = createTrackerLink({
|
|
15478
15466
|
storage: storage,
|
|
15479
15467
|
onNetworkStatusChange: this._networkStatusChanged$,
|
|
15480
15468
|
debounce: 1000,
|
|
15481
15469
|
debug: true
|
|
15482
15470
|
});
|
|
15483
|
-
queueLink_1 = new QueueLink__default[
|
|
15471
|
+
queueLink_1 = new QueueLink__default['default']();
|
|
15484
15472
|
this.registerSubscription(this._networkStatusChanged$
|
|
15485
15473
|
.subscribe(function (type) {
|
|
15486
15474
|
// Network is offline: start buffering into queue
|
|
@@ -15495,7 +15483,7 @@
|
|
|
15495
15483
|
}
|
|
15496
15484
|
}));
|
|
15497
15485
|
mutationLinks = [
|
|
15498
|
-
loggerLink__default[
|
|
15486
|
+
loggerLink__default['default'],
|
|
15499
15487
|
queueLink_1,
|
|
15500
15488
|
trackerLink,
|
|
15501
15489
|
queueLink_1,
|
|
@@ -15602,7 +15590,7 @@
|
|
|
15602
15590
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
15603
15591
|
|| this.toAppError(err.networkError)
|
|
15604
15592
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
15605
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
15593
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
15606
15594
|
// If graphQL: try to convert the first error found
|
|
15607
15595
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
15608
15596
|
|| this.toAppError(err)
|
|
@@ -15610,7 +15598,7 @@
|
|
|
15610
15598
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
15611
15599
|
|| err;
|
|
15612
15600
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
15613
|
-
if (error && error.code === ErrorCodes
|
|
15601
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
15614
15602
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
15615
15603
|
this.onNetworkError.next(error);
|
|
15616
15604
|
}
|
|
@@ -15646,7 +15634,7 @@
|
|
|
15646
15634
|
return 'ERROR.UNAUTHORIZED';
|
|
15647
15635
|
case ServerErrorCodes.FORBIDDEN:
|
|
15648
15636
|
return 'ERROR.FORBIDDEN';
|
|
15649
|
-
case ErrorCodes
|
|
15637
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
15650
15638
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
15651
15639
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
15652
15640
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -15678,7 +15666,7 @@
|
|
|
15678
15666
|
};
|
|
15679
15667
|
return GraphqlService;
|
|
15680
15668
|
}(StartableService));
|
|
15681
|
-
GraphqlService.ɵprov =
|
|
15669
|
+
GraphqlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$3.Apollo), i0.ɵɵinject(i3$3.HttpLink), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(CryptoService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
|
|
15682
15670
|
GraphqlService.decorators = [
|
|
15683
15671
|
{ type: i0.Injectable, args: [{
|
|
15684
15672
|
providedIn: 'root'
|
|
@@ -15695,7 +15683,7 @@
|
|
|
15695
15683
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
15696
15684
|
]; };
|
|
15697
15685
|
|
|
15698
|
-
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
15686
|
+
var sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
15699
15687
|
var BaseGraphqlServiceOptions = /** @class */ (function () {
|
|
15700
15688
|
function BaseGraphqlServiceOptions() {
|
|
15701
15689
|
}
|
|
@@ -15865,8 +15853,8 @@
|
|
|
15865
15853
|
};
|
|
15866
15854
|
/* -- protected methods -- */
|
|
15867
15855
|
BaseGraphqlService.prototype.computeMutableWatchQueryId = function (opts) {
|
|
15868
|
-
var queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
15869
|
-
var variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
15856
|
+
var queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
15857
|
+
var variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
15870
15858
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
15871
15859
|
};
|
|
15872
15860
|
BaseGraphqlService.prototype.findMutableWatchQueries = function (opts) {
|
|
@@ -15939,19 +15927,19 @@
|
|
|
15939
15927
|
/* ------------------------------------
|
|
15940
15928
|
* GraphQL queries
|
|
15941
15929
|
* ------------------------------------*/
|
|
15942
|
-
var Fragments
|
|
15943
|
-
account: core.gql(templateObject_1
|
|
15944
|
-
settings: core.gql(templateObject_2
|
|
15930
|
+
var Fragments = {
|
|
15931
|
+
account: core.gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"], ["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"]))),
|
|
15932
|
+
settings: core.gql(templateObject_2 || (templateObject_2 = __makeTemplateObject(["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"], ["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"])))
|
|
15945
15933
|
};
|
|
15946
15934
|
// Load account query
|
|
15947
|
-
var LoadQuery
|
|
15935
|
+
var LoadQuery = core.gql(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"], ["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"])), Fragments.account, Fragments.settings);
|
|
15948
15936
|
// Check email query
|
|
15949
|
-
var IsEmailExistsQuery = core.gql(templateObject_4
|
|
15937
|
+
var IsEmailExistsQuery = core.gql(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"], ["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"])));
|
|
15950
15938
|
// Save (create or update) account mutation
|
|
15951
15939
|
var AccountMutations = {
|
|
15952
|
-
save: core.gql(templateObject_5
|
|
15953
|
-
create: core.gql(templateObject_6 || (templateObject_6 = __makeTemplateObject(["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], ["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments
|
|
15954
|
-
saveSettings: core.gql(templateObject_7 || (templateObject_7 = __makeTemplateObject(["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""], ["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""])), Fragments
|
|
15940
|
+
save: core.gql(templateObject_5 || (templateObject_5 = __makeTemplateObject([" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], [" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments.account, Fragments.settings),
|
|
15941
|
+
create: core.gql(templateObject_6 || (templateObject_6 = __makeTemplateObject(["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], ["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments.account, Fragments.settings),
|
|
15942
|
+
saveSettings: core.gql(templateObject_7 || (templateObject_7 = __makeTemplateObject(["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""], ["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""])), Fragments.settings)
|
|
15955
15943
|
};
|
|
15956
15944
|
// Sent confirmation email
|
|
15957
15945
|
var SendConfirmEmailMutation = core.gql(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n mutation sendAccountConfirmationEmail($email:String, $locale:String){\n sendAccountConfirmationEmail(email: $email, locale: $locale)\n }\n"], ["\n mutation sendAccountConfirmationEmail($email:String, $locale:String){\n sendAccountConfirmationEmail(email: $email, locale: $locale)\n }\n"])));
|
|
@@ -16319,7 +16307,7 @@
|
|
|
16319
16307
|
error_3 = _b.sent();
|
|
16320
16308
|
console.error(error_3);
|
|
16321
16309
|
this.resetData();
|
|
16322
|
-
throw { code: ErrorCodes
|
|
16310
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
16323
16311
|
case 4:
|
|
16324
16312
|
// Store pubkey+keypair
|
|
16325
16313
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -16355,7 +16343,7 @@
|
|
|
16355
16343
|
return [3 /*break*/, 18];
|
|
16356
16344
|
case 11:
|
|
16357
16345
|
err_1 = _b.sent();
|
|
16358
|
-
if (!(err_1 && +(err_1.code) === ErrorCodes
|
|
16346
|
+
if (!(err_1 && +(err_1.code) === ErrorCodes.LOAD_ACCOUNT_ERROR)) return [3 /*break*/, 17];
|
|
16359
16347
|
if (!(data.username.indexOf('@') !== -1)) return [3 /*break*/, 16];
|
|
16360
16348
|
isEmailExists = void 0;
|
|
16361
16349
|
_b.label = 12;
|
|
@@ -16371,12 +16359,12 @@
|
|
|
16371
16359
|
case 15:
|
|
16372
16360
|
// Email not exists (no account)
|
|
16373
16361
|
if (!isEmailExists) {
|
|
16374
|
-
throw { code: ErrorCodes
|
|
16362
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
16375
16363
|
}
|
|
16376
16364
|
_b.label = 16;
|
|
16377
16365
|
case 16:
|
|
16378
16366
|
// Email exists, so error = 'bad password'
|
|
16379
|
-
throw { code: ErrorCodes
|
|
16367
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
16380
16368
|
case 17: throw err_1; // resend the first error
|
|
16381
16369
|
case 18:
|
|
16382
16370
|
_b.trys.push([18, 20, , 21]);
|
|
@@ -16572,8 +16560,8 @@
|
|
|
16572
16560
|
_b.label = 3;
|
|
16573
16561
|
case 3: return [3 /*break*/, 6];
|
|
16574
16562
|
case 4: return [4 /*yield*/, this.graphql.query({
|
|
16575
|
-
query: LoadQuery
|
|
16576
|
-
error: { code: ErrorCodes
|
|
16563
|
+
query: LoadQuery,
|
|
16564
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
16577
16565
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
16578
16566
|
})];
|
|
16579
16567
|
case 5:
|
|
@@ -16611,7 +16599,7 @@
|
|
|
16611
16599
|
case 1:
|
|
16612
16600
|
isEmailExists = _b.sent();
|
|
16613
16601
|
if (isEmailExists) {
|
|
16614
|
-
throw { code: ErrorCodes
|
|
16602
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
16615
16603
|
}
|
|
16616
16604
|
return [2 /*return*/];
|
|
16617
16605
|
}
|
|
@@ -16661,7 +16649,7 @@
|
|
|
16661
16649
|
locale: locale
|
|
16662
16650
|
},
|
|
16663
16651
|
error: {
|
|
16664
|
-
code: ErrorCodes
|
|
16652
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
16665
16653
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
16666
16654
|
}
|
|
16667
16655
|
})];
|
|
@@ -16684,7 +16672,7 @@
|
|
|
16684
16672
|
code: code
|
|
16685
16673
|
},
|
|
16686
16674
|
error: {
|
|
16687
|
-
code: ErrorCodes
|
|
16675
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
16688
16676
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
16689
16677
|
}
|
|
16690
16678
|
})];
|
|
@@ -16784,7 +16772,7 @@
|
|
|
16784
16772
|
throw error_7;
|
|
16785
16773
|
console.error(error_7);
|
|
16786
16774
|
throw {
|
|
16787
|
-
code: ErrorCodes
|
|
16775
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
16788
16776
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
16789
16777
|
};
|
|
16790
16778
|
case 6: return [2 /*return*/];
|
|
@@ -16995,7 +16983,7 @@
|
|
|
16995
16983
|
case 1:
|
|
16996
16984
|
existingAccount = _b.sent();
|
|
16997
16985
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
16998
|
-
throw { code: ErrorCodes
|
|
16986
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
16999
16987
|
}
|
|
17000
16988
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
17001
16989
|
_b.label = 2;
|
|
@@ -17007,7 +16995,7 @@
|
|
|
17007
16995
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
17008
16996
|
variables: { data: json },
|
|
17009
16997
|
error: {
|
|
17010
|
-
code: ErrorCodes
|
|
16998
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
17011
16999
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
17012
17000
|
}
|
|
17013
17001
|
})];
|
|
@@ -17041,7 +17029,7 @@
|
|
|
17041
17029
|
mutation: AccountMutations.saveSettings,
|
|
17042
17030
|
variables: { data: json },
|
|
17043
17031
|
error: {
|
|
17044
|
-
code: ErrorCodes
|
|
17032
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
17045
17033
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
17046
17034
|
}
|
|
17047
17035
|
})];
|
|
@@ -17072,7 +17060,7 @@
|
|
|
17072
17060
|
if (counter > 4) {
|
|
17073
17061
|
if (this._debug)
|
|
17074
17062
|
console.debug("[account] Failed to authentication on pod (after " + counter + " attempts)");
|
|
17075
|
-
throw { code: ErrorCodes
|
|
17063
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
17076
17064
|
}
|
|
17077
17065
|
if (!token) return [3 /*break*/, 2];
|
|
17078
17066
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -17081,7 +17069,7 @@
|
|
|
17081
17069
|
token: token
|
|
17082
17070
|
},
|
|
17083
17071
|
error: {
|
|
17084
|
-
code: ErrorCodes
|
|
17072
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
17085
17073
|
message: 'ERROR.UNAUTHORIZED'
|
|
17086
17074
|
},
|
|
17087
17075
|
fetchPolicy: 'no-cache'
|
|
@@ -17098,7 +17086,7 @@
|
|
|
17098
17086
|
_b.label = 2;
|
|
17099
17087
|
case 2:
|
|
17100
17088
|
challengeError = {
|
|
17101
|
-
code: ErrorCodes
|
|
17089
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
17102
17090
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
17103
17091
|
};
|
|
17104
17092
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -17185,7 +17173,7 @@
|
|
|
17185
17173
|
query: AccountSubscriptions.listenChanges,
|
|
17186
17174
|
variables: variables,
|
|
17187
17175
|
error: {
|
|
17188
|
-
code: ErrorCodes
|
|
17176
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
17189
17177
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
|
|
17190
17178
|
}
|
|
17191
17179
|
}).pipe(operators.map(function (_b) {
|
|
@@ -17218,7 +17206,7 @@
|
|
|
17218
17206
|
};
|
|
17219
17207
|
return AccountService;
|
|
17220
17208
|
}(BaseGraphqlService));
|
|
17221
|
-
AccountService.ɵprov =
|
|
17209
|
+
AccountService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(i0.ɵɵinject(CryptoService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$2.TranslateService, 8), i0.ɵɵinject(i1$5.ToastController, 8), i0.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
17222
17210
|
AccountService.decorators = [
|
|
17223
17211
|
{ type: i0.Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
|
|
17224
17212
|
];
|
|
@@ -17233,7 +17221,7 @@
|
|
|
17233
17221
|
{ type: i1$5.ToastController, decorators: [{ type: i0.Optional }] },
|
|
17234
17222
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
17235
17223
|
]; };
|
|
17236
|
-
var templateObject_1
|
|
17224
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
|
|
17237
17225
|
|
|
17238
17226
|
var Software_1, Configuration_1;
|
|
17239
17227
|
// @dynamic
|
|
@@ -17491,13 +17479,13 @@
|
|
|
17491
17479
|
/* ------------------------------------
|
|
17492
17480
|
* GraphQL queries
|
|
17493
17481
|
* ------------------------------------*/
|
|
17494
|
-
var Fragments = {
|
|
17495
|
-
config: core.gql(templateObject_1$
|
|
17482
|
+
var Fragments$1 = {
|
|
17483
|
+
config: core.gql(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "], ["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "])))
|
|
17496
17484
|
};
|
|
17497
|
-
var LoadQuery = core.gql(templateObject_2$
|
|
17485
|
+
var LoadQuery$1 = core.gql(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"], ["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"])), Fragments$1.config);
|
|
17498
17486
|
// Save (create or update) account mutation
|
|
17499
|
-
var SaveMutation = core.gql(templateObject_3$
|
|
17500
|
-
var ClearCache = core.gql(templateObject_4$
|
|
17487
|
+
var SaveMutation = core.gql(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"], ["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"])), Fragments$1.config);
|
|
17488
|
+
var ClearCache = core.gql(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"], ["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"])));
|
|
17501
17489
|
var CacheStatistics = core.gql(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n query CacheStatistics {\n cacheStatistics\n }\n"], ["\n query CacheStatistics {\n cacheStatistics\n }\n"])));
|
|
17502
17490
|
var APP_CONFIG_OPTIONS = new i0.InjectionToken('defaultOptions');
|
|
17503
17491
|
var ConfigService = /** @class */ (function (_super) {
|
|
@@ -17557,12 +17545,12 @@
|
|
|
17557
17545
|
case 0:
|
|
17558
17546
|
now = Date.now();
|
|
17559
17547
|
console.debug('[config] Loading Pod configuration...');
|
|
17560
|
-
query = opts && opts.query || LoadQuery;
|
|
17548
|
+
query = opts && opts.query || LoadQuery$1;
|
|
17561
17549
|
variables = opts && opts.variables || undefined;
|
|
17562
17550
|
return [4 /*yield*/, this.graphql.query({
|
|
17563
17551
|
query: query,
|
|
17564
17552
|
variables: variables,
|
|
17565
|
-
error: { code: ErrorCodes
|
|
17553
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17566
17554
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
17567
17555
|
})];
|
|
17568
17556
|
case 1:
|
|
@@ -17604,7 +17592,7 @@
|
|
|
17604
17592
|
data: json
|
|
17605
17593
|
},
|
|
17606
17594
|
error: {
|
|
17607
|
-
code: ErrorCodes
|
|
17595
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
17608
17596
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
17609
17597
|
}
|
|
17610
17598
|
})];
|
|
@@ -17639,7 +17627,7 @@
|
|
|
17639
17627
|
return [4 /*yield*/, this.graphql.query({
|
|
17640
17628
|
query: CacheStatistics,
|
|
17641
17629
|
variables: null,
|
|
17642
|
-
error: { code: ErrorCodes
|
|
17630
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17643
17631
|
fetchPolicy: 'network-only'
|
|
17644
17632
|
})];
|
|
17645
17633
|
case 1:
|
|
@@ -17663,7 +17651,7 @@
|
|
|
17663
17651
|
return [4 /*yield*/, this.graphql.query({
|
|
17664
17652
|
query: ClearCache,
|
|
17665
17653
|
variables: variables,
|
|
17666
|
-
error: { code: ErrorCodes
|
|
17654
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17667
17655
|
fetchPolicy: 'no-cache'
|
|
17668
17656
|
})];
|
|
17669
17657
|
case 1:
|
|
@@ -17863,7 +17851,7 @@
|
|
|
17863
17851
|
};
|
|
17864
17852
|
return ConfigService;
|
|
17865
17853
|
}(BaseGraphqlService));
|
|
17866
|
-
ConfigService.ɵprov =
|
|
17854
|
+
ConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(NetworkService), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
17867
17855
|
ConfigService.decorators = [
|
|
17868
17856
|
{ type: i0.Injectable, args: [{
|
|
17869
17857
|
providedIn: 'root',
|
|
@@ -17882,9 +17870,9 @@
|
|
|
17882
17870
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
|
|
17883
17871
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
17884
17872
|
]; };
|
|
17885
|
-
var templateObject_1$
|
|
17873
|
+
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
17886
17874
|
|
|
17887
|
-
var moment$
|
|
17875
|
+
var moment$4 = momentImported__namespace;
|
|
17888
17876
|
var AndroidOsEnvironment = Object.freeze({
|
|
17889
17877
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
17890
17878
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
@@ -18155,16 +18143,16 @@
|
|
|
18155
18143
|
}
|
|
18156
18144
|
// config moment lib
|
|
18157
18145
|
try {
|
|
18158
|
-
moment$
|
|
18146
|
+
moment$4.locale(event.lang);
|
|
18159
18147
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
18160
18148
|
}
|
|
18161
18149
|
// If error, fallback to en
|
|
18162
18150
|
catch (err) {
|
|
18163
|
-
moment$
|
|
18151
|
+
moment$4.locale('en');
|
|
18164
18152
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
18165
18153
|
}
|
|
18166
18154
|
// Config date adapter
|
|
18167
|
-
_this.dateAdapter.setLocale(moment$
|
|
18155
|
+
_this.dateAdapter.setLocale(moment$4.locale());
|
|
18168
18156
|
}
|
|
18169
18157
|
});
|
|
18170
18158
|
this.settings.onChange.subscribe(function (data) {
|
|
@@ -18190,7 +18178,7 @@
|
|
|
18190
18178
|
PlatformService.prototype.checkAppVersion = function (opts) {
|
|
18191
18179
|
var _a, _b, _c;
|
|
18192
18180
|
return __awaiter(this, void 0, void 0, function () {
|
|
18193
|
-
var silent, production, canAutoReload, actualVersion,
|
|
18181
|
+
var silent, production, canAutoReload, actualVersion, remoteVersion, reloadPath;
|
|
18194
18182
|
return __generator(this, function (_d) {
|
|
18195
18183
|
switch (_d.label) {
|
|
18196
18184
|
case 0:
|
|
@@ -18207,8 +18195,7 @@
|
|
|
18207
18195
|
(_a = this.checkAppVersionTimer) === null || _a === void 0 ? void 0 : _a.unsubscribe(); // Stop timer if exists
|
|
18208
18196
|
return [2 /*return*/]; // Skip
|
|
18209
18197
|
}
|
|
18210
|
-
|
|
18211
|
-
return [4 /*yield*/, this.networkService.getAppVersion(peer)];
|
|
18198
|
+
return [4 /*yield*/, this.networkService.getAppVersion()];
|
|
18212
18199
|
case 1:
|
|
18213
18200
|
remoteVersion = _d.sent();
|
|
18214
18201
|
if (isNilOrBlank(remoteVersion)) {
|
|
@@ -18219,7 +18206,7 @@
|
|
|
18219
18206
|
}
|
|
18220
18207
|
if (VersionUtils.isCompatible(remoteVersion, actualVersion)) {
|
|
18221
18208
|
if (!silent)
|
|
18222
|
-
console.info(
|
|
18209
|
+
console.info("[platform] Checking remote app version [OK] {remote: '" + remoteVersion + "', actual: '" + actualVersion + "'}");
|
|
18223
18210
|
return [2 /*return*/];
|
|
18224
18211
|
}
|
|
18225
18212
|
reloadPath = location.href.replace(/[&]?version=[0-9.]+/gi, '');
|
|
@@ -18417,7 +18404,7 @@
|
|
|
18417
18404
|
};
|
|
18418
18405
|
return PlatformService;
|
|
18419
18406
|
}(StartableService));
|
|
18420
|
-
PlatformService.ɵprov =
|
|
18407
|
+
PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
|
|
18421
18408
|
PlatformService.decorators = [
|
|
18422
18409
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
18423
18410
|
];
|
|
@@ -18515,7 +18502,7 @@
|
|
|
18515
18502
|
};
|
|
18516
18503
|
return MatStepperI18n;
|
|
18517
18504
|
}(stepper.MatStepperIntl));
|
|
18518
|
-
MatStepperI18n.ɵprov =
|
|
18505
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
18519
18506
|
MatStepperI18n.decorators = [
|
|
18520
18507
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
18521
18508
|
];
|
|
@@ -20728,7 +20715,7 @@
|
|
|
20728
20715
|
return 1;
|
|
20729
20716
|
}
|
|
20730
20717
|
}
|
|
20731
|
-
var ɵ0$
|
|
20718
|
+
var ɵ0$b = function (defaultStateSize) { return [
|
|
20732
20719
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
20733
20720
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
20734
20721
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -20736,7 +20723,7 @@
|
|
|
20736
20723
|
var SCALE_OPTIONS_DEFAULT = {
|
|
20737
20724
|
startColor: rgbArrayMap.red,
|
|
20738
20725
|
startStates: [0, 2, 3],
|
|
20739
|
-
startStepsFn: ɵ0$
|
|
20726
|
+
startStepsFn: ɵ0$b
|
|
20740
20727
|
};
|
|
20741
20728
|
/**
|
|
20742
20729
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -21667,7 +21654,7 @@
|
|
|
21667
21654
|
};
|
|
21668
21655
|
return UserSettingsValidatorService;
|
|
21669
21656
|
}(AppValidatorService));
|
|
21670
|
-
UserSettingsValidatorService.ɵprov =
|
|
21657
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
21671
21658
|
UserSettingsValidatorService.decorators = [
|
|
21672
21659
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
21673
21660
|
];
|
|
@@ -21715,7 +21702,7 @@
|
|
|
21715
21702
|
};
|
|
21716
21703
|
return AccountValidatorService;
|
|
21717
21704
|
}(AppValidatorService));
|
|
21718
|
-
AccountValidatorService.ɵprov =
|
|
21705
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
21719
21706
|
AccountValidatorService.decorators = [
|
|
21720
21707
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
21721
21708
|
];
|
|
@@ -22346,7 +22333,7 @@
|
|
|
22346
22333
|
};
|
|
22347
22334
|
return LocalSettingsValidatorService;
|
|
22348
22335
|
}(AppValidatorService));
|
|
22349
|
-
LocalSettingsValidatorService.ɵprov =
|
|
22336
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
22350
22337
|
LocalSettingsValidatorService.decorators = [
|
|
22351
22338
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
22352
22339
|
];
|
|
@@ -23126,7 +23113,7 @@
|
|
|
23126
23113
|
};
|
|
23127
23114
|
return IsOnFieldModePipe;
|
|
23128
23115
|
}());
|
|
23129
|
-
IsOnFieldModePipe.ɵprov =
|
|
23116
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
23130
23117
|
IsOnFieldModePipe.decorators = [
|
|
23131
23118
|
{ type: i0.Pipe, args: [{
|
|
23132
23119
|
name: 'isOnField'
|
|
@@ -23141,7 +23128,7 @@
|
|
|
23141
23128
|
};
|
|
23142
23129
|
return IsNotOnFieldModePipe;
|
|
23143
23130
|
}());
|
|
23144
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
23131
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
23145
23132
|
IsNotOnFieldModePipe.decorators = [
|
|
23146
23133
|
{ type: i0.Pipe, args: [{
|
|
23147
23134
|
name: 'isNotOnField'
|
|
@@ -23159,7 +23146,7 @@
|
|
|
23159
23146
|
};
|
|
23160
23147
|
return PersonToStringPipe;
|
|
23161
23148
|
}());
|
|
23162
|
-
PersonToStringPipe.ɵprov =
|
|
23149
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
23163
23150
|
PersonToStringPipe.decorators = [
|
|
23164
23151
|
{ type: i0.Pipe, args: [{
|
|
23165
23152
|
name: 'personToString'
|
|
@@ -23623,7 +23610,7 @@
|
|
|
23623
23610
|
};
|
|
23624
23611
|
return IsLoginAccountPipe;
|
|
23625
23612
|
}());
|
|
23626
|
-
IsLoginAccountPipe.ɵprov =
|
|
23613
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
23627
23614
|
IsLoginAccountPipe.decorators = [
|
|
23628
23615
|
{ type: i0.Pipe, args: [{
|
|
23629
23616
|
name: 'isLogin'
|
|
@@ -23638,7 +23625,7 @@
|
|
|
23638
23625
|
};
|
|
23639
23626
|
return AccountToStringPipe;
|
|
23640
23627
|
}());
|
|
23641
|
-
AccountToStringPipe.ɵprov =
|
|
23628
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
23642
23629
|
AccountToStringPipe.decorators = [
|
|
23643
23630
|
{ type: i0.Pipe, args: [{
|
|
23644
23631
|
name: 'accountToString'
|
|
@@ -23656,7 +23643,7 @@
|
|
|
23656
23643
|
};
|
|
23657
23644
|
return DepartmentToStringPipe;
|
|
23658
23645
|
}());
|
|
23659
|
-
DepartmentToStringPipe.ɵprov =
|
|
23646
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
23660
23647
|
DepartmentToStringPipe.decorators = [
|
|
23661
23648
|
{ type: i0.Pipe, args: [{
|
|
23662
23649
|
name: 'departmentToString'
|
|
@@ -23762,7 +23749,7 @@
|
|
|
23762
23749
|
};
|
|
23763
23750
|
return MenuService;
|
|
23764
23751
|
}());
|
|
23765
|
-
MenuService.ɵprov =
|
|
23752
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
23766
23753
|
MenuService.decorators = [
|
|
23767
23754
|
{ type: i0.Injectable, args: [{
|
|
23768
23755
|
providedIn: 'root'
|
|
@@ -24307,7 +24294,7 @@
|
|
|
24307
24294
|
};
|
|
24308
24295
|
return AuthGuardService;
|
|
24309
24296
|
}());
|
|
24310
|
-
AuthGuardService.ɵprov =
|
|
24297
|
+
AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(AccountService), i0.ɵɵinject(i1$5.ModalController), i0.ɵɵinject(i3.Router), i0.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
24311
24298
|
AuthGuardService.decorators = [
|
|
24312
24299
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
24313
24300
|
];
|
|
@@ -24352,7 +24339,7 @@
|
|
|
24352
24339
|
query: query,
|
|
24353
24340
|
variables: { id: id },
|
|
24354
24341
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
24355
|
-
error: { code: ErrorCodes
|
|
24342
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
24356
24343
|
})
|
|
24357
24344
|
.pipe(operators.map(function (_b) {
|
|
24358
24345
|
var data = _b.data;
|
|
@@ -24374,7 +24361,7 @@
|
|
|
24374
24361
|
query: query,
|
|
24375
24362
|
variables: { id: id },
|
|
24376
24363
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
24377
|
-
error: { code: ErrorCodes
|
|
24364
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
24378
24365
|
})];
|
|
24379
24366
|
case 1:
|
|
24380
24367
|
data = (_b.sent()).data;
|
|
@@ -24410,7 +24397,7 @@
|
|
|
24410
24397
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
24411
24398
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
24412
24399
|
variables: variables,
|
|
24413
|
-
error: { code: ErrorCodes
|
|
24400
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
24414
24401
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
24415
24402
|
})
|
|
24416
24403
|
.pipe(operators.map(function (_b) {
|
|
@@ -24452,7 +24439,7 @@
|
|
|
24452
24439
|
return [4 /*yield*/, this.graphql.query({
|
|
24453
24440
|
query: query,
|
|
24454
24441
|
variables: variables,
|
|
24455
|
-
error: { code: ErrorCodes
|
|
24442
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
24456
24443
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
24457
24444
|
})];
|
|
24458
24445
|
case 1:
|
|
@@ -24500,7 +24487,7 @@
|
|
|
24500
24487
|
variables: {
|
|
24501
24488
|
filter: filter && filter.asPodObject()
|
|
24502
24489
|
},
|
|
24503
|
-
error: { code: ErrorCodes
|
|
24490
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
24504
24491
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
24505
24492
|
})];
|
|
24506
24493
|
case 3:
|
|
@@ -24545,7 +24532,7 @@
|
|
|
24545
24532
|
variables: {
|
|
24546
24533
|
data: json
|
|
24547
24534
|
},
|
|
24548
|
-
error: { code: ErrorCodes
|
|
24535
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
24549
24536
|
update: function (proxy, _b) {
|
|
24550
24537
|
var data = _b.data;
|
|
24551
24538
|
var savedEntities = data && data.data;
|
|
@@ -24612,7 +24599,7 @@
|
|
|
24612
24599
|
variables: {
|
|
24613
24600
|
data: json
|
|
24614
24601
|
},
|
|
24615
|
-
error: { code: ErrorCodes
|
|
24602
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
24616
24603
|
update: function (cache, _b) {
|
|
24617
24604
|
var data = _b.data;
|
|
24618
24605
|
// Update entity
|
|
@@ -24670,7 +24657,7 @@
|
|
|
24670
24657
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
24671
24658
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
24672
24659
|
variables: { ids: ids },
|
|
24673
|
-
error: { code: ErrorCodes
|
|
24660
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
24674
24661
|
update: function (cache, res) {
|
|
24675
24662
|
// Remove from cache
|
|
24676
24663
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -24723,7 +24710,7 @@
|
|
|
24723
24710
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
24724
24711
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
24725
24712
|
variables: { id: id },
|
|
24726
|
-
error: { code: ErrorCodes
|
|
24713
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
24727
24714
|
update: function (proxy, res) {
|
|
24728
24715
|
// Remove from cache
|
|
24729
24716
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -24765,7 +24752,7 @@
|
|
|
24765
24752
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
|
|
24766
24753
|
variables: variables,
|
|
24767
24754
|
error: {
|
|
24768
|
-
code: ErrorCodes
|
|
24755
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
24769
24756
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
24770
24757
|
}
|
|
24771
24758
|
})
|
|
@@ -24988,7 +24975,7 @@
|
|
|
24988
24975
|
if (this._debug)
|
|
24989
24976
|
invalidRows.forEach(function (row) { return AppTableUtils.logRowErrors(row, "[table-datasource] " + _this._logTypeName + " row #" + row.id); });
|
|
24990
24977
|
// Stop with an error
|
|
24991
|
-
throw { code: ErrorCodes
|
|
24978
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
24992
24979
|
}
|
|
24993
24980
|
this._editingRowCount = 0;
|
|
24994
24981
|
data = void 0;
|
|
@@ -26008,14 +25995,14 @@
|
|
|
26008
25995
|
case 0:
|
|
26009
25996
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
26010
25997
|
if (this.readOnly) {
|
|
26011
|
-
throw { code: ErrorCodes
|
|
25998
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
26012
25999
|
}
|
|
26013
26000
|
this.resetError();
|
|
26014
26001
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
26015
26002
|
this.previouslyEditedRowId = opts.keepEditing ? ((((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined) || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.id)) : undefined;
|
|
26016
26003
|
previouslyEditedData = opts.keepEditing ? (isNotNil(this.previouslyEditedRowId) && ((_c = this.editedRow) === null || _c === void 0 ? void 0 : _c.currentData) || ((_d = this.singleSelectedRow) === null || _d === void 0 ? void 0 : _d.currentData)) : undefined;
|
|
26017
26004
|
if (!this.confirmEditCreate()) {
|
|
26018
|
-
throw { code: ErrorCodes
|
|
26005
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
26019
26006
|
}
|
|
26020
26007
|
// Mark as saving
|
|
26021
26008
|
this.markAsSaving();
|
|
@@ -26172,7 +26159,7 @@
|
|
|
26172
26159
|
switch (_e.label) {
|
|
26173
26160
|
case 0:
|
|
26174
26161
|
if (this.readOnly) {
|
|
26175
|
-
throw { code: ErrorCodes
|
|
26162
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
26176
26163
|
}
|
|
26177
26164
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
26178
26165
|
return [2 /*return*/, 0]; // SKip
|
|
@@ -28072,7 +28059,7 @@
|
|
|
28072
28059
|
case 8:
|
|
28073
28060
|
data = _c.sent();
|
|
28074
28061
|
if (!data)
|
|
28075
|
-
throw { code: ErrorCodes
|
|
28062
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
28076
28063
|
this._usageMode = this.computeUsageMode(data);
|
|
28077
28064
|
return [4 /*yield*/, this.onEntityLoaded(data, opts)];
|
|
28078
28065
|
case 9:
|
|
@@ -28779,9 +28766,10 @@
|
|
|
28779
28766
|
canDelete: [{ type: i0.Input }]
|
|
28780
28767
|
};
|
|
28781
28768
|
|
|
28782
|
-
var
|
|
28769
|
+
var SocialErrorCodes = {
|
|
28783
28770
|
LOAD_USER_EVENTS_ERROR: 50000,
|
|
28784
|
-
SAVE_USER_EVENT_ERROR: 50001
|
|
28771
|
+
SAVE_USER_EVENT_ERROR: 50001,
|
|
28772
|
+
SEND_MESSAGE_ERROR: 50003
|
|
28785
28773
|
};
|
|
28786
28774
|
|
|
28787
28775
|
var UserEvent_1;
|
|
@@ -28827,7 +28815,7 @@
|
|
|
28827
28815
|
EntityClass({ typename: 'UserEventVO' })
|
|
28828
28816
|
], exports.UserEvent);
|
|
28829
28817
|
|
|
28830
|
-
var
|
|
28818
|
+
var UserEventFragments = {
|
|
28831
28819
|
userEvent: core.gql(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"], ["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"]))),
|
|
28832
28820
|
lightUserEvent: core.gql(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"], ["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"])))
|
|
28833
28821
|
};
|
|
@@ -28862,12 +28850,12 @@
|
|
|
28862
28850
|
return UserEventFilter;
|
|
28863
28851
|
}(EntityFilter));
|
|
28864
28852
|
exports.UserEventFilter = __decorate([
|
|
28865
|
-
EntityClass({ typename: '
|
|
28853
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
28866
28854
|
], exports.UserEventFilter);
|
|
28867
|
-
var SaveQuery = core.gql(templateObject_1$
|
|
28868
|
-
var LoadAllQuery = core.gql(templateObject_2$
|
|
28869
|
-
var DeleteByIdsMutation = core.gql(templateObject_3$
|
|
28870
|
-
var LoadAllWithContentQuery = core.gql(templateObject_4$
|
|
28855
|
+
var SaveQuery = core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"])), UserEventFragments.userEvent);
|
|
28856
|
+
var LoadAllQuery = core.gql(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"], ["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"])), UserEventFragments.lightUserEvent);
|
|
28857
|
+
var DeleteByIdsMutation = core.gql(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"], ["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"])));
|
|
28858
|
+
var LoadAllWithContentQuery = core.gql(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"])), UserEventFragments.userEvent);
|
|
28871
28859
|
var UserEventService = /** @class */ (function (_super) {
|
|
28872
28860
|
__extends(UserEventService, _super);
|
|
28873
28861
|
function UserEventService(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -28880,7 +28868,7 @@
|
|
|
28880
28868
|
_this.environment = environment;
|
|
28881
28869
|
_this._userEventActions = [];
|
|
28882
28870
|
// For DEV only
|
|
28883
|
-
_this._debug = !environment.production;
|
|
28871
|
+
_this._debug = environment && !environment.production;
|
|
28884
28872
|
return _this;
|
|
28885
28873
|
}
|
|
28886
28874
|
/**
|
|
@@ -28918,7 +28906,7 @@
|
|
|
28918
28906
|
filter: filter && filter.asPodObject()
|
|
28919
28907
|
},
|
|
28920
28908
|
arrayFieldName: 'data',
|
|
28921
|
-
error: { code:
|
|
28909
|
+
error: { code: SocialErrorCodes.LOAD_USER_EVENTS_ERROR, message: 'SOCIAL.ERROR.LOAD_USER_EVENTS_ERROR' },
|
|
28922
28910
|
fetchPolicy: options && options.fetchPolicy || undefined
|
|
28923
28911
|
})
|
|
28924
28912
|
.pipe(operators.map(function (res) {
|
|
@@ -28961,7 +28949,7 @@
|
|
|
28961
28949
|
variables: {
|
|
28962
28950
|
data: json
|
|
28963
28951
|
},
|
|
28964
|
-
error: { code:
|
|
28952
|
+
error: { code: SocialErrorCodes.SAVE_USER_EVENT_ERROR, message: 'SOCIAL.ERROR.SAVE_USER_EVENT_ERROR' },
|
|
28965
28953
|
update: function (proxy, _a) {
|
|
28966
28954
|
var data = _a.data;
|
|
28967
28955
|
// Update entity
|
|
@@ -29188,7 +29176,7 @@
|
|
|
29188
29176
|
};
|
|
29189
29177
|
return UserEventService;
|
|
29190
29178
|
}(BaseGraphqlService));
|
|
29191
|
-
UserEventService.ɵprov =
|
|
29179
|
+
UserEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(AccountService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(ENVIRONMENT, 8)); }, token: UserEventService, providedIn: "root" });
|
|
29192
29180
|
UserEventService.decorators = [
|
|
29193
29181
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29194
29182
|
];
|
|
@@ -29198,9 +29186,9 @@
|
|
|
29198
29186
|
{ type: NetworkService },
|
|
29199
29187
|
{ type: i1$2.TranslateService },
|
|
29200
29188
|
{ type: i1$5.ToastController },
|
|
29201
|
-
{ type:
|
|
29189
|
+
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29202
29190
|
]; };
|
|
29203
|
-
var templateObject_1$
|
|
29191
|
+
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2;
|
|
29204
29192
|
|
|
29205
29193
|
var ICONS_MAP = {
|
|
29206
29194
|
DEBUG_DATA: { matIcon: 'bug_report' },
|
|
@@ -29356,7 +29344,7 @@
|
|
|
29356
29344
|
UserEventsTable.decorators = [
|
|
29357
29345
|
{ type: i0.Component, args: [{
|
|
29358
29346
|
selector: 'app-user-events-table',
|
|
29359
|
-
template: "\n<!-- Type = options menu -->\n<mat-menu #optionsMenu=\"matMenu\" xPosition=\"after\">\n\n <!-- display columns -->\n <button mat-menu-item\n (click)=\"openSelectColumnsModal($event)\">\n <mat-icon>view_column</mat-icon>\n <ion-label translate>COMMON.DISPLAYED_COLUMNS_DOTS</ion-label>\n </button>\n\n</mat-menu>\n\n<!-- top header -->\n<mat-toolbar>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n\n <button mat-icon-button [title]=\"'COMMON.BTN_REFRESH'|translate\" (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n </ng-container>\n\n <!-- if row selection -->\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button class=\"hidden-xs hidden-sm\" *ngIf=\"canDelete\"\n [title]=\"'COMMON.BTN_DELETE'|translate\" (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" hidden-xs hidden-sm hidden-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_OPTIONS'|translate\"\n [matMenuTriggerFor]=\"optionsMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n</mat-toolbar>\n\n\n<mat-table [dataSource]=\"dataSource\" matSort\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <!-- select -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <!-- id -->\n <ng-container matColumnDef=\"id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header [class.cdk-visually-hidden]=\"!isAdmin\">\n <app-loading-spinner [loading]=\"loadingSubject|async\"><ion-label>#</ion-label></app-loading-spinner>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!isAdmin\">{{ row.currentData.id | mathAbs }}</mat-cell>\n </ng-container>\n\n <!-- creationDate -->\n <ng-container matColumnDef=\"creationDate\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.CREATION_DATE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ion-text>\n {{row.currentData.creationDate | dateFromNow }}<br/>\n <ion-text color=\"medium\"><small>{{row.currentData.creationDate | dateFormat: {time: true} }}</small></ion-text>\n </ion-text>\n </mat-cell>\n </ng-container>\n\n <!-- icon -->\n <ng-container matColumnDef=\"icon\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getIcon(row.currentData); let details\">\n <ion-icon slot=\"start\" *ngIf=\"details.icon\" [name]=\"details.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"details.matIcon\">{{details.matIcon}}</mat-icon>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- event type -->\n <ng-container matColumnDef=\"eventType\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.EVENT_TYPE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <span>{{'SOCIAL.
|
|
29347
|
+
template: "\n<!-- Type = options menu -->\n<mat-menu #optionsMenu=\"matMenu\" xPosition=\"after\">\n\n <!-- display columns -->\n <button mat-menu-item\n (click)=\"openSelectColumnsModal($event)\">\n <mat-icon>view_column</mat-icon>\n <ion-label translate>COMMON.DISPLAYED_COLUMNS_DOTS</ion-label>\n </button>\n\n</mat-menu>\n\n<!-- top header -->\n<mat-toolbar>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n\n <button mat-icon-button [title]=\"'COMMON.BTN_REFRESH'|translate\" (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n </ng-container>\n\n <!-- if row selection -->\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button class=\"hidden-xs hidden-sm\" *ngIf=\"canDelete\"\n [title]=\"'COMMON.BTN_DELETE'|translate\" (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" hidden-xs hidden-sm hidden-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_OPTIONS'|translate\"\n [matMenuTriggerFor]=\"optionsMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n</mat-toolbar>\n\n\n<mat-table [dataSource]=\"dataSource\" matSort\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <!-- select -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <!-- id -->\n <ng-container matColumnDef=\"id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header [class.cdk-visually-hidden]=\"!isAdmin\">\n <app-loading-spinner [loading]=\"loadingSubject|async\"><ion-label>#</ion-label></app-loading-spinner>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!isAdmin\">{{ row.currentData.id | mathAbs }}</mat-cell>\n </ng-container>\n\n <!-- creationDate -->\n <ng-container matColumnDef=\"creationDate\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.CREATION_DATE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ion-text>\n {{row.currentData.creationDate | dateFromNow }}<br/>\n <ion-text color=\"medium\"><small>{{row.currentData.creationDate | dateFormat: {time: true} }}</small></ion-text>\n </ion-text>\n </mat-cell>\n </ng-container>\n\n <!-- icon -->\n <ng-container matColumnDef=\"icon\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getIcon(row.currentData); let details\">\n <ion-icon slot=\"start\" *ngIf=\"details.icon\" [name]=\"details.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"details.matIcon\">{{details.matIcon}}</mat-icon>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- event type -->\n <ng-container matColumnDef=\"eventType\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.EVENT_TYPE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <span>{{'SOCIAL.USER_EVENT.TYPE_ENUM.' + row.currentData.eventType | translate}}</span>\n </mat-cell>\n </ng-container>\n\n <!-- message -->\n <ng-container matColumnDef=\"message\">\n <mat-header-cell *matHeaderCellDef>\n <ion-label translate>SOCIAL.USER_EVENT.MESSAGE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <ion-text [innerHTML]=\"details.title|translate\">\n </ion-text>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- Actions buttons column -->\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <button mat-icon-button color=\"light\"\n *ngFor=\"let action of details.actions\"\n [title]=\"action.title |translate\"\n [color]=\"action.color\"\n (click)=\"doAction(action, row)\">\n <ion-icon slot=\"start\" *ngIf=\"action.icon\" [name]=\"action.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"action.matIcon\">{{action.matIcon}}</mat-icon>\n </button>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n class=\"mat-row-disabled\"\n (click)=\"clickRow($event, row)\"></mat-row>\n\n</mat-table>\n\n<ion-row class=\"ion-no-padding\">\n <ion-col></ion-col>\n <ion-col class=\"ion-no-padding\" size=\"auto\">\n <mat-paginator [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\" [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n </ion-col>\n</ion-row>\n",
|
|
29360
29348
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
29361
29349
|
styles: [".mat-header-row .mat-column-icon,.mat-row .mat-column-icon{max-width:40px;padding-left:0}.mat-header-row .mat-column-icon ion-icon,.mat-header-row .mat-column-icon mat-icon,.mat-row .mat-column-icon ion-icon,.mat-row .mat-column-icon mat-icon{font-size:1.2em;height:1.2em;width:1.2em}.mat-header-row .mat-column-creationDate,.mat-row .mat-column-creationDate{min-width:100px;max-width:120px}"]
|
|
29362
29350
|
},] }
|
|
@@ -29376,35 +29364,350 @@
|
|
|
29376
29364
|
defaultSortDirection: [{ type: i0.Input }]
|
|
29377
29365
|
};
|
|
29378
29366
|
|
|
29367
|
+
var MessageTypes = {
|
|
29368
|
+
INBOX_MESSAGE: 'INBOX_MESSAGE',
|
|
29369
|
+
EMAIL: 'EMAIL',
|
|
29370
|
+
FEED: 'FEED',
|
|
29371
|
+
};
|
|
29372
|
+
var MessageTypeList = Object.freeze([
|
|
29373
|
+
{
|
|
29374
|
+
id: MessageTypes.INBOX_MESSAGE,
|
|
29375
|
+
icon: 'notifications',
|
|
29376
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.INBOX_MESSAGE'
|
|
29377
|
+
},
|
|
29378
|
+
{
|
|
29379
|
+
id: MessageTypes.EMAIL,
|
|
29380
|
+
icon: 'mail',
|
|
29381
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.EMAIL'
|
|
29382
|
+
},
|
|
29383
|
+
{
|
|
29384
|
+
id: MessageTypes.FEED,
|
|
29385
|
+
icon: 'paper',
|
|
29386
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.FEED'
|
|
29387
|
+
}
|
|
29388
|
+
]);
|
|
29389
|
+
// @dynamic
|
|
29390
|
+
exports.Message = /** @class */ (function (_super) {
|
|
29391
|
+
__extends(Message, _super);
|
|
29392
|
+
function Message() {
|
|
29393
|
+
return _super.call(this) || this;
|
|
29394
|
+
}
|
|
29395
|
+
Message.prototype.fromObject = function (source, opts) {
|
|
29396
|
+
_super.prototype.fromObject.call(this, source, opts);
|
|
29397
|
+
this.type = source.type;
|
|
29398
|
+
this.issuer = source.issuer && exports.Person.fromObject(source.issuer);
|
|
29399
|
+
this.recipients = source.recipients && source.recipients.map(exports.Person.fromObject);
|
|
29400
|
+
this.subject = source.subject;
|
|
29401
|
+
this.body = source.body;
|
|
29402
|
+
};
|
|
29403
|
+
Message.prototype.asObject = function (opts) {
|
|
29404
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
29405
|
+
target.recipients = this.recipients && this.recipients.map(function (p) { return p.asObject(opts); });
|
|
29406
|
+
return target;
|
|
29407
|
+
};
|
|
29408
|
+
return Message;
|
|
29409
|
+
}(Entity));
|
|
29410
|
+
exports.Message = __decorate([
|
|
29411
|
+
EntityClass({ typename: 'MessageVO' })
|
|
29412
|
+
], exports.Message);
|
|
29413
|
+
// @dynamic
|
|
29414
|
+
exports.MessageFilter = /** @class */ (function (_super) {
|
|
29415
|
+
__extends(MessageFilter, _super);
|
|
29416
|
+
function MessageFilter() {
|
|
29417
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29418
|
+
}
|
|
29419
|
+
MessageFilter.prototype.fromObject = function (source, opts) {
|
|
29420
|
+
_super.prototype.fromObject.call(this, source, opts);
|
|
29421
|
+
};
|
|
29422
|
+
MessageFilter.prototype.buildFilter = function () {
|
|
29423
|
+
var filterFns = _super.prototype.buildFilter.call(this);
|
|
29424
|
+
return filterFns;
|
|
29425
|
+
};
|
|
29426
|
+
return MessageFilter;
|
|
29427
|
+
}(EntityFilter));
|
|
29428
|
+
exports.MessageFilter = __decorate([
|
|
29429
|
+
EntityClass({ typename: 'MessageFilterVO' })
|
|
29430
|
+
], exports.MessageFilter);
|
|
29431
|
+
|
|
29432
|
+
var MessageModal = /** @class */ (function () {
|
|
29433
|
+
function MessageModal(settings, viewCtrl, accountService, cd) {
|
|
29434
|
+
this.settings = settings;
|
|
29435
|
+
this.viewCtrl = viewCtrl;
|
|
29436
|
+
this.accountService = accountService;
|
|
29437
|
+
this.cd = cd;
|
|
29438
|
+
this.mobile = this.settings.mobile;
|
|
29439
|
+
}
|
|
29440
|
+
MessageModal.prototype.ngOnInit = function () {
|
|
29441
|
+
this.canSelectType = toBoolean(this.canSelectType, this.accountService.isAdmin());
|
|
29442
|
+
};
|
|
29443
|
+
MessageModal.prototype.ngAfterViewInit = function () {
|
|
29444
|
+
this.form.markAsReady({ emitEvent: false });
|
|
29445
|
+
if (this.data) {
|
|
29446
|
+
this.data.type = this.data.type || MessageTypes.INBOX_MESSAGE;
|
|
29447
|
+
this.form.setValue(this.data);
|
|
29448
|
+
}
|
|
29449
|
+
this.form.markAsLoaded();
|
|
29450
|
+
this.form.enable();
|
|
29451
|
+
};
|
|
29452
|
+
MessageModal.prototype.cancel = function (event) {
|
|
29453
|
+
this.viewCtrl.dismiss();
|
|
29454
|
+
};
|
|
29455
|
+
MessageModal.prototype.doSubmit = function (event) {
|
|
29456
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
29457
|
+
var data, entity;
|
|
29458
|
+
var _this = this;
|
|
29459
|
+
return __generator(this, function (_a) {
|
|
29460
|
+
switch (_a.label) {
|
|
29461
|
+
case 0:
|
|
29462
|
+
if (this.form.disabled)
|
|
29463
|
+
return [2 /*return*/];
|
|
29464
|
+
if (!!this.form.valid) return [3 /*break*/, 2];
|
|
29465
|
+
return [4 /*yield*/, AppFormUtils.waitWhilePending(this.form)];
|
|
29466
|
+
case 1:
|
|
29467
|
+
_a.sent();
|
|
29468
|
+
if (this.form.invalid) {
|
|
29469
|
+
AppFormUtils.logFormErrors(this.form.form, '[message-modal] ');
|
|
29470
|
+
this.form.markAllAsTouched();
|
|
29471
|
+
return [2 /*return*/];
|
|
29472
|
+
}
|
|
29473
|
+
_a.label = 2;
|
|
29474
|
+
case 2:
|
|
29475
|
+
this.markAsLoading();
|
|
29476
|
+
try {
|
|
29477
|
+
data = this.form.value;
|
|
29478
|
+
// Disable the form
|
|
29479
|
+
this.form.disable();
|
|
29480
|
+
entity = exports.Message.fromObject(data);
|
|
29481
|
+
return [2 /*return*/, this.viewCtrl.dismiss(entity)];
|
|
29482
|
+
}
|
|
29483
|
+
catch (err) {
|
|
29484
|
+
this.form.error = err && err.message || err;
|
|
29485
|
+
this.markAsLoaded();
|
|
29486
|
+
// Enable the form
|
|
29487
|
+
this.form.enable();
|
|
29488
|
+
// Reset form error on next changes
|
|
29489
|
+
firstNotNilPromise(this.form.form.valueChanges).then(function () {
|
|
29490
|
+
_this.form.error = null;
|
|
29491
|
+
_this.markForCheck();
|
|
29492
|
+
});
|
|
29493
|
+
return [2 /*return*/];
|
|
29494
|
+
}
|
|
29495
|
+
return [2 /*return*/];
|
|
29496
|
+
}
|
|
29497
|
+
});
|
|
29498
|
+
});
|
|
29499
|
+
};
|
|
29500
|
+
MessageModal.prototype.markForCheck = function () {
|
|
29501
|
+
this.cd.markForCheck();
|
|
29502
|
+
};
|
|
29503
|
+
MessageModal.prototype.markAsLoading = function (opts) {
|
|
29504
|
+
this.form.markAsLoading(opts);
|
|
29505
|
+
};
|
|
29506
|
+
MessageModal.prototype.markAsLoaded = function (opts) {
|
|
29507
|
+
this.form.markAsLoaded(opts);
|
|
29508
|
+
};
|
|
29509
|
+
return MessageModal;
|
|
29510
|
+
}());
|
|
29511
|
+
MessageModal.decorators = [
|
|
29512
|
+
{ type: i0.Component, args: [{
|
|
29513
|
+
selector: 'app-message-modal',
|
|
29514
|
+
template: "<ion-header>\n <ion-toolbar color=\"secondary\">\n <ion-buttons slot=\"start\">\n <ion-button class=\"back-button\" (click)=\"cancel($event)\" visible-xs visible-sm visible-mobile>\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n </ion-buttons>\n\n <ion-title>\n {{'SOCIAL.MESSAGE.NEW.TITLE' | translate}}\n </ion-title>\n\n <ion-buttons slot=\"end\">\n\n <ion-button class=\"back-button\" (click)=\"doSubmit($event)\"\n [disabled]=\"!form.valid\"\n visible-xs visible-sm visible-mobile>\n <ion-icon slot=\"icon-only\" name=\"checkmark\"></ion-icon>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n\n<ion-content class=\"ion-padding\" >\n\n <ion-item *ngIf=\"form.error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"form.error|translate\"></ion-label>\n </ion-item>\n\n <app-message-form #form (onSubmit)=\"doSubmit($event)\"\n (onCancel)=\"cancel($event)\"\n [canSelectType]=\"canSelectType\"\n [suggestFn]=\"suggestFn\">\n </app-message-form>\n\n</ion-content>\n\n\n<ion-footer hidden-xs hidden-sm hidden-mobile>\n\n <ion-toolbar>\n\n <ion-row class=\"ion-no-padding\" nowrap>\n <ion-col></ion-col>\n\n <!-- buttons -->\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel($event)\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n\n <ion-button [fill]=\"form.invalid ? 'clear' : 'solid'\"\n [disabled]=\"form.loading || form.invalid\"\n (keyup.enter)=\"doSubmit($event)\"\n (click)=\"doSubmit($event)\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_SEND</ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n\n\n </ion-toolbar>\n</ion-footer>\n",
|
|
29515
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
29516
|
+
},] }
|
|
29517
|
+
];
|
|
29518
|
+
MessageModal.ctorParameters = function () { return [
|
|
29519
|
+
{ type: LocalSettingsService },
|
|
29520
|
+
{ type: i1$5.ModalController },
|
|
29521
|
+
{ type: AccountService },
|
|
29522
|
+
{ type: i0.ChangeDetectorRef }
|
|
29523
|
+
]; };
|
|
29524
|
+
MessageModal.propDecorators = {
|
|
29525
|
+
suggestFn: [{ type: i0.Input }],
|
|
29526
|
+
data: [{ type: i0.Input }],
|
|
29527
|
+
canSelectType: [{ type: i0.Input }],
|
|
29528
|
+
form: [{ type: i0.ViewChild, args: ['form', { static: true },] }]
|
|
29529
|
+
};
|
|
29530
|
+
|
|
29531
|
+
var MessageForm = /** @class */ (function (_super) {
|
|
29532
|
+
__extends(MessageForm, _super);
|
|
29533
|
+
function MessageForm(injector, formBuilder, cd) {
|
|
29534
|
+
var _this = _super.call(this, injector) || this;
|
|
29535
|
+
_this.formBuilder = formBuilder;
|
|
29536
|
+
_this.cd = cd;
|
|
29537
|
+
_this.subjectMinLength = 5;
|
|
29538
|
+
_this.subjectMaxLength = 255;
|
|
29539
|
+
_this.bodyMaxLength = 2000;
|
|
29540
|
+
_this.bodyAutoHeight = true;
|
|
29541
|
+
_this.canSelectType = false;
|
|
29542
|
+
_this.types = MessageTypeList;
|
|
29543
|
+
_this.mobile = _this.settings.mobile;
|
|
29544
|
+
return _this;
|
|
29545
|
+
}
|
|
29546
|
+
MessageForm.prototype.ngOnInit = function () {
|
|
29547
|
+
this.setForm(this.formBuilder.group({
|
|
29548
|
+
type: [MessageTypes.INBOX_MESSAGE, i1.Validators.required],
|
|
29549
|
+
recipients: [null, i1.Validators.required],
|
|
29550
|
+
subject: [null, this.subjectMaxLength
|
|
29551
|
+
? i1.Validators.compose([i1.Validators.required, i1.Validators.minLength(this.subjectMinLength), i1.Validators.maxLength(this.subjectMaxLength)])
|
|
29552
|
+
: i1.Validators.required],
|
|
29553
|
+
body: [null, this.bodyMaxLength
|
|
29554
|
+
? i1.Validators.compose([i1.Validators.maxLength(this.bodyMaxLength)])
|
|
29555
|
+
: i1.Validators.required]
|
|
29556
|
+
}));
|
|
29557
|
+
var personAttributes = this.settings.getFieldDisplayAttributes('person', ['lastName', 'firstName', 'department.name']);
|
|
29558
|
+
this.registerAutocompleteField('recipients', {
|
|
29559
|
+
showAllOnFocus: false,
|
|
29560
|
+
suggestFn: this.suggestFn,
|
|
29561
|
+
filter: {
|
|
29562
|
+
statusIds: [StatusIds.TEMPORARY, StatusIds.ENABLE]
|
|
29563
|
+
},
|
|
29564
|
+
attributes: personAttributes,
|
|
29565
|
+
displayWith: PersonUtils.personToString,
|
|
29566
|
+
multiple: true,
|
|
29567
|
+
mobile: this.mobile
|
|
29568
|
+
});
|
|
29569
|
+
};
|
|
29570
|
+
MessageForm.prototype.isSamePerson = function (o1, o2) {
|
|
29571
|
+
return EntityUtils.equals(o1, o2, 'id');
|
|
29572
|
+
};
|
|
29573
|
+
MessageForm.prototype.markForCheck = function () {
|
|
29574
|
+
this.cd.markForCheck();
|
|
29575
|
+
};
|
|
29576
|
+
return MessageForm;
|
|
29577
|
+
}(AppForm));
|
|
29578
|
+
MessageForm.decorators = [
|
|
29579
|
+
{ type: i0.Component, args: [{
|
|
29580
|
+
selector: 'app-message-form',
|
|
29581
|
+
template: "\n\n<form [formGroup]=\"form\" class=\"form-container\">\n\n <!-- type -->\n <mat-form-field *ngIf=\"canSelectType\">\n <mat-select formControlName=\"type\" [placeholder]=\"'SOCIAL.MESSAGE.TYPE'|translate\">\n <mat-option *ngFor=\"let item of types\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <!-- Recipients -->\n <mat-chips-field *ngIf=\"(form.controls.type.valueChanges|async) !== 'FEED'\"\n formControlName=\"recipients\"\n [placeholder]=\"'SOCIAL.MESSAGE.RECIPIENTS'|translate\"\n [config]=\"autocompleteFields.recipients\"\n [equals]=\"isSamePerson\">\n </mat-chips-field>\n\n <!-- Subject -->\n <mat-form-field>\n <input matInput type=\"text\"\n [placeholder]=\"'SOCIAL.MESSAGE.SUBJECT'|translate\"\n formControlName=\"subject\"\n autocomplete=\"off\"\n required>\n <mat-error *ngIf=\"form.controls.subject.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"form.controls.subject.hasError('minlength')\">\n {{ 'ERROR.FIELD_MIN_LENGTH_COMPACT'|translate }}\n </mat-error>\n <mat-error *ngIf=\"form.controls.subject.hasError('maxlength')\">\n {{ 'ERROR.FIELD_MAX_LENGTH_COMPACT'|translate }}\n </mat-error>\n <mat-hint *ngIf=\"subjectMaxLength\" align=\"end\">\n {{ 'INFO.TEXT_PROGRESS' | translate: { current: form.controls.subject.value?.length || 0, max: subjectMaxLength } }}\n </mat-hint>\n </mat-form-field>\n\n <!-- Body -->\n <mat-form-field floatLabel=\"never\">\n <textarea matInput type=\"text\"\n [placeholder]=\"'SOCIAL.MESSAGE.BODY_HELP'|translate\"\n formControlName=\"body\"\n [class.fixed-height]=\"!bodyAutoHeight\"\n [cdkTextareaAutosize]=\"bodyAutoHeight\"\n (keydown.control.enter)=\"doSubmit($event)\"\n >\n </textarea>\n <mat-error *ngIf=\"form.controls.body.hasError('maxlength')\">\n {{ 'ERROR.FIELD_MAX_LENGTH' | translate: form.controls.body.errors.maxlength }}\n </mat-error>\n <mat-hint *ngIf=\"bodyMaxLength\" align=\"end\">\n {{ 'INFO.TEXT_PROGRESS' | translate: { current: form.controls.body.value?.length || 0, max: bodyMaxLength } }}\n </mat-hint>\n </mat-form-field>\n\n</form>\n",
|
|
29582
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
29583
|
+
styles: ["textarea.fixed-height{height:11.5em}textarea{min-height:11.5em}"]
|
|
29584
|
+
},] }
|
|
29585
|
+
];
|
|
29586
|
+
MessageForm.ctorParameters = function () { return [
|
|
29587
|
+
{ type: i0.Injector },
|
|
29588
|
+
{ type: i1.FormBuilder },
|
|
29589
|
+
{ type: i0.ChangeDetectorRef }
|
|
29590
|
+
]; };
|
|
29591
|
+
MessageForm.propDecorators = {
|
|
29592
|
+
suggestFn: [{ type: i0.Input }],
|
|
29593
|
+
subjectMinLength: [{ type: i0.Input }],
|
|
29594
|
+
subjectMaxLength: [{ type: i0.Input }],
|
|
29595
|
+
bodyMaxLength: [{ type: i0.Input }],
|
|
29596
|
+
bodyAutoHeight: [{ type: i0.Input }],
|
|
29597
|
+
canSelectType: [{ type: i0.Input }]
|
|
29598
|
+
};
|
|
29599
|
+
|
|
29379
29600
|
var SocialModule = /** @class */ (function () {
|
|
29380
29601
|
function SocialModule() {
|
|
29381
29602
|
}
|
|
29382
|
-
SocialModule.forRoot = function () {
|
|
29383
|
-
console.debug('[social] Creating module (root)');
|
|
29384
|
-
return {
|
|
29385
|
-
ngModule: SocialModule,
|
|
29386
|
-
providers: [
|
|
29387
|
-
UserEventService
|
|
29388
|
-
]
|
|
29389
|
-
};
|
|
29390
|
-
};
|
|
29391
29603
|
return SocialModule;
|
|
29392
29604
|
}());
|
|
29393
29605
|
SocialModule.decorators = [
|
|
29394
29606
|
{ type: i0.NgModule, args: [{
|
|
29395
29607
|
imports: [
|
|
29396
29608
|
i1$4.CommonModule,
|
|
29397
|
-
CoreModule
|
|
29609
|
+
CoreModule,
|
|
29610
|
+
SharedModule
|
|
29398
29611
|
],
|
|
29399
29612
|
declarations: [
|
|
29400
|
-
UserEventsTable
|
|
29613
|
+
UserEventsTable,
|
|
29614
|
+
MessageModal,
|
|
29615
|
+
MessageForm
|
|
29401
29616
|
],
|
|
29402
29617
|
exports: [
|
|
29403
|
-
UserEventsTable
|
|
29618
|
+
UserEventsTable,
|
|
29619
|
+
MessageModal
|
|
29404
29620
|
]
|
|
29405
29621
|
},] }
|
|
29406
29622
|
];
|
|
29407
29623
|
|
|
29624
|
+
var Mutations = {
|
|
29625
|
+
send: core.gql(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"], ["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"])))
|
|
29626
|
+
};
|
|
29627
|
+
var MessageService = /** @class */ (function (_super) {
|
|
29628
|
+
__extends(MessageService, _super);
|
|
29629
|
+
function MessageService(graphql, translate, toastController, environment) {
|
|
29630
|
+
var _this = _super.call(this, graphql, environment) || this;
|
|
29631
|
+
_this.graphql = graphql;
|
|
29632
|
+
_this.translate = translate;
|
|
29633
|
+
_this.toastController = toastController;
|
|
29634
|
+
_this.environment = environment;
|
|
29635
|
+
// For DEV only
|
|
29636
|
+
_this._debug = !environment.production;
|
|
29637
|
+
return _this;
|
|
29638
|
+
}
|
|
29639
|
+
/**
|
|
29640
|
+
* Send a message to recipient(s)
|
|
29641
|
+
*
|
|
29642
|
+
* @param entity
|
|
29643
|
+
* @param opts
|
|
29644
|
+
*/
|
|
29645
|
+
MessageService.prototype.send = function (entity, opts) {
|
|
29646
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
29647
|
+
var data, now, done, err_1, error, message;
|
|
29648
|
+
return __generator(this, function (_a) {
|
|
29649
|
+
switch (_a.label) {
|
|
29650
|
+
case 0:
|
|
29651
|
+
data = entity.asObject(MINIFY_ENTITY_FOR_POD);
|
|
29652
|
+
now = Date.now();
|
|
29653
|
+
if (this._debug)
|
|
29654
|
+
console.debug("[message-service] Send message...", data);
|
|
29655
|
+
_a.label = 1;
|
|
29656
|
+
case 1:
|
|
29657
|
+
_a.trys.push([1, 5, , 8]);
|
|
29658
|
+
return [4 /*yield*/, this.graphql.mutate({
|
|
29659
|
+
mutation: Mutations.send,
|
|
29660
|
+
variables: { data: data },
|
|
29661
|
+
error: { code: SocialErrorCodes.SEND_MESSAGE_ERROR, message: 'SOCIAL.ERROR.SEND_MESSAGE_ERROR' }
|
|
29662
|
+
})];
|
|
29663
|
+
case 2:
|
|
29664
|
+
done = (_a.sent()).done;
|
|
29665
|
+
if (this._debug)
|
|
29666
|
+
console.debug("[message-service] Send message [OK] in " + (Date.now() - now) + "ms");
|
|
29667
|
+
if (!(done && (!opts || opts.showToast !== false))) return [3 /*break*/, 4];
|
|
29668
|
+
return [4 /*yield*/, this.showToast({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' })];
|
|
29669
|
+
case 3:
|
|
29670
|
+
_a.sent();
|
|
29671
|
+
_a.label = 4;
|
|
29672
|
+
case 4: return [2 /*return*/, done];
|
|
29673
|
+
case 5:
|
|
29674
|
+
err_1 = _a.sent();
|
|
29675
|
+
error = err_1 && err_1.message || err_1;
|
|
29676
|
+
console.error(error);
|
|
29677
|
+
if (!(!opts || opts.showToast !== false)) return [3 /*break*/, 7];
|
|
29678
|
+
message = error || 'SOCIAL.ERROR.SEND_MESSAGE_ERROR';
|
|
29679
|
+
return [4 /*yield*/, this.showToast({ type: 'error', message: message })];
|
|
29680
|
+
case 6:
|
|
29681
|
+
_a.sent();
|
|
29682
|
+
_a.label = 7;
|
|
29683
|
+
case 7: return [2 /*return*/, false];
|
|
29684
|
+
case 8: return [2 /*return*/];
|
|
29685
|
+
}
|
|
29686
|
+
});
|
|
29687
|
+
});
|
|
29688
|
+
};
|
|
29689
|
+
/* -- protected methods -- */
|
|
29690
|
+
MessageService.prototype.showToast = function (opts) {
|
|
29691
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
29692
|
+
return __generator(this, function (_a) {
|
|
29693
|
+
return [2 /*return*/, Toasts.show(this.toastController, this.translate, Object.assign({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' }, opts))];
|
|
29694
|
+
});
|
|
29695
|
+
});
|
|
29696
|
+
};
|
|
29697
|
+
return MessageService;
|
|
29698
|
+
}(BaseGraphqlService));
|
|
29699
|
+
MessageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MessageService_Factory() { return new MessageService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(ENVIRONMENT, 8)); }, token: MessageService, providedIn: "root" });
|
|
29700
|
+
MessageService.decorators = [
|
|
29701
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29702
|
+
];
|
|
29703
|
+
MessageService.ctorParameters = function () { return [
|
|
29704
|
+
{ type: GraphqlService },
|
|
29705
|
+
{ type: i1$2.TranslateService },
|
|
29706
|
+
{ type: i1$5.ToastController },
|
|
29707
|
+
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29708
|
+
]; };
|
|
29709
|
+
var templateObject_1$4;
|
|
29710
|
+
|
|
29408
29711
|
var PersonFilter_1;
|
|
29409
29712
|
// @dynamic
|
|
29410
29713
|
exports.PersonFilter = PersonFilter_1 = /** @class */ (function (_super) {
|
|
@@ -29462,16 +29765,16 @@
|
|
|
29462
29765
|
], exports.PersonFilter);
|
|
29463
29766
|
|
|
29464
29767
|
var PersonFragments = {
|
|
29465
|
-
person: core.gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"], ["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"])))
|
|
29768
|
+
person: core.gql(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"], ["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"])))
|
|
29466
29769
|
};
|
|
29467
29770
|
// Load persons query
|
|
29468
29771
|
var PersonQueries = {
|
|
29469
|
-
loadAll: core.gql(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""], ["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
29470
|
-
loadAllWithTotal: core.gql(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""], ["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""])), PersonFragments.person)
|
|
29772
|
+
loadAll: core.gql(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""], ["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
29773
|
+
loadAllWithTotal: core.gql(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""], ["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""])), PersonFragments.person)
|
|
29471
29774
|
};
|
|
29472
29775
|
var PersonMutations = {
|
|
29473
|
-
saveAll: core.gql(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""], ["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
29474
|
-
deleteAll: core.gql(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"], ["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"])))
|
|
29776
|
+
saveAll: core.gql(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""], ["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
29777
|
+
deleteAll: core.gql(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"], ["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"])))
|
|
29475
29778
|
};
|
|
29476
29779
|
var PersonService = /** @class */ (function (_super_1) {
|
|
29477
29780
|
__extends(PersonService, _super_1);
|
|
@@ -29592,7 +29895,7 @@
|
|
|
29592
29895
|
};
|
|
29593
29896
|
return PersonService;
|
|
29594
29897
|
}(BaseEntityService));
|
|
29595
|
-
PersonService.ɵprov =
|
|
29898
|
+
PersonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(PlatformService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
29596
29899
|
PersonService.decorators = [
|
|
29597
29900
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29598
29901
|
];
|
|
@@ -29602,7 +29905,7 @@
|
|
|
29602
29905
|
{ type: NetworkService },
|
|
29603
29906
|
{ type: EntitiesStorage }
|
|
29604
29907
|
]; };
|
|
29605
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
29908
|
+
var templateObject_1$5, templateObject_2$4, templateObject_3$3, templateObject_4$3, templateObject_5$2;
|
|
29606
29909
|
|
|
29607
29910
|
var PersonValidatorService = /** @class */ (function () {
|
|
29608
29911
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -29625,7 +29928,7 @@
|
|
|
29625
29928
|
};
|
|
29626
29929
|
return PersonValidatorService;
|
|
29627
29930
|
}());
|
|
29628
|
-
PersonValidatorService.ɵprov =
|
|
29931
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
29629
29932
|
PersonValidatorService.decorators = [
|
|
29630
29933
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29631
29934
|
];
|
|
@@ -29636,7 +29939,7 @@
|
|
|
29636
29939
|
|
|
29637
29940
|
var UsersPage = /** @class */ (function (_super) {
|
|
29638
29941
|
__extends(UsersPage, _super);
|
|
29639
|
-
function UsersPage(injector, accountService, validatorService, configService, dataService,
|
|
29942
|
+
function UsersPage(injector, formBuilder, accountService, validatorService, configService, dataService, messageService, cd, environment) {
|
|
29640
29943
|
var _this = _super.call(this, injector, RESERVED_START_COLUMNS
|
|
29641
29944
|
.concat([
|
|
29642
29945
|
'avatar',
|
|
@@ -29661,16 +29964,17 @@
|
|
|
29661
29964
|
_this.validatorService = validatorService;
|
|
29662
29965
|
_this.configService = configService;
|
|
29663
29966
|
_this.dataService = dataService;
|
|
29967
|
+
_this.messageService = messageService;
|
|
29664
29968
|
_this.cd = cd;
|
|
29665
|
-
_this.canEdit = false;
|
|
29666
29969
|
_this.profiles = __spread(PRIORITIZED_AUTHORITIES).reverse();
|
|
29667
|
-
_this.filterCriteriaCount = 0;
|
|
29668
29970
|
_this.statusList = StatusList;
|
|
29669
29971
|
_this.statusById = StatusById;
|
|
29972
|
+
_this.filterCriteriaCount = 0;
|
|
29670
29973
|
_this.useSticky = false;
|
|
29671
29974
|
_this.referentialToString = referentialToString;
|
|
29672
|
-
_this.inlineEdition = accountService.isAdmin(); // Allow inline edition only if admin
|
|
29673
29975
|
_this.canEdit = accountService.isAdmin();
|
|
29976
|
+
_this.canSendMessage = _this.canEdit;
|
|
29977
|
+
_this.inlineEdition = _this.canEdit;
|
|
29674
29978
|
_this.confirmBeforeDelete = true;
|
|
29675
29979
|
_this.autoLoad = false; // Wait config loading
|
|
29676
29980
|
_this.i18nColumnPrefix = 'USER.';
|
|
@@ -29760,7 +30064,7 @@
|
|
|
29760
30064
|
UsersPage.prototype.restoreFilterOrLoad = function () {
|
|
29761
30065
|
return __awaiter(this, void 0, void 0, function () {
|
|
29762
30066
|
var json, filter;
|
|
29763
|
-
return __generator(this, function (
|
|
30067
|
+
return __generator(this, function (_b) {
|
|
29764
30068
|
this.markAsLoading();
|
|
29765
30069
|
console.debug("[users] Restoring filter from settings...");
|
|
29766
30070
|
json = this.settings.getPageSettings(this.settingsId, SETTINGS_FILTER) || {};
|
|
@@ -29777,6 +30081,56 @@
|
|
|
29777
30081
|
formControl.setValue(null);
|
|
29778
30082
|
return false;
|
|
29779
30083
|
};
|
|
30084
|
+
UsersPage.prototype.openComposeMessageModal = function (event) {
|
|
30085
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30086
|
+
var recipients, hasTopModal, modal, data;
|
|
30087
|
+
var _this = this;
|
|
30088
|
+
return __generator(this, function (_b) {
|
|
30089
|
+
switch (_b.label) {
|
|
30090
|
+
case 0:
|
|
30091
|
+
recipients = (this.selection.selected || [])
|
|
30092
|
+
.map(function (row) { return row.currentData; })
|
|
30093
|
+
.map(exports.Person.fromObject)
|
|
30094
|
+
.map(function (p) {
|
|
30095
|
+
var _a;
|
|
30096
|
+
var target = p.asObject({ minify: true });
|
|
30097
|
+
target.department = (_a = p.department) === null || _a === void 0 ? void 0 : _a.asObject();
|
|
30098
|
+
return target;
|
|
30099
|
+
});
|
|
30100
|
+
return [4 /*yield*/, this.modalCtrl.getTop()];
|
|
30101
|
+
case 1:
|
|
30102
|
+
hasTopModal = !!(_b.sent());
|
|
30103
|
+
return [4 /*yield*/, this.modalCtrl.create({
|
|
30104
|
+
component: MessageModal,
|
|
30105
|
+
componentProps: {
|
|
30106
|
+
suggestFn: function (value, filter, sortBy, sortDirection) { return _this.dataService.suggest(value, filter, sortBy, sortDirection); },
|
|
30107
|
+
data: {
|
|
30108
|
+
recipients: recipients
|
|
30109
|
+
}
|
|
30110
|
+
},
|
|
30111
|
+
cssClass: hasTopModal && 'stack-modal'
|
|
30112
|
+
})];
|
|
30113
|
+
case 2:
|
|
30114
|
+
modal = _b.sent();
|
|
30115
|
+
// Open the modal
|
|
30116
|
+
return [4 /*yield*/, modal.present()];
|
|
30117
|
+
case 3:
|
|
30118
|
+
// Open the modal
|
|
30119
|
+
_b.sent();
|
|
30120
|
+
return [4 /*yield*/, modal.onDidDismiss()];
|
|
30121
|
+
case 4:
|
|
30122
|
+
data = (_b.sent()).data;
|
|
30123
|
+
if (!data || !(data instanceof exports.Message))
|
|
30124
|
+
return [2 /*return*/]; // CANCELLED
|
|
30125
|
+
console.info('[users] received message to send: ', data);
|
|
30126
|
+
return [4 /*yield*/, this.messageService.send(data)];
|
|
30127
|
+
case 5:
|
|
30128
|
+
_b.sent();
|
|
30129
|
+
return [2 /*return*/];
|
|
30130
|
+
}
|
|
30131
|
+
});
|
|
30132
|
+
});
|
|
30133
|
+
};
|
|
29780
30134
|
/* -- protected methods -- */
|
|
29781
30135
|
UsersPage.prototype.markForCheck = function () {
|
|
29782
30136
|
this.cd.markForCheck();
|
|
@@ -29786,7 +30140,7 @@
|
|
|
29786
30140
|
UsersPage.decorators = [
|
|
29787
30141
|
{ type: i0.Component, args: [{
|
|
29788
30142
|
selector: 'app-users-table',
|
|
29789
|
-
template: "<app-toolbar [title]=\"'USER.LIST.TITLE'|translate\"\n color=\"primary\"\n [canGoBack]=\"false\"\n [hasValidate]=\"!(loadingSubject|async) && dirty\"\n (onValidate)=\"save()\">\n <ion-buttons slot=\"end\">\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n <!-- Add -->\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addRow()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <!-- reset filter -->\n <button mat-icon-button (click)=\"resetFilter()\"\n *ngIf=\"filterCriteriaCount\">\n <mat-icon color=\"accent\">filter_list_alt</mat-icon>\n <mat-icon class=\"icon-secondary\" style=\"left: 16px; top: 5px; font-weight: bold;\">close</mat-icon>\n </button>\n\n <!-- show filter -->\n <button mat-icon-button (click)=\"filterExpansionPanel.toggle()\">\n <mat-icon *ngIf=\"filterCriteriaCount; else emptyFilter\"\n [matBadge]=\"filterCriteriaCount\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\">filter_list_alt\n </mat-icon>\n <ng-template #emptyFilter>\n <mat-icon>filter_list_alt</mat-icon>\n </ng-template>\n </button>\n </ng-container>\n\n <ng-template #hasSelection>\n <!-- delete -->\n <button mat-icon-button\n class=\"hidden-xs hidden-sm\"\n [title]=\"'COMMON.BTN_DELETE'|translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n </ion-buttons>\n</app-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"errorSubject|async ; let error\" lines=\"none\" @slideUpDownAnimation>\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <!-- search -->\n <mat-expansion-panel #filterExpansionPanel class=\"ion-no-padding filter-panel filter-panel-floating\">\n <form class=\"form-container ion-padding\" [formGroup]=\"filterForm\" (ngSubmit)=\"onRefresh.emit()\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <!-- search -->\n <mat-form-field>\n <input matInput [placeholder]=\"'USER.LIST.FILTER.SEARCH'|translate\" formControlName=\"searchText\">\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.searchText)\"\n [hidden]=\"filterForm.controls.searchText.disabled || !filterForm.controls.searchText.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n\n <ion-col>\n <!-- status -->\n <mat-form-field>\n <mat-select formControlName=\"statusId\" [placeholder]=\"'USER.STATUS'|translate\">\n <mat-option [value]=\"null\"><i><span translate>COMMON.EMPTY_OPTION</span></i></mat-option>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.statusId)\"\n [hidden]=\"filterForm.controls.statusId.disabled || !filterForm.controls.statusId.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n <mat-action-row>\n <!-- Counter -->\n <ion-label [hidden]=\"(loadingSubject|async) || filterForm.dirty\"\n [color]=\"empty && 'danger'\"\n class=\"ion-padding\">\n {{ (totalRowCount ? 'COMMON.RESULT_COUNT' : 'COMMON.NO_RESULT') | translate: {\n count: (totalRowCount |\n numberFormat)\n } }}\n </ion-label>\n\n <div class=\"toolbar-spacer\"></div>\n\n <!-- Close panel -->\n <ion-button mat-button fill=\"clear\" color=\"dark\"\n (click)=\"filterExpansionPanel.close()\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_CLOSE</ion-text>\n </ion-button>\n\n <!-- Search button -->\n <ion-button mat-button\n [color]=\"filterForm.dirty ? 'tertiary' : 'dark'\"\n [fill]=\"filterForm.dirty ? 'solid' : 'clear'\"\n (click)=\"applyFilterAndClosePanel($event)\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_APPLY</ion-text>\n </ion-button>\n\n </mat-action-row>\n </mat-expansion-panel>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"table-container\">\n <table #table mat-table matSort\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\" [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- avatar Column -->\n <ng-container matColumnDef=\"avatar\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n <div class=\"avatar\" *ngIf=\"row.currentData.avatar; else generateIcon\"\n [ngStyle]=\"{'background-image':'url('+row.currentData.avatar+')'}\"></div>\n <ng-template #generateIcon>\n <div class=\"avatar\">\n <svg width=\"38\" width=\"38\" [data-jdenticon-value]=\"row.currentData.id\"></svg>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <!-- lastName -->\n <ng-container matColumnDef=\"lastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.LAST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='lastName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput\n [formControl]=\"row.validator.controls['lastName']\"\n [placeholder]=\"'USER.LAST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='lastName'\">\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n\n </td>\n\n </ng-container>\n\n <!-- firstname -->\n <ng-container matColumnDef=\"firstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.FIRST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n\n (click)=\"focusColumn='firstName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['firstName']\"\n [placeholder]=\"'USER.FIRST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='firstName'\">\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- email -->\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.EMAIL</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='email'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['email']\"\n [placeholder]=\"'USER.EMAIL'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='email'\">\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('email')\">\n <span translate>ERROR.FIELD_NOT_VALID_EMAIL</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- additional fields -->\n <ng-container *ngFor=\"let definition of additionalFields\" [matColumnDef]=\"definition.key\">\n <th mat-header-cell *matHeaderCellDef>\n <span>{{definition.label|translate}}</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn=definition.key\">\n <app-form-field floatLabel=\"never\"\n [definition]=\"definition\"\n [formControl]=\"row.validator.controls[definition.key]\"\n [required]=\"definition.extra?.account?.required\"\n [autofocus]=\"row.editing && focusColumn===definition.ke\">\n </app-form-field>\n </td>\n </ng-container>\n\n <!-- profile column -->\n <ng-container matColumnDef=\"profile\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.PROFILE</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='profile'\">\n <mat-form-field floatLabel=\"never\">\n <mat-select [formControl]=\"row.validator.controls['mainProfile']\"\n [placeholder]=\"'USER.PROFILE'|translate\">\n <mat-option *ngFor=\"let item of profiles\" [value]=\"item\">\n {{ ('USER.PROFILE_ENUM.' + item) | uppercase |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['mainProfile'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Status column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.STATUS</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='status'\">\n <mat-form-field floatLabel=\"never\">\n <ion-icon matPrefix *ngIf=\"row.validator.controls['statusId'].value >=0\" [name]=\"statusById[row.validator.controls['statusId'].value]?.icon\"></ion-icon>\n\n <mat-select [formControl]=\"row.validator.controls['statusId']\"\n [placeholder]=\"'REFERENTIAL.STATUS'|translate\">\n <mat-select-trigger>\n <span *ngIf=\"row.validator.controls['statusId'].value >=0\">\n {{ statusById[row.validator.controls['statusId'].value]?.label | translate}}</span>\n </mat-select-trigger>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['statusId'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username -->\n <ng-container matColumnDef=\"username\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='username'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls.username\"\n [placeholder]=\"'USER.USERNAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='username'\">\n <mat-error *ngIf=\"row.validator.controls.username.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username extranet -->\n <ng-container matColumnDef=\"usernameExtranet\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME_EXTRANET</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='usernameExtranet'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls.usernameExtranet\"\n [placeholder]=\"'USER.USERNAME_EXTRANET'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='usernameExtranet'\">\n <mat-error *ngIf=\"row.validator.controls.usernameExtranet.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- pubkey -->\n <ng-container matColumnDef=\"pubkey\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.PUBKEY</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [title]=\"row.validator.controls['pubkey'].value\"\n (click)=\"focusColumn='pubkey'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls['pubkey']\" [placeholder]=\"'USER.PUBKEY'|translate\"\n [readonly]=\"!row.editing\" autocomplete=\"off\">\n <mat-error *ngIf=\"row.validator.controls['pubkey'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['pubkey'].hasError('pubkey')\">\n <span translate>ERROR.FIELD_NOT_VALID_PUBKEY</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-error]=\"row.validator.invalid\"\n [class.mat-row-dirty]=\"row.currentData.dirty\"\n [class.mat-row-disabled]=\"!row.editing\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n </div>\n</ion-content>\n\n<ion-footer>\n <mat-paginator class=\"mat-paginator-footer\"\n [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n\n <app-form-buttons-bar *ngIf=\"!mobile && inlineEdition\"\n (onCancel)=\"onRefresh.emit()\" (onSave)=\"save()\" [disabled]=\"(loadingSubject|async) || !dirty\"></app-form-buttons-bar>\n</ion-footer>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addRow()\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n",
|
|
30143
|
+
template: "<app-toolbar [title]=\"'USER.LIST.TITLE'|translate\"\n color=\"primary\"\n [canGoBack]=\"false\"\n [hasValidate]=\"!(loadingSubject|async) && dirty\"\n (onValidate)=\"save()\">\n <ion-buttons slot=\"end\">\n\n <!-- Compose message -->\n <button mat-icon-button *ngIf=\"canSendMessage\"\n [title]=\"'USER.LIST.BTN_SEND_MESSAGE'|translate\"\n (click)=\"openComposeMessageModal($event)\">\n <ion-icon name=\"mail\" slot=\"icon-only\"></ion-icon>\n </button>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n <!-- Add -->\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addRow()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <!-- reset filter -->\n <button mat-icon-button (click)=\"resetFilter()\"\n *ngIf=\"filterCriteriaCount\">\n <mat-icon color=\"accent\">filter_list_alt</mat-icon>\n <mat-icon class=\"icon-secondary\" style=\"left: 16px; top: 5px; font-weight: bold;\">close</mat-icon>\n </button>\n\n <!-- show filter -->\n <button mat-icon-button (click)=\"filterExpansionPanel.toggle()\">\n <mat-icon *ngIf=\"filterCriteriaCount; else emptyFilter\"\n [matBadge]=\"filterCriteriaCount\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\">filter_list_alt\n </mat-icon>\n <ng-template #emptyFilter>\n <mat-icon>filter_list_alt</mat-icon>\n </ng-template>\n </button>\n </ng-container>\n\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button\n class=\"hidden-xs hidden-sm\"\n [title]=\"'COMMON.BTN_DELETE'|translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n </ion-buttons>\n</app-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"errorSubject|async ; let error\" lines=\"none\" @slideUpDownAnimation>\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <!-- search -->\n <mat-expansion-panel #filterExpansionPanel class=\"ion-no-padding filter-panel filter-panel-floating\">\n <form class=\"form-container ion-padding\" [formGroup]=\"filterForm\" (ngSubmit)=\"onRefresh.emit()\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <!-- search -->\n <mat-form-field>\n <input matInput [placeholder]=\"'USER.LIST.FILTER.SEARCH'|translate\" formControlName=\"searchText\">\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.searchText)\"\n [hidden]=\"filterForm.controls.searchText.disabled || !filterForm.controls.searchText.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n\n <ion-col>\n <!-- status -->\n <mat-form-field>\n <mat-select formControlName=\"statusId\" [placeholder]=\"'USER.STATUS'|translate\">\n <mat-option [value]=\"null\"><i><span translate>COMMON.EMPTY_OPTION</span></i></mat-option>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.statusId)\"\n [hidden]=\"filterForm.controls.statusId.disabled || !filterForm.controls.statusId.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n <mat-action-row>\n <!-- Counter -->\n <ion-label [hidden]=\"(loadingSubject|async) || filterForm.dirty\"\n [color]=\"empty && 'danger'\"\n class=\"ion-padding\">\n {{ (totalRowCount ? 'COMMON.RESULT_COUNT' : 'COMMON.NO_RESULT') | translate: {\n count: (totalRowCount |\n numberFormat)\n } }}\n </ion-label>\n\n <div class=\"toolbar-spacer\"></div>\n\n <!-- Close panel -->\n <ion-button mat-button fill=\"clear\" color=\"dark\"\n (click)=\"filterExpansionPanel.close()\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_CLOSE</ion-text>\n </ion-button>\n\n <!-- Search button -->\n <ion-button mat-button\n [color]=\"filterForm.dirty ? 'tertiary' : 'dark'\"\n [fill]=\"filterForm.dirty ? 'solid' : 'clear'\"\n (click)=\"applyFilterAndClosePanel($event)\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_APPLY</ion-text>\n </ion-button>\n\n </mat-action-row>\n </mat-expansion-panel>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"table-container\">\n <table #table mat-table matSort\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\" [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- avatar Column -->\n <ng-container matColumnDef=\"avatar\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n <div class=\"avatar\" *ngIf=\"row.currentData.avatar; else generateIcon\"\n [ngStyle]=\"{'background-image':'url('+row.currentData.avatar+')'}\"></div>\n <ng-template #generateIcon>\n <div class=\"avatar\">\n <svg width=\"38\" width=\"38\" [data-jdenticon-value]=\"row.currentData.id\"></svg>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <!-- lastName -->\n <ng-container matColumnDef=\"lastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.LAST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='lastName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput\n [formControl]=\"row.validator.controls['lastName']\"\n [placeholder]=\"'USER.LAST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='lastName'\">\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n\n </td>\n\n </ng-container>\n\n <!-- firstname -->\n <ng-container matColumnDef=\"firstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.FIRST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n\n (click)=\"focusColumn='firstName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['firstName']\"\n [placeholder]=\"'USER.FIRST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='firstName'\">\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- email -->\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.EMAIL</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='email'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['email']\"\n [placeholder]=\"'USER.EMAIL'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='email'\">\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('email')\">\n <span translate>ERROR.FIELD_NOT_VALID_EMAIL</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- additional fields -->\n <ng-container *ngFor=\"let definition of additionalFields\" [matColumnDef]=\"definition.key\">\n <th mat-header-cell *matHeaderCellDef>\n <span>{{definition.label|translate}}</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn=definition.key\">\n <app-form-field floatLabel=\"never\"\n [definition]=\"definition\"\n [formControl]=\"row.validator.controls[definition.key]\"\n [required]=\"definition.extra?.account?.required\"\n [autofocus]=\"row.editing && focusColumn===definition.ke\">\n </app-form-field>\n </td>\n </ng-container>\n\n <!-- profile column -->\n <ng-container matColumnDef=\"profile\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.PROFILE</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='profile'\">\n <mat-form-field floatLabel=\"never\">\n <mat-select [formControl]=\"row.validator.controls['mainProfile']\"\n [placeholder]=\"'USER.PROFILE'|translate\">\n <mat-option *ngFor=\"let item of profiles\" [value]=\"item\">\n {{ ('USER.PROFILE_ENUM.' + item) | uppercase |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['mainProfile'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Status column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.STATUS</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='status'\">\n <mat-form-field floatLabel=\"never\">\n <ion-icon matPrefix *ngIf=\"row.validator.controls['statusId'].value >=0\" [name]=\"statusById[row.validator.controls['statusId'].value]?.icon\"></ion-icon>\n\n <mat-select [formControl]=\"row.validator.controls['statusId']\"\n [placeholder]=\"'REFERENTIAL.STATUS'|translate\">\n <mat-select-trigger>\n <span *ngIf=\"row.validator.controls['statusId'].value >=0\">\n {{ statusById[row.validator.controls['statusId'].value]?.label | translate}}</span>\n </mat-select-trigger>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['statusId'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username -->\n <ng-container matColumnDef=\"username\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='username'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls.username\"\n [placeholder]=\"'USER.USERNAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='username'\">\n <mat-error *ngIf=\"row.validator.controls.username.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username extranet -->\n <ng-container matColumnDef=\"usernameExtranet\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME_EXTRANET</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='usernameExtranet'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls.usernameExtranet\"\n [placeholder]=\"'USER.USERNAME_EXTRANET'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='usernameExtranet'\">\n <mat-error *ngIf=\"row.validator.controls.usernameExtranet.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- pubkey -->\n <ng-container matColumnDef=\"pubkey\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.PUBKEY</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [title]=\"row.validator.controls.pubkey.valueChanges|async\"\n (click)=\"focusColumn='pubkey'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['pubkey']\" [placeholder]=\"'USER.PUBKEY'|translate\"\n [readonly]=\"!row.editing\" autocomplete=\"off\">\n <mat-error *ngIf=\"row.validator.controls.pubkey.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls.pubkey.hasError('pubkey')\">\n <span translate>ERROR.FIELD_NOT_VALID_PUBKEY</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-error]=\"row.validator.invalid\"\n [class.mat-row-dirty]=\"row.currentData.dirty\"\n [class.mat-row-disabled]=\"!row.editing\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n </div>\n</ion-content>\n\n<ion-footer>\n <mat-paginator class=\"mat-paginator-footer\"\n [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n\n <app-form-buttons-bar *ngIf=\"!mobile && inlineEdition\"\n (onCancel)=\"onRefresh.emit()\" (onSave)=\"save()\" [disabled]=\"(loadingSubject|async) || !dirty\"></app-form-buttons-bar>\n</ion-footer>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addRow()\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n",
|
|
29790
30144
|
providers: [
|
|
29791
30145
|
{ provide: ngxMaterialTable.ValidatorService, useExisting: PersonValidatorService }
|
|
29792
30146
|
],
|
|
@@ -29797,12 +30151,13 @@
|
|
|
29797
30151
|
];
|
|
29798
30152
|
UsersPage.ctorParameters = function () { return [
|
|
29799
30153
|
{ type: i0.Injector },
|
|
30154
|
+
{ type: i1.FormBuilder },
|
|
29800
30155
|
{ type: AccountService },
|
|
29801
30156
|
{ type: ngxMaterialTable.ValidatorService },
|
|
29802
30157
|
{ type: ConfigService },
|
|
29803
30158
|
{ type: PersonService },
|
|
30159
|
+
{ type: MessageService },
|
|
29804
30160
|
{ type: i0.ChangeDetectorRef },
|
|
29805
|
-
{ type: i1.FormBuilder },
|
|
29806
30161
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29807
30162
|
]; };
|
|
29808
30163
|
UsersPage.propDecorators = {
|
|
@@ -29830,22 +30185,24 @@
|
|
|
29830
30185
|
UsersPage
|
|
29831
30186
|
],
|
|
29832
30187
|
exports: [
|
|
30188
|
+
SocialModule,
|
|
29833
30189
|
UsersPage
|
|
29834
30190
|
]
|
|
29835
30191
|
},] }
|
|
29836
30192
|
];
|
|
29837
30193
|
AdminModule.ctorParameters = function () { return []; };
|
|
29838
30194
|
|
|
29839
|
-
var ɵ0 = {
|
|
30195
|
+
var ɵ0$c = {
|
|
29840
30196
|
profile: 'ADMIN'
|
|
29841
30197
|
};
|
|
29842
|
-
var routes
|
|
30198
|
+
var routes = [
|
|
29843
30199
|
{
|
|
29844
30200
|
path: 'users',
|
|
29845
30201
|
pathMatch: 'full',
|
|
29846
30202
|
component: UsersPage,
|
|
29847
30203
|
canActivate: [AuthGuardService],
|
|
29848
|
-
|
|
30204
|
+
canDeactivate: [ComponentDirtyGuard],
|
|
30205
|
+
data: ɵ0$c
|
|
29849
30206
|
}
|
|
29850
30207
|
];
|
|
29851
30208
|
var AdminRoutingModule = /** @class */ (function () {
|
|
@@ -29858,36 +30215,30 @@
|
|
|
29858
30215
|
imports: [
|
|
29859
30216
|
SharedRoutingModule,
|
|
29860
30217
|
AdminModule,
|
|
29861
|
-
i3.RouterModule.forChild(routes
|
|
30218
|
+
i3.RouterModule.forChild(routes)
|
|
29862
30219
|
],
|
|
29863
30220
|
exports: [i3.RouterModule]
|
|
29864
30221
|
},] }
|
|
29865
30222
|
];
|
|
29866
30223
|
|
|
29867
|
-
var
|
|
29868
|
-
LOAD_PERSONS_ERROR: 100,
|
|
29869
|
-
SAVE_PERSONS_ERROR: 101,
|
|
29870
|
-
DELETE_PERSONS_ERROR: 102,
|
|
29871
|
-
};
|
|
29872
|
-
|
|
29873
|
-
var EntityTestClass$1 = /** @class */ (function () {
|
|
30224
|
+
var EntityTestClass = /** @class */ (function () {
|
|
29874
30225
|
function EntityTestClass() {
|
|
29875
30226
|
}
|
|
29876
30227
|
return EntityTestClass;
|
|
29877
30228
|
}());
|
|
29878
|
-
var FAKE_ENTITIES
|
|
30229
|
+
var FAKE_ENTITIES = [
|
|
29879
30230
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
29880
30231
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
29881
30232
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
29882
30233
|
];
|
|
29883
|
-
function deepCopy
|
|
30234
|
+
function deepCopy(values, size) {
|
|
29884
30235
|
if (isNil(size)) {
|
|
29885
|
-
return (values || FAKE_ENTITIES
|
|
30236
|
+
return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
|
|
29886
30237
|
}
|
|
29887
30238
|
var result = [];
|
|
29888
30239
|
var i = 1;
|
|
29889
30240
|
while (result.length < size) {
|
|
29890
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
30241
|
+
result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
|
|
29891
30242
|
var name = entity.name + ' #' + i;
|
|
29892
30243
|
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
29893
30244
|
}));
|
|
@@ -29897,7 +30248,7 @@
|
|
|
29897
30248
|
var AutocompleteTestPage = /** @class */ (function () {
|
|
29898
30249
|
function AutocompleteTestPage(formBuilder) {
|
|
29899
30250
|
this.formBuilder = formBuilder;
|
|
29900
|
-
this._items = deepCopy
|
|
30251
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
29901
30252
|
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
29902
30253
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
29903
30254
|
this.memoryHide = false;
|
|
@@ -29943,7 +30294,7 @@
|
|
|
29943
30294
|
});
|
|
29944
30295
|
// From items
|
|
29945
30296
|
this.autocompleteFields.add('entity-items-large', {
|
|
29946
|
-
items: FAKE_ENTITIES
|
|
30297
|
+
items: FAKE_ENTITIES.slice(),
|
|
29947
30298
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
29948
30299
|
displayWith: this.entityToString
|
|
29949
30300
|
});
|
|
@@ -29965,13 +30316,13 @@
|
|
|
29965
30316
|
var _this = this;
|
|
29966
30317
|
return __generator(this, function (_a) {
|
|
29967
30318
|
data = {
|
|
29968
|
-
entity: deepCopy
|
|
30319
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
29969
30320
|
// This item is NOT in the items list => i should be displayed anyway
|
|
29970
30321
|
missingEntity: {
|
|
29971
30322
|
id: -1, label: '??', name: 'Missing item'
|
|
29972
30323
|
},
|
|
29973
|
-
disableEntity: deepCopy
|
|
29974
|
-
entities: deepCopy
|
|
30324
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2],
|
|
30325
|
+
entities: deepCopy(FAKE_ENTITIES)
|
|
29975
30326
|
};
|
|
29976
30327
|
this.form.setValue(data);
|
|
29977
30328
|
// Load observables
|
|
@@ -30140,13 +30491,13 @@
|
|
|
30140
30491
|
{ type: i1.FormBuilder }
|
|
30141
30492
|
]; };
|
|
30142
30493
|
|
|
30143
|
-
var moment$
|
|
30494
|
+
var moment$5 = momentImported__namespace;
|
|
30144
30495
|
var SwipeTestPage = /** @class */ (function () {
|
|
30145
30496
|
function SwipeTestPage(formBuilder, dateFormatPipe) {
|
|
30146
30497
|
this.formBuilder = formBuilder;
|
|
30147
30498
|
this.dateFormatPipe = dateFormatPipe;
|
|
30148
30499
|
this.$dates = new rxjs.BehaviorSubject(undefined);
|
|
30149
|
-
this._today = moment$
|
|
30500
|
+
this._today = moment$5().startOf('day');
|
|
30150
30501
|
this.form = formBuilder.group({
|
|
30151
30502
|
empty: [null, i1.Validators.required],
|
|
30152
30503
|
date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
@@ -30160,7 +30511,7 @@
|
|
|
30160
30511
|
var _this = this;
|
|
30161
30512
|
var dates = [];
|
|
30162
30513
|
for (var d = 0; d < 7; d++) {
|
|
30163
|
-
dates[d] = moment$
|
|
30514
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
30164
30515
|
}
|
|
30165
30516
|
this.$dates.next(dates);
|
|
30166
30517
|
this.loadData();
|
|
@@ -30207,7 +30558,7 @@
|
|
|
30207
30558
|
{ type: DateFormatPipe }
|
|
30208
30559
|
]; };
|
|
30209
30560
|
|
|
30210
|
-
var moment$
|
|
30561
|
+
var moment$6 = momentImported__namespace;
|
|
30211
30562
|
var DateTimeTestPage = /** @class */ (function () {
|
|
30212
30563
|
function DateTimeTestPage(platform, formBuilder, cd) {
|
|
30213
30564
|
this.platform = platform;
|
|
@@ -30242,7 +30593,7 @@
|
|
|
30242
30593
|
var now, data;
|
|
30243
30594
|
var _this = this;
|
|
30244
30595
|
return __generator(this, function (_a) {
|
|
30245
|
-
now = moment$
|
|
30596
|
+
now = moment$6();
|
|
30246
30597
|
data = {
|
|
30247
30598
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
30248
30599
|
enable: toDateISOString(now),
|
|
@@ -30307,12 +30658,12 @@
|
|
|
30307
30658
|
{ type: i0.ChangeDetectorRef }
|
|
30308
30659
|
]; };
|
|
30309
30660
|
|
|
30310
|
-
var EntityTestClass = /** @class */ (function () {
|
|
30661
|
+
var EntityTestClass$1 = /** @class */ (function () {
|
|
30311
30662
|
function EntityTestClass() {
|
|
30312
30663
|
}
|
|
30313
30664
|
return EntityTestClass;
|
|
30314
30665
|
}());
|
|
30315
|
-
var FAKE_ENTITIES = [
|
|
30666
|
+
var FAKE_ENTITIES$1 = [
|
|
30316
30667
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
30317
30668
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
30318
30669
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -30321,14 +30672,14 @@
|
|
|
30321
30672
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
30322
30673
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
30323
30674
|
];
|
|
30324
|
-
function deepCopy(values, size) {
|
|
30675
|
+
function deepCopy$1(values, size) {
|
|
30325
30676
|
if (isNil(size)) {
|
|
30326
|
-
return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
|
|
30677
|
+
return (values || FAKE_ENTITIES$1).map(function (entity) { return Object.assign({}, entity); });
|
|
30327
30678
|
}
|
|
30328
30679
|
var result = [];
|
|
30329
30680
|
var i = 1;
|
|
30330
30681
|
while (result.length < size) {
|
|
30331
|
-
result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
|
|
30682
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(function (entity) {
|
|
30332
30683
|
var name = entity.name + ' #' + i;
|
|
30333
30684
|
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
30334
30685
|
}));
|
|
@@ -30338,7 +30689,7 @@
|
|
|
30338
30689
|
var ChipsTestPage = /** @class */ (function () {
|
|
30339
30690
|
function ChipsTestPage(formBuilder) {
|
|
30340
30691
|
this.formBuilder = formBuilder;
|
|
30341
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
30692
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
30342
30693
|
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
30343
30694
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
30344
30695
|
this.form = formBuilder.group({
|
|
@@ -30381,7 +30732,7 @@
|
|
|
30381
30732
|
var items, data;
|
|
30382
30733
|
var _this = this;
|
|
30383
30734
|
return __generator(this, function (_a) {
|
|
30384
|
-
items = deepCopy(FAKE_ENTITIES);
|
|
30735
|
+
items = deepCopy$1(FAKE_ENTITIES$1);
|
|
30385
30736
|
data = {
|
|
30386
30737
|
entity: items.slice(0, 1),
|
|
30387
30738
|
entityInitial: items.slice(1, 2),
|
|
@@ -30518,7 +30869,7 @@
|
|
|
30518
30869
|
{ type: i1.FormBuilder }
|
|
30519
30870
|
]; };
|
|
30520
30871
|
|
|
30521
|
-
var moment = momentImported__namespace;
|
|
30872
|
+
var moment$7 = momentImported__namespace;
|
|
30522
30873
|
var DateTestPage = /** @class */ (function () {
|
|
30523
30874
|
function DateTestPage(formBuilder, cd) {
|
|
30524
30875
|
this.formBuilder = formBuilder;
|
|
@@ -30530,7 +30881,8 @@
|
|
|
30530
30881
|
this.timezone = 'Indian/Mahe';
|
|
30531
30882
|
this.stringify = JSON.stringify;
|
|
30532
30883
|
this.form = formBuilder.group({
|
|
30533
|
-
empty: [null,
|
|
30884
|
+
empty: [null, SharedValidators.validDate],
|
|
30885
|
+
emptyRequired: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
30534
30886
|
enable: [null, i1.Validators.required],
|
|
30535
30887
|
disable: [null, i1.Validators.required],
|
|
30536
30888
|
readonly: [null],
|
|
@@ -30554,10 +30906,11 @@
|
|
|
30554
30906
|
var now, nowAtMahe, data;
|
|
30555
30907
|
var _this = this;
|
|
30556
30908
|
return __generator(this, function (_a) {
|
|
30557
|
-
now = moment();
|
|
30909
|
+
now = moment$7();
|
|
30558
30910
|
nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
30559
30911
|
data = {
|
|
30560
|
-
empty:
|
|
30912
|
+
empty: null,
|
|
30913
|
+
emptyRequired: null,
|
|
30561
30914
|
enable: toDateISOString(now),
|
|
30562
30915
|
disable: now.clone(),
|
|
30563
30916
|
readonly: now.clone(),
|
|
@@ -30615,7 +30968,7 @@
|
|
|
30615
30968
|
DateTestPage.decorators = [
|
|
30616
30969
|
{ type: i0.Component, args: [{
|
|
30617
30970
|
selector: 'app-data-test',
|
|
30618
|
-
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <hr/>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value={{stringify(form.controls.timezone.value)}}</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
30971
|
+
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"mobileReadonlyField.readonly=$event.checked\" [checked]=\"mobileReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #mobileReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <hr/>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value={{stringify(form.controls.timezone.value)}}</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"desktopReadonlyField.readonly=$event.checked\" [checked]=\"desktopReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #desktopReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n\n </form>\n</ion-content>\n"
|
|
30619
30972
|
},] }
|
|
30620
30973
|
];
|
|
30621
30974
|
DateTestPage.ctorParameters = function () { return [
|
|
@@ -30635,7 +30988,7 @@
|
|
|
30635
30988
|
{ label: 'Shared directives', divider: true },
|
|
30636
30989
|
{ label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
|
|
30637
30990
|
];
|
|
30638
|
-
var routes$
|
|
30991
|
+
var routes$1 = [
|
|
30639
30992
|
{
|
|
30640
30993
|
path: '',
|
|
30641
30994
|
pathMatch: 'full',
|
|
@@ -30695,7 +31048,7 @@
|
|
|
30695
31048
|
i1.ReactiveFormsModule,
|
|
30696
31049
|
SharedMaterialModule,
|
|
30697
31050
|
i1$2.TranslateModule.forChild(),
|
|
30698
|
-
i3.RouterModule.forChild(routes$
|
|
31051
|
+
i3.RouterModule.forChild(routes$1)
|
|
30699
31052
|
],
|
|
30700
31053
|
declarations: [
|
|
30701
31054
|
DateTimeTestPage,
|
|
@@ -30757,7 +31110,7 @@
|
|
|
30757
31110
|
{ type: i1$2.TranslateService }
|
|
30758
31111
|
]; };
|
|
30759
31112
|
|
|
30760
|
-
var routes$
|
|
31113
|
+
var routes$2 = [
|
|
30761
31114
|
{
|
|
30762
31115
|
path: 'toast',
|
|
30763
31116
|
pathMatch: 'full',
|
|
@@ -30775,7 +31128,7 @@
|
|
|
30775
31128
|
i1$4.CommonModule,
|
|
30776
31129
|
i1$5.IonicModule,
|
|
30777
31130
|
i1$2.TranslateModule.forChild(),
|
|
30778
|
-
i3.RouterModule.forChild(routes$
|
|
31131
|
+
i3.RouterModule.forChild(routes$2)
|
|
30779
31132
|
],
|
|
30780
31133
|
declarations: [
|
|
30781
31134
|
ToastTestingPage
|
|
@@ -30855,7 +31208,7 @@
|
|
|
30855
31208
|
{ type: i1$5.PopoverController }
|
|
30856
31209
|
]; };
|
|
30857
31210
|
|
|
30858
|
-
var routes$
|
|
31211
|
+
var routes$3 = [
|
|
30859
31212
|
{
|
|
30860
31213
|
path: 'upload-file',
|
|
30861
31214
|
pathMatch: 'full',
|
|
@@ -30873,7 +31226,7 @@
|
|
|
30873
31226
|
i1$4.CommonModule,
|
|
30874
31227
|
i1$5.IonicModule,
|
|
30875
31228
|
i1$2.TranslateModule.forChild(),
|
|
30876
|
-
i3.RouterModule.forChild(routes$
|
|
31229
|
+
i3.RouterModule.forChild(routes$3)
|
|
30877
31230
|
],
|
|
30878
31231
|
declarations: [
|
|
30879
31232
|
UploadFileTestingPage
|
|
@@ -31297,7 +31650,7 @@
|
|
|
31297
31650
|
{ type: i1$5.PopoverController }
|
|
31298
31651
|
]; };
|
|
31299
31652
|
|
|
31300
|
-
var routes$
|
|
31653
|
+
var routes$4 = [
|
|
31301
31654
|
{
|
|
31302
31655
|
path: 'text-popover',
|
|
31303
31656
|
pathMatch: 'full',
|
|
@@ -31315,7 +31668,7 @@
|
|
|
31315
31668
|
i1$4.CommonModule,
|
|
31316
31669
|
i1$5.IonicModule,
|
|
31317
31670
|
i1$2.TranslateModule.forChild(),
|
|
31318
|
-
i3.RouterModule.forChild(routes$
|
|
31671
|
+
i3.RouterModule.forChild(routes$4)
|
|
31319
31672
|
],
|
|
31320
31673
|
declarations: [
|
|
31321
31674
|
TextPopoverTestingPage
|
|
@@ -31332,7 +31685,7 @@
|
|
|
31332
31685
|
{ label: 'Table', page: '/testing/core/table' },
|
|
31333
31686
|
{ label: 'Text popover', page: '/testing/core/text-popover' }
|
|
31334
31687
|
];
|
|
31335
|
-
var routes = [
|
|
31688
|
+
var routes$5 = [
|
|
31336
31689
|
{
|
|
31337
31690
|
path: '',
|
|
31338
31691
|
pathMatch: 'full',
|
|
@@ -31359,7 +31712,7 @@
|
|
|
31359
31712
|
imports: [
|
|
31360
31713
|
i1$4.CommonModule,
|
|
31361
31714
|
i1$2.TranslateModule.forChild(),
|
|
31362
|
-
i3.RouterModule.forChild(routes),
|
|
31715
|
+
i3.RouterModule.forChild(routes$5),
|
|
31363
31716
|
// Sub modules
|
|
31364
31717
|
TableTestingModule,
|
|
31365
31718
|
TextPopoverTestingModule
|
|
@@ -31482,7 +31835,6 @@
|
|
|
31482
31835
|
exports.EntityStore = EntityStore;
|
|
31483
31836
|
exports.EntityUtils = EntityUtils;
|
|
31484
31837
|
exports.Environment = Environment;
|
|
31485
|
-
exports.ErrorCodes = ErrorCodes;
|
|
31486
31838
|
exports.EvenPipe = EvenPipe;
|
|
31487
31839
|
exports.FileResponse = FileResponse;
|
|
31488
31840
|
exports.FileService = FileService;
|
|
@@ -31498,7 +31850,7 @@
|
|
|
31498
31850
|
exports.FormGetControlPipe = FormGetControlPipe;
|
|
31499
31851
|
exports.FormGetGroupPipe = FormGetGroupPipe;
|
|
31500
31852
|
exports.FormGetPipe = FormGetPipe;
|
|
31501
|
-
exports.Fragments = Fragments;
|
|
31853
|
+
exports.Fragments = Fragments$1;
|
|
31502
31854
|
exports.GraphqlService = GraphqlService;
|
|
31503
31855
|
exports.HAMMER_PRESS_TIME = HAMMER_PRESS_TIME;
|
|
31504
31856
|
exports.HAMMER_TAP_TIME = HAMMER_TAP_TIME;
|
|
@@ -31547,6 +31899,11 @@
|
|
|
31547
31899
|
exports.MenuComponent = MenuComponent;
|
|
31548
31900
|
exports.MenuItems = MenuItems;
|
|
31549
31901
|
exports.MenuService = MenuService;
|
|
31902
|
+
exports.MessageForm = MessageForm;
|
|
31903
|
+
exports.MessageModal = MessageModal;
|
|
31904
|
+
exports.MessageService = MessageService;
|
|
31905
|
+
exports.MessageTypeList = MessageTypeList;
|
|
31906
|
+
exports.MessageTypes = MessageTypes;
|
|
31550
31907
|
exports.ModalToolbarComponent = ModalToolbarComponent;
|
|
31551
31908
|
exports.NetworkService = NetworkService;
|
|
31552
31909
|
exports.NgInitDirective = NgInitDirective;
|
|
@@ -31603,6 +31960,7 @@
|
|
|
31603
31960
|
exports.SharedTestingModule = SharedTestingModule;
|
|
31604
31961
|
exports.SharedTestsPage = SharedTestsPage;
|
|
31605
31962
|
exports.SharedValidators = SharedValidators;
|
|
31963
|
+
exports.SocialErrorCodes = SocialErrorCodes;
|
|
31606
31964
|
exports.SocialModule = SocialModule;
|
|
31607
31965
|
exports.StartableService = StartableService;
|
|
31608
31966
|
exports.StatusById = StatusById;
|
|
@@ -31630,6 +31988,7 @@
|
|
|
31630
31988
|
exports.UploadFilePopover = UploadFilePopover;
|
|
31631
31989
|
exports.UploadFileTestingModule = UploadFileTestingModule;
|
|
31632
31990
|
exports.UploadFileTestingPage = UploadFileTestingPage;
|
|
31991
|
+
exports.UserEventFragments = UserEventFragments;
|
|
31633
31992
|
exports.UserEventService = UserEventService;
|
|
31634
31993
|
exports.UserEventTypes = UserEventTypes;
|
|
31635
31994
|
exports.UserEventsTable = UserEventsTable;
|
|
@@ -31781,23 +32140,23 @@
|
|
|
31781
32140
|
exports.waitForTrue = waitForTrue;
|
|
31782
32141
|
exports.waitIdle = waitIdle;
|
|
31783
32142
|
exports.waitWhilePending = waitWhilePending;
|
|
31784
|
-
exports
|
|
31785
|
-
exports
|
|
31786
|
-
exports
|
|
31787
|
-
exports
|
|
31788
|
-
exports
|
|
31789
|
-
exports
|
|
31790
|
-
exports
|
|
31791
|
-
exports
|
|
31792
|
-
exports
|
|
31793
|
-
exports
|
|
31794
|
-
exports
|
|
31795
|
-
exports
|
|
31796
|
-
exports
|
|
31797
|
-
exports
|
|
31798
|
-
exports
|
|
32143
|
+
exports.ɵ0 = ɵ0;
|
|
32144
|
+
exports.ɵa = CustomReuseStrategy;
|
|
32145
|
+
exports.ɵb = MatNumpadDomService;
|
|
32146
|
+
exports.ɵc = isFocusableElement;
|
|
32147
|
+
exports.ɵd = RegisterForm;
|
|
32148
|
+
exports.ɵe = AccountValidatorService;
|
|
32149
|
+
exports.ɵf = RegisterModal;
|
|
32150
|
+
exports.ɵg = UserSettingsValidatorService;
|
|
32151
|
+
exports.ɵh = LocalSettingsValidatorService;
|
|
32152
|
+
exports.ɵi = AppIconComponent;
|
|
32153
|
+
exports.ɵj = DateTestPage;
|
|
32154
|
+
exports.ɵk = NumpadTestPage;
|
|
32155
|
+
exports.ɵl = MatBadgeIconTestPage;
|
|
32156
|
+
exports.ɵm = ToastTestingModule;
|
|
32157
|
+
exports.ɵn = ToastTestingPage;
|
|
31799
32158
|
|
|
31800
32159
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
31801
32160
|
|
|
31802
|
-
}));
|
|
32161
|
+
})));
|
|
31803
32162
|
//# sourceMappingURL=sumaris-net.ngx-components.umd.js.map
|