@sumaris-net/ngx-components 1.6.4 → 1.6.9
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 +490 -447
- 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 +9 -1
- package/esm2015/src/app/core/services/model/filter.model.js +1 -1
- package/esm2015/src/app/core/services/model/referential.model.js +1 -1
- package/esm2015/src/app/core/table/table.class.js +8 -8
- package/esm2015/src/app/shared/form/field.component.js +2 -2
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +53 -33
- package/esm2015/src/app/shared/material/autocomplete/testing/autocomplete.test.js +6 -6
- package/esm2015/src/app/shared/material/boolean/material.boolean.js +3 -4
- package/esm2015/src/app/shared/material/chips/material.chips.js +39 -34
- package/esm2015/src/app/shared/material/chips/testing/chips.test.js +43 -14
- package/esm2015/src/app/shared/material/datetime/material.date.js +41 -41
- package/esm2015/src/app/shared/material/datetime/material.dateshort.js +2 -2
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +32 -32
- package/esm2015/src/app/shared/material/duration/material.duration.js +2 -2
- package/fesm2015/sumaris-net.ngx-components.js +467 -430
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/filter.model.d.ts +1 -1
- package/src/app/core/services/model/referential.model.d.ts +3 -3
- package/src/app/core/table/table.class.d.ts +4 -4
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +4 -3
- package/src/app/shared/material/autocomplete/testing/autocomplete.test.d.ts +4 -5
- package/src/app/shared/material/boolean/material.boolean.d.ts +0 -1
- package/src/app/shared/material/chips/material.chips.d.ts +6 -5
- package/src/app/shared/material/datetime/material.date.d.ts +6 -6
- package/src/app/shared/material/datetime/material.datetime.d.ts +11 -11
- package/src/theme/_ngx-components.scss +3 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -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('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/animations'), 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('@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', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/animations', '@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', '@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['ngx-translate'].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global['ionic-native'].keyboard.ngx, global['angular2-text-mask'], global['ngx-material-timepicker'], global.ng.material.datepicker, global.ng.animations, 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.ngx$6, global['ionic-native']['status-bar'].ngx.index, global['ionic-native'].keyboard.ngx.index, global['ionic-native']['in-app-browser'].ngx.index, global.i18, 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, i1$2, i1$5, momentImported, i1$1, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, animations, 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, 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,45 +15,22 @@
|
|
|
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
|
-
var i3__namespace$3 = /*#__PURE__*/_interopNamespace(i3);
|
|
37
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
38
|
-
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
39
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2$2);
|
|
40
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3$1);
|
|
41
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
42
30
|
var uuidv4Imported__namespace = /*#__PURE__*/_interopNamespace(uuidv4Imported);
|
|
43
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
44
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
45
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
46
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
47
|
-
var i2__namespace$4 = /*#__PURE__*/_interopNamespace(i2$4);
|
|
48
|
-
var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
|
|
49
31
|
var QueueLink__default = /*#__PURE__*/_interopDefaultLegacy(QueueLink);
|
|
50
32
|
var SerializingLink__default = /*#__PURE__*/_interopDefaultLegacy(SerializingLink);
|
|
51
33
|
var loggerLink__default = /*#__PURE__*/_interopDefaultLegacy(loggerLink);
|
|
52
|
-
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$3);
|
|
53
|
-
var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
|
|
54
|
-
var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
|
|
55
|
-
var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
|
|
56
|
-
var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
|
|
57
34
|
|
|
58
35
|
var ENVIRONMENT = new i0.InjectionToken('ENV');
|
|
59
36
|
var Environment = /** @class */ (function () {
|
|
@@ -1262,10 +1239,11 @@
|
|
|
1262
1239
|
var attributesOrFn = attributes.map(function (a, index) { return typeof a === 'function' && options.attributes[index] || a; });
|
|
1263
1240
|
var filter = Object.assign({ searchAttribute: attributes.length === 1 ? attributes[0] : undefined, searchAttributes: attributes.length > 1 ? attributes : undefined }, options.filter);
|
|
1264
1241
|
var displayWith = options.displayWith || (function (obj) { return obj && joinPropertiesPath(obj, attributes); });
|
|
1265
|
-
var
|
|
1242
|
+
var equals = options.equals || (function (o1, o2) { return o1 && o2 && o1.id === o2.id; });
|
|
1266
1243
|
var config = Object.assign(Object.assign({}, options), { attributes: attributesOrFn, suggestFn: suggestFn,
|
|
1267
1244
|
filter: filter,
|
|
1268
|
-
displayWith: displayWith,
|
|
1245
|
+
displayWith: displayWith,
|
|
1246
|
+
equals: equals });
|
|
1269
1247
|
this.fields[fieldName] = config;
|
|
1270
1248
|
return config;
|
|
1271
1249
|
};
|
|
@@ -1277,14 +1255,14 @@
|
|
|
1277
1255
|
};
|
|
1278
1256
|
return MatAutocompleteConfigHolder;
|
|
1279
1257
|
}());
|
|
1280
|
-
var noop
|
|
1281
|
-
var ɵ0
|
|
1258
|
+
var noop = function (_) { };
|
|
1259
|
+
var ɵ0 = noop;
|
|
1282
1260
|
var MatAutocompleteField = /** @class */ (function () {
|
|
1283
1261
|
function MatAutocompleteField(cd, formGroupDir) {
|
|
1284
1262
|
this.cd = cd;
|
|
1285
1263
|
this.formGroupDir = formGroupDir;
|
|
1286
|
-
this._onChangeCallback = noop
|
|
1287
|
-
this._onTouchedCallback = noop
|
|
1264
|
+
this._onChangeCallback = noop;
|
|
1265
|
+
this._onTouchedCallback = noop;
|
|
1288
1266
|
this.logPrefix = '[mat-autocomplete] ';
|
|
1289
1267
|
this.formControlName = null;
|
|
1290
1268
|
this.required = false;
|
|
@@ -1297,13 +1275,13 @@
|
|
|
1297
1275
|
this.fetchMoreThreshold = '15%';
|
|
1298
1276
|
this.suggestLengthThreshold = null;
|
|
1299
1277
|
this.showLoadingSpinner = true;
|
|
1278
|
+
this.debug = false;
|
|
1300
1279
|
this.clicked = new i0.EventEmitter();
|
|
1301
1280
|
this.blurred = new i0.EventEmitter();
|
|
1302
1281
|
this.focused = new i0.EventEmitter();
|
|
1303
1282
|
this.dropButtonClick = new i0.EventEmitter(true);
|
|
1304
1283
|
this.keydownEscape = new i0.EventEmitter();
|
|
1305
1284
|
this.keyupEnter = new i0.EventEmitter();
|
|
1306
|
-
this.animationsDisabled = true;
|
|
1307
1285
|
this._readonly = false;
|
|
1308
1286
|
this.$inputItems = new rxjs.BehaviorSubject(undefined);
|
|
1309
1287
|
this.$filteredItems = new rxjs.BehaviorSubject(undefined);
|
|
@@ -1411,6 +1389,13 @@
|
|
|
1411
1389
|
enumerable: false,
|
|
1412
1390
|
configurable: true
|
|
1413
1391
|
});
|
|
1392
|
+
Object.defineProperty(MatAutocompleteField.prototype, "loading", {
|
|
1393
|
+
get: function () {
|
|
1394
|
+
return isNil(this.$filteredItems.value);
|
|
1395
|
+
},
|
|
1396
|
+
enumerable: false,
|
|
1397
|
+
configurable: true
|
|
1398
|
+
});
|
|
1414
1399
|
MatAutocompleteField.prototype.ngOnInit = function () {
|
|
1415
1400
|
var _this = this;
|
|
1416
1401
|
var _a, _b;
|
|
@@ -1432,7 +1417,7 @@
|
|
|
1432
1417
|
this.mobile = toBoolean(this.mobile, this.config.mobile);
|
|
1433
1418
|
this.suggestLengthThreshold = toNumber(this.suggestLengthThreshold, this.config.suggestLengthThreshold || 0);
|
|
1434
1419
|
this.showAllOnFocus = toBoolean(this.showAllOnFocus, toBoolean(this.config.showAllOnFocus, this.suggestLengthThreshold <= 0));
|
|
1435
|
-
this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, toBoolean(this.config.showPanelOnFocus));
|
|
1420
|
+
this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, toBoolean(this.config.showPanelOnFocus, true));
|
|
1436
1421
|
this.classList = this.classList || this.config.class;
|
|
1437
1422
|
this.debounceTime = toNumber(this.debounceTime, this.config.debounceTime);
|
|
1438
1423
|
this.highlightAccent = toBoolean(this.highlightAccent, toBoolean(this.config.highlightAccent));
|
|
@@ -1520,15 +1505,15 @@
|
|
|
1520
1505
|
// Filter if not enough character
|
|
1521
1506
|
operators.filter(function (value) { return value.length >= _this.suggestLengthThreshold; }),
|
|
1522
1507
|
// Wait a debounce time
|
|
1523
|
-
operators.debounceTime(this.debounceTime)
|
|
1508
|
+
operators.debounceTime(this.debounceTime),
|
|
1524
1509
|
// DEBUG
|
|
1525
|
-
|
|
1526
|
-
),
|
|
1510
|
+
operators.tap(function (value) { return console.debug(_this.logPrefix + ' Search text changes:', value); })),
|
|
1527
1511
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
1528
1512
|
this.formControl.valueChanges
|
|
1529
1513
|
.pipe(operators.startWith(this.formControl.value), operators.filter(function (value) { return (_this.searchable && isNotNil(value) && typeof value === 'object'); }), operators.tap(function (value) {
|
|
1530
1514
|
// DEBUG
|
|
1531
|
-
|
|
1515
|
+
if (_this.debug)
|
|
1516
|
+
console.debug(_this.logPrefix + ' object changes:', value);
|
|
1532
1517
|
// Update the display value (if need)
|
|
1533
1518
|
var displayValue = _this.displayWith(value) || '';
|
|
1534
1519
|
if (_this.displayValue !== displayValue) {
|
|
@@ -1538,10 +1523,9 @@
|
|
|
1538
1523
|
_this.matInputText.nativeElement.value = _this.displayValue;
|
|
1539
1524
|
}
|
|
1540
1525
|
}
|
|
1541
|
-
})
|
|
1526
|
+
}),
|
|
1542
1527
|
// DEBUG
|
|
1543
|
-
|
|
1544
|
-
),
|
|
1528
|
+
operators.tap(function (value) { return _this.debug && console.debug(_this.logPrefix + ' Received an object value: ', value); })),
|
|
1545
1529
|
// On dropdown button click (no distinctUntilChanged(), nor debounceTime)
|
|
1546
1530
|
this.dropButtonClick
|
|
1547
1531
|
.pipe(operators.filter(function (event) { return _this.searchable && _this.enabled && (!event || !event.defaultPrevented); }), operators.map(function (_) { return _this.showAllOnFocus ? '*' : _this.formControl.value; }),
|
|
@@ -1551,20 +1535,23 @@
|
|
|
1551
1535
|
rxjs.merge(
|
|
1552
1536
|
// Focus or click => Load all
|
|
1553
1537
|
rxjs.merge(this.focused, this.clicked)
|
|
1554
|
-
.pipe(operators.filter(function (_) { return _this.enabled && _this.searchable; }), operators.map(function (_) { return _this.showAllOnFocus ? '*' : _this.formControl.value; })
|
|
1555
|
-
|
|
1538
|
+
.pipe(operators.filter(function (_) { return _this.enabled && _this.searchable; }), operators.map(function (_) { return _this.showAllOnFocus ? '*' : _this.formControl.value; }),
|
|
1539
|
+
// DEBUG
|
|
1540
|
+
operators.tap(function (value) { return _this.debug && console.debug(_this.logPrefix + ' Received focused or clicked event: ', value); })), rxjs.merge(this.$inputItems, this._$filter)
|
|
1541
|
+
.pipe(operators.filter(function (_) { return _this.searchable && _this.enabled; }), operators.map(function (_) { return _this.formControl.value; }),
|
|
1542
|
+
// DEBUG
|
|
1543
|
+
operators.tap(function (value) { return _this.debug && console.debug(_this.logPrefix + ' Received $inputItems or filter event: ', value); })))
|
|
1556
1544
|
.pipe(
|
|
1557
|
-
// Make enough characters
|
|
1545
|
+
// Make sure there is enough characters
|
|
1558
1546
|
operators.filter(thresholdFilterFn),
|
|
1559
1547
|
// Distinguish changes
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
operators.tap(function (value) { return console.debug(_this.logPrefix + ' Received update event: ', value); })))
|
|
1548
|
+
// - do NOT filter if loading, to force update after a blur event
|
|
1549
|
+
operators.distinctUntilChanged(function (v1, v2) { return !_this.loading && (v1 === v2 || _this.equals(v1, v2)); })))
|
|
1563
1550
|
.pipe(
|
|
1564
1551
|
// Suggest values
|
|
1565
1552
|
operators.mergeMap(function (value) { return _this.suggest(value, _this.filter); }),
|
|
1566
1553
|
// DEBUG
|
|
1567
|
-
|
|
1554
|
+
operators.tap(function (items) { return _this.debug && console.debug(_this.logPrefix + ' Received from suggest: ', items); }),
|
|
1568
1555
|
// Store implicit value (will use it onBlur if not other value selected)
|
|
1569
1556
|
operators.tap(function (items) { return _this.updateImplicitValue(items); }));
|
|
1570
1557
|
// Fetch more events
|
|
@@ -1597,7 +1584,9 @@
|
|
|
1597
1584
|
this._subscription.add(this.blurred
|
|
1598
1585
|
.pipe(
|
|
1599
1586
|
// Skip if not searchable
|
|
1600
|
-
operators.filter(function (_) { return _this.searchable; }), operators.map(function (_) { return _this.formControl.value; })
|
|
1587
|
+
operators.filter(function (_) { return _this.searchable; }), operators.map(function (_) { return _this.formControl.value; }),
|
|
1588
|
+
// DEBUG
|
|
1589
|
+
operators.tap(function (value) { return console.debug(_this.logPrefix + ' Received blurred event: ', value); }))
|
|
1601
1590
|
.subscribe(function (value) {
|
|
1602
1591
|
// When leave component without object, use implicit value if :
|
|
1603
1592
|
// - an explicit value
|
|
@@ -1683,7 +1672,7 @@
|
|
|
1683
1672
|
};
|
|
1684
1673
|
MatAutocompleteField.prototype.writeValue = function (value) {
|
|
1685
1674
|
// DEBUG
|
|
1686
|
-
// console.debug(this.logPrefix +
|
|
1675
|
+
// console.debug(this.logPrefix + ' Writing value: ', value);
|
|
1687
1676
|
if (value !== this.formControl.value) {
|
|
1688
1677
|
this.formControl.patchValue(value, { emitEvent: false });
|
|
1689
1678
|
this._onChangeCallback(value);
|
|
@@ -1720,15 +1709,20 @@
|
|
|
1720
1709
|
if (event.stopPropagation)
|
|
1721
1710
|
event.stopPropagation();
|
|
1722
1711
|
event.returnValue = false;
|
|
1723
|
-
//DEBUG
|
|
1712
|
+
// DEBUG
|
|
1713
|
+
if (this.debug)
|
|
1714
|
+
console.debug(this.logPrefix + ' Cancelling focus event');
|
|
1724
1715
|
return false;
|
|
1725
1716
|
}
|
|
1726
|
-
|
|
1717
|
+
if (this.debug)
|
|
1718
|
+
console.debug(this.logPrefix + ' Select input content');
|
|
1719
|
+
var hasContent = true; // selectInputContent(event);
|
|
1727
1720
|
// If combo is empty, or if has content but should force to show panel on focus
|
|
1728
|
-
if (!hasContent ||
|
|
1721
|
+
if (!hasContent || this.showPanelOnFocus || this.showAllOnFocus) {
|
|
1729
1722
|
// DEBUG
|
|
1730
|
-
|
|
1731
|
-
|
|
1723
|
+
if (this.debug)
|
|
1724
|
+
console.debug(this.logPrefix + ' Emit focus event');
|
|
1725
|
+
this.focused.emit();
|
|
1732
1726
|
return true;
|
|
1733
1727
|
}
|
|
1734
1728
|
return false;
|
|
@@ -1742,11 +1736,14 @@
|
|
|
1742
1736
|
if (event.stopPropagation)
|
|
1743
1737
|
event.stopPropagation();
|
|
1744
1738
|
event.returnValue = false;
|
|
1745
|
-
//DEBUG
|
|
1739
|
+
// DEBUG
|
|
1740
|
+
if (this.debug)
|
|
1741
|
+
console.debug(this.logPrefix + " Cancelling blur event");
|
|
1746
1742
|
return false;
|
|
1747
1743
|
}
|
|
1748
1744
|
//DEBUG
|
|
1749
|
-
|
|
1745
|
+
if (this.debug)
|
|
1746
|
+
console.debug(this.logPrefix + ' Blur: move caret to the beginning');
|
|
1750
1747
|
// Move caret to the beginning (fix issue IMAGINE-469)
|
|
1751
1748
|
selectInputRange(event.target, 0, 0);
|
|
1752
1749
|
this.blurred.emit(event);
|
|
@@ -1888,6 +1885,9 @@
|
|
|
1888
1885
|
this._moreItemsCount = fetchMore && (this._itemCount - data.length) || 0;
|
|
1889
1886
|
res = data;
|
|
1890
1887
|
}
|
|
1888
|
+
// DEBUG
|
|
1889
|
+
if (this.debug)
|
|
1890
|
+
console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
1891
1891
|
return [2 /*return*/, res];
|
|
1892
1892
|
}
|
|
1893
1893
|
});
|
|
@@ -1969,7 +1969,7 @@
|
|
|
1969
1969
|
{ type: i0.Component, args: [{
|
|
1970
1970
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1971
1971
|
selector: 'mat-autocomplete-field',
|
|
1972
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n
|
|
1972
|
+
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <!-- readonly -->\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\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 [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as isLast\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"dropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count\" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\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 <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
1973
1973
|
providers: [{
|
|
1974
1974
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
1975
1975
|
multi: true,
|
|
@@ -2014,6 +2014,7 @@
|
|
|
2014
2014
|
fetchMoreThreshold: [{ type: i0.Input }],
|
|
2015
2015
|
suggestLengthThreshold: [{ type: i0.Input }],
|
|
2016
2016
|
showLoadingSpinner: [{ type: i0.Input }],
|
|
2017
|
+
debug: [{ type: i0.Input }],
|
|
2017
2018
|
clicked: [{ type: i0.Output, args: ['click',] }],
|
|
2018
2019
|
blurred: [{ type: i0.Output, args: ['blur',] }],
|
|
2019
2020
|
focused: [{ type: i0.Output, args: ['focus',] }],
|
|
@@ -2024,7 +2025,6 @@
|
|
|
2024
2025
|
matInputText: [{ type: i0.ViewChild, args: ['matInputText',] }],
|
|
2025
2026
|
autocomplete: [{ type: i0.ViewChild, args: [autocomplete.MatAutocomplete,] }],
|
|
2026
2027
|
autocompleteTrigger: [{ type: i0.ViewChild, args: [autocomplete.MatAutocompleteTrigger,] }],
|
|
2027
|
-
animationsDisabled: [{ type: i0.HostBinding, args: ['@.disabled',] }],
|
|
2028
2028
|
filter: [{ type: i0.Input }],
|
|
2029
2029
|
readonly: [{ type: i0.Input }],
|
|
2030
2030
|
tabindex: [{ type: i0.Input }],
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
};
|
|
2053
2053
|
return DateFormatPipe;
|
|
2054
2054
|
}());
|
|
2055
|
-
DateFormatPipe.ɵprov =
|
|
2055
|
+
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" });
|
|
2056
2056
|
DateFormatPipe.decorators = [
|
|
2057
2057
|
{ type: i0.Pipe, args: [{
|
|
2058
2058
|
name: 'dateFormat'
|
|
@@ -2064,7 +2064,7 @@
|
|
|
2064
2064
|
{ type: i1$2.TranslateService }
|
|
2065
2065
|
]; };
|
|
2066
2066
|
|
|
2067
|
-
var moment
|
|
2067
|
+
var moment = momentImported__namespace;
|
|
2068
2068
|
var DateDiffDurationPipe = /** @class */ (function () {
|
|
2069
2069
|
function DateDiffDurationPipe(dateAdapter, translate) {
|
|
2070
2070
|
var _this = this;
|
|
@@ -2081,10 +2081,10 @@
|
|
|
2081
2081
|
return this.format(startDate, endDate);
|
|
2082
2082
|
};
|
|
2083
2083
|
DateDiffDurationPipe.prototype.format = function (startDate, endDate) {
|
|
2084
|
-
var duration = moment
|
|
2084
|
+
var duration = moment.duration(endDate.diff(startDate));
|
|
2085
2085
|
if (duration.asMinutes() < 0)
|
|
2086
2086
|
return '';
|
|
2087
|
-
var timeDuration = moment
|
|
2087
|
+
var timeDuration = moment(0)
|
|
2088
2088
|
.hour(duration.hours())
|
|
2089
2089
|
.minute(duration.minutes());
|
|
2090
2090
|
var days = Math.floor(duration.asDays());
|
|
@@ -2092,7 +2092,7 @@
|
|
|
2092
2092
|
};
|
|
2093
2093
|
return DateDiffDurationPipe;
|
|
2094
2094
|
}());
|
|
2095
|
-
DateDiffDurationPipe.ɵprov =
|
|
2095
|
+
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" });
|
|
2096
2096
|
DateDiffDurationPipe.decorators = [
|
|
2097
2097
|
{ type: i0.Pipe, args: [{
|
|
2098
2098
|
name: 'dateDiffDuration'
|
|
@@ -2114,7 +2114,7 @@
|
|
|
2114
2114
|
};
|
|
2115
2115
|
return DateFromNowPipe;
|
|
2116
2116
|
}());
|
|
2117
|
-
DateFromNowPipe.ɵprov =
|
|
2117
|
+
DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1$1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
2118
2118
|
DateFromNowPipe.decorators = [
|
|
2119
2119
|
{ type: i0.Pipe, args: [{
|
|
2120
2120
|
name: 'dateFromNow'
|
|
@@ -2183,7 +2183,7 @@
|
|
|
2183
2183
|
value *= -1;
|
|
2184
2184
|
}
|
|
2185
2185
|
}
|
|
2186
|
-
var degrees = roundFloat
|
|
2186
|
+
var degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2187
2187
|
// Add sign
|
|
2188
2188
|
var sign = negative ? '-' : '+';
|
|
2189
2189
|
if (opts.placeholderChar) {
|
|
@@ -2234,7 +2234,7 @@
|
|
|
2234
2234
|
}
|
|
2235
2235
|
var degrees = Math.trunc(value);
|
|
2236
2236
|
var minutes = Math.trunc((value - degrees) * 60);
|
|
2237
|
-
var seconds = roundFloat
|
|
2237
|
+
var seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2238
2238
|
while (seconds >= 60) {
|
|
2239
2239
|
seconds -= 60;
|
|
2240
2240
|
minutes += 1;
|
|
@@ -2302,7 +2302,7 @@
|
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
var degrees = Math.trunc(value);
|
|
2305
|
-
var minutes = roundFloat
|
|
2305
|
+
var minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2306
2306
|
while (minutes >= 60) {
|
|
2307
2307
|
minutes -= 60;
|
|
2308
2308
|
degrees += 1;
|
|
@@ -2353,15 +2353,15 @@
|
|
|
2353
2353
|
return NaN;
|
|
2354
2354
|
}
|
|
2355
2355
|
if (pattern === 'DD')
|
|
2356
|
-
return roundFloat
|
|
2356
|
+
return roundFloat(degrees, maxDecimals);
|
|
2357
2357
|
var minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2358
2358
|
var seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2359
2359
|
var direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2360
2360
|
var sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2361
2361
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2362
|
-
return roundFloat
|
|
2362
|
+
return roundFloat(degrees, maxDecimals);
|
|
2363
2363
|
}
|
|
2364
|
-
function roundFloat
|
|
2364
|
+
function roundFloat(input, maxDecimals) {
|
|
2365
2365
|
if (maxDecimals > 0) {
|
|
2366
2366
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
2367
2367
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2384,7 +2384,7 @@
|
|
|
2384
2384
|
};
|
|
2385
2385
|
return LatLongFormatPipe;
|
|
2386
2386
|
}());
|
|
2387
|
-
LatLongFormatPipe.ɵprov =
|
|
2387
|
+
LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2388
2388
|
LatLongFormatPipe.decorators = [
|
|
2389
2389
|
{ type: i0.Pipe, args: [{
|
|
2390
2390
|
name: 'latLongFormat'
|
|
@@ -2397,7 +2397,7 @@
|
|
|
2397
2397
|
}
|
|
2398
2398
|
return LatitudeFormatPipe;
|
|
2399
2399
|
}());
|
|
2400
|
-
LatitudeFormatPipe.ɵprov =
|
|
2400
|
+
LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2401
2401
|
LatitudeFormatPipe.decorators = [
|
|
2402
2402
|
{ type: i0.Pipe, args: [{
|
|
2403
2403
|
name: 'latitudeFormat'
|
|
@@ -2410,7 +2410,7 @@
|
|
|
2410
2410
|
}
|
|
2411
2411
|
return LongitudeFormatPipe;
|
|
2412
2412
|
}());
|
|
2413
|
-
LongitudeFormatPipe.ɵprov =
|
|
2413
|
+
LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2414
2414
|
LongitudeFormatPipe.decorators = [
|
|
2415
2415
|
{ type: i0.Pipe, args: [{
|
|
2416
2416
|
name: 'longitudeFormat'
|
|
@@ -2433,7 +2433,7 @@
|
|
|
2433
2433
|
};
|
|
2434
2434
|
return NumberFormatPipe;
|
|
2435
2435
|
}());
|
|
2436
|
-
NumberFormatPipe.ɵprov =
|
|
2436
|
+
NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2437
2437
|
NumberFormatPipe.decorators = [
|
|
2438
2438
|
{ type: i0.Pipe, args: [{
|
|
2439
2439
|
name: 'numberFormat'
|
|
@@ -2476,7 +2476,7 @@
|
|
|
2476
2476
|
};
|
|
2477
2477
|
return HighlightPipe;
|
|
2478
2478
|
}());
|
|
2479
|
-
HighlightPipe.ɵprov =
|
|
2479
|
+
HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2480
2480
|
HighlightPipe.decorators = [
|
|
2481
2481
|
{ type: i0.Pipe, args: [{
|
|
2482
2482
|
name: 'highlight'
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
{ type: i0.Pipe, args: [{ name: 'fileSize' },] }
|
|
2545
2545
|
];
|
|
2546
2546
|
|
|
2547
|
-
var moment$
|
|
2547
|
+
var moment$1 = momentImported__namespace;
|
|
2548
2548
|
var DATE_UNIX_TIMESTAMP = 'X';
|
|
2549
2549
|
var DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2550
2550
|
var DateUtils = /** @class */ (function () {
|
|
@@ -2587,32 +2587,32 @@
|
|
|
2587
2587
|
if (!value || momentImported.isMoment(value))
|
|
2588
2588
|
return value;
|
|
2589
2589
|
// Parse the input value, as a ISO date time
|
|
2590
|
-
var date = moment$
|
|
2590
|
+
var date = moment$1(value, DATE_ISO_PATTERN);
|
|
2591
2591
|
if (date.isValid())
|
|
2592
2592
|
return date;
|
|
2593
2593
|
// Not valid: trying to convert from unix timestamp
|
|
2594
2594
|
if (typeof value === 'string') {
|
|
2595
2595
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2596
2596
|
if (value.length === 10) {
|
|
2597
|
-
return moment$
|
|
2597
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2598
2598
|
}
|
|
2599
2599
|
else if (value.length === 13) {
|
|
2600
|
-
return moment$
|
|
2600
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
2603
|
console.warn('Unable to parse date: ' + value);
|
|
2604
2604
|
return undefined;
|
|
2605
2605
|
}
|
|
2606
2606
|
function fromUnixTimestamp(timeInSec) {
|
|
2607
|
-
return moment$
|
|
2607
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2608
2608
|
}
|
|
2609
2609
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2610
|
-
return moment$
|
|
2610
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2611
2611
|
}
|
|
2612
2612
|
function toDuration(value, unit) {
|
|
2613
2613
|
if (!value)
|
|
2614
2614
|
return undefined;
|
|
2615
|
-
var duration = moment$
|
|
2615
|
+
var duration = moment$1.duration(value, unit);
|
|
2616
2616
|
// fix 990+ ms
|
|
2617
2617
|
if (duration.milliseconds() >= 990) {
|
|
2618
2618
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2642,7 +2642,7 @@
|
|
|
2642
2642
|
};
|
|
2643
2643
|
return DurationPipe;
|
|
2644
2644
|
}());
|
|
2645
|
-
DurationPipe.ɵprov =
|
|
2645
|
+
DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$2.TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2646
2646
|
DurationPipe.decorators = [
|
|
2647
2647
|
{ type: i0.Pipe, args: [{
|
|
2648
2648
|
name: 'duration'
|
|
@@ -2666,7 +2666,7 @@
|
|
|
2666
2666
|
};
|
|
2667
2667
|
return MathAbsPipe;
|
|
2668
2668
|
}());
|
|
2669
|
-
MathAbsPipe.ɵprov =
|
|
2669
|
+
MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2670
2670
|
MathAbsPipe.decorators = [
|
|
2671
2671
|
{ type: i0.Pipe, args: [{
|
|
2672
2672
|
name: 'mathAbs'
|
|
@@ -2681,7 +2681,7 @@
|
|
|
2681
2681
|
};
|
|
2682
2682
|
return EvenPipe;
|
|
2683
2683
|
}());
|
|
2684
|
-
EvenPipe.ɵprov =
|
|
2684
|
+
EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2685
2685
|
EvenPipe.decorators = [
|
|
2686
2686
|
{ type: i0.Pipe, args: [{
|
|
2687
2687
|
name: 'even'
|
|
@@ -2696,7 +2696,7 @@
|
|
|
2696
2696
|
};
|
|
2697
2697
|
return OddPipe;
|
|
2698
2698
|
}());
|
|
2699
|
-
OddPipe.ɵprov =
|
|
2699
|
+
OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2700
2700
|
OddPipe.decorators = [
|
|
2701
2701
|
{ type: i0.Pipe, args: [{
|
|
2702
2702
|
name: 'odd'
|
|
@@ -2828,7 +2828,7 @@
|
|
|
2828
2828
|
};
|
|
2829
2829
|
return MapGetPipe;
|
|
2830
2830
|
}());
|
|
2831
|
-
MapGetPipe.ɵprov =
|
|
2831
|
+
MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2832
2832
|
MapGetPipe.decorators = [
|
|
2833
2833
|
{ type: i0.Pipe, args: [{
|
|
2834
2834
|
name: 'mapGet'
|
|
@@ -2845,7 +2845,7 @@
|
|
|
2845
2845
|
};
|
|
2846
2846
|
return MapKeysPipe;
|
|
2847
2847
|
}());
|
|
2848
|
-
MapKeysPipe.ɵprov =
|
|
2848
|
+
MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2849
2849
|
MapKeysPipe.decorators = [
|
|
2850
2850
|
{ type: i0.Pipe, args: [{
|
|
2851
2851
|
name: 'mapKeys'
|
|
@@ -2862,7 +2862,7 @@
|
|
|
2862
2862
|
};
|
|
2863
2863
|
return MapValuesPipe;
|
|
2864
2864
|
}());
|
|
2865
|
-
MapValuesPipe.ɵprov =
|
|
2865
|
+
MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2866
2866
|
MapValuesPipe.decorators = [
|
|
2867
2867
|
{ type: i0.Pipe, args: [{
|
|
2868
2868
|
name: 'mapValues'
|
|
@@ -2878,7 +2878,7 @@
|
|
|
2878
2878
|
};
|
|
2879
2879
|
return IsNotNilOrBlankPipe;
|
|
2880
2880
|
}());
|
|
2881
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2881
|
+
IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2882
2882
|
IsNotNilOrBlankPipe.decorators = [
|
|
2883
2883
|
{ type: i0.Pipe, args: [{
|
|
2884
2884
|
name: 'isNotNilOrBlank'
|
|
@@ -2893,7 +2893,7 @@
|
|
|
2893
2893
|
};
|
|
2894
2894
|
return IsNilOrBlankPipe;
|
|
2895
2895
|
}());
|
|
2896
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2896
|
+
IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2897
2897
|
IsNilOrBlankPipe.decorators = [
|
|
2898
2898
|
{ type: i0.Pipe, args: [{
|
|
2899
2899
|
name: 'isNilOrBlank'
|
|
@@ -2908,7 +2908,7 @@
|
|
|
2908
2908
|
};
|
|
2909
2909
|
return ToStringPipe;
|
|
2910
2910
|
}());
|
|
2911
|
-
ToStringPipe.ɵprov =
|
|
2911
|
+
ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2912
2912
|
ToStringPipe.decorators = [
|
|
2913
2913
|
{ type: i0.Pipe, args: [{
|
|
2914
2914
|
name: 'toString'
|
|
@@ -2923,7 +2923,7 @@
|
|
|
2923
2923
|
};
|
|
2924
2924
|
return StrLengthPipe;
|
|
2925
2925
|
}());
|
|
2926
|
-
StrLengthPipe.ɵprov =
|
|
2926
|
+
StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2927
2927
|
StrLengthPipe.decorators = [
|
|
2928
2928
|
{ type: i0.Pipe, args: [{
|
|
2929
2929
|
name: 'strLength'
|
|
@@ -3014,7 +3014,7 @@
|
|
|
3014
3014
|
};
|
|
3015
3015
|
return TranslateContextService;
|
|
3016
3016
|
}());
|
|
3017
|
-
TranslateContextService.ɵprov =
|
|
3017
|
+
TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$2.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
3018
3018
|
TranslateContextService.decorators = [
|
|
3019
3019
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
3020
3020
|
];
|
|
@@ -3077,7 +3077,7 @@
|
|
|
3077
3077
|
};
|
|
3078
3078
|
return PropertyGetPipe;
|
|
3079
3079
|
}());
|
|
3080
|
-
PropertyGetPipe.ɵprov =
|
|
3080
|
+
PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
3081
3081
|
PropertyGetPipe.decorators = [
|
|
3082
3082
|
{ type: i0.Pipe, args: [{
|
|
3083
3083
|
name: 'propertyGet'
|
|
@@ -3103,7 +3103,7 @@
|
|
|
3103
3103
|
ngInit: [{ type: i0.Output }]
|
|
3104
3104
|
};
|
|
3105
3105
|
|
|
3106
|
-
var moment$
|
|
3106
|
+
var moment$2 = momentImported__namespace;
|
|
3107
3107
|
// @dynamic
|
|
3108
3108
|
var SharedValidators = /** @class */ (function () {
|
|
3109
3109
|
function SharedValidators() {
|
|
@@ -3122,7 +3122,7 @@
|
|
|
3122
3122
|
};
|
|
3123
3123
|
SharedValidators.validDate = function (control) {
|
|
3124
3124
|
var value = control.value;
|
|
3125
|
-
var date = !value || moment$
|
|
3125
|
+
var date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
|
|
3126
3126
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3127
3127
|
return { validDate: true };
|
|
3128
3128
|
}
|
|
@@ -4288,7 +4288,7 @@
|
|
|
4288
4288
|
};
|
|
4289
4289
|
return FormErrorTranslator;
|
|
4290
4290
|
}());
|
|
4291
|
-
FormErrorTranslator.ɵprov =
|
|
4291
|
+
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" });
|
|
4292
4292
|
FormErrorTranslator.decorators = [
|
|
4293
4293
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4294
4294
|
];
|
|
@@ -4621,9 +4621,9 @@
|
|
|
4621
4621
|
var hour = parseInt(durationParts[0] || '0');
|
|
4622
4622
|
var minute = parseInt(durationParts[1] || '0');
|
|
4623
4623
|
var value = hour + (minute + 0.5) / 60;
|
|
4624
|
-
return roundFloat(value, maxDecimals);
|
|
4624
|
+
return roundFloat$1(value, maxDecimals);
|
|
4625
4625
|
}
|
|
4626
|
-
function roundFloat(input, maxDecimals) {
|
|
4626
|
+
function roundFloat$1(input, maxDecimals) {
|
|
4627
4627
|
if (maxDecimals > 0) {
|
|
4628
4628
|
var powDecimal = Math.pow(10, maxDecimals);
|
|
4629
4629
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4647,9 +4647,9 @@
|
|
|
4647
4647
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4648
4648
|
}
|
|
4649
4649
|
};
|
|
4650
|
-
var noop$
|
|
4650
|
+
var noop$1 = function () {
|
|
4651
4651
|
};
|
|
4652
|
-
var ɵ0$
|
|
4652
|
+
var ɵ0$1 = noop$1;
|
|
4653
4653
|
var MatLatLongField = /** @class */ (function () {
|
|
4654
4654
|
function MatLatLongField(platform, translate, formBuilder, cd, formGroupDir) {
|
|
4655
4655
|
this.platform = platform;
|
|
@@ -4657,8 +4657,8 @@
|
|
|
4657
4657
|
this.formBuilder = formBuilder;
|
|
4658
4658
|
this.cd = cd;
|
|
4659
4659
|
this.formGroupDir = formGroupDir;
|
|
4660
|
-
this._onChangeCallback = noop$
|
|
4661
|
-
this._onTouchedCallback = noop$
|
|
4660
|
+
this._onChangeCallback = noop$1;
|
|
4661
|
+
this._onTouchedCallback = noop$1;
|
|
4662
4662
|
this._subscription = new rxjs.Subscription();
|
|
4663
4663
|
this.disabling = false;
|
|
4664
4664
|
this.writing = false;
|
|
@@ -5009,14 +5009,14 @@
|
|
|
5009
5009
|
},] }
|
|
5010
5010
|
];
|
|
5011
5011
|
|
|
5012
|
-
var DEFAULT_VALUE_ACCESSOR
|
|
5012
|
+
var DEFAULT_VALUE_ACCESSOR = {
|
|
5013
5013
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5014
5014
|
useExisting: i0.forwardRef(function () { return MatDate; }),
|
|
5015
5015
|
multi: true
|
|
5016
5016
|
};
|
|
5017
|
-
var DAY_MASK
|
|
5018
|
-
var noop$
|
|
5019
|
-
var ɵ0$
|
|
5017
|
+
var DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5018
|
+
var noop$2 = function () { };
|
|
5019
|
+
var ɵ0$2 = noop$2;
|
|
5020
5020
|
var MatDate = /** @class */ (function () {
|
|
5021
5021
|
function MatDate(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5022
5022
|
this.dateAdapter = dateAdapter;
|
|
@@ -5025,12 +5025,12 @@
|
|
|
5025
5025
|
this.cd = cd;
|
|
5026
5026
|
this.keyboard = keyboard;
|
|
5027
5027
|
this.formGroupDir = formGroupDir;
|
|
5028
|
-
this._onChangeCallback = noop$
|
|
5029
|
-
this._onTouchedCallback = noop$
|
|
5028
|
+
this._onChangeCallback = noop$2;
|
|
5029
|
+
this._onTouchedCallback = noop$2;
|
|
5030
5030
|
this._subscription = new rxjs.Subscription();
|
|
5031
5031
|
this.writing = true;
|
|
5032
5032
|
this.disabling = false;
|
|
5033
|
-
this.dayMask = DAY_MASK
|
|
5033
|
+
this.dayMask = DAY_MASK;
|
|
5034
5034
|
this.disabled = false;
|
|
5035
5035
|
this.floatLabel = 'auto';
|
|
5036
5036
|
this.readonly = false;
|
|
@@ -5068,7 +5068,7 @@
|
|
|
5068
5068
|
var _this = this;
|
|
5069
5069
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5070
5070
|
if (!this.formControl)
|
|
5071
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-
|
|
5071
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
5072
5072
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
5073
5073
|
// Redirect errors from main control, into day sub control
|
|
5074
5074
|
var $error = new rxjs.BehaviorSubject(null);
|
|
@@ -5165,44 +5165,6 @@
|
|
|
5165
5165
|
this.markForCheck();
|
|
5166
5166
|
this._onChangeCallback(dateStr);
|
|
5167
5167
|
};
|
|
5168
|
-
MatDate.prototype.updatePattern = function (pattern) {
|
|
5169
|
-
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5170
|
-
if (this.displayPattern !== pattern) {
|
|
5171
|
-
this.displayPattern = pattern;
|
|
5172
|
-
this.dayPattern = pattern;
|
|
5173
|
-
this.markForCheck();
|
|
5174
|
-
}
|
|
5175
|
-
};
|
|
5176
|
-
MatDate.prototype.onFormChange = function (dayValue) {
|
|
5177
|
-
if (this.writing)
|
|
5178
|
-
return; // Skip if call by self
|
|
5179
|
-
this.writing = true;
|
|
5180
|
-
// Make to remove placeholder chars
|
|
5181
|
-
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
5182
|
-
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
5183
|
-
}
|
|
5184
|
-
var date;
|
|
5185
|
-
// Parse day string
|
|
5186
|
-
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
5187
|
-
// Reset time
|
|
5188
|
-
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
5189
|
-
// update date picker
|
|
5190
|
-
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
5191
|
-
// Get the model value
|
|
5192
|
-
var dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
5193
|
-
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
5194
|
-
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
5195
|
-
//this.formControl.updateValueAndValidity();
|
|
5196
|
-
this.writing = false;
|
|
5197
|
-
this.markForCheck();
|
|
5198
|
-
this._onChangeCallback(dateStr);
|
|
5199
|
-
};
|
|
5200
|
-
MatDate.prototype.checkIfTouched = function () {
|
|
5201
|
-
if (this.dayControl.touched) {
|
|
5202
|
-
this.markForCheck();
|
|
5203
|
-
this._onTouchedCallback();
|
|
5204
|
-
}
|
|
5205
|
-
};
|
|
5206
5168
|
MatDate.prototype.openDatePickerIfMobile = function (event, datePicker) {
|
|
5207
5169
|
return __awaiter(this, void 0, void 0, function () {
|
|
5208
5170
|
return __generator(this, function (_a) {
|
|
@@ -5252,7 +5214,45 @@
|
|
|
5252
5214
|
}
|
|
5253
5215
|
});
|
|
5254
5216
|
};
|
|
5255
|
-
/* --
|
|
5217
|
+
/* -- private method -- */
|
|
5218
|
+
MatDate.prototype.updatePattern = function (pattern) {
|
|
5219
|
+
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5220
|
+
if (this.displayPattern !== pattern) {
|
|
5221
|
+
this.displayPattern = pattern;
|
|
5222
|
+
this.dayPattern = pattern;
|
|
5223
|
+
this.markForCheck();
|
|
5224
|
+
}
|
|
5225
|
+
};
|
|
5226
|
+
MatDate.prototype.onFormChange = function (dayValue) {
|
|
5227
|
+
if (this.writing)
|
|
5228
|
+
return; // Skip if call by self
|
|
5229
|
+
this.writing = true;
|
|
5230
|
+
// Make to remove placeholder chars
|
|
5231
|
+
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
5232
|
+
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
5233
|
+
}
|
|
5234
|
+
var date;
|
|
5235
|
+
// Parse day string
|
|
5236
|
+
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
5237
|
+
// Reset time
|
|
5238
|
+
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
5239
|
+
// update date picker
|
|
5240
|
+
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
5241
|
+
// Get the model value
|
|
5242
|
+
var dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
5243
|
+
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
5244
|
+
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
5245
|
+
//this.formControl.updateValueAndValidity();
|
|
5246
|
+
this.writing = false;
|
|
5247
|
+
this.markForCheck();
|
|
5248
|
+
this._onChangeCallback(dateStr);
|
|
5249
|
+
};
|
|
5250
|
+
MatDate.prototype.checkIfTouched = function () {
|
|
5251
|
+
if (this.dayControl.touched) {
|
|
5252
|
+
this.markForCheck();
|
|
5253
|
+
this._onTouchedCallback();
|
|
5254
|
+
}
|
|
5255
|
+
};
|
|
5256
5256
|
MatDate.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
5257
5257
|
return __awaiter(this, void 0, void 0, function () {
|
|
5258
5258
|
return __generator(this, function (_a) {
|
|
@@ -5299,7 +5299,7 @@
|
|
|
5299
5299
|
selector: 'mat-date-field',
|
|
5300
5300
|
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_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 control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\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)=\"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 </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\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\n",
|
|
5301
5301
|
providers: [
|
|
5302
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5302
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5303
5303
|
],
|
|
5304
5304
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5305
5305
|
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%}"]
|
|
@@ -5332,34 +5332,34 @@
|
|
|
5332
5332
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
5333
5333
|
};
|
|
5334
5334
|
|
|
5335
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
5335
|
+
var DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5336
5336
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5337
5337
|
useExisting: i0.forwardRef(function () { return MatDateTime; }),
|
|
5338
5338
|
multi: true
|
|
5339
5339
|
};
|
|
5340
5340
|
var DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5341
5341
|
var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5342
|
-
var HOUR_MASK
|
|
5343
|
-
var noop$
|
|
5342
|
+
var HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5343
|
+
var noop$3 = function () {
|
|
5344
5344
|
};
|
|
5345
|
-
var ɵ0$
|
|
5345
|
+
var ɵ0$3 = noop$3;
|
|
5346
5346
|
var MatDateTime = /** @class */ (function () {
|
|
5347
|
-
function MatDateTime(platform, dateAdapter, translate, formBuilder,
|
|
5347
|
+
function MatDateTime(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5348
5348
|
this.platform = platform;
|
|
5349
5349
|
this.dateAdapter = dateAdapter;
|
|
5350
5350
|
this.translate = translate;
|
|
5351
5351
|
this.formBuilder = formBuilder;
|
|
5352
|
-
this.keyboard = keyboard;
|
|
5353
5352
|
this.cd = cd;
|
|
5353
|
+
this.keyboard = keyboard;
|
|
5354
5354
|
this.formGroupDir = formGroupDir;
|
|
5355
|
-
this._onChangeCallback = noop$
|
|
5356
|
-
this._onTouchedCallback = noop$
|
|
5355
|
+
this._onChangeCallback = noop$3;
|
|
5356
|
+
this._onTouchedCallback = noop$3;
|
|
5357
5357
|
this._subscription = new rxjs.Subscription();
|
|
5358
5358
|
this.writing = true;
|
|
5359
5359
|
this.disabling = false;
|
|
5360
5360
|
this._readonly = false;
|
|
5361
5361
|
this.dayMask = DAY_MASK$1;
|
|
5362
|
-
this.hourMask = HOUR_MASK
|
|
5362
|
+
this.hourMask = HOUR_MASK;
|
|
5363
5363
|
this.floatLabel = 'auto';
|
|
5364
5364
|
this.compact = false;
|
|
5365
5365
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5403,7 +5403,7 @@
|
|
|
5403
5403
|
MatDateTime.prototype.ngOnInit = function () {
|
|
5404
5404
|
var _this = this;
|
|
5405
5405
|
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5406
|
-
this.
|
|
5406
|
+
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5407
5407
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5408
5408
|
if (!this.formControl)
|
|
5409
5409
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
@@ -5527,10 +5527,6 @@
|
|
|
5527
5527
|
this.disabling = false;
|
|
5528
5528
|
this.markForCheck();
|
|
5529
5529
|
};
|
|
5530
|
-
MatDateTime.prototype.updatePattern = function (patterns) {
|
|
5531
|
-
this.displayPattern = (patterns['COMMON.DATE_TIME_PATTERN'] !== 'COMMON.DATE_TIME_PATTERN' ? patterns['COMMON.DATE_TIME_PATTERN'] : 'L LT');
|
|
5532
|
-
this.dayPattern = (patterns['COMMON.DATE_PATTERN'] !== 'COMMON.DATE_PATTERN' ? patterns['COMMON.DATE_PATTERN'] : 'L');
|
|
5533
|
-
};
|
|
5534
5530
|
MatDateTime.prototype.onDatePickerChange = function (event) {
|
|
5535
5531
|
// Make sure event is valid
|
|
5536
5532
|
if (!event || (event.value !== null && !momentImported.isMoment(event.value))) {
|
|
@@ -5571,7 +5567,7 @@
|
|
|
5571
5567
|
return [2 /*return*/];
|
|
5572
5568
|
this.preventEvent(event);
|
|
5573
5569
|
// Make sure the keyboard is closed
|
|
5574
|
-
return [4 /*yield*/, this.
|
|
5570
|
+
return [4 /*yield*/, this.waitKeyboardHide(false)];
|
|
5575
5571
|
case 1:
|
|
5576
5572
|
// Make sure the keyboard is closed
|
|
5577
5573
|
_a.sent();
|
|
@@ -5601,7 +5597,7 @@
|
|
|
5601
5597
|
return [2 /*return*/];
|
|
5602
5598
|
this.preventEvent(event);
|
|
5603
5599
|
// Make sure the keyboard is closed
|
|
5604
|
-
return [4 /*yield*/, this.
|
|
5600
|
+
return [4 /*yield*/, this.waitKeyboardHide(true)];
|
|
5605
5601
|
case 1:
|
|
5606
5602
|
// Make sure the keyboard is closed
|
|
5607
5603
|
_a.sent();
|
|
@@ -5626,12 +5622,6 @@
|
|
|
5626
5622
|
event.stopPropagation();
|
|
5627
5623
|
event.returnValue = false;
|
|
5628
5624
|
};
|
|
5629
|
-
MatDateTime.prototype.checkIfTouched = function () {
|
|
5630
|
-
if (this.dateFormControl.touched || this.timeFormControl.touched) {
|
|
5631
|
-
this._onTouchedCallback();
|
|
5632
|
-
this.markForCheck();
|
|
5633
|
-
}
|
|
5634
|
-
};
|
|
5635
5625
|
MatDateTime.prototype.focus = function () {
|
|
5636
5626
|
var _this = this;
|
|
5637
5627
|
if (!this.matInputs.length)
|
|
@@ -5648,26 +5638,24 @@
|
|
|
5648
5638
|
this.markAsTouched();
|
|
5649
5639
|
this.markAsDirty();
|
|
5650
5640
|
};
|
|
5651
|
-
/* --
|
|
5652
|
-
MatDateTime.prototype.
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
this.
|
|
5660
|
-
// Check if need to update controls
|
|
5661
|
-
this.checkIfTouched();
|
|
5641
|
+
/* -- private method -- */
|
|
5642
|
+
MatDateTime.prototype.updatePattern = function (patterns) {
|
|
5643
|
+
this.displayPattern = (patterns['COMMON.DATE_TIME_PATTERN'] !== 'COMMON.DATE_TIME_PATTERN' ? patterns['COMMON.DATE_TIME_PATTERN'] : 'L LT');
|
|
5644
|
+
this.dayPattern = (patterns['COMMON.DATE_PATTERN'] !== 'COMMON.DATE_PATTERN' ? patterns['COMMON.DATE_PATTERN'] : 'L');
|
|
5645
|
+
};
|
|
5646
|
+
MatDateTime.prototype.checkIfTouched = function () {
|
|
5647
|
+
if (this.dateFormControl.touched || this.timeFormControl.touched) {
|
|
5648
|
+
this._onTouchedCallback();
|
|
5649
|
+
this.markForCheck();
|
|
5662
5650
|
}
|
|
5663
5651
|
};
|
|
5664
|
-
MatDateTime.prototype.
|
|
5652
|
+
MatDateTime.prototype.waitKeyboardHide = function (waitKeyboardDelay) {
|
|
5665
5653
|
return __awaiter(this, void 0, void 0, function () {
|
|
5666
5654
|
return __generator(this, function (_a) {
|
|
5667
5655
|
switch (_a.label) {
|
|
5668
5656
|
case 0:
|
|
5669
|
-
if (!this.keyboard.isVisible)
|
|
5670
|
-
return [2 /*return*/]; // ok, already hidden
|
|
5657
|
+
if (!this.keyboard || !this.keyboard.isVisible)
|
|
5658
|
+
return [2 /*return*/]; // ok, already hidden (or not accessible)
|
|
5671
5659
|
// Force keyboard to be hide
|
|
5672
5660
|
this.keyboard.hide();
|
|
5673
5661
|
// Wait hide occur
|
|
@@ -5675,8 +5663,8 @@
|
|
|
5675
5663
|
case 1:
|
|
5676
5664
|
// Wait hide occur
|
|
5677
5665
|
_a.sent();
|
|
5678
|
-
if (!(this.
|
|
5679
|
-
return [4 /*yield*/, sleep(this.
|
|
5666
|
+
if (!(this.keyboardHideDelay > 0 && waitKeyboardDelay)) return [3 /*break*/, 3];
|
|
5667
|
+
return [4 /*yield*/, sleep(this.keyboardHideDelay)];
|
|
5680
5668
|
case 2:
|
|
5681
5669
|
_a.sent();
|
|
5682
5670
|
_a.label = 3;
|
|
@@ -5685,6 +5673,18 @@
|
|
|
5685
5673
|
});
|
|
5686
5674
|
});
|
|
5687
5675
|
};
|
|
5676
|
+
MatDateTime.prototype.emitChange = function (value) {
|
|
5677
|
+
// Get the model value
|
|
5678
|
+
var dateStr = toDateISOString(value) || null;
|
|
5679
|
+
if (this.formControl.value !== dateStr) {
|
|
5680
|
+
// DEBUG
|
|
5681
|
+
//console.debug('[matèdate-time] Emit new value: ' + dateStr);
|
|
5682
|
+
// Changes comes from inside function: use the callback
|
|
5683
|
+
this._onChangeCallback(dateStr);
|
|
5684
|
+
// Check if need to update controls
|
|
5685
|
+
this.checkIfTouched();
|
|
5686
|
+
}
|
|
5687
|
+
};
|
|
5688
5688
|
MatDateTime.prototype.updateTabIndex = function () {
|
|
5689
5689
|
var _this = this;
|
|
5690
5690
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
@@ -5716,7 +5716,7 @@
|
|
|
5716
5716
|
selector: 'mat-date-time-field',
|
|
5717
5717
|
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]=\"dateFormControl\"\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]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [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=\"'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 && (timeFormControl.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]=\"timeFormControl\"\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]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\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",
|
|
5718
5718
|
providers: [
|
|
5719
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5719
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
5720
5720
|
],
|
|
5721
5721
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5722
5722
|
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%}"]
|
|
@@ -5727,8 +5727,8 @@
|
|
|
5727
5727
|
{ type: i1$3.DateAdapter },
|
|
5728
5728
|
{ type: i1$2.TranslateService },
|
|
5729
5729
|
{ type: i1.FormBuilder },
|
|
5730
|
-
{ type: ngx.Keyboard },
|
|
5731
5730
|
{ type: i0.ChangeDetectorRef },
|
|
5731
|
+
{ type: ngx.Keyboard, decorators: [{ type: i0.Optional }] },
|
|
5732
5732
|
{ type: i1.FormGroupDirective, decorators: [{ type: i0.Optional }] }
|
|
5733
5733
|
]; };
|
|
5734
5734
|
MatDateTime.propDecorators = {
|
|
@@ -5750,15 +5750,15 @@
|
|
|
5750
5750
|
matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
|
|
5751
5751
|
};
|
|
5752
5752
|
|
|
5753
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
5753
|
+
var DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5754
5754
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
5755
5755
|
useExisting: i0.forwardRef(function () { return MatDateShort; }),
|
|
5756
5756
|
multi: true
|
|
5757
5757
|
};
|
|
5758
|
-
var DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5759
|
-
var noop$
|
|
5758
|
+
var DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
|
|
5759
|
+
var noop$4 = function () {
|
|
5760
5760
|
};
|
|
5761
|
-
var ɵ0$
|
|
5761
|
+
var ɵ0$4 = noop$4;
|
|
5762
5762
|
var MatDateShort = /** @class */ (function () {
|
|
5763
5763
|
function MatDateShort(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5764
5764
|
this.dateAdapter = dateAdapter;
|
|
@@ -5767,11 +5767,11 @@
|
|
|
5767
5767
|
this.cd = cd;
|
|
5768
5768
|
this.keyboard = keyboard;
|
|
5769
5769
|
this.formGroupDir = formGroupDir;
|
|
5770
|
-
this._onChangeCallback = noop$
|
|
5771
|
-
this._onTouchedCallback = noop$
|
|
5770
|
+
this._onChangeCallback = noop$4;
|
|
5771
|
+
this._onTouchedCallback = noop$4;
|
|
5772
5772
|
this.writing = true;
|
|
5773
5773
|
this.disabling = false;
|
|
5774
|
-
this.dayMask = DAY_MASK;
|
|
5774
|
+
this.dayMask = DAY_MASK$2;
|
|
5775
5775
|
this.disabled = false;
|
|
5776
5776
|
this.floatLabel = 'auto';
|
|
5777
5777
|
this.readonly = false;
|
|
@@ -5808,7 +5808,7 @@
|
|
|
5808
5808
|
var _this = this;
|
|
5809
5809
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5810
5810
|
if (!this.formControl)
|
|
5811
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-
|
|
5811
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-short-field>.');
|
|
5812
5812
|
// Redirect errors from main control, into day sub control
|
|
5813
5813
|
var $error = new rxjs.BehaviorSubject(null);
|
|
5814
5814
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
@@ -6048,7 +6048,7 @@
|
|
|
6048
6048
|
selector: 'mat-date-short-field',
|
|
6049
6049
|
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",
|
|
6050
6050
|
providers: [
|
|
6051
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6051
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
6052
6052
|
],
|
|
6053
6053
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6054
6054
|
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%}"]
|
|
@@ -6119,16 +6119,16 @@
|
|
|
6119
6119
|
},] }
|
|
6120
6120
|
];
|
|
6121
6121
|
|
|
6122
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6122
|
+
var DEFAULT_VALUE_ACCESSOR$3 = {
|
|
6123
6123
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6124
6124
|
useExisting: i0.forwardRef(function () { return MatDuration; }),
|
|
6125
6125
|
multi: true
|
|
6126
6126
|
};
|
|
6127
6127
|
var HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
6128
|
-
var HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6129
|
-
var noop$
|
|
6128
|
+
var HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
6129
|
+
var noop$5 = function () {
|
|
6130
6130
|
};
|
|
6131
|
-
var ɵ0$5 = noop$
|
|
6131
|
+
var ɵ0$5 = noop$5;
|
|
6132
6132
|
var MatDuration = /** @class */ (function () {
|
|
6133
6133
|
function MatDuration(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
6134
6134
|
this.dateAdapter = dateAdapter;
|
|
@@ -6137,11 +6137,11 @@
|
|
|
6137
6137
|
this.cd = cd;
|
|
6138
6138
|
this.formGroupDir = formGroupDir;
|
|
6139
6139
|
this._subscription = new rxjs.Subscription();
|
|
6140
|
-
this._onChangeCallback = noop$
|
|
6141
|
-
this._onTouchedCallback = noop$
|
|
6140
|
+
this._onChangeCallback = noop$5;
|
|
6141
|
+
this._onTouchedCallback = noop$5;
|
|
6142
6142
|
this.writing = true;
|
|
6143
6143
|
this.disabling = false;
|
|
6144
|
-
this.hourMask = HOUR_MASK;
|
|
6144
|
+
this.hourMask = HOUR_MASK$1;
|
|
6145
6145
|
this.disabled = false;
|
|
6146
6146
|
this.floatLabel = 'auto';
|
|
6147
6147
|
this.readonly = false;
|
|
@@ -6185,7 +6185,7 @@
|
|
|
6185
6185
|
}
|
|
6186
6186
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
6187
6187
|
if (!this.formControl)
|
|
6188
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-
|
|
6188
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-duration-field>.');
|
|
6189
6189
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
6190
6190
|
// Redirect errors from main control, into day sub control
|
|
6191
6191
|
var $error = new rxjs.BehaviorSubject(null);
|
|
@@ -6334,7 +6334,7 @@
|
|
|
6334
6334
|
selector: 'mat-duration-field',
|
|
6335
6335
|
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",
|
|
6336
6336
|
providers: [
|
|
6337
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6337
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6338
6338
|
],
|
|
6339
6339
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6340
6340
|
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%}"]
|
|
@@ -6394,22 +6394,22 @@
|
|
|
6394
6394
|
},] }
|
|
6395
6395
|
];
|
|
6396
6396
|
|
|
6397
|
-
var DEFAULT_VALUE_ACCESSOR$
|
|
6397
|
+
var DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6398
6398
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
6399
6399
|
useExisting: i0.forwardRef(function () { return MatBooleanField; }),
|
|
6400
6400
|
multi: true
|
|
6401
6401
|
};
|
|
6402
|
-
var noop$
|
|
6402
|
+
var noop$6 = function () {
|
|
6403
6403
|
};
|
|
6404
|
-
var ɵ0$
|
|
6404
|
+
var ɵ0$6 = noop$6;
|
|
6405
6405
|
var MatBooleanField = /** @class */ (function () {
|
|
6406
6406
|
function MatBooleanField(translate, formBuilder, cd, formGroupDir) {
|
|
6407
6407
|
this.translate = translate;
|
|
6408
6408
|
this.formBuilder = formBuilder;
|
|
6409
6409
|
this.cd = cd;
|
|
6410
6410
|
this.formGroupDir = formGroupDir;
|
|
6411
|
-
this._onChangeCallback = noop$
|
|
6412
|
-
this._onTouchedCallback = noop$
|
|
6411
|
+
this._onChangeCallback = noop$6;
|
|
6412
|
+
this._onTouchedCallback = noop$6;
|
|
6413
6413
|
this._writing = false;
|
|
6414
6414
|
this.showRadio = false;
|
|
6415
6415
|
this.disabled = false;
|
|
@@ -6582,9 +6582,9 @@
|
|
|
6582
6582
|
MatBooleanField.decorators = [
|
|
6583
6583
|
{ type: i0.Component, args: [{
|
|
6584
6584
|
selector: 'mat-boolean-field',
|
|
6585
|
-
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
|
|
6585
|
+
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",
|
|
6586
6586
|
providers: [
|
|
6587
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6587
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
6588
6588
|
],
|
|
6589
6589
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6590
6590
|
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}"]
|
|
@@ -6620,8 +6620,7 @@
|
|
|
6620
6620
|
yesButton: [{ type: i0.ViewChild, args: ['yesButton',] }],
|
|
6621
6621
|
noButton: [{ type: i0.ViewChild, args: ['noButton',] }],
|
|
6622
6622
|
checkboxButton: [{ type: i0.ViewChild, args: ['checkboxButton',] }],
|
|
6623
|
-
fakeInput: [{ type: i0.ViewChild, args: ['fakeInput',] }]
|
|
6624
|
-
suffixDiv: [{ type: i0.ViewChild, args: ['suffix', { static: false },] }]
|
|
6623
|
+
fakeInput: [{ type: i0.ViewChild, args: ['fakeInput',] }]
|
|
6625
6624
|
};
|
|
6626
6625
|
|
|
6627
6626
|
var SharedMatBooleanModule = /** @class */ (function () {
|
|
@@ -6672,7 +6671,6 @@
|
|
|
6672
6671
|
return MatNumpadEvent;
|
|
6673
6672
|
}(KeyboardEvent));
|
|
6674
6673
|
|
|
6675
|
-
exports.AnimationState = void 0;
|
|
6676
6674
|
(function (AnimationState) {
|
|
6677
6675
|
AnimationState["ENTER"] = "enter";
|
|
6678
6676
|
AnimationState["ENTER_INPUT"] = "enter-input";
|
|
@@ -6840,7 +6838,7 @@
|
|
|
6840
6838
|
};
|
|
6841
6839
|
return MatNumpadDomService;
|
|
6842
6840
|
}());
|
|
6843
|
-
MatNumpadDomService.ɵprov =
|
|
6841
|
+
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" });
|
|
6844
6842
|
MatNumpadDomService.decorators = [
|
|
6845
6843
|
{ type: i0.Injectable, args: [{
|
|
6846
6844
|
providedIn: 'root'
|
|
@@ -7246,7 +7244,7 @@
|
|
|
7246
7244
|
},] }
|
|
7247
7245
|
];
|
|
7248
7246
|
|
|
7249
|
-
var DEFAULT_VALUE_ACCESSOR = {
|
|
7247
|
+
var DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7250
7248
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
7251
7249
|
useExisting: i0.forwardRef(function () { return MatSwipeField; }),
|
|
7252
7250
|
multi: true
|
|
@@ -7566,7 +7564,7 @@
|
|
|
7566
7564
|
{ type: i0.Component, args: [{
|
|
7567
7565
|
selector: 'mat-swipe-field',
|
|
7568
7566
|
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",
|
|
7569
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
7567
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
7570
7568
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
7571
7569
|
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}"]
|
|
7572
7570
|
},] }
|
|
@@ -7627,12 +7625,14 @@
|
|
|
7627
7625
|
},] }
|
|
7628
7626
|
];
|
|
7629
7627
|
|
|
7628
|
+
var noop$7 = function () { };
|
|
7629
|
+
var ɵ0$7 = noop$7;
|
|
7630
7630
|
var MatChipsField = /** @class */ (function () {
|
|
7631
7631
|
function MatChipsField(cd, formGroupDir) {
|
|
7632
7632
|
this.cd = cd;
|
|
7633
7633
|
this.formGroupDir = formGroupDir;
|
|
7634
|
-
this._onChangeCallback =
|
|
7635
|
-
this._onTouchedCallback =
|
|
7634
|
+
this._onChangeCallback = noop$7;
|
|
7635
|
+
this._onTouchedCallback = noop$7;
|
|
7636
7636
|
this.logPrefix = '[mat-chips] ';
|
|
7637
7637
|
this.formControlName = null;
|
|
7638
7638
|
this.required = false;
|
|
@@ -7641,12 +7641,12 @@
|
|
|
7641
7641
|
this.debounceTime = null;
|
|
7642
7642
|
this.i18nPrefix = 'REFERENTIAL.';
|
|
7643
7643
|
this.noResultMessage = 'COMMON.NO_RESULT';
|
|
7644
|
-
this.debug = false;
|
|
7645
7644
|
this.itemSize = '48px';
|
|
7646
7645
|
this.fetchMoreThreshold = '15%';
|
|
7647
7646
|
this.suggestLengthThreshold = null;
|
|
7648
7647
|
this.showLoadingSpinner = true;
|
|
7649
7648
|
this.chipColor = null;
|
|
7649
|
+
this.debug = false;
|
|
7650
7650
|
this.clicked = new i0.EventEmitter();
|
|
7651
7651
|
this.blurred = new i0.EventEmitter();
|
|
7652
7652
|
this.focused = new i0.EventEmitter();
|
|
@@ -7748,6 +7748,13 @@
|
|
|
7748
7748
|
enumerable: false,
|
|
7749
7749
|
configurable: true
|
|
7750
7750
|
});
|
|
7751
|
+
Object.defineProperty(MatChipsField.prototype, "loading", {
|
|
7752
|
+
get: function () {
|
|
7753
|
+
return isNil(this.$filteredItems.value);
|
|
7754
|
+
},
|
|
7755
|
+
enumerable: false,
|
|
7756
|
+
configurable: true
|
|
7757
|
+
});
|
|
7751
7758
|
MatChipsField.prototype.ngOnInit = function () {
|
|
7752
7759
|
var _this = this;
|
|
7753
7760
|
var _a, _b;
|
|
@@ -7854,19 +7861,9 @@
|
|
|
7854
7861
|
),
|
|
7855
7862
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
7856
7863
|
this.inputControl.valueChanges
|
|
7857
|
-
.pipe(operators.startWith(this.inputControl.value), operators.filter(function (value) { return isNotNil(value) && typeof value === 'object'; }),
|
|
7858
|
-
// DEBUG
|
|
7859
|
-
//console.debug(this.logPrefix + ' object changes:', value)
|
|
7860
|
-
// Update the display value (if need)
|
|
7861
|
-
var displayValue = _this.displayWith(value) || '';
|
|
7862
|
-
// Apply to the input[type=text] field
|
|
7863
|
-
if (_this.matInputText && _this.matInputText.nativeElement) {
|
|
7864
|
-
_this.matInputText.nativeElement.value = displayValue;
|
|
7865
|
-
}
|
|
7866
|
-
})
|
|
7864
|
+
.pipe(operators.startWith(this.inputControl.value), operators.filter(function (value) { return isNotNil(value) && typeof value === 'object'; }),
|
|
7867
7865
|
// DEBUG
|
|
7868
|
-
|
|
7869
|
-
),
|
|
7866
|
+
operators.tap(function (value) { return _this.debug && console.debug(_this.logPrefix + ' Received an object value: ', value); })),
|
|
7870
7867
|
// On dropdown button click (no distinctUntilChanged(), nor debounceTime)
|
|
7871
7868
|
this.dropButtonClick
|
|
7872
7869
|
.pipe(operators.filter(function (event) { return _this.enabled && (!event || !event.defaultPrevented); }), operators.tap(function (_) { return _this.matInputText.nativeElement.focus(); }), operators.map(function (_) { return _this.showAllOnFocus ? '*' : _this.formControl.value; }),
|
|
@@ -7956,7 +7953,9 @@
|
|
|
7956
7953
|
this._openedSubscription.unsubscribe();
|
|
7957
7954
|
}
|
|
7958
7955
|
this.$inputItems.complete();
|
|
7956
|
+
this.$inputItems.unsubscribe();
|
|
7959
7957
|
this.$filteredItems.complete();
|
|
7958
|
+
this.$filteredItems.unsubscribe();
|
|
7960
7959
|
this._reload$.complete();
|
|
7961
7960
|
this._$filter.complete();
|
|
7962
7961
|
this.dropButtonClick.complete();
|
|
@@ -8018,12 +8017,18 @@
|
|
|
8018
8017
|
this._reload$.next(value || '*');
|
|
8019
8018
|
};
|
|
8020
8019
|
MatChipsField.prototype.writeValue = function (value) {
|
|
8021
|
-
if (
|
|
8022
|
-
|
|
8020
|
+
if (value && !Array.isArray(value)) {
|
|
8021
|
+
value = [value];
|
|
8022
|
+
}
|
|
8023
8023
|
if (value !== this.formControl.value) {
|
|
8024
|
+
if (this.debug)
|
|
8025
|
+
console.debug(this.logPrefix + ' Writing value: ', value);
|
|
8024
8026
|
this.formControl.patchValue(value, { emitEvent: false });
|
|
8025
8027
|
this._onChangeCallback(value);
|
|
8026
8028
|
}
|
|
8029
|
+
else {
|
|
8030
|
+
this.markForCheck();
|
|
8031
|
+
}
|
|
8027
8032
|
};
|
|
8028
8033
|
MatChipsField.prototype.registerOnChange = function (fn) {
|
|
8029
8034
|
this._onChangeCallback = fn;
|
|
@@ -8134,7 +8139,7 @@
|
|
|
8134
8139
|
/* -- private method -- */
|
|
8135
8140
|
MatChipsField.prototype.suggest = function (value, filter) {
|
|
8136
8141
|
return __awaiter(this, void 0, void 0, function () {
|
|
8137
|
-
var res, data, total, filteredData;
|
|
8142
|
+
var res, data, total, fetchMore, filteredData, removedItemCount;
|
|
8138
8143
|
var _this = this;
|
|
8139
8144
|
return __generator(this, function (_c) {
|
|
8140
8145
|
switch (_c.label) {
|
|
@@ -8142,7 +8147,7 @@
|
|
|
8142
8147
|
case 1:
|
|
8143
8148
|
res = _c.sent();
|
|
8144
8149
|
// DEBUG
|
|
8145
|
-
//
|
|
8150
|
+
//console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
8146
8151
|
if (!res) {
|
|
8147
8152
|
this._itemCount = 0;
|
|
8148
8153
|
res = [];
|
|
@@ -8152,13 +8157,16 @@
|
|
|
8152
8157
|
this._itemCount = res.length || 0;
|
|
8153
8158
|
}
|
|
8154
8159
|
else {
|
|
8155
|
-
data = res.data, total = res.total;
|
|
8156
|
-
res = data;
|
|
8160
|
+
data = res.data, total = res.total, fetchMore = res.fetchMore;
|
|
8157
8161
|
this._itemCount = toNumber(total, data && data.length || 0);
|
|
8162
|
+
this._onFetchMoreCallback = fetchMore;
|
|
8163
|
+
this._moreItemsCount = fetchMore && (this._itemCount - data.length) || 0;
|
|
8164
|
+
res = data;
|
|
8158
8165
|
}
|
|
8159
8166
|
filteredData = (res || []).slice().filter(function (item1) { return _this.value.findIndex(function (item2) { return _this.equals(item1, item2); }) === -1; });
|
|
8160
|
-
|
|
8161
|
-
|
|
8167
|
+
removedItemCount = (((res === null || res === void 0 ? void 0 : res.length) || 0) - ((filteredData === null || filteredData === void 0 ? void 0 : filteredData.length) || 0));
|
|
8168
|
+
// Decrease the item count, with delta
|
|
8169
|
+
this._itemCount -= removedItemCount;
|
|
8162
8170
|
if (this.debug)
|
|
8163
8171
|
console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
8164
8172
|
return [2 /*return*/, res];
|
|
@@ -8197,6 +8205,12 @@
|
|
|
8197
8205
|
this._implicitValue = undefined;
|
|
8198
8206
|
}
|
|
8199
8207
|
};
|
|
8208
|
+
MatChipsField.prototype.checkIfTouched = function () {
|
|
8209
|
+
if (this.formControl.touched) {
|
|
8210
|
+
this.cd.markForCheck();
|
|
8211
|
+
this._onTouchedCallback();
|
|
8212
|
+
}
|
|
8213
|
+
};
|
|
8200
8214
|
MatChipsField.prototype.getAutocompletePanel = function () {
|
|
8201
8215
|
var _a, _b;
|
|
8202
8216
|
var ele = (_b = (_a = this.autocomplete) === null || _a === void 0 ? void 0 : _a.options.last) === null || _b === void 0 ? void 0 : _b._getHostElement().parentElement;
|
|
@@ -8206,12 +8220,6 @@
|
|
|
8206
8220
|
}
|
|
8207
8221
|
return ele;
|
|
8208
8222
|
};
|
|
8209
|
-
MatChipsField.prototype.checkIfTouched = function () {
|
|
8210
|
-
if (this.formControl.touched) {
|
|
8211
|
-
this.cd.markForCheck();
|
|
8212
|
-
this._onTouchedCallback();
|
|
8213
|
-
}
|
|
8214
|
-
};
|
|
8215
8223
|
MatChipsField.prototype.markForCheck = function () {
|
|
8216
8224
|
this.cd.markForCheck();
|
|
8217
8225
|
};
|
|
@@ -8232,13 +8240,11 @@
|
|
|
8232
8240
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
8233
8241
|
selector: 'mat-chips-field',
|
|
8234
8242
|
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\" class=\"material-chips\" [class.mat-form-field-disabled]=\"disabled\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <mat-label>{{placeholder}}</mat-label>\n <mat-chip-list #chipList\n (focus)=\"filterChipsFocusEvent($event)\" >\n <mat-chip\n *ngFor=\"let item of value\"\n [selectable]=\"false\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n >\n {{displayWith(item)}}\n <mat-icon matChipRemove *ngIf=\"!disabled\">cancel</mat-icon>\n </mat-chip>\n\n <input #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"inputControl\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"disabled\"\n [hidden]=\"disabled\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n [matChipInputFor]=\"chipList\"\n >\n </mat-chip-list>\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n (optionSelected)=\"add($event)\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count\" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: inputControl.value, withAccent: highlightAccent } \"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button 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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
8235
|
-
providers: [
|
|
8236
|
-
{
|
|
8243
|
+
providers: [{
|
|
8237
8244
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
8238
8245
|
multi: true,
|
|
8239
8246
|
useExisting: i0.forwardRef(function () { return MatChipsField; })
|
|
8240
|
-
}
|
|
8241
|
-
],
|
|
8247
|
+
}],
|
|
8242
8248
|
encapsulation: i0.ViewEncapsulation.None,
|
|
8243
8249
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
8244
8250
|
styles: [":host{width:100%;display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}.mat-form-field-suffix{position:absolute!important;right:0!important;top:calc(100% - 50px)!important}.mat-chip.mat-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-chip.mat-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-chip.mat-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-chip.mat-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-chip.mat-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}"]
|
|
@@ -8275,12 +8281,12 @@
|
|
|
8275
8281
|
classList: [{ type: i0.Input, args: ['class',] }],
|
|
8276
8282
|
panelWidth: [{ type: i0.Input }],
|
|
8277
8283
|
matAutocompletePosition: [{ type: i0.Input }],
|
|
8278
|
-
debug: [{ type: i0.Input }],
|
|
8279
8284
|
itemSize: [{ type: i0.Input }],
|
|
8280
8285
|
fetchMoreThreshold: [{ type: i0.Input }],
|
|
8281
8286
|
suggestLengthThreshold: [{ type: i0.Input }],
|
|
8282
8287
|
showLoadingSpinner: [{ type: i0.Input }],
|
|
8283
8288
|
chipColor: [{ type: i0.Input }],
|
|
8289
|
+
debug: [{ type: i0.Input }],
|
|
8284
8290
|
clicked: [{ type: i0.Output }],
|
|
8285
8291
|
blurred: [{ type: i0.Output }],
|
|
8286
8292
|
focused: [{ type: i0.Output }],
|
|
@@ -8490,7 +8496,7 @@
|
|
|
8490
8496
|
};
|
|
8491
8497
|
return ProgressBarService;
|
|
8492
8498
|
}());
|
|
8493
|
-
ProgressBarService.ɵprov =
|
|
8499
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
8494
8500
|
ProgressBarService.decorators = [
|
|
8495
8501
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
8496
8502
|
];
|
|
@@ -8537,7 +8543,7 @@
|
|
|
8537
8543
|
};
|
|
8538
8544
|
return AppGestureConfig;
|
|
8539
8545
|
}(i1$6.HammerGestureConfig));
|
|
8540
|
-
AppGestureConfig.ɵprov =
|
|
8546
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
8541
8547
|
AppGestureConfig.decorators = [
|
|
8542
8548
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
8543
8549
|
];
|
|
@@ -8804,7 +8810,7 @@
|
|
|
8804
8810
|
};
|
|
8805
8811
|
return MatPaginatorI18n;
|
|
8806
8812
|
}(paginator.MatPaginatorIntl));
|
|
8807
|
-
MatPaginatorI18n.ɵprov =
|
|
8813
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
8808
8814
|
MatPaginatorI18n.decorators = [
|
|
8809
8815
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
8810
8816
|
];
|
|
@@ -8896,17 +8902,17 @@
|
|
|
8896
8902
|
return rgbArrayToHex(rgb.map(function (v) { return 255 - v; }));
|
|
8897
8903
|
}
|
|
8898
8904
|
|
|
8899
|
-
var noop = function () {
|
|
8905
|
+
var noop$8 = function () {
|
|
8900
8906
|
};
|
|
8901
|
-
var ɵ0$
|
|
8907
|
+
var ɵ0$8 = noop$8;
|
|
8902
8908
|
var AppFormField = /** @class */ (function () {
|
|
8903
8909
|
function AppFormField(translate, cd, injector, formGroupDir) {
|
|
8904
8910
|
this.translate = translate;
|
|
8905
8911
|
this.cd = cd;
|
|
8906
8912
|
this.injector = injector;
|
|
8907
8913
|
this.formGroupDir = formGroupDir;
|
|
8908
|
-
this._onChangeCallback = noop;
|
|
8909
|
-
this._onTouchedCallback = noop;
|
|
8914
|
+
this._onChangeCallback = noop$8;
|
|
8915
|
+
this._onTouchedCallback = noop$8;
|
|
8910
8916
|
this.readonly = false;
|
|
8911
8917
|
this.compact = false;
|
|
8912
8918
|
this.floatLabel = 'auto';
|
|
@@ -9070,7 +9076,7 @@
|
|
|
9070
9076
|
AppFormField.decorators = [
|
|
9071
9077
|
{ type: i0.Component, args: [{
|
|
9072
9078
|
selector: 'app-form-field',
|
|
9073
|
-
template: "<ng-container [ngSwitch]=\"type\">\n\n <!-- integer -->\n <mat-form-field *ngSwitchCase=\"'integer'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n type=\"number\"\n autocomplete=\"off\"\n [readonly]=\"readonly\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n pattern=\"-?[0-9]*\"\n step=\"1\"\n [appAutofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keypress)=\"filterNumberInput($event, false)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('pattern')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('integer')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- double -->\n <mat-form-field *ngSwitchCase=\"'double'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <input matInput #matInput\n type=\"number\"\n decimal=\"true\"\n autocomplete=\"off\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n [appAutofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [step]=\"numberInputStep\"\n (keypress)=\"filterNumberInput($event, true)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('maxDecimals')\">\n {{ (compact ? 'ERROR.FIELD_MAXIMUM_DECIMALS_COMPACT' : 'ERROR.FIELD_MAXIMUM_DECIMALS')| translate:{max:\n definition.maximumNumberDecimals} }}</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- boolean -->\n <mat-boolean-field *ngSwitchCase=\"'boolean'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [readonly]=\"readonly\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-boolean-field>\n\n <!-- date -->\n <mat-date-field *ngSwitchCase=\"'date'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-field>\n\n <!-- date time -->\n <mat-date-time-field *ngSwitchCase=\"'dateTime'\"\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_TIME_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-time-field>\n\n <!-- enum -->\n <mat-form-field *ngSwitchCase=\"'enum'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <mat-select [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-option *ngFor=\"let item of definition.values\" [value]=\"item.key || item\">{{ (item.value || item) | translate }}</mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- color -->\n <mat-form-field *ngSwitchCase=\"'color'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <ion-icon margin-right name=\"color-fill\" matPrefix></ion-icon>\n\n <input matInput autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [style.color]=\"getColorContrast(formControl.value)\"\n [style.background]=\"formControl.value\"\n [colorPicker]=\"formControl.value\"\n (colorPickerChange)=\"writeValue($event)\"\n [cpSaveClickOutside]=\"true\"\n cpPosition=\"top\"\n cpOutputFormat=\"hex\"\n [cpOKButton]=\"false\"\n [required]=\"required\"/>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- string -->\n <mat-form-field *ngSwitchCase=\"'string'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\"\n (keypress)=\"filterAlphanumericalInput($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- auto-complete -->\n <mat-autocomplete-field *ngSwitchCase=\"'entity'\"\n [class]=\"classList\"\n [autofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-autocomplete-field>\n\n <!-- multi auto-complete -->\n <mat-chips-field *ngSwitchCase=\"'entities'\"\n [class]=\"classList\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-chips-field>\n\n <!-- other -->\n <div *ngSwitchDefault>\n <mat-error *ngIf=\"type\">Unknown type {{type}} for option {{definition.key}}. Please report this error.</mat-error>\n <mat-error *ngIf=\"!type\">Error on option field. Please check console log for details.</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n</ng-container>\n",
|
|
9079
|
+
template: "<ng-container [ngSwitch]=\"type\">\n\n <!-- integer -->\n <mat-form-field *ngSwitchCase=\"'integer'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n type=\"number\"\n autocomplete=\"off\"\n [readonly]=\"readonly\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n pattern=\"-?[0-9]*\"\n step=\"1\"\n [appAutofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keypress)=\"filterNumberInput($event, false)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('pattern')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('integer')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- double -->\n <mat-form-field *ngSwitchCase=\"'double'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <input matInput #matInput\n type=\"number\"\n decimal=\"true\"\n autocomplete=\"off\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n [appAutofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [step]=\"numberInputStep\"\n (keypress)=\"filterNumberInput($event, true)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('maxDecimals')\">\n {{ (compact ? 'ERROR.FIELD_MAXIMUM_DECIMALS_COMPACT' : 'ERROR.FIELD_MAXIMUM_DECIMALS')| translate:{max:\n definition.maximumNumberDecimals} }}</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- boolean -->\n <mat-boolean-field *ngSwitchCase=\"'boolean'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [readonly]=\"readonly\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-boolean-field>\n\n <!-- date -->\n <mat-date-field *ngSwitchCase=\"'date'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-field>\n\n <!-- date time -->\n <mat-date-time-field *ngSwitchCase=\"'dateTime'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_TIME_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-time-field>\n\n <!-- enum -->\n <mat-form-field *ngSwitchCase=\"'enum'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <mat-select [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-option *ngFor=\"let item of definition.values\" [value]=\"item.key || item\">{{ (item.value || item) | translate }}</mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- color -->\n <mat-form-field *ngSwitchCase=\"'color'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <ion-icon margin-right name=\"color-fill\" matPrefix></ion-icon>\n\n <input matInput autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [style.color]=\"getColorContrast(formControl.value)\"\n [style.background]=\"formControl.value\"\n [colorPicker]=\"formControl.value\"\n (colorPickerChange)=\"writeValue($event)\"\n [cpSaveClickOutside]=\"true\"\n cpPosition=\"top\"\n cpOutputFormat=\"hex\"\n [cpOKButton]=\"false\"\n [required]=\"required\"/>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- string -->\n <mat-form-field *ngSwitchCase=\"'string'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\"\n (keypress)=\"filterAlphanumericalInput($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- auto-complete -->\n <mat-autocomplete-field *ngSwitchCase=\"'entity'\"\n [class]=\"classList\"\n [autofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-autocomplete-field>\n\n <!-- multi auto-complete -->\n <mat-chips-field *ngSwitchCase=\"'entities'\"\n [class]=\"classList\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-chips-field>\n\n <!-- other -->\n <div *ngSwitchDefault>\n <mat-error *ngIf=\"type\">Unknown type {{type}} for option {{definition.key}}. Please report this error.</mat-error>\n <mat-error *ngIf=\"!type\">Error on option field. Please check console log for details.</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n</ng-container>\n",
|
|
9074
9080
|
providers: [
|
|
9075
9081
|
{
|
|
9076
9082
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
@@ -9461,7 +9467,7 @@
|
|
|
9461
9467
|
};
|
|
9462
9468
|
return AudioProvider;
|
|
9463
9469
|
}(StartableService));
|
|
9464
|
-
AudioProvider.ɵprov =
|
|
9470
|
+
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" });
|
|
9465
9471
|
AudioProvider.decorators = [
|
|
9466
9472
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
9467
9473
|
];
|
|
@@ -9561,7 +9567,7 @@
|
|
|
9561
9567
|
};
|
|
9562
9568
|
return Hotkeys;
|
|
9563
9569
|
}());
|
|
9564
|
-
Hotkeys.ɵprov =
|
|
9570
|
+
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)); }, token: Hotkeys, providedIn: "root" });
|
|
9565
9571
|
Hotkeys.decorators = [
|
|
9566
9572
|
{ type: i0.Injectable, args: [{
|
|
9567
9573
|
providedIn: 'root'
|
|
@@ -9765,7 +9771,7 @@
|
|
|
9765
9771
|
return Base64ImageReader;
|
|
9766
9772
|
}());
|
|
9767
9773
|
|
|
9768
|
-
var uuidv4
|
|
9774
|
+
var uuidv4 = uuidv4Imported__namespace;
|
|
9769
9775
|
var FileService = /** @class */ (function () {
|
|
9770
9776
|
function FileService(platform,
|
|
9771
9777
|
//private transfer: FileTransfer,
|
|
@@ -9811,7 +9817,7 @@
|
|
|
9811
9817
|
lastSlashIndex = source.lastIndexOf('/');
|
|
9812
9818
|
if (lastSlashIndex === -1)
|
|
9813
9819
|
throw new Error('Invalid URL: ' + source);
|
|
9814
|
-
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
9820
|
+
fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
9815
9821
|
if (!(responseType === 'file' && this.canUseFileSystem)) return [3 /*break*/, 4];
|
|
9816
9822
|
console.warn("WARN: [file] Fetching image {" + source + "} in local file...");
|
|
9817
9823
|
targetFilePath = this._imageDirectory + fileName;
|
|
@@ -9874,7 +9880,7 @@
|
|
|
9874
9880
|
};
|
|
9875
9881
|
return FileService;
|
|
9876
9882
|
}());
|
|
9877
|
-
FileService.ɵprov =
|
|
9883
|
+
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" });
|
|
9878
9884
|
FileService.decorators = [
|
|
9879
9885
|
{ type: i0.Injectable, args: [{
|
|
9880
9886
|
providedIn: 'root',
|
|
@@ -10041,7 +10047,7 @@
|
|
|
10041
10047
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
10042
10048
|
|
|
10043
10049
|
var scrypt = require('scrypt-async');
|
|
10044
|
-
var sha256
|
|
10050
|
+
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
10045
10051
|
var sha512 = require('hash.js/lib/hash/sha/512');
|
|
10046
10052
|
var nacl = {
|
|
10047
10053
|
sign: tweetnacl.sign,
|
|
@@ -10147,7 +10153,7 @@
|
|
|
10147
10153
|
* Hash (using SHA256) a message
|
|
10148
10154
|
*/
|
|
10149
10155
|
CryptoService.prototype.sha256 = function (message) {
|
|
10150
|
-
return sha256
|
|
10156
|
+
return sha256().update(message).digest('hex');
|
|
10151
10157
|
};
|
|
10152
10158
|
/**
|
|
10153
10159
|
* Hash (using SHA512) a message
|
|
@@ -10161,7 +10167,7 @@
|
|
|
10161
10167
|
};
|
|
10162
10168
|
return CryptoService;
|
|
10163
10169
|
}());
|
|
10164
|
-
CryptoService.ɵprov =
|
|
10170
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
10165
10171
|
CryptoService.decorators = [
|
|
10166
10172
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
10167
10173
|
];
|
|
@@ -11590,7 +11596,7 @@
|
|
|
11590
11596
|
};
|
|
11591
11597
|
return LocalSettingsService;
|
|
11592
11598
|
}(StartableService));
|
|
11593
|
-
LocalSettingsService.ɵprov =
|
|
11599
|
+
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" });
|
|
11594
11600
|
LocalSettingsService.decorators = [
|
|
11595
11601
|
{ type: i0.Injectable, args: [{
|
|
11596
11602
|
providedIn: 'root',
|
|
@@ -12393,7 +12399,7 @@
|
|
|
12393
12399
|
};
|
|
12394
12400
|
return NetworkService;
|
|
12395
12401
|
}(StartableService));
|
|
12396
|
-
NetworkService.ɵprov =
|
|
12402
|
+
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" });
|
|
12397
12403
|
NetworkService.decorators = [
|
|
12398
12404
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
12399
12405
|
];
|
|
@@ -12413,7 +12419,7 @@
|
|
|
12413
12419
|
{ type: i1$5.ToastController, decorators: [{ type: i0.Optional }] }
|
|
12414
12420
|
]; };
|
|
12415
12421
|
|
|
12416
|
-
var ErrorCodes
|
|
12422
|
+
var ErrorCodes = {
|
|
12417
12423
|
UNKNOWN_ERROR: 0,
|
|
12418
12424
|
LOAD_ACCOUNT_ERROR: 1,
|
|
12419
12425
|
BAD_PASSWORD: 2,
|
|
@@ -12830,7 +12836,7 @@
|
|
|
12830
12836
|
case 13:
|
|
12831
12837
|
err_1 = _b.sent();
|
|
12832
12838
|
console.error(err_1);
|
|
12833
|
-
throw { code: ErrorCodes
|
|
12839
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err_1 };
|
|
12834
12840
|
case 14:
|
|
12835
12841
|
// Emit update event
|
|
12836
12842
|
if (!opts || opts.emitEvent !== false) {
|
|
@@ -13607,7 +13613,7 @@
|
|
|
13607
13613
|
}(StartableService));
|
|
13608
13614
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
13609
13615
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
13610
|
-
EntitiesStorage.ɵprov =
|
|
13616
|
+
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" });
|
|
13611
13617
|
EntitiesStorage.decorators = [
|
|
13612
13618
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
13613
13619
|
];
|
|
@@ -13763,10 +13769,10 @@
|
|
|
13763
13769
|
function referentialsToString(values, properties, separator) {
|
|
13764
13770
|
return (values || []).map(function (v) { return referentialToString(v, properties); }).join(separator || ', ');
|
|
13765
13771
|
}
|
|
13766
|
-
var ɵ0$
|
|
13772
|
+
var ɵ0$9 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
13767
13773
|
var StatusList = Object.freeze([
|
|
13768
13774
|
{
|
|
13769
|
-
id: ɵ0$
|
|
13775
|
+
id: ɵ0$9,
|
|
13770
13776
|
icon: 'checkmark',
|
|
13771
13777
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
13772
13778
|
},
|
|
@@ -14069,7 +14075,7 @@
|
|
|
14069
14075
|
(data.lastName || '')) || '';
|
|
14070
14076
|
}
|
|
14071
14077
|
|
|
14072
|
-
var uuidv4 = uuidv4Imported__namespace;
|
|
14078
|
+
var uuidv4$1 = uuidv4Imported__namespace;
|
|
14073
14079
|
var _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14074
14080
|
var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14075
14081
|
/**
|
|
@@ -14113,7 +14119,7 @@
|
|
|
14113
14119
|
// Skip if not tracked
|
|
14114
14120
|
if (!context || !context.tracked)
|
|
14115
14121
|
return forward(operation);
|
|
14116
|
-
var id = context.serializationKey || uuidv4();
|
|
14122
|
+
var id = context.serializationKey || uuidv4$1();
|
|
14117
14123
|
console.debug("[apollo-tracker-link] Watching tracked query {" + operation.operationName + "#" + id + "}");
|
|
14118
14124
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
14119
14125
|
var cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -14746,14 +14752,14 @@
|
|
|
14746
14752
|
mutationLinks = void 0;
|
|
14747
14753
|
// Add queue to store tracked queries, when offline
|
|
14748
14754
|
if (enableTrackMutationQueries) {
|
|
14749
|
-
serializingLink = new SerializingLink__default[
|
|
14755
|
+
serializingLink = new SerializingLink__default['default']();
|
|
14750
14756
|
trackerLink = createTrackerLink({
|
|
14751
14757
|
storage: storage,
|
|
14752
14758
|
onNetworkStatusChange: this._networkStatusChanged$,
|
|
14753
14759
|
debounce: 1000,
|
|
14754
14760
|
debug: true
|
|
14755
14761
|
});
|
|
14756
|
-
queueLink_1 = new QueueLink__default[
|
|
14762
|
+
queueLink_1 = new QueueLink__default['default']();
|
|
14757
14763
|
this.registerSubscription(this._networkStatusChanged$
|
|
14758
14764
|
.subscribe(function (type) {
|
|
14759
14765
|
// Network is offline: start buffering into queue
|
|
@@ -14768,7 +14774,7 @@
|
|
|
14768
14774
|
}
|
|
14769
14775
|
}));
|
|
14770
14776
|
mutationLinks = [
|
|
14771
|
-
loggerLink__default[
|
|
14777
|
+
loggerLink__default['default'],
|
|
14772
14778
|
queueLink_1,
|
|
14773
14779
|
trackerLink,
|
|
14774
14780
|
queueLink_1,
|
|
@@ -14875,7 +14881,7 @@
|
|
|
14875
14881
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
14876
14882
|
|| this.toAppError(err.networkError)
|
|
14877
14883
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
14878
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
14884
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
14879
14885
|
// If graphQL: try to convert the first error found
|
|
14880
14886
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
14881
14887
|
|| this.toAppError(err)
|
|
@@ -14883,7 +14889,7 @@
|
|
|
14883
14889
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
14884
14890
|
|| err;
|
|
14885
14891
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
14886
|
-
if (error && error.code === ErrorCodes
|
|
14892
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
14887
14893
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
14888
14894
|
this.onNetworkError.next(error);
|
|
14889
14895
|
}
|
|
@@ -14919,7 +14925,7 @@
|
|
|
14919
14925
|
return 'ERROR.UNAUTHORIZED';
|
|
14920
14926
|
case ServerErrorCodes.FORBIDDEN:
|
|
14921
14927
|
return 'ERROR.FORBIDDEN';
|
|
14922
|
-
case ErrorCodes
|
|
14928
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
14923
14929
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
14924
14930
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
14925
14931
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -14951,7 +14957,7 @@
|
|
|
14951
14957
|
};
|
|
14952
14958
|
return GraphqlService;
|
|
14953
14959
|
}(StartableService));
|
|
14954
|
-
GraphqlService.ɵprov =
|
|
14960
|
+
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" });
|
|
14955
14961
|
GraphqlService.decorators = [
|
|
14956
14962
|
{ type: i0.Injectable, args: [{
|
|
14957
14963
|
providedIn: 'root'
|
|
@@ -14968,7 +14974,7 @@
|
|
|
14968
14974
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
14969
14975
|
]; };
|
|
14970
14976
|
|
|
14971
|
-
var sha256 = require('hash.js/lib/hash/sha/256');
|
|
14977
|
+
var sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
14972
14978
|
var BaseGraphqlServiceOptions = /** @class */ (function () {
|
|
14973
14979
|
function BaseGraphqlServiceOptions() {
|
|
14974
14980
|
}
|
|
@@ -15138,8 +15144,8 @@
|
|
|
15138
15144
|
};
|
|
15139
15145
|
/* -- protected methods -- */
|
|
15140
15146
|
BaseGraphqlService.prototype.computeMutableWatchQueryId = function (opts) {
|
|
15141
|
-
var queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
15142
|
-
var variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
15147
|
+
var queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
15148
|
+
var variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
15143
15149
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
15144
15150
|
};
|
|
15145
15151
|
BaseGraphqlService.prototype.findMutableWatchQueries = function (opts) {
|
|
@@ -15208,19 +15214,19 @@
|
|
|
15208
15214
|
/* ------------------------------------
|
|
15209
15215
|
* GraphQL queries
|
|
15210
15216
|
* ------------------------------------*/
|
|
15211
|
-
var Fragments
|
|
15212
|
-
account: core.gql(templateObject_1
|
|
15213
|
-
settings: core.gql(templateObject_2
|
|
15217
|
+
var Fragments = {
|
|
15218
|
+
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 }"]))),
|
|
15219
|
+
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 }"])))
|
|
15214
15220
|
};
|
|
15215
15221
|
// Load account query
|
|
15216
|
-
var LoadQuery
|
|
15222
|
+
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);
|
|
15217
15223
|
// Check email query
|
|
15218
|
-
var IsEmailExistsQuery = core.gql(templateObject_4
|
|
15224
|
+
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"])));
|
|
15219
15225
|
// Save (create or update) account mutation
|
|
15220
15226
|
var AccountMutations = {
|
|
15221
|
-
save: core.gql(templateObject_5
|
|
15222
|
-
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
|
|
15223
|
-
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
|
|
15227
|
+
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),
|
|
15228
|
+
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),
|
|
15229
|
+
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)
|
|
15224
15230
|
};
|
|
15225
15231
|
// Sent confirmation email
|
|
15226
15232
|
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"])));
|
|
@@ -15582,7 +15588,7 @@
|
|
|
15582
15588
|
error_3 = _b.sent();
|
|
15583
15589
|
console.error(error_3);
|
|
15584
15590
|
this.resetData();
|
|
15585
|
-
throw { code: ErrorCodes
|
|
15591
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
15586
15592
|
case 4:
|
|
15587
15593
|
// Store pubkey+keypair
|
|
15588
15594
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -15618,7 +15624,7 @@
|
|
|
15618
15624
|
return [3 /*break*/, 18];
|
|
15619
15625
|
case 11:
|
|
15620
15626
|
err_1 = _b.sent();
|
|
15621
|
-
if (!(err_1 && +(err_1.code) === ErrorCodes
|
|
15627
|
+
if (!(err_1 && +(err_1.code) === ErrorCodes.LOAD_ACCOUNT_ERROR)) return [3 /*break*/, 17];
|
|
15622
15628
|
if (!(data.username.indexOf('@') !== -1)) return [3 /*break*/, 16];
|
|
15623
15629
|
isEmailExists = void 0;
|
|
15624
15630
|
_b.label = 12;
|
|
@@ -15634,12 +15640,12 @@
|
|
|
15634
15640
|
case 15:
|
|
15635
15641
|
// Email not exists (no account)
|
|
15636
15642
|
if (!isEmailExists) {
|
|
15637
|
-
throw { code: ErrorCodes
|
|
15643
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
15638
15644
|
}
|
|
15639
15645
|
_b.label = 16;
|
|
15640
15646
|
case 16:
|
|
15641
15647
|
// Email exists, so error = 'bad password'
|
|
15642
|
-
throw { code: ErrorCodes
|
|
15648
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
15643
15649
|
case 17: throw err_1; // resend the first error
|
|
15644
15650
|
case 18:
|
|
15645
15651
|
_b.trys.push([18, 20, , 21]);
|
|
@@ -15811,8 +15817,8 @@
|
|
|
15811
15817
|
_b.label = 3;
|
|
15812
15818
|
case 3: return [3 /*break*/, 6];
|
|
15813
15819
|
case 4: return [4 /*yield*/, this.graphql.query({
|
|
15814
|
-
query: LoadQuery
|
|
15815
|
-
error: { code: ErrorCodes
|
|
15820
|
+
query: LoadQuery,
|
|
15821
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
15816
15822
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
15817
15823
|
})];
|
|
15818
15824
|
case 5:
|
|
@@ -15850,7 +15856,7 @@
|
|
|
15850
15856
|
case 1:
|
|
15851
15857
|
isEmailExists = _b.sent();
|
|
15852
15858
|
if (isEmailExists) {
|
|
15853
|
-
throw { code: ErrorCodes
|
|
15859
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
15854
15860
|
}
|
|
15855
15861
|
return [2 /*return*/];
|
|
15856
15862
|
}
|
|
@@ -15900,7 +15906,7 @@
|
|
|
15900
15906
|
locale: locale
|
|
15901
15907
|
},
|
|
15902
15908
|
error: {
|
|
15903
|
-
code: ErrorCodes
|
|
15909
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
15904
15910
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
15905
15911
|
}
|
|
15906
15912
|
})];
|
|
@@ -15923,7 +15929,7 @@
|
|
|
15923
15929
|
code: code
|
|
15924
15930
|
},
|
|
15925
15931
|
error: {
|
|
15926
|
-
code: ErrorCodes
|
|
15932
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
15927
15933
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
15928
15934
|
}
|
|
15929
15935
|
})];
|
|
@@ -15946,7 +15952,7 @@
|
|
|
15946
15952
|
interval: 10
|
|
15947
15953
|
},
|
|
15948
15954
|
error: {
|
|
15949
|
-
code: ErrorCodes
|
|
15955
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
15950
15956
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
15951
15957
|
}
|
|
15952
15958
|
}).subscribe({
|
|
@@ -16086,7 +16092,7 @@
|
|
|
16086
16092
|
throw error_6;
|
|
16087
16093
|
console.error(error_6);
|
|
16088
16094
|
throw {
|
|
16089
|
-
code: ErrorCodes
|
|
16095
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
16090
16096
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
16091
16097
|
};
|
|
16092
16098
|
case 6: return [2 /*return*/];
|
|
@@ -16295,7 +16301,7 @@
|
|
|
16295
16301
|
case 1:
|
|
16296
16302
|
existingAccount = _b.sent();
|
|
16297
16303
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
16298
|
-
throw { code: ErrorCodes
|
|
16304
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
16299
16305
|
}
|
|
16300
16306
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
16301
16307
|
_b.label = 2;
|
|
@@ -16307,7 +16313,7 @@
|
|
|
16307
16313
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
16308
16314
|
variables: { data: json },
|
|
16309
16315
|
error: {
|
|
16310
|
-
code: ErrorCodes
|
|
16316
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
16311
16317
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
16312
16318
|
}
|
|
16313
16319
|
})];
|
|
@@ -16341,7 +16347,7 @@
|
|
|
16341
16347
|
mutation: AccountMutations.saveSettings,
|
|
16342
16348
|
variables: { data: json },
|
|
16343
16349
|
error: {
|
|
16344
|
-
code: ErrorCodes
|
|
16350
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
16345
16351
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
16346
16352
|
}
|
|
16347
16353
|
})];
|
|
@@ -16372,7 +16378,7 @@
|
|
|
16372
16378
|
if (counter > 4) {
|
|
16373
16379
|
if (this._debug)
|
|
16374
16380
|
console.debug("[account] Failed to authentication on pod (after " + counter + " attempts)");
|
|
16375
|
-
throw { code: ErrorCodes
|
|
16381
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
16376
16382
|
}
|
|
16377
16383
|
if (!token) return [3 /*break*/, 2];
|
|
16378
16384
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -16381,7 +16387,7 @@
|
|
|
16381
16387
|
token: token
|
|
16382
16388
|
},
|
|
16383
16389
|
error: {
|
|
16384
|
-
code: ErrorCodes
|
|
16390
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
16385
16391
|
message: 'ERROR.UNAUTHORIZED'
|
|
16386
16392
|
},
|
|
16387
16393
|
fetchPolicy: 'no-cache'
|
|
@@ -16398,7 +16404,7 @@
|
|
|
16398
16404
|
_b.label = 2;
|
|
16399
16405
|
case 2:
|
|
16400
16406
|
challengeError = {
|
|
16401
|
-
code: ErrorCodes
|
|
16407
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
16402
16408
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
16403
16409
|
};
|
|
16404
16410
|
return [4 /*yield*/, this.graphql.query({
|
|
@@ -16445,7 +16451,7 @@
|
|
|
16445
16451
|
};
|
|
16446
16452
|
return AccountService;
|
|
16447
16453
|
}(BaseGraphqlService));
|
|
16448
|
-
AccountService.ɵprov =
|
|
16454
|
+
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(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
16449
16455
|
AccountService.decorators = [
|
|
16450
16456
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
16451
16457
|
];
|
|
@@ -16458,7 +16464,7 @@
|
|
|
16458
16464
|
{ type: FileService },
|
|
16459
16465
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
16460
16466
|
]; };
|
|
16461
|
-
var templateObject_1
|
|
16467
|
+
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;
|
|
16462
16468
|
|
|
16463
16469
|
var Software_1, Configuration_1;
|
|
16464
16470
|
// @dynamic
|
|
@@ -16710,13 +16716,13 @@
|
|
|
16710
16716
|
/* ------------------------------------
|
|
16711
16717
|
* GraphQL queries
|
|
16712
16718
|
* ------------------------------------*/
|
|
16713
|
-
var Fragments = {
|
|
16714
|
-
config: core.gql(templateObject_1$
|
|
16719
|
+
var Fragments$1 = {
|
|
16720
|
+
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 "])))
|
|
16715
16721
|
};
|
|
16716
|
-
var LoadQuery = core.gql(templateObject_2$
|
|
16722
|
+
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);
|
|
16717
16723
|
// Save (create or update) account mutation
|
|
16718
|
-
var SaveMutation = core.gql(templateObject_3$
|
|
16719
|
-
var ClearCache = core.gql(templateObject_4$
|
|
16724
|
+
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);
|
|
16725
|
+
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"])));
|
|
16720
16726
|
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"])));
|
|
16721
16727
|
var APP_CONFIG_OPTIONS = new i0.InjectionToken('defaultOptions');
|
|
16722
16728
|
var ConfigService = /** @class */ (function (_super) {
|
|
@@ -16775,12 +16781,12 @@
|
|
|
16775
16781
|
case 0:
|
|
16776
16782
|
now = Date.now();
|
|
16777
16783
|
console.debug('[config] Loading Pod configuration...');
|
|
16778
|
-
query = opts && opts.query || LoadQuery;
|
|
16784
|
+
query = opts && opts.query || LoadQuery$1;
|
|
16779
16785
|
variables = opts && opts.variables || undefined;
|
|
16780
16786
|
return [4 /*yield*/, this.graphql.query({
|
|
16781
16787
|
query: query,
|
|
16782
16788
|
variables: variables,
|
|
16783
|
-
error: { code: ErrorCodes
|
|
16789
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
16784
16790
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
16785
16791
|
})];
|
|
16786
16792
|
case 1:
|
|
@@ -16819,7 +16825,7 @@
|
|
|
16819
16825
|
data: json
|
|
16820
16826
|
},
|
|
16821
16827
|
error: {
|
|
16822
|
-
code: ErrorCodes
|
|
16828
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
16823
16829
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
16824
16830
|
}
|
|
16825
16831
|
})];
|
|
@@ -16854,7 +16860,7 @@
|
|
|
16854
16860
|
return [4 /*yield*/, this.graphql.query({
|
|
16855
16861
|
query: CacheStatistics,
|
|
16856
16862
|
variables: null,
|
|
16857
|
-
error: { code: ErrorCodes
|
|
16863
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
16858
16864
|
fetchPolicy: 'network-only'
|
|
16859
16865
|
})];
|
|
16860
16866
|
case 1:
|
|
@@ -16878,7 +16884,7 @@
|
|
|
16878
16884
|
return [4 /*yield*/, this.graphql.query({
|
|
16879
16885
|
query: ClearCache,
|
|
16880
16886
|
variables: variables,
|
|
16881
|
-
error: { code: ErrorCodes
|
|
16887
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
16882
16888
|
fetchPolicy: 'network-only'
|
|
16883
16889
|
})];
|
|
16884
16890
|
case 1:
|
|
@@ -17078,7 +17084,7 @@
|
|
|
17078
17084
|
};
|
|
17079
17085
|
return ConfigService;
|
|
17080
17086
|
}(BaseGraphqlService));
|
|
17081
|
-
ConfigService.ɵprov =
|
|
17087
|
+
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(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
17082
17088
|
ConfigService.decorators = [
|
|
17083
17089
|
{ type: i0.Injectable, args: [{
|
|
17084
17090
|
providedIn: 'root',
|
|
@@ -17096,9 +17102,9 @@
|
|
|
17096
17102
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
|
|
17097
17103
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
17098
17104
|
]; };
|
|
17099
|
-
var templateObject_1$
|
|
17105
|
+
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
17100
17106
|
|
|
17101
|
-
var moment$
|
|
17107
|
+
var moment$4 = momentImported__namespace;
|
|
17102
17108
|
var PlatformService = /** @class */ (function (_super) {
|
|
17103
17109
|
__extends(PlatformService, _super);
|
|
17104
17110
|
function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
@@ -17337,16 +17343,16 @@
|
|
|
17337
17343
|
}
|
|
17338
17344
|
// config moment lib
|
|
17339
17345
|
try {
|
|
17340
|
-
moment$
|
|
17346
|
+
moment$4.locale(event.lang);
|
|
17341
17347
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
17342
17348
|
}
|
|
17343
17349
|
// If error, fallback to en
|
|
17344
17350
|
catch (err) {
|
|
17345
|
-
moment$
|
|
17351
|
+
moment$4.locale('en');
|
|
17346
17352
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
17347
17353
|
}
|
|
17348
17354
|
// Config date adapter
|
|
17349
|
-
_this.dateAdapter.setLocale(moment$
|
|
17355
|
+
_this.dateAdapter.setLocale(moment$4.locale());
|
|
17350
17356
|
}
|
|
17351
17357
|
});
|
|
17352
17358
|
this.settings.onChange.subscribe(function (data) {
|
|
@@ -17527,7 +17533,7 @@
|
|
|
17527
17533
|
};
|
|
17528
17534
|
return PlatformService;
|
|
17529
17535
|
}(StartableService));
|
|
17530
|
-
PlatformService.ɵprov =
|
|
17536
|
+
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" });
|
|
17531
17537
|
PlatformService.decorators = [
|
|
17532
17538
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
17533
17539
|
];
|
|
@@ -17625,7 +17631,7 @@
|
|
|
17625
17631
|
};
|
|
17626
17632
|
return MatStepperI18n;
|
|
17627
17633
|
}(stepper.MatStepperIntl));
|
|
17628
|
-
MatStepperI18n.ɵprov =
|
|
17634
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
17629
17635
|
MatStepperI18n.decorators = [
|
|
17630
17636
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
17631
17637
|
];
|
|
@@ -18827,7 +18833,7 @@
|
|
|
18827
18833
|
return 1;
|
|
18828
18834
|
}
|
|
18829
18835
|
}
|
|
18830
|
-
var ɵ0$
|
|
18836
|
+
var ɵ0$a = function (defaultStateSize) { return [
|
|
18831
18837
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
18832
18838
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
18833
18839
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -18835,7 +18841,7 @@
|
|
|
18835
18841
|
var SCALE_OPTIONS_DEFAULT = {
|
|
18836
18842
|
startColor: rgbArrayMap.red,
|
|
18837
18843
|
startStates: [0, 2, 3],
|
|
18838
|
-
startStepsFn: ɵ0$
|
|
18844
|
+
startStepsFn: ɵ0$a
|
|
18839
18845
|
};
|
|
18840
18846
|
/**
|
|
18841
18847
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -18927,24 +18933,24 @@
|
|
|
18927
18933
|
return result;
|
|
18928
18934
|
}
|
|
18929
18935
|
|
|
18930
|
-
var EntityTestClass
|
|
18936
|
+
var EntityTestClass = /** @class */ (function () {
|
|
18931
18937
|
function EntityTestClass() {
|
|
18932
18938
|
}
|
|
18933
18939
|
return EntityTestClass;
|
|
18934
18940
|
}());
|
|
18935
|
-
var FAKE_ENTITIES
|
|
18941
|
+
var FAKE_ENTITIES = [
|
|
18936
18942
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
18937
18943
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
18938
18944
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
18939
18945
|
];
|
|
18940
|
-
function deepCopy
|
|
18946
|
+
function deepCopy(values, size) {
|
|
18941
18947
|
if (isNil(size)) {
|
|
18942
|
-
return (values || FAKE_ENTITIES
|
|
18948
|
+
return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
|
|
18943
18949
|
}
|
|
18944
18950
|
var result = [];
|
|
18945
18951
|
var i = 1;
|
|
18946
18952
|
while (result.length < size) {
|
|
18947
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
18953
|
+
result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
|
|
18948
18954
|
var name = entity.name + ' #' + i;
|
|
18949
18955
|
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
18950
18956
|
}));
|
|
@@ -18954,8 +18960,8 @@
|
|
|
18954
18960
|
var AutocompleteTestPage = /** @class */ (function () {
|
|
18955
18961
|
function AutocompleteTestPage(formBuilder) {
|
|
18956
18962
|
this.formBuilder = formBuilder;
|
|
18957
|
-
this._items = deepCopy
|
|
18958
|
-
this
|
|
18963
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
18964
|
+
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
18959
18965
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
18960
18966
|
this.memoryHide = false;
|
|
18961
18967
|
this.memoryMobile = true;
|
|
@@ -18985,7 +18991,7 @@
|
|
|
18985
18991
|
});
|
|
18986
18992
|
// From $items observable
|
|
18987
18993
|
this.autocompleteFields.add('entity-$items', {
|
|
18988
|
-
items: this
|
|
18994
|
+
items: this._$items,
|
|
18989
18995
|
attributes: ['label', 'name'],
|
|
18990
18996
|
displayWith: this.entityToString
|
|
18991
18997
|
});
|
|
@@ -18999,7 +19005,7 @@
|
|
|
18999
19005
|
});
|
|
19000
19006
|
// From items
|
|
19001
19007
|
this.autocompleteFields.add('entity-items-large', {
|
|
19002
|
-
items: FAKE_ENTITIES
|
|
19008
|
+
items: FAKE_ENTITIES.slice(),
|
|
19003
19009
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
19004
19010
|
displayWith: this.entityToString
|
|
19005
19011
|
});
|
|
@@ -19012,12 +19018,12 @@
|
|
|
19012
19018
|
var _this = this;
|
|
19013
19019
|
return __generator(this, function (_a) {
|
|
19014
19020
|
data = {
|
|
19015
|
-
entity: deepCopy
|
|
19021
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
19016
19022
|
// This item is NOT in the items list => i should be displayed anyway
|
|
19017
19023
|
missingEntity: {
|
|
19018
19024
|
id: -1, label: '??', name: 'Missing item'
|
|
19019
19025
|
},
|
|
19020
|
-
disableEntity: deepCopy
|
|
19026
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
19021
19027
|
};
|
|
19022
19028
|
this.form.setValue(data);
|
|
19023
19029
|
// Load observables
|
|
@@ -19029,7 +19035,7 @@
|
|
|
19029
19035
|
AutocompleteTestPage.prototype.loadItems = function () {
|
|
19030
19036
|
return __awaiter(this, void 0, void 0, function () {
|
|
19031
19037
|
return __generator(this, function (_a) {
|
|
19032
|
-
this
|
|
19038
|
+
this._$items.next(this._items.slice());
|
|
19033
19039
|
return [2 /*return*/];
|
|
19034
19040
|
});
|
|
19035
19041
|
});
|
|
@@ -19070,7 +19076,7 @@
|
|
|
19070
19076
|
AutocompleteTestPage.prototype.doSubmit = function (event) {
|
|
19071
19077
|
console.debug('Validate form: ', this.form.value);
|
|
19072
19078
|
};
|
|
19073
|
-
AutocompleteTestPage.prototype.
|
|
19079
|
+
AutocompleteTestPage.prototype.equals = function (o1, o2) {
|
|
19074
19080
|
return o1 && o2 && o1.id === o2.id;
|
|
19075
19081
|
};
|
|
19076
19082
|
AutocompleteTestPage.prototype.toggleMode = function (value) {
|
|
@@ -19103,7 +19109,7 @@
|
|
|
19103
19109
|
AutocompleteTestPage.decorators = [
|
|
19104
19110
|
{ type: i0.Component, args: [{
|
|
19105
19111
|
selector: 'app-autocomplete-test',
|
|
19106
|
-
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>Autocomplete field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <!-- Tab nav - mobile/desktop mode -->\n <nav mat-tab-nav-bar>\n <a mat-tab-link\n [active]=\"mode==='mobile'\"\n (click)=\"toggleMode('mobile')\">\n <mat-label>Mobile</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='desktop'\"\n (click)=\"toggleMode('desktop')\">\n <mat-label>Desktop</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='memory'\"\n (click)=\"toggleMode('memory')\">\n <mat-label>Memory leak debug</mat-label>\n </a>\n <a mat-tab-link\n [active]=\"mode==='temp'\"\n (click)=\"toggleMode('temp')\">\n <mat-label>Temporary</mat-label>\n </a>\n </nav>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <!--<ion-grid *ngIf=\"mode === 'temp'\">\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>items: Observable<any[]></pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [compareWith]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n </ion-grid>-->\n\n\n <ion-grid *ngIf=\"mode === 'memory'\">\n\n <!-- debugging memory leak -->\n <ion-row>\n <ion-col>\n <ion-text><h4>Debug memory leak</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Items type\">\n <mat-select (selectionChange)=\"memoryAutocompleteFieldName=$event.value\" [value]=\"memoryAutocompleteFieldName\">\n <mat-option value=\"entity-$items\">Observable</mat-option>\n <mat-option value=\"entity-suggestFn\">Suggest function</mat-option>\n </mat-select>\n </mat-form-field>\n </ion-col>\n <ion-col size=\"1\" class=\"ion-no-padding\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Mobile ?\">\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [checked]=\"memoryMobile\">\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\" color=\"tertiary\">Start</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\" color=\"tertiary\">Stop</ion-button>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n *ngIf=\"!memoryHide && memoryAutocompleteFieldName\"\n [config]=\"autocompleteFields.get(memoryAutocompleteFieldName)\"\n [mobile]=\"memoryMobile\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-memory-leak]'\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <!-- Mobile mode -->\n <ion-grid *ngIf=\"mode === 'mobile'\">\n\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Suggest() function\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, suggestFn: (searchText, filter) => any[]</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-1]'\"\n [required]=\"true\"\n placeholder=\"Suggest field\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Items is an Observable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-observable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Change filter\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <ion-button (click)=\"updateFilter('entity-items-filter')\">Filter on: {{autocompleteFields.get('entity-items-filter').filter?.searchAttribute }}</ion-button>\n </ion-col>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-filter]'\"\n ></mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"min-width-large\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"true\"\n class=\"min-width-large\"\n panelWidth=\"400px\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-mobile-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col>\n <ion-text><h4>Desktop mode</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n items from suggest function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult<any></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-suggest]'\">\n </mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n search with a suggestLengthThreshold\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult<any>\nsuggestLengthThreshold: '3'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\n suggestLengthThreshold=\"3\"\n [logPrefix]=\"'[combo-desktop-suggest]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an array\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: [], value: {{stringify(form.controls.entity.value)}}</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [logPrefix]=\"'[combo-desktop-array-1]'\"\n [equals]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [equals]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-missing]'\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size panel\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class: 'mat-autocomplete-panel-full-size'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [equals]=\"compareWithFn\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-disable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"mat-autocomplete-panel-full-size\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n class=\"mat-autocomplete-panel-full-size\"\n panelWidth=\"100vw\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>panelWidth: string</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n panelWidth=\"400px\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n <ion-col size=\"3\">\n <mat-checkbox #showIcons [checked]=\"false\">\n Icons ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n <mat-icon matPrefix *ngIf=\"showIcons.checked\">keyboard_arrow_right</mat-icon>\n <mat-icon matSuffix *ngIf=\"showIcons.checked\">keyboard_arrow_left</mat-icon>\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
19112
|
+
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>Autocomplete field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <!-- Tab nav - mobile/desktop mode -->\n <nav mat-tab-nav-bar>\n <a mat-tab-link\n [active]=\"mode==='mobile'\"\n (click)=\"toggleMode('mobile')\">\n <mat-label>Mobile</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='desktop'\"\n (click)=\"toggleMode('desktop')\">\n <mat-label>Desktop</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='memory'\"\n (click)=\"toggleMode('memory')\">\n <mat-label>Memory leak debug</mat-label>\n </a>\n <a mat-tab-link\n [active]=\"mode==='temp'\"\n (click)=\"toggleMode('temp')\">\n <mat-label>Temporary</mat-label>\n </a>\n </nav>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <!--<ion-grid *ngIf=\"mode === 'temp'\">\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>items: Observable<any[]></pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [compareWith]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n </ion-grid>-->\n\n\n <ion-grid *ngIf=\"mode === 'memory'\">\n\n <!-- debugging memory leak -->\n <ion-row>\n <ion-col>\n <ion-text><h4>Debug memory leak</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Items type\">\n <mat-select (selectionChange)=\"memoryAutocompleteFieldName=$event.value\" [value]=\"memoryAutocompleteFieldName\">\n <mat-option value=\"entity-$items\">Observable</mat-option>\n <mat-option value=\"entity-suggestFn\">Suggest function</mat-option>\n </mat-select>\n </mat-form-field>\n </ion-col>\n <ion-col size=\"1\" class=\"ion-no-padding\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Mobile ?\">\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [checked]=\"memoryMobile\">\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\" color=\"tertiary\">Start</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\" color=\"tertiary\">Stop</ion-button>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n *ngIf=\"!memoryHide && memoryAutocompleteFieldName\"\n [config]=\"autocompleteFields.get(memoryAutocompleteFieldName)\"\n [mobile]=\"memoryMobile\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-memory-leak]'\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <!-- Mobile mode -->\n <ion-grid *ngIf=\"mode === 'mobile'\">\n\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Suggest() function\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, suggestFn: (searchText, filter) => any[]</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-1]'\"\n [required]=\"true\"\n placeholder=\"Suggest field\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Items is an Observable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-observable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Change filter\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <ion-button (click)=\"updateFilter('entity-items-filter')\">Filter on: {{autocompleteFields.get('entity-items-filter').filter?.searchAttribute }}</ion-button>\n </ion-col>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-filter]'\"\n ></mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"min-width-large\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"true\"\n class=\"min-width-large\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col>\n <ion-text><h4>Desktop mode</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n items from suggest function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult<any></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-suggest]'\">\n </mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n search with a suggestLengthThreshold\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult<any>\nsuggestLengthThreshold: '3'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n suggestLengthThreshold=\"3\"\n [logPrefix]=\"'[combo-desktop-suggest]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an array\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: [], value: {{stringify(form.controls.entity.value)}}</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [logPrefix]=\"'[combo-desktop-array-1]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable<any[]></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-missing]'\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size panel\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class: 'mat-autocomplete-panel-full-size'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n [debug]=\"true\"\n [showAllOnFocus]=\"true\"\n [showPanelOnFocus]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-disable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"mat-autocomplete-panel-full-size\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n class=\"mat-autocomplete-panel-full-size\"\n panelWidth=\"100vw\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>panelWidth: string</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n <ion-col size=\"3\">\n <mat-checkbox #showIcons [checked]=\"false\">\n Icons ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n <mat-icon matPrefix *ngIf=\"showIcons.checked\">keyboard_arrow_right</mat-icon>\n <mat-icon matSuffix *ngIf=\"showIcons.checked\">keyboard_arrow_left</mat-icon>\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
19107
19113
|
},] }
|
|
19108
19114
|
];
|
|
19109
19115
|
AutocompleteTestPage.ctorParameters = function () { return [
|
|
@@ -19215,13 +19221,13 @@
|
|
|
19215
19221
|
{ type: Array, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_TESTING_PAGES,] }] }
|
|
19216
19222
|
]; };
|
|
19217
19223
|
|
|
19218
|
-
var moment$
|
|
19224
|
+
var moment$5 = momentImported__namespace;
|
|
19219
19225
|
var SwipeTestPage = /** @class */ (function () {
|
|
19220
19226
|
function SwipeTestPage(formBuilder, dateFormatPipe) {
|
|
19221
19227
|
this.formBuilder = formBuilder;
|
|
19222
19228
|
this.dateFormatPipe = dateFormatPipe;
|
|
19223
19229
|
this.$dates = new rxjs.BehaviorSubject(undefined);
|
|
19224
|
-
this._today = moment$
|
|
19230
|
+
this._today = moment$5().startOf('day');
|
|
19225
19231
|
this.form = formBuilder.group({
|
|
19226
19232
|
empty: [null, i1.Validators.required],
|
|
19227
19233
|
date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
|
|
@@ -19235,7 +19241,7 @@
|
|
|
19235
19241
|
var _this = this;
|
|
19236
19242
|
var dates = [];
|
|
19237
19243
|
for (var d = 0; d < 7; d++) {
|
|
19238
|
-
dates[d] = moment$
|
|
19244
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
19239
19245
|
}
|
|
19240
19246
|
this.$dates.next(dates);
|
|
19241
19247
|
this.loadData();
|
|
@@ -19282,7 +19288,7 @@
|
|
|
19282
19288
|
{ type: DateFormatPipe }
|
|
19283
19289
|
]; };
|
|
19284
19290
|
|
|
19285
|
-
var moment = momentImported__namespace;
|
|
19291
|
+
var moment$6 = momentImported__namespace;
|
|
19286
19292
|
var DateTimeTestPage = /** @class */ (function () {
|
|
19287
19293
|
function DateTimeTestPage(platform, formBuilder, cd) {
|
|
19288
19294
|
this.platform = platform;
|
|
@@ -19318,7 +19324,7 @@
|
|
|
19318
19324
|
var now, data;
|
|
19319
19325
|
var _this = this;
|
|
19320
19326
|
return __generator(this, function (_a) {
|
|
19321
|
-
now = moment();
|
|
19327
|
+
now = moment$6();
|
|
19322
19328
|
data = {
|
|
19323
19329
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
19324
19330
|
enable: toDateISOString(now),
|
|
@@ -19383,12 +19389,12 @@
|
|
|
19383
19389
|
{ type: i0.ChangeDetectorRef }
|
|
19384
19390
|
]; };
|
|
19385
19391
|
|
|
19386
|
-
var EntityTestClass = /** @class */ (function () {
|
|
19392
|
+
var EntityTestClass$1 = /** @class */ (function () {
|
|
19387
19393
|
function EntityTestClass() {
|
|
19388
19394
|
}
|
|
19389
19395
|
return EntityTestClass;
|
|
19390
19396
|
}());
|
|
19391
|
-
var FAKE_ENTITIES = [
|
|
19397
|
+
var FAKE_ENTITIES$1 = [
|
|
19392
19398
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
19393
19399
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
19394
19400
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -19397,13 +19403,24 @@
|
|
|
19397
19403
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
19398
19404
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
19399
19405
|
];
|
|
19400
|
-
function deepCopy(values) {
|
|
19401
|
-
|
|
19406
|
+
function deepCopy$1(values, size) {
|
|
19407
|
+
if (isNil(size)) {
|
|
19408
|
+
return (values || FAKE_ENTITIES$1).map(function (entity) { return Object.assign({}, entity); });
|
|
19409
|
+
}
|
|
19410
|
+
var result = [];
|
|
19411
|
+
var i = 1;
|
|
19412
|
+
while (result.length < size) {
|
|
19413
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(function (entity) {
|
|
19414
|
+
var name = entity.name + ' #' + i;
|
|
19415
|
+
return Object.assign(Object.assign({}, entity), { id: i++, name: name });
|
|
19416
|
+
}));
|
|
19417
|
+
}
|
|
19418
|
+
return result.slice(0, size);
|
|
19402
19419
|
}
|
|
19403
19420
|
var ChipsTestPage = /** @class */ (function () {
|
|
19404
19421
|
function ChipsTestPage(formBuilder) {
|
|
19405
19422
|
this.formBuilder = formBuilder;
|
|
19406
|
-
this._items = deepCopy(FAKE_ENTITIES);
|
|
19423
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
19407
19424
|
this._$items = new rxjs.BehaviorSubject(undefined);
|
|
19408
19425
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
19409
19426
|
this.form = formBuilder.group({
|
|
@@ -19424,12 +19441,12 @@
|
|
|
19424
19441
|
});
|
|
19425
19442
|
// From items
|
|
19426
19443
|
this.autocompleteFields.add('entity-items', {
|
|
19427
|
-
items:
|
|
19444
|
+
items: this._items.slice(),
|
|
19428
19445
|
attributes: ['label', 'name'],
|
|
19429
19446
|
displayWith: this.entityToString,
|
|
19430
19447
|
equals: function (o1, o2) { return EntityUtils.compare(o1, o2, 1, 'id') === 0; }
|
|
19431
19448
|
});
|
|
19432
|
-
// From items
|
|
19449
|
+
// From $items observable
|
|
19433
19450
|
this.autocompleteFields.add('entity-$items', {
|
|
19434
19451
|
items: this._$items,
|
|
19435
19452
|
attributes: ['label', 'name'],
|
|
@@ -19443,15 +19460,18 @@
|
|
|
19443
19460
|
// Load the form with data
|
|
19444
19461
|
ChipsTestPage.prototype.loadData = function () {
|
|
19445
19462
|
return __awaiter(this, void 0, void 0, function () {
|
|
19446
|
-
var data;
|
|
19463
|
+
var items, data;
|
|
19464
|
+
var _this = this;
|
|
19447
19465
|
return __generator(this, function (_a) {
|
|
19466
|
+
items = deepCopy$1(FAKE_ENTITIES$1);
|
|
19448
19467
|
data = {
|
|
19449
|
-
entity:
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
19468
|
+
entity: items.slice(0, 1),
|
|
19469
|
+
entityInitial: items.slice(1, 2),
|
|
19470
|
+
disableEntity: items.slice(1, 2)
|
|
19453
19471
|
};
|
|
19454
19472
|
this.form.setValue(data);
|
|
19473
|
+
// Load observables
|
|
19474
|
+
setTimeout(function () { return _this.loadItems(); }, 1000);
|
|
19455
19475
|
return [2 /*return*/];
|
|
19456
19476
|
});
|
|
19457
19477
|
});
|
|
@@ -19459,7 +19479,7 @@
|
|
|
19459
19479
|
ChipsTestPage.prototype.loadItems = function () {
|
|
19460
19480
|
return __awaiter(this, void 0, void 0, function () {
|
|
19461
19481
|
return __generator(this, function (_a) {
|
|
19462
|
-
this._$items.next(
|
|
19482
|
+
this._$items.next(this._items.slice());
|
|
19463
19483
|
return [2 /*return*/];
|
|
19464
19484
|
});
|
|
19465
19485
|
});
|
|
@@ -19469,8 +19489,31 @@
|
|
|
19469
19489
|
};
|
|
19470
19490
|
ChipsTestPage.prototype.suggest = function (value, filter) {
|
|
19471
19491
|
return __awaiter(this, void 0, void 0, function () {
|
|
19492
|
+
var res, total, nextOffset;
|
|
19493
|
+
var _this = this;
|
|
19472
19494
|
return __generator(this, function (_a) {
|
|
19473
|
-
|
|
19495
|
+
filter = Object.assign({ offset: 0, size: 30 }, filter);
|
|
19496
|
+
res = suggestFromArray(this._items, value, Object.assign(Object.assign({}, filter), { searchAttributes: ['label', 'name'] }));
|
|
19497
|
+
total = res.total || res.data.length;
|
|
19498
|
+
nextOffset = filter.offset + res.data.length;
|
|
19499
|
+
if (nextOffset < total) {
|
|
19500
|
+
filter = Object.assign(Object.assign({}, filter), { offset: nextOffset });
|
|
19501
|
+
return [2 /*return*/, {
|
|
19502
|
+
total: total,
|
|
19503
|
+
data: res.data,
|
|
19504
|
+
fetchMore: function (variables) { return __awaiter(_this, void 0, void 0, function () {
|
|
19505
|
+
return __generator(this, function (_a) {
|
|
19506
|
+
switch (_a.label) {
|
|
19507
|
+
case 0: return [4 /*yield*/, sleep(1000)];
|
|
19508
|
+
case 1:
|
|
19509
|
+
_a.sent();
|
|
19510
|
+
return [2 /*return*/, this.suggest(value, Object.assign(Object.assign({}, filter), variables))];
|
|
19511
|
+
}
|
|
19512
|
+
});
|
|
19513
|
+
}); }
|
|
19514
|
+
}];
|
|
19515
|
+
}
|
|
19516
|
+
return [2 /*return*/, res];
|
|
19474
19517
|
});
|
|
19475
19518
|
});
|
|
19476
19519
|
};
|
|
@@ -19489,7 +19532,7 @@
|
|
|
19489
19532
|
ChipsTestPage.decorators = [
|
|
19490
19533
|
{ type: i0.Component, args: [{
|
|
19491
19534
|
selector: 'app-chips-test',
|
|
19492
|
-
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>Chips 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 <ion-row>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Suggest() function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-empty] '\"\n chipColor=\"accent\"\n [debug]=\"
|
|
19535
|
+
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>Chips 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 <ion-row>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Suggest() function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-empty] '\"\n chipColor=\"accent\"\n [debug]=\"false\"\n ></mat-chips-field>\n {{stringify(form.controls.entity.value)}}\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Suggest() function with initial value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entityInitial\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-initialized] '\"\n chipColor=\"primary\"\n [debug]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.entityInitial.value)}}\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[mat-chips-disabled] '\"\n chipColor=\"warning\"\n [debug]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.disableEntity.value)}}\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[mat-chips-readonly] '\"\n [readonly]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.entity.value)}}\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
19493
19536
|
},] }
|
|
19494
19537
|
];
|
|
19495
19538
|
ChipsTestPage.ctorParameters = function () { return [
|
|
@@ -19508,7 +19551,7 @@
|
|
|
19508
19551
|
},] }
|
|
19509
19552
|
];
|
|
19510
19553
|
|
|
19511
|
-
var routes
|
|
19554
|
+
var routes = [
|
|
19512
19555
|
{
|
|
19513
19556
|
path: '',
|
|
19514
19557
|
pathMatch: 'full',
|
|
@@ -19563,7 +19606,7 @@
|
|
|
19563
19606
|
i1.ReactiveFormsModule,
|
|
19564
19607
|
SharedMaterialModule,
|
|
19565
19608
|
i1$2.TranslateModule.forChild(),
|
|
19566
|
-
i3.RouterModule.forChild(routes
|
|
19609
|
+
i3.RouterModule.forChild(routes)
|
|
19567
19610
|
],
|
|
19568
19611
|
declarations: [
|
|
19569
19612
|
MaterialTestingPage,
|
|
@@ -20768,7 +20811,7 @@
|
|
|
20768
20811
|
};
|
|
20769
20812
|
return UserSettingsValidatorService;
|
|
20770
20813
|
}(AppValidatorService));
|
|
20771
|
-
UserSettingsValidatorService.ɵprov =
|
|
20814
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
20772
20815
|
UserSettingsValidatorService.decorators = [
|
|
20773
20816
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
20774
20817
|
];
|
|
@@ -20816,7 +20859,7 @@
|
|
|
20816
20859
|
};
|
|
20817
20860
|
return AccountValidatorService;
|
|
20818
20861
|
}(AppValidatorService));
|
|
20819
|
-
AccountValidatorService.ɵprov =
|
|
20862
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
20820
20863
|
AccountValidatorService.decorators = [
|
|
20821
20864
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
20822
20865
|
];
|
|
@@ -21447,7 +21490,7 @@
|
|
|
21447
21490
|
};
|
|
21448
21491
|
return LocalSettingsValidatorService;
|
|
21449
21492
|
}(AppValidatorService));
|
|
21450
|
-
LocalSettingsValidatorService.ɵprov =
|
|
21493
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
21451
21494
|
LocalSettingsValidatorService.decorators = [
|
|
21452
21495
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
21453
21496
|
];
|
|
@@ -22227,7 +22270,7 @@
|
|
|
22227
22270
|
};
|
|
22228
22271
|
return IsOnFieldModePipe;
|
|
22229
22272
|
}());
|
|
22230
|
-
IsOnFieldModePipe.ɵprov =
|
|
22273
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
22231
22274
|
IsOnFieldModePipe.decorators = [
|
|
22232
22275
|
{ type: i0.Pipe, args: [{
|
|
22233
22276
|
name: 'isOnField'
|
|
@@ -22242,7 +22285,7 @@
|
|
|
22242
22285
|
};
|
|
22243
22286
|
return IsNotOnFieldModePipe;
|
|
22244
22287
|
}());
|
|
22245
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
22288
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
22246
22289
|
IsNotOnFieldModePipe.decorators = [
|
|
22247
22290
|
{ type: i0.Pipe, args: [{
|
|
22248
22291
|
name: 'isNotOnField'
|
|
@@ -22260,7 +22303,7 @@
|
|
|
22260
22303
|
};
|
|
22261
22304
|
return PersonToStringPipe;
|
|
22262
22305
|
}());
|
|
22263
|
-
PersonToStringPipe.ɵprov =
|
|
22306
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
22264
22307
|
PersonToStringPipe.decorators = [
|
|
22265
22308
|
{ type: i0.Pipe, args: [{
|
|
22266
22309
|
name: 'personToString'
|
|
@@ -22724,7 +22767,7 @@
|
|
|
22724
22767
|
};
|
|
22725
22768
|
return IsLoginAccountPipe;
|
|
22726
22769
|
}());
|
|
22727
|
-
IsLoginAccountPipe.ɵprov =
|
|
22770
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
22728
22771
|
IsLoginAccountPipe.decorators = [
|
|
22729
22772
|
{ type: i0.Pipe, args: [{
|
|
22730
22773
|
name: 'isLogin'
|
|
@@ -22739,7 +22782,7 @@
|
|
|
22739
22782
|
};
|
|
22740
22783
|
return AccountToStringPipe;
|
|
22741
22784
|
}());
|
|
22742
|
-
AccountToStringPipe.ɵprov =
|
|
22785
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
22743
22786
|
AccountToStringPipe.decorators = [
|
|
22744
22787
|
{ type: i0.Pipe, args: [{
|
|
22745
22788
|
name: 'accountToString'
|
|
@@ -22757,7 +22800,7 @@
|
|
|
22757
22800
|
};
|
|
22758
22801
|
return DepartmentToStringPipe;
|
|
22759
22802
|
}());
|
|
22760
|
-
DepartmentToStringPipe.ɵprov =
|
|
22803
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
22761
22804
|
DepartmentToStringPipe.decorators = [
|
|
22762
22805
|
{ type: i0.Pipe, args: [{
|
|
22763
22806
|
name: 'departmentToString'
|
|
@@ -22792,7 +22835,7 @@
|
|
|
22792
22835
|
};
|
|
22793
22836
|
return MenuService;
|
|
22794
22837
|
}());
|
|
22795
|
-
MenuService.ɵprov =
|
|
22838
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
22796
22839
|
MenuService.decorators = [
|
|
22797
22840
|
{ type: i0.Injectable, args: [{
|
|
22798
22841
|
providedIn: 'root'
|
|
@@ -23406,7 +23449,7 @@
|
|
|
23406
23449
|
};
|
|
23407
23450
|
return AuthGuardService;
|
|
23408
23451
|
}());
|
|
23409
|
-
AuthGuardService.ɵprov =
|
|
23452
|
+
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" });
|
|
23410
23453
|
AuthGuardService.decorators = [
|
|
23411
23454
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
23412
23455
|
];
|
|
@@ -23451,7 +23494,7 @@
|
|
|
23451
23494
|
query: query,
|
|
23452
23495
|
variables: { id: id },
|
|
23453
23496
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
23454
|
-
error: { code: ErrorCodes
|
|
23497
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
23455
23498
|
})
|
|
23456
23499
|
.pipe(operators.map(function (_b) {
|
|
23457
23500
|
var data = _b.data;
|
|
@@ -23473,7 +23516,7 @@
|
|
|
23473
23516
|
query: query,
|
|
23474
23517
|
variables: { id: id },
|
|
23475
23518
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
23476
|
-
error: { code: ErrorCodes
|
|
23519
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
23477
23520
|
})];
|
|
23478
23521
|
case 1:
|
|
23479
23522
|
data = (_b.sent()).data;
|
|
@@ -23509,7 +23552,7 @@
|
|
|
23509
23552
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
23510
23553
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
23511
23554
|
variables: variables,
|
|
23512
|
-
error: { code: ErrorCodes
|
|
23555
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
23513
23556
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
23514
23557
|
})
|
|
23515
23558
|
.pipe(operators.map(function (_b) {
|
|
@@ -23551,7 +23594,7 @@
|
|
|
23551
23594
|
return [4 /*yield*/, this.graphql.query({
|
|
23552
23595
|
query: query,
|
|
23553
23596
|
variables: variables,
|
|
23554
|
-
error: { code: ErrorCodes
|
|
23597
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
23555
23598
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
23556
23599
|
})];
|
|
23557
23600
|
case 1:
|
|
@@ -23599,7 +23642,7 @@
|
|
|
23599
23642
|
variables: {
|
|
23600
23643
|
filter: filter && filter.asPodObject()
|
|
23601
23644
|
},
|
|
23602
|
-
error: { code: ErrorCodes
|
|
23645
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
23603
23646
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
23604
23647
|
})];
|
|
23605
23648
|
case 3:
|
|
@@ -23641,7 +23684,7 @@
|
|
|
23641
23684
|
variables: {
|
|
23642
23685
|
data: json
|
|
23643
23686
|
},
|
|
23644
|
-
error: { code: ErrorCodes
|
|
23687
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
23645
23688
|
update: function (proxy, _b) {
|
|
23646
23689
|
var data = _b.data;
|
|
23647
23690
|
var savedEntities = data && data.data;
|
|
@@ -23708,7 +23751,7 @@
|
|
|
23708
23751
|
variables: {
|
|
23709
23752
|
data: json
|
|
23710
23753
|
},
|
|
23711
|
-
error: { code: ErrorCodes
|
|
23754
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
23712
23755
|
update: function (cache, _b) {
|
|
23713
23756
|
var data = _b.data;
|
|
23714
23757
|
// Update entity
|
|
@@ -23766,7 +23809,7 @@
|
|
|
23766
23809
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
23767
23810
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
23768
23811
|
variables: { ids: ids },
|
|
23769
|
-
error: { code: ErrorCodes
|
|
23812
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
23770
23813
|
update: function (cache, res) {
|
|
23771
23814
|
// Remove from cache
|
|
23772
23815
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -23819,7 +23862,7 @@
|
|
|
23819
23862
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
23820
23863
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
23821
23864
|
variables: { id: id },
|
|
23822
|
-
error: { code: ErrorCodes
|
|
23865
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
23823
23866
|
update: function (proxy, res) {
|
|
23824
23867
|
// Remove from cache
|
|
23825
23868
|
if (_this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -23858,7 +23901,7 @@
|
|
|
23858
23901
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
23859
23902
|
variables: variables,
|
|
23860
23903
|
error: {
|
|
23861
|
-
code: ErrorCodes
|
|
23904
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
23862
23905
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
23863
23906
|
}
|
|
23864
23907
|
})
|
|
@@ -24081,7 +24124,7 @@
|
|
|
24081
24124
|
if (this._debug)
|
|
24082
24125
|
invalidRows.forEach(function (row) { return AppTableUtils.logRowErrors(row, "[table-datasource] " + _this._logTypeName + " row #" + row.id); });
|
|
24083
24126
|
// Stop with an error
|
|
24084
|
-
throw { code: ErrorCodes
|
|
24127
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
24085
24128
|
}
|
|
24086
24129
|
this._editingRowCount = 0;
|
|
24087
24130
|
data = void 0;
|
|
@@ -24656,13 +24699,6 @@
|
|
|
24656
24699
|
AppTable.prototype.markAsLoaded = function (opts) {
|
|
24657
24700
|
this.setLoading(false, opts);
|
|
24658
24701
|
};
|
|
24659
|
-
AppTable.prototype.markRowAsDirty = function (row, opts) {
|
|
24660
|
-
var _a;
|
|
24661
|
-
row = row || this.editedRow;
|
|
24662
|
-
if (row)
|
|
24663
|
-
(_a = row.validator) === null || _a === void 0 ? void 0 : _a.markAsDirty(opts);
|
|
24664
|
-
this.markAsDirty(opts);
|
|
24665
|
-
};
|
|
24666
24702
|
AppTable.prototype.markAsReady = function (opts) {
|
|
24667
24703
|
if (this.readySubject.value !== true) {
|
|
24668
24704
|
this.readySubject.next(true);
|
|
@@ -25098,14 +25134,14 @@
|
|
|
25098
25134
|
case 0:
|
|
25099
25135
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
25100
25136
|
if (this.readOnly) {
|
|
25101
|
-
throw { code: ErrorCodes
|
|
25137
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
25102
25138
|
}
|
|
25103
25139
|
this.resetError();
|
|
25104
25140
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
25105
25141
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
25106
25142
|
previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
25107
25143
|
if (!this.confirmEditCreate()) {
|
|
25108
|
-
throw { code: ErrorCodes
|
|
25144
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
25109
25145
|
}
|
|
25110
25146
|
// Mark as saving
|
|
25111
25147
|
this.markAsSaving();
|
|
@@ -25260,7 +25296,7 @@
|
|
|
25260
25296
|
switch (_d.label) {
|
|
25261
25297
|
case 0:
|
|
25262
25298
|
if (this.readOnly) {
|
|
25263
|
-
throw { code: ErrorCodes
|
|
25299
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
25264
25300
|
}
|
|
25265
25301
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
25266
25302
|
return [2 /*return*/, 0]; // SKip
|
|
@@ -26015,6 +26051,13 @@
|
|
|
26015
26051
|
AppTable.prototype.equals = function (d1, d2) {
|
|
26016
26052
|
return EntityUtils.equals(d1, d2, 'id');
|
|
26017
26053
|
};
|
|
26054
|
+
AppTable.prototype.markRowAsDirty = function (row, opts) {
|
|
26055
|
+
var _a;
|
|
26056
|
+
row = row || this.editedRow;
|
|
26057
|
+
if (row)
|
|
26058
|
+
(_a = row.validator) === null || _a === void 0 ? void 0 : _a.markAsDirty(opts);
|
|
26059
|
+
this.markAsDirty(opts);
|
|
26060
|
+
};
|
|
26018
26061
|
/* -- private method -- */
|
|
26019
26062
|
AppTable.prototype.setLoading = function (value, opts) {
|
|
26020
26063
|
if (this.loadingSubject.value !== value) {
|
|
@@ -27098,7 +27141,7 @@
|
|
|
27098
27141
|
case 8:
|
|
27099
27142
|
data = _b.sent();
|
|
27100
27143
|
if (!data)
|
|
27101
|
-
throw { code: ErrorCodes
|
|
27144
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
27102
27145
|
this._usageMode = this.computeUsageMode(data);
|
|
27103
27146
|
return [4 /*yield*/, this.onEntityLoaded(data, opts)];
|
|
27104
27147
|
case 9:
|
|
@@ -27842,10 +27885,10 @@
|
|
|
27842
27885
|
exports.UserEventFilter = __decorate([
|
|
27843
27886
|
EntityClass({ typename: 'UserEventVO' })
|
|
27844
27887
|
], exports.UserEventFilter);
|
|
27845
|
-
var SaveQuery = core.gql(templateObject_1$
|
|
27846
|
-
var LoadAllQuery = core.gql(templateObject_2$
|
|
27847
|
-
var DeleteByIdsMutation = core.gql(templateObject_3$
|
|
27848
|
-
var LoadAllWithContentQuery = core.gql(templateObject_4$
|
|
27888
|
+
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"])), SocialFragments.userEvent);
|
|
27889
|
+
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"])), SocialFragments.lightUserEvent);
|
|
27890
|
+
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"])));
|
|
27891
|
+
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"])), SocialFragments.userEvent);
|
|
27849
27892
|
var UserEventService = /** @class */ (function (_super) {
|
|
27850
27893
|
__extends(UserEventService, _super);
|
|
27851
27894
|
function UserEventService(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -28166,7 +28209,7 @@
|
|
|
28166
28209
|
};
|
|
28167
28210
|
return UserEventService;
|
|
28168
28211
|
}(BaseGraphqlService));
|
|
28169
|
-
UserEventService.ɵprov =
|
|
28212
|
+
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)); }, token: UserEventService, providedIn: "root" });
|
|
28170
28213
|
UserEventService.decorators = [
|
|
28171
28214
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
28172
28215
|
];
|
|
@@ -28178,7 +28221,7 @@
|
|
|
28178
28221
|
{ type: i1$5.ToastController },
|
|
28179
28222
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
28180
28223
|
]; };
|
|
28181
|
-
var templateObject_1$
|
|
28224
|
+
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2;
|
|
28182
28225
|
|
|
28183
28226
|
var ICONS_MAP = {
|
|
28184
28227
|
DEBUG_DATA: { matIcon: 'bug_report' },
|
|
@@ -28441,16 +28484,16 @@
|
|
|
28441
28484
|
], exports.PersonFilter);
|
|
28442
28485
|
|
|
28443
28486
|
var PersonFragments = {
|
|
28444
|
-
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 }"])))
|
|
28487
|
+
person: core.gql(templateObject_1$4 || (templateObject_1$4 = __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 }"])))
|
|
28445
28488
|
};
|
|
28446
28489
|
// Load persons query
|
|
28447
28490
|
var PersonQueries = {
|
|
28448
|
-
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),
|
|
28449
|
-
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)
|
|
28491
|
+
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),
|
|
28492
|
+
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)
|
|
28450
28493
|
};
|
|
28451
28494
|
var PersonMutations = {
|
|
28452
|
-
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),
|
|
28453
|
-
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 }"])))
|
|
28495
|
+
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),
|
|
28496
|
+
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 }"])))
|
|
28454
28497
|
};
|
|
28455
28498
|
var PersonService = /** @class */ (function (_super_1) {
|
|
28456
28499
|
__extends(PersonService, _super_1);
|
|
@@ -28574,7 +28617,7 @@
|
|
|
28574
28617
|
};
|
|
28575
28618
|
return PersonService;
|
|
28576
28619
|
}(BaseEntityService));
|
|
28577
|
-
PersonService.ɵprov =
|
|
28620
|
+
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" });
|
|
28578
28621
|
PersonService.decorators = [
|
|
28579
28622
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
28580
28623
|
];
|
|
@@ -28584,7 +28627,7 @@
|
|
|
28584
28627
|
{ type: NetworkService },
|
|
28585
28628
|
{ type: EntitiesStorage }
|
|
28586
28629
|
]; };
|
|
28587
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
28630
|
+
var templateObject_1$4, templateObject_2$4, templateObject_3$3, templateObject_4$3, templateObject_5$2;
|
|
28588
28631
|
|
|
28589
28632
|
var PersonValidatorService = /** @class */ (function () {
|
|
28590
28633
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -28607,7 +28650,7 @@
|
|
|
28607
28650
|
};
|
|
28608
28651
|
return PersonValidatorService;
|
|
28609
28652
|
}());
|
|
28610
|
-
PersonValidatorService.ɵprov =
|
|
28653
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
28611
28654
|
PersonValidatorService.decorators = [
|
|
28612
28655
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
28613
28656
|
];
|
|
@@ -28830,16 +28873,16 @@
|
|
|
28830
28873
|
];
|
|
28831
28874
|
AdminModule.ctorParameters = function () { return []; };
|
|
28832
28875
|
|
|
28833
|
-
var ɵ0 = {
|
|
28876
|
+
var ɵ0$b = {
|
|
28834
28877
|
profile: 'ADMIN'
|
|
28835
28878
|
};
|
|
28836
|
-
var routes = [
|
|
28879
|
+
var routes$1 = [
|
|
28837
28880
|
{
|
|
28838
28881
|
path: 'users',
|
|
28839
28882
|
pathMatch: 'full',
|
|
28840
28883
|
component: UsersPage,
|
|
28841
28884
|
canActivate: [AuthGuardService],
|
|
28842
|
-
data: ɵ0
|
|
28885
|
+
data: ɵ0$b
|
|
28843
28886
|
}
|
|
28844
28887
|
];
|
|
28845
28888
|
var AdminRoutingModule = /** @class */ (function () {
|
|
@@ -28852,13 +28895,13 @@
|
|
|
28852
28895
|
imports: [
|
|
28853
28896
|
SharedRoutingModule,
|
|
28854
28897
|
AdminModule,
|
|
28855
|
-
i3.RouterModule.forChild(routes)
|
|
28898
|
+
i3.RouterModule.forChild(routes$1)
|
|
28856
28899
|
],
|
|
28857
28900
|
exports: [i3.RouterModule]
|
|
28858
28901
|
},] }
|
|
28859
28902
|
];
|
|
28860
28903
|
|
|
28861
|
-
var ErrorCodes = {
|
|
28904
|
+
var ErrorCodes$2 = {
|
|
28862
28905
|
LOAD_PERSONS_ERROR: 100,
|
|
28863
28906
|
SAVE_PERSONS_ERROR: 101,
|
|
28864
28907
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -28969,7 +29012,7 @@
|
|
|
28969
29012
|
exports.EntityStore = EntityStore;
|
|
28970
29013
|
exports.EntityUtils = EntityUtils;
|
|
28971
29014
|
exports.Environment = Environment;
|
|
28972
|
-
exports.ErrorCodes = ErrorCodes;
|
|
29015
|
+
exports.ErrorCodes = ErrorCodes$2;
|
|
28973
29016
|
exports.EvenPipe = EvenPipe;
|
|
28974
29017
|
exports.FileService = FileService;
|
|
28975
29018
|
exports.FileSizePipe = FileSizePipe;
|
|
@@ -28979,7 +29022,7 @@
|
|
|
28979
29022
|
exports.FormErrorTranslatePipe = FormErrorTranslatePipe;
|
|
28980
29023
|
exports.FormErrorTranslator = FormErrorTranslator;
|
|
28981
29024
|
exports.FormFieldValuesHolder = FormFieldValuesHolder;
|
|
28982
|
-
exports.Fragments = Fragments;
|
|
29025
|
+
exports.Fragments = Fragments$1;
|
|
28983
29026
|
exports.GraphqlService = GraphqlService;
|
|
28984
29027
|
exports.HAMMER_PRESS_TIME = HAMMER_PRESS_TIME;
|
|
28985
29028
|
exports.HAMMER_TAP_TIME = HAMMER_TAP_TIME;
|
|
@@ -29231,21 +29274,21 @@
|
|
|
29231
29274
|
exports.waitForTrue = waitForTrue;
|
|
29232
29275
|
exports.waitIdle = waitIdle;
|
|
29233
29276
|
exports.waitWhilePending = waitWhilePending;
|
|
29234
|
-
exports
|
|
29235
|
-
exports
|
|
29236
|
-
exports
|
|
29237
|
-
exports
|
|
29238
|
-
exports
|
|
29239
|
-
exports
|
|
29240
|
-
exports
|
|
29241
|
-
exports
|
|
29242
|
-
exports
|
|
29243
|
-
exports
|
|
29244
|
-
exports
|
|
29245
|
-
exports
|
|
29246
|
-
exports
|
|
29277
|
+
exports.ɵ0 = ɵ0$7;
|
|
29278
|
+
exports.ɵa = CustomReuseStrategy;
|
|
29279
|
+
exports.ɵb = MatNumpadDomService;
|
|
29280
|
+
exports.ɵc = SharedMatBadgeIconModule;
|
|
29281
|
+
exports.ɵd = MatBadgeIconDirective;
|
|
29282
|
+
exports.ɵe = isFocusableElement;
|
|
29283
|
+
exports.ɵf = MatBadgeIconTestPage;
|
|
29284
|
+
exports.ɵg = RegisterForm;
|
|
29285
|
+
exports.ɵh = AccountValidatorService;
|
|
29286
|
+
exports.ɵi = RegisterModal;
|
|
29287
|
+
exports.ɵj = UserSettingsValidatorService;
|
|
29288
|
+
exports.ɵk = LocalSettingsValidatorService;
|
|
29289
|
+
exports.ɵl = AppIconComponent;
|
|
29247
29290
|
|
|
29248
29291
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
29249
29292
|
|
|
29250
|
-
}));
|
|
29293
|
+
})));
|
|
29251
29294
|
//# sourceMappingURL=sumaris-net.ngx-components.umd.js.map
|