@sumaris-net/ngx-components 1.18.5 → 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 +786 -424
- 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 +7 -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/dates.js +3 -3
- 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/pipes/date-format.pipe.js +6 -3
- 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 +717 -407
- 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/shared/pipes/date-format.pipe.d.ts +3 -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;
|
|
@@ -2261,12 +2238,15 @@
|
|
|
2261
2238
|
var date = momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, DATE_ISO_PATTERN);
|
|
2262
2239
|
return date && this.dateAdapter.format(date, pattern) || '';
|
|
2263
2240
|
};
|
|
2264
|
-
DateFormatPipe.prototype.format = function (date,
|
|
2265
|
-
return this.dateAdapter.format(date,
|
|
2241
|
+
DateFormatPipe.prototype.format = function (date, pattern) {
|
|
2242
|
+
return this.dateAdapter.format(date, pattern);
|
|
2243
|
+
};
|
|
2244
|
+
DateFormatPipe.prototype.parse = function (value, parseFormat) {
|
|
2245
|
+
return momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
2266
2246
|
};
|
|
2267
2247
|
return DateFormatPipe;
|
|
2268
2248
|
}());
|
|
2269
|
-
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" });
|
|
2270
2250
|
DateFormatPipe.decorators = [
|
|
2271
2251
|
{ type: i0.Pipe, args: [{
|
|
2272
2252
|
name: 'dateFormat'
|
|
@@ -2278,7 +2258,7 @@
|
|
|
2278
2258
|
{ type: i1$2.TranslateService }
|
|
2279
2259
|
]; };
|
|
2280
2260
|
|
|
2281
|
-
var moment
|
|
2261
|
+
var moment = momentImported__namespace;
|
|
2282
2262
|
var DateDiffDurationPipe = /** @class */ (function () {
|
|
2283
2263
|
function DateDiffDurationPipe(dateAdapter, translate) {
|
|
2284
2264
|
var _this = this;
|
|
@@ -2295,10 +2275,10 @@
|
|
|
2295
2275
|
return this.format(startDate, endDate);
|
|
2296
2276
|
};
|
|
2297
2277
|
DateDiffDurationPipe.prototype.format = function (startDate, endDate) {
|
|
2298
|
-
var duration = moment
|
|
2278
|
+
var duration = moment.duration(endDate.diff(startDate));
|
|
2299
2279
|
if (duration.asMinutes() < 0)
|
|
2300
2280
|
return '';
|
|
2301
|
-
var timeDuration = moment
|
|
2281
|
+
var timeDuration = moment(0)
|
|
2302
2282
|
.hour(duration.hours())
|
|
2303
2283
|
.minute(duration.minutes());
|
|
2304
2284
|
var days = Math.floor(duration.asDays());
|
|
@@ -2306,7 +2286,7 @@
|
|
|
2306
2286
|
};
|
|
2307
2287
|
return DateDiffDurationPipe;
|
|
2308
2288
|
}());
|
|
2309
|
-
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" });
|
|
2310
2290
|
DateDiffDurationPipe.decorators = [
|
|
2311
2291
|
{ type: i0.Pipe, args: [{
|
|
2312
2292
|
name: 'dateDiffDuration'
|
|
@@ -2328,7 +2308,7 @@
|
|
|
2328
2308
|
};
|
|
2329
2309
|
return DateFromNowPipe;
|
|
2330
2310
|
}());
|
|
2331
|
-
DateFromNowPipe.ɵprov =
|
|
2311
|
+
DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1$1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
2332
2312
|
DateFromNowPipe.decorators = [
|
|
2333
2313
|
{ type: i0.Pipe, args: [{
|
|
2334
2314
|
name: 'dateFromNow'
|
|
@@ -2397,7 +2377,7 @@
|
|
|
2397
2377
|
value *= -1;
|
|
2398
2378
|
}
|
|
2399
2379
|
}
|
|
2400
|
-
var degrees = roundFloat
|
|
2380
|
+
var degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2401
2381
|
// Add sign
|
|
2402
2382
|
var sign = negative ? '-' : '+';
|
|
2403
2383
|
if (opts.placeholderChar) {
|
|
@@ -2448,7 +2428,7 @@
|
|
|
2448
2428
|
}
|
|
2449
2429
|
var degrees = Math.trunc(value);
|
|
2450
2430
|
var minutes = Math.trunc((value - degrees) * 60);
|
|
2451
|
-
var seconds = roundFloat
|
|
2431
|
+
var seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2452
2432
|
while (seconds >= 60) {
|
|
2453
2433
|
seconds -= 60;
|
|
2454
2434
|
minutes += 1;
|
|
@@ -2516,7 +2496,7 @@
|
|
|
2516
2496
|
}
|
|
2517
2497
|
}
|
|
2518
2498
|
var degrees = Math.trunc(value);
|
|
2519
|
-
var minutes = roundFloat
|
|
2499
|
+
var minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2520
2500
|
while (minutes >= 60) {
|
|
2521
2501
|
minutes -= 60;
|
|
2522
2502
|
degrees += 1;
|
|
@@ -2567,15 +2547,15 @@
|
|
|
2567
2547
|
return NaN;
|
|
2568
2548
|
}
|
|
2569
2549
|
if (pattern === 'DD')
|
|
2570
|
-
return roundFloat
|
|
2550
|
+
return roundFloat(degrees, maxDecimals);
|
|
2571
2551
|
var minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2572
2552
|
var seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2573
2553
|
var direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2574
2554
|
var sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2575
2555
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2576
|
-
return roundFloat
|
|
2556
|
+
return roundFloat(degrees, maxDecimals);
|
|
2577
2557
|
}
|
|
2578
|
-
function roundFloat
|
|
2558
|
+
function roundFloat(input, maxDecimals) {
|
|
2579
2559
|
if (maxDecimals > 0) {
|
|
2580
2560
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
2581
2561
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2598,7 +2578,7 @@
|
|
|
2598
2578
|
};
|
|
2599
2579
|
return LatLongFormatPipe;
|
|
2600
2580
|
}());
|
|
2601
|
-
LatLongFormatPipe.ɵprov =
|
|
2581
|
+
LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2602
2582
|
LatLongFormatPipe.decorators = [
|
|
2603
2583
|
{ type: i0.Pipe, args: [{
|
|
2604
2584
|
name: 'latLongFormat'
|
|
@@ -2611,7 +2591,7 @@
|
|
|
2611
2591
|
}
|
|
2612
2592
|
return LatitudeFormatPipe;
|
|
2613
2593
|
}());
|
|
2614
|
-
LatitudeFormatPipe.ɵprov =
|
|
2594
|
+
LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2615
2595
|
LatitudeFormatPipe.decorators = [
|
|
2616
2596
|
{ type: i0.Pipe, args: [{
|
|
2617
2597
|
name: 'latitudeFormat'
|
|
@@ -2624,7 +2604,7 @@
|
|
|
2624
2604
|
}
|
|
2625
2605
|
return LongitudeFormatPipe;
|
|
2626
2606
|
}());
|
|
2627
|
-
LongitudeFormatPipe.ɵprov =
|
|
2607
|
+
LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2628
2608
|
LongitudeFormatPipe.decorators = [
|
|
2629
2609
|
{ type: i0.Pipe, args: [{
|
|
2630
2610
|
name: 'longitudeFormat'
|
|
@@ -2647,7 +2627,7 @@
|
|
|
2647
2627
|
};
|
|
2648
2628
|
return NumberFormatPipe;
|
|
2649
2629
|
}());
|
|
2650
|
-
NumberFormatPipe.ɵprov =
|
|
2630
|
+
NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2651
2631
|
NumberFormatPipe.decorators = [
|
|
2652
2632
|
{ type: i0.Pipe, args: [{
|
|
2653
2633
|
name: 'numberFormat'
|
|
@@ -2690,7 +2670,7 @@
|
|
|
2690
2670
|
};
|
|
2691
2671
|
return HighlightPipe;
|
|
2692
2672
|
}());
|
|
2693
|
-
HighlightPipe.ɵprov =
|
|
2673
|
+
HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2694
2674
|
HighlightPipe.decorators = [
|
|
2695
2675
|
{ type: i0.Pipe, args: [{
|
|
2696
2676
|
name: 'highlight'
|
|
@@ -2758,7 +2738,7 @@
|
|
|
2758
2738
|
{ type: i0.Pipe, args: [{ name: 'fileSize' },] }
|
|
2759
2739
|
];
|
|
2760
2740
|
|
|
2761
|
-
var moment$
|
|
2741
|
+
var moment$1 = momentImported__namespace;
|
|
2762
2742
|
var tz = momentTZImported__namespace;
|
|
2763
2743
|
var DATE_UNIX_TIMESTAMP = 'X';
|
|
2764
2744
|
var DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2769,10 +2749,10 @@
|
|
|
2769
2749
|
this.toDuration = toDuration;
|
|
2770
2750
|
}
|
|
2771
2751
|
DateUtils.min = function (date1, date2) {
|
|
2772
|
-
return date1 && date2
|
|
2752
|
+
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2773
2753
|
};
|
|
2774
2754
|
DateUtils.max = function (date1, date2) {
|
|
2775
|
-
return
|
|
2755
|
+
return date1 && (!date2 || date1.isSameOrAfter(date2)) ? date1 : date2;
|
|
2776
2756
|
};
|
|
2777
2757
|
DateUtils.equals = function (date1, date2) {
|
|
2778
2758
|
return DateUtils.isSame(date1, date2);
|
|
@@ -2836,32 +2816,32 @@
|
|
|
2836
2816
|
if (!value || momentImported.isMoment(value))
|
|
2837
2817
|
return value;
|
|
2838
2818
|
// Parse the input value, as a ISO date time
|
|
2839
|
-
var date = moment$
|
|
2819
|
+
var date = moment$1(value, DATE_ISO_PATTERN);
|
|
2840
2820
|
if (date.isValid())
|
|
2841
2821
|
return date;
|
|
2842
2822
|
// Not valid: trying to convert from unix timestamp
|
|
2843
2823
|
if (typeof value === 'string') {
|
|
2844
2824
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2845
2825
|
if (value.length === 10) {
|
|
2846
|
-
return moment$
|
|
2826
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2847
2827
|
}
|
|
2848
2828
|
else if (value.length === 13) {
|
|
2849
|
-
return moment$
|
|
2829
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2850
2830
|
}
|
|
2851
2831
|
}
|
|
2852
2832
|
console.warn('Unable to parse date: ' + value);
|
|
2853
2833
|
return undefined;
|
|
2854
2834
|
}
|
|
2855
2835
|
function fromUnixTimestamp(timeInSec) {
|
|
2856
|
-
return moment$
|
|
2836
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2857
2837
|
}
|
|
2858
2838
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2859
|
-
return moment$
|
|
2839
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2860
2840
|
}
|
|
2861
2841
|
function toDuration(value, unit) {
|
|
2862
2842
|
if (!value)
|
|
2863
2843
|
return undefined;
|
|
2864
|
-
var duration = moment$
|
|
2844
|
+
var duration = moment$1.duration(value, unit);
|
|
2865
2845
|
// fix 990+ ms
|
|
2866
2846
|
if (duration.milliseconds() >= 990) {
|
|
2867
2847
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2891,7 +2871,7 @@
|
|
|
2891
2871
|
};
|
|
2892
2872
|
return DurationPipe;
|
|
2893
2873
|
}());
|
|
2894
|
-
DurationPipe.ɵprov =
|
|
2874
|
+
DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$2.TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2895
2875
|
DurationPipe.decorators = [
|
|
2896
2876
|
{ type: i0.Pipe, args: [{
|
|
2897
2877
|
name: 'duration'
|
|
@@ -2915,7 +2895,7 @@
|
|
|
2915
2895
|
};
|
|
2916
2896
|
return MathAbsPipe;
|
|
2917
2897
|
}());
|
|
2918
|
-
MathAbsPipe.ɵprov =
|
|
2898
|
+
MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2919
2899
|
MathAbsPipe.decorators = [
|
|
2920
2900
|
{ type: i0.Pipe, args: [{
|
|
2921
2901
|
name: 'mathAbs'
|
|
@@ -2930,7 +2910,7 @@
|
|
|
2930
2910
|
};
|
|
2931
2911
|
return EvenPipe;
|
|
2932
2912
|
}());
|
|
2933
|
-
EvenPipe.ɵprov =
|
|
2913
|
+
EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2934
2914
|
EvenPipe.decorators = [
|
|
2935
2915
|
{ type: i0.Pipe, args: [{
|
|
2936
2916
|
name: 'even'
|
|
@@ -2945,7 +2925,7 @@
|
|
|
2945
2925
|
};
|
|
2946
2926
|
return OddPipe;
|
|
2947
2927
|
}());
|
|
2948
|
-
OddPipe.ɵprov =
|
|
2928
|
+
OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2949
2929
|
OddPipe.decorators = [
|
|
2950
2930
|
{ type: i0.Pipe, args: [{
|
|
2951
2931
|
name: 'odd'
|
|
@@ -3077,7 +3057,7 @@
|
|
|
3077
3057
|
};
|
|
3078
3058
|
return MapGetPipe;
|
|
3079
3059
|
}());
|
|
3080
|
-
MapGetPipe.ɵprov =
|
|
3060
|
+
MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
3081
3061
|
MapGetPipe.decorators = [
|
|
3082
3062
|
{ type: i0.Pipe, args: [{
|
|
3083
3063
|
name: 'mapGet'
|
|
@@ -3094,7 +3074,7 @@
|
|
|
3094
3074
|
};
|
|
3095
3075
|
return MapKeysPipe;
|
|
3096
3076
|
}());
|
|
3097
|
-
MapKeysPipe.ɵprov =
|
|
3077
|
+
MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
3098
3078
|
MapKeysPipe.decorators = [
|
|
3099
3079
|
{ type: i0.Pipe, args: [{
|
|
3100
3080
|
name: 'mapKeys'
|
|
@@ -3111,7 +3091,7 @@
|
|
|
3111
3091
|
};
|
|
3112
3092
|
return MapValuesPipe;
|
|
3113
3093
|
}());
|
|
3114
|
-
MapValuesPipe.ɵprov =
|
|
3094
|
+
MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
3115
3095
|
MapValuesPipe.decorators = [
|
|
3116
3096
|
{ type: i0.Pipe, args: [{
|
|
3117
3097
|
name: 'mapValues'
|
|
@@ -3127,7 +3107,7 @@
|
|
|
3127
3107
|
};
|
|
3128
3108
|
return IsNotNilOrBlankPipe;
|
|
3129
3109
|
}());
|
|
3130
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
3110
|
+
IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
3131
3111
|
IsNotNilOrBlankPipe.decorators = [
|
|
3132
3112
|
{ type: i0.Pipe, args: [{
|
|
3133
3113
|
name: 'isNotNilOrBlank'
|
|
@@ -3142,7 +3122,7 @@
|
|
|
3142
3122
|
};
|
|
3143
3123
|
return IsNilOrBlankPipe;
|
|
3144
3124
|
}());
|
|
3145
|
-
IsNilOrBlankPipe.ɵprov =
|
|
3125
|
+
IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
3146
3126
|
IsNilOrBlankPipe.decorators = [
|
|
3147
3127
|
{ type: i0.Pipe, args: [{
|
|
3148
3128
|
name: 'isNilOrBlank'
|
|
@@ -3157,7 +3137,7 @@
|
|
|
3157
3137
|
};
|
|
3158
3138
|
return ToStringPipe;
|
|
3159
3139
|
}());
|
|
3160
|
-
ToStringPipe.ɵprov =
|
|
3140
|
+
ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
3161
3141
|
ToStringPipe.decorators = [
|
|
3162
3142
|
{ type: i0.Pipe, args: [{
|
|
3163
3143
|
name: 'toString'
|
|
@@ -3172,7 +3152,7 @@
|
|
|
3172
3152
|
};
|
|
3173
3153
|
return StrLengthPipe;
|
|
3174
3154
|
}());
|
|
3175
|
-
StrLengthPipe.ɵprov =
|
|
3155
|
+
StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
3176
3156
|
StrLengthPipe.decorators = [
|
|
3177
3157
|
{ type: i0.Pipe, args: [{
|
|
3178
3158
|
name: 'strLength'
|
|
@@ -3187,7 +3167,7 @@
|
|
|
3187
3167
|
};
|
|
3188
3168
|
return StrIncludesPipe;
|
|
3189
3169
|
}());
|
|
3190
|
-
StrIncludesPipe.ɵprov =
|
|
3170
|
+
StrIncludesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
|
|
3191
3171
|
StrIncludesPipe.decorators = [
|
|
3192
3172
|
{ type: i0.Pipe, args: [{
|
|
3193
3173
|
name: 'strIncludes'
|
|
@@ -3278,7 +3258,7 @@
|
|
|
3278
3258
|
};
|
|
3279
3259
|
return TranslateContextService;
|
|
3280
3260
|
}());
|
|
3281
|
-
TranslateContextService.ɵprov =
|
|
3261
|
+
TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$2.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
3282
3262
|
TranslateContextService.decorators = [
|
|
3283
3263
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
3284
3264
|
];
|
|
@@ -3335,7 +3315,7 @@
|
|
|
3335
3315
|
};
|
|
3336
3316
|
return PropertyGetPipe;
|
|
3337
3317
|
}());
|
|
3338
|
-
PropertyGetPipe.ɵprov =
|
|
3318
|
+
PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
3339
3319
|
PropertyGetPipe.decorators = [
|
|
3340
3320
|
{ type: i0.Pipe, args: [{
|
|
3341
3321
|
name: 'propertyGet'
|
|
@@ -3361,7 +3341,7 @@
|
|
|
3361
3341
|
ngInit: [{ type: i0.Output }]
|
|
3362
3342
|
};
|
|
3363
3343
|
|
|
3364
|
-
var moment$
|
|
3344
|
+
var moment$2 = momentImported__namespace;
|
|
3365
3345
|
// @dynamic
|
|
3366
3346
|
var SharedValidators = /** @class */ (function () {
|
|
3367
3347
|
function SharedValidators() {
|
|
@@ -3444,7 +3424,7 @@
|
|
|
3444
3424
|
};
|
|
3445
3425
|
SharedValidators.validDate = function (control) {
|
|
3446
3426
|
var value = control.value;
|
|
3447
|
-
var date = !value || moment$
|
|
3427
|
+
var date = !value || moment$2.isMoment(value) ? value : moment$2(value, DATE_ISO_PATTERN);
|
|
3448
3428
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3449
3429
|
return { validDate: true };
|
|
3450
3430
|
}
|
|
@@ -4651,7 +4631,7 @@
|
|
|
4651
4631
|
};
|
|
4652
4632
|
return FormErrorTranslator;
|
|
4653
4633
|
}());
|
|
4654
|
-
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" });
|
|
4655
4635
|
FormErrorTranslator.decorators = [
|
|
4656
4636
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4657
4637
|
];
|
|
@@ -4736,7 +4716,7 @@
|
|
|
4736
4716
|
};
|
|
4737
4717
|
return FormGetPipe;
|
|
4738
4718
|
}());
|
|
4739
|
-
FormGetPipe.ɵprov =
|
|
4719
|
+
FormGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4740
4720
|
FormGetPipe.decorators = [
|
|
4741
4721
|
{ type: i0.Pipe, args: [{
|
|
4742
4722
|
name: 'formGet'
|
|
@@ -4751,7 +4731,7 @@
|
|
|
4751
4731
|
};
|
|
4752
4732
|
return FormGetControlPipe;
|
|
4753
4733
|
}());
|
|
4754
|
-
FormGetControlPipe.ɵprov =
|
|
4734
|
+
FormGetControlPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4755
4735
|
FormGetControlPipe.decorators = [
|
|
4756
4736
|
{ type: i0.Pipe, args: [{
|
|
4757
4737
|
name: 'formGetControl'
|
|
@@ -4766,7 +4746,7 @@
|
|
|
4766
4746
|
};
|
|
4767
4747
|
return FormGetArrayPipe;
|
|
4768
4748
|
}());
|
|
4769
|
-
FormGetArrayPipe.ɵprov =
|
|
4749
|
+
FormGetArrayPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4770
4750
|
FormGetArrayPipe.decorators = [
|
|
4771
4751
|
{ type: i0.Pipe, args: [{
|
|
4772
4752
|
name: 'formGetArray'
|
|
@@ -4781,7 +4761,7 @@
|
|
|
4781
4761
|
};
|
|
4782
4762
|
return FormGetGroupPipe;
|
|
4783
4763
|
}());
|
|
4784
|
-
FormGetGroupPipe.ɵprov =
|
|
4764
|
+
FormGetGroupPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4785
4765
|
FormGetGroupPipe.decorators = [
|
|
4786
4766
|
{ type: i0.Pipe, args: [{
|
|
4787
4767
|
name: 'formGetGroup'
|
|
@@ -5127,9 +5107,9 @@
|
|
|
5127
5107
|
var hour = parseInt(durationParts[0] || '0');
|
|
5128
5108
|
var minute = parseInt(durationParts[1] || '0');
|
|
5129
5109
|
var value = hour + (minute + 0.5) / 60;
|
|
5130
|
-
return roundFloat(value, maxDecimals);
|
|
5110
|
+
return roundFloat$1(value, maxDecimals);
|
|
5131
5111
|
}
|
|
5132
|
-
function roundFloat(input, maxDecimals) {
|
|
5112
|
+
function roundFloat$1(input, maxDecimals) {
|
|
5133
5113
|
if (maxDecimals > 0) {
|
|
5134
5114
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
5135
5115
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -5153,17 +5133,17 @@
|
|
|
5153
5133
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
5154
5134
|
}
|
|
5155
5135
|
};
|
|
5156
|
-
var noop$
|
|
5136
|
+
var noop$1 = function () {
|
|
5157
5137
|
};
|
|
5158
|
-
var ɵ0$
|
|
5138
|
+
var ɵ0$2 = noop$1;
|
|
5159
5139
|
var MatLatLongField = /** @class */ (function () {
|
|
5160
5140
|
function MatLatLongField(translate, formBuilder, cd, formGroupDir) {
|
|
5161
5141
|
this.translate = translate;
|
|
5162
5142
|
this.formBuilder = formBuilder;
|
|
5163
5143
|
this.cd = cd;
|
|
5164
5144
|
this.formGroupDir = formGroupDir;
|
|
5165
|
-
this._onChangeCallback = noop$
|
|
5166
|
-
this._onTouchedCallback = noop$
|
|
5145
|
+
this._onChangeCallback = noop$1;
|
|
5146
|
+
this._onTouchedCallback = noop$1;
|
|
5167
5147
|
this._subscription = new rxjs.Subscription();
|
|
5168
5148
|
this.disabling = false;
|
|
5169
5149
|
this.writing = false;
|
|
@@ -5514,14 +5494,14 @@
|
|
|
5514
5494
|
},] }
|
|
5515
5495
|
];
|
|
5516
5496
|
|
|
5517
|
-
var DEFAULT_VALUE_ACCESSOR
|
|
5497
|
+
var DEFAULT_VALUE_ACCESSOR = {
|
|
5518
5498
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5519
5499
|
useExisting: i0.forwardRef(function () { return MatDate; }),
|
|
5520
5500
|
multi: true
|
|
5521
5501
|
};
|
|
5522
|
-
var
|
|
5523
|
-
var noop$
|
|
5524
|
-
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;
|
|
5525
5505
|
var MatDate = /** @class */ (function () {
|
|
5526
5506
|
function MatDate(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5527
5507
|
this.dateAdapter = dateAdapter;
|
|
@@ -5530,13 +5510,13 @@
|
|
|
5530
5510
|
this.cd = cd;
|
|
5531
5511
|
this.keyboard = keyboard;
|
|
5532
5512
|
this.formGroupDir = formGroupDir;
|
|
5533
|
-
this._onChangeCallback = noop$
|
|
5534
|
-
this._onTouchedCallback = noop$
|
|
5513
|
+
this._onChangeCallback = noop$2;
|
|
5514
|
+
this._onTouchedCallback = noop$2;
|
|
5535
5515
|
this._subscription = new rxjs.Subscription();
|
|
5536
5516
|
this._writing = true;
|
|
5537
5517
|
this._disabling = false;
|
|
5538
5518
|
this._readonly = false;
|
|
5539
|
-
this.
|
|
5519
|
+
this.mask = TEXT_MASK;
|
|
5540
5520
|
this.floatLabel = 'auto';
|
|
5541
5521
|
this.compact = false;
|
|
5542
5522
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5595,22 +5575,24 @@
|
|
|
5595
5575
|
this.formControl.setValidators(this.required ? [this.formControl.validator, i1.Validators.required, SharedValidators.validDate] :
|
|
5596
5576
|
[this.formControl.validator, SharedValidators.validDate]);
|
|
5597
5577
|
}
|
|
5598
|
-
// Create the
|
|
5599
|
-
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; });
|
|
5600
5582
|
// Get patterns to display date
|
|
5601
5583
|
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
5602
5584
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
5603
5585
|
.subscribe(function (pattern) { return _this.updatePattern(pattern); }));
|
|
5604
|
-
this._subscription.add(this.
|
|
5586
|
+
this._subscription.add(this.textControl.valueChanges
|
|
5605
5587
|
.subscribe(function (value) { return _this.onFormChange(value); }));
|
|
5606
5588
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5607
5589
|
this._subscription.add(this.formControl.statusChanges
|
|
5608
5590
|
.pipe(operators.filter(function (_) { return !_this.readonly && !_this._writing && !_this._disabling; }) // Skip
|
|
5609
5591
|
)
|
|
5610
5592
|
.subscribe(function () {
|
|
5611
|
-
_this.
|
|
5612
|
-
if (_this.formControl.touched && !_this.
|
|
5613
|
-
_this.
|
|
5593
|
+
_this.textControl.updateValueAndValidity({ emitEvent: false });
|
|
5594
|
+
if (_this.formControl.touched && !_this.textControl.touched) {
|
|
5595
|
+
_this.textControl.markAsTouched();
|
|
5614
5596
|
}
|
|
5615
5597
|
_this.markForCheck();
|
|
5616
5598
|
}));
|
|
@@ -5626,27 +5608,25 @@
|
|
|
5626
5608
|
this._writing = true;
|
|
5627
5609
|
// DEBUG
|
|
5628
5610
|
//console.debug("[mat-date] writeValue() with:", value);
|
|
5629
|
-
// Convert into date
|
|
5611
|
+
// Convert into date
|
|
5612
|
+
// Important: do a clone()
|
|
5630
5613
|
var date = momentImported.isMoment(value) ? value.clone() : fromDateISOString(value);
|
|
5631
5614
|
if (!date || !date.isValid()) {
|
|
5632
|
-
this.
|
|
5615
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5633
5616
|
if (this.formControl.value) {
|
|
5634
5617
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5635
5618
|
this._onChangeCallback(null);
|
|
5636
5619
|
}
|
|
5637
5620
|
}
|
|
5638
5621
|
else {
|
|
5639
|
-
//
|
|
5640
|
-
|
|
5641
|
-
//
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
if (this.dayControl.value !== dayStr) {
|
|
5648
|
-
// Update control
|
|
5649
|
-
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 });
|
|
5650
5630
|
}
|
|
5651
5631
|
}
|
|
5652
5632
|
this._writing = false;
|
|
@@ -5663,10 +5643,10 @@
|
|
|
5663
5643
|
return;
|
|
5664
5644
|
this._disabling = true;
|
|
5665
5645
|
if (isDisabled) {
|
|
5666
|
-
this.
|
|
5646
|
+
this.textControl.disable({ emitEvent: false });
|
|
5667
5647
|
}
|
|
5668
5648
|
else {
|
|
5669
|
-
this.
|
|
5649
|
+
this.textControl.enable({ emitEvent: false });
|
|
5670
5650
|
}
|
|
5671
5651
|
this._disabling = false;
|
|
5672
5652
|
this.markForCheck();
|
|
@@ -5683,12 +5663,12 @@
|
|
|
5683
5663
|
.locale(this.locale) // set as time as locale time
|
|
5684
5664
|
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5685
5665
|
.utc(true);
|
|
5686
|
-
dateStr = this.dateAdapter.format(date, this.
|
|
5666
|
+
dateStr = this.dateAdapter.format(date, this.datePattern) || null;
|
|
5687
5667
|
}
|
|
5688
|
-
if (this.
|
|
5668
|
+
if (this.textControl.value !== dateStr) {
|
|
5689
5669
|
// DEBUG
|
|
5690
5670
|
//console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5691
|
-
this.
|
|
5671
|
+
this.textControl.setValue(dateStr, {
|
|
5692
5672
|
emitEvent: true // Will call onFormChange
|
|
5693
5673
|
});
|
|
5694
5674
|
}
|
|
@@ -5743,7 +5723,7 @@
|
|
|
5743
5723
|
});
|
|
5744
5724
|
};
|
|
5745
5725
|
MatDate.prototype.clear = function () {
|
|
5746
|
-
this.
|
|
5726
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5747
5727
|
this.formControl.setValue(null, { emitEvent: false });
|
|
5748
5728
|
this._onChangeCallback(null);
|
|
5749
5729
|
this.markAsTouched();
|
|
@@ -5752,43 +5732,70 @@
|
|
|
5752
5732
|
/* -- private method -- */
|
|
5753
5733
|
MatDate.prototype.updatePattern = function (pattern) {
|
|
5754
5734
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5755
|
-
if (this.
|
|
5756
|
-
this.
|
|
5757
|
-
this.dayPattern = pattern;
|
|
5735
|
+
if (this.datePattern !== pattern) {
|
|
5736
|
+
this.datePattern = pattern;
|
|
5758
5737
|
this.markForCheck();
|
|
5759
5738
|
}
|
|
5760
5739
|
};
|
|
5761
5740
|
MatDate.prototype.checkIfTouched = function (opts) {
|
|
5762
|
-
if (this.
|
|
5741
|
+
if (this.textControl.touched) {
|
|
5763
5742
|
this._onTouchedCallback();
|
|
5764
5743
|
if (!opts || opts.emitEvent !== false) {
|
|
5765
5744
|
this.markForCheck();
|
|
5766
5745
|
}
|
|
5767
5746
|
}
|
|
5768
5747
|
};
|
|
5769
|
-
MatDate.prototype.onFormChange = function (
|
|
5748
|
+
MatDate.prototype.onFormChange = function (value) {
|
|
5770
5749
|
if (this._writing)
|
|
5771
5750
|
return; // Skip if call by self
|
|
5772
5751
|
this._writing = true;
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
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');
|
|
5783
5773
|
}
|
|
5784
|
-
// Parse
|
|
5785
|
-
var
|
|
5774
|
+
// Parse date (strict = false)
|
|
5775
|
+
var date = isNotNilOrBlank(value) && this.dateAdapter.parse(value, this.datePattern) || null;
|
|
5786
5776
|
// Move to the expected TZ, and keep the local hour (= midnight) to have midnight at local time
|
|
5787
|
-
|
|
5788
|
-
|
|
5777
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date) || null;
|
|
5778
|
+
date = date && date
|
|
5789
5779
|
.startOf('day') // Reset hour
|
|
5790
|
-
.utc()
|
|
5791
|
-
|
|
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();
|
|
5792
5799
|
this._writing = false;
|
|
5793
5800
|
};
|
|
5794
5801
|
MatDate.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
@@ -5815,21 +5822,6 @@
|
|
|
5815
5822
|
});
|
|
5816
5823
|
});
|
|
5817
5824
|
};
|
|
5818
|
-
MatDate.prototype.emitChange = function (value) {
|
|
5819
|
-
// Get the model value
|
|
5820
|
-
var dateStr = toDateISOString(value) || null;
|
|
5821
|
-
if (this.formControl.value !== dateStr) {
|
|
5822
|
-
// DEBUG
|
|
5823
|
-
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5824
|
-
// Apply to form control. => Will call writeValue()
|
|
5825
|
-
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5826
|
-
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5827
|
-
// Changes comes from inside function: use the callback
|
|
5828
|
-
this._onChangeCallback(dateStr);
|
|
5829
|
-
// Check if need to update controls
|
|
5830
|
-
this.checkIfTouched();
|
|
5831
|
-
}
|
|
5832
|
-
};
|
|
5833
5825
|
MatDate.prototype.updateTabIndex = function () {
|
|
5834
5826
|
var _this = this;
|
|
5835
5827
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
@@ -5843,7 +5835,7 @@
|
|
|
5843
5835
|
});
|
|
5844
5836
|
};
|
|
5845
5837
|
MatDate.prototype.markAsTouched = function (opts) {
|
|
5846
|
-
this.
|
|
5838
|
+
this.textControl.markAsTouched(opts);
|
|
5847
5839
|
this._onTouchedCallback();
|
|
5848
5840
|
this.markForCheck();
|
|
5849
5841
|
};
|
|
@@ -5858,16 +5850,16 @@
|
|
|
5858
5850
|
MatDate.decorators = [
|
|
5859
5851
|
{ type: i0.Component, args: [{
|
|
5860
5852
|
selector: 'mat-date-field',
|
|
5861
|
-
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",
|
|
5862
5854
|
providers: [
|
|
5863
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5855
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5864
5856
|
],
|
|
5865
5857
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5866
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%}"]
|
|
5867
5859
|
},] }
|
|
5868
5860
|
];
|
|
5869
5861
|
MatDate.ctorParameters = function () { return [
|
|
5870
|
-
{ type: i1$
|
|
5862
|
+
{ type: i1$1.MomentDateAdapter },
|
|
5871
5863
|
{ type: i1$2.TranslateService },
|
|
5872
5864
|
{ type: i1.FormBuilder },
|
|
5873
5865
|
{ type: i0.ChangeDetectorRef },
|
|
@@ -5894,16 +5886,16 @@
|
|
|
5894
5886
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
5895
5887
|
};
|
|
5896
5888
|
|
|
5897
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
5889
|
+
var DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5898
5890
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5899
5891
|
useExisting: i0.forwardRef(function () { return MatDateTime; }),
|
|
5900
5892
|
multi: true
|
|
5901
5893
|
};
|
|
5902
|
-
var DAY_MASK
|
|
5894
|
+
var DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5903
5895
|
var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5904
|
-
var HOUR_MASK
|
|
5905
|
-
var noop$
|
|
5906
|
-
var ɵ0$
|
|
5896
|
+
var HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5897
|
+
var noop$3 = function () { };
|
|
5898
|
+
var ɵ0$4 = noop$3;
|
|
5907
5899
|
var MatDateTime = /** @class */ (function () {
|
|
5908
5900
|
function MatDateTime(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5909
5901
|
this.dateAdapter = dateAdapter;
|
|
@@ -5912,14 +5904,14 @@
|
|
|
5912
5904
|
this.cd = cd;
|
|
5913
5905
|
this.keyboard = keyboard;
|
|
5914
5906
|
this.formGroupDir = formGroupDir;
|
|
5915
|
-
this._onChangeCallback = noop$
|
|
5916
|
-
this._onTouchedCallback = noop$
|
|
5907
|
+
this._onChangeCallback = noop$3;
|
|
5908
|
+
this._onTouchedCallback = noop$3;
|
|
5917
5909
|
this._subscription = new rxjs.Subscription();
|
|
5918
5910
|
this._writing = true;
|
|
5919
5911
|
this._disabling = false;
|
|
5920
5912
|
this._readonly = false;
|
|
5921
|
-
this.dayMask = DAY_MASK
|
|
5922
|
-
this.hourMask = HOUR_MASK
|
|
5913
|
+
this.dayMask = DAY_MASK;
|
|
5914
|
+
this.hourMask = HOUR_MASK;
|
|
5923
5915
|
this.floatLabel = 'auto';
|
|
5924
5916
|
this.compact = false;
|
|
5925
5917
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -6278,14 +6270,14 @@
|
|
|
6278
6270
|
selector: 'mat-date-time-field',
|
|
6279
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",
|
|
6280
6272
|
providers: [
|
|
6281
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6273
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
6282
6274
|
],
|
|
6283
6275
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6284
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%}"]
|
|
6285
6277
|
},] }
|
|
6286
6278
|
];
|
|
6287
6279
|
MatDateTime.ctorParameters = function () { return [
|
|
6288
|
-
{ type: i1$
|
|
6280
|
+
{ type: i1$1.MomentDateAdapter },
|
|
6289
6281
|
{ type: i1$2.TranslateService },
|
|
6290
6282
|
{ type: i1.FormBuilder },
|
|
6291
6283
|
{ type: i0.ChangeDetectorRef },
|
|
@@ -6312,15 +6304,15 @@
|
|
|
6312
6304
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
6313
6305
|
};
|
|
6314
6306
|
|
|
6315
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6307
|
+
var DEFAULT_VALUE_ACCESSOR$2 = {
|
|
6316
6308
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6317
6309
|
useExisting: i0.forwardRef(function () { return MatDateShort; }),
|
|
6318
6310
|
multi: true
|
|
6319
6311
|
};
|
|
6320
|
-
var DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
6312
|
+
var DAY_MASK$1 = [/\d/, /\d/, /\d/, /\d/];
|
|
6321
6313
|
var noop$4 = function () {
|
|
6322
6314
|
};
|
|
6323
|
-
var ɵ0$
|
|
6315
|
+
var ɵ0$5 = noop$4;
|
|
6324
6316
|
var MatDateShort = /** @class */ (function () {
|
|
6325
6317
|
function MatDateShort(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
6326
6318
|
this.dateAdapter = dateAdapter;
|
|
@@ -6333,7 +6325,7 @@
|
|
|
6333
6325
|
this._onTouchedCallback = noop$4;
|
|
6334
6326
|
this.writing = true;
|
|
6335
6327
|
this.disabling = false;
|
|
6336
|
-
this.dayMask = DAY_MASK;
|
|
6328
|
+
this.dayMask = DAY_MASK$1;
|
|
6337
6329
|
this.disabled = false;
|
|
6338
6330
|
this.floatLabel = 'auto';
|
|
6339
6331
|
this.readonly = false;
|
|
@@ -6610,7 +6602,7 @@
|
|
|
6610
6602
|
selector: 'mat-date-short-field',
|
|
6611
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",
|
|
6612
6604
|
providers: [
|
|
6613
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6605
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
6614
6606
|
],
|
|
6615
6607
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6616
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%}"]
|
|
@@ -6681,16 +6673,16 @@
|
|
|
6681
6673
|
},] }
|
|
6682
6674
|
];
|
|
6683
6675
|
|
|
6684
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6676
|
+
var DEFAULT_VALUE_ACCESSOR$3 = {
|
|
6685
6677
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6686
6678
|
useExisting: i0.forwardRef(function () { return MatDuration; }),
|
|
6687
6679
|
multi: true
|
|
6688
6680
|
};
|
|
6689
6681
|
var HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
6690
|
-
var HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6691
|
-
var noop$
|
|
6682
|
+
var HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6683
|
+
var noop$5 = function () {
|
|
6692
6684
|
};
|
|
6693
|
-
var ɵ0$6 = noop$
|
|
6685
|
+
var ɵ0$6 = noop$5;
|
|
6694
6686
|
var MatDuration = /** @class */ (function () {
|
|
6695
6687
|
function MatDuration(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
6696
6688
|
this.dateAdapter = dateAdapter;
|
|
@@ -6699,11 +6691,11 @@
|
|
|
6699
6691
|
this.cd = cd;
|
|
6700
6692
|
this.formGroupDir = formGroupDir;
|
|
6701
6693
|
this._subscription = new rxjs.Subscription();
|
|
6702
|
-
this._onChangeCallback = noop$
|
|
6703
|
-
this._onTouchedCallback = noop$
|
|
6694
|
+
this._onChangeCallback = noop$5;
|
|
6695
|
+
this._onTouchedCallback = noop$5;
|
|
6704
6696
|
this.writing = true;
|
|
6705
6697
|
this.disabling = false;
|
|
6706
|
-
this.hourMask = HOUR_MASK;
|
|
6698
|
+
this.hourMask = HOUR_MASK$1;
|
|
6707
6699
|
this.disabled = false;
|
|
6708
6700
|
this.floatLabel = 'auto';
|
|
6709
6701
|
this.readonly = false;
|
|
@@ -6896,7 +6888,7 @@
|
|
|
6896
6888
|
selector: 'mat-duration-field',
|
|
6897
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",
|
|
6898
6890
|
providers: [
|
|
6899
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6891
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6900
6892
|
],
|
|
6901
6893
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6902
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%}"]
|
|
@@ -6956,22 +6948,22 @@
|
|
|
6956
6948
|
},] }
|
|
6957
6949
|
];
|
|
6958
6950
|
|
|
6959
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6951
|
+
var DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6960
6952
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6961
6953
|
useExisting: i0.forwardRef(function () { return MatBooleanField; }),
|
|
6962
6954
|
multi: true
|
|
6963
6955
|
};
|
|
6964
|
-
var noop$
|
|
6956
|
+
var noop$6 = function () {
|
|
6965
6957
|
};
|
|
6966
|
-
var ɵ0$
|
|
6958
|
+
var ɵ0$7 = noop$6;
|
|
6967
6959
|
var MatBooleanField = /** @class */ (function () {
|
|
6968
6960
|
function MatBooleanField(translate, formBuilder, cd, formGroupDir) {
|
|
6969
6961
|
this.translate = translate;
|
|
6970
6962
|
this.formBuilder = formBuilder;
|
|
6971
6963
|
this.cd = cd;
|
|
6972
6964
|
this.formGroupDir = formGroupDir;
|
|
6973
|
-
this._onChangeCallback = noop$
|
|
6974
|
-
this._onTouchedCallback = noop$
|
|
6965
|
+
this._onChangeCallback = noop$6;
|
|
6966
|
+
this._onTouchedCallback = noop$6;
|
|
6975
6967
|
this._writing = false;
|
|
6976
6968
|
this.showRadio = false;
|
|
6977
6969
|
this.disabled = false;
|
|
@@ -7146,7 +7138,7 @@
|
|
|
7146
7138
|
selector: 'mat-boolean-field',
|
|
7147
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",
|
|
7148
7140
|
providers: [
|
|
7149
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
7141
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
7150
7142
|
],
|
|
7151
7143
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
7152
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}"]
|
|
@@ -7233,7 +7225,6 @@
|
|
|
7233
7225
|
return MatNumpadEvent;
|
|
7234
7226
|
}(KeyboardEvent));
|
|
7235
7227
|
|
|
7236
|
-
exports.AnimationState = void 0;
|
|
7237
7228
|
(function (AnimationState) {
|
|
7238
7229
|
AnimationState["ENTER"] = "enter";
|
|
7239
7230
|
AnimationState["ENTER_INPUT"] = "enter-input";
|
|
@@ -7401,7 +7392,7 @@
|
|
|
7401
7392
|
};
|
|
7402
7393
|
return MatNumpadDomService;
|
|
7403
7394
|
}());
|
|
7404
|
-
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" });
|
|
7405
7396
|
MatNumpadDomService.decorators = [
|
|
7406
7397
|
{ type: i0.Injectable, args: [{
|
|
7407
7398
|
providedIn: 'root'
|
|
@@ -7807,7 +7798,7 @@
|
|
|
7807
7798
|
},] }
|
|
7808
7799
|
];
|
|
7809
7800
|
|
|
7810
|
-
var DEFAULT_VALUE_ACCESSOR = {
|
|
7801
|
+
var DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7811
7802
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7812
7803
|
useExisting: i0.forwardRef(function () { return MatSwipeField; }),
|
|
7813
7804
|
multi: true
|
|
@@ -8127,7 +8118,7 @@
|
|
|
8127
8118
|
{ type: i0.Component, args: [{
|
|
8128
8119
|
selector: 'mat-swipe-field',
|
|
8129
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",
|
|
8130
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
8121
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
8131
8122
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
8132
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}"]
|
|
8133
8124
|
},] }
|
|
@@ -8188,14 +8179,14 @@
|
|
|
8188
8179
|
},] }
|
|
8189
8180
|
];
|
|
8190
8181
|
|
|
8191
|
-
var noop$
|
|
8192
|
-
var ɵ0$
|
|
8182
|
+
var noop$7 = function () { };
|
|
8183
|
+
var ɵ0$8 = noop$7;
|
|
8193
8184
|
var MatChipsField = /** @class */ (function () {
|
|
8194
8185
|
function MatChipsField(cd, formGroupDir) {
|
|
8195
8186
|
this.cd = cd;
|
|
8196
8187
|
this.formGroupDir = formGroupDir;
|
|
8197
|
-
this._onChangeCallback = noop$
|
|
8198
|
-
this._onTouchedCallback = noop$
|
|
8188
|
+
this._onChangeCallback = noop$7;
|
|
8189
|
+
this._onTouchedCallback = noop$7;
|
|
8199
8190
|
this.logPrefix = '[mat-chips] ';
|
|
8200
8191
|
this.formControlName = null;
|
|
8201
8192
|
this.required = false;
|
|
@@ -9166,7 +9157,7 @@
|
|
|
9166
9157
|
};
|
|
9167
9158
|
return ProgressBarService;
|
|
9168
9159
|
}());
|
|
9169
|
-
ProgressBarService.ɵprov =
|
|
9160
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
9170
9161
|
ProgressBarService.decorators = [
|
|
9171
9162
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9172
9163
|
];
|
|
@@ -9213,7 +9204,7 @@
|
|
|
9213
9204
|
};
|
|
9214
9205
|
return AppGestureConfig;
|
|
9215
9206
|
}(i1$6.HammerGestureConfig));
|
|
9216
|
-
AppGestureConfig.ɵprov =
|
|
9207
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
9217
9208
|
AppGestureConfig.decorators = [
|
|
9218
9209
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9219
9210
|
];
|
|
@@ -9480,7 +9471,7 @@
|
|
|
9480
9471
|
};
|
|
9481
9472
|
return MatPaginatorI18n;
|
|
9482
9473
|
}(paginator.MatPaginatorIntl));
|
|
9483
|
-
MatPaginatorI18n.ɵprov =
|
|
9474
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
9484
9475
|
MatPaginatorI18n.decorators = [
|
|
9485
9476
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9486
9477
|
];
|
|
@@ -9572,17 +9563,17 @@
|
|
|
9572
9563
|
return rgbArrayToHex(rgb.map(function (v) { return 255 - v; }));
|
|
9573
9564
|
}
|
|
9574
9565
|
|
|
9575
|
-
var noop = function () {
|
|
9566
|
+
var noop$8 = function () {
|
|
9576
9567
|
};
|
|
9577
|
-
var ɵ0$
|
|
9568
|
+
var ɵ0$9 = noop$8;
|
|
9578
9569
|
var AppFormField = /** @class */ (function () {
|
|
9579
9570
|
function AppFormField(translate, cd, injector, formGroupDir) {
|
|
9580
9571
|
this.translate = translate;
|
|
9581
9572
|
this.cd = cd;
|
|
9582
9573
|
this.injector = injector;
|
|
9583
9574
|
this.formGroupDir = formGroupDir;
|
|
9584
|
-
this._onChangeCallback = noop;
|
|
9585
|
-
this._onTouchedCallback = noop;
|
|
9575
|
+
this._onChangeCallback = noop$8;
|
|
9576
|
+
this._onTouchedCallback = noop$8;
|
|
9586
9577
|
this.readonly = false;
|
|
9587
9578
|
this.compact = false;
|
|
9588
9579
|
this.floatLabel = 'auto';
|
|
@@ -10140,7 +10131,7 @@
|
|
|
10140
10131
|
};
|
|
10141
10132
|
return AudioProvider;
|
|
10142
10133
|
}(StartableService));
|
|
10143
|
-
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" });
|
|
10144
10135
|
AudioProvider.decorators = [
|
|
10145
10136
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
10146
10137
|
];
|
|
@@ -10250,7 +10241,7 @@
|
|
|
10250
10241
|
};
|
|
10251
10242
|
return Hotkeys;
|
|
10252
10243
|
}());
|
|
10253
|
-
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" });
|
|
10254
10245
|
Hotkeys.decorators = [
|
|
10255
10246
|
{ type: i0.Injectable, args: [{
|
|
10256
10247
|
providedIn: 'root'
|
|
@@ -10455,7 +10446,7 @@
|
|
|
10455
10446
|
return Base64ImageReader;
|
|
10456
10447
|
}());
|
|
10457
10448
|
|
|
10458
|
-
var uuidv4
|
|
10449
|
+
var uuidv4 = uuidv4Imported__namespace;
|
|
10459
10450
|
var FileService = /** @class */ (function () {
|
|
10460
10451
|
function FileService(platform,
|
|
10461
10452
|
//private transfer: FileTransfer,
|
|
@@ -10501,7 +10492,7 @@
|
|
|
10501
10492
|
lastSlashIndex = source.lastIndexOf('/');
|
|
10502
10493
|
if (lastSlashIndex === -1)
|
|
10503
10494
|
throw new Error('Invalid URL: ' + source);
|
|
10504
|
-
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
10495
|
+
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
10505
10496
|
if (!(responseType === 'file' && this.canUseFileSystem)) return [3 /*break*/, 4];
|
|
10506
10497
|
console.warn("WARN: [file] Fetching image {" + source + "} in local file...");
|
|
10507
10498
|
targetFilePath = this._imageDirectory + fileName;
|
|
@@ -10564,7 +10555,7 @@
|
|
|
10564
10555
|
};
|
|
10565
10556
|
return FileService;
|
|
10566
10557
|
}());
|
|
10567
|
-
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" });
|
|
10568
10559
|
FileService.decorators = [
|
|
10569
10560
|
{ type: i0.Injectable, args: [{
|
|
10570
10561
|
providedIn: 'root',
|
|
@@ -10731,7 +10722,7 @@
|
|
|
10731
10722
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
10732
10723
|
|
|
10733
10724
|
var scrypt = require('scrypt-async');
|
|
10734
|
-
var sha256
|
|
10725
|
+
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
10735
10726
|
var sha512 = require('hash.js/lib/hash/sha/512');
|
|
10736
10727
|
var nacl = {
|
|
10737
10728
|
sign: tweetnacl.sign,
|
|
@@ -10837,7 +10828,7 @@
|
|
|
10837
10828
|
* Hash (using SHA256) a message
|
|
10838
10829
|
*/
|
|
10839
10830
|
CryptoService.prototype.sha256 = function (message) {
|
|
10840
|
-
return sha256
|
|
10831
|
+
return sha256().update(message).digest('hex');
|
|
10841
10832
|
};
|
|
10842
10833
|
/**
|
|
10843
10834
|
* Hash (using SHA512) a message
|
|
@@ -10851,7 +10842,7 @@
|
|
|
10851
10842
|
};
|
|
10852
10843
|
return CryptoService;
|
|
10853
10844
|
}());
|
|
10854
|
-
CryptoService.ɵprov =
|
|
10845
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
10855
10846
|
CryptoService.decorators = [
|
|
10856
10847
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
10857
10848
|
];
|
|
@@ -11721,7 +11712,7 @@
|
|
|
11721
11712
|
onRefresh: [{ type: i0.Input }]
|
|
11722
11713
|
};
|
|
11723
11714
|
|
|
11724
|
-
var moment$
|
|
11715
|
+
var moment$3 = momentImported__namespace;
|
|
11725
11716
|
var SETTINGS_STORAGE_KEY = 'settings';
|
|
11726
11717
|
var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
11727
11718
|
// fixme: this constant points to static environment
|
|
@@ -12023,11 +12014,11 @@
|
|
|
12023
12014
|
if (!feature) {
|
|
12024
12015
|
feature = {
|
|
12025
12016
|
name: featureName.toLowerCase(),
|
|
12026
|
-
lastSyncDate: moment$
|
|
12017
|
+
lastSyncDate: moment$3().toISOString()
|
|
12027
12018
|
};
|
|
12028
12019
|
}
|
|
12029
12020
|
else {
|
|
12030
|
-
feature.lastSyncDate = moment$
|
|
12021
|
+
feature.lastSyncDate = moment$3().toISOString();
|
|
12031
12022
|
}
|
|
12032
12023
|
this.saveOfflineFeature(feature);
|
|
12033
12024
|
};
|
|
@@ -12221,7 +12212,7 @@
|
|
|
12221
12212
|
if (!page || !page.title || !page.path)
|
|
12222
12213
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
12223
12214
|
// Set time
|
|
12224
|
-
page.time = page.time || moment$
|
|
12215
|
+
page.time = page.time || moment$3();
|
|
12225
12216
|
// Clean the title (remove <small> tags)
|
|
12226
12217
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
12227
12218
|
var tagIndex = page.title.indexOf('</small>');
|
|
@@ -12238,18 +12229,18 @@
|
|
|
12238
12229
|
};
|
|
12239
12230
|
return LocalSettingsService;
|
|
12240
12231
|
}(StartableService));
|
|
12241
|
-
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" });
|
|
12242
12233
|
LocalSettingsService.decorators = [
|
|
12243
12234
|
{ type: i0.Injectable, args: [{
|
|
12244
|
-
providedIn: 'root'
|
|
12245
|
-
deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
12235
|
+
providedIn: 'root'
|
|
12236
|
+
//deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
12246
12237
|
},] }
|
|
12247
12238
|
];
|
|
12248
12239
|
LocalSettingsService.ctorParameters = function () { return [
|
|
12249
12240
|
{ type: i1$2.TranslateService },
|
|
12250
12241
|
{ type: i1$5.Platform },
|
|
12251
12242
|
{ type: i3$2.Storage },
|
|
12252
|
-
{ type:
|
|
12243
|
+
{ type: Environment, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
|
|
12253
12244
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_LOCAL_SETTINGS,] }] },
|
|
12254
12245
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_LOCAL_SETTINGS_OPTIONS,] }] }
|
|
12255
12246
|
]; };
|
|
@@ -13119,7 +13110,7 @@
|
|
|
13119
13110
|
};
|
|
13120
13111
|
return NetworkService;
|
|
13121
13112
|
}(StartableService));
|
|
13122
|
-
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" });
|
|
13123
13114
|
NetworkService.decorators = [
|
|
13124
13115
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
13125
13116
|
];
|
|
@@ -13139,7 +13130,7 @@
|
|
|
13139
13130
|
{ type: i1$5.ToastController, decorators: [{ type: i0.Optional }] }
|
|
13140
13131
|
]; };
|
|
13141
13132
|
|
|
13142
|
-
var ErrorCodes
|
|
13133
|
+
var ErrorCodes = {
|
|
13143
13134
|
UNKNOWN_ERROR: 0,
|
|
13144
13135
|
LOAD_ACCOUNT_ERROR: 1,
|
|
13145
13136
|
BAD_PASSWORD: 2,
|
|
@@ -13556,7 +13547,7 @@
|
|
|
13556
13547
|
case 13:
|
|
13557
13548
|
err_1 = _b.sent();
|
|
13558
13549
|
console.error(err_1);
|
|
13559
|
-
throw { code: ErrorCodes
|
|
13550
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err_1 };
|
|
13560
13551
|
case 14:
|
|
13561
13552
|
// Emit update event
|
|
13562
13553
|
if (!opts || opts.emitEvent !== false) {
|
|
@@ -14333,7 +14324,7 @@
|
|
|
14333
14324
|
}(StartableService));
|
|
14334
14325
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
14335
14326
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
14336
|
-
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" });
|
|
14337
14328
|
EntitiesStorage.decorators = [
|
|
14338
14329
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
14339
14330
|
];
|
|
@@ -14489,10 +14480,10 @@
|
|
|
14489
14480
|
function referentialsToString(values, properties, separator) {
|
|
14490
14481
|
return (values || []).map(function (v) { return referentialToString(v, properties); }).join(separator || ', ');
|
|
14491
14482
|
}
|
|
14492
|
-
var ɵ0$
|
|
14483
|
+
var ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
14493
14484
|
var StatusList = Object.freeze([
|
|
14494
14485
|
{
|
|
14495
|
-
id: ɵ0$
|
|
14486
|
+
id: ɵ0$a,
|
|
14496
14487
|
icon: 'checkmark',
|
|
14497
14488
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
14498
14489
|
},
|
|
@@ -14795,7 +14786,7 @@
|
|
|
14795
14786
|
(data.lastName || '')) || '';
|
|
14796
14787
|
}
|
|
14797
14788
|
|
|
14798
|
-
var uuidv4 = uuidv4Imported__namespace;
|
|
14789
|
+
var uuidv4$1 = uuidv4Imported__namespace;
|
|
14799
14790
|
var _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14800
14791
|
var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14801
14792
|
/**
|
|
@@ -14839,7 +14830,7 @@
|
|
|
14839
14830
|
// Skip if not tracked
|
|
14840
14831
|
if (!context || !context.tracked)
|
|
14841
14832
|
return forward(operation);
|
|
14842
|
-
var id = context.serializationKey || uuidv4();
|
|
14833
|
+
var id = context.serializationKey || uuidv4$1();
|
|
14843
14834
|
console.debug("[apollo-tracker-link] Watching tracked query {" + operation.operationName + "#" + id + "}");
|
|
14844
14835
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
14845
14836
|
var cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -15470,14 +15461,14 @@
|
|
|
15470
15461
|
mutationLinks = void 0;
|
|
15471
15462
|
// Add queue to store tracked queries, when offline
|
|
15472
15463
|
if (enableTrackMutationQueries) {
|
|
15473
|
-
serializingLink = new SerializingLink__default[
|
|
15464
|
+
serializingLink = new SerializingLink__default['default']();
|
|
15474
15465
|
trackerLink = createTrackerLink({
|
|
15475
15466
|
storage: storage,
|
|
15476
15467
|
onNetworkStatusChange: this._networkStatusChanged$,
|
|
15477
15468
|
debounce: 1000,
|
|
15478
15469
|
debug: true
|
|
15479
15470
|
});
|
|
15480
|
-
queueLink_1 = new QueueLink__default[
|
|
15471
|
+
queueLink_1 = new QueueLink__default['default']();
|
|
15481
15472
|
this.registerSubscription(this._networkStatusChanged$
|
|
15482
15473
|
.subscribe(function (type) {
|
|
15483
15474
|
// Network is offline: start buffering into queue
|
|
@@ -15492,7 +15483,7 @@
|
|
|
15492
15483
|
}
|
|
15493
15484
|
}));
|
|
15494
15485
|
mutationLinks = [
|
|
15495
|
-
loggerLink__default[
|
|
15486
|
+
loggerLink__default['default'],
|
|
15496
15487
|
queueLink_1,
|
|
15497
15488
|
trackerLink,
|
|
15498
15489
|
queueLink_1,
|
|
@@ -15599,7 +15590,7 @@
|
|
|
15599
15590
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
15600
15591
|
|| this.toAppError(err.networkError)
|
|
15601
15592
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
15602
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
15593
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
15603
15594
|
// If graphQL: try to convert the first error found
|
|
15604
15595
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
15605
15596
|
|| this.toAppError(err)
|
|
@@ -15607,7 +15598,7 @@
|
|
|
15607
15598
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
15608
15599
|
|| err;
|
|
15609
15600
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
15610
|
-
if (error && error.code === ErrorCodes
|
|
15601
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
15611
15602
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
15612
15603
|
this.onNetworkError.next(error);
|
|
15613
15604
|
}
|
|
@@ -15643,7 +15634,7 @@
|
|
|
15643
15634
|
return 'ERROR.UNAUTHORIZED';
|
|
15644
15635
|
case ServerErrorCodes.FORBIDDEN:
|
|
15645
15636
|
return 'ERROR.FORBIDDEN';
|
|
15646
|
-
case ErrorCodes
|
|
15637
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
15647
15638
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
15648
15639
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
15649
15640
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -15675,7 +15666,7 @@
|
|
|
15675
15666
|
};
|
|
15676
15667
|
return GraphqlService;
|
|
15677
15668
|
}(StartableService));
|
|
15678
|
-
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" });
|
|
15679
15670
|
GraphqlService.decorators = [
|
|
15680
15671
|
{ type: i0.Injectable, args: [{
|
|
15681
15672
|
providedIn: 'root'
|
|
@@ -15692,7 +15683,7 @@
|
|
|
15692
15683
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
15693
15684
|
]; };
|
|
15694
15685
|
|
|
15695
|
-
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
15686
|
+
var sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
15696
15687
|
var BaseGraphqlServiceOptions = /** @class */ (function () {
|
|
15697
15688
|
function BaseGraphqlServiceOptions() {
|
|
15698
15689
|
}
|
|
@@ -15862,8 +15853,8 @@
|
|
|
15862
15853
|
};
|
|
15863
15854
|
/* -- protected methods -- */
|
|
15864
15855
|
BaseGraphqlService.prototype.computeMutableWatchQueryId = function (opts) {
|
|
15865
|
-
var queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
15866
|
-
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) || '';
|
|
15867
15858
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
15868
15859
|
};
|
|
15869
15860
|
BaseGraphqlService.prototype.findMutableWatchQueries = function (opts) {
|
|
@@ -15936,19 +15927,19 @@
|
|
|
15936
15927
|
/* ------------------------------------
|
|
15937
15928
|
* GraphQL queries
|
|
15938
15929
|
* ------------------------------------*/
|
|
15939
|
-
var Fragments
|
|
15940
|
-
account: core.gql(templateObject_1
|
|
15941
|
-
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 }"])))
|
|
15942
15933
|
};
|
|
15943
15934
|
// Load account query
|
|
15944
|
-
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);
|
|
15945
15936
|
// Check email query
|
|
15946
|
-
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"])));
|
|
15947
15938
|
// Save (create or update) account mutation
|
|
15948
15939
|
var AccountMutations = {
|
|
15949
|
-
save: core.gql(templateObject_5
|
|
15950
|
-
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
|
|
15951
|
-
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)
|
|
15952
15943
|
};
|
|
15953
15944
|
// Sent confirmation email
|
|
15954
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"])));
|
|
@@ -16316,7 +16307,7 @@
|
|
|
16316
16307
|
error_3 = _b.sent();
|
|
16317
16308
|
console.error(error_3);
|
|
16318
16309
|
this.resetData();
|
|
16319
|
-
throw { code: ErrorCodes
|
|
16310
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
16320
16311
|
case 4:
|
|
16321
16312
|
// Store pubkey+keypair
|
|
16322
16313
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -16352,7 +16343,7 @@
|
|
|
16352
16343
|
return [3 /*break*/, 18];
|
|
16353
16344
|
case 11:
|
|
16354
16345
|
err_1 = _b.sent();
|
|
16355
|
-
if (!(err_1 && +(err_1.code) === ErrorCodes
|
|
16346
|
+
if (!(err_1 && +(err_1.code) === ErrorCodes.LOAD_ACCOUNT_ERROR)) return [3 /*break*/, 17];
|
|
16356
16347
|
if (!(data.username.indexOf('@') !== -1)) return [3 /*break*/, 16];
|
|
16357
16348
|
isEmailExists = void 0;
|
|
16358
16349
|
_b.label = 12;
|
|
@@ -16368,12 +16359,12 @@
|
|
|
16368
16359
|
case 15:
|
|
16369
16360
|
// Email not exists (no account)
|
|
16370
16361
|
if (!isEmailExists) {
|
|
16371
|
-
throw { code: ErrorCodes
|
|
16362
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
16372
16363
|
}
|
|
16373
16364
|
_b.label = 16;
|
|
16374
16365
|
case 16:
|
|
16375
16366
|
// Email exists, so error = 'bad password'
|
|
16376
|
-
throw { code: ErrorCodes
|
|
16367
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
16377
16368
|
case 17: throw err_1; // resend the first error
|
|
16378
16369
|
case 18:
|
|
16379
16370
|
_b.trys.push([18, 20, , 21]);
|
|
@@ -16569,8 +16560,8 @@
|
|
|
16569
16560
|
_b.label = 3;
|
|
16570
16561
|
case 3: return [3 /*break*/, 6];
|
|
16571
16562
|
case 4: return [4 /*yield*/, this.graphql.query({
|
|
16572
|
-
query: LoadQuery
|
|
16573
|
-
error: { code: ErrorCodes
|
|
16563
|
+
query: LoadQuery,
|
|
16564
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
16574
16565
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
16575
16566
|
})];
|
|
16576
16567
|
case 5:
|
|
@@ -16608,7 +16599,7 @@
|
|
|
16608
16599
|
case 1:
|
|
16609
16600
|
isEmailExists = _b.sent();
|
|
16610
16601
|
if (isEmailExists) {
|
|
16611
|
-
throw { code: ErrorCodes
|
|
16602
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
16612
16603
|
}
|
|
16613
16604
|
return [2 /*return*/];
|
|
16614
16605
|
}
|
|
@@ -16658,7 +16649,7 @@
|
|
|
16658
16649
|
locale: locale
|
|
16659
16650
|
},
|
|
16660
16651
|
error: {
|
|
16661
|
-
code: ErrorCodes
|
|
16652
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
16662
16653
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
16663
16654
|
}
|
|
16664
16655
|
})];
|
|
@@ -16681,7 +16672,7 @@
|
|
|
16681
16672
|
code: code
|
|
16682
16673
|
},
|
|
16683
16674
|
error: {
|
|
16684
|
-
code: ErrorCodes
|
|
16675
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
16685
16676
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
16686
16677
|
}
|
|
16687
16678
|
})];
|
|
@@ -16781,7 +16772,7 @@
|
|
|
16781
16772
|
throw error_7;
|
|
16782
16773
|
console.error(error_7);
|
|
16783
16774
|
throw {
|
|
16784
|
-
code: ErrorCodes
|
|
16775
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
16785
16776
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
16786
16777
|
};
|
|
16787
16778
|
case 6: return [2 /*return*/];
|
|
@@ -16992,7 +16983,7 @@
|
|
|
16992
16983
|
case 1:
|
|
16993
16984
|
existingAccount = _b.sent();
|
|
16994
16985
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
16995
|
-
throw { code: ErrorCodes
|
|
16986
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
16996
16987
|
}
|
|
16997
16988
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
16998
16989
|
_b.label = 2;
|
|
@@ -17004,7 +16995,7 @@
|
|
|
17004
16995
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
17005
16996
|
variables: { data: json },
|
|
17006
16997
|
error: {
|
|
17007
|
-
code: ErrorCodes
|
|
16998
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
17008
16999
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
17009
17000
|
}
|
|
17010
17001
|
})];
|
|
@@ -17038,7 +17029,7 @@
|
|
|
17038
17029
|
mutation: AccountMutations.saveSettings,
|
|
17039
17030
|
variables: { data: json },
|
|
17040
17031
|
error: {
|
|
17041
|
-
code: ErrorCodes
|
|
17032
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
17042
17033
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
17043
17034
|
}
|
|
17044
17035
|
})];
|
|
@@ -17069,7 +17060,7 @@
|
|
|
17069
17060
|
if (counter > 4) {
|
|
17070
17061
|
if (this._debug)
|
|
17071
17062
|
console.debug("[account] Failed to authentication on pod (after " + counter + " attempts)");
|
|
17072
|
-
throw { code: ErrorCodes
|
|
17063
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
17073
17064
|
}
|
|
17074
17065
|
if (!token) return [3 /*break*/, 2];
|
|
17075
17066
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -17078,7 +17069,7 @@
|
|
|
17078
17069
|
token: token
|
|
17079
17070
|
},
|
|
17080
17071
|
error: {
|
|
17081
|
-
code: ErrorCodes
|
|
17072
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
17082
17073
|
message: 'ERROR.UNAUTHORIZED'
|
|
17083
17074
|
},
|
|
17084
17075
|
fetchPolicy: 'no-cache'
|
|
@@ -17095,7 +17086,7 @@
|
|
|
17095
17086
|
_b.label = 2;
|
|
17096
17087
|
case 2:
|
|
17097
17088
|
challengeError = {
|
|
17098
|
-
code: ErrorCodes
|
|
17089
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
17099
17090
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
17100
17091
|
};
|
|
17101
17092
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -17182,7 +17173,7 @@
|
|
|
17182
17173
|
query: AccountSubscriptions.listenChanges,
|
|
17183
17174
|
variables: variables,
|
|
17184
17175
|
error: {
|
|
17185
|
-
code: ErrorCodes
|
|
17176
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
17186
17177
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
|
|
17187
17178
|
}
|
|
17188
17179
|
}).pipe(operators.map(function (_b) {
|
|
@@ -17215,7 +17206,7 @@
|
|
|
17215
17206
|
};
|
|
17216
17207
|
return AccountService;
|
|
17217
17208
|
}(BaseGraphqlService));
|
|
17218
|
-
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" });
|
|
17219
17210
|
AccountService.decorators = [
|
|
17220
17211
|
{ type: i0.Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
|
|
17221
17212
|
];
|
|
@@ -17230,7 +17221,7 @@
|
|
|
17230
17221
|
{ type: i1$5.ToastController, decorators: [{ type: i0.Optional }] },
|
|
17231
17222
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
17232
17223
|
]; };
|
|
17233
|
-
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;
|
|
17234
17225
|
|
|
17235
17226
|
var Software_1, Configuration_1;
|
|
17236
17227
|
// @dynamic
|
|
@@ -17488,13 +17479,13 @@
|
|
|
17488
17479
|
/* ------------------------------------
|
|
17489
17480
|
* GraphQL queries
|
|
17490
17481
|
* ------------------------------------*/
|
|
17491
|
-
var Fragments = {
|
|
17492
|
-
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 "])))
|
|
17493
17484
|
};
|
|
17494
|
-
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);
|
|
17495
17486
|
// Save (create or update) account mutation
|
|
17496
|
-
var SaveMutation = core.gql(templateObject_3$
|
|
17497
|
-
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"])));
|
|
17498
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"])));
|
|
17499
17490
|
var APP_CONFIG_OPTIONS = new i0.InjectionToken('defaultOptions');
|
|
17500
17491
|
var ConfigService = /** @class */ (function (_super) {
|
|
@@ -17554,12 +17545,12 @@
|
|
|
17554
17545
|
case 0:
|
|
17555
17546
|
now = Date.now();
|
|
17556
17547
|
console.debug('[config] Loading Pod configuration...');
|
|
17557
|
-
query = opts && opts.query || LoadQuery;
|
|
17548
|
+
query = opts && opts.query || LoadQuery$1;
|
|
17558
17549
|
variables = opts && opts.variables || undefined;
|
|
17559
17550
|
return [4 /*yield*/, this.graphql.query({
|
|
17560
17551
|
query: query,
|
|
17561
17552
|
variables: variables,
|
|
17562
|
-
error: { code: ErrorCodes
|
|
17553
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17563
17554
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
17564
17555
|
})];
|
|
17565
17556
|
case 1:
|
|
@@ -17601,7 +17592,7 @@
|
|
|
17601
17592
|
data: json
|
|
17602
17593
|
},
|
|
17603
17594
|
error: {
|
|
17604
|
-
code: ErrorCodes
|
|
17595
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
17605
17596
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
17606
17597
|
}
|
|
17607
17598
|
})];
|
|
@@ -17636,7 +17627,7 @@
|
|
|
17636
17627
|
return [4 /*yield*/, this.graphql.query({
|
|
17637
17628
|
query: CacheStatistics,
|
|
17638
17629
|
variables: null,
|
|
17639
|
-
error: { code: ErrorCodes
|
|
17630
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17640
17631
|
fetchPolicy: 'network-only'
|
|
17641
17632
|
})];
|
|
17642
17633
|
case 1:
|
|
@@ -17660,7 +17651,7 @@
|
|
|
17660
17651
|
return [4 /*yield*/, this.graphql.query({
|
|
17661
17652
|
query: ClearCache,
|
|
17662
17653
|
variables: variables,
|
|
17663
|
-
error: { code: ErrorCodes
|
|
17654
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17664
17655
|
fetchPolicy: 'no-cache'
|
|
17665
17656
|
})];
|
|
17666
17657
|
case 1:
|
|
@@ -17860,7 +17851,7 @@
|
|
|
17860
17851
|
};
|
|
17861
17852
|
return ConfigService;
|
|
17862
17853
|
}(BaseGraphqlService));
|
|
17863
|
-
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" });
|
|
17864
17855
|
ConfigService.decorators = [
|
|
17865
17856
|
{ type: i0.Injectable, args: [{
|
|
17866
17857
|
providedIn: 'root',
|
|
@@ -17879,9 +17870,9 @@
|
|
|
17879
17870
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
|
|
17880
17871
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
17881
17872
|
]; };
|
|
17882
|
-
var templateObject_1$
|
|
17873
|
+
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
17883
17874
|
|
|
17884
|
-
var moment$
|
|
17875
|
+
var moment$4 = momentImported__namespace;
|
|
17885
17876
|
var AndroidOsEnvironment = Object.freeze({
|
|
17886
17877
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
17887
17878
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
@@ -18152,16 +18143,16 @@
|
|
|
18152
18143
|
}
|
|
18153
18144
|
// config moment lib
|
|
18154
18145
|
try {
|
|
18155
|
-
moment$
|
|
18146
|
+
moment$4.locale(event.lang);
|
|
18156
18147
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
18157
18148
|
}
|
|
18158
18149
|
// If error, fallback to en
|
|
18159
18150
|
catch (err) {
|
|
18160
|
-
moment$
|
|
18151
|
+
moment$4.locale('en');
|
|
18161
18152
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
18162
18153
|
}
|
|
18163
18154
|
// Config date adapter
|
|
18164
|
-
_this.dateAdapter.setLocale(moment$
|
|
18155
|
+
_this.dateAdapter.setLocale(moment$4.locale());
|
|
18165
18156
|
}
|
|
18166
18157
|
});
|
|
18167
18158
|
this.settings.onChange.subscribe(function (data) {
|
|
@@ -18187,7 +18178,7 @@
|
|
|
18187
18178
|
PlatformService.prototype.checkAppVersion = function (opts) {
|
|
18188
18179
|
var _a, _b, _c;
|
|
18189
18180
|
return __awaiter(this, void 0, void 0, function () {
|
|
18190
|
-
var silent, production, canAutoReload, actualVersion,
|
|
18181
|
+
var silent, production, canAutoReload, actualVersion, remoteVersion, reloadPath;
|
|
18191
18182
|
return __generator(this, function (_d) {
|
|
18192
18183
|
switch (_d.label) {
|
|
18193
18184
|
case 0:
|
|
@@ -18204,8 +18195,7 @@
|
|
|
18204
18195
|
(_a = this.checkAppVersionTimer) === null || _a === void 0 ? void 0 : _a.unsubscribe(); // Stop timer if exists
|
|
18205
18196
|
return [2 /*return*/]; // Skip
|
|
18206
18197
|
}
|
|
18207
|
-
|
|
18208
|
-
return [4 /*yield*/, this.networkService.getAppVersion(peer)];
|
|
18198
|
+
return [4 /*yield*/, this.networkService.getAppVersion()];
|
|
18209
18199
|
case 1:
|
|
18210
18200
|
remoteVersion = _d.sent();
|
|
18211
18201
|
if (isNilOrBlank(remoteVersion)) {
|
|
@@ -18216,7 +18206,7 @@
|
|
|
18216
18206
|
}
|
|
18217
18207
|
if (VersionUtils.isCompatible(remoteVersion, actualVersion)) {
|
|
18218
18208
|
if (!silent)
|
|
18219
|
-
console.info(
|
|
18209
|
+
console.info("[platform] Checking remote app version [OK] {remote: '" + remoteVersion + "', actual: '" + actualVersion + "'}");
|
|
18220
18210
|
return [2 /*return*/];
|
|
18221
18211
|
}
|
|
18222
18212
|
reloadPath = location.href.replace(/[&]?version=[0-9.]+/gi, '');
|
|
@@ -18414,7 +18404,7 @@
|
|
|
18414
18404
|
};
|
|
18415
18405
|
return PlatformService;
|
|
18416
18406
|
}(StartableService));
|
|
18417
|
-
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" });
|
|
18418
18408
|
PlatformService.decorators = [
|
|
18419
18409
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
18420
18410
|
];
|
|
@@ -18512,7 +18502,7 @@
|
|
|
18512
18502
|
};
|
|
18513
18503
|
return MatStepperI18n;
|
|
18514
18504
|
}(stepper.MatStepperIntl));
|
|
18515
|
-
MatStepperI18n.ɵprov =
|
|
18505
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
18516
18506
|
MatStepperI18n.decorators = [
|
|
18517
18507
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
18518
18508
|
];
|
|
@@ -20725,7 +20715,7 @@
|
|
|
20725
20715
|
return 1;
|
|
20726
20716
|
}
|
|
20727
20717
|
}
|
|
20728
|
-
var ɵ0$
|
|
20718
|
+
var ɵ0$b = function (defaultStateSize) { return [
|
|
20729
20719
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
20730
20720
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
20731
20721
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -20733,7 +20723,7 @@
|
|
|
20733
20723
|
var SCALE_OPTIONS_DEFAULT = {
|
|
20734
20724
|
startColor: rgbArrayMap.red,
|
|
20735
20725
|
startStates: [0, 2, 3],
|
|
20736
|
-
startStepsFn: ɵ0$
|
|
20726
|
+
startStepsFn: ɵ0$b
|
|
20737
20727
|
};
|
|
20738
20728
|
/**
|
|
20739
20729
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -21664,7 +21654,7 @@
|
|
|
21664
21654
|
};
|
|
21665
21655
|
return UserSettingsValidatorService;
|
|
21666
21656
|
}(AppValidatorService));
|
|
21667
|
-
UserSettingsValidatorService.ɵprov =
|
|
21657
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
21668
21658
|
UserSettingsValidatorService.decorators = [
|
|
21669
21659
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
21670
21660
|
];
|
|
@@ -21712,7 +21702,7 @@
|
|
|
21712
21702
|
};
|
|
21713
21703
|
return AccountValidatorService;
|
|
21714
21704
|
}(AppValidatorService));
|
|
21715
|
-
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" });
|
|
21716
21706
|
AccountValidatorService.decorators = [
|
|
21717
21707
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
21718
21708
|
];
|
|
@@ -22343,7 +22333,7 @@
|
|
|
22343
22333
|
};
|
|
22344
22334
|
return LocalSettingsValidatorService;
|
|
22345
22335
|
}(AppValidatorService));
|
|
22346
|
-
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" });
|
|
22347
22337
|
LocalSettingsValidatorService.decorators = [
|
|
22348
22338
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
22349
22339
|
];
|
|
@@ -23123,7 +23113,7 @@
|
|
|
23123
23113
|
};
|
|
23124
23114
|
return IsOnFieldModePipe;
|
|
23125
23115
|
}());
|
|
23126
|
-
IsOnFieldModePipe.ɵprov =
|
|
23116
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
23127
23117
|
IsOnFieldModePipe.decorators = [
|
|
23128
23118
|
{ type: i0.Pipe, args: [{
|
|
23129
23119
|
name: 'isOnField'
|
|
@@ -23138,7 +23128,7 @@
|
|
|
23138
23128
|
};
|
|
23139
23129
|
return IsNotOnFieldModePipe;
|
|
23140
23130
|
}());
|
|
23141
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
23131
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
23142
23132
|
IsNotOnFieldModePipe.decorators = [
|
|
23143
23133
|
{ type: i0.Pipe, args: [{
|
|
23144
23134
|
name: 'isNotOnField'
|
|
@@ -23156,7 +23146,7 @@
|
|
|
23156
23146
|
};
|
|
23157
23147
|
return PersonToStringPipe;
|
|
23158
23148
|
}());
|
|
23159
|
-
PersonToStringPipe.ɵprov =
|
|
23149
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
23160
23150
|
PersonToStringPipe.decorators = [
|
|
23161
23151
|
{ type: i0.Pipe, args: [{
|
|
23162
23152
|
name: 'personToString'
|
|
@@ -23620,7 +23610,7 @@
|
|
|
23620
23610
|
};
|
|
23621
23611
|
return IsLoginAccountPipe;
|
|
23622
23612
|
}());
|
|
23623
|
-
IsLoginAccountPipe.ɵprov =
|
|
23613
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
23624
23614
|
IsLoginAccountPipe.decorators = [
|
|
23625
23615
|
{ type: i0.Pipe, args: [{
|
|
23626
23616
|
name: 'isLogin'
|
|
@@ -23635,7 +23625,7 @@
|
|
|
23635
23625
|
};
|
|
23636
23626
|
return AccountToStringPipe;
|
|
23637
23627
|
}());
|
|
23638
|
-
AccountToStringPipe.ɵprov =
|
|
23628
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
23639
23629
|
AccountToStringPipe.decorators = [
|
|
23640
23630
|
{ type: i0.Pipe, args: [{
|
|
23641
23631
|
name: 'accountToString'
|
|
@@ -23653,7 +23643,7 @@
|
|
|
23653
23643
|
};
|
|
23654
23644
|
return DepartmentToStringPipe;
|
|
23655
23645
|
}());
|
|
23656
|
-
DepartmentToStringPipe.ɵprov =
|
|
23646
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
23657
23647
|
DepartmentToStringPipe.decorators = [
|
|
23658
23648
|
{ type: i0.Pipe, args: [{
|
|
23659
23649
|
name: 'departmentToString'
|
|
@@ -23759,7 +23749,7 @@
|
|
|
23759
23749
|
};
|
|
23760
23750
|
return MenuService;
|
|
23761
23751
|
}());
|
|
23762
|
-
MenuService.ɵprov =
|
|
23752
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
23763
23753
|
MenuService.decorators = [
|
|
23764
23754
|
{ type: i0.Injectable, args: [{
|
|
23765
23755
|
providedIn: 'root'
|
|
@@ -24304,7 +24294,7 @@
|
|
|
24304
24294
|
};
|
|
24305
24295
|
return AuthGuardService;
|
|
24306
24296
|
}());
|
|
24307
|
-
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" });
|
|
24308
24298
|
AuthGuardService.decorators = [
|
|
24309
24299
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
24310
24300
|
];
|
|
@@ -24349,7 +24339,7 @@
|
|
|
24349
24339
|
query: query,
|
|
24350
24340
|
variables: { id: id },
|
|
24351
24341
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
24352
|
-
error: { code: ErrorCodes
|
|
24342
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
24353
24343
|
})
|
|
24354
24344
|
.pipe(operators.map(function (_b) {
|
|
24355
24345
|
var data = _b.data;
|
|
@@ -24371,7 +24361,7 @@
|
|
|
24371
24361
|
query: query,
|
|
24372
24362
|
variables: { id: id },
|
|
24373
24363
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
24374
|
-
error: { code: ErrorCodes
|
|
24364
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
24375
24365
|
})];
|
|
24376
24366
|
case 1:
|
|
24377
24367
|
data = (_b.sent()).data;
|
|
@@ -24407,7 +24397,7 @@
|
|
|
24407
24397
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
24408
24398
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
24409
24399
|
variables: variables,
|
|
24410
|
-
error: { code: ErrorCodes
|
|
24400
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
24411
24401
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
24412
24402
|
})
|
|
24413
24403
|
.pipe(operators.map(function (_b) {
|
|
@@ -24449,7 +24439,7 @@
|
|
|
24449
24439
|
return [4 /*yield*/, this.graphql.query({
|
|
24450
24440
|
query: query,
|
|
24451
24441
|
variables: variables,
|
|
24452
|
-
error: { code: ErrorCodes
|
|
24442
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
24453
24443
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
24454
24444
|
})];
|
|
24455
24445
|
case 1:
|
|
@@ -24497,7 +24487,7 @@
|
|
|
24497
24487
|
variables: {
|
|
24498
24488
|
filter: filter && filter.asPodObject()
|
|
24499
24489
|
},
|
|
24500
|
-
error: { code: ErrorCodes
|
|
24490
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
24501
24491
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
24502
24492
|
})];
|
|
24503
24493
|
case 3:
|
|
@@ -24542,7 +24532,7 @@
|
|
|
24542
24532
|
variables: {
|
|
24543
24533
|
data: json
|
|
24544
24534
|
},
|
|
24545
|
-
error: { code: ErrorCodes
|
|
24535
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
24546
24536
|
update: function (proxy, _b) {
|
|
24547
24537
|
var data = _b.data;
|
|
24548
24538
|
var savedEntities = data && data.data;
|
|
@@ -24609,7 +24599,7 @@
|
|
|
24609
24599
|
variables: {
|
|
24610
24600
|
data: json
|
|
24611
24601
|
},
|
|
24612
|
-
error: { code: ErrorCodes
|
|
24602
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
24613
24603
|
update: function (cache, _b) {
|
|
24614
24604
|
var data = _b.data;
|
|
24615
24605
|
// Update entity
|
|
@@ -24667,7 +24657,7 @@
|
|
|
24667
24657
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
24668
24658
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
24669
24659
|
variables: { ids: ids },
|
|
24670
|
-
error: { code: ErrorCodes
|
|
24660
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
24671
24661
|
update: function (cache, res) {
|
|
24672
24662
|
// Remove from cache
|
|
24673
24663
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -24720,7 +24710,7 @@
|
|
|
24720
24710
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
24721
24711
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
24722
24712
|
variables: { id: id },
|
|
24723
|
-
error: { code: ErrorCodes
|
|
24713
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
24724
24714
|
update: function (proxy, res) {
|
|
24725
24715
|
// Remove from cache
|
|
24726
24716
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -24762,7 +24752,7 @@
|
|
|
24762
24752
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
|
|
24763
24753
|
variables: variables,
|
|
24764
24754
|
error: {
|
|
24765
|
-
code: ErrorCodes
|
|
24755
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
24766
24756
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
24767
24757
|
}
|
|
24768
24758
|
})
|
|
@@ -24985,7 +24975,7 @@
|
|
|
24985
24975
|
if (this._debug)
|
|
24986
24976
|
invalidRows.forEach(function (row) { return AppTableUtils.logRowErrors(row, "[table-datasource] " + _this._logTypeName + " row #" + row.id); });
|
|
24987
24977
|
// Stop with an error
|
|
24988
|
-
throw { code: ErrorCodes
|
|
24978
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
24989
24979
|
}
|
|
24990
24980
|
this._editingRowCount = 0;
|
|
24991
24981
|
data = void 0;
|
|
@@ -26005,14 +25995,14 @@
|
|
|
26005
25995
|
case 0:
|
|
26006
25996
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
26007
25997
|
if (this.readOnly) {
|
|
26008
|
-
throw { code: ErrorCodes
|
|
25998
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
26009
25999
|
}
|
|
26010
26000
|
this.resetError();
|
|
26011
26001
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
26012
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;
|
|
26013
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;
|
|
26014
26004
|
if (!this.confirmEditCreate()) {
|
|
26015
|
-
throw { code: ErrorCodes
|
|
26005
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
26016
26006
|
}
|
|
26017
26007
|
// Mark as saving
|
|
26018
26008
|
this.markAsSaving();
|
|
@@ -26169,7 +26159,7 @@
|
|
|
26169
26159
|
switch (_e.label) {
|
|
26170
26160
|
case 0:
|
|
26171
26161
|
if (this.readOnly) {
|
|
26172
|
-
throw { code: ErrorCodes
|
|
26162
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
26173
26163
|
}
|
|
26174
26164
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
26175
26165
|
return [2 /*return*/, 0]; // SKip
|
|
@@ -28069,7 +28059,7 @@
|
|
|
28069
28059
|
case 8:
|
|
28070
28060
|
data = _c.sent();
|
|
28071
28061
|
if (!data)
|
|
28072
|
-
throw { code: ErrorCodes
|
|
28062
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
28073
28063
|
this._usageMode = this.computeUsageMode(data);
|
|
28074
28064
|
return [4 /*yield*/, this.onEntityLoaded(data, opts)];
|
|
28075
28065
|
case 9:
|
|
@@ -28776,9 +28766,10 @@
|
|
|
28776
28766
|
canDelete: [{ type: i0.Input }]
|
|
28777
28767
|
};
|
|
28778
28768
|
|
|
28779
|
-
var
|
|
28769
|
+
var SocialErrorCodes = {
|
|
28780
28770
|
LOAD_USER_EVENTS_ERROR: 50000,
|
|
28781
|
-
SAVE_USER_EVENT_ERROR: 50001
|
|
28771
|
+
SAVE_USER_EVENT_ERROR: 50001,
|
|
28772
|
+
SEND_MESSAGE_ERROR: 50003
|
|
28782
28773
|
};
|
|
28783
28774
|
|
|
28784
28775
|
var UserEvent_1;
|
|
@@ -28824,7 +28815,7 @@
|
|
|
28824
28815
|
EntityClass({ typename: 'UserEventVO' })
|
|
28825
28816
|
], exports.UserEvent);
|
|
28826
28817
|
|
|
28827
|
-
var
|
|
28818
|
+
var UserEventFragments = {
|
|
28828
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 }"]))),
|
|
28829
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 }"])))
|
|
28830
28821
|
};
|
|
@@ -28859,12 +28850,12 @@
|
|
|
28859
28850
|
return UserEventFilter;
|
|
28860
28851
|
}(EntityFilter));
|
|
28861
28852
|
exports.UserEventFilter = __decorate([
|
|
28862
|
-
EntityClass({ typename: '
|
|
28853
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
28863
28854
|
], exports.UserEventFilter);
|
|
28864
|
-
var SaveQuery = core.gql(templateObject_1$
|
|
28865
|
-
var LoadAllQuery = core.gql(templateObject_2$
|
|
28866
|
-
var DeleteByIdsMutation = core.gql(templateObject_3$
|
|
28867
|
-
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);
|
|
28868
28859
|
var UserEventService = /** @class */ (function (_super) {
|
|
28869
28860
|
__extends(UserEventService, _super);
|
|
28870
28861
|
function UserEventService(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -28877,7 +28868,7 @@
|
|
|
28877
28868
|
_this.environment = environment;
|
|
28878
28869
|
_this._userEventActions = [];
|
|
28879
28870
|
// For DEV only
|
|
28880
|
-
_this._debug = !environment.production;
|
|
28871
|
+
_this._debug = environment && !environment.production;
|
|
28881
28872
|
return _this;
|
|
28882
28873
|
}
|
|
28883
28874
|
/**
|
|
@@ -28915,7 +28906,7 @@
|
|
|
28915
28906
|
filter: filter && filter.asPodObject()
|
|
28916
28907
|
},
|
|
28917
28908
|
arrayFieldName: 'data',
|
|
28918
|
-
error: { code:
|
|
28909
|
+
error: { code: SocialErrorCodes.LOAD_USER_EVENTS_ERROR, message: 'SOCIAL.ERROR.LOAD_USER_EVENTS_ERROR' },
|
|
28919
28910
|
fetchPolicy: options && options.fetchPolicy || undefined
|
|
28920
28911
|
})
|
|
28921
28912
|
.pipe(operators.map(function (res) {
|
|
@@ -28958,7 +28949,7 @@
|
|
|
28958
28949
|
variables: {
|
|
28959
28950
|
data: json
|
|
28960
28951
|
},
|
|
28961
|
-
error: { code:
|
|
28952
|
+
error: { code: SocialErrorCodes.SAVE_USER_EVENT_ERROR, message: 'SOCIAL.ERROR.SAVE_USER_EVENT_ERROR' },
|
|
28962
28953
|
update: function (proxy, _a) {
|
|
28963
28954
|
var data = _a.data;
|
|
28964
28955
|
// Update entity
|
|
@@ -29185,7 +29176,7 @@
|
|
|
29185
29176
|
};
|
|
29186
29177
|
return UserEventService;
|
|
29187
29178
|
}(BaseGraphqlService));
|
|
29188
|
-
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" });
|
|
29189
29180
|
UserEventService.decorators = [
|
|
29190
29181
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29191
29182
|
];
|
|
@@ -29195,9 +29186,9 @@
|
|
|
29195
29186
|
{ type: NetworkService },
|
|
29196
29187
|
{ type: i1$2.TranslateService },
|
|
29197
29188
|
{ type: i1$5.ToastController },
|
|
29198
|
-
{ type:
|
|
29189
|
+
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29199
29190
|
]; };
|
|
29200
|
-
var templateObject_1$
|
|
29191
|
+
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2;
|
|
29201
29192
|
|
|
29202
29193
|
var ICONS_MAP = {
|
|
29203
29194
|
DEBUG_DATA: { matIcon: 'bug_report' },
|
|
@@ -29353,7 +29344,7 @@
|
|
|
29353
29344
|
UserEventsTable.decorators = [
|
|
29354
29345
|
{ type: i0.Component, args: [{
|
|
29355
29346
|
selector: 'app-user-events-table',
|
|
29356
|
-
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",
|
|
29357
29348
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
29358
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}"]
|
|
29359
29350
|
},] }
|
|
@@ -29373,35 +29364,350 @@
|
|
|
29373
29364
|
defaultSortDirection: [{ type: i0.Input }]
|
|
29374
29365
|
};
|
|
29375
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
|
+
|
|
29376
29600
|
var SocialModule = /** @class */ (function () {
|
|
29377
29601
|
function SocialModule() {
|
|
29378
29602
|
}
|
|
29379
|
-
SocialModule.forRoot = function () {
|
|
29380
|
-
console.debug('[social] Creating module (root)');
|
|
29381
|
-
return {
|
|
29382
|
-
ngModule: SocialModule,
|
|
29383
|
-
providers: [
|
|
29384
|
-
UserEventService
|
|
29385
|
-
]
|
|
29386
|
-
};
|
|
29387
|
-
};
|
|
29388
29603
|
return SocialModule;
|
|
29389
29604
|
}());
|
|
29390
29605
|
SocialModule.decorators = [
|
|
29391
29606
|
{ type: i0.NgModule, args: [{
|
|
29392
29607
|
imports: [
|
|
29393
29608
|
i1$4.CommonModule,
|
|
29394
|
-
CoreModule
|
|
29609
|
+
CoreModule,
|
|
29610
|
+
SharedModule
|
|
29395
29611
|
],
|
|
29396
29612
|
declarations: [
|
|
29397
|
-
UserEventsTable
|
|
29613
|
+
UserEventsTable,
|
|
29614
|
+
MessageModal,
|
|
29615
|
+
MessageForm
|
|
29398
29616
|
],
|
|
29399
29617
|
exports: [
|
|
29400
|
-
UserEventsTable
|
|
29618
|
+
UserEventsTable,
|
|
29619
|
+
MessageModal
|
|
29401
29620
|
]
|
|
29402
29621
|
},] }
|
|
29403
29622
|
];
|
|
29404
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
|
+
|
|
29405
29711
|
var PersonFilter_1;
|
|
29406
29712
|
// @dynamic
|
|
29407
29713
|
exports.PersonFilter = PersonFilter_1 = /** @class */ (function (_super) {
|
|
@@ -29459,16 +29765,16 @@
|
|
|
29459
29765
|
], exports.PersonFilter);
|
|
29460
29766
|
|
|
29461
29767
|
var PersonFragments = {
|
|
29462
|
-
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 }"])))
|
|
29463
29769
|
};
|
|
29464
29770
|
// Load persons query
|
|
29465
29771
|
var PersonQueries = {
|
|
29466
|
-
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),
|
|
29467
|
-
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)
|
|
29468
29774
|
};
|
|
29469
29775
|
var PersonMutations = {
|
|
29470
|
-
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),
|
|
29471
|
-
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 }"])))
|
|
29472
29778
|
};
|
|
29473
29779
|
var PersonService = /** @class */ (function (_super_1) {
|
|
29474
29780
|
__extends(PersonService, _super_1);
|
|
@@ -29589,7 +29895,7 @@
|
|
|
29589
29895
|
};
|
|
29590
29896
|
return PersonService;
|
|
29591
29897
|
}(BaseEntityService));
|
|
29592
|
-
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" });
|
|
29593
29899
|
PersonService.decorators = [
|
|
29594
29900
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29595
29901
|
];
|
|
@@ -29599,7 +29905,7 @@
|
|
|
29599
29905
|
{ type: NetworkService },
|
|
29600
29906
|
{ type: EntitiesStorage }
|
|
29601
29907
|
]; };
|
|
29602
|
-
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;
|
|
29603
29909
|
|
|
29604
29910
|
var PersonValidatorService = /** @class */ (function () {
|
|
29605
29911
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -29622,7 +29928,7 @@
|
|
|
29622
29928
|
};
|
|
29623
29929
|
return PersonValidatorService;
|
|
29624
29930
|
}());
|
|
29625
|
-
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" });
|
|
29626
29932
|
PersonValidatorService.decorators = [
|
|
29627
29933
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
29628
29934
|
];
|
|
@@ -29633,7 +29939,7 @@
|
|
|
29633
29939
|
|
|
29634
29940
|
var UsersPage = /** @class */ (function (_super) {
|
|
29635
29941
|
__extends(UsersPage, _super);
|
|
29636
|
-
function UsersPage(injector, accountService, validatorService, configService, dataService,
|
|
29942
|
+
function UsersPage(injector, formBuilder, accountService, validatorService, configService, dataService, messageService, cd, environment) {
|
|
29637
29943
|
var _this = _super.call(this, injector, RESERVED_START_COLUMNS
|
|
29638
29944
|
.concat([
|
|
29639
29945
|
'avatar',
|
|
@@ -29658,16 +29964,17 @@
|
|
|
29658
29964
|
_this.validatorService = validatorService;
|
|
29659
29965
|
_this.configService = configService;
|
|
29660
29966
|
_this.dataService = dataService;
|
|
29967
|
+
_this.messageService = messageService;
|
|
29661
29968
|
_this.cd = cd;
|
|
29662
|
-
_this.canEdit = false;
|
|
29663
29969
|
_this.profiles = __spread(PRIORITIZED_AUTHORITIES).reverse();
|
|
29664
|
-
_this.filterCriteriaCount = 0;
|
|
29665
29970
|
_this.statusList = StatusList;
|
|
29666
29971
|
_this.statusById = StatusById;
|
|
29972
|
+
_this.filterCriteriaCount = 0;
|
|
29667
29973
|
_this.useSticky = false;
|
|
29668
29974
|
_this.referentialToString = referentialToString;
|
|
29669
|
-
_this.inlineEdition = accountService.isAdmin(); // Allow inline edition only if admin
|
|
29670
29975
|
_this.canEdit = accountService.isAdmin();
|
|
29976
|
+
_this.canSendMessage = _this.canEdit;
|
|
29977
|
+
_this.inlineEdition = _this.canEdit;
|
|
29671
29978
|
_this.confirmBeforeDelete = true;
|
|
29672
29979
|
_this.autoLoad = false; // Wait config loading
|
|
29673
29980
|
_this.i18nColumnPrefix = 'USER.';
|
|
@@ -29757,7 +30064,7 @@
|
|
|
29757
30064
|
UsersPage.prototype.restoreFilterOrLoad = function () {
|
|
29758
30065
|
return __awaiter(this, void 0, void 0, function () {
|
|
29759
30066
|
var json, filter;
|
|
29760
|
-
return __generator(this, function (
|
|
30067
|
+
return __generator(this, function (_b) {
|
|
29761
30068
|
this.markAsLoading();
|
|
29762
30069
|
console.debug("[users] Restoring filter from settings...");
|
|
29763
30070
|
json = this.settings.getPageSettings(this.settingsId, SETTINGS_FILTER) || {};
|
|
@@ -29774,6 +30081,56 @@
|
|
|
29774
30081
|
formControl.setValue(null);
|
|
29775
30082
|
return false;
|
|
29776
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
|
+
};
|
|
29777
30134
|
/* -- protected methods -- */
|
|
29778
30135
|
UsersPage.prototype.markForCheck = function () {
|
|
29779
30136
|
this.cd.markForCheck();
|
|
@@ -29783,7 +30140,7 @@
|
|
|
29783
30140
|
UsersPage.decorators = [
|
|
29784
30141
|
{ type: i0.Component, args: [{
|
|
29785
30142
|
selector: 'app-users-table',
|
|
29786
|
-
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",
|
|
29787
30144
|
providers: [
|
|
29788
30145
|
{ provide: ngxMaterialTable.ValidatorService, useExisting: PersonValidatorService }
|
|
29789
30146
|
],
|
|
@@ -29794,12 +30151,13 @@
|
|
|
29794
30151
|
];
|
|
29795
30152
|
UsersPage.ctorParameters = function () { return [
|
|
29796
30153
|
{ type: i0.Injector },
|
|
30154
|
+
{ type: i1.FormBuilder },
|
|
29797
30155
|
{ type: AccountService },
|
|
29798
30156
|
{ type: ngxMaterialTable.ValidatorService },
|
|
29799
30157
|
{ type: ConfigService },
|
|
29800
30158
|
{ type: PersonService },
|
|
30159
|
+
{ type: MessageService },
|
|
29801
30160
|
{ type: i0.ChangeDetectorRef },
|
|
29802
|
-
{ type: i1.FormBuilder },
|
|
29803
30161
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29804
30162
|
]; };
|
|
29805
30163
|
UsersPage.propDecorators = {
|
|
@@ -29827,22 +30185,24 @@
|
|
|
29827
30185
|
UsersPage
|
|
29828
30186
|
],
|
|
29829
30187
|
exports: [
|
|
30188
|
+
SocialModule,
|
|
29830
30189
|
UsersPage
|
|
29831
30190
|
]
|
|
29832
30191
|
},] }
|
|
29833
30192
|
];
|
|
29834
30193
|
AdminModule.ctorParameters = function () { return []; };
|
|
29835
30194
|
|
|
29836
|
-
var ɵ0 = {
|
|
30195
|
+
var ɵ0$c = {
|
|
29837
30196
|
profile: 'ADMIN'
|
|
29838
30197
|
};
|
|
29839
|
-
var routes
|
|
30198
|
+
var routes = [
|
|
29840
30199
|
{
|
|
29841
30200
|
path: 'users',
|
|
29842
30201
|
pathMatch: 'full',
|
|
29843
30202
|
component: UsersPage,
|
|
29844
30203
|
canActivate: [AuthGuardService],
|
|
29845
|
-
|
|
30204
|
+
canDeactivate: [ComponentDirtyGuard],
|
|
30205
|
+
data: ɵ0$c
|
|
29846
30206
|
}
|
|
29847
30207
|
];
|
|
29848
30208
|
var AdminRoutingModule = /** @class */ (function () {
|
|
@@ -29855,36 +30215,30 @@
|
|
|
29855
30215
|
imports: [
|
|
29856
30216
|
SharedRoutingModule,
|
|
29857
30217
|
AdminModule,
|
|
29858
|
-
i3.RouterModule.forChild(routes
|
|
30218
|
+
i3.RouterModule.forChild(routes)
|
|
29859
30219
|
],
|
|
29860
30220
|
exports: [i3.RouterModule]
|
|
29861
30221
|
},] }
|
|
29862
30222
|
];
|
|
29863
30223
|
|
|
29864
|
-
var
|
|
29865
|
-
LOAD_PERSONS_ERROR: 100,
|
|
29866
|
-
SAVE_PERSONS_ERROR: 101,
|
|
29867
|
-
DELETE_PERSONS_ERROR: 102,
|
|
29868
|
-
};
|
|
29869
|
-
|
|
29870
|
-
var EntityTestClass$1 = /** @class */ (function () {
|
|
30224
|
+
var EntityTestClass = /** @class */ (function () {
|
|
29871
30225
|
function EntityTestClass() {
|
|
29872
30226
|
}
|
|
29873
30227
|
return EntityTestClass;
|
|
29874
30228
|
}());
|
|
29875
|
-
var FAKE_ENTITIES
|
|
30229
|
+
var FAKE_ENTITIES = [
|
|
29876
30230
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
29877
30231
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
29878
30232
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
29879
30233
|
];
|
|
29880
|
-
function deepCopy
|
|
30234
|
+
function deepCopy(values, size) {
|
|
29881
30235
|
if (isNil(size)) {
|
|
29882
|
-
return (values || FAKE_ENTITIES
|
|
30236
|
+
return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
|
|
29883
30237
|
}
|
|
29884
30238
|
var result = [];
|
|
29885
30239
|
var i = 1;
|
|
29886
30240
|
while (result.length < size) {
|
|
29887
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
30241
|
+
result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
|
|
29888
30242
|
var name = entity.name + ' #' + i;
|
|
29889
30243
|
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
29890
30244
|
}));
|
|
@@ -29894,7 +30248,7 @@
|
|
|
29894
30248
|
var AutocompleteTestPage = /** @class */ (function () {
|
|
29895
30249
|
function AutocompleteTestPage(formBuilder) {
|
|
29896
30250
|
this.formBuilder = formBuilder;
|
|
29897
|
-
this._items = deepCopy
|
|
30251
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
29898
30252
|
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
29899
30253
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
29900
30254
|
this.memoryHide = false;
|
|
@@ -29940,7 +30294,7 @@
|
|
|
29940
30294
|
});
|
|
29941
30295
|
// From items
|
|
29942
30296
|
this.autocompleteFields.add('entity-items-large', {
|
|
29943
|
-
items: FAKE_ENTITIES
|
|
30297
|
+
items: FAKE_ENTITIES.slice(),
|
|
29944
30298
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
29945
30299
|
displayWith: this.entityToString
|
|
29946
30300
|
});
|
|
@@ -29962,13 +30316,13 @@
|
|
|
29962
30316
|
var _this = this;
|
|
29963
30317
|
return __generator(this, function (_a) {
|
|
29964
30318
|
data = {
|
|
29965
|
-
entity: deepCopy
|
|
30319
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
29966
30320
|
// This item is NOT in the items list => i should be displayed anyway
|
|
29967
30321
|
missingEntity: {
|
|
29968
30322
|
id: -1, label: '??', name: 'Missing item'
|
|
29969
30323
|
},
|
|
29970
|
-
disableEntity: deepCopy
|
|
29971
|
-
entities: deepCopy
|
|
30324
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2],
|
|
30325
|
+
entities: deepCopy(FAKE_ENTITIES)
|
|
29972
30326
|
};
|
|
29973
30327
|
this.form.setValue(data);
|
|
29974
30328
|
// Load observables
|
|
@@ -30137,13 +30491,13 @@
|
|
|
30137
30491
|
{ type: i1.FormBuilder }
|
|
30138
30492
|
]; };
|
|
30139
30493
|
|
|
30140
|
-
var moment$
|
|
30494
|
+
var moment$5 = momentImported__namespace;
|
|
30141
30495
|
var SwipeTestPage = /** @class */ (function () {
|
|
30142
30496
|
function SwipeTestPage(formBuilder, dateFormatPipe) {
|
|
30143
30497
|
this.formBuilder = formBuilder;
|
|
30144
30498
|
this.dateFormatPipe = dateFormatPipe;
|
|
30145
30499
|
this.$dates = new rxjs.BehaviorSubject(undefined);
|
|
30146
|
-
this._today = moment$
|
|
30500
|
+
this._today = moment$5().startOf('day');
|
|
30147
30501
|
this.form = formBuilder.group({
|
|
30148
30502
|
empty: [null, i1.Validators.required],
|
|
30149
30503
|
date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
@@ -30157,7 +30511,7 @@
|
|
|
30157
30511
|
var _this = this;
|
|
30158
30512
|
var dates = [];
|
|
30159
30513
|
for (var d = 0; d < 7; d++) {
|
|
30160
|
-
dates[d] = moment$
|
|
30514
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
30161
30515
|
}
|
|
30162
30516
|
this.$dates.next(dates);
|
|
30163
30517
|
this.loadData();
|
|
@@ -30204,7 +30558,7 @@
|
|
|
30204
30558
|
{ type: DateFormatPipe }
|
|
30205
30559
|
]; };
|
|
30206
30560
|
|
|
30207
|
-
var moment$
|
|
30561
|
+
var moment$6 = momentImported__namespace;
|
|
30208
30562
|
var DateTimeTestPage = /** @class */ (function () {
|
|
30209
30563
|
function DateTimeTestPage(platform, formBuilder, cd) {
|
|
30210
30564
|
this.platform = platform;
|
|
@@ -30239,7 +30593,7 @@
|
|
|
30239
30593
|
var now, data;
|
|
30240
30594
|
var _this = this;
|
|
30241
30595
|
return __generator(this, function (_a) {
|
|
30242
|
-
now = moment$
|
|
30596
|
+
now = moment$6();
|
|
30243
30597
|
data = {
|
|
30244
30598
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
30245
30599
|
enable: toDateISOString(now),
|
|
@@ -30304,12 +30658,12 @@
|
|
|
30304
30658
|
{ type: i0.ChangeDetectorRef }
|
|
30305
30659
|
]; };
|
|
30306
30660
|
|
|
30307
|
-
var EntityTestClass = /** @class */ (function () {
|
|
30661
|
+
var EntityTestClass$1 = /** @class */ (function () {
|
|
30308
30662
|
function EntityTestClass() {
|
|
30309
30663
|
}
|
|
30310
30664
|
return EntityTestClass;
|
|
30311
30665
|
}());
|
|
30312
|
-
var FAKE_ENTITIES = [
|
|
30666
|
+
var FAKE_ENTITIES$1 = [
|
|
30313
30667
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
30314
30668
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
30315
30669
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -30318,14 +30672,14 @@
|
|
|
30318
30672
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
30319
30673
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
30320
30674
|
];
|
|
30321
|
-
function deepCopy(values, size) {
|
|
30675
|
+
function deepCopy$1(values, size) {
|
|
30322
30676
|
if (isNil(size)) {
|
|
30323
|
-
return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
|
|
30677
|
+
return (values || FAKE_ENTITIES$1).map(function (entity) { return Object.assign({}, entity); });
|
|
30324
30678
|
}
|
|
30325
30679
|
var result = [];
|
|
30326
30680
|
var i = 1;
|
|
30327
30681
|
while (result.length < size) {
|
|
30328
|
-
result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
|
|
30682
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(function (entity) {
|
|
30329
30683
|
var name = entity.name + ' #' + i;
|
|
30330
30684
|
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
30331
30685
|
}));
|
|
@@ -30335,7 +30689,7 @@
|
|
|
30335
30689
|
var ChipsTestPage = /** @class */ (function () {
|
|
30336
30690
|
function ChipsTestPage(formBuilder) {
|
|
30337
30691
|
this.formBuilder = formBuilder;
|
|
30338
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
30692
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
30339
30693
|
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
30340
30694
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
30341
30695
|
this.form = formBuilder.group({
|
|
@@ -30378,7 +30732,7 @@
|
|
|
30378
30732
|
var items, data;
|
|
30379
30733
|
var _this = this;
|
|
30380
30734
|
return __generator(this, function (_a) {
|
|
30381
|
-
items = deepCopy(FAKE_ENTITIES);
|
|
30735
|
+
items = deepCopy$1(FAKE_ENTITIES$1);
|
|
30382
30736
|
data = {
|
|
30383
30737
|
entity: items.slice(0, 1),
|
|
30384
30738
|
entityInitial: items.slice(1, 2),
|
|
@@ -30515,7 +30869,7 @@
|
|
|
30515
30869
|
{ type: i1.FormBuilder }
|
|
30516
30870
|
]; };
|
|
30517
30871
|
|
|
30518
|
-
var moment = momentImported__namespace;
|
|
30872
|
+
var moment$7 = momentImported__namespace;
|
|
30519
30873
|
var DateTestPage = /** @class */ (function () {
|
|
30520
30874
|
function DateTestPage(formBuilder, cd) {
|
|
30521
30875
|
this.formBuilder = formBuilder;
|
|
@@ -30527,7 +30881,8 @@
|
|
|
30527
30881
|
this.timezone = 'Indian/Mahe';
|
|
30528
30882
|
this.stringify = JSON.stringify;
|
|
30529
30883
|
this.form = formBuilder.group({
|
|
30530
|
-
empty: [null,
|
|
30884
|
+
empty: [null, SharedValidators.validDate],
|
|
30885
|
+
emptyRequired: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
30531
30886
|
enable: [null, i1.Validators.required],
|
|
30532
30887
|
disable: [null, i1.Validators.required],
|
|
30533
30888
|
readonly: [null],
|
|
@@ -30551,10 +30906,11 @@
|
|
|
30551
30906
|
var now, nowAtMahe, data;
|
|
30552
30907
|
var _this = this;
|
|
30553
30908
|
return __generator(this, function (_a) {
|
|
30554
|
-
now = moment();
|
|
30909
|
+
now = moment$7();
|
|
30555
30910
|
nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
30556
30911
|
data = {
|
|
30557
|
-
empty:
|
|
30912
|
+
empty: null,
|
|
30913
|
+
emptyRequired: null,
|
|
30558
30914
|
enable: toDateISOString(now),
|
|
30559
30915
|
disable: now.clone(),
|
|
30560
30916
|
readonly: now.clone(),
|
|
@@ -30612,7 +30968,7 @@
|
|
|
30612
30968
|
DateTestPage.decorators = [
|
|
30613
30969
|
{ type: i0.Component, args: [{
|
|
30614
30970
|
selector: 'app-data-test',
|
|
30615
|
-
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"
|
|
30616
30972
|
},] }
|
|
30617
30973
|
];
|
|
30618
30974
|
DateTestPage.ctorParameters = function () { return [
|
|
@@ -30632,7 +30988,7 @@
|
|
|
30632
30988
|
{ label: 'Shared directives', divider: true },
|
|
30633
30989
|
{ label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
|
|
30634
30990
|
];
|
|
30635
|
-
var routes$
|
|
30991
|
+
var routes$1 = [
|
|
30636
30992
|
{
|
|
30637
30993
|
path: '',
|
|
30638
30994
|
pathMatch: 'full',
|
|
@@ -30692,7 +31048,7 @@
|
|
|
30692
31048
|
i1.ReactiveFormsModule,
|
|
30693
31049
|
SharedMaterialModule,
|
|
30694
31050
|
i1$2.TranslateModule.forChild(),
|
|
30695
|
-
i3.RouterModule.forChild(routes$
|
|
31051
|
+
i3.RouterModule.forChild(routes$1)
|
|
30696
31052
|
],
|
|
30697
31053
|
declarations: [
|
|
30698
31054
|
DateTimeTestPage,
|
|
@@ -30754,7 +31110,7 @@
|
|
|
30754
31110
|
{ type: i1$2.TranslateService }
|
|
30755
31111
|
]; };
|
|
30756
31112
|
|
|
30757
|
-
var routes$
|
|
31113
|
+
var routes$2 = [
|
|
30758
31114
|
{
|
|
30759
31115
|
path: 'toast',
|
|
30760
31116
|
pathMatch: 'full',
|
|
@@ -30772,7 +31128,7 @@
|
|
|
30772
31128
|
i1$4.CommonModule,
|
|
30773
31129
|
i1$5.IonicModule,
|
|
30774
31130
|
i1$2.TranslateModule.forChild(),
|
|
30775
|
-
i3.RouterModule.forChild(routes$
|
|
31131
|
+
i3.RouterModule.forChild(routes$2)
|
|
30776
31132
|
],
|
|
30777
31133
|
declarations: [
|
|
30778
31134
|
ToastTestingPage
|
|
@@ -30852,7 +31208,7 @@
|
|
|
30852
31208
|
{ type: i1$5.PopoverController }
|
|
30853
31209
|
]; };
|
|
30854
31210
|
|
|
30855
|
-
var routes$
|
|
31211
|
+
var routes$3 = [
|
|
30856
31212
|
{
|
|
30857
31213
|
path: 'upload-file',
|
|
30858
31214
|
pathMatch: 'full',
|
|
@@ -30870,7 +31226,7 @@
|
|
|
30870
31226
|
i1$4.CommonModule,
|
|
30871
31227
|
i1$5.IonicModule,
|
|
30872
31228
|
i1$2.TranslateModule.forChild(),
|
|
30873
|
-
i3.RouterModule.forChild(routes$
|
|
31229
|
+
i3.RouterModule.forChild(routes$3)
|
|
30874
31230
|
],
|
|
30875
31231
|
declarations: [
|
|
30876
31232
|
UploadFileTestingPage
|
|
@@ -31294,7 +31650,7 @@
|
|
|
31294
31650
|
{ type: i1$5.PopoverController }
|
|
31295
31651
|
]; };
|
|
31296
31652
|
|
|
31297
|
-
var routes$
|
|
31653
|
+
var routes$4 = [
|
|
31298
31654
|
{
|
|
31299
31655
|
path: 'text-popover',
|
|
31300
31656
|
pathMatch: 'full',
|
|
@@ -31312,7 +31668,7 @@
|
|
|
31312
31668
|
i1$4.CommonModule,
|
|
31313
31669
|
i1$5.IonicModule,
|
|
31314
31670
|
i1$2.TranslateModule.forChild(),
|
|
31315
|
-
i3.RouterModule.forChild(routes$
|
|
31671
|
+
i3.RouterModule.forChild(routes$4)
|
|
31316
31672
|
],
|
|
31317
31673
|
declarations: [
|
|
31318
31674
|
TextPopoverTestingPage
|
|
@@ -31329,7 +31685,7 @@
|
|
|
31329
31685
|
{ label: 'Table', page: '/testing/core/table' },
|
|
31330
31686
|
{ label: 'Text popover', page: '/testing/core/text-popover' }
|
|
31331
31687
|
];
|
|
31332
|
-
var routes = [
|
|
31688
|
+
var routes$5 = [
|
|
31333
31689
|
{
|
|
31334
31690
|
path: '',
|
|
31335
31691
|
pathMatch: 'full',
|
|
@@ -31356,7 +31712,7 @@
|
|
|
31356
31712
|
imports: [
|
|
31357
31713
|
i1$4.CommonModule,
|
|
31358
31714
|
i1$2.TranslateModule.forChild(),
|
|
31359
|
-
i3.RouterModule.forChild(routes),
|
|
31715
|
+
i3.RouterModule.forChild(routes$5),
|
|
31360
31716
|
// Sub modules
|
|
31361
31717
|
TableTestingModule,
|
|
31362
31718
|
TextPopoverTestingModule
|
|
@@ -31479,7 +31835,6 @@
|
|
|
31479
31835
|
exports.EntityStore = EntityStore;
|
|
31480
31836
|
exports.EntityUtils = EntityUtils;
|
|
31481
31837
|
exports.Environment = Environment;
|
|
31482
|
-
exports.ErrorCodes = ErrorCodes;
|
|
31483
31838
|
exports.EvenPipe = EvenPipe;
|
|
31484
31839
|
exports.FileResponse = FileResponse;
|
|
31485
31840
|
exports.FileService = FileService;
|
|
@@ -31495,7 +31850,7 @@
|
|
|
31495
31850
|
exports.FormGetControlPipe = FormGetControlPipe;
|
|
31496
31851
|
exports.FormGetGroupPipe = FormGetGroupPipe;
|
|
31497
31852
|
exports.FormGetPipe = FormGetPipe;
|
|
31498
|
-
exports.Fragments = Fragments;
|
|
31853
|
+
exports.Fragments = Fragments$1;
|
|
31499
31854
|
exports.GraphqlService = GraphqlService;
|
|
31500
31855
|
exports.HAMMER_PRESS_TIME = HAMMER_PRESS_TIME;
|
|
31501
31856
|
exports.HAMMER_TAP_TIME = HAMMER_TAP_TIME;
|
|
@@ -31544,6 +31899,11 @@
|
|
|
31544
31899
|
exports.MenuComponent = MenuComponent;
|
|
31545
31900
|
exports.MenuItems = MenuItems;
|
|
31546
31901
|
exports.MenuService = MenuService;
|
|
31902
|
+
exports.MessageForm = MessageForm;
|
|
31903
|
+
exports.MessageModal = MessageModal;
|
|
31904
|
+
exports.MessageService = MessageService;
|
|
31905
|
+
exports.MessageTypeList = MessageTypeList;
|
|
31906
|
+
exports.MessageTypes = MessageTypes;
|
|
31547
31907
|
exports.ModalToolbarComponent = ModalToolbarComponent;
|
|
31548
31908
|
exports.NetworkService = NetworkService;
|
|
31549
31909
|
exports.NgInitDirective = NgInitDirective;
|
|
@@ -31600,6 +31960,7 @@
|
|
|
31600
31960
|
exports.SharedTestingModule = SharedTestingModule;
|
|
31601
31961
|
exports.SharedTestsPage = SharedTestsPage;
|
|
31602
31962
|
exports.SharedValidators = SharedValidators;
|
|
31963
|
+
exports.SocialErrorCodes = SocialErrorCodes;
|
|
31603
31964
|
exports.SocialModule = SocialModule;
|
|
31604
31965
|
exports.StartableService = StartableService;
|
|
31605
31966
|
exports.StatusById = StatusById;
|
|
@@ -31627,6 +31988,7 @@
|
|
|
31627
31988
|
exports.UploadFilePopover = UploadFilePopover;
|
|
31628
31989
|
exports.UploadFileTestingModule = UploadFileTestingModule;
|
|
31629
31990
|
exports.UploadFileTestingPage = UploadFileTestingPage;
|
|
31991
|
+
exports.UserEventFragments = UserEventFragments;
|
|
31630
31992
|
exports.UserEventService = UserEventService;
|
|
31631
31993
|
exports.UserEventTypes = UserEventTypes;
|
|
31632
31994
|
exports.UserEventsTable = UserEventsTable;
|
|
@@ -31778,23 +32140,23 @@
|
|
|
31778
32140
|
exports.waitForTrue = waitForTrue;
|
|
31779
32141
|
exports.waitIdle = waitIdle;
|
|
31780
32142
|
exports.waitWhilePending = waitWhilePending;
|
|
31781
|
-
exports
|
|
31782
|
-
exports
|
|
31783
|
-
exports
|
|
31784
|
-
exports
|
|
31785
|
-
exports
|
|
31786
|
-
exports
|
|
31787
|
-
exports
|
|
31788
|
-
exports
|
|
31789
|
-
exports
|
|
31790
|
-
exports
|
|
31791
|
-
exports
|
|
31792
|
-
exports
|
|
31793
|
-
exports
|
|
31794
|
-
exports
|
|
31795
|
-
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;
|
|
31796
32158
|
|
|
31797
32159
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
31798
32160
|
|
|
31799
|
-
}));
|
|
32161
|
+
})));
|
|
31800
32162
|
//# sourceMappingURL=sumaris-net.ngx-components.umd.js.map
|