@sumaris-net/ngx-components 1.22.11-rc9 → 1.22.11
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 +538 -355
- 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/esm2015/public_api.js +2 -2
- package/esm2015/src/app/admin/users/list/users.js +2 -3
- package/esm2015/src/app/core/form/entity-editor-modal.class.js +3 -2
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -4
- package/esm2015/src/app/core/menu/menu.component.js +1 -1
- package/esm2015/src/app/core/services/account.service.js +2 -2
- package/esm2015/src/app/core/services/model/person.model.js +4 -2
- package/esm2015/src/app/shared/file/file.service.js +18 -18
- package/esm2015/src/app/shared/file/file.utils.js +1 -1
- package/esm2015/src/app/shared/file/images.utils.js +166 -0
- package/esm2015/src/app/social/job/progression/job-progression.list.js +1 -1
- package/esm2015/src/app/social/user-event/notification/user-event-notification.icon.js +7 -6
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +48 -24
- package/esm2015/src/app/social/user-event/testing/user-event.testing.js +61 -10
- package/esm2015/src/app/social/user-event/testing/user-event.testing.model.js +103 -0
- package/esm2015/src/app/social/user-event/testing/user-event.testing.service.js +40 -31
- package/esm2015/src/app/social/user-event/user-event.model.js +2 -106
- package/esm2015/src/app/social/user-event/user-event.module.js +4 -2
- package/esm2015/src/app/social/user-event/user-event.service.js +65 -49
- package/fesm2015/sumaris-net.ngx-components.js +407 -313
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
- package/src/app/admin/users/list/users.d.ts +0 -2
- package/src/app/core/form/entity-editor.class.d.ts +1 -1
- package/src/app/shared/file/file.service.d.ts +5 -5
- package/src/app/shared/file/images.utils.d.ts +19 -0
- package/src/app/social/user-event/notification/user-event-notification.list.d.ts +18 -14
- package/src/app/social/user-event/testing/user-event.testing.d.ts +11 -3
- package/src/app/social/user-event/testing/user-event.testing.model.d.ts +41 -0
- package/src/app/social/user-event/testing/user-event.testing.service.d.ts +7 -6
- package/src/app/social/user-event/user-event.model.d.ts +10 -44
- package/src/app/social/user-event/user-event.service.d.ts +9 -8
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/shared/file/base64-image-reader.js +0 -141
- package/esm2015/src/app/social/user-event/user-event.fragments.js +0 -27
- package/src/app/shared/file/base64-image-reader.d.ts +0 -18
- package/src/app/social/user-event/user-event.fragments.d.ts +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/table'), require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/toolbar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/select'), require('@angular/material/card'), require('@angular/material/tabs'), require('@angular/material/stepper'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/radio'), require('@angular/material/badge'), require('@angular/material/slide-toggle'), require('@angular/material/dialog'), require('@angular/material/autocomplete'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/material/divider'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-color-picker'), require('@ionic-native/native-audio/ngx'), require('@ionic-native/vibration/ngx'), require('@ionic-native/audio-management/ngx'), require('@ionic-native/native-audio/ngx/index'), require('@ionic-native/vibration/ngx/index'), require('@ionic-native/audio-management/ngx/index'), require('uuid/v4'), require('@angular/cdk/drag-drop'), require('ngx-markdown'), require('tweetnacl'), require('@ionic/storage'), require('zone.js/dist/zone-error'), require('@ionic-native/splash-screen/ngx'), require('@ionic-native/network/ngx'), require('ionic-cache'), require('ionic-cache/dist/cache.service'), require('@ionic-native/network/ngx/index'), require('@ionic-native/splash-screen/ngx/index'), require('@ionic-native/status-bar/ngx'), require('@angular/cdk/platform'), require('@ionic-native/in-app-browser/ngx'), require('@apollo/client/core'), require('apollo-angular'), require('@apollo/client/link/ws'), require('@apollo/client/utilities'), require('@apollo/client/link/retry'), require('apollo-link-queue'), require('apollo-link-serialize'), require('apollo-link-logger'), require('apollo-angular/http'), require('apollo3-cache-persist'), require('@ionic-native/downloader/ngx'), require('@ionic-native/status-bar/ngx/index'), require('@ionic-native/keyboard/ngx/index'), require('@ionic-native/in-app-browser/ngx/index'), require('@ionic-native/downloader/ngx/index'), require('@angular/cdk/text-field'), require('@e-is/ngx-material-table'), require('@angular/cdk/collections'), require('ngx-jdenticon'), require('tweetnacl-util'), require('scrypt-async'), require('hammerjs'), require('moment-timezone')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@sumaris-net/ngx-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/table', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/material/core', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/toolbar', '@angular/material/icon', '@angular/material/button', '@angular/material/menu', '@angular/material/select', '@angular/material/card', '@angular/material/tabs', '@angular/material/stepper', '@angular/material/list', '@angular/material/button-toggle', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/radio', '@angular/material/badge', '@angular/material/slide-toggle', '@angular/material/dialog', '@angular/material/autocomplete', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/animations', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/material/divider', '@angular/material/tooltip', '@angular/material/chips', '@angular/router', '@angular/platform-browser', '@angular/common/http', 'ngx-color-picker', '@ionic-native/native-audio/ngx', '@ionic-native/vibration/ngx', '@ionic-native/audio-management/ngx', '@ionic-native/native-audio/ngx/index', '@ionic-native/vibration/ngx/index', '@ionic-native/audio-management/ngx/index', 'uuid/v4', '@angular/cdk/drag-drop', 'ngx-markdown', 'tweetnacl', '@ionic/storage', 'zone.js/dist/zone-error', '@ionic-native/splash-screen/ngx', '@ionic-native/network/ngx', 'ionic-cache', 'ionic-cache/dist/cache.service', '@ionic-native/network/ngx/index', '@ionic-native/splash-screen/ngx/index', '@ionic-native/status-bar/ngx', '@angular/cdk/platform', '@ionic-native/in-app-browser/ngx', '@apollo/client/core', 'apollo-angular', '@apollo/client/link/ws', '@apollo/client/utilities', '@apollo/client/link/retry', 'apollo-link-queue', 'apollo-link-serialize', 'apollo-link-logger', 'apollo-angular/http', 'apollo3-cache-persist', '@ionic-native/downloader/ngx', '@ionic-native/status-bar/ngx/index', '@ionic-native/keyboard/ngx/index', '@ionic-native/in-app-browser/ngx/index', '@ionic-native/downloader/ngx/index', '@angular/cdk/text-field', '@e-is/ngx-material-table', '@angular/cdk/collections', 'ngx-jdenticon', 'tweetnacl-util', 'scrypt-async', 'hammerjs', 'moment-timezone'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sumaris-net'] = global['sumaris-net'] || {}, global['sumaris-net']['ngx-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.animations, global['ngx-translate'].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global['ionic-native'].keyboard.ngx, global['angular2-text-mask'], global['ngx-material-timepicker'], global.ng.material.datepicker, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global['ngx-color-picker'], global['ionic-native']['native-audio'].ngx, global['ionic-native'].vibration.ngx, global['ionic-native']['audio-management'].ngx, global['ionic-native']['native-audio'].ngx.index, global['ionic-native'].vibration.ngx.index, global['ionic-native']['audio-management'].ngx.index, global.uuid.v4, global.ng.cdk.dragDrop, global['ngx-markdown'], global.tweetnacl, global.ionic.storage, null, global['ionic-native']['splash-screen'].ngx, global['ionic-native'].network.ngx, global['ionic-cache'], global['ionic-cache/dist/cache'].service, global['ionic-native'].network.ngx.index, global['ionic-native']['splash-screen'].ngx.index, global['ionic-native']['status-bar'].ngx, global.ng.cdk.platform, global['ionic-native']['in-app-browser'].ngx, global.apollo.client.core, global['apollo-angular'], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global['apollo-link-queue'], global['apollo-link-serialize'], global['apollo-link-logger'], global['apollo-angular'].http, global['apollo3-cache-persist'], global['ionic-native'].downloader.ngx, global['ionic-native']['status-bar'].ngx.index, global['ionic-native'].keyboard.ngx.index, global['ionic-native']['in-app-browser'].ngx.index, global['ionic-native'].downloader.ngx.index, global.ng.cdk.textField, global['e-is']['ngx-material-table'], global.ng.cdk.collections, global['ngx-jdenticon'], null, null, null, global['moment-timezone']));
|
|
5
|
-
}(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, animations, i1$2, i1$5, momentImported, i1$1, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, textField, ngxMaterialTable, collections, ngxJdenticon, tweetnaclUtil, scryptAsync, hammerjs, momentTZImported) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/table'), require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/toolbar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/select'), require('@angular/material/card'), require('@angular/material/tabs'), require('@angular/material/stepper'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/radio'), require('@angular/material/badge'), require('@angular/material/slide-toggle'), require('@angular/material/dialog'), require('@angular/material/autocomplete'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/material/divider'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-color-picker'), require('@ionic-native/native-audio/ngx'), require('@ionic-native/vibration/ngx'), require('@ionic-native/audio-management/ngx'), require('@ionic-native/native-audio/ngx/index'), require('@ionic-native/vibration/ngx/index'), require('@ionic-native/audio-management/ngx/index'), require('uuid/v4'), require('rxjs/internal/operators'), require('@angular/cdk/drag-drop'), require('ngx-markdown'), require('tweetnacl'), require('@ionic/storage'), require('zone.js/dist/zone-error'), require('@ionic-native/splash-screen/ngx'), require('@ionic-native/network/ngx'), require('ionic-cache'), require('ionic-cache/dist/cache.service'), require('@ionic-native/network/ngx/index'), require('@ionic-native/splash-screen/ngx/index'), require('@ionic-native/status-bar/ngx'), require('@angular/cdk/platform'), require('@ionic-native/in-app-browser/ngx'), require('@apollo/client/core'), require('apollo-angular'), require('@apollo/client/link/ws'), require('@apollo/client/utilities'), require('@apollo/client/link/retry'), require('apollo-link-queue'), require('apollo-link-serialize'), require('apollo-link-logger'), require('apollo-angular/http'), require('apollo3-cache-persist'), require('@ionic-native/downloader/ngx'), require('@ionic-native/status-bar/ngx/index'), require('@ionic-native/keyboard/ngx/index'), require('@ionic-native/in-app-browser/ngx/index'), require('@ionic-native/downloader/ngx/index'), require('@angular/cdk/text-field'), require('@e-is/ngx-material-table'), require('@angular/cdk/collections'), require('ngx-jdenticon'), require('tweetnacl-util'), require('scrypt-async'), require('hammerjs'), require('moment-timezone')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sumaris-net/ngx-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/table', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/material/core', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/toolbar', '@angular/material/icon', '@angular/material/button', '@angular/material/menu', '@angular/material/select', '@angular/material/card', '@angular/material/tabs', '@angular/material/stepper', '@angular/material/list', '@angular/material/button-toggle', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/radio', '@angular/material/badge', '@angular/material/slide-toggle', '@angular/material/dialog', '@angular/material/autocomplete', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/animations', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/material/divider', '@angular/material/tooltip', '@angular/material/chips', '@angular/router', '@angular/platform-browser', '@angular/common/http', 'ngx-color-picker', '@ionic-native/native-audio/ngx', '@ionic-native/vibration/ngx', '@ionic-native/audio-management/ngx', '@ionic-native/native-audio/ngx/index', '@ionic-native/vibration/ngx/index', '@ionic-native/audio-management/ngx/index', 'uuid/v4', 'rxjs/internal/operators', '@angular/cdk/drag-drop', 'ngx-markdown', 'tweetnacl', '@ionic/storage', 'zone.js/dist/zone-error', '@ionic-native/splash-screen/ngx', '@ionic-native/network/ngx', 'ionic-cache', 'ionic-cache/dist/cache.service', '@ionic-native/network/ngx/index', '@ionic-native/splash-screen/ngx/index', '@ionic-native/status-bar/ngx', '@angular/cdk/platform', '@ionic-native/in-app-browser/ngx', '@apollo/client/core', 'apollo-angular', '@apollo/client/link/ws', '@apollo/client/utilities', '@apollo/client/link/retry', 'apollo-link-queue', 'apollo-link-serialize', 'apollo-link-logger', 'apollo-angular/http', 'apollo3-cache-persist', '@ionic-native/downloader/ngx', '@ionic-native/status-bar/ngx/index', '@ionic-native/keyboard/ngx/index', '@ionic-native/in-app-browser/ngx/index', '@ionic-native/downloader/ngx/index', '@angular/cdk/text-field', '@e-is/ngx-material-table', '@angular/cdk/collections', 'ngx-jdenticon', 'tweetnacl-util', 'scrypt-async', 'hammerjs', 'moment-timezone'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sumaris-net'] = global['sumaris-net'] || {}, global['sumaris-net']['ngx-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.animations, global['ngx-translate'].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global['ionic-native'].keyboard.ngx, global['angular2-text-mask'], global['ngx-material-timepicker'], global.ng.material.datepicker, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global['ngx-color-picker'], global['ionic-native']['native-audio'].ngx, global['ionic-native'].vibration.ngx, global['ionic-native']['audio-management'].ngx, global['ionic-native']['native-audio'].ngx.index, global['ionic-native'].vibration.ngx.index, global['ionic-native']['audio-management'].ngx.index, global.uuid.v4, global.rxjs['internal/operators'], global.ng.cdk.dragDrop, global['ngx-markdown'], global.tweetnacl, global.ionic.storage, null, global['ionic-native']['splash-screen'].ngx, global['ionic-native'].network.ngx, global['ionic-cache'], global['ionic-cache/dist/cache'].service, global['ionic-native'].network.ngx.index, global['ionic-native']['splash-screen'].ngx.index, global['ionic-native']['status-bar'].ngx, global.ng.cdk.platform, global['ionic-native']['in-app-browser'].ngx, global.apollo.client.core, global['apollo-angular'], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global['apollo-link-queue'], global['apollo-link-serialize'], global['apollo-link-logger'], global['apollo-angular'].http, global['apollo3-cache-persist'], global['ionic-native'].downloader.ngx, global['ionic-native']['status-bar'].ngx.index, global['ionic-native'].keyboard.ngx.index, global['ionic-native']['in-app-browser'].ngx.index, global['ionic-native'].downloader.ngx.index, global.ng.cdk.textField, global['e-is']['ngx-material-table'], global.ng.cdk.collections, global['ngx-jdenticon'], null, null, null, global['moment-timezone']));
|
|
5
|
+
}(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, animations, i1$2, i1$5, momentImported, i1$1, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, operators$1, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, textField, ngxMaterialTable, collections, ngxJdenticon, tweetnaclUtil, scryptAsync, hammerjs, momentTZImported) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
var SPACE_PLACEHOLDER_CHAR = '\u2000';
|
|
47
47
|
var KEYBOARD_HIDE_DELAY_MS = 250; // 1s
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
/******************************************************************************
|
|
50
50
|
Copyright (c) Microsoft Corporation.
|
|
51
51
|
|
|
52
52
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -208,7 +208,11 @@
|
|
|
208
208
|
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
209
209
|
if (k2 === undefined)
|
|
210
210
|
k2 = k;
|
|
211
|
-
Object.
|
|
211
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
212
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
213
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
214
|
+
}
|
|
215
|
+
Object.defineProperty(o, k2, desc);
|
|
212
216
|
}) : (function (o, m, k, k2) {
|
|
213
217
|
if (k2 === undefined)
|
|
214
218
|
k2 = k;
|
|
@@ -363,6 +367,11 @@
|
|
|
363
367
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
364
368
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
365
369
|
}
|
|
370
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
371
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
372
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
373
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
374
|
+
}
|
|
366
375
|
|
|
367
376
|
function isNil(obj) {
|
|
368
377
|
return obj === undefined || obj === null;
|
|
@@ -10553,44 +10562,97 @@
|
|
|
10553
10562
|
},] }
|
|
10554
10563
|
];
|
|
10555
10564
|
|
|
10565
|
+
var UploadFile = /** @class */ (function (_super) {
|
|
10566
|
+
__extends(UploadFile, _super);
|
|
10567
|
+
function UploadFile() {
|
|
10568
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
10569
|
+
}
|
|
10570
|
+
return UploadFile;
|
|
10571
|
+
}(File));
|
|
10572
|
+
var FileResponse = /** @class */ (function () {
|
|
10573
|
+
function FileResponse(init) {
|
|
10574
|
+
this.type = i2$1.HttpEventType.Response;
|
|
10575
|
+
this.body = isNotNil(init === null || init === void 0 ? void 0 : init.body) ? init.body : null;
|
|
10576
|
+
this.status = (init === null || init === void 0 ? void 0 : init.status) || 0;
|
|
10577
|
+
this.statusText = (init === null || init === void 0 ? void 0 : init.statusText) || 'OK';
|
|
10578
|
+
}
|
|
10579
|
+
return FileResponse;
|
|
10580
|
+
}());
|
|
10581
|
+
function isProgressEvent(event) {
|
|
10582
|
+
return event && (event.type === i2$1.HttpEventType.UploadProgress
|
|
10583
|
+
|| event.type === i2$1.HttpEventType.DownloadProgress);
|
|
10584
|
+
}
|
|
10585
|
+
function isResponseEvent(event) {
|
|
10586
|
+
return event && event.type === i2$1.HttpEventType.Response;
|
|
10587
|
+
}
|
|
10588
|
+
|
|
10556
10589
|
var IMAGE_DEFAULTS = {
|
|
10557
10590
|
MAX_HEIGHT: 480,
|
|
10558
10591
|
MAX_WIDTH: 640,
|
|
10559
10592
|
THUMB_MAX_HEIGHT: 200,
|
|
10560
10593
|
THUMB_MAX_WIDTH: 200
|
|
10561
10594
|
};
|
|
10562
|
-
|
|
10563
|
-
|
|
10595
|
+
// @dynamic
|
|
10596
|
+
var ImagesUtils = /** @class */ (function () {
|
|
10597
|
+
function ImagesUtils() {
|
|
10564
10598
|
}
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
}
|
|
10583
|
-
|
|
10599
|
+
ImagesUtils.readAsDataURL = function (file, opts) {
|
|
10600
|
+
var _this = this;
|
|
10601
|
+
var $progress = new rxjs.Subject();
|
|
10602
|
+
var reader = new FileReader();
|
|
10603
|
+
// Listen progress
|
|
10604
|
+
reader.onprogress = function (e) {
|
|
10605
|
+
var total = e.total || 1;
|
|
10606
|
+
var loaded = e.total || 0;
|
|
10607
|
+
if (loaded < total)
|
|
10608
|
+
$progress.next({ type: i2$1.HttpEventType.UploadProgress, loaded: loaded, total: total });
|
|
10609
|
+
};
|
|
10610
|
+
// Listen end
|
|
10611
|
+
reader.onloadend = function (e) {
|
|
10612
|
+
var body = reader.result;
|
|
10613
|
+
if (typeof body === 'string') {
|
|
10614
|
+
$progress.next(new FileResponse({ body: body }));
|
|
10615
|
+
$progress.complete();
|
|
10616
|
+
}
|
|
10617
|
+
else {
|
|
10618
|
+
console.error("[image-utils] Cannot read file '" + file.name + "' as text");
|
|
10619
|
+
$progress.error("Cannot read file as text");
|
|
10620
|
+
}
|
|
10621
|
+
};
|
|
10622
|
+
// Listen error
|
|
10623
|
+
reader.onerror = function (event) {
|
|
10624
|
+
console.error('[image-utils] Error while reading file:', event);
|
|
10625
|
+
$progress.error(event);
|
|
10626
|
+
};
|
|
10627
|
+
// Start reading the file
|
|
10628
|
+
reader.readAsDataURL(file);
|
|
10629
|
+
// Resize image, if need
|
|
10630
|
+
if (opts) {
|
|
10631
|
+
return $progress.pipe(operators$1.mergeMap(function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
10632
|
+
var body;
|
|
10633
|
+
return __generator(this, function (_a) {
|
|
10634
|
+
switch (_a.label) {
|
|
10635
|
+
case 0:
|
|
10636
|
+
if (!(event instanceof FileResponse)) return [3 /*break*/, 2];
|
|
10637
|
+
return [4 /*yield*/, ImagesUtils.resizeBase64(event.body, opts)];
|
|
10638
|
+
case 1:
|
|
10639
|
+
body = _a.sent();
|
|
10640
|
+
return [2 /*return*/, new FileResponse({ body: body })];
|
|
10641
|
+
case 2: return [2 /*return*/, event];
|
|
10642
|
+
}
|
|
10643
|
+
});
|
|
10644
|
+
}); }));
|
|
10645
|
+
}
|
|
10646
|
+
return $progress.asObservable();
|
|
10584
10647
|
};
|
|
10585
|
-
|
|
10648
|
+
ImagesUtils.readAndResizeFromUrl = function (fileUrl, opts) {
|
|
10586
10649
|
return __awaiter(this, void 0, void 0, function () {
|
|
10587
10650
|
var img, err_1;
|
|
10588
|
-
var _this = this;
|
|
10589
10651
|
return __generator(this, function (_a) {
|
|
10590
10652
|
switch (_a.label) {
|
|
10591
10653
|
case 0:
|
|
10592
|
-
if (isNilOrBlank(
|
|
10593
|
-
throw new Error('Illegal argument: missing
|
|
10654
|
+
if (isNilOrBlank(fileUrl))
|
|
10655
|
+
throw new Error('Illegal argument: missing fileUrl');
|
|
10594
10656
|
img = document.createElement('img');
|
|
10595
10657
|
// Need to avoid CORS error
|
|
10596
10658
|
// (see https://stackoverflow.com/questions/22710627/tainted-canvases-may-not-be-exported)
|
|
@@ -10599,14 +10661,14 @@
|
|
|
10599
10661
|
case 1:
|
|
10600
10662
|
_a.trys.push([1, 3, 4, 5]);
|
|
10601
10663
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
10602
|
-
img.addEventListener('load',
|
|
10664
|
+
img.addEventListener('load', ImagesUtils.createImageOnLoadResizeFn(resolve, reject, opts), false);
|
|
10603
10665
|
img.addEventListener('error', reject);
|
|
10604
|
-
img.src =
|
|
10666
|
+
img.src = fileUrl;
|
|
10605
10667
|
})];
|
|
10606
10668
|
case 2: return [2 /*return*/, _a.sent()];
|
|
10607
10669
|
case 3:
|
|
10608
10670
|
err_1 = _a.sent();
|
|
10609
|
-
throw new Error("Failed to load and resize image {" +
|
|
10671
|
+
throw new Error("Failed to load and resize image {" + fileUrl + "}");
|
|
10610
10672
|
case 4:
|
|
10611
10673
|
img.remove();
|
|
10612
10674
|
return [7 /*endfinally*/];
|
|
@@ -10615,15 +10677,12 @@
|
|
|
10615
10677
|
});
|
|
10616
10678
|
});
|
|
10617
10679
|
};
|
|
10618
|
-
|
|
10680
|
+
ImagesUtils.resizeBase64 = function (dataUrl, opts) {
|
|
10619
10681
|
return __awaiter(this, void 0, void 0, function () {
|
|
10620
10682
|
var img;
|
|
10621
|
-
var _this = this;
|
|
10622
10683
|
return __generator(this, function (_a) {
|
|
10623
10684
|
switch (_a.label) {
|
|
10624
10685
|
case 0:
|
|
10625
|
-
if (!file)
|
|
10626
|
-
throw new Error('Illegal argument: missing file');
|
|
10627
10686
|
img = document.createElement('img');
|
|
10628
10687
|
// Need to avoid CORS error
|
|
10629
10688
|
// (see https://stackoverflow.com/questions/22710627/tainted-canvases-may-not-be-exported)
|
|
@@ -10632,13 +10691,9 @@
|
|
|
10632
10691
|
case 1:
|
|
10633
10692
|
_a.trys.push([1, , 3, 4]);
|
|
10634
10693
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
img.onload = _this.createImageOnLoadResizeFn(resolve, reject, opts);
|
|
10639
|
-
img.src = reader.result;
|
|
10640
|
-
}, false);
|
|
10641
|
-
reader.readAsDataURL(file);
|
|
10694
|
+
img.addEventListener('load', ImagesUtils.createImageOnLoadResizeFn(resolve, reject, opts), false);
|
|
10695
|
+
img.addEventListener('error', reject);
|
|
10696
|
+
img.src = dataUrl;
|
|
10642
10697
|
})];
|
|
10643
10698
|
case 2: return [2 /*return*/, _a.sent()];
|
|
10644
10699
|
case 3:
|
|
@@ -10649,8 +10704,7 @@
|
|
|
10649
10704
|
});
|
|
10650
10705
|
});
|
|
10651
10706
|
};
|
|
10652
|
-
|
|
10653
|
-
Base64ImageReader.prototype.createImageOnLoadResizeFn = function (resolve, reject, opts) {
|
|
10707
|
+
ImagesUtils.createImageOnLoadResizeFn = function (resolve, reject, opts) {
|
|
10654
10708
|
return function (event) {
|
|
10655
10709
|
var maxWidth = (opts && opts.thumbnail ? IMAGE_DEFAULTS.THUMB_MAX_WIDTH : (opts && opts.maxWidth || IMAGE_DEFAULTS.MAX_WIDTH));
|
|
10656
10710
|
var maxHeight = (opts && opts.thumbnail ? IMAGE_DEFAULTS.THUMB_MAX_HEIGHT : (opts && opts.maxHeight || IMAGE_DEFAULTS.MAX_HEIGHT));
|
|
@@ -10716,7 +10770,7 @@
|
|
|
10716
10770
|
}
|
|
10717
10771
|
};
|
|
10718
10772
|
};
|
|
10719
|
-
return
|
|
10773
|
+
return ImagesUtils;
|
|
10720
10774
|
}());
|
|
10721
10775
|
|
|
10722
10776
|
var uuidv4 = uuidv4Imported__namespace;
|
|
@@ -10751,28 +10805,28 @@
|
|
|
10751
10805
|
var jobsFactories = (sources || []).map(function (source) { return function () { return _this.getImage(source, Object.assign({}, opts)); }; });
|
|
10752
10806
|
return chainPromises(jobsFactories);
|
|
10753
10807
|
};
|
|
10754
|
-
FileService.prototype.getImage = function (
|
|
10808
|
+
FileService.prototype.getImage = function (fileUrl, opts) {
|
|
10755
10809
|
return __awaiter(this, void 0, void 0, function () {
|
|
10756
|
-
var
|
|
10810
|
+
var outputType, debug, now, lastSlashIndex, fileName, targetFilePath, blob, err_1, dataUrl;
|
|
10757
10811
|
return __generator(this, function (_a) {
|
|
10758
10812
|
switch (_a.label) {
|
|
10759
10813
|
case 0:
|
|
10760
|
-
|
|
10814
|
+
outputType = opts && opts.outputType || (this.canUseFileSystem ? 'fileUrl' : 'dataUrl');
|
|
10761
10815
|
debug = this._debug /*&& (!opts || !opts.fileTransfer)*/;
|
|
10762
10816
|
now = debug && Date.now();
|
|
10763
10817
|
if (debug)
|
|
10764
|
-
console.debug("[file] Fetching image {" +
|
|
10765
|
-
lastSlashIndex =
|
|
10818
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + "...");
|
|
10819
|
+
lastSlashIndex = fileUrl.lastIndexOf('/');
|
|
10766
10820
|
if (lastSlashIndex === -1)
|
|
10767
|
-
throw new Error('Invalid URL: ' +
|
|
10768
|
-
fileName = lastSlashIndex < (
|
|
10769
|
-
if (!(
|
|
10770
|
-
console.warn("WARN: [file]
|
|
10821
|
+
throw new Error('Invalid URL: ' + fileUrl);
|
|
10822
|
+
fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4();
|
|
10823
|
+
if (!(outputType === 'fileUrl' && this.canUseFileSystem)) return [3 /*break*/, 4];
|
|
10824
|
+
console.warn("WARN: [file] Downloading image {" + fileUrl + "} in local filesystem...");
|
|
10771
10825
|
targetFilePath = this._imageDirectory + fileName;
|
|
10772
10826
|
_a.label = 1;
|
|
10773
10827
|
case 1:
|
|
10774
10828
|
_a.trys.push([1, 3, , 4]);
|
|
10775
|
-
return [4 /*yield*/, firstNotNilPromise(this.http.get(
|
|
10829
|
+
return [4 /*yield*/, firstNotNilPromise(this.http.get(fileUrl, {
|
|
10776
10830
|
observe: 'body',
|
|
10777
10831
|
responseType: 'blob',
|
|
10778
10832
|
reportProgress: false
|
|
@@ -10784,25 +10838,25 @@
|
|
|
10784
10838
|
//const fileTransfer = (opts && opts.fileTransfer) || this.transfer.create();
|
|
10785
10839
|
//await fileTransfer.download(source, targetFilePath);
|
|
10786
10840
|
if (debug)
|
|
10787
|
-
console.debug("[file] Fetching image {" +
|
|
10841
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + " [OK] in " + (Date.now() - now) + "ms");
|
|
10788
10842
|
return [2 /*return*/, targetFilePath];
|
|
10789
10843
|
case 3:
|
|
10790
10844
|
err_1 = _a.sent();
|
|
10791
|
-
console.error("[file] Error while download " +
|
|
10845
|
+
console.error("[file] Error while download " + fileUrl + ": " + (err_1 && err_1.message || err_1));
|
|
10792
10846
|
// Continue (fallback to data Url)
|
|
10793
|
-
|
|
10847
|
+
outputType = 'dataUrl';
|
|
10794
10848
|
return [3 /*break*/, 4];
|
|
10795
10849
|
case 4:
|
|
10796
|
-
if (!(
|
|
10797
|
-
return [4 /*yield*/,
|
|
10850
|
+
if (!(outputType === 'dataUrl')) return [3 /*break*/, 6];
|
|
10851
|
+
return [4 /*yield*/, ImagesUtils.readAndResizeFromUrl(fileUrl, opts)];
|
|
10798
10852
|
case 5:
|
|
10799
10853
|
dataUrl = _a.sent();
|
|
10800
10854
|
if (debug)
|
|
10801
|
-
console.debug("[file] Fetching image {" +
|
|
10855
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + " [OK] in " + (Date.now() - now) + "ms");
|
|
10802
10856
|
return [2 /*return*/, dataUrl];
|
|
10803
10857
|
case 6:
|
|
10804
10858
|
// Keep original URL
|
|
10805
|
-
return [2 /*return*/,
|
|
10859
|
+
return [2 /*return*/, fileUrl];
|
|
10806
10860
|
}
|
|
10807
10861
|
});
|
|
10808
10862
|
});
|
|
@@ -15009,7 +15063,9 @@
|
|
|
15009
15063
|
return expectedProfileIndex !== -1 && PersonUtils.getMainProfileIndex(actualProfiles) <= expectedProfileIndex;
|
|
15010
15064
|
};
|
|
15011
15065
|
PersonUtils.personToString = function (obj) {
|
|
15012
|
-
|
|
15066
|
+
if (!obj || !obj.id)
|
|
15067
|
+
return undefined;
|
|
15068
|
+
return obj.lastName + ' ' + obj.firstName;
|
|
15013
15069
|
};
|
|
15014
15070
|
PersonUtils.personsToString = function (data, separator) {
|
|
15015
15071
|
return (data || []).map(PersonUtils.personToString).join(separator || ', ');
|
|
@@ -17182,7 +17238,7 @@
|
|
|
17182
17238
|
if (!(hasAvatarUrl && this.network.online)) return [3 /*break*/, 2];
|
|
17183
17239
|
return [4 /*yield*/, this.file.getImage(json.avatar, {
|
|
17184
17240
|
thumbnail: true,
|
|
17185
|
-
|
|
17241
|
+
outputType: 'dataUrl'
|
|
17186
17242
|
})
|
|
17187
17243
|
.then(function (dataUrl) {
|
|
17188
17244
|
if (dataUrl && _this._debug)
|
|
@@ -18157,30 +18213,6 @@
|
|
|
18157
18213
|
]; };
|
|
18158
18214
|
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
18159
18215
|
|
|
18160
|
-
var UploadFile = /** @class */ (function (_super) {
|
|
18161
|
-
__extends(UploadFile, _super);
|
|
18162
|
-
function UploadFile() {
|
|
18163
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18164
|
-
}
|
|
18165
|
-
return UploadFile;
|
|
18166
|
-
}(File));
|
|
18167
|
-
var FileResponse = /** @class */ (function () {
|
|
18168
|
-
function FileResponse(init) {
|
|
18169
|
-
this.type = i2$1.HttpEventType.Response;
|
|
18170
|
-
this.body = isNotNil(init === null || init === void 0 ? void 0 : init.body) ? init.body : null;
|
|
18171
|
-
this.status = (init === null || init === void 0 ? void 0 : init.status) || 0;
|
|
18172
|
-
this.statusText = (init === null || init === void 0 ? void 0 : init.statusText) || 'OK';
|
|
18173
|
-
}
|
|
18174
|
-
return FileResponse;
|
|
18175
|
-
}());
|
|
18176
|
-
function isProgressEvent(event) {
|
|
18177
|
-
return event && (event.type === i2$1.HttpEventType.UploadProgress
|
|
18178
|
-
|| event.type === i2$1.HttpEventType.DownloadProgress);
|
|
18179
|
-
}
|
|
18180
|
-
function isResponseEvent(event) {
|
|
18181
|
-
return event && event.type === i2$1.HttpEventType.Response;
|
|
18182
|
-
}
|
|
18183
|
-
|
|
18184
18216
|
var UploadFilePopover = /** @class */ (function () {
|
|
18185
18217
|
function UploadFilePopover(popoverController, translate, cd) {
|
|
18186
18218
|
this.popoverController = popoverController;
|
|
@@ -24837,7 +24869,7 @@
|
|
|
24837
24869
|
template: "<ion-split-pane #splitPane [contentId]=\"contentId\" (swiperight)=\"onSwipeRight($event)\">\n\n <ion-menu [id]=\"id\" [menuId]=\"menuId\" [contentId]=\"contentId\">\n <ion-header>\n\n <ion-toolbar @fadeInAnimation *ngIf=\"isLogin; else notLogin\" class=\"ion-toolbar-top\">\n <ion-grid>\n <ion-row>\n <ion-col size=\"4\">\n <button type=\"button\" mat-flat-button\n class=\"user-avatar\" [class.primary]=\"!accountAvatar\"\n [style.background-image]=\"'url('+(accountAvatar||'./assets/img/person.png')+')'\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\"\n [title]=\"'MENU.BTN_MY_ACCOUNT'|translate\">\n </button>\n </ion-col>\n <ion-col size=\"8\" class=\"user-logo\">\n <img *ngIf=\"logo\" src=\"{{logo}}\" [title]=\"'APP_NAME'|translate: {appName: appName}\" width=\"108px\"/>\n <span *ngIf=\"!logo\" style=\"width: 108px;\">{{appName}}</span>\n </ion-col>\n </ion-row>\n <ion-row class=\"ion-no-padding\">\n <ion-col>\n <button mat-button type=\"button\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\"\n [title]=\"'MENU.BTN_MY_ACCOUNT'|translate\">\n <ion-label color=\"primary\" class=\"ion-text-wrap ion-text-start\">\n <h3 class=\"no-margin username\">\n <b>{{accountName}}</b>\n </h3>\n <h4>{{accountEmail}}</h4>\n </ion-label>\n </button>\n </ion-col>\n\n <!-- Insertion headerBottomRight -->\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"headerBottomRight\"></ng-container>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-toolbar>\n\n <!-- User not logged -->\n <ng-template #notLogin>\n <mat-toolbar class=\"ion-padding\" @fadeInAnimation\n style=\"height: unset; display: block; margin: auto; text-align: center;\">\n <img *ngIf=\"logo\" src=\"{{logo}}\" [title]=\"'APP_NAME'|translate: {appName: appName}\" width=\"150px;\">\n <span *ngIf=\"!logo\" style=\"width: 150px\">{{appName}}</span>\n </mat-toolbar>\n </ng-template>\n </ion-header>\n\n <ion-content [class.has-user-header]=\"isLogin\">\n\n <ion-list lines=\"none\">\n <ion-menu-toggle auto-hide=\"false\"\n [class.flex-spacer]=\"item.cssClass == 'flex-spacer'\"\n *ngFor=\"let item of $items | async\">\n\n <!-- link -->\n <ion-item *ngIf=\"!loading && item.path\"\n @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}} text-1x\"\n tappable\n [routerLink]=\"item.path\"\n routerDirection=\"root\"\n routerLinkActive=\"selected\"\n [routerLinkActiveOptions]=\"{exact: (item.path === '/')}\">\n <ion-icon slot=\"start\" *ngIf=\"item.icon\" [name]=\"item.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"item.matIcon\">{{item.matIcon}}</mat-icon>\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item>\n\n <!-- action -->\n <ion-item *ngIf=\"!loading && item.action\"\n @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}} text-1x\"\n tappable\n (click)=\"doAction(item.action, $event)\">\n <ion-icon slot=\"start\" *ngIf=\"item.icon\" [name]=\"item.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"item.matIcon\">{{item.matIcon}}</mat-icon>\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item>\n\n <!-- divider -->\n <ion-item-divider @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}}\"\n *ngIf=\"!loading && !item.path && !item.action\">\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item-divider>\n\n </ion-menu-toggle>\n </ion-list>\n </ion-content>\n\n <ion-footer class=\"hidden-xs hidden-sm\">\n <ion-toolbar>\n\n <ion-buttons slot=\"start\">\n <ion-button mat-icon-button color=\"accent\" (click)=\"openAboutModal($event)\">\n <mat-icon slot=\"icon-only\">help_outline</mat-icon>\n </ion-button>\n </ion-buttons>\n\n <ion-title (click)=\"openAboutModal($event)\" color=\"medium\">\n {{'MENU.FOOTER_VERSION_ABOUT'| translate: {version: appVersion} }}\n </ion-title>\n\n <ion-buttons slot=\"end\">\n <button mat-icon-button color=\"accent\" (click)=\"toggleSplitPaneShow($event)\"\n class=\"hidden-xs hidden-sm hidden-md\"\n [title]=\"(splitPane.when ? 'COMMON.BTN_HIDE_MENU' : 'COMMON.BTN_SHOW_MENU') |translate\">\n <mat-icon><span>{{splitPane.when ? '«' : '»'}}</span></mat-icon>\n </button>\n </ion-buttons>\n </ion-toolbar>\n </ion-footer>\n\n </ion-menu>\n\n <ng-content></ng-content>\n\n</ion-split-pane>\n\n<ng-template #headerBottomRight>\n <ng-content select=\"[headerBottomRight]\"></ng-content>\n</ng-template>\n",
|
|
24838
24870
|
animations: [fadeInAnimation],
|
|
24839
24871
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
24840
|
-
styles: ["ion-menu{--ion-item-background:transparent;--ion-item-divider-background:transparent;--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint);--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-text-color-selected:var(--ion-color-primary);--ion-item-icon-color-selected:var(--ion-color-primary);--ion-item-text-color-disable:var(--ion-color-medium);--ion-item-icon-color-disable:var(--ion-color-medium)}ion-menu ion-header ion-text{color:var(--ion-color-primary)}ion-menu ion-header .user-avatar{background-size:cover;background-repeat:no-repeat;background-position:50%;background-color:var(--ion-color-secondary);border:1px solid var(--ion-color-
|
|
24872
|
+
styles: ["ion-menu{--ion-item-background:transparent;--ion-item-divider-background:transparent;--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint);--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-text-color-selected:var(--ion-color-primary);--ion-item-icon-color-selected:var(--ion-color-primary);--ion-item-text-color-disable:var(--ion-color-medium);--ion-item-icon-color-disable:var(--ion-color-medium)}ion-menu ion-header ion-text{color:var(--ion-color-primary)}ion-menu ion-header .user-avatar{background-size:cover;background-repeat:no-repeat;background-position:50%;background-color:var(--ion-color-secondary);border:1px solid rgba(var(--ion-color-secondary-rgb),.5);overflow:hidden!important;font-size:var(--avatar-size,60px)!important;line-height:var(--avatar-size,60px);height:var(--avatar-size,60px)!important;width:var(--avatar-size,60px)!important;border-radius:50%;display:inline-block}ion-menu ion-header .user-avatar:hover{background-color:var(--ion-color-secondary-shade);border:2px solid var(--ion-color-secondary-shade)}ion-menu ion-header .user-logo{text-align:right}ion-menu ion-header .user-logo img{max-width:120px;max-height:var(--avatar-size,60px);width:auto}ion-menu ion-header .username{padding-top:0;margin-top:0;margin-bottom:0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}ion-menu ion-header button[mat-button]{padding:0;text-align:start!important;width:100%}ion-menu .scroll-content{margin-top:79px!important}ion-menu .has-user-header .scroll-content{margin-top:188px!important}ion-menu ion-content.has-profile-header{--offset-top:188px}ion-menu ion-content.no-profile-header{--offset-top:79px}ion-menu ion-content ion-list{min-height:100%;display:flex;flex-direction:column;justify-content:flex-start}ion-menu ion-content ion-list ion-menu-toggle.flex-spacer{flex:1 1 auto;display:flex;flex-direction:column;justify-content:flex-end}ion-menu ion-content ion-list ion-item.primary{--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint)}ion-menu ion-content ion-list ion-item.secondary{--ion-item-icon-color:var(--ion-color-secondary-tint);--ion-item-text-color:var(--ion-color-secondary-tint)}ion-menu ion-content ion-list ion-item.tertiary{--ion-item-icon-color:var(--ion-color-tertiary-tint);--ion-item-text-color:var(--ion-color-tertiary-tint)}ion-menu ion-content ion-list ion-item.danger{--ion-item-icon-color:var(--ion-color-danger-tint);--ion-item-text-color:var(--ion-color-danger-tint)}ion-menu ion-content ion-list ion-item.medium{--ion-item-icon-color:var(--ion-color-medium-shade);--ion-item-text-color:var(--ion-color-medium-shade)}ion-menu ion-content ion-list ion-item.dark{--ion-item-icon-color:var(--ion-color-dark-tint);--ion-item-text-color:var(--ion-color-dark-tint)}ion-menu ion-content ion-list ion-item ion-icon,ion-menu ion-content ion-list ion-item mat-icon{color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor}ion-menu ion-content ion-list ion-item ion-label,ion-menu ion-content ion-list ion-item ion-text{color:var(--ion-item-text-color)!important}ion-menu ion-content ion-list ion-item.selected{background-color:var(--ion-item-background-selected)!important;--color-hover:var(--ion-item-background-selected)!important}ion-menu ion-content ion-list ion-item.selected ion-icon,ion-menu ion-content ion-list ion-item.selected mat-icon{color:var(--ion-item-icon-color-selected)!important;fill:currentColor;stroke:currentColor}ion-menu ion-content ion-list ion-item.selected ion-label,ion-menu ion-content ion-list ion-item.selected ion-text{color:var(--ion-item-text-color-selected)!important}ion-menu ion-content ion-list ion-item.selected:hover{--color-hover:var(--ion-item-background-selected)!important;--ion-item-icon-color-selected:var(--ion-item-icon-color)!important;--ion-item-text-color-selected:var(--ion-item-text-color)!important}ion-menu ion-footer{display:block!important}ion-menu ion-footer ion-toolbar ion-title{cursor:pointer;font-size:12pt;font-weight:400;text-align:center;padding:0 8px}ion-menu ion-footer ion-toolbar ion-button{--width:40px}@media screen and (max-width:767px){ion-menu ion-footer{display:none!important;visibility:hidden!important}}@media screen and (min-width:768px){ion-menu ion-scroll{overflow-y:auto!important}ion-menu .user-avatar{font-size:var(--avatar-size,80px)!important;line-height:var(--avatar-size,80px);height:var(--avatar-size,80px)!important;width:var(--avatar-size,80px)!important}ion-menu .user-logo img{max-height:var(--avatar-size,80px)}}"]
|
|
24841
24873
|
},] }
|
|
24842
24874
|
];
|
|
24843
24875
|
MenuComponent.ctorParameters = function () { return [
|
|
@@ -28796,10 +28828,10 @@
|
|
|
28796
28828
|
_this.savingSubject = new rxjs.BehaviorSubject(false);
|
|
28797
28829
|
_this.$title = new rxjs.Subject();
|
|
28798
28830
|
_this.onUpdateView = new i0.EventEmitter();
|
|
28799
|
-
_this.
|
|
28831
|
+
_this.environment = injector.get(ENVIRONMENT);
|
|
28800
28832
|
options = Object.assign({
|
|
28801
28833
|
// Default options
|
|
28802
|
-
enableListenChanges: ((_a = _this.
|
|
28834
|
+
enableListenChanges: ((_a = _this.environment.entityEditor) === null || _a === void 0 ? void 0 : _a.enableListenChanges) || false, listenIntervalInSeconds: toNumber((_b = _this.environment.entityEditor) === null || _b === void 0 ? void 0 : _b.listenIntervalInSeconds, 0), pathIdAttribute: 'id', autoLoad: true, autoUpdateRoute: true, i18nPrefix: ''
|
|
28803
28835
|
}, options);
|
|
28804
28836
|
_this.settings = injector.get(LocalSettingsService);
|
|
28805
28837
|
_this.errorTranslator = injector.get(FormErrorTranslator);
|
|
@@ -29098,13 +29130,14 @@
|
|
|
29098
29130
|
* Enable or disable state
|
|
29099
29131
|
*/
|
|
29100
29132
|
AppEntityEditor.prototype.updateViewState = function (data, opts) {
|
|
29133
|
+
var _a;
|
|
29101
29134
|
if (this.isNewData || this.canUserWrite(data)) {
|
|
29102
29135
|
this.enable(opts);
|
|
29103
29136
|
}
|
|
29104
29137
|
else {
|
|
29105
29138
|
this.disable(opts);
|
|
29106
29139
|
// Allow to sort table
|
|
29107
|
-
this.tables.forEach(function (t) { return t.enableSort(); });
|
|
29140
|
+
(_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
|
|
29108
29141
|
}
|
|
29109
29142
|
};
|
|
29110
29143
|
/**
|
|
@@ -29838,13 +29871,14 @@
|
|
|
29838
29871
|
* Enable or disable state
|
|
29839
29872
|
*/
|
|
29840
29873
|
AppEntityEditorModal.prototype.updateViewState = function (data, opts) {
|
|
29874
|
+
var _a;
|
|
29841
29875
|
if (this.isNewData || this.enabled) {
|
|
29842
29876
|
this.enable(opts);
|
|
29843
29877
|
}
|
|
29844
29878
|
else {
|
|
29845
29879
|
this.disable(opts);
|
|
29846
29880
|
// Allow to sort table
|
|
29847
|
-
this.tables.forEach(function (t) { return t.enableSort(); });
|
|
29881
|
+
(_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
|
|
29848
29882
|
}
|
|
29849
29883
|
};
|
|
29850
29884
|
AppEntityEditorModal.prototype.saveAndClose = function (event) {
|
|
@@ -30327,27 +30361,35 @@
|
|
|
30327
30361
|
fetchPolicy: (opts === null || opts === void 0 ? void 0 : opts.fetchPolicy) || 'cache-first',
|
|
30328
30362
|
insertFilterFn: filter && filter.asFilterFn()
|
|
30329
30363
|
})
|
|
30330
|
-
.pipe(operators.
|
|
30331
|
-
var data
|
|
30332
|
-
|
|
30333
|
-
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30364
|
+
.pipe(operators.mergeMap(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
30365
|
+
var data, result, nextOffset_1;
|
|
30366
|
+
var _this = this;
|
|
30367
|
+
return __generator(this, function (_b) {
|
|
30368
|
+
switch (_b.label) {
|
|
30369
|
+
case 0: return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30370
|
+
case 1:
|
|
30371
|
+
data = _b.sent();
|
|
30372
|
+
if (now) {
|
|
30373
|
+
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30374
|
+
now = null;
|
|
30375
|
+
}
|
|
30376
|
+
// Must re-order because of listenAllChanges result will add new event at the end
|
|
30377
|
+
data = EntityUtils.sort(data, page.sortBy, page.sortDirection);
|
|
30378
|
+
result = {
|
|
30379
|
+
data: data,
|
|
30380
|
+
total: toNumber(res === null || res === void 0 ? void 0 : res.total, data.length)
|
|
30381
|
+
};
|
|
30382
|
+
// Add fetch more capability, if total was fetched
|
|
30383
|
+
if (isNotNil(res.total)) {
|
|
30384
|
+
nextOffset_1 = (page.offset || 0) + data.length;
|
|
30385
|
+
if (nextOffset_1 < result.total) {
|
|
30386
|
+
result.fetchMore = function (_) { return _this.loadPage(Object.assign(Object.assign({}, page), { offset: nextOffset_1 }), filter, Object.assign(Object.assign({}, opts), { fetchPolicy: 'no-cache' })); };
|
|
30387
|
+
}
|
|
30388
|
+
}
|
|
30389
|
+
return [2 /*return*/, result];
|
|
30347
30390
|
}
|
|
30348
|
-
}
|
|
30349
|
-
|
|
30350
|
-
}));
|
|
30391
|
+
});
|
|
30392
|
+
}); }));
|
|
30351
30393
|
};
|
|
30352
30394
|
AbstractUserEventService.prototype.loadPage = function (page, filter, opts) {
|
|
30353
30395
|
var _a;
|
|
@@ -30385,10 +30427,12 @@
|
|
|
30385
30427
|
})];
|
|
30386
30428
|
case 1:
|
|
30387
30429
|
res = _b.sent();
|
|
30388
|
-
|
|
30430
|
+
return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30431
|
+
case 2:
|
|
30432
|
+
data = _b.sent();
|
|
30389
30433
|
if (now)
|
|
30390
30434
|
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30391
|
-
// Must re-order because of
|
|
30435
|
+
// Must re-order because of listenAllChanges result will add new event at the end
|
|
30392
30436
|
data = EntityUtils.sort(data, page.sortBy, page.sortDirection);
|
|
30393
30437
|
result = {
|
|
30394
30438
|
data: data,
|
|
@@ -30407,16 +30451,28 @@
|
|
|
30407
30451
|
});
|
|
30408
30452
|
};
|
|
30409
30453
|
AbstractUserEventService.prototype.add = function (entity) {
|
|
30410
|
-
|
|
30411
|
-
|
|
30412
|
-
|
|
30413
|
-
|
|
30414
|
-
|
|
30415
|
-
|
|
30416
|
-
|
|
30454
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30455
|
+
var withContent;
|
|
30456
|
+
return __generator(this, function (_b) {
|
|
30457
|
+
switch (_b.label) {
|
|
30458
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
30459
|
+
case 1:
|
|
30460
|
+
// TODO set an id !!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30461
|
+
entity = _b.sent();
|
|
30462
|
+
if (!entity)
|
|
30463
|
+
return [2 /*return*/]; // Rejected
|
|
30464
|
+
withContent = !!entity.content;
|
|
30465
|
+
// Add user event locally
|
|
30466
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30467
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30468
|
+
data: entity
|
|
30469
|
+
});
|
|
30470
|
+
// Update count
|
|
30471
|
+
this._countSubject.next(this._countSubject.value + 1);
|
|
30472
|
+
return [2 /*return*/];
|
|
30473
|
+
}
|
|
30474
|
+
});
|
|
30417
30475
|
});
|
|
30418
|
-
// Update count
|
|
30419
|
-
this._countSubject.next(this._countSubject.value + 1);
|
|
30420
30476
|
};
|
|
30421
30477
|
AbstractUserEventService.prototype.count = function (filter, options) {
|
|
30422
30478
|
var _a;
|
|
@@ -30483,38 +30539,50 @@
|
|
|
30483
30539
|
return total;
|
|
30484
30540
|
}));
|
|
30485
30541
|
};
|
|
30486
|
-
AbstractUserEventService.prototype.
|
|
30542
|
+
AbstractUserEventService.prototype.listenAllChanges = function (filter, opts) {
|
|
30487
30543
|
var _this = this;
|
|
30488
30544
|
var _a;
|
|
30489
|
-
if (!((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.
|
|
30490
|
-
console.warn(this._logPrefix + "Subscription query '
|
|
30545
|
+
if (!((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.listenAllChanges)) {
|
|
30546
|
+
console.warn(this._logPrefix + "Subscription query 'listenAllChanges' not provided, skip.");
|
|
30491
30547
|
return rxjs.of();
|
|
30492
30548
|
}
|
|
30493
30549
|
if (!filter)
|
|
30494
30550
|
filter = this.defaultFilter();
|
|
30495
30551
|
filter = this.asFilter(filter);
|
|
30496
|
-
var withContent = (
|
|
30552
|
+
var withContent = (opts === null || opts === void 0 ? void 0 : opts.withContent) === true;
|
|
30497
30553
|
if (this._debug)
|
|
30498
30554
|
console.debug(this._logPrefix + "[WS] Listening changes for user events with filter:", filter);
|
|
30499
30555
|
return this.graphql.subscribe({
|
|
30500
|
-
query: this.subscriptions.
|
|
30501
|
-
fetchPolicy:
|
|
30502
|
-
variables: { filter: filter.asPodObject(), interval: toNumber(
|
|
30556
|
+
query: this.subscriptions.listenAllChanges,
|
|
30557
|
+
fetchPolicy: opts === null || opts === void 0 ? void 0 : opts.fetchPolicy,
|
|
30558
|
+
variables: { filter: filter.asPodObject(), interval: toNumber(opts === null || opts === void 0 ? void 0 : opts.interval, 10) },
|
|
30503
30559
|
error: {
|
|
30504
30560
|
code: SocialErrorCodes.SUBSCRIBE_USER_EVENTS_ERROR,
|
|
30505
30561
|
message: 'SOCIAL.ERROR.SUBSCRIBE_USER_EVENTS_ERROR'
|
|
30506
30562
|
}
|
|
30507
|
-
}).pipe(operators.
|
|
30563
|
+
}).pipe(operators.mergeMap(function (_b) {
|
|
30508
30564
|
var data = _b.data;
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30516
|
-
|
|
30517
|
-
|
|
30565
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
30566
|
+
var _this = this;
|
|
30567
|
+
return __generator(this, function (_b) {
|
|
30568
|
+
switch (_b.label) {
|
|
30569
|
+
case 0:
|
|
30570
|
+
if (data && this._debug)
|
|
30571
|
+
console.debug(this._logPrefix + "Received new user events:", data);
|
|
30572
|
+
// Update cache (will update watchAll queries)
|
|
30573
|
+
if (isNotEmptyArray(data)) {
|
|
30574
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30575
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30576
|
+
data: data
|
|
30577
|
+
});
|
|
30578
|
+
}
|
|
30579
|
+
if (!(!opts || opts.toEntity !== false)) return [3 /*break*/, 2];
|
|
30580
|
+
return [4 /*yield*/, Promise.all((data || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30581
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
30582
|
+
case 2: return [2 /*return*/, data];
|
|
30583
|
+
}
|
|
30584
|
+
});
|
|
30585
|
+
});
|
|
30518
30586
|
}));
|
|
30519
30587
|
};
|
|
30520
30588
|
AbstractUserEventService.prototype.delete = function (entity) {
|
|
@@ -30631,7 +30699,7 @@
|
|
|
30631
30699
|
});
|
|
30632
30700
|
});
|
|
30633
30701
|
};
|
|
30634
|
-
AbstractUserEventService.prototype.
|
|
30702
|
+
AbstractUserEventService.prototype.markAllAsRead = function (entities) {
|
|
30635
30703
|
return __awaiter(this, void 0, void 0, function () {
|
|
30636
30704
|
var userEventWithoutReadListeners, _loop_1, this_1, _b, _c, entity, e_1_1;
|
|
30637
30705
|
var e_1, _d;
|
|
@@ -30764,33 +30832,60 @@
|
|
|
30764
30832
|
this._listenSubscription = undefined;
|
|
30765
30833
|
};
|
|
30766
30834
|
AbstractUserEventService.prototype.processUserEvent = function (source, that) {
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30835
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30836
|
+
var target, listeners, listeners_1, listeners_1_1, listener, res, _b, e_3_1;
|
|
30837
|
+
var e_3, _c;
|
|
30838
|
+
return __generator(this, function (_d) {
|
|
30839
|
+
switch (_d.label) {
|
|
30840
|
+
case 0:
|
|
30841
|
+
that = that || this;
|
|
30842
|
+
target = that.fromObject(source);
|
|
30843
|
+
listeners = (that.listeners || [])
|
|
30844
|
+
.filter(function (listener) { return !!listener.onReceived; })
|
|
30845
|
+
.filter(function (listener) { return listener.accept(target); });
|
|
30846
|
+
_d.label = 1;
|
|
30847
|
+
case 1:
|
|
30848
|
+
_d.trys.push([1, 9, 10, 11]);
|
|
30849
|
+
listeners_1 = __values(listeners), listeners_1_1 = listeners_1.next();
|
|
30850
|
+
_d.label = 2;
|
|
30851
|
+
case 2:
|
|
30852
|
+
if (!!listeners_1_1.done) return [3 /*break*/, 8];
|
|
30853
|
+
listener = listeners_1_1.value;
|
|
30854
|
+
if (!target) return [3 /*break*/, 6];
|
|
30855
|
+
res = listener.onReceived(target);
|
|
30856
|
+
if (!(res instanceof Promise)) return [3 /*break*/, 4];
|
|
30857
|
+
return [4 /*yield*/, res];
|
|
30858
|
+
case 3:
|
|
30859
|
+
_b = _d.sent();
|
|
30860
|
+
return [3 /*break*/, 5];
|
|
30861
|
+
case 4:
|
|
30862
|
+
_b = res;
|
|
30863
|
+
_d.label = 5;
|
|
30864
|
+
case 5:
|
|
30865
|
+
target = _b;
|
|
30866
|
+
return [3 /*break*/, 7];
|
|
30867
|
+
case 6:
|
|
30868
|
+
if (that._debug)
|
|
30869
|
+
console.debug(that._logPrefix + "Event has been rejected by a listener", source);
|
|
30870
|
+
return [3 /*break*/, 8];
|
|
30871
|
+
case 7:
|
|
30872
|
+
listeners_1_1 = listeners_1.next();
|
|
30873
|
+
return [3 /*break*/, 2];
|
|
30874
|
+
case 8: return [3 /*break*/, 11];
|
|
30875
|
+
case 9:
|
|
30876
|
+
e_3_1 = _d.sent();
|
|
30877
|
+
e_3 = { error: e_3_1 };
|
|
30878
|
+
return [3 /*break*/, 11];
|
|
30879
|
+
case 10:
|
|
30880
|
+
try {
|
|
30881
|
+
if (listeners_1_1 && !listeners_1_1.done && (_c = listeners_1.return)) _c.call(listeners_1);
|
|
30882
|
+
}
|
|
30883
|
+
finally { if (e_3) throw e_3.error; }
|
|
30884
|
+
return [7 /*endfinally*/];
|
|
30885
|
+
case 11: return [2 /*return*/, target];
|
|
30783
30886
|
}
|
|
30784
|
-
}
|
|
30785
|
-
}
|
|
30786
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
30787
|
-
finally {
|
|
30788
|
-
try {
|
|
30789
|
-
if (listeners_1_1 && !listeners_1_1.done && (_b = listeners_1.return)) _b.call(listeners_1);
|
|
30790
|
-
}
|
|
30791
|
-
finally { if (e_3) throw e_3.error; }
|
|
30792
|
-
}
|
|
30793
|
-
return target;
|
|
30887
|
+
});
|
|
30888
|
+
});
|
|
30794
30889
|
};
|
|
30795
30890
|
AbstractUserEventService.prototype.defaultMarkAsRead = function (userEvents) {
|
|
30796
30891
|
var _a;
|
|
@@ -30883,17 +30978,28 @@
|
|
|
30883
30978
|
this.popoverController = popoverController;
|
|
30884
30979
|
this.settings = settings;
|
|
30885
30980
|
this.userEventService = userEventService;
|
|
30886
|
-
this.
|
|
30887
|
-
this.
|
|
30981
|
+
this._subscriptions = new rxjs.Subscription();
|
|
30982
|
+
this._$pageSize = new rxjs.BehaviorSubject(20);
|
|
30983
|
+
this.fetchingMore = false;
|
|
30984
|
+
this.$items = new rxjs.BehaviorSubject(undefined);
|
|
30985
|
+
this.$itemCount = new rxjs.BehaviorSubject(undefined);
|
|
30888
30986
|
this.debug = false;
|
|
30889
|
-
this.pageSize = 10;
|
|
30890
30987
|
this.sortBy = 'creationDate';
|
|
30891
30988
|
this.sortDirection = 'desc';
|
|
30892
30989
|
this.enableInfiniteScroll = true;
|
|
30893
|
-
this.$items = new rxjs.BehaviorSubject(undefined);
|
|
30894
|
-
this.$itemCount = new rxjs.BehaviorSubject(undefined);
|
|
30895
30990
|
this.mobile = ((_a = this.settings) === null || _a === void 0 ? void 0 : _a.mobile) || false;
|
|
30896
30991
|
}
|
|
30992
|
+
Object.defineProperty(UserEventNotificationList.prototype, "pageSize", {
|
|
30993
|
+
get: function () {
|
|
30994
|
+
return this._$pageSize.value;
|
|
30995
|
+
},
|
|
30996
|
+
set: function (value) {
|
|
30997
|
+
if (value > 0 && value !== this._$pageSize.value)
|
|
30998
|
+
this._$pageSize.next(value);
|
|
30999
|
+
},
|
|
31000
|
+
enumerable: false,
|
|
31001
|
+
configurable: true
|
|
31002
|
+
});
|
|
30897
31003
|
Object.defineProperty(UserEventNotificationList.prototype, "canFetchMore", {
|
|
30898
31004
|
get: function () {
|
|
30899
31005
|
return this.enableInfiniteScroll && !!this._fetchMoreFn;
|
|
@@ -30905,27 +31011,31 @@
|
|
|
30905
31011
|
var _this = this;
|
|
30906
31012
|
// Watch all user events
|
|
30907
31013
|
if (this.userEventService) {
|
|
30908
|
-
this.
|
|
30909
|
-
.watchAll(0, this.pageSize, this.sortBy, this.sortDirection, this.filter)
|
|
31014
|
+
this._subscriptions.add(this._$pageSize.pipe(operators.distinctUntilChanged(), operators.switchMap(function (pageSize) { return _this.userEventService.watchAll(0, pageSize, _this.sortBy, _this.sortDirection, _this.filter); }))
|
|
30910
31015
|
.subscribe(function (result) {
|
|
30911
31016
|
var _a;
|
|
30912
31017
|
if (_this.debug)
|
|
30913
|
-
console.debug("[user-event-notification-list]
|
|
31018
|
+
console.debug("[user-event-notification-list] Receiving " + result.total + " user events", result.data);
|
|
30914
31019
|
_this.$items.next(result.data);
|
|
30915
31020
|
_this.$itemCount.next(result.total || ((_a = result.data) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
30916
31021
|
_this._fetchMoreFn = result.fetchMore;
|
|
31022
|
+
_this.fetchingMore = false; // Allow to refetch more
|
|
30917
31023
|
_this.markForCheck();
|
|
30918
31024
|
}));
|
|
30919
31025
|
// Listen changes
|
|
30920
|
-
this.
|
|
31026
|
+
this._subscriptions.add(this.userEventService.listenAllChanges(this.filter)
|
|
30921
31027
|
.subscribe(function (data) {
|
|
30922
31028
|
if (_this.debug)
|
|
30923
|
-
console.debug("[user-event-notification-list]
|
|
31029
|
+
console.debug("[user-event-notification-list] Receiving " + data.length + " new user events (by WS)", data);
|
|
30924
31030
|
}));
|
|
31031
|
+
if (this.enableInfiniteScroll)
|
|
31032
|
+
this.initInfiniteScroll();
|
|
30925
31033
|
}
|
|
30926
31034
|
};
|
|
30927
31035
|
UserEventNotificationList.prototype.ngOnDestroy = function () {
|
|
30928
|
-
this.
|
|
31036
|
+
this._subscriptions.unsubscribe();
|
|
31037
|
+
this.$items.complete();
|
|
31038
|
+
this.$itemCount.complete();
|
|
30929
31039
|
};
|
|
30930
31040
|
UserEventNotificationList.prototype.click = function (event, userEvent) {
|
|
30931
31041
|
if (!userEvent)
|
|
@@ -30987,65 +31097,77 @@
|
|
|
30987
31097
|
};
|
|
30988
31098
|
UserEventNotificationList.prototype.dismiss = function () {
|
|
30989
31099
|
this.popoverController.dismiss();
|
|
31100
|
+
// Reset counter (need if event has been received while popover if open)
|
|
31101
|
+
this.userEventService.resetCount();
|
|
30990
31102
|
};
|
|
30991
31103
|
UserEventNotificationList.prototype.fetchMore = function (event) {
|
|
30992
31104
|
var _a;
|
|
30993
31105
|
return __awaiter(this, void 0, void 0, function () {
|
|
30994
|
-
var result, data, err_2;
|
|
31106
|
+
var fetchMoreFn, result, data, err_2;
|
|
30995
31107
|
return __generator(this, function (_b) {
|
|
30996
31108
|
switch (_b.label) {
|
|
30997
31109
|
case 0:
|
|
30998
|
-
if (!this._fetchMoreFn || this.
|
|
31110
|
+
if (!this._fetchMoreFn || this.fetchingMore)
|
|
30999
31111
|
return [2 /*return*/];
|
|
31000
31112
|
console.debug('[user-event-notification-list] Fetching more notifications...', event);
|
|
31001
|
-
this.
|
|
31113
|
+
this.fetchingMore = true;
|
|
31114
|
+
fetchMoreFn = this._fetchMoreFn;
|
|
31002
31115
|
_b.label = 1;
|
|
31003
31116
|
case 1:
|
|
31004
31117
|
_b.trys.push([1, 3, 4, 5]);
|
|
31005
|
-
return [4 /*yield*/,
|
|
31118
|
+
return [4 /*yield*/, fetchMoreFn()];
|
|
31006
31119
|
case 2:
|
|
31007
31120
|
result = _b.sent();
|
|
31008
31121
|
data = __spread((this.$items.value || []), result.data);
|
|
31009
31122
|
// Remove duplication (e.g. when new user event was added by subscription)
|
|
31010
31123
|
data = removeDuplicatesFromArray(data, 'id');
|
|
31124
|
+
// fetch more changes (e.g. if watchAll observable as been refreshed)
|
|
31125
|
+
if (fetchMoreFn !== this._fetchMoreFn)
|
|
31126
|
+
return [2 /*return*/]; // Skip
|
|
31011
31127
|
this.$items.next(data);
|
|
31012
31128
|
this.$itemCount.next(result.total || ((_a = result.data) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
31013
31129
|
this._fetchMoreFn = result.fetchMore;
|
|
31130
|
+
// Update the page size, to keep same scroll height, after the next refresh
|
|
31131
|
+
this.pageSize = Math.max(this.pageSize, data.length);
|
|
31014
31132
|
return [3 /*break*/, 5];
|
|
31015
31133
|
case 3:
|
|
31016
31134
|
err_2 = _b.sent();
|
|
31017
31135
|
console.error(err_2);
|
|
31018
|
-
this._fetchMoreFn = undefined;
|
|
31136
|
+
this._fetchMoreFn = undefined; // Forget the function
|
|
31019
31137
|
return [3 /*break*/, 5];
|
|
31020
31138
|
case 4:
|
|
31021
31139
|
this.markForCheck();
|
|
31022
|
-
this.
|
|
31140
|
+
this.fetchingMore = false;
|
|
31023
31141
|
return [7 /*endfinally*/];
|
|
31024
31142
|
case 5: return [2 /*return*/];
|
|
31025
31143
|
}
|
|
31026
31144
|
});
|
|
31027
31145
|
});
|
|
31028
31146
|
};
|
|
31029
|
-
UserEventNotificationList.prototype.
|
|
31147
|
+
UserEventNotificationList.prototype.trackByFn = function (index, item) {
|
|
31148
|
+
return item.id;
|
|
31149
|
+
};
|
|
31150
|
+
UserEventNotificationList.prototype.initInfiniteScroll = function (threshold) {
|
|
31030
31151
|
return __awaiter(this, void 0, void 0, function () {
|
|
31031
31152
|
var panel;
|
|
31032
31153
|
var _this = this;
|
|
31033
31154
|
return __generator(this, function (_b) {
|
|
31034
31155
|
switch (_b.label) {
|
|
31035
31156
|
case 0:
|
|
31157
|
+
console.debug('[user-event-notification-list] Init infinite loop');
|
|
31036
31158
|
if (this._fetchMoreSubscription)
|
|
31037
31159
|
this._fetchMoreSubscription.unsubscribe();
|
|
31038
31160
|
threshold = threshold || (this.mobile ? '15%' : '2%');
|
|
31039
|
-
return [4 /*yield*/, waitFor(function () { return !!_this.ionContent; })];
|
|
31161
|
+
return [4 /*yield*/, waitFor(function () { return !!_this.ionContent; }, { dueTime: 250, timeout: 1000 })];
|
|
31040
31162
|
case 1:
|
|
31041
31163
|
_b.sent();
|
|
31042
31164
|
return [4 /*yield*/, this.ionContent.getScrollElement()];
|
|
31043
31165
|
case 2:
|
|
31044
31166
|
panel = _b.sent();
|
|
31045
31167
|
// Trigger fetch more, end end scroll reached
|
|
31046
|
-
this._fetchMoreSubscription = fromScrollEndEvent(panel, threshold, 250 /*force to check when no scrollbar - e.g. in large screen*/)
|
|
31168
|
+
this._fetchMoreSubscription = this.$items.pipe(operators.debounceTime(250), operators.filter(function () { return _this.canFetchMore; }), operators.switchMap(function () { return fromScrollEndEvent(panel, threshold, 250 /*force to check when no scrollbar - e.g. in large screen*/); }))
|
|
31047
31169
|
.subscribe(function () { return _this.fetchMore(); });
|
|
31048
|
-
this.
|
|
31170
|
+
this._subscriptions.add(this._fetchMoreSubscription);
|
|
31049
31171
|
return [2 /*return*/];
|
|
31050
31172
|
}
|
|
31051
31173
|
});
|
|
@@ -31059,9 +31181,9 @@
|
|
|
31059
31181
|
UserEventNotificationList.decorators = [
|
|
31060
31182
|
{ type: i0.Component, args: [{
|
|
31061
31183
|
selector: 'app-user-event-notification-list',
|
|
31062
|
-
template: "<ion-content>\n <ion-list class=\"ion-list-popover\">\n\n <ion-row class=\"ion-list-header column\">\n <ion-col>\n <ion-label>{{titleI18n | translate}}</ion-label>\n </ion-col>\n <ion-col class=\"top-action\" *ngIf=\"$items|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"markAllAsRead($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item\n *ngFor=\"let item of $items | async; last as last\"\n [lines]=\"last ? 'none' : undefined\"\n [class.unread]=\"!item.readDate\"\n [class.tappable]=\"item.actions|arrayFilter:isDefaultAction|isNotEmptyArray\"\n (click)=\"click($event, item)\">\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"item.avatar; else avatarIcon\" src=\"{{ item.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"item.avatarIcon\"\n [ref]=\"item.avatarIcon\"\n height=\"40\"\n width=\"40\"\n ></app-icon>\n </ng-template>\n\n </ion-avatar>\n\n <ion-grid class=\"ion-no-margin ion-no-padding message\">\n <ion-row>\n <ion-col size=\"12\">\n <p [class.unread]=\"!item.readDate\" [innerHTML]=\"item.message\"></p>\n </ion-col>\n </ion-row>\n\n <!-- date -->\n <ion-row>\n <ion-col size=\"12\">\n <app-icon\n *ngIf=\"item.icon\"\n [ref]=\"item.icon\"\n height=\"16\"\n width=\"16\"\n style=\"vertical-align: sub; margin-right: 3px\"\n ></app-icon>\n <small>\n <span>{{item.creationDate|dateFromNow}}</span>\n <span style=\"color: gray\">{{ ' | ' + (item.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n\n <!-- actions -->\n <ion-row *ngIf=\"item.actions|isNotEmptyArray\">\n <ion-col></ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngFor=\"let action of item.actions\">\n <a *ngIf=\"!action.default\" class=\"action\" (click)=\"executeAction($event, action, item)\" [title]=\"(action.title || action.name) |translate\">\n <app-icon *ngIf=\"action.iconRef\" slot=\"start\" height=\"20\" width=\"20\" [ref]=\"action.iconRef\"></app-icon>\n <span>{{ action.name | translate }}</span>\n </a>\n </ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <mat-icon slot=\"end\" *ngIf=\"item.actions|arrayFilter: isDefaultAction|isNotEmptyArray\">chevron_right</mat-icon>\n </ion-item>\n\n <!-- loading -->\n <
|
|
31184
|
+
template: "<ion-content>\n <ion-list class=\"ion-list-popover\">\n\n <ion-row class=\"ion-list-header column\">\n <ion-col>\n <ion-label>{{titleI18n | translate}}</ion-label>\n </ion-col>\n <ion-col class=\"top-action\" *ngIf=\"$items|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"markAllAsRead($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item\n *ngFor=\"let item of $items | async; trackBy: trackByFn; last as last\"\n [lines]=\"last ? 'none' : undefined\"\n [class.unread]=\"!item.readDate\"\n [class.tappable]=\"item.actions|arrayFilter:isDefaultAction|isNotEmptyArray\"\n (click)=\"click($event, item)\">\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"item.avatar; else avatarIcon\" src=\"{{ item.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"item.avatarIcon; else generateIcon\"\n [ref]=\"item.avatarIcon\"\n height=\"40\"\n width=\"40\"\n ></app-icon>\n </ng-template>\n\n <ng-template #generateIcon>\n <div class=\"avatar\" *ngIf=\"item.avatarJdenticon\">\n <svg width=\"40\" width=\"40\" [data-jdenticon-value]=\"item.avatarJdenticon\"></svg>\n </div>\n </ng-template>\n\n </ion-avatar>\n\n <ion-grid class=\"ion-no-margin ion-no-padding message\">\n <ion-row>\n <ion-col size=\"12\">\n <p [class.unread]=\"!item.readDate\" [innerHTML]=\"item.message\"></p>\n </ion-col>\n </ion-row>\n\n <!-- date -->\n <ion-row>\n <ion-col size=\"12\">\n <app-icon\n *ngIf=\"item.icon\"\n [ref]=\"item.icon\"\n height=\"16\"\n width=\"16\"\n style=\"vertical-align: sub; margin-right: 3px\"\n ></app-icon>\n <small>\n <span>{{item.creationDate|dateFromNow}}</span>\n <span style=\"color: gray\">{{ ' | ' + (item.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n\n <!-- actions -->\n <ion-row *ngIf=\"item.actions|isNotEmptyArray\">\n <ion-col></ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngFor=\"let action of item.actions\">\n <a *ngIf=\"!action.default\" class=\"action\" (click)=\"executeAction($event, action, item)\" [title]=\"(action.title || action.name) |translate\">\n <app-icon *ngIf=\"action.iconRef\" slot=\"start\" height=\"20\" width=\"20\" [ref]=\"action.iconRef\"></app-icon>\n <span>{{ action.name | translate }}</span>\n </a>\n </ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <mat-icon slot=\"end\" *ngIf=\"item.actions|arrayFilter: isDefaultAction|isNotEmptyArray\">chevron_right</mat-icon>\n </ion-item>\n\n <!-- loading -->\n <ng-container *ngIf=\"!($items|async); else notLoading\">\n <ng-container *ngTemplateOutlet=\"loadingItem\"></ng-container>\n </ng-container>\n\n <ng-template #notLoading>\n <!-- no result -->\n <ion-item *ngIf=\"$items|async|isEmptyArray\" lines=\"none\">\n <ion-text color=\"dark\" class=\"text-italic\">{{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}</ion-text>\n </ion-item>\n\n <!-- Fetching more -->\n <ng-container *ngIf=\"fetchingMore; else infiniteLoop\" lines=\"none\" disabled>\n <ng-container *ngTemplateOutlet=\"loadingItem\"></ng-container>\n </ng-container>\n\n <!-- Infinite loop -->\n <ng-template #infiniteLoop>\n <ng-container *ngIf=\"canFetchMore\" lines=\"none\" disabled\n [ngTemplateOutlet]=\"loadingItem\">\n </ng-container>\n </ng-template>\n </ng-template>\n\n <!-- footer -->\n <ion-row class=\"ion-list-footer column\">\n <ion-col>\n <ion-text *ngIf=\"$itemCount|async; let count\"\n 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 </ion-list>\n</ion-content>\n\n<!-- loading -->\n<ng-template #loadingItem>\n <ion-item lines=\"none\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </ion-item>\n</ng-template>\n",
|
|
31063
31185
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
31064
|
-
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none
|
|
31186
|
+
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;max-height:calc(90vh - 20px)}ion-list ion-item.tappable{cursor:pointer}ion-list ion-item.tappable:hover{--ion-item-background:var(--ion-item-background-color-hover)}.message{font-size:.9em}.message p{margin-top:5px;margin-bottom:5px}.message p.unread{font-weight:700}.top-action{text-align:end;margin-right:8px}.top-action a{cursor:pointer;color:var(--ion-color-contrast)}.top-action a:hover{text-decoration:underline}a.action{font-size:.9em;margin-right:10px;cursor:pointer}a.action:hover span{text-decoration:underline}a.action app-icon{vertical-align:middle}ion-avatar .avatar svg,ion-avatar img{border:1px solid rgba(var(--ion-color-secondary-rgb,.5));border-radius:50%}"]
|
|
31065
31187
|
},] }
|
|
31066
31188
|
];
|
|
31067
31189
|
UserEventNotificationList.ctorParameters = function () { return [
|
|
@@ -31074,11 +31196,11 @@
|
|
|
31074
31196
|
debug: [{ type: i0.Input }],
|
|
31075
31197
|
mobile: [{ type: i0.Input }],
|
|
31076
31198
|
titleI18n: [{ type: i0.Input }],
|
|
31077
|
-
pageSize: [{ type: i0.Input }],
|
|
31078
31199
|
sortBy: [{ type: i0.Input }],
|
|
31079
31200
|
sortDirection: [{ type: i0.Input }],
|
|
31080
31201
|
filter: [{ type: i0.Input }],
|
|
31081
31202
|
enableInfiniteScroll: [{ type: i0.Input }],
|
|
31203
|
+
pageSize: [{ type: i0.Input }],
|
|
31082
31204
|
readEvent: [{ type: i0.Output }],
|
|
31083
31205
|
readEvents: [{ type: i0.Output }],
|
|
31084
31206
|
ionContent: [{ type: i0.ViewChild, args: [i1$5.IonContent,] }],
|
|
@@ -31126,12 +31248,12 @@
|
|
|
31126
31248
|
// Wait service
|
|
31127
31249
|
_a.sent();
|
|
31128
31250
|
// Subscribe to read event
|
|
31129
|
-
this._readEvent.subscribe(function (
|
|
31251
|
+
this._readEvent.subscribe(function (item) {
|
|
31130
31252
|
// default: mark event as read
|
|
31131
|
-
_this.userEventService.
|
|
31253
|
+
_this.userEventService.markAllAsRead([item]);
|
|
31132
31254
|
});
|
|
31133
|
-
this._readEvents.subscribe(function (
|
|
31134
|
-
_this.userEventService.
|
|
31255
|
+
this._readEvents.subscribe(function (items) {
|
|
31256
|
+
_this.userEventService.markAllAsRead(items);
|
|
31135
31257
|
});
|
|
31136
31258
|
return [2 /*return*/];
|
|
31137
31259
|
}
|
|
@@ -31152,7 +31274,8 @@
|
|
|
31152
31274
|
debug: this.debug,
|
|
31153
31275
|
titleI18n: this.titleI18n,
|
|
31154
31276
|
readEvent: this._readEvent,
|
|
31155
|
-
readEvents: this._readEvents
|
|
31277
|
+
readEvents: this._readEvents,
|
|
31278
|
+
filter: this.filter
|
|
31156
31279
|
},
|
|
31157
31280
|
backdropDismiss: true,
|
|
31158
31281
|
keyboardClose: true,
|
|
@@ -31206,7 +31329,8 @@
|
|
|
31206
31329
|
imports: [
|
|
31207
31330
|
i1$4.CommonModule,
|
|
31208
31331
|
SharedModule,
|
|
31209
|
-
AppIconModule
|
|
31332
|
+
AppIconModule,
|
|
31333
|
+
ngxJdenticon.NgxJdenticonModule
|
|
31210
31334
|
],
|
|
31211
31335
|
declarations: [
|
|
31212
31336
|
AppUserEventNotificationIcon,
|
|
@@ -31555,7 +31679,7 @@
|
|
|
31555
31679
|
{ type: i0.Component, args: [{
|
|
31556
31680
|
selector: 'app-job-progression-list',
|
|
31557
31681
|
template: "<ion-list class=\"ion-list-popover\">\n\n <ion-row class=\"ion-list-header column\">\n <ion-col>\n <ion-label>{{titleI18n | translate}}</ion-label>\n </ion-col>\n </ion-row>\n\n <ion-item *ngIf=\"!jobProgressions?.length\">\n {{'SOCIAL.JOB.PROGRESSION.EMPTY' | translate}}\n </ion-item>\n <ion-item *ngFor=\"let jobProgression of jobProgressions\" class=\"ion-item-job-progression\">\n <ion-grid class=\"ion-no-margin\">\n <ion-row class=\"name\">\n <ion-col>\n {{jobProgression.name}}\n </ion-col>\n </ion-row>\n <ion-row class=\"message\">\n <ion-col>\n {{jobProgression.message}}\n </ion-col>\n </ion-row>\n <ion-row class=\"progress-bar\">\n <ion-col>\n <ion-progress-bar\n [value]=\"jobProgression.total > 0 ? jobProgression.current / jobProgression.total : undefined\"\n [type]=\"jobProgression.total > 0 ? 'determinate' : 'indeterminate'\">\n </ion-progress-bar>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-item>\n\n</ion-list>\n",
|
|
31558
|
-
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none
|
|
31682
|
+
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ion-item-job-progression{font-size:.9em}.ion-item-job-progression .message{font-style:italic}.ion-item-job-progression .progress-bar{margin-top:5px;margin-bottom:5px}"]
|
|
31559
31683
|
},] }
|
|
31560
31684
|
];
|
|
31561
31685
|
JobProgressionList.ctorParameters = function () { return []; };
|
|
@@ -31820,118 +31944,8 @@
|
|
|
31820
31944
|
},] }
|
|
31821
31945
|
];
|
|
31822
31946
|
|
|
31823
|
-
var UserEvent_1;
|
|
31824
|
-
var UserEventTypes = {
|
|
31825
|
-
DEBUG_DATA: 'DEBUG_DATA',
|
|
31826
|
-
INBOX_MESSAGE: 'INBOX_MESSAGE'
|
|
31827
|
-
};
|
|
31828
|
-
// @dynamic
|
|
31829
|
-
exports.UserEvent = UserEvent_1 = /** @class */ (function (_super) {
|
|
31830
|
-
__extends(UserEvent, _super);
|
|
31831
|
-
function UserEvent() {
|
|
31832
|
-
return _super.call(this, UserEvent_1.TYPENAME) || this;
|
|
31833
|
-
}
|
|
31834
|
-
UserEvent.prototype.asObject = function (opts) {
|
|
31835
|
-
var target = _super.prototype.asObject.call(this, opts);
|
|
31836
|
-
target.creationDate = toDateISOString(this.creationDate);
|
|
31837
|
-
target.readDate = toDateISOString(this.readDate);
|
|
31838
|
-
// Serialize content
|
|
31839
|
-
if (typeof target.content === 'object') {
|
|
31840
|
-
target.content = JSON.stringify(target.content);
|
|
31841
|
-
}
|
|
31842
|
-
delete target.avatar;
|
|
31843
|
-
delete target.avatarIcon;
|
|
31844
|
-
delete target.icon;
|
|
31845
|
-
delete target.actions;
|
|
31846
|
-
return target;
|
|
31847
|
-
};
|
|
31848
|
-
UserEvent.prototype.fromObject = function (source) {
|
|
31849
|
-
Object.assign(this, source); // Copy all properties
|
|
31850
|
-
_super.prototype.fromObject.call(this, source);
|
|
31851
|
-
this.creationDate = fromDateISOString(source.creationDate);
|
|
31852
|
-
this.readDate = fromDateISOString(source.readDate);
|
|
31853
|
-
try {
|
|
31854
|
-
// Deserialize content
|
|
31855
|
-
if (typeof source.content === 'string' && source.content.startsWith('{')) {
|
|
31856
|
-
this.content = JSON.parse(source.content);
|
|
31857
|
-
}
|
|
31858
|
-
// Deserialize content.context
|
|
31859
|
-
if (this.content && typeof this.content.context === 'string' && this.content.context.startsWith('{')) {
|
|
31860
|
-
this.content.context = JSON.parse(this.content.context);
|
|
31861
|
-
}
|
|
31862
|
-
}
|
|
31863
|
-
catch (err) {
|
|
31864
|
-
console.error('Error during UserEvent deserialization', err);
|
|
31865
|
-
}
|
|
31866
|
-
};
|
|
31867
|
-
return UserEvent;
|
|
31868
|
-
}(Entity));
|
|
31869
|
-
exports.UserEvent = UserEvent_1 = __decorate([
|
|
31870
|
-
EntityClass({ typename: 'UserEventVO' })
|
|
31871
|
-
], exports.UserEvent);
|
|
31872
|
-
// @dynamic
|
|
31873
|
-
exports.UserEventFilter = /** @class */ (function (_super) {
|
|
31874
|
-
__extends(UserEventFilter, _super);
|
|
31875
|
-
function UserEventFilter() {
|
|
31876
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
31877
|
-
_this.types = [];
|
|
31878
|
-
_this.levels = [];
|
|
31879
|
-
_this.issuers = [];
|
|
31880
|
-
_this.recipients = [];
|
|
31881
|
-
_this.startDate = null;
|
|
31882
|
-
_this.excludeRead = false;
|
|
31883
|
-
return _this;
|
|
31884
|
-
}
|
|
31885
|
-
UserEventFilter.prototype.fromObject = function (source, opts) {
|
|
31886
|
-
_super.prototype.fromObject.call(this, source, opts);
|
|
31887
|
-
this.types = source.types || [];
|
|
31888
|
-
this.levels = source.levels || [];
|
|
31889
|
-
this.issuers = source.issuers || [];
|
|
31890
|
-
this.recipients = source.recipients || [];
|
|
31891
|
-
this.startDate = fromDateISOString(source.startDate);
|
|
31892
|
-
this.excludeRead = source.excludeRead || false;
|
|
31893
|
-
};
|
|
31894
|
-
UserEventFilter.prototype.buildFilter = function () {
|
|
31895
|
-
var _this = this;
|
|
31896
|
-
var filterFns = _super.prototype.buildFilter.call(this);
|
|
31897
|
-
if (isNotEmptyArray(this.types)) {
|
|
31898
|
-
filterFns.push(function (t) { return _this.types.includes(t.type); });
|
|
31899
|
-
}
|
|
31900
|
-
if (isNotEmptyArray(this.levels)) {
|
|
31901
|
-
filterFns.push(function (t) { return _this.levels.includes(t.level); });
|
|
31902
|
-
}
|
|
31903
|
-
if (isNotEmptyArray(this.issuers)) {
|
|
31904
|
-
filterFns.push(function (t) { return _this.issuers.includes(t.issuer); });
|
|
31905
|
-
}
|
|
31906
|
-
if (isNotEmptyArray(this.recipients)) {
|
|
31907
|
-
filterFns.push(function (t) { return _this.recipients.includes(t.recipient); });
|
|
31908
|
-
}
|
|
31909
|
-
if (isNotNil(this.startDate)) {
|
|
31910
|
-
filterFns.push(function (t) { return _this.startDate.isSameOrBefore(t.creationDate); });
|
|
31911
|
-
}
|
|
31912
|
-
if (this.excludeRead === true) {
|
|
31913
|
-
filterFns.push(function (t) { return isNil(t.readSignature); }); // todo or t.signature ?
|
|
31914
|
-
}
|
|
31915
|
-
return filterFns;
|
|
31916
|
-
};
|
|
31917
|
-
UserEventFilter.prototype.asObject = function (opts) {
|
|
31918
|
-
var target = _super.prototype.asObject.call(this, opts);
|
|
31919
|
-
return target;
|
|
31920
|
-
};
|
|
31921
|
-
return UserEventFilter;
|
|
31922
|
-
}(EntityFilter));
|
|
31923
|
-
exports.UserEventFilter = __decorate([
|
|
31924
|
-
EntityClass({ typename: 'UserEventFilterVO' })
|
|
31925
|
-
], exports.UserEventFilter);
|
|
31926
|
-
|
|
31927
|
-
var UserEventFragments = {
|
|
31928
|
-
userEvent: core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"], ["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"]))),
|
|
31929
|
-
lightUserEvent: core.gql(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"], ["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"])))
|
|
31930
|
-
};
|
|
31931
|
-
var templateObject_1$3, templateObject_2$2;
|
|
31932
|
-
|
|
31933
31947
|
var Mutations = {
|
|
31934
|
-
send: core.gql(templateObject_1$
|
|
31948
|
+
send: core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"], ["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"])))
|
|
31935
31949
|
};
|
|
31936
31950
|
var MessageService = /** @class */ (function (_super) {
|
|
31937
31951
|
__extends(MessageService, _super);
|
|
@@ -32015,7 +32029,7 @@
|
|
|
32015
32029
|
{ type: i1$5.ToastController },
|
|
32016
32030
|
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
32017
32031
|
]; };
|
|
32018
|
-
var templateObject_1$
|
|
32032
|
+
var templateObject_1$3;
|
|
32019
32033
|
|
|
32020
32034
|
var PersonFilter_1;
|
|
32021
32035
|
// @dynamic
|
|
@@ -32074,11 +32088,11 @@
|
|
|
32074
32088
|
], exports.PersonFilter);
|
|
32075
32089
|
|
|
32076
32090
|
var PersonFragments = {
|
|
32077
|
-
person: core.gql(templateObject_1$
|
|
32091
|
+
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 }"])))
|
|
32078
32092
|
};
|
|
32079
32093
|
// Load persons query
|
|
32080
32094
|
var PersonQueries = {
|
|
32081
|
-
loadAll: core.gql(templateObject_2$
|
|
32095
|
+
loadAll: core.gql(templateObject_2$2 || (templateObject_2$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),
|
|
32082
32096
|
loadAllWithTotal: core.gql(templateObject_3$2 || (templateObject_3$2 = __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)
|
|
32083
32097
|
};
|
|
32084
32098
|
var PersonMutations = {
|
|
@@ -32214,7 +32228,7 @@
|
|
|
32214
32228
|
{ type: NetworkService },
|
|
32215
32229
|
{ type: EntitiesStorage }
|
|
32216
32230
|
]; };
|
|
32217
|
-
var templateObject_1$
|
|
32231
|
+
var templateObject_1$4, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2;
|
|
32218
32232
|
|
|
32219
32233
|
var PersonValidatorService = /** @class */ (function () {
|
|
32220
32234
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -32280,7 +32294,6 @@
|
|
|
32280
32294
|
_this.statusById = StatusById;
|
|
32281
32295
|
_this.filterCriteriaCount = 0;
|
|
32282
32296
|
_this.useSticky = false;
|
|
32283
|
-
_this.referentialToString = referentialToString;
|
|
32284
32297
|
_this.canEdit = accountService.isAdmin();
|
|
32285
32298
|
_this.canSendMessage = _this.canEdit;
|
|
32286
32299
|
_this.inlineEdition = _this.canEdit;
|
|
@@ -34153,6 +34166,106 @@
|
|
|
34153
34166
|
},] }
|
|
34154
34167
|
];
|
|
34155
34168
|
|
|
34169
|
+
var UserEventTest_1;
|
|
34170
|
+
// @dynamic
|
|
34171
|
+
var UserEventTest = UserEventTest_1 = /** @class */ (function (_super) {
|
|
34172
|
+
__extends(UserEventTest, _super);
|
|
34173
|
+
function UserEventTest() {
|
|
34174
|
+
return _super.call(this, UserEventTest_1.TYPENAME) || this;
|
|
34175
|
+
}
|
|
34176
|
+
UserEventTest.prototype.asObject = function (opts) {
|
|
34177
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
34178
|
+
target.creationDate = toDateISOString(this.creationDate);
|
|
34179
|
+
target.readDate = toDateISOString(this.readDate);
|
|
34180
|
+
// Serialize content
|
|
34181
|
+
if (typeof target.content === 'object') {
|
|
34182
|
+
target.content = JSON.stringify(target.content);
|
|
34183
|
+
}
|
|
34184
|
+
delete target.avatar;
|
|
34185
|
+
delete target.avatarIcon;
|
|
34186
|
+
delete target.icon;
|
|
34187
|
+
delete target.actions;
|
|
34188
|
+
return target;
|
|
34189
|
+
};
|
|
34190
|
+
UserEventTest.prototype.fromObject = function (source) {
|
|
34191
|
+
Object.assign(this, source); // Copy all properties
|
|
34192
|
+
_super.prototype.fromObject.call(this, source);
|
|
34193
|
+
this.creationDate = fromDateISOString(source.creationDate);
|
|
34194
|
+
this.readDate = fromDateISOString(source.readDate);
|
|
34195
|
+
try {
|
|
34196
|
+
// Deserialize content
|
|
34197
|
+
if (typeof source.content === 'string' && source.content.startsWith('{')) {
|
|
34198
|
+
this.content = JSON.parse(source.content);
|
|
34199
|
+
}
|
|
34200
|
+
// Deserialize content.context
|
|
34201
|
+
if (this.content && typeof this.content.context === 'string' && this.content.context.startsWith('{')) {
|
|
34202
|
+
this.content.context = JSON.parse(this.content.context);
|
|
34203
|
+
}
|
|
34204
|
+
}
|
|
34205
|
+
catch (err) {
|
|
34206
|
+
console.error('Error during UserEvent deserialization', err);
|
|
34207
|
+
}
|
|
34208
|
+
};
|
|
34209
|
+
return UserEventTest;
|
|
34210
|
+
}(Entity));
|
|
34211
|
+
UserEventTest = UserEventTest_1 = __decorate([
|
|
34212
|
+
EntityClass({ typename: 'UserEventTestVO' })
|
|
34213
|
+
], UserEventTest);
|
|
34214
|
+
// @dynamic
|
|
34215
|
+
var UserEventTestFilter = /** @class */ (function (_super) {
|
|
34216
|
+
__extends(UserEventTestFilter, _super);
|
|
34217
|
+
function UserEventTestFilter() {
|
|
34218
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
34219
|
+
_this.types = [];
|
|
34220
|
+
_this.levels = [];
|
|
34221
|
+
_this.issuers = [];
|
|
34222
|
+
_this.recipients = [];
|
|
34223
|
+
_this.startDate = null;
|
|
34224
|
+
_this.excludeRead = false;
|
|
34225
|
+
return _this;
|
|
34226
|
+
}
|
|
34227
|
+
UserEventTestFilter.prototype.fromObject = function (source, opts) {
|
|
34228
|
+
_super.prototype.fromObject.call(this, source, opts);
|
|
34229
|
+
this.types = source.types || [];
|
|
34230
|
+
this.levels = source.levels || [];
|
|
34231
|
+
this.issuers = source.issuers || [];
|
|
34232
|
+
this.recipients = source.recipients || [];
|
|
34233
|
+
this.startDate = fromDateISOString(source.startDate);
|
|
34234
|
+
this.excludeRead = source.excludeRead || false;
|
|
34235
|
+
};
|
|
34236
|
+
UserEventTestFilter.prototype.buildFilter = function () {
|
|
34237
|
+
var _this = this;
|
|
34238
|
+
var filterFns = _super.prototype.buildFilter.call(this);
|
|
34239
|
+
if (isNotEmptyArray(this.types)) {
|
|
34240
|
+
filterFns.push(function (t) { return _this.types.includes(t.type); });
|
|
34241
|
+
}
|
|
34242
|
+
if (isNotEmptyArray(this.levels)) {
|
|
34243
|
+
filterFns.push(function (t) { return _this.levels.includes(t.level); });
|
|
34244
|
+
}
|
|
34245
|
+
if (isNotEmptyArray(this.issuers)) {
|
|
34246
|
+
filterFns.push(function (t) { return _this.issuers.includes(t.issuer); });
|
|
34247
|
+
}
|
|
34248
|
+
if (isNotEmptyArray(this.recipients)) {
|
|
34249
|
+
filterFns.push(function (t) { return _this.recipients.includes(t.recipient); });
|
|
34250
|
+
}
|
|
34251
|
+
if (isNotNil(this.startDate)) {
|
|
34252
|
+
filterFns.push(function (t) { return _this.startDate.isSameOrBefore(t.creationDate); });
|
|
34253
|
+
}
|
|
34254
|
+
if (this.excludeRead === true) {
|
|
34255
|
+
filterFns.push(function (t) { return isNil(t.readSignature); }); // todo or t.signature ?
|
|
34256
|
+
}
|
|
34257
|
+
return filterFns;
|
|
34258
|
+
};
|
|
34259
|
+
UserEventTestFilter.prototype.asObject = function (opts) {
|
|
34260
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
34261
|
+
return target;
|
|
34262
|
+
};
|
|
34263
|
+
return UserEventTestFilter;
|
|
34264
|
+
}(EntityFilter));
|
|
34265
|
+
UserEventTestFilter = __decorate([
|
|
34266
|
+
EntityClass({ typename: 'UserEventTestFilterVO' })
|
|
34267
|
+
], UserEventTestFilter);
|
|
34268
|
+
|
|
34156
34269
|
var UserEventTestService = /** @class */ (function (_super) {
|
|
34157
34270
|
__extends(UserEventTestService, _super);
|
|
34158
34271
|
function UserEventTestService(graphql, accountService, network, translate, environment) {
|
|
@@ -34168,25 +34281,38 @@
|
|
|
34168
34281
|
_this.network = network;
|
|
34169
34282
|
_this.translate = translate;
|
|
34170
34283
|
_this.environment = environment;
|
|
34171
|
-
_this
|
|
34284
|
+
_this.$userEvents = new rxjs.BehaviorSubject([]);
|
|
34285
|
+
_this.$newUserEvents = new rxjs.Subject();
|
|
34172
34286
|
return _this;
|
|
34173
34287
|
}
|
|
34174
34288
|
UserEventTestService.prototype.fromObject = function (source) {
|
|
34175
|
-
return
|
|
34289
|
+
return UserEventTest.fromObject(source);
|
|
34176
34290
|
};
|
|
34177
34291
|
UserEventTestService.prototype.add = function (entity) {
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34292
|
+
var _a;
|
|
34293
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
34294
|
+
return __generator(this, function (_b) {
|
|
34295
|
+
switch (_b.label) {
|
|
34296
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
34297
|
+
case 1:
|
|
34298
|
+
entity = _b.sent();
|
|
34299
|
+
entity.id = (((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0) + 1;
|
|
34300
|
+
this.$userEvents.next(__spread([
|
|
34301
|
+
entity
|
|
34302
|
+
], this.$userEvents.value));
|
|
34303
|
+
this._countSubject.next((this._countSubject.value || 0) + 1);
|
|
34304
|
+
this.$newUserEvents.next([entity]);
|
|
34305
|
+
return [2 /*return*/];
|
|
34306
|
+
}
|
|
34307
|
+
});
|
|
34308
|
+
});
|
|
34184
34309
|
};
|
|
34185
34310
|
UserEventTestService.prototype.asFilter = function (filter) {
|
|
34186
34311
|
return filter;
|
|
34187
34312
|
};
|
|
34188
34313
|
UserEventTestService.prototype.count = function (filter, options) {
|
|
34189
|
-
|
|
34314
|
+
var _a;
|
|
34315
|
+
return Promise.resolve(((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
34190
34316
|
};
|
|
34191
34317
|
UserEventTestService.prototype.delete = function (entity) {
|
|
34192
34318
|
return Promise.resolve(undefined);
|
|
@@ -34194,12 +34320,12 @@
|
|
|
34194
34320
|
UserEventTestService.prototype.deleteAll = function (data, opts) {
|
|
34195
34321
|
return Promise.resolve(undefined);
|
|
34196
34322
|
};
|
|
34197
|
-
UserEventTestService.prototype.
|
|
34198
|
-
return
|
|
34323
|
+
UserEventTestService.prototype.listenAllChanges = function (filter, options) {
|
|
34324
|
+
return this.$newUserEvents.asObservable();
|
|
34199
34325
|
};
|
|
34200
34326
|
UserEventTestService.prototype.save = function (entity, options) {
|
|
34201
34327
|
var _a;
|
|
34202
|
-
var toSave = (_a = this.
|
|
34328
|
+
var toSave = (_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id == (entity === null || entity === void 0 ? void 0 : entity.id); });
|
|
34203
34329
|
Object.assign(toSave, entity);
|
|
34204
34330
|
return entity;
|
|
34205
34331
|
};
|
|
@@ -34234,31 +34360,33 @@
|
|
|
34234
34360
|
}
|
|
34235
34361
|
finally { if (e_1) throw e_1.error; }
|
|
34236
34362
|
return [7 /*endfinally*/];
|
|
34237
|
-
case 7: return [2 /*return*/,
|
|
34363
|
+
case 7: return [2 /*return*/, this.$userEvents.toPromise()];
|
|
34238
34364
|
}
|
|
34239
34365
|
});
|
|
34240
34366
|
});
|
|
34241
34367
|
};
|
|
34242
34368
|
UserEventTestService.prototype.watchAll = function (offset, size, sortBy, sortDirection, filter, opts) {
|
|
34243
34369
|
var _this = this;
|
|
34244
|
-
|
|
34245
|
-
|
|
34246
|
-
|
|
34247
|
-
|
|
34248
|
-
|
|
34249
|
-
|
|
34250
|
-
|
|
34251
|
-
|
|
34252
|
-
|
|
34253
|
-
|
|
34254
|
-
|
|
34255
|
-
|
|
34370
|
+
return this.$userEvents.pipe(operators.map(function (userEvents) {
|
|
34371
|
+
var _a;
|
|
34372
|
+
var data = (userEvents || []).slice(offset || 0, offset + size);
|
|
34373
|
+
var total = ((_a = _this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
34374
|
+
var res = { data: data, total: total };
|
|
34375
|
+
// Must re-order because of listenChanges result will add new event at the end
|
|
34376
|
+
data = EntityUtils.sort(data, sortBy, sortDirection);
|
|
34377
|
+
// Add fetch more
|
|
34378
|
+
var nextOffset = offset + data.length;
|
|
34379
|
+
if (nextOffset < res.total) {
|
|
34380
|
+
res.fetchMore = function (_) { return _this.loadAll(nextOffset, size, sortBy, sortDirection, filter, Object.assign(Object.assign({}, opts), { fetchPolicy: 'no-cache' })); };
|
|
34381
|
+
}
|
|
34382
|
+
return res;
|
|
34383
|
+
}));
|
|
34256
34384
|
};
|
|
34257
34385
|
UserEventTestService.prototype.loadAll = function (offset, size, sortBy, sortDirection, filter, opts) {
|
|
34258
34386
|
var _this = this;
|
|
34259
34387
|
var _a;
|
|
34260
|
-
var data = (this.
|
|
34261
|
-
var total = ((_a = this.
|
|
34388
|
+
var data = (this.$userEvents.value || []).slice(offset || 0, offset + size);
|
|
34389
|
+
var total = ((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
34262
34390
|
var res = { data: data, total: total };
|
|
34263
34391
|
// Must re-order because of listenChanges result will add new event at the end
|
|
34264
34392
|
data = EntityUtils.sort(data, sortBy, sortDirection);
|
|
@@ -34302,6 +34430,16 @@
|
|
|
34302
34430
|
onRead: function (userEvent) { _this.showMessage("debug message read "); }
|
|
34303
34431
|
});
|
|
34304
34432
|
}
|
|
34433
|
+
Object.defineProperty(UserEventTestingPage.prototype, "timerStarted", {
|
|
34434
|
+
get: function () {
|
|
34435
|
+
return !!this._timerSubscription;
|
|
34436
|
+
},
|
|
34437
|
+
enumerable: false,
|
|
34438
|
+
configurable: true
|
|
34439
|
+
});
|
|
34440
|
+
UserEventTestingPage.prototype.ngOnDestroy = function () {
|
|
34441
|
+
this.stopTimer();
|
|
34442
|
+
};
|
|
34305
34443
|
UserEventTestingPage.prototype.customize = function (userEvent) {
|
|
34306
34444
|
// Choose avatarIcon
|
|
34307
34445
|
switch (userEvent.level) {
|
|
@@ -34332,7 +34470,7 @@
|
|
|
34332
34470
|
}
|
|
34333
34471
|
};
|
|
34334
34472
|
UserEventTestingPage.prototype.addNotification = function () {
|
|
34335
|
-
this.userEventService.add(
|
|
34473
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34336
34474
|
issuer: 'system',
|
|
34337
34475
|
recipient: 'me',
|
|
34338
34476
|
type: 'message',
|
|
@@ -34342,7 +34480,7 @@
|
|
|
34342
34480
|
}));
|
|
34343
34481
|
};
|
|
34344
34482
|
UserEventTestingPage.prototype.addError = function () {
|
|
34345
|
-
this.userEventService.add(
|
|
34483
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34346
34484
|
issuer: 'system',
|
|
34347
34485
|
recipient: 'me',
|
|
34348
34486
|
type: 'upload',
|
|
@@ -34352,7 +34490,7 @@
|
|
|
34352
34490
|
}));
|
|
34353
34491
|
};
|
|
34354
34492
|
UserEventTestingPage.prototype.addWarning = function () {
|
|
34355
|
-
this.userEventService.add(
|
|
34493
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34356
34494
|
issuer: 'system',
|
|
34357
34495
|
recipient: 'me',
|
|
34358
34496
|
type: 'download',
|
|
@@ -34362,7 +34500,7 @@
|
|
|
34362
34500
|
}));
|
|
34363
34501
|
};
|
|
34364
34502
|
UserEventTestingPage.prototype.addDebug = function () {
|
|
34365
|
-
this.userEventService.add(
|
|
34503
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34366
34504
|
issuer: 'system',
|
|
34367
34505
|
recipient: 'me',
|
|
34368
34506
|
type: 'debug',
|
|
@@ -34373,7 +34511,7 @@
|
|
|
34373
34511
|
};
|
|
34374
34512
|
UserEventTestingPage.prototype.addNotificationWithLink = function () {
|
|
34375
34513
|
var _this = this;
|
|
34376
|
-
this.userEventService.add(
|
|
34514
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34377
34515
|
issuer: 'system',
|
|
34378
34516
|
recipient: 'me',
|
|
34379
34517
|
type: 'message',
|
|
@@ -34391,7 +34529,7 @@
|
|
|
34391
34529
|
};
|
|
34392
34530
|
UserEventTestingPage.prototype.addNotificationWithAction = function () {
|
|
34393
34531
|
var _this = this;
|
|
34394
|
-
this.userEventService.add(
|
|
34532
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34395
34533
|
issuer: 'system',
|
|
34396
34534
|
recipient: 'me',
|
|
34397
34535
|
type: 'message',
|
|
@@ -34418,9 +34556,54 @@
|
|
|
34418
34556
|
]
|
|
34419
34557
|
}));
|
|
34420
34558
|
};
|
|
34559
|
+
UserEventTestingPage.prototype.addMany = function (count) {
|
|
34560
|
+
count = count || 20;
|
|
34561
|
+
for (var i = 0; i < count; i++) {
|
|
34562
|
+
this.addRandom(i);
|
|
34563
|
+
}
|
|
34564
|
+
};
|
|
34565
|
+
UserEventTestingPage.prototype.startTimer = function (period) {
|
|
34566
|
+
var _this = this;
|
|
34567
|
+
var _a;
|
|
34568
|
+
(_a = this._timerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
34569
|
+
period = period || 1000;
|
|
34570
|
+
var counter = 0;
|
|
34571
|
+
this._timerSubscription = rxjs.timer(period, period)
|
|
34572
|
+
.subscribe(function () {
|
|
34573
|
+
_this.addRandom(counter);
|
|
34574
|
+
counter++;
|
|
34575
|
+
});
|
|
34576
|
+
};
|
|
34577
|
+
UserEventTestingPage.prototype.stopTimer = function () {
|
|
34578
|
+
var _a;
|
|
34579
|
+
(_a = this._timerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
34580
|
+
this._timerSubscription = null;
|
|
34581
|
+
};
|
|
34582
|
+
UserEventTestingPage.prototype.addRandom = function (value) {
|
|
34583
|
+
switch (value % 6) {
|
|
34584
|
+
case 0:
|
|
34585
|
+
this.addNotification();
|
|
34586
|
+
break;
|
|
34587
|
+
case 1:
|
|
34588
|
+
this.addError();
|
|
34589
|
+
break;
|
|
34590
|
+
case 2:
|
|
34591
|
+
this.addDebug();
|
|
34592
|
+
break;
|
|
34593
|
+
case 3:
|
|
34594
|
+
this.addNotificationWithLink();
|
|
34595
|
+
break;
|
|
34596
|
+
case 4:
|
|
34597
|
+
this.addNotificationWithAction();
|
|
34598
|
+
break;
|
|
34599
|
+
case 5:
|
|
34600
|
+
this.addNotificationWithDefaultAction();
|
|
34601
|
+
break;
|
|
34602
|
+
}
|
|
34603
|
+
};
|
|
34421
34604
|
UserEventTestingPage.prototype.addNotificationWithDefaultAction = function () {
|
|
34422
34605
|
var _this = this;
|
|
34423
|
-
this.userEventService.add(
|
|
34606
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34424
34607
|
issuer: 'system',
|
|
34425
34608
|
recipient: 'me',
|
|
34426
34609
|
type: 'message',
|
|
@@ -34444,7 +34627,7 @@
|
|
|
34444
34627
|
UserEventTestingPage.decorators = [
|
|
34445
34628
|
{ type: i0.Component, args: [{
|
|
34446
34629
|
selector: 'job-progression-testing',
|
|
34447
|
-
template: "<ion-toolbar color=\"primary\">\n <ion-title>User events</ion-title>\n</ion-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <app-user-event-notification-icon #notification [debug]=\"true\"></app-user-event-notification-icon>\n\n <p>\n <ion-button (click)=\"addNotification()\">Add notification</ion-button>\n <ion-button (click)=\"addError()\">Add error</ion-button>\n <ion-button (click)=\"addWarning()\">Add warning</ion-button>\n <ion-button (click)=\"addDebug()\">Add debug</ion-button>\n </p>\n <p>\n <ion-button (click)=\"addNotificationWithLink()\">Add notification with link</ion-button>\n <ion-button (click)=\"addNotificationWithAction()\">Add notification with action</ion-button>\n <ion-button (click)=\"addNotificationWithDefaultAction()\">Add notification with default action</ion-button>\n </p>\n</ion-content>\n"
|
|
34630
|
+
template: "<ion-toolbar color=\"primary\">\n <ion-title>User events</ion-title>\n</ion-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <app-user-event-notification-icon #notification [debug]=\"true\"></app-user-event-notification-icon>\n\n <p>\n <ion-button (click)=\"addNotification()\">Add notification</ion-button>\n <ion-button (click)=\"addError()\">Add error</ion-button>\n <ion-button (click)=\"addWarning()\">Add warning</ion-button>\n <ion-button (click)=\"addDebug()\">Add debug</ion-button>\n </p>\n <p>\n <ion-button (click)=\"addNotificationWithLink()\">Add notification with link</ion-button>\n <ion-button (click)=\"addNotificationWithAction()\">Add notification with action</ion-button>\n <ion-button (click)=\"addNotificationWithDefaultAction()\">Add notification with default action</ion-button>\n </p>\n <p>\n <ion-button (click)=\"addMany()\">Add notifications (x20)</ion-button>\n </p>\n <p>\n <ion-button (click)=\"startTimer()\" *ngIf=\"!timerStarted\">Start timer</ion-button>\n <ion-button (click)=\"stopTimer()\" *ngIf=\"timerStarted\">Stop timer</ion-button>\n </p>\n</ion-content>\n"
|
|
34448
34631
|
},] }
|
|
34449
34632
|
];
|
|
34450
34633
|
UserEventTestingPage.ctorParameters = function () { return [
|
|
@@ -34657,6 +34840,8 @@
|
|
|
34657
34840
|
exports.HomePage = HomePage;
|
|
34658
34841
|
exports.Hotkeys = Hotkeys;
|
|
34659
34842
|
exports.HotkeysDialogComponent = HotkeysDialogComponent;
|
|
34843
|
+
exports.IMAGE_DEFAULTS = IMAGE_DEFAULTS;
|
|
34844
|
+
exports.ImagesUtils = ImagesUtils;
|
|
34660
34845
|
exports.InMemoryEntitiesService = InMemoryEntitiesService;
|
|
34661
34846
|
exports.IsLoginAccountPipe = IsLoginAccountPipe;
|
|
34662
34847
|
exports.IsNilOrBlankPipe = IsNilOrBlankPipe;
|
|
@@ -34808,12 +34993,10 @@
|
|
|
34808
34993
|
exports.UploadFileTestingModule = UploadFileTestingModule;
|
|
34809
34994
|
exports.UploadFileTestingPage = UploadFileTestingPage;
|
|
34810
34995
|
exports.UriUtils = UriUtils;
|
|
34811
|
-
exports.UserEventFragments = UserEventFragments;
|
|
34812
34996
|
exports.UserEventModule = UserEventModule;
|
|
34813
34997
|
exports.UserEventTestService = UserEventTestService;
|
|
34814
34998
|
exports.UserEventTestingModule = UserEventTestingModule;
|
|
34815
34999
|
exports.UserEventTestingPage = UserEventTestingPage;
|
|
34816
|
-
exports.UserEventTypes = UserEventTypes;
|
|
34817
35000
|
exports.UsersPage = UsersPage;
|
|
34818
35001
|
exports.accountToString = accountToString;
|
|
34819
35002
|
exports.adaptValueToControl = adaptValueToControl;
|