@sumaris-net/ngx-components 1.8.1 → 1.9.2
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 +208 -197
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +5 -1
- package/esm2015/public_api.js +2 -1
- package/esm2015/src/app/admin/users/list/users.js +5 -22
- package/esm2015/src/app/core/home/home.js +3 -3
- package/esm2015/src/app/core/register/confirm/confirm.js +1 -1
- package/esm2015/src/app/core/services/account.service.js +38 -27
- package/esm2015/src/app/core/services/local-settings.service.js +18 -14
- package/esm2015/src/app/core/services/model/settings.model.js +1 -1
- package/esm2015/src/app/core/services/platform.service.js +35 -31
- package/esm2015/src/app/core/table/memory-table.class.js +2 -7
- package/esm2015/src/app/core/table/table.class.js +21 -24
- package/esm2015/src/app/shared/directives/autofocus.directive.js +15 -24
- package/esm2015/src/app/shared/platforms.js +36 -0
- package/esm2015/src/app/shared/services/progress-bar.service.js +1 -1
- package/esm2015/src/app/social/list/user-events.table.js +3 -8
- package/fesm2015/sumaris-net.ngx-components.js +162 -136
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/admin/users/list/users.d.ts +1 -12
- package/src/app/core/services/account.service.d.ts +2 -0
- package/src/app/core/services/local-settings.service.d.ts +0 -2
- package/src/app/core/services/model/settings.model.d.ts +0 -1
- package/src/app/core/services/platform.service.d.ts +8 -5
- package/src/app/core/table/memory-table.class.d.ts +0 -1
- package/src/app/core/table/table.class.d.ts +8 -10
- package/src/app/shared/directives/autofocus.directive.d.ts +4 -5
- package/src/app/shared/platforms.d.ts +13 -0
- package/src/app/social/list/user-events.table.d.ts +0 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1279,7 +1279,7 @@
|
|
|
1279
1279
|
return MatAutocompleteConfigHolder;
|
|
1280
1280
|
}());
|
|
1281
1281
|
var noop$8 = function (_) { };
|
|
1282
|
-
var ɵ0$
|
|
1282
|
+
var ɵ0$c = noop$8;
|
|
1283
1283
|
var MatAutocompleteField = /** @class */ (function () {
|
|
1284
1284
|
function MatAutocompleteField(cd, formGroupDir) {
|
|
1285
1285
|
this.cd = cd;
|
|
@@ -4469,27 +4469,56 @@
|
|
|
4469
4469
|
},] }
|
|
4470
4470
|
];
|
|
4471
4471
|
|
|
4472
|
+
/* ---
|
|
4473
|
+
* Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
|
|
4474
|
+
* --- */
|
|
4475
|
+
var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
|
|
4476
|
+
var testUserAgent = function (win, expr) {
|
|
4477
|
+
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4478
|
+
return expr.test(userAgent);
|
|
4479
|
+
};
|
|
4480
|
+
var isWindow = function (win) {
|
|
4481
|
+
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4482
|
+
return /windows/i.test(userAgent);
|
|
4483
|
+
};
|
|
4484
|
+
/**
|
|
4485
|
+
* Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
|
|
4486
|
+
* @param win
|
|
4487
|
+
*/
|
|
4488
|
+
var isDesktop = function (win) { return matchMedia(win, '(any-pointer:fine)'); };
|
|
4489
|
+
var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
|
|
4490
|
+
var isMobile = function (win) { return isTouchUi(win) && !isDesktop(win); };
|
|
4491
|
+
var isIpad = function (win) {
|
|
4492
|
+
// iOS 12 and below
|
|
4493
|
+
if (testUserAgent(win, /iPad/i)) {
|
|
4494
|
+
return true;
|
|
4495
|
+
}
|
|
4496
|
+
// iOS 13+
|
|
4497
|
+
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
|
|
4498
|
+
return true;
|
|
4499
|
+
}
|
|
4500
|
+
return false;
|
|
4501
|
+
};
|
|
4502
|
+
var ɵ0$b = isIpad;
|
|
4503
|
+
var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
|
|
4504
|
+
var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
|
|
4505
|
+
var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
|
|
4506
|
+
|
|
4472
4507
|
// Import the core angular services.
|
|
4473
4508
|
// ----------------------------------------------------------------------------------- //
|
|
4474
4509
|
// ----------------------------------------------------------------------------------- //
|
|
4475
4510
|
var BASE_TIMER_DELAY = 100;
|
|
4476
4511
|
var AutofocusDirective = /** @class */ (function () {
|
|
4477
4512
|
// I initialize the autofocus directive.
|
|
4478
|
-
function AutofocusDirective(elementRef,
|
|
4479
|
-
var _this = this;
|
|
4513
|
+
function AutofocusDirective(elementRef, keyboard) {
|
|
4480
4514
|
this.keyboard = keyboard;
|
|
4481
|
-
this.
|
|
4482
|
-
this.
|
|
4515
|
+
this._timer = null;
|
|
4516
|
+
this._elementRef = elementRef;
|
|
4483
4517
|
this.shouldFocusElement = '';
|
|
4484
|
-
this.
|
|
4518
|
+
this._timer = null;
|
|
4485
4519
|
this.timerDelay = BASE_TIMER_DELAY;
|
|
4486
|
-
|
|
4487
|
-
_this.touchUi = platform.is('mobile') || platform.is('tablet');
|
|
4488
|
-
});
|
|
4520
|
+
this._mobile = isMobile(window);
|
|
4489
4521
|
}
|
|
4490
|
-
// ---
|
|
4491
|
-
// PUBLIC METHODS.
|
|
4492
|
-
// ---
|
|
4493
4522
|
// I get called once after the contents have been fully initialized.
|
|
4494
4523
|
AutofocusDirective.prototype.ngAfterContentInit = function () {
|
|
4495
4524
|
// Because this directive can act on the stand-only "autofocus" attribute or
|
|
@@ -4524,30 +4553,27 @@
|
|
|
4524
4553
|
AutofocusDirective.prototype.ngOnDestroy = function () {
|
|
4525
4554
|
this.stopFocusWorkflow();
|
|
4526
4555
|
};
|
|
4527
|
-
|
|
4528
|
-
// PRIVATE METHODS.
|
|
4529
|
-
// ---
|
|
4556
|
+
/* --- private functions -- */
|
|
4530
4557
|
// I start the timer-based workflow that will focus the current element.
|
|
4531
4558
|
AutofocusDirective.prototype.startFocusWorkflow = function () {
|
|
4532
4559
|
var _this = this;
|
|
4533
4560
|
// if touch UI: do NOT focus when keyboard hide
|
|
4534
|
-
if (this.
|
|
4561
|
+
if (this._mobile && this.keyboard && this.keyboard.isVisible === false)
|
|
4535
4562
|
return;
|
|
4536
4563
|
// If there is already a timer running for this element, just let it play out -
|
|
4537
4564
|
// resetting it at this point will only push-out the time at which the focus is
|
|
4538
4565
|
// applied to the element.
|
|
4539
|
-
if (this.
|
|
4566
|
+
if (this._timer)
|
|
4540
4567
|
return;
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
_this.
|
|
4544
|
-
_this.elementRef.nativeElement.focus();
|
|
4568
|
+
this._timer = setTimeout(function () {
|
|
4569
|
+
_this._timer = null;
|
|
4570
|
+
_this._elementRef.nativeElement.focus();
|
|
4545
4571
|
}, this.timerDelay);
|
|
4546
4572
|
};
|
|
4547
4573
|
// I stop the timer-based workflow, preventing focus from taking place.
|
|
4548
4574
|
AutofocusDirective.prototype.stopFocusWorkflow = function () {
|
|
4549
|
-
clearTimeout(this.
|
|
4550
|
-
this.
|
|
4575
|
+
clearTimeout(this._timer);
|
|
4576
|
+
this._timer = null;
|
|
4551
4577
|
};
|
|
4552
4578
|
return AutofocusDirective;
|
|
4553
4579
|
}());
|
|
@@ -4562,7 +4588,6 @@
|
|
|
4562
4588
|
];
|
|
4563
4589
|
AutofocusDirective.ctorParameters = function () { return [
|
|
4564
4590
|
{ type: i0.ElementRef },
|
|
4565
|
-
{ type: i1$5.Platform },
|
|
4566
4591
|
{ type: ngx.Keyboard, decorators: [{ type: i0.Optional }] }
|
|
4567
4592
|
]; };
|
|
4568
4593
|
|
|
@@ -11244,7 +11269,7 @@
|
|
|
11244
11269
|
|
|
11245
11270
|
var moment$3 = momentImported__namespace;
|
|
11246
11271
|
var SETTINGS_STORAGE_KEY = 'settings';
|
|
11247
|
-
var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi'];
|
|
11272
|
+
var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
11248
11273
|
// fixme: this constant points to static environment
|
|
11249
11274
|
var DEFAULT_SETTINGS = {
|
|
11250
11275
|
accountInheritance: true,
|
|
@@ -11295,14 +11320,24 @@
|
|
|
11295
11320
|
});
|
|
11296
11321
|
Object.defineProperty(LocalSettingsService.prototype, "usageMode", {
|
|
11297
11322
|
get: function () {
|
|
11298
|
-
|
|
11323
|
+
var _a;
|
|
11324
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
|
|
11325
|
+
console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
|
|
11326
|
+
return isCordova(window) ? 'FIELD' : 'DESK';
|
|
11327
|
+
}
|
|
11328
|
+
return this._data.usageMode;
|
|
11299
11329
|
},
|
|
11300
11330
|
enumerable: false,
|
|
11301
11331
|
configurable: true
|
|
11302
11332
|
});
|
|
11303
11333
|
Object.defineProperty(LocalSettingsService.prototype, "mobile", {
|
|
11304
11334
|
get: function () {
|
|
11305
|
-
|
|
11335
|
+
var _a;
|
|
11336
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
|
|
11337
|
+
console.warn("[settings] Accessing to property 'mobile' BEFORE service started! Please use ready()");
|
|
11338
|
+
return isMobile(window);
|
|
11339
|
+
}
|
|
11340
|
+
return this._data.mobile;
|
|
11306
11341
|
},
|
|
11307
11342
|
set: function (value) {
|
|
11308
11343
|
this._data.mobile = value;
|
|
@@ -11310,16 +11345,6 @@
|
|
|
11310
11345
|
enumerable: false,
|
|
11311
11346
|
configurable: true
|
|
11312
11347
|
});
|
|
11313
|
-
Object.defineProperty(LocalSettingsService.prototype, "touchUi", {
|
|
11314
|
-
get: function () {
|
|
11315
|
-
return this._data.touchUi;
|
|
11316
|
-
},
|
|
11317
|
-
set: function (value) {
|
|
11318
|
-
this._data.touchUi = value;
|
|
11319
|
-
},
|
|
11320
|
-
enumerable: false,
|
|
11321
|
-
configurable: true
|
|
11322
|
-
});
|
|
11323
11348
|
Object.defineProperty(LocalSettingsService.prototype, "pageHistory", {
|
|
11324
11349
|
get: function () {
|
|
11325
11350
|
return (this._data && this._data.pageHistory || []);
|
|
@@ -11330,9 +11355,8 @@
|
|
|
11330
11355
|
LocalSettingsService.prototype.ngOnStart = function () {
|
|
11331
11356
|
console.info('[settings] Starting service...');
|
|
11332
11357
|
// Restoring local settings
|
|
11333
|
-
this._data.mobile =
|
|
11334
|
-
this._data.
|
|
11335
|
-
this._data.usageMode = this.platform.is('android') || this.platform.is('ios') ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOs
|
|
11358
|
+
this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);
|
|
11359
|
+
this._data.usageMode = (isAndroid(window) || isIOS(window)) ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOS
|
|
11336
11360
|
// Restoring local settings
|
|
11337
11361
|
return this.restoreLocally();
|
|
11338
11362
|
};
|
|
@@ -11345,13 +11369,13 @@
|
|
|
11345
11369
|
LocalSettingsService.prototype.restoreLocally = function () {
|
|
11346
11370
|
return __awaiter(this, void 0, void 0, function () {
|
|
11347
11371
|
var data, settingsStr, restoredData_1;
|
|
11348
|
-
return __generator(this, function (
|
|
11349
|
-
switch (
|
|
11372
|
+
return __generator(this, function (_b) {
|
|
11373
|
+
switch (_b.label) {
|
|
11350
11374
|
case 0:
|
|
11351
11375
|
data = this._data || {};
|
|
11352
11376
|
return [4 /*yield*/, this.storage.get(SETTINGS_STORAGE_KEY)];
|
|
11353
11377
|
case 1:
|
|
11354
|
-
settingsStr =
|
|
11378
|
+
settingsStr = _b.sent();
|
|
11355
11379
|
// Restore local settings (or keep old settings)
|
|
11356
11380
|
if (isNotNilOrBlank(settingsStr)) {
|
|
11357
11381
|
console.info('[settings] Restoring previous settings...');
|
|
@@ -11408,14 +11432,14 @@
|
|
|
11408
11432
|
LocalSettingsService.prototype.apply = function (settings, opts) {
|
|
11409
11433
|
return __awaiter(this, void 0, void 0, function () {
|
|
11410
11434
|
var data;
|
|
11411
|
-
return __generator(this, function (
|
|
11412
|
-
switch (
|
|
11435
|
+
return __generator(this, function (_b) {
|
|
11436
|
+
switch (_b.label) {
|
|
11413
11437
|
case 0:
|
|
11414
11438
|
if (!!this.started) return [3 /*break*/, 2];
|
|
11415
11439
|
return [4 /*yield*/, this.ready()];
|
|
11416
11440
|
case 1:
|
|
11417
|
-
|
|
11418
|
-
|
|
11441
|
+
_b.sent();
|
|
11442
|
+
_b.label = 2;
|
|
11419
11443
|
case 2:
|
|
11420
11444
|
data = Object.assign(Object.assign({}, this._data), settings);
|
|
11421
11445
|
if (equals(data, this._data))
|
|
@@ -11424,11 +11448,11 @@
|
|
|
11424
11448
|
if (!(opts && opts.persistImmediate)) return [3 /*break*/, 4];
|
|
11425
11449
|
return [4 /*yield*/, this.persistLocally(true)];
|
|
11426
11450
|
case 3:
|
|
11427
|
-
|
|
11451
|
+
_b.sent();
|
|
11428
11452
|
return [3 /*break*/, 5];
|
|
11429
11453
|
case 4:
|
|
11430
11454
|
this.persistLocally(); // No AWAIT
|
|
11431
|
-
|
|
11455
|
+
_b.label = 5;
|
|
11432
11456
|
case 5:
|
|
11433
11457
|
// Emit event
|
|
11434
11458
|
if (!opts || opts.emitEvent !== false) {
|
|
@@ -11442,14 +11466,14 @@
|
|
|
11442
11466
|
LocalSettingsService.prototype.applyProperty = function (key, value, opts) {
|
|
11443
11467
|
return __awaiter(this, void 0, void 0, function () {
|
|
11444
11468
|
var changes;
|
|
11445
|
-
return __generator(this, function (
|
|
11446
|
-
switch (
|
|
11469
|
+
return __generator(this, function (_b) {
|
|
11470
|
+
switch (_b.label) {
|
|
11447
11471
|
case 0:
|
|
11448
11472
|
changes = {};
|
|
11449
11473
|
changes[key] = value;
|
|
11450
11474
|
return [4 /*yield*/, this.apply(changes, opts)];
|
|
11451
11475
|
case 1:
|
|
11452
|
-
|
|
11476
|
+
_b.sent();
|
|
11453
11477
|
return [2 /*return*/];
|
|
11454
11478
|
}
|
|
11455
11479
|
});
|
|
@@ -11467,7 +11491,7 @@
|
|
|
11467
11491
|
LocalSettingsService.prototype.savePageSetting = function (pageId, value, propertyName) {
|
|
11468
11492
|
return __awaiter(this, void 0, void 0, function () {
|
|
11469
11493
|
var key;
|
|
11470
|
-
return __generator(this, function (
|
|
11494
|
+
return __generator(this, function (_b) {
|
|
11471
11495
|
this._data = this._data || this.defaultSettings;
|
|
11472
11496
|
this._data.pages = this._data.pages || {};
|
|
11473
11497
|
key = pageId.replace(/[/]/g, '__');
|
|
@@ -11593,8 +11617,8 @@
|
|
|
11593
11617
|
) {
|
|
11594
11618
|
return __awaiter(this, void 0, void 0, function () {
|
|
11595
11619
|
var index, existingPage, removedPages;
|
|
11596
|
-
return __generator(this, function (
|
|
11597
|
-
switch (
|
|
11620
|
+
return __generator(this, function (_b) {
|
|
11621
|
+
switch (_b.label) {
|
|
11598
11622
|
case 0:
|
|
11599
11623
|
// If not inside recursive call: fill page history defaults
|
|
11600
11624
|
if (!pageHistory)
|
|
@@ -11631,8 +11655,8 @@
|
|
|
11631
11655
|
return [4 /*yield*/, this.addToPageHistory(page, opts, existingPage.children)];
|
|
11632
11656
|
case 3:
|
|
11633
11657
|
// Add page as parent's children (recursive call)
|
|
11634
|
-
|
|
11635
|
-
|
|
11658
|
+
_b.sent();
|
|
11659
|
+
_b.label = 4;
|
|
11636
11660
|
case 4:
|
|
11637
11661
|
if (!(pageHistory === this._data.pageHistory)) return [3 /*break*/, 6];
|
|
11638
11662
|
// If max has been reached, remove old pages
|
|
@@ -11644,8 +11668,8 @@
|
|
|
11644
11668
|
return [4 /*yield*/, this.applyProperty('pageHistory', pageHistory)];
|
|
11645
11669
|
case 5:
|
|
11646
11670
|
// Apply new value
|
|
11647
|
-
|
|
11648
|
-
|
|
11671
|
+
_b.sent();
|
|
11672
|
+
_b.label = 6;
|
|
11649
11673
|
case 6: return [2 /*return*/];
|
|
11650
11674
|
}
|
|
11651
11675
|
});
|
|
@@ -11656,8 +11680,8 @@
|
|
|
11656
11680
|
return __awaiter(this, void 0, void 0, function () {
|
|
11657
11681
|
var index, found;
|
|
11658
11682
|
var _this = this;
|
|
11659
|
-
return __generator(this, function (
|
|
11660
|
-
switch (
|
|
11683
|
+
return __generator(this, function (_b) {
|
|
11684
|
+
switch (_b.label) {
|
|
11661
11685
|
case 0:
|
|
11662
11686
|
pageHistory = pageHistory || this._data.pageHistory;
|
|
11663
11687
|
index = pageHistory.findIndex(function (p) { return p.path === path; });
|
|
@@ -11679,8 +11703,8 @@
|
|
|
11679
11703
|
return [4 /*yield*/, this.applyProperty('pageHistory', this._data.pageHistory)];
|
|
11680
11704
|
case 1:
|
|
11681
11705
|
// Apply changes
|
|
11682
|
-
|
|
11683
|
-
|
|
11706
|
+
_b.sent();
|
|
11707
|
+
_b.label = 2;
|
|
11684
11708
|
case 2: return [2 /*return*/, found];
|
|
11685
11709
|
}
|
|
11686
11710
|
});
|
|
@@ -11688,14 +11712,14 @@
|
|
|
11688
11712
|
};
|
|
11689
11713
|
LocalSettingsService.prototype.clearPageHistory = function () {
|
|
11690
11714
|
return __awaiter(this, void 0, void 0, function () {
|
|
11691
|
-
return __generator(this, function (
|
|
11692
|
-
switch (
|
|
11715
|
+
return __generator(this, function (_b) {
|
|
11716
|
+
switch (_b.label) {
|
|
11693
11717
|
case 0:
|
|
11694
11718
|
// Reset all page history
|
|
11695
11719
|
return [4 /*yield*/, this.applyProperty('pageHistory', [], { persistImmediate: true })];
|
|
11696
11720
|
case 1:
|
|
11697
11721
|
// Reset all page history
|
|
11698
|
-
|
|
11722
|
+
_b.sent();
|
|
11699
11723
|
return [2 /*return*/];
|
|
11700
11724
|
}
|
|
11701
11725
|
});
|
|
@@ -15419,6 +15443,7 @@
|
|
|
15419
15443
|
_this.onChange = new rxjs.Subject();
|
|
15420
15444
|
_this.onAuthTokenChange = new rxjs.Subject();
|
|
15421
15445
|
_this.onAuthBasicChange = new rxjs.Subject();
|
|
15446
|
+
_this._stopWatching$ = new rxjs.Subject();
|
|
15422
15447
|
_this._cache = {
|
|
15423
15448
|
loaded: false,
|
|
15424
15449
|
keypair: null,
|
|
@@ -15945,6 +15970,7 @@
|
|
|
15945
15970
|
if (hadAuthBasic)
|
|
15946
15971
|
this.onAuthBasicChange.next(undefined);
|
|
15947
15972
|
this.onChange.next(undefined);
|
|
15973
|
+
this._stopWatching$.next();
|
|
15948
15974
|
return [2 /*return*/];
|
|
15949
15975
|
}
|
|
15950
15976
|
});
|
|
@@ -16104,13 +16130,18 @@
|
|
|
16104
16130
|
});
|
|
16105
16131
|
});
|
|
16106
16132
|
};
|
|
16107
|
-
AccountService.prototype.
|
|
16133
|
+
AccountService.prototype.watch = function () {
|
|
16108
16134
|
var _this = this;
|
|
16109
16135
|
if (!this._cache.pubkey)
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16136
|
+
throw new Error('Not logged in');
|
|
16137
|
+
if (!this.started) {
|
|
16138
|
+
// Wait service ready, then loop
|
|
16139
|
+
return rxjs.from(this.ready())
|
|
16140
|
+
.pipe(operators.switchMap(function () { return _this.watch(); }));
|
|
16141
|
+
}
|
|
16142
|
+
this._stopWatching$.next(); // Stop previous listening
|
|
16143
|
+
console.debug('[account] [WS] Watching changes');
|
|
16144
|
+
return this.graphql.subscribe({
|
|
16114
16145
|
query: AccountSubscriptions.listenChanges,
|
|
16115
16146
|
variables: {
|
|
16116
16147
|
interval: 10
|
|
@@ -16119,57 +16150,40 @@
|
|
|
16119
16150
|
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
16120
16151
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
16121
16152
|
}
|
|
16122
|
-
})
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16148
|
-
|
|
16149
|
-
|
|
16150
|
-
|
|
16151
|
-
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
case 2:
|
|
16155
|
-
if (!(err && +err.code === ServerErrorCodes.UNAUTHORIZED)) return [3 /*break*/, 4];
|
|
16156
|
-
console.info('[account] Account not authorized: force user to logout...', err);
|
|
16157
|
-
return [4 /*yield*/, self.logout()];
|
|
16158
|
-
case 3:
|
|
16159
|
-
_b.sent();
|
|
16160
|
-
return [3 /*break*/, 5];
|
|
16161
|
-
case 4:
|
|
16162
|
-
console.warn('[account] [WS] Received error:', err);
|
|
16163
|
-
_b.label = 5;
|
|
16164
|
-
case 5: return [2 /*return*/];
|
|
16165
|
-
}
|
|
16166
|
-
});
|
|
16167
|
-
}); },
|
|
16168
|
-
complete: function () {
|
|
16169
|
-
console.debug('[account] [WS] Completed');
|
|
16153
|
+
})
|
|
16154
|
+
.pipe(
|
|
16155
|
+
// Stop this pipe next time we call watch()
|
|
16156
|
+
operators.takeUntil(this._stopWatching$), operators.map(function (_b) {
|
|
16157
|
+
var data = _b.data;
|
|
16158
|
+
var _a;
|
|
16159
|
+
if (!data)
|
|
16160
|
+
return;
|
|
16161
|
+
var existingUpdateDate = toDateISOString((_a = _this._data) === null || _a === void 0 ? void 0 : _a.updateDate);
|
|
16162
|
+
if (existingUpdateDate === data.updateDate)
|
|
16163
|
+
return;
|
|
16164
|
+
console.debug("[account] [WS] Detected update on {" + data.updateDate + "}");
|
|
16165
|
+
return exports.Account.fromObject(data);
|
|
16166
|
+
}), operators.filter(isNotNil));
|
|
16167
|
+
};
|
|
16168
|
+
AccountService.prototype.listenChanges = function () {
|
|
16169
|
+
var self = this;
|
|
16170
|
+
var subscription = this.watch()
|
|
16171
|
+
.subscribe({
|
|
16172
|
+
next: function (data) { return self.refresh(); },
|
|
16173
|
+
error: function (err) {
|
|
16174
|
+
if (err && +err.code === ServerErrorCodes.NOT_FOUND) {
|
|
16175
|
+
console.info('[account] Account not exists anymore: force user to logout...', err);
|
|
16176
|
+
self.logout();
|
|
16177
|
+
}
|
|
16178
|
+
else if (err && +err.code === ServerErrorCodes.UNAUTHORIZED) {
|
|
16179
|
+
console.info('[account] Account not authorized: force user to logout...', err);
|
|
16180
|
+
self.logout();
|
|
16181
|
+
}
|
|
16182
|
+
else {
|
|
16183
|
+
console.warn('[account] [WS] Received error:', err);
|
|
16184
|
+
}
|
|
16170
16185
|
}
|
|
16171
16186
|
});
|
|
16172
|
-
// Add log when closing WS
|
|
16173
16187
|
subscription.add(function () { return console.debug('[account] [WS] Stop listening changes'); });
|
|
16174
16188
|
return subscription;
|
|
16175
16189
|
};
|
|
@@ -17303,29 +17317,44 @@
|
|
|
17303
17317
|
console.debug('[platform] Creating service');
|
|
17304
17318
|
return _this;
|
|
17305
17319
|
}
|
|
17320
|
+
PlatformService.prototype.is = function (platformName) {
|
|
17321
|
+
switch (platformName) {
|
|
17322
|
+
case 'mobile':
|
|
17323
|
+
// Use custom mobile detection - see SUMARIS issue #323
|
|
17324
|
+
return isMobile(window);
|
|
17325
|
+
default:
|
|
17326
|
+
return this.platform.is(platformName);
|
|
17327
|
+
}
|
|
17328
|
+
};
|
|
17306
17329
|
Object.defineProperty(PlatformService.prototype, "mobile", {
|
|
17307
17330
|
get: function () {
|
|
17308
|
-
return isNotNil(this._mobile) ? this._mobile :
|
|
17331
|
+
return isNotNil(this._mobile) ? this._mobile : isMobile(window);
|
|
17309
17332
|
},
|
|
17310
17333
|
enumerable: false,
|
|
17311
17334
|
configurable: true
|
|
17312
17335
|
});
|
|
17313
|
-
PlatformService.prototype.is = function (platformName) {
|
|
17314
|
-
return this.platform.is(platformName);
|
|
17315
|
-
};
|
|
17316
17336
|
/**
|
|
17317
|
-
* Say if opened has been opened
|
|
17337
|
+
* Say if opened has been opened inside an Android or iOs App.
|
|
17318
17338
|
* This is used to known if there is cordova features
|
|
17319
17339
|
*/
|
|
17320
|
-
PlatformService.prototype.
|
|
17321
|
-
return
|
|
17340
|
+
PlatformService.prototype.isCordova = function () {
|
|
17341
|
+
return this._cordova;
|
|
17322
17342
|
};
|
|
17323
17343
|
PlatformService.prototype.isAndroidCordova = function () {
|
|
17324
17344
|
return this._android && this._cordova || false;
|
|
17325
17345
|
};
|
|
17346
|
+
PlatformService.prototype.isIOSCordova = function () {
|
|
17347
|
+
return this._ios && this._cordova || false;
|
|
17348
|
+
};
|
|
17349
|
+
PlatformService.prototype.isWeb = function () {
|
|
17350
|
+
return !this._cordova || (!this._android && !this._ios);
|
|
17351
|
+
};
|
|
17352
|
+
PlatformService.prototype.isApp = function () {
|
|
17353
|
+
return this._cordova && (this._android || this._ios);
|
|
17354
|
+
};
|
|
17326
17355
|
Object.defineProperty(PlatformService.prototype, "canDownload", {
|
|
17327
17356
|
get: function () {
|
|
17328
|
-
return this.
|
|
17357
|
+
return !!this.downloader && this.isAndroidCordova();
|
|
17329
17358
|
},
|
|
17330
17359
|
enumerable: false,
|
|
17331
17360
|
configurable: true
|
|
@@ -17356,16 +17385,13 @@
|
|
|
17356
17385
|
_b.label = 1;
|
|
17357
17386
|
case 1:
|
|
17358
17387
|
_b.trys.push([1, 6, , 7]);
|
|
17359
|
-
this._mobile = this.
|
|
17360
|
-
this._cordova = this.
|
|
17361
|
-
this._android = this.
|
|
17362
|
-
this.
|
|
17363
|
-
this.
|
|
17364
|
-
// Force
|
|
17365
|
-
|
|
17366
|
-
this.settings.mobile = this._mobile;
|
|
17367
|
-
this.settings.touchUi = this.touchUi;
|
|
17368
|
-
}
|
|
17388
|
+
this._mobile = this.is('mobile');
|
|
17389
|
+
this._cordova = this.is('cordova');
|
|
17390
|
+
this._android = this.is('android');
|
|
17391
|
+
this._ios = this.is('ios');
|
|
17392
|
+
this.configureCordovaPlugins();
|
|
17393
|
+
// Force some settings
|
|
17394
|
+
this.settings.mobile = this._mobile;
|
|
17369
17395
|
// Configure translation
|
|
17370
17396
|
return [4 /*yield*/, this.configureTranslate()];
|
|
17371
17397
|
case 2:
|
|
@@ -17388,7 +17414,7 @@
|
|
|
17388
17414
|
case 5:
|
|
17389
17415
|
// Start root services
|
|
17390
17416
|
_b.sent();
|
|
17391
|
-
console.info("[platform] Starting platform [OK] {mobile: " + this._mobile + ",
|
|
17417
|
+
console.info("[platform] Starting platform [OK] {mobile: " + this._mobile + ", downloader: " + this.canDownload + ", fileOpener: " + this.canOpenFile + "} in " + (Date.now() - now) + "ms");
|
|
17392
17418
|
// Update cache configuration when network changed
|
|
17393
17419
|
this.networkService.onNetworkStatusChanges
|
|
17394
17420
|
.pipe(operators.skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
@@ -17400,7 +17426,7 @@
|
|
|
17400
17426
|
console.info("[platform] Using auth token type {" + tokenType + "}");
|
|
17401
17427
|
_this.accountService.tokenType = tokenType;
|
|
17402
17428
|
});
|
|
17403
|
-
// Hide the splashscreen (if mobile) - after 1s
|
|
17429
|
+
// Hide the splashscreen (if mobile) - after 1s - and play start sound
|
|
17404
17430
|
if (this.mobile) {
|
|
17405
17431
|
setTimeout(function () {
|
|
17406
17432
|
var _a;
|
|
@@ -17479,7 +17505,7 @@
|
|
|
17479
17505
|
//}
|
|
17480
17506
|
};
|
|
17481
17507
|
/* -- protected methods -- */
|
|
17482
|
-
PlatformService.prototype.configureCordovaPlugins = function (
|
|
17508
|
+
PlatformService.prototype.configureCordovaPlugins = function () {
|
|
17483
17509
|
console.info('[platform] Configuring Cordova plugins...');
|
|
17484
17510
|
if (this.statusBar) {
|
|
17485
17511
|
this.statusBar.styleDefault();
|
|
@@ -17488,15 +17514,6 @@
|
|
|
17488
17514
|
if (this.keyboard) {
|
|
17489
17515
|
this.keyboard.hideFormAccessoryBar(true);
|
|
17490
17516
|
}
|
|
17491
|
-
// Force to use InAppBrowser instead of default window.open()
|
|
17492
|
-
if (this.browser) {
|
|
17493
|
-
// FIXME: this create a infinite loop (e.g. when downloading an extraction file)
|
|
17494
|
-
// window.open = (url?: string, target?: string, features?: string, replace?: boolean) => {
|
|
17495
|
-
// console.debug("[platform] Call to window.open() redirected to InAppBrowser.open()");
|
|
17496
|
-
// this.browser.create(url, target, features).show();
|
|
17497
|
-
// return window;
|
|
17498
|
-
// };
|
|
17499
|
-
}
|
|
17500
17517
|
};
|
|
17501
17518
|
PlatformService.prototype.configureTranslate = function () {
|
|
17502
17519
|
var _this = this;
|
|
@@ -20714,7 +20731,7 @@
|
|
|
20714
20731
|
this.appName = config.label || this.environment.defaultAppName || 'SUMARiS';
|
|
20715
20732
|
this.logo = config.largeLogo || config.smallLogo || undefined;
|
|
20716
20733
|
this.description = config.name;
|
|
20717
|
-
this.isWeb = this.platform.
|
|
20734
|
+
this.isWeb = this.platform.isWeb();
|
|
20718
20735
|
this.canRegister = config.getPropertyAsBoolean(CORE_CONFIG_OPTIONS.REGISTRATION_ENABLE);
|
|
20719
20736
|
var partners = (config.partners || []).filter(function (p) { return p && p.logo; });
|
|
20720
20737
|
this.$partners.next(partners);
|
|
@@ -20806,7 +20823,7 @@
|
|
|
20806
20823
|
template: "<app-toolbar [canGoBack]=\"false\"\n visible-xs visible-sm visible-mobile>\n\n <!-- change locale button -->\n <ion-button slot=\"end\" *ngIf=\"currentLocaleCode; let code\"\n [matMenuTriggerFor]=\"localeMenu\">\n <ion-label class=\"ion-text-uppercase\"> {{ code }}</ion-label>\n <mat-icon slot=\"end\">arrow_drop_down</mat-icon>\n </ion-button>\n</app-toolbar>\n\n<!-- change locale menu -->\n<mat-menu #localeMenu=\"matMenu\">\n <button *ngFor=\"let item of locales\"\n mat-menu-item\n (click)=\"changeLanguage(item.key)\">\n <ion-label>{{item.value}}</ion-label>\n </button>\n</mat-menu>\n\n<ion-content [ngStyle]=\"contentStyle\" no-padding-xs>\n\n <!-- loading spinner -->\n <div class=\"loading-page\" [class.cdk-visually-hidden]=\"!loading\">\n <div class=\"spinner\" *ngIf=\"loading && showSpinner\">\n <p>Loading...</p>\n <div class=\"sk-cube1 sk-cube\"></div>\n <div class=\"sk-cube2 sk-cube\"></div>\n <div class=\"sk-cube4 sk-cube\"></div>\n <div class=\"sk-cube3 sk-cube\"></div>\n </div>\n </div>\n\n <!-- Desktop: translucent top toolbar -->\n <div hidden-xs hidden-sm hidden-mobile>\n <ion-toolbar translucent>\n <ion-buttons slot=\"start\">\n <ion-menu-toggle>\n <ion-button color=\"light\" fill=\"clear\">\n <ion-icon slot=\"icon-only\" name=\"menu\"></ion-icon>\n </ion-button>\n </ion-menu-toggle>\n </ion-buttons>\n\n <ion-buttons slot=\"end\">\n <!-- change locale button -->\n <ion-button color=\"secondary\" fill=\"solid\"\n *ngIf=\"currentLocaleCode; let code\"\n [matMenuTriggerFor]=\"localeMenu\">\n <ion-label class=\"ion-text-uppercase\"> {{ code }}</ion-label>\n <mat-icon slot=\"end\">arrow_drop_down</mat-icon>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n </div>\n\n <!-- Install (and upgrade) card -->\n <app-install-upgrade-card [isLogin]=\"isLogin\"\n showInstallButton=\"true\">\n </app-install-upgrade-card>\n\n <!-- Welcome card -->\n <ion-card *ngIf=\"!loading\"\n class=\"main welcome ion-padding ion-text-center ion-align-self-center\"\n @fadeInAnimation>\n <ion-card-header>\n <ion-card-title class=\"ion-text-center\">\n <span *ngIf=\"isWeb\" [innerHTML]=\"'HOME.WELCOME_WEB'|translate: {appName: appName}\"></span>\n <span *ngIf=\"!isWeb\" [innerHTML]=\"'HOME.WELCOME_APP'|translate: {appName: appName}\"></span>\n </ion-card-title>\n <ion-card-subtitle [innerHTML]=\"description\">\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content class=\"ion-no-padding\">\n <ion-text color=\"primary\">\n <img class=\"logo\" *ngIf=\"logo\" src=\"{{ logo }}\">\n </ion-text>\n <!-- register help text -->\n <ion-text *ngIf=\"!isLogin && canRegister\">\n <br/>\n <span translate>HOME.REGISTER_HELP</span>\n </ion-text>\n </ion-card-content>\n\n <ion-footer class=\"ion-padding-top\">\n\n <!-- If NOT login -->\n <ng-container *ngIf=\"!isLogin; else loginButtons;\">\n\n <ion-button *ngIf=\"canRegister\" expand=\"block\" color=\"tertiary\" (click)=\"register()\">\n <span translate>HOME.BTN_REGISTER</span>\n </ion-button>\n <ion-button expand=\"block\" color=\"light\" [routerLink]=\"['/']\" (click)=\"login()\">\n <span translate>AUTH.BTN_LOGIN</span>\n </ion-button>\n\n </ng-container>\n\n <!-- If user login -->\n <ng-template #loginButtons>\n\n <!-- Feature buttons -->\n <ng-container *ngIf=\"$filteredButtons | async as buttons\">\n <ng-container *ngFor=\"let item of buttons\">\n <ion-button *ngIf=\"item.path\"\n expand=\"block\" color=\"tertiary\"\n [class]=\"item.cssClass\"\n [routerLink]=\"item.path\"\n routerDirection=\"root\">\n <ion-icon slot=\"start\" class=\"ion-float-start\" *ngIf=\"item.icon\" [name]=\"item.icon\"></ion-icon>\n <mat-icon slot=\"start\" class=\"ion-float-start\" *ngIf=\"item.matIcon\">{{item.matIcon}}</mat-icon>\n <ion-text>{{'HOME.BTN_DATA_ENTRY'|translate: {name: (item.title | translate) } }}</ion-text>\n </ion-button>\n\n <!-- divider -->\n <div *ngIf=\"!item.path && !item.action\" [class]=\"item.cssClass\">\n <ion-label translate>{{item.title}} </ion-label>\n </div>\n </ng-container>\n\n <!--<p *ngIf=\"buttons.length\" class=\"visible-mobile\"> </p>-->\n </ng-container>\n\n <ion-button expand=\"block\" color=\"secondary\" [routerLink]=\"['/account']\">\n <ion-icon slot=\"start\" class=\"ion-float-start\" name=\"person-circle\"></ion-icon>\n <ion-text translate>HOME.BTN_MY_ACCOUNT</ion-text>\n </ion-button>\n\n <p hidden-xs hidden-sm hidden-mobile>\n <ion-text [innerHTML]=\"'HOME.NOT_THIS_ACCOUNT_QUESTION' | translate: {displayName: accountName }\"></ion-text>\n <br/>\n <ion-text>\n <a href=\"#\" (click)=\"logout($event)\">\n <span translate>HOME.BTN_DISCONNECT</span>\n </a>\n </ion-text>\n </p>\n\n\n </ng-template>\n\n </ion-footer>\n </ion-card>\n\n <!-- Page history -->\n <ion-grid *ngIf=\"!loading && isLogin && pageHistory.length; else bottomBanner\"\n class=\"history-container ion-align-self-center\">\n <ion-row>\n <ion-col size=\"12\" size-xl=\"\" *ngFor=\"let page of pageHistory; trackBy: getPagePath\"\n class=\"ion-text-center\">\n <ion-card class=\"ion-align-self-start ion-text-start\" @fadeInAnimation>\n <ion-card-header class=\"ion-no-padding\">\n <!-- top bar -->\n <ion-card-subtitle>\n <button type=\"button\" tabindex=\"-1\"\n (click)=\"settings.removePageHistory(page.path)\"\n mat-icon-button class=\"ion-float-start ion-no-margin\">\n <mat-icon>close</mat-icon>\n </button>\n <ion-label [innerHTML]=\"page.subtitle|translate\"></ion-label>\n <ion-text class=\"ion-float-end\" [title]=\"page.time|dateFormat:{time: true}\">\n <small><ion-icon name=\"time-outline\"></ion-icon> {{ page.time|dateFromNow }}</small> \n </ion-text>\n </ion-card-subtitle>\n\n <!-- main page -->\n <ion-card-title class=\"ion-no-margin ion-no-padding\">\n <ion-item detail=\"true\"\n tappable class=\"text-1x\"\n [routerLink]=\"page.path\"\n routerDirection=\"root\" lines=\"none\">\n <!-- page icon-->\n <ion-icon *ngIf=\"page.icon\" slot=\"start\" [name]=\"page.icon\"></ion-icon>\n <mat-icon *ngIf=\"page.matIcon\" slot=\"start\">{{page.matIcon}}</mat-icon>\n\n <ion-label color=\"primary\" [innerHTML]=\"page.title\"></ion-label>\n </ion-item>\n </ion-card-title>\n </ion-card-header>\n\n <!-- children pages -->\n <ion-card-content class=\"ion-no-padding ion-padding-start\" *ngIf=\"page.children?.length\">\n <ion-list class=\"ion-no-padding\">\n <ion-item detail=\"true\"\n *ngFor=\"let childPage of page.children\"\n tappable class=\"text-1x\"\n [routerLink]=\"childPage.path\"\n routerDirection=\"root\">\n <!-- page icon-->\n <ion-icon *ngIf=\"childPage.icon\" slot=\"start\" color=\"dark\" [name]=\"childPage.icon\"></ion-icon>\n <mat-icon *ngIf=\"childPage.matIcon\" slot=\"start\" color=\"dark\">{{childPage.matIcon}}</mat-icon>\n\n <ion-label color=\"dark\" [innerHTML]=\"childPage.title\"></ion-label>\n </ion-item>\n </ion-list>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n <!-- Display configured Departments logos -->\n <ng-template #bottomBanner>\n <div class=\"bottom-banner ion-text-center ion-padding\" *ngIf=\"!loadingBanner\" @fadeInAnimation>\n <a href=\"{{ item.siteUrl }}\" *ngFor=\"let item of $partners | async \">\n <img class=\"logo\" src=\"{{ item.logo }}\" alt=\"{{item.label}}\" [title]=\"item.label\" />\n </a>\n </div>\n </ng-template>\n\n\n</ion-content>\n",
|
|
20807
20824
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
20808
20825
|
animations: [fadeInAnimation, slideUpDownAnimation],
|
|
20809
|
-
styles: ["h1,h2,h3,h4,h5{white-space:normal}.center,ion-content ion-card.welcome img{text-align:center;display:inline-block}ion-content{--background:transparent;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;display:inline-block;padding:15px}ion-content,ion-content .loading-page{background-color:var(--ion-color-primary)}ion-content .loading-page{display:block;height:100%;width:100%;position:absolute;z-index:5;transition:background .5s linear;-webkit-transition:background 1.5s linear}ion-content .loading-page.hidden{background-color:rgba(var(--ion-color-primary),0)}ion-content ion-card{z-index:9}ion-content ion-card ion-card-header{display:block}ion-content ion-card ion-card-header ion-card-subtitle,ion-content ion-card ion-card-header ion-card-title{display:block;width:100%}ion-content ion-card.main{min-width:240px;max-width:400px;margin-left:auto;margin-right:auto}ion-content ion-card.welcome{background-color:hsla(0,0%,100%,.7)}ion-content ion-card.welcome button{margin-top:16px}ion-content ion-card.welcome img{max-width:250px}ion-content .history-container{margin-left:auto;margin-right:auto}ion-content .history-container ion-card{display:inline-block;box-sizing:border-box;z-index:8;min-width:240px;max-width:400px;width:100%;margin-left:auto;margin-right:auto;background-color:hsla(0,0%,100%,.7)}ion-content .history-container ion-card ion-card-header ion-card-subtitle{height:40px}ion-content .history-container ion-card ion-card-header ion-card-subtitle button[float-start]{z-index:99;margin:0}ion-content .history-container ion-card ion-card-header ion-card-subtitle ion-label{line-height:40px}ion-content .history-container ion-card ion-card-header ion-card-subtitle ion-label[float-end]{padding-right:16px;font-weight:400}ion-content .history-container ion-card ion-card-header ion-card-title ion-item{--ion-item-background:$transparent;--ion-item-icon-color:var(--ion-color-primary);--ion-item-text-color:var(--ion-color-primary)}ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-icon[slot=start],ion-content .history-container ion-card ion-card-header ion-card-title ion-item mat-icon[slot=start]{margin-right:unset;-webkit-margin-end:16px!important;margin-inline-end:16px!important;color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor}ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-label,ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-text{color:var(--ion-item-text-color)!important;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}ion-content .history-container ion-card ion-card-content ion-list{--ion-item-background:var(--ion-color-transparent)}ion-content .history-container ion-card ion-card-content ion-list ion-item{--ion-item-icon-color:var(--ion-color-dark);--ion-item-text-color:var(--ion-color-dark)}ion-content .history-container ion-card ion-card-content ion-list ion-item ion-icon[slot=start],ion-content .history-container ion-card ion-card-content ion-list ion-item mat-icon[slot=start]{color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor;margin-right:unset;-webkit-margin-end:16px!important;margin-inline-end:16px!important}ion-content .history-container ion-card ion-card-content ion-list ion-item ion-label,ion-content .history-container ion-card ion-card-content ion-list ion-item ion-text{color:var(--ion-item-text-color)!important}ion-content .bottom-banner{background-color:hsla(0,0%,100%,.7);min-width:240px;z-index:0;position:absolute;left:16px;right:16px;bottom:16px}ion-content .bottom-banner img.logo{max-height:50px;margin-left:8px}ion-content ion-text{text-align:center}@media screen and (max-width:575px){ion-content ion-card{min-width:160px;width:calc(100% - 20px);max-width:100%;margin-left:10px;margin-right:10px}ion-content ion-card h1{margin-top:0;font-size:20px}ion-content ion-card button{margin-top:8px}ion-content .bottom-banner{display:block;position:unset}ion-content .bottom-banner img.logo{max-height:30px}}@media screen and (max-width:767px) and (min-width:576px){ion-content{min-height:555px}ion-content .bottom-banner img.logo{max-height:40px}}@media screen and (min-width:768px){ion-content{min-height:calc(100% - 100px)}}"]
|
|
20826
|
+
styles: ["h1,h2,h3,h4,h5{white-space:normal}.center,ion-content ion-card.welcome img{text-align:center;display:inline-block}ion-content{--background:transparent;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;display:inline-block;padding:15px}ion-content,ion-content .loading-page{background-color:var(--ion-color-primary)}ion-content .loading-page{display:block;height:100%;width:100%;position:absolute;z-index:5;transition:background .5s linear;-webkit-transition:background 1.5s linear}ion-content .loading-page.hidden{background-color:rgba(var(--ion-color-primary),0)}ion-content ion-card{z-index:9}ion-content ion-card ion-card-header{display:block}ion-content ion-card ion-card-header ion-card-subtitle,ion-content ion-card ion-card-header ion-card-title{display:block;width:100%}ion-content ion-card.main{min-width:240px;max-width:400px;margin-left:auto;margin-right:auto}ion-content ion-card.welcome{background-color:hsla(0,0%,100%,.7)}ion-content ion-card.welcome button{margin-top:16px}ion-content ion-card.welcome img{max-width:250px}ion-content .history-container{margin-left:auto;margin-right:auto}ion-content .history-container ion-card{display:inline-block;box-sizing:border-box;z-index:8;min-width:240px;max-width:400px;width:100%;margin-left:auto;margin-right:auto;background-color:hsla(0,0%,100%,.7)}ion-content .history-container ion-card ion-card-header ion-card-subtitle{height:40px}ion-content .history-container ion-card ion-card-header ion-card-subtitle button[float-start]{z-index:99;margin:0}ion-content .history-container ion-card ion-card-header ion-card-subtitle ion-label{line-height:40px}ion-content .history-container ion-card ion-card-header ion-card-subtitle ion-label[float-end]{padding-right:16px;font-weight:400}ion-content .history-container ion-card ion-card-header ion-card-title ion-item{--ion-item-background:$transparent;--ion-item-icon-color:var(--ion-color-primary);--ion-item-text-color:var(--ion-color-primary)}ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-icon[slot=start],ion-content .history-container ion-card ion-card-header ion-card-title ion-item mat-icon[slot=start]{margin-right:unset;-webkit-margin-end:16px!important;margin-inline-end:16px!important;color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor}ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-label,ion-content .history-container ion-card ion-card-header ion-card-title ion-item ion-text{color:var(--ion-item-text-color)!important;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}ion-content .history-container ion-card ion-card-content ion-list{--ion-item-background:var(--ion-color-transparent)}ion-content .history-container ion-card ion-card-content ion-list ion-item{--ion-item-icon-color:var(--ion-color-dark);--ion-item-text-color:var(--ion-color-dark)}ion-content .history-container ion-card ion-card-content ion-list ion-item ion-icon[slot=start],ion-content .history-container ion-card ion-card-content ion-list ion-item mat-icon[slot=start]{color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor;margin-right:unset;-webkit-margin-end:16px!important;margin-inline-end:16px!important}ion-content .history-container ion-card ion-card-content ion-list ion-item ion-label,ion-content .history-container ion-card ion-card-content ion-list ion-item ion-text{color:var(--ion-item-text-color)!important}ion-content .bottom-banner{background-color:hsla(0,0%,100%,.7);min-width:240px;z-index:0;position:absolute;left:16px;right:16px;bottom:16px}ion-content .bottom-banner img.logo{max-height:50px;margin-left:8px}ion-content ion-text{text-align:center}@media screen and (max-width:575px){ion-content ion-card{min-width:160px;width:calc(100% - 20px);max-width:100%;margin-left:10px;margin-right:10px}ion-content ion-card h1{margin-top:0;font-size:20px}ion-content ion-card ion-card-content ion-button{margin-top:8px}ion-content .bottom-banner{display:block;position:unset}ion-content .bottom-banner img.logo{max-height:30px}}@media screen and (max-width:767px) and (min-width:576px){ion-content{min-height:555px}ion-content .bottom-banner img.logo{max-height:40px}}@media screen and (min-width:768px){ion-content{min-height:calc(100% - 100px)}}"]
|
|
20810
20827
|
},] }
|
|
20811
20828
|
];
|
|
20812
20829
|
HomePage.ctorParameters = function () { return [
|
|
@@ -20909,7 +20926,7 @@
|
|
|
20909
20926
|
{ type: i0.Component, args: [{
|
|
20910
20927
|
selector: 'page-register-confirm',
|
|
20911
20928
|
template: "<app-toolbar [title]=\"'REGISTER.CONFIRMED.TITLE'|translate\" color=\"primary\">\n</app-toolbar>\n\n\n<ion-content class=\"bg-image-cover center ion-padding\" [ngStyle]=\"contentStyle\">\n\n <p class=\"hidden-xs ion-padding\"> <br /><br /></p>\n <p class=\"hidden-xs\"> </p>\n\n\n <ion-card>\n <ion-card-content>\n\n <div>\n <ng-container *ngIf=\"loading\">\n <h4 translate>REGISTER.CONFIRMED.LOADING</h4>\n <p><ion-spinner></ion-spinner></p>\n </ng-container>\n\n <!-- error -->\n <ion-item *ngIf=\"!loading && error\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n </div>\n\n <div *ngIf=\"!loading && !error\">\n <h3>\n <ion-icon name=\"checkmark\"></ion-icon>\n <b translate>REGISTER.CONFIRMED.SUB_TITLE</b>\n </h3>\n\n <ion-text>\n <p [innerHTML]=\"'REGISTER.CONFIRMED.SUCCESS'|translate: {email: email}\"></p>\n <p *ngIf=\"!isLogin\" [innerHTML]=\"'REGISTER.CONFIRMED.LOGIN_HELP'|translate\"></p>\n </ion-text>\n\n </div>\n\n </ion-card-content>\n\n <ion-footer *ngIf=\"!loading\">\n <ion-button expand=\"full\" color=\"primary\" [routerLink]=\"['/account']\" *ngIf=\"!isLogin\">\n <ion-icon name=\"log-in\" slot=\"start\"></ion-icon>\n <span translate>AUTH.BTN_LOGIN</span>\n </ion-button>\n\n <ion-button expand=\"full\" color=\"secondary\" [routerLink]=\"['/account']\" *ngIf=\"isLogin\">\n <ion-icon name=\"contact\" slot=\"start\"></ion-icon>\n <span translate>HOME.BTN_MY_ACCOUNT</span>\n </ion-button>\n </ion-footer>\n </ion-card>\n\n</ion-content>\n",
|
|
20912
|
-
styles: ["h1,h2,h3,h4,h5{white-space:normal}.bottom-banner,.center,ion-card,ion-card img,ion-content,ion-text{text-align:center;display:inline-block}ion-content{--ion-background-color:transparent;background-size:cover;display:inline-block;padding:15px}ion-card{padding:var(--ion-padding);background-color:hsla(0,0%,100%,.7);min-width:240px;max-width:400px;z-index:9}ion-card button{margin-top:16px}ion-card img{max-width:250px}.bottom-banner{padding:var(--ion-padding);background-color:hsla(0,0%,100%,.7);min-width:240px;z-index:0}.bottom-banner img.logo{max-height:50px;margin-left:8px}@media screen and (max-width:575px){ion-content ion-card{min-width:160px;width:auto;max-width:260px}ion-content ion-card img{max-width:100px;margin-left:8px}ion-content ion-card button{margin-top:8px}.bottom-banner img.logo{max-height:30px}}@media screen and (max-width:767px) and (min-width:576px){ion-content{min-height:555px}.bottom-banner img.logo{max-height:40px}}@media screen and (min-width:768px){ion-content{min-height:606px}.main-content{padding-bottom:0}.bottom-banner{position:absolute;bottom:16px;left:16px;right:16px}}"]
|
|
20929
|
+
styles: ["h1,h2,h3,h4,h5{white-space:normal}.bottom-banner,.center,ion-card,ion-card img,ion-content,ion-text{text-align:center;display:inline-block}ion-content{--ion-background-color:transparent;background-size:cover;display:inline-block;padding:15px}ion-card{padding:var(--ion-padding);background-color:hsla(0,0%,100%,.7);min-width:240px;max-width:400px;z-index:9}ion-card button{margin-top:16px}ion-card img{max-width:250px}.bottom-banner{padding:var(--ion-padding);background-color:hsla(0,0%,100%,.7);min-width:240px;z-index:0}.bottom-banner img.logo{max-height:50px;margin-left:8px}@media screen and (max-width:575px){ion-content ion-card{min-width:160px;width:auto;max-width:260px}ion-content ion-card img{max-width:100px;margin-left:8px}ion-content ion-card ion-footer ion-button{margin-top:8px}.bottom-banner img.logo{max-height:30px}}@media screen and (max-width:767px) and (min-width:576px){ion-content{min-height:555px}.bottom-banner img.logo{max-height:40px}}@media screen and (min-width:768px){ion-content{min-height:606px}.main-content{padding-bottom:0}.bottom-banner{position:absolute;bottom:16px;left:16px;right:16px}}"]
|
|
20913
20930
|
},] }
|
|
20914
20931
|
];
|
|
20915
20932
|
RegisterConfirmPage.ctorParameters = function () { return [
|
|
@@ -24599,13 +24616,8 @@
|
|
|
24599
24616
|
// @dynamic
|
|
24600
24617
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
24601
24618
|
var AppTable = /** @class */ (function () {
|
|
24602
|
-
function AppTable(
|
|
24603
|
-
|
|
24604
|
-
this.router = router;
|
|
24605
|
-
this.platform = platform;
|
|
24606
|
-
this.location = location;
|
|
24607
|
-
this.modalCtrl = modalCtrl;
|
|
24608
|
-
this.settings = settings;
|
|
24619
|
+
function AppTable(injector, columns, _dataSource, _filter) {
|
|
24620
|
+
var _this = this;
|
|
24609
24621
|
this.columns = columns;
|
|
24610
24622
|
this._dataSource = _dataSource;
|
|
24611
24623
|
this._filter = _filter;
|
|
@@ -24648,13 +24660,19 @@
|
|
|
24648
24660
|
this.onDirty = new i0.EventEmitter();
|
|
24649
24661
|
this.onError = new i0.EventEmitter();
|
|
24650
24662
|
this._paginator = null;
|
|
24651
|
-
this.
|
|
24652
|
-
this.
|
|
24653
|
-
this.
|
|
24654
|
-
this.
|
|
24655
|
-
this.
|
|
24663
|
+
this.route = injector.get(i3.ActivatedRoute);
|
|
24664
|
+
this.router = injector.get(i3.Router);
|
|
24665
|
+
this.location = injector.get(i1$4.Location);
|
|
24666
|
+
this.settings = injector.get(LocalSettingsService);
|
|
24667
|
+
this.translate = injector.get(i1$2.TranslateService);
|
|
24668
|
+
this.modalCtrl = injector.get(i1$5.ModalController);
|
|
24669
|
+
this.alertCtrl = injector.get(i1$5.AlertController);
|
|
24670
|
+
this.toastController = injector.get(i1$5.ToastController);
|
|
24671
|
+
this.formErrorAdapter = injector.get(FormErrorTranslator);
|
|
24672
|
+
this.mobile = this.settings.mobile;
|
|
24673
|
+
// Autocomplete fields
|
|
24656
24674
|
this._autocompleteConfigHolder = new MatAutocompleteConfigHolder({
|
|
24657
|
-
getUserAttributes: function (a, b) { return settings.getFieldDisplayAttributes(a, b); }
|
|
24675
|
+
getUserAttributes: function (a, b) { return _this.settings.getFieldDisplayAttributes(a, b); }
|
|
24658
24676
|
});
|
|
24659
24677
|
this.autocompleteFields = this._autocompleteConfigHolder.fields;
|
|
24660
24678
|
}
|
|
@@ -26092,9 +26110,12 @@
|
|
|
26092
26110
|
return (this.i18nColumnPrefix || '') + changeCaseToUnderscore(columnName).toUpperCase();
|
|
26093
26111
|
};
|
|
26094
26112
|
AppTable.prototype.generateTableId = function () {
|
|
26095
|
-
|
|
26113
|
+
var id = this.location.path(true)
|
|
26114
|
+
.replace(/[?].*$/g, '')
|
|
26115
|
+
.replace(/\/[\d]+/g, '_id')
|
|
26116
|
+
+ '_' + this.constructor.name;
|
|
26096
26117
|
//if (this.debug) console.debug("[table] id = " + id);
|
|
26097
|
-
|
|
26118
|
+
return id;
|
|
26098
26119
|
};
|
|
26099
26120
|
AppTable.prototype.addRowToTable = function (insertAt) {
|
|
26100
26121
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -26389,16 +26410,10 @@
|
|
|
26389
26410
|
{ type: i0.Directive }
|
|
26390
26411
|
];
|
|
26391
26412
|
AppTable.ctorParameters = function () { return [
|
|
26392
|
-
{ type:
|
|
26393
|
-
{ type: i3.Router },
|
|
26394
|
-
{ type: undefined },
|
|
26395
|
-
{ type: i1$4.Location },
|
|
26396
|
-
{ type: i1$5.ModalController },
|
|
26397
|
-
{ type: LocalSettingsService },
|
|
26413
|
+
{ type: i0.Injector },
|
|
26398
26414
|
{ type: Array },
|
|
26399
26415
|
{ type: EntitiesTableDataSource },
|
|
26400
|
-
{ type: undefined }
|
|
26401
|
-
{ type: i0.Injector }
|
|
26416
|
+
{ type: undefined }
|
|
26402
26417
|
]; };
|
|
26403
26418
|
AppTable.propDecorators = {
|
|
26404
26419
|
settingsId: [{ type: i0.Input }],
|
|
@@ -27943,8 +27958,7 @@
|
|
|
27943
27958
|
var AppInMemoryTable = /** @class */ (function (_super) {
|
|
27944
27959
|
__extends(AppInMemoryTable, _super);
|
|
27945
27960
|
function AppInMemoryTable(injector, columns, dataType, memoryDataService, validatorService, options, filter) {
|
|
27946
|
-
var _this = _super.call(this, injector
|
|
27947
|
-
_this.injector = injector;
|
|
27961
|
+
var _this = _super.call(this, injector, columns, new EntitiesTableDataSource(dataType, memoryDataService, validatorService, options), filter) || this;
|
|
27948
27962
|
_this.columns = columns;
|
|
27949
27963
|
_this.dataType = dataType;
|
|
27950
27964
|
_this.memoryDataService = memoryDataService;
|
|
@@ -28453,7 +28467,7 @@
|
|
|
28453
28467
|
var UserEventsTable = /** @class */ (function (_super) {
|
|
28454
28468
|
__extends(UserEventsTable, _super);
|
|
28455
28469
|
function UserEventsTable(injector, accountService, service, entities, cd, environment) {
|
|
28456
|
-
var _this = _super.call(this, injector
|
|
28470
|
+
var _this = _super.call(this, injector,
|
|
28457
28471
|
// columns
|
|
28458
28472
|
RESERVED_START_COLUMNS
|
|
28459
28473
|
.concat([
|
|
@@ -28462,8 +28476,7 @@
|
|
|
28462
28476
|
'eventType',
|
|
28463
28477
|
'message'
|
|
28464
28478
|
])
|
|
28465
|
-
.concat(RESERVED_END_COLUMNS), null, null
|
|
28466
|
-
_this.injector = injector;
|
|
28479
|
+
.concat(RESERVED_END_COLUMNS), null, null) || this;
|
|
28467
28480
|
_this.accountService = accountService;
|
|
28468
28481
|
_this.service = service;
|
|
28469
28482
|
_this.entities = entities;
|
|
@@ -28861,8 +28874,8 @@
|
|
|
28861
28874
|
|
|
28862
28875
|
var UsersPage = /** @class */ (function (_super) {
|
|
28863
28876
|
__extends(UsersPage, _super);
|
|
28864
|
-
function UsersPage(
|
|
28865
|
-
var _this = _super.call(this,
|
|
28877
|
+
function UsersPage(injector, accountService, validatorService, configService, dataService, cd, formBuilder, environment) {
|
|
28878
|
+
var _this = _super.call(this, injector, RESERVED_START_COLUMNS
|
|
28866
28879
|
.concat([
|
|
28867
28880
|
'avatar',
|
|
28868
28881
|
'lastName',
|
|
@@ -28881,14 +28894,8 @@
|
|
|
28881
28894
|
dataServiceOptions: {
|
|
28882
28895
|
saveOnlyDirtyRows: true
|
|
28883
28896
|
}
|
|
28884
|
-
}), null
|
|
28885
|
-
_this.route = route;
|
|
28886
|
-
_this.router = router;
|
|
28887
|
-
_this.platform = platform;
|
|
28888
|
-
_this.location = location;
|
|
28889
|
-
_this.modalCtrl = modalCtrl;
|
|
28897
|
+
}), null) || this;
|
|
28890
28898
|
_this.accountService = accountService;
|
|
28891
|
-
_this.settings = settings;
|
|
28892
28899
|
_this.validatorService = validatorService;
|
|
28893
28900
|
_this.configService = configService;
|
|
28894
28901
|
_this.dataService = dataService;
|
|
@@ -29027,19 +29034,13 @@
|
|
|
29027
29034
|
},] }
|
|
29028
29035
|
];
|
|
29029
29036
|
UsersPage.ctorParameters = function () { return [
|
|
29030
|
-
{ type:
|
|
29031
|
-
{ type: i3.Router },
|
|
29032
|
-
{ type: PlatformService },
|
|
29033
|
-
{ type: i1$4.Location },
|
|
29034
|
-
{ type: i1$5.ModalController },
|
|
29037
|
+
{ type: i0.Injector },
|
|
29035
29038
|
{ type: AccountService },
|
|
29036
|
-
{ type: LocalSettingsService },
|
|
29037
29039
|
{ type: ngxMaterialTable.ValidatorService },
|
|
29038
29040
|
{ type: ConfigService },
|
|
29039
29041
|
{ type: PersonService },
|
|
29040
29042
|
{ type: i0.ChangeDetectorRef },
|
|
29041
29043
|
{ type: i1.FormBuilder },
|
|
29042
|
-
{ type: i0.Injector },
|
|
29043
29044
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
29044
29045
|
]; };
|
|
29045
29046
|
UsersPage.propDecorators = {
|
|
@@ -29399,11 +29400,16 @@
|
|
|
29399
29400
|
exports.getRandomImage = getRandomImage;
|
|
29400
29401
|
exports.hexToRgb = hexToRgb;
|
|
29401
29402
|
exports.hexToRgbArray = hexToRgbArray;
|
|
29403
|
+
exports.isAndroid = isAndroid;
|
|
29402
29404
|
exports.isControlHasInput = isControlHasInput;
|
|
29405
|
+
exports.isCordova = isCordova;
|
|
29406
|
+
exports.isDesktop = isDesktop;
|
|
29403
29407
|
exports.isEmptyArray = isEmptyArray;
|
|
29408
|
+
exports.isIOS = isIOS;
|
|
29404
29409
|
exports.isInputElement = isInputElement;
|
|
29405
29410
|
exports.isInstanceOf = isInstanceOf;
|
|
29406
29411
|
exports.isInt = isInt;
|
|
29412
|
+
exports.isMobile = isMobile;
|
|
29407
29413
|
exports.isNil = isNil;
|
|
29408
29414
|
exports.isNilOrBlank = isNilOrBlank;
|
|
29409
29415
|
exports.isNilOrNaN = isNilOrNaN;
|
|
@@ -29414,6 +29420,8 @@
|
|
|
29414
29420
|
exports.isNotNilString = isNotNilString;
|
|
29415
29421
|
exports.isNumber = isNumber;
|
|
29416
29422
|
exports.isNumberRange = isNumberRange;
|
|
29423
|
+
exports.isTouchUi = isTouchUi;
|
|
29424
|
+
exports.isWindow = isWindow;
|
|
29417
29425
|
exports.joinProperties = joinProperties;
|
|
29418
29426
|
exports.joinPropertiesPath = joinPropertiesPath;
|
|
29419
29427
|
exports.logFormErrors = logFormErrors;
|
|
@@ -29421,6 +29429,7 @@
|
|
|
29421
29429
|
exports.markAsUntouched = markAsUntouched;
|
|
29422
29430
|
exports.markControlAsTouched = markControlAsTouched;
|
|
29423
29431
|
exports.markFormGroupAsTouched = markFormGroupAsTouched;
|
|
29432
|
+
exports.matchMedia = matchMedia;
|
|
29424
29433
|
exports.matchUpperCase = matchUpperCase;
|
|
29425
29434
|
exports.mergeLoadResult = mergeLoadResult;
|
|
29426
29435
|
exports.mixHex = mixHex;
|
|
@@ -29461,6 +29470,7 @@
|
|
|
29461
29470
|
exports.suggestFromArray = suggestFromArray;
|
|
29462
29471
|
exports.suggestFromStringArray = suggestFromStringArray;
|
|
29463
29472
|
exports.tabindexComparator = tabindexComparator;
|
|
29473
|
+
exports.testUserAgent = testUserAgent;
|
|
29464
29474
|
exports.toBoolean = toBoolean;
|
|
29465
29475
|
exports.toDateISOString = toDateISOString;
|
|
29466
29476
|
exports.toDuration = toDuration;
|
|
@@ -29475,6 +29485,7 @@
|
|
|
29475
29485
|
exports.waitForTrue = waitForTrue;
|
|
29476
29486
|
exports.waitIdle = waitIdle;
|
|
29477
29487
|
exports.waitWhilePending = waitWhilePending;
|
|
29488
|
+
exports["ɵ0"] = ɵ0$b;
|
|
29478
29489
|
exports["ɵa"] = CustomReuseStrategy;
|
|
29479
29490
|
exports["ɵb"] = MatNumpadDomService;
|
|
29480
29491
|
exports["ɵc"] = SharedMatBadgeIconModule;
|