@sumaris-net/ngx-components 1.22.11-rc9 → 1.22.12-rc2
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 +582 -365
- 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/constants.js +2 -1
- package/esm2015/src/app/shared/dates.js +22 -4
- 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/shared/material/datetime/material.datetime.js +16 -9
- package/esm2015/src/app/shared/material/datetime/testing/mat-date-time.test.js +9 -3
- 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 +449 -323
- 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/constants.d.ts +1 -0
- package/src/app/shared/dates.d.ts +3 -0
- 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/shared/material/datetime/testing/mat-date-time.test.d.ts +1 -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
|
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
}());
|
|
42
42
|
|
|
43
43
|
var DATE_ISO_PATTERN = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
|
|
44
|
+
var DATE_PATTERN = 'YYYY-MM-DD';
|
|
44
45
|
var DEFAULT_PLACEHOLDER_CHAR = '\u005F';
|
|
45
46
|
var PUBKEY_REGEXP = /^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$/;
|
|
46
47
|
var SPACE_PLACEHOLDER_CHAR = '\u2000';
|
|
47
48
|
var KEYBOARD_HIDE_DELAY_MS = 250; // 1s
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
/******************************************************************************
|
|
50
51
|
Copyright (c) Microsoft Corporation.
|
|
51
52
|
|
|
52
53
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -208,7 +209,11 @@
|
|
|
208
209
|
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
209
210
|
if (k2 === undefined)
|
|
210
211
|
k2 = k;
|
|
211
|
-
Object.
|
|
212
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
213
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
214
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
215
|
+
}
|
|
216
|
+
Object.defineProperty(o, k2, desc);
|
|
212
217
|
}) : (function (o, m, k, k2) {
|
|
213
218
|
if (k2 === undefined)
|
|
214
219
|
k2 = k;
|
|
@@ -363,6 +368,11 @@
|
|
|
363
368
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
364
369
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
365
370
|
}
|
|
371
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
372
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
373
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
374
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
375
|
+
}
|
|
366
376
|
|
|
367
377
|
function isNil(obj) {
|
|
368
378
|
return obj === undefined || obj === null;
|
|
@@ -2803,6 +2813,7 @@
|
|
|
2803
2813
|
var moment$1 = momentImported__namespace;
|
|
2804
2814
|
var DATE_UNIX_TIMESTAMP = 'X';
|
|
2805
2815
|
var DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2816
|
+
var MOMENT_NO_TIME_PROPERTY = '_hasNoTime';
|
|
2806
2817
|
var DateUtils = /** @class */ (function () {
|
|
2807
2818
|
function DateUtils() {
|
|
2808
2819
|
}
|
|
@@ -2840,6 +2851,15 @@
|
|
|
2840
2851
|
.tz(timezone, keepLocalTime)
|
|
2841
2852
|
.startOf('day');
|
|
2842
2853
|
};
|
|
2854
|
+
DateUtils.markNoTime = function (value) {
|
|
2855
|
+
if (!value)
|
|
2856
|
+
return undefined;
|
|
2857
|
+
value[MOMENT_NO_TIME_PROPERTY] = true;
|
|
2858
|
+
return value;
|
|
2859
|
+
};
|
|
2860
|
+
DateUtils.isNoTime = function (value) {
|
|
2861
|
+
return (value === null || value === void 0 ? void 0 : value[MOMENT_NO_TIME_PROPERTY]) === true;
|
|
2862
|
+
};
|
|
2843
2863
|
/**
|
|
2844
2864
|
* Test if a date is on the given day of week
|
|
2845
2865
|
* @param date
|
|
@@ -2869,8 +2889,12 @@
|
|
|
2869
2889
|
return value;
|
|
2870
2890
|
}
|
|
2871
2891
|
// Make sure to have a Moment object
|
|
2872
|
-
|
|
2873
|
-
|
|
2892
|
+
var date = fromDateISOString(value);
|
|
2893
|
+
if (!date)
|
|
2894
|
+
return undefined;
|
|
2895
|
+
return DateUtils.isNoTime(date)
|
|
2896
|
+
? date.toISOString(true /* important ! */).substr(0, 10)
|
|
2897
|
+
: date.toISOString();
|
|
2874
2898
|
}
|
|
2875
2899
|
function fromDateISOString(value) {
|
|
2876
2900
|
// Already a moment object: use it
|
|
@@ -2880,6 +2904,10 @@
|
|
|
2880
2904
|
var date = moment$1(value, DATE_ISO_PATTERN);
|
|
2881
2905
|
if (date.isValid())
|
|
2882
2906
|
return date;
|
|
2907
|
+
// Parse the input value, as a date only
|
|
2908
|
+
var dateOnly = moment$1(value, DATE_PATTERN);
|
|
2909
|
+
if (dateOnly.isValid())
|
|
2910
|
+
return DateUtils.markNoTime(date);
|
|
2883
2911
|
// Not valid: trying to convert from unix timestamp
|
|
2884
2912
|
if (typeof value === 'string') {
|
|
2885
2913
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
@@ -6257,13 +6285,20 @@
|
|
|
6257
6285
|
var day = date.clone().startOf('day');
|
|
6258
6286
|
var dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
6259
6287
|
// Format time
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6288
|
+
var timeStr = void 0;
|
|
6289
|
+
if (DateUtils.isNoTime(date)) {
|
|
6290
|
+
// Clear time
|
|
6291
|
+
timeStr = null;
|
|
6292
|
+
}
|
|
6293
|
+
else {
|
|
6294
|
+
// - Format hh
|
|
6295
|
+
var hour = date.hour();
|
|
6296
|
+
hour = hour < 10 ? ('0' + hour) : hour;
|
|
6297
|
+
// - Format mm
|
|
6298
|
+
var minutes = date.minutes();
|
|
6299
|
+
minutes = minutes < 10 ? ('0' + minutes) : minutes;
|
|
6300
|
+
timeStr = hour + ":" + minutes;
|
|
6301
|
+
}
|
|
6267
6302
|
// Update controls
|
|
6268
6303
|
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
6269
6304
|
this.hourControl.patchValue(timeStr, { emitEvent: false });
|
|
@@ -10553,44 +10588,97 @@
|
|
|
10553
10588
|
},] }
|
|
10554
10589
|
];
|
|
10555
10590
|
|
|
10591
|
+
var UploadFile = /** @class */ (function (_super) {
|
|
10592
|
+
__extends(UploadFile, _super);
|
|
10593
|
+
function UploadFile() {
|
|
10594
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
10595
|
+
}
|
|
10596
|
+
return UploadFile;
|
|
10597
|
+
}(File));
|
|
10598
|
+
var FileResponse = /** @class */ (function () {
|
|
10599
|
+
function FileResponse(init) {
|
|
10600
|
+
this.type = i2$1.HttpEventType.Response;
|
|
10601
|
+
this.body = isNotNil(init === null || init === void 0 ? void 0 : init.body) ? init.body : null;
|
|
10602
|
+
this.status = (init === null || init === void 0 ? void 0 : init.status) || 0;
|
|
10603
|
+
this.statusText = (init === null || init === void 0 ? void 0 : init.statusText) || 'OK';
|
|
10604
|
+
}
|
|
10605
|
+
return FileResponse;
|
|
10606
|
+
}());
|
|
10607
|
+
function isProgressEvent(event) {
|
|
10608
|
+
return event && (event.type === i2$1.HttpEventType.UploadProgress
|
|
10609
|
+
|| event.type === i2$1.HttpEventType.DownloadProgress);
|
|
10610
|
+
}
|
|
10611
|
+
function isResponseEvent(event) {
|
|
10612
|
+
return event && event.type === i2$1.HttpEventType.Response;
|
|
10613
|
+
}
|
|
10614
|
+
|
|
10556
10615
|
var IMAGE_DEFAULTS = {
|
|
10557
10616
|
MAX_HEIGHT: 480,
|
|
10558
10617
|
MAX_WIDTH: 640,
|
|
10559
10618
|
THUMB_MAX_HEIGHT: 200,
|
|
10560
10619
|
THUMB_MAX_WIDTH: 200
|
|
10561
10620
|
};
|
|
10562
|
-
|
|
10563
|
-
|
|
10621
|
+
// @dynamic
|
|
10622
|
+
var ImagesUtils = /** @class */ (function () {
|
|
10623
|
+
function ImagesUtils() {
|
|
10564
10624
|
}
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
}
|
|
10583
|
-
|
|
10625
|
+
ImagesUtils.readAsDataURL = function (file, opts) {
|
|
10626
|
+
var _this = this;
|
|
10627
|
+
var $progress = new rxjs.Subject();
|
|
10628
|
+
var reader = new FileReader();
|
|
10629
|
+
// Listen progress
|
|
10630
|
+
reader.onprogress = function (e) {
|
|
10631
|
+
var total = e.total || 1;
|
|
10632
|
+
var loaded = e.total || 0;
|
|
10633
|
+
if (loaded < total)
|
|
10634
|
+
$progress.next({ type: i2$1.HttpEventType.UploadProgress, loaded: loaded, total: total });
|
|
10635
|
+
};
|
|
10636
|
+
// Listen end
|
|
10637
|
+
reader.onloadend = function (e) {
|
|
10638
|
+
var body = reader.result;
|
|
10639
|
+
if (typeof body === 'string') {
|
|
10640
|
+
$progress.next(new FileResponse({ body: body }));
|
|
10641
|
+
$progress.complete();
|
|
10642
|
+
}
|
|
10643
|
+
else {
|
|
10644
|
+
console.error("[image-utils] Cannot read file '" + file.name + "' as text");
|
|
10645
|
+
$progress.error("Cannot read file as text");
|
|
10646
|
+
}
|
|
10647
|
+
};
|
|
10648
|
+
// Listen error
|
|
10649
|
+
reader.onerror = function (event) {
|
|
10650
|
+
console.error('[image-utils] Error while reading file:', event);
|
|
10651
|
+
$progress.error(event);
|
|
10652
|
+
};
|
|
10653
|
+
// Start reading the file
|
|
10654
|
+
reader.readAsDataURL(file);
|
|
10655
|
+
// Resize image, if need
|
|
10656
|
+
if (opts) {
|
|
10657
|
+
return $progress.pipe(operators$1.mergeMap(function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
10658
|
+
var body;
|
|
10659
|
+
return __generator(this, function (_a) {
|
|
10660
|
+
switch (_a.label) {
|
|
10661
|
+
case 0:
|
|
10662
|
+
if (!(event instanceof FileResponse)) return [3 /*break*/, 2];
|
|
10663
|
+
return [4 /*yield*/, ImagesUtils.resizeBase64(event.body, opts)];
|
|
10664
|
+
case 1:
|
|
10665
|
+
body = _a.sent();
|
|
10666
|
+
return [2 /*return*/, new FileResponse({ body: body })];
|
|
10667
|
+
case 2: return [2 /*return*/, event];
|
|
10668
|
+
}
|
|
10669
|
+
});
|
|
10670
|
+
}); }));
|
|
10671
|
+
}
|
|
10672
|
+
return $progress.asObservable();
|
|
10584
10673
|
};
|
|
10585
|
-
|
|
10674
|
+
ImagesUtils.readAndResizeFromUrl = function (fileUrl, opts) {
|
|
10586
10675
|
return __awaiter(this, void 0, void 0, function () {
|
|
10587
10676
|
var img, err_1;
|
|
10588
|
-
var _this = this;
|
|
10589
10677
|
return __generator(this, function (_a) {
|
|
10590
10678
|
switch (_a.label) {
|
|
10591
10679
|
case 0:
|
|
10592
|
-
if (isNilOrBlank(
|
|
10593
|
-
throw new Error('Illegal argument: missing
|
|
10680
|
+
if (isNilOrBlank(fileUrl))
|
|
10681
|
+
throw new Error('Illegal argument: missing fileUrl');
|
|
10594
10682
|
img = document.createElement('img');
|
|
10595
10683
|
// Need to avoid CORS error
|
|
10596
10684
|
// (see https://stackoverflow.com/questions/22710627/tainted-canvases-may-not-be-exported)
|
|
@@ -10599,14 +10687,14 @@
|
|
|
10599
10687
|
case 1:
|
|
10600
10688
|
_a.trys.push([1, 3, 4, 5]);
|
|
10601
10689
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
10602
|
-
img.addEventListener('load',
|
|
10690
|
+
img.addEventListener('load', ImagesUtils.createImageOnLoadResizeFn(resolve, reject, opts), false);
|
|
10603
10691
|
img.addEventListener('error', reject);
|
|
10604
|
-
img.src =
|
|
10692
|
+
img.src = fileUrl;
|
|
10605
10693
|
})];
|
|
10606
10694
|
case 2: return [2 /*return*/, _a.sent()];
|
|
10607
10695
|
case 3:
|
|
10608
10696
|
err_1 = _a.sent();
|
|
10609
|
-
throw new Error("Failed to load and resize image {" +
|
|
10697
|
+
throw new Error("Failed to load and resize image {" + fileUrl + "}");
|
|
10610
10698
|
case 4:
|
|
10611
10699
|
img.remove();
|
|
10612
10700
|
return [7 /*endfinally*/];
|
|
@@ -10615,15 +10703,12 @@
|
|
|
10615
10703
|
});
|
|
10616
10704
|
});
|
|
10617
10705
|
};
|
|
10618
|
-
|
|
10706
|
+
ImagesUtils.resizeBase64 = function (dataUrl, opts) {
|
|
10619
10707
|
return __awaiter(this, void 0, void 0, function () {
|
|
10620
10708
|
var img;
|
|
10621
|
-
var _this = this;
|
|
10622
10709
|
return __generator(this, function (_a) {
|
|
10623
10710
|
switch (_a.label) {
|
|
10624
10711
|
case 0:
|
|
10625
|
-
if (!file)
|
|
10626
|
-
throw new Error('Illegal argument: missing file');
|
|
10627
10712
|
img = document.createElement('img');
|
|
10628
10713
|
// Need to avoid CORS error
|
|
10629
10714
|
// (see https://stackoverflow.com/questions/22710627/tainted-canvases-may-not-be-exported)
|
|
@@ -10632,13 +10717,9 @@
|
|
|
10632
10717
|
case 1:
|
|
10633
10718
|
_a.trys.push([1, , 3, 4]);
|
|
10634
10719
|
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);
|
|
10720
|
+
img.addEventListener('load', ImagesUtils.createImageOnLoadResizeFn(resolve, reject, opts), false);
|
|
10721
|
+
img.addEventListener('error', reject);
|
|
10722
|
+
img.src = dataUrl;
|
|
10642
10723
|
})];
|
|
10643
10724
|
case 2: return [2 /*return*/, _a.sent()];
|
|
10644
10725
|
case 3:
|
|
@@ -10649,8 +10730,7 @@
|
|
|
10649
10730
|
});
|
|
10650
10731
|
});
|
|
10651
10732
|
};
|
|
10652
|
-
|
|
10653
|
-
Base64ImageReader.prototype.createImageOnLoadResizeFn = function (resolve, reject, opts) {
|
|
10733
|
+
ImagesUtils.createImageOnLoadResizeFn = function (resolve, reject, opts) {
|
|
10654
10734
|
return function (event) {
|
|
10655
10735
|
var maxWidth = (opts && opts.thumbnail ? IMAGE_DEFAULTS.THUMB_MAX_WIDTH : (opts && opts.maxWidth || IMAGE_DEFAULTS.MAX_WIDTH));
|
|
10656
10736
|
var maxHeight = (opts && opts.thumbnail ? IMAGE_DEFAULTS.THUMB_MAX_HEIGHT : (opts && opts.maxHeight || IMAGE_DEFAULTS.MAX_HEIGHT));
|
|
@@ -10716,7 +10796,7 @@
|
|
|
10716
10796
|
}
|
|
10717
10797
|
};
|
|
10718
10798
|
};
|
|
10719
|
-
return
|
|
10799
|
+
return ImagesUtils;
|
|
10720
10800
|
}());
|
|
10721
10801
|
|
|
10722
10802
|
var uuidv4 = uuidv4Imported__namespace;
|
|
@@ -10751,28 +10831,28 @@
|
|
|
10751
10831
|
var jobsFactories = (sources || []).map(function (source) { return function () { return _this.getImage(source, Object.assign({}, opts)); }; });
|
|
10752
10832
|
return chainPromises(jobsFactories);
|
|
10753
10833
|
};
|
|
10754
|
-
FileService.prototype.getImage = function (
|
|
10834
|
+
FileService.prototype.getImage = function (fileUrl, opts) {
|
|
10755
10835
|
return __awaiter(this, void 0, void 0, function () {
|
|
10756
|
-
var
|
|
10836
|
+
var outputType, debug, now, lastSlashIndex, fileName, targetFilePath, blob, err_1, dataUrl;
|
|
10757
10837
|
return __generator(this, function (_a) {
|
|
10758
10838
|
switch (_a.label) {
|
|
10759
10839
|
case 0:
|
|
10760
|
-
|
|
10840
|
+
outputType = opts && opts.outputType || (this.canUseFileSystem ? 'fileUrl' : 'dataUrl');
|
|
10761
10841
|
debug = this._debug /*&& (!opts || !opts.fileTransfer)*/;
|
|
10762
10842
|
now = debug && Date.now();
|
|
10763
10843
|
if (debug)
|
|
10764
|
-
console.debug("[file] Fetching image {" +
|
|
10765
|
-
lastSlashIndex =
|
|
10844
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + "...");
|
|
10845
|
+
lastSlashIndex = fileUrl.lastIndexOf('/');
|
|
10766
10846
|
if (lastSlashIndex === -1)
|
|
10767
|
-
throw new Error('Invalid URL: ' +
|
|
10768
|
-
fileName = lastSlashIndex < (
|
|
10769
|
-
if (!(
|
|
10770
|
-
console.warn("WARN: [file]
|
|
10847
|
+
throw new Error('Invalid URL: ' + fileUrl);
|
|
10848
|
+
fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4();
|
|
10849
|
+
if (!(outputType === 'fileUrl' && this.canUseFileSystem)) return [3 /*break*/, 4];
|
|
10850
|
+
console.warn("WARN: [file] Downloading image {" + fileUrl + "} in local filesystem...");
|
|
10771
10851
|
targetFilePath = this._imageDirectory + fileName;
|
|
10772
10852
|
_a.label = 1;
|
|
10773
10853
|
case 1:
|
|
10774
10854
|
_a.trys.push([1, 3, , 4]);
|
|
10775
|
-
return [4 /*yield*/, firstNotNilPromise(this.http.get(
|
|
10855
|
+
return [4 /*yield*/, firstNotNilPromise(this.http.get(fileUrl, {
|
|
10776
10856
|
observe: 'body',
|
|
10777
10857
|
responseType: 'blob',
|
|
10778
10858
|
reportProgress: false
|
|
@@ -10784,25 +10864,25 @@
|
|
|
10784
10864
|
//const fileTransfer = (opts && opts.fileTransfer) || this.transfer.create();
|
|
10785
10865
|
//await fileTransfer.download(source, targetFilePath);
|
|
10786
10866
|
if (debug)
|
|
10787
|
-
console.debug("[file] Fetching image {" +
|
|
10867
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + " [OK] in " + (Date.now() - now) + "ms");
|
|
10788
10868
|
return [2 /*return*/, targetFilePath];
|
|
10789
10869
|
case 3:
|
|
10790
10870
|
err_1 = _a.sent();
|
|
10791
|
-
console.error("[file] Error while download " +
|
|
10871
|
+
console.error("[file] Error while download " + fileUrl + ": " + (err_1 && err_1.message || err_1));
|
|
10792
10872
|
// Continue (fallback to data Url)
|
|
10793
|
-
|
|
10873
|
+
outputType = 'dataUrl';
|
|
10794
10874
|
return [3 /*break*/, 4];
|
|
10795
10875
|
case 4:
|
|
10796
|
-
if (!(
|
|
10797
|
-
return [4 /*yield*/,
|
|
10876
|
+
if (!(outputType === 'dataUrl')) return [3 /*break*/, 6];
|
|
10877
|
+
return [4 /*yield*/, ImagesUtils.readAndResizeFromUrl(fileUrl, opts)];
|
|
10798
10878
|
case 5:
|
|
10799
10879
|
dataUrl = _a.sent();
|
|
10800
10880
|
if (debug)
|
|
10801
|
-
console.debug("[file] Fetching image {" +
|
|
10881
|
+
console.debug("[file] Fetching image {" + fileUrl + "} into " + outputType + " [OK] in " + (Date.now() - now) + "ms");
|
|
10802
10882
|
return [2 /*return*/, dataUrl];
|
|
10803
10883
|
case 6:
|
|
10804
10884
|
// Keep original URL
|
|
10805
|
-
return [2 /*return*/,
|
|
10885
|
+
return [2 /*return*/, fileUrl];
|
|
10806
10886
|
}
|
|
10807
10887
|
});
|
|
10808
10888
|
});
|
|
@@ -15009,7 +15089,9 @@
|
|
|
15009
15089
|
return expectedProfileIndex !== -1 && PersonUtils.getMainProfileIndex(actualProfiles) <= expectedProfileIndex;
|
|
15010
15090
|
};
|
|
15011
15091
|
PersonUtils.personToString = function (obj) {
|
|
15012
|
-
|
|
15092
|
+
if (!obj || !obj.id)
|
|
15093
|
+
return undefined;
|
|
15094
|
+
return obj.lastName + ' ' + obj.firstName;
|
|
15013
15095
|
};
|
|
15014
15096
|
PersonUtils.personsToString = function (data, separator) {
|
|
15015
15097
|
return (data || []).map(PersonUtils.personToString).join(separator || ', ');
|
|
@@ -17182,7 +17264,7 @@
|
|
|
17182
17264
|
if (!(hasAvatarUrl && this.network.online)) return [3 /*break*/, 2];
|
|
17183
17265
|
return [4 /*yield*/, this.file.getImage(json.avatar, {
|
|
17184
17266
|
thumbnail: true,
|
|
17185
|
-
|
|
17267
|
+
outputType: 'dataUrl'
|
|
17186
17268
|
})
|
|
17187
17269
|
.then(function (dataUrl) {
|
|
17188
17270
|
if (dataUrl && _this._debug)
|
|
@@ -18157,30 +18239,6 @@
|
|
|
18157
18239
|
]; };
|
|
18158
18240
|
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
|
|
18159
18241
|
|
|
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
18242
|
var UploadFilePopover = /** @class */ (function () {
|
|
18185
18243
|
function UploadFilePopover(popoverController, translate, cd) {
|
|
18186
18244
|
this.popoverController = popoverController;
|
|
@@ -24837,7 +24895,7 @@
|
|
|
24837
24895
|
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
24896
|
animations: [fadeInAnimation],
|
|
24839
24897
|
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-
|
|
24898
|
+
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
24899
|
},] }
|
|
24842
24900
|
];
|
|
24843
24901
|
MenuComponent.ctorParameters = function () { return [
|
|
@@ -28796,10 +28854,10 @@
|
|
|
28796
28854
|
_this.savingSubject = new rxjs.BehaviorSubject(false);
|
|
28797
28855
|
_this.$title = new rxjs.Subject();
|
|
28798
28856
|
_this.onUpdateView = new i0.EventEmitter();
|
|
28799
|
-
_this.
|
|
28857
|
+
_this.environment = injector.get(ENVIRONMENT);
|
|
28800
28858
|
options = Object.assign({
|
|
28801
28859
|
// Default options
|
|
28802
|
-
enableListenChanges: ((_a = _this.
|
|
28860
|
+
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
28861
|
}, options);
|
|
28804
28862
|
_this.settings = injector.get(LocalSettingsService);
|
|
28805
28863
|
_this.errorTranslator = injector.get(FormErrorTranslator);
|
|
@@ -29098,13 +29156,14 @@
|
|
|
29098
29156
|
* Enable or disable state
|
|
29099
29157
|
*/
|
|
29100
29158
|
AppEntityEditor.prototype.updateViewState = function (data, opts) {
|
|
29159
|
+
var _a;
|
|
29101
29160
|
if (this.isNewData || this.canUserWrite(data)) {
|
|
29102
29161
|
this.enable(opts);
|
|
29103
29162
|
}
|
|
29104
29163
|
else {
|
|
29105
29164
|
this.disable(opts);
|
|
29106
29165
|
// Allow to sort table
|
|
29107
|
-
this.tables.forEach(function (t) { return t.enableSort(); });
|
|
29166
|
+
(_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
|
|
29108
29167
|
}
|
|
29109
29168
|
};
|
|
29110
29169
|
/**
|
|
@@ -29838,13 +29897,14 @@
|
|
|
29838
29897
|
* Enable or disable state
|
|
29839
29898
|
*/
|
|
29840
29899
|
AppEntityEditorModal.prototype.updateViewState = function (data, opts) {
|
|
29900
|
+
var _a;
|
|
29841
29901
|
if (this.isNewData || this.enabled) {
|
|
29842
29902
|
this.enable(opts);
|
|
29843
29903
|
}
|
|
29844
29904
|
else {
|
|
29845
29905
|
this.disable(opts);
|
|
29846
29906
|
// Allow to sort table
|
|
29847
|
-
this.tables.forEach(function (t) { return t.enableSort(); });
|
|
29907
|
+
(_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
|
|
29848
29908
|
}
|
|
29849
29909
|
};
|
|
29850
29910
|
AppEntityEditorModal.prototype.saveAndClose = function (event) {
|
|
@@ -30327,27 +30387,35 @@
|
|
|
30327
30387
|
fetchPolicy: (opts === null || opts === void 0 ? void 0 : opts.fetchPolicy) || 'cache-first',
|
|
30328
30388
|
insertFilterFn: filter && filter.asFilterFn()
|
|
30329
30389
|
})
|
|
30330
|
-
.pipe(operators.
|
|
30331
|
-
var data
|
|
30332
|
-
|
|
30333
|
-
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30390
|
+
.pipe(operators.mergeMap(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
30391
|
+
var data, result, nextOffset_1;
|
|
30392
|
+
var _this = this;
|
|
30393
|
+
return __generator(this, function (_b) {
|
|
30394
|
+
switch (_b.label) {
|
|
30395
|
+
case 0: return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30396
|
+
case 1:
|
|
30397
|
+
data = _b.sent();
|
|
30398
|
+
if (now) {
|
|
30399
|
+
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30400
|
+
now = null;
|
|
30401
|
+
}
|
|
30402
|
+
// Must re-order because of listenAllChanges result will add new event at the end
|
|
30403
|
+
data = EntityUtils.sort(data, page.sortBy, page.sortDirection);
|
|
30404
|
+
result = {
|
|
30405
|
+
data: data,
|
|
30406
|
+
total: toNumber(res === null || res === void 0 ? void 0 : res.total, data.length)
|
|
30407
|
+
};
|
|
30408
|
+
// Add fetch more capability, if total was fetched
|
|
30409
|
+
if (isNotNil(res.total)) {
|
|
30410
|
+
nextOffset_1 = (page.offset || 0) + data.length;
|
|
30411
|
+
if (nextOffset_1 < result.total) {
|
|
30412
|
+
result.fetchMore = function (_) { return _this.loadPage(Object.assign(Object.assign({}, page), { offset: nextOffset_1 }), filter, Object.assign(Object.assign({}, opts), { fetchPolicy: 'no-cache' })); };
|
|
30413
|
+
}
|
|
30414
|
+
}
|
|
30415
|
+
return [2 /*return*/, result];
|
|
30347
30416
|
}
|
|
30348
|
-
}
|
|
30349
|
-
|
|
30350
|
-
}));
|
|
30417
|
+
});
|
|
30418
|
+
}); }));
|
|
30351
30419
|
};
|
|
30352
30420
|
AbstractUserEventService.prototype.loadPage = function (page, filter, opts) {
|
|
30353
30421
|
var _a;
|
|
@@ -30385,10 +30453,12 @@
|
|
|
30385
30453
|
})];
|
|
30386
30454
|
case 1:
|
|
30387
30455
|
res = _b.sent();
|
|
30388
|
-
|
|
30456
|
+
return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30457
|
+
case 2:
|
|
30458
|
+
data = _b.sent();
|
|
30389
30459
|
if (now)
|
|
30390
30460
|
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30391
|
-
// Must re-order because of
|
|
30461
|
+
// Must re-order because of listenAllChanges result will add new event at the end
|
|
30392
30462
|
data = EntityUtils.sort(data, page.sortBy, page.sortDirection);
|
|
30393
30463
|
result = {
|
|
30394
30464
|
data: data,
|
|
@@ -30407,16 +30477,28 @@
|
|
|
30407
30477
|
});
|
|
30408
30478
|
};
|
|
30409
30479
|
AbstractUserEventService.prototype.add = function (entity) {
|
|
30410
|
-
|
|
30411
|
-
|
|
30412
|
-
|
|
30413
|
-
|
|
30414
|
-
|
|
30415
|
-
|
|
30416
|
-
|
|
30480
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30481
|
+
var withContent;
|
|
30482
|
+
return __generator(this, function (_b) {
|
|
30483
|
+
switch (_b.label) {
|
|
30484
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
30485
|
+
case 1:
|
|
30486
|
+
// TODO set an id !!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30487
|
+
entity = _b.sent();
|
|
30488
|
+
if (!entity)
|
|
30489
|
+
return [2 /*return*/]; // Rejected
|
|
30490
|
+
withContent = !!entity.content;
|
|
30491
|
+
// Add user event locally
|
|
30492
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30493
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30494
|
+
data: entity
|
|
30495
|
+
});
|
|
30496
|
+
// Update count
|
|
30497
|
+
this._countSubject.next(this._countSubject.value + 1);
|
|
30498
|
+
return [2 /*return*/];
|
|
30499
|
+
}
|
|
30500
|
+
});
|
|
30417
30501
|
});
|
|
30418
|
-
// Update count
|
|
30419
|
-
this._countSubject.next(this._countSubject.value + 1);
|
|
30420
30502
|
};
|
|
30421
30503
|
AbstractUserEventService.prototype.count = function (filter, options) {
|
|
30422
30504
|
var _a;
|
|
@@ -30483,38 +30565,50 @@
|
|
|
30483
30565
|
return total;
|
|
30484
30566
|
}));
|
|
30485
30567
|
};
|
|
30486
|
-
AbstractUserEventService.prototype.
|
|
30568
|
+
AbstractUserEventService.prototype.listenAllChanges = function (filter, opts) {
|
|
30487
30569
|
var _this = this;
|
|
30488
30570
|
var _a;
|
|
30489
|
-
if (!((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.
|
|
30490
|
-
console.warn(this._logPrefix + "Subscription query '
|
|
30571
|
+
if (!((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.listenAllChanges)) {
|
|
30572
|
+
console.warn(this._logPrefix + "Subscription query 'listenAllChanges' not provided, skip.");
|
|
30491
30573
|
return rxjs.of();
|
|
30492
30574
|
}
|
|
30493
30575
|
if (!filter)
|
|
30494
30576
|
filter = this.defaultFilter();
|
|
30495
30577
|
filter = this.asFilter(filter);
|
|
30496
|
-
var withContent = (
|
|
30578
|
+
var withContent = (opts === null || opts === void 0 ? void 0 : opts.withContent) === true;
|
|
30497
30579
|
if (this._debug)
|
|
30498
30580
|
console.debug(this._logPrefix + "[WS] Listening changes for user events with filter:", filter);
|
|
30499
30581
|
return this.graphql.subscribe({
|
|
30500
|
-
query: this.subscriptions.
|
|
30501
|
-
fetchPolicy:
|
|
30502
|
-
variables: { filter: filter.asPodObject(), interval: toNumber(
|
|
30582
|
+
query: this.subscriptions.listenAllChanges,
|
|
30583
|
+
fetchPolicy: opts === null || opts === void 0 ? void 0 : opts.fetchPolicy,
|
|
30584
|
+
variables: { filter: filter.asPodObject(), interval: toNumber(opts === null || opts === void 0 ? void 0 : opts.interval, 10) },
|
|
30503
30585
|
error: {
|
|
30504
30586
|
code: SocialErrorCodes.SUBSCRIBE_USER_EVENTS_ERROR,
|
|
30505
30587
|
message: 'SOCIAL.ERROR.SUBSCRIBE_USER_EVENTS_ERROR'
|
|
30506
30588
|
}
|
|
30507
|
-
}).pipe(operators.
|
|
30589
|
+
}).pipe(operators.mergeMap(function (_b) {
|
|
30508
30590
|
var data = _b.data;
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30516
|
-
|
|
30517
|
-
|
|
30591
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
30592
|
+
var _this = this;
|
|
30593
|
+
return __generator(this, function (_b) {
|
|
30594
|
+
switch (_b.label) {
|
|
30595
|
+
case 0:
|
|
30596
|
+
if (data && this._debug)
|
|
30597
|
+
console.debug(this._logPrefix + "Received new user events:", data);
|
|
30598
|
+
// Update cache (will update watchAll queries)
|
|
30599
|
+
if (isNotEmptyArray(data)) {
|
|
30600
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30601
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30602
|
+
data: data
|
|
30603
|
+
});
|
|
30604
|
+
}
|
|
30605
|
+
if (!(!opts || opts.toEntity !== false)) return [3 /*break*/, 2];
|
|
30606
|
+
return [4 /*yield*/, Promise.all((data || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30607
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
30608
|
+
case 2: return [2 /*return*/, data];
|
|
30609
|
+
}
|
|
30610
|
+
});
|
|
30611
|
+
});
|
|
30518
30612
|
}));
|
|
30519
30613
|
};
|
|
30520
30614
|
AbstractUserEventService.prototype.delete = function (entity) {
|
|
@@ -30631,7 +30725,7 @@
|
|
|
30631
30725
|
});
|
|
30632
30726
|
});
|
|
30633
30727
|
};
|
|
30634
|
-
AbstractUserEventService.prototype.
|
|
30728
|
+
AbstractUserEventService.prototype.markAllAsRead = function (entities) {
|
|
30635
30729
|
return __awaiter(this, void 0, void 0, function () {
|
|
30636
30730
|
var userEventWithoutReadListeners, _loop_1, this_1, _b, _c, entity, e_1_1;
|
|
30637
30731
|
var e_1, _d;
|
|
@@ -30764,33 +30858,60 @@
|
|
|
30764
30858
|
this._listenSubscription = undefined;
|
|
30765
30859
|
};
|
|
30766
30860
|
AbstractUserEventService.prototype.processUserEvent = function (source, that) {
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30861
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30862
|
+
var target, listeners, listeners_1, listeners_1_1, listener, res, _b, e_3_1;
|
|
30863
|
+
var e_3, _c;
|
|
30864
|
+
return __generator(this, function (_d) {
|
|
30865
|
+
switch (_d.label) {
|
|
30866
|
+
case 0:
|
|
30867
|
+
that = that || this;
|
|
30868
|
+
target = that.fromObject(source);
|
|
30869
|
+
listeners = (that.listeners || [])
|
|
30870
|
+
.filter(function (listener) { return !!listener.onReceived; })
|
|
30871
|
+
.filter(function (listener) { return listener.accept(target); });
|
|
30872
|
+
_d.label = 1;
|
|
30873
|
+
case 1:
|
|
30874
|
+
_d.trys.push([1, 9, 10, 11]);
|
|
30875
|
+
listeners_1 = __values(listeners), listeners_1_1 = listeners_1.next();
|
|
30876
|
+
_d.label = 2;
|
|
30877
|
+
case 2:
|
|
30878
|
+
if (!!listeners_1_1.done) return [3 /*break*/, 8];
|
|
30879
|
+
listener = listeners_1_1.value;
|
|
30880
|
+
if (!target) return [3 /*break*/, 6];
|
|
30881
|
+
res = listener.onReceived(target);
|
|
30882
|
+
if (!(res instanceof Promise)) return [3 /*break*/, 4];
|
|
30883
|
+
return [4 /*yield*/, res];
|
|
30884
|
+
case 3:
|
|
30885
|
+
_b = _d.sent();
|
|
30886
|
+
return [3 /*break*/, 5];
|
|
30887
|
+
case 4:
|
|
30888
|
+
_b = res;
|
|
30889
|
+
_d.label = 5;
|
|
30890
|
+
case 5:
|
|
30891
|
+
target = _b;
|
|
30892
|
+
return [3 /*break*/, 7];
|
|
30893
|
+
case 6:
|
|
30894
|
+
if (that._debug)
|
|
30895
|
+
console.debug(that._logPrefix + "Event has been rejected by a listener", source);
|
|
30896
|
+
return [3 /*break*/, 8];
|
|
30897
|
+
case 7:
|
|
30898
|
+
listeners_1_1 = listeners_1.next();
|
|
30899
|
+
return [3 /*break*/, 2];
|
|
30900
|
+
case 8: return [3 /*break*/, 11];
|
|
30901
|
+
case 9:
|
|
30902
|
+
e_3_1 = _d.sent();
|
|
30903
|
+
e_3 = { error: e_3_1 };
|
|
30904
|
+
return [3 /*break*/, 11];
|
|
30905
|
+
case 10:
|
|
30906
|
+
try {
|
|
30907
|
+
if (listeners_1_1 && !listeners_1_1.done && (_c = listeners_1.return)) _c.call(listeners_1);
|
|
30908
|
+
}
|
|
30909
|
+
finally { if (e_3) throw e_3.error; }
|
|
30910
|
+
return [7 /*endfinally*/];
|
|
30911
|
+
case 11: return [2 /*return*/, target];
|
|
30783
30912
|
}
|
|
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;
|
|
30913
|
+
});
|
|
30914
|
+
});
|
|
30794
30915
|
};
|
|
30795
30916
|
AbstractUserEventService.prototype.defaultMarkAsRead = function (userEvents) {
|
|
30796
30917
|
var _a;
|
|
@@ -30883,17 +31004,28 @@
|
|
|
30883
31004
|
this.popoverController = popoverController;
|
|
30884
31005
|
this.settings = settings;
|
|
30885
31006
|
this.userEventService = userEventService;
|
|
30886
|
-
this.
|
|
30887
|
-
this.
|
|
31007
|
+
this._subscriptions = new rxjs.Subscription();
|
|
31008
|
+
this._$pageSize = new rxjs.BehaviorSubject(20);
|
|
31009
|
+
this.fetchingMore = false;
|
|
31010
|
+
this.$items = new rxjs.BehaviorSubject(undefined);
|
|
31011
|
+
this.$itemCount = new rxjs.BehaviorSubject(undefined);
|
|
30888
31012
|
this.debug = false;
|
|
30889
|
-
this.pageSize = 10;
|
|
30890
31013
|
this.sortBy = 'creationDate';
|
|
30891
31014
|
this.sortDirection = 'desc';
|
|
30892
31015
|
this.enableInfiniteScroll = true;
|
|
30893
|
-
this.$items = new rxjs.BehaviorSubject(undefined);
|
|
30894
|
-
this.$itemCount = new rxjs.BehaviorSubject(undefined);
|
|
30895
31016
|
this.mobile = ((_a = this.settings) === null || _a === void 0 ? void 0 : _a.mobile) || false;
|
|
30896
31017
|
}
|
|
31018
|
+
Object.defineProperty(UserEventNotificationList.prototype, "pageSize", {
|
|
31019
|
+
get: function () {
|
|
31020
|
+
return this._$pageSize.value;
|
|
31021
|
+
},
|
|
31022
|
+
set: function (value) {
|
|
31023
|
+
if (value > 0 && value !== this._$pageSize.value)
|
|
31024
|
+
this._$pageSize.next(value);
|
|
31025
|
+
},
|
|
31026
|
+
enumerable: false,
|
|
31027
|
+
configurable: true
|
|
31028
|
+
});
|
|
30897
31029
|
Object.defineProperty(UserEventNotificationList.prototype, "canFetchMore", {
|
|
30898
31030
|
get: function () {
|
|
30899
31031
|
return this.enableInfiniteScroll && !!this._fetchMoreFn;
|
|
@@ -30905,27 +31037,31 @@
|
|
|
30905
31037
|
var _this = this;
|
|
30906
31038
|
// Watch all user events
|
|
30907
31039
|
if (this.userEventService) {
|
|
30908
|
-
this.
|
|
30909
|
-
.watchAll(0, this.pageSize, this.sortBy, this.sortDirection, this.filter)
|
|
31040
|
+
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
31041
|
.subscribe(function (result) {
|
|
30911
31042
|
var _a;
|
|
30912
31043
|
if (_this.debug)
|
|
30913
|
-
console.debug("[user-event-notification-list]
|
|
31044
|
+
console.debug("[user-event-notification-list] Receiving " + result.total + " user events", result.data);
|
|
30914
31045
|
_this.$items.next(result.data);
|
|
30915
31046
|
_this.$itemCount.next(result.total || ((_a = result.data) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
30916
31047
|
_this._fetchMoreFn = result.fetchMore;
|
|
31048
|
+
_this.fetchingMore = false; // Allow to refetch more
|
|
30917
31049
|
_this.markForCheck();
|
|
30918
31050
|
}));
|
|
30919
31051
|
// Listen changes
|
|
30920
|
-
this.
|
|
31052
|
+
this._subscriptions.add(this.userEventService.listenAllChanges(this.filter)
|
|
30921
31053
|
.subscribe(function (data) {
|
|
30922
31054
|
if (_this.debug)
|
|
30923
|
-
console.debug("[user-event-notification-list]
|
|
31055
|
+
console.debug("[user-event-notification-list] Receiving " + data.length + " new user events (by WS)", data);
|
|
30924
31056
|
}));
|
|
31057
|
+
if (this.enableInfiniteScroll)
|
|
31058
|
+
this.initInfiniteScroll();
|
|
30925
31059
|
}
|
|
30926
31060
|
};
|
|
30927
31061
|
UserEventNotificationList.prototype.ngOnDestroy = function () {
|
|
30928
|
-
this.
|
|
31062
|
+
this._subscriptions.unsubscribe();
|
|
31063
|
+
this.$items.complete();
|
|
31064
|
+
this.$itemCount.complete();
|
|
30929
31065
|
};
|
|
30930
31066
|
UserEventNotificationList.prototype.click = function (event, userEvent) {
|
|
30931
31067
|
if (!userEvent)
|
|
@@ -30987,65 +31123,77 @@
|
|
|
30987
31123
|
};
|
|
30988
31124
|
UserEventNotificationList.prototype.dismiss = function () {
|
|
30989
31125
|
this.popoverController.dismiss();
|
|
31126
|
+
// Reset counter (need if event has been received while popover if open)
|
|
31127
|
+
this.userEventService.resetCount();
|
|
30990
31128
|
};
|
|
30991
31129
|
UserEventNotificationList.prototype.fetchMore = function (event) {
|
|
30992
31130
|
var _a;
|
|
30993
31131
|
return __awaiter(this, void 0, void 0, function () {
|
|
30994
|
-
var result, data, err_2;
|
|
31132
|
+
var fetchMoreFn, result, data, err_2;
|
|
30995
31133
|
return __generator(this, function (_b) {
|
|
30996
31134
|
switch (_b.label) {
|
|
30997
31135
|
case 0:
|
|
30998
|
-
if (!this._fetchMoreFn || this.
|
|
31136
|
+
if (!this._fetchMoreFn || this.fetchingMore)
|
|
30999
31137
|
return [2 /*return*/];
|
|
31000
31138
|
console.debug('[user-event-notification-list] Fetching more notifications...', event);
|
|
31001
|
-
this.
|
|
31139
|
+
this.fetchingMore = true;
|
|
31140
|
+
fetchMoreFn = this._fetchMoreFn;
|
|
31002
31141
|
_b.label = 1;
|
|
31003
31142
|
case 1:
|
|
31004
31143
|
_b.trys.push([1, 3, 4, 5]);
|
|
31005
|
-
return [4 /*yield*/,
|
|
31144
|
+
return [4 /*yield*/, fetchMoreFn()];
|
|
31006
31145
|
case 2:
|
|
31007
31146
|
result = _b.sent();
|
|
31008
31147
|
data = __spread((this.$items.value || []), result.data);
|
|
31009
31148
|
// Remove duplication (e.g. when new user event was added by subscription)
|
|
31010
31149
|
data = removeDuplicatesFromArray(data, 'id');
|
|
31150
|
+
// fetch more changes (e.g. if watchAll observable as been refreshed)
|
|
31151
|
+
if (fetchMoreFn !== this._fetchMoreFn)
|
|
31152
|
+
return [2 /*return*/]; // Skip
|
|
31011
31153
|
this.$items.next(data);
|
|
31012
31154
|
this.$itemCount.next(result.total || ((_a = result.data) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
31013
31155
|
this._fetchMoreFn = result.fetchMore;
|
|
31156
|
+
// Update the page size, to keep same scroll height, after the next refresh
|
|
31157
|
+
this.pageSize = Math.max(this.pageSize, data.length);
|
|
31014
31158
|
return [3 /*break*/, 5];
|
|
31015
31159
|
case 3:
|
|
31016
31160
|
err_2 = _b.sent();
|
|
31017
31161
|
console.error(err_2);
|
|
31018
|
-
this._fetchMoreFn = undefined;
|
|
31162
|
+
this._fetchMoreFn = undefined; // Forget the function
|
|
31019
31163
|
return [3 /*break*/, 5];
|
|
31020
31164
|
case 4:
|
|
31021
31165
|
this.markForCheck();
|
|
31022
|
-
this.
|
|
31166
|
+
this.fetchingMore = false;
|
|
31023
31167
|
return [7 /*endfinally*/];
|
|
31024
31168
|
case 5: return [2 /*return*/];
|
|
31025
31169
|
}
|
|
31026
31170
|
});
|
|
31027
31171
|
});
|
|
31028
31172
|
};
|
|
31029
|
-
UserEventNotificationList.prototype.
|
|
31173
|
+
UserEventNotificationList.prototype.trackByFn = function (index, item) {
|
|
31174
|
+
return item.id;
|
|
31175
|
+
};
|
|
31176
|
+
UserEventNotificationList.prototype.initInfiniteScroll = function (threshold) {
|
|
31030
31177
|
return __awaiter(this, void 0, void 0, function () {
|
|
31031
31178
|
var panel;
|
|
31032
31179
|
var _this = this;
|
|
31033
31180
|
return __generator(this, function (_b) {
|
|
31034
31181
|
switch (_b.label) {
|
|
31035
31182
|
case 0:
|
|
31183
|
+
console.debug('[user-event-notification-list] Init infinite loop');
|
|
31036
31184
|
if (this._fetchMoreSubscription)
|
|
31037
31185
|
this._fetchMoreSubscription.unsubscribe();
|
|
31038
31186
|
threshold = threshold || (this.mobile ? '15%' : '2%');
|
|
31039
|
-
return [4 /*yield*/, waitFor(function () { return !!_this.ionContent; })];
|
|
31187
|
+
return [4 /*yield*/, waitFor(function () { return !!_this.ionContent; }, { dueTime: 250, timeout: 1000 })];
|
|
31040
31188
|
case 1:
|
|
31041
31189
|
_b.sent();
|
|
31042
31190
|
return [4 /*yield*/, this.ionContent.getScrollElement()];
|
|
31043
31191
|
case 2:
|
|
31044
31192
|
panel = _b.sent();
|
|
31045
31193
|
// 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*/)
|
|
31194
|
+
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
31195
|
.subscribe(function () { return _this.fetchMore(); });
|
|
31048
|
-
this.
|
|
31196
|
+
this._subscriptions.add(this._fetchMoreSubscription);
|
|
31049
31197
|
return [2 /*return*/];
|
|
31050
31198
|
}
|
|
31051
31199
|
});
|
|
@@ -31059,9 +31207,9 @@
|
|
|
31059
31207
|
UserEventNotificationList.decorators = [
|
|
31060
31208
|
{ type: i0.Component, args: [{
|
|
31061
31209
|
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 <
|
|
31210
|
+
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
31211
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
31064
|
-
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none
|
|
31212
|
+
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
31213
|
},] }
|
|
31066
31214
|
];
|
|
31067
31215
|
UserEventNotificationList.ctorParameters = function () { return [
|
|
@@ -31074,11 +31222,11 @@
|
|
|
31074
31222
|
debug: [{ type: i0.Input }],
|
|
31075
31223
|
mobile: [{ type: i0.Input }],
|
|
31076
31224
|
titleI18n: [{ type: i0.Input }],
|
|
31077
|
-
pageSize: [{ type: i0.Input }],
|
|
31078
31225
|
sortBy: [{ type: i0.Input }],
|
|
31079
31226
|
sortDirection: [{ type: i0.Input }],
|
|
31080
31227
|
filter: [{ type: i0.Input }],
|
|
31081
31228
|
enableInfiniteScroll: [{ type: i0.Input }],
|
|
31229
|
+
pageSize: [{ type: i0.Input }],
|
|
31082
31230
|
readEvent: [{ type: i0.Output }],
|
|
31083
31231
|
readEvents: [{ type: i0.Output }],
|
|
31084
31232
|
ionContent: [{ type: i0.ViewChild, args: [i1$5.IonContent,] }],
|
|
@@ -31126,12 +31274,12 @@
|
|
|
31126
31274
|
// Wait service
|
|
31127
31275
|
_a.sent();
|
|
31128
31276
|
// Subscribe to read event
|
|
31129
|
-
this._readEvent.subscribe(function (
|
|
31277
|
+
this._readEvent.subscribe(function (item) {
|
|
31130
31278
|
// default: mark event as read
|
|
31131
|
-
_this.userEventService.
|
|
31279
|
+
_this.userEventService.markAllAsRead([item]);
|
|
31132
31280
|
});
|
|
31133
|
-
this._readEvents.subscribe(function (
|
|
31134
|
-
_this.userEventService.
|
|
31281
|
+
this._readEvents.subscribe(function (items) {
|
|
31282
|
+
_this.userEventService.markAllAsRead(items);
|
|
31135
31283
|
});
|
|
31136
31284
|
return [2 /*return*/];
|
|
31137
31285
|
}
|
|
@@ -31152,7 +31300,8 @@
|
|
|
31152
31300
|
debug: this.debug,
|
|
31153
31301
|
titleI18n: this.titleI18n,
|
|
31154
31302
|
readEvent: this._readEvent,
|
|
31155
|
-
readEvents: this._readEvents
|
|
31303
|
+
readEvents: this._readEvents,
|
|
31304
|
+
filter: this.filter
|
|
31156
31305
|
},
|
|
31157
31306
|
backdropDismiss: true,
|
|
31158
31307
|
keyboardClose: true,
|
|
@@ -31206,7 +31355,8 @@
|
|
|
31206
31355
|
imports: [
|
|
31207
31356
|
i1$4.CommonModule,
|
|
31208
31357
|
SharedModule,
|
|
31209
|
-
AppIconModule
|
|
31358
|
+
AppIconModule,
|
|
31359
|
+
ngxJdenticon.NgxJdenticonModule
|
|
31210
31360
|
],
|
|
31211
31361
|
declarations: [
|
|
31212
31362
|
AppUserEventNotificationIcon,
|
|
@@ -31555,7 +31705,7 @@
|
|
|
31555
31705
|
{ type: i0.Component, args: [{
|
|
31556
31706
|
selector: 'app-job-progression-list',
|
|
31557
31707
|
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
|
|
31708
|
+
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
31709
|
},] }
|
|
31560
31710
|
];
|
|
31561
31711
|
JobProgressionList.ctorParameters = function () { return []; };
|
|
@@ -31820,118 +31970,8 @@
|
|
|
31820
31970
|
},] }
|
|
31821
31971
|
];
|
|
31822
31972
|
|
|
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
31973
|
var Mutations = {
|
|
31934
|
-
send: core.gql(templateObject_1$
|
|
31974
|
+
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
31975
|
};
|
|
31936
31976
|
var MessageService = /** @class */ (function (_super) {
|
|
31937
31977
|
__extends(MessageService, _super);
|
|
@@ -32015,7 +32055,7 @@
|
|
|
32015
32055
|
{ type: i1$5.ToastController },
|
|
32016
32056
|
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
32017
32057
|
]; };
|
|
32018
|
-
var templateObject_1$
|
|
32058
|
+
var templateObject_1$3;
|
|
32019
32059
|
|
|
32020
32060
|
var PersonFilter_1;
|
|
32021
32061
|
// @dynamic
|
|
@@ -32074,11 +32114,11 @@
|
|
|
32074
32114
|
], exports.PersonFilter);
|
|
32075
32115
|
|
|
32076
32116
|
var PersonFragments = {
|
|
32077
|
-
person: core.gql(templateObject_1$
|
|
32117
|
+
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
32118
|
};
|
|
32079
32119
|
// Load persons query
|
|
32080
32120
|
var PersonQueries = {
|
|
32081
|
-
loadAll: core.gql(templateObject_2$
|
|
32121
|
+
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
32122
|
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
32123
|
};
|
|
32084
32124
|
var PersonMutations = {
|
|
@@ -32214,7 +32254,7 @@
|
|
|
32214
32254
|
{ type: NetworkService },
|
|
32215
32255
|
{ type: EntitiesStorage }
|
|
32216
32256
|
]; };
|
|
32217
|
-
var templateObject_1$
|
|
32257
|
+
var templateObject_1$4, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2;
|
|
32218
32258
|
|
|
32219
32259
|
var PersonValidatorService = /** @class */ (function () {
|
|
32220
32260
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -32280,7 +32320,6 @@
|
|
|
32280
32320
|
_this.statusById = StatusById;
|
|
32281
32321
|
_this.filterCriteriaCount = 0;
|
|
32282
32322
|
_this.useSticky = false;
|
|
32283
|
-
_this.referentialToString = referentialToString;
|
|
32284
32323
|
_this.canEdit = accountService.isAdmin();
|
|
32285
32324
|
_this.canSendMessage = _this.canEdit;
|
|
32286
32325
|
_this.inlineEdition = _this.canEdit;
|
|
@@ -32895,12 +32934,14 @@
|
|
|
32895
32934
|
this.logContent = '';
|
|
32896
32935
|
this.memoryHide = false;
|
|
32897
32936
|
this.memoryMobile = true;
|
|
32937
|
+
this.noTimeProperty = MOMENT_NO_TIME_PROPERTY;
|
|
32898
32938
|
this.stringify = JSON.stringify;
|
|
32899
32939
|
this.form = formBuilder.group({
|
|
32900
32940
|
empty: [null],
|
|
32901
32941
|
emptyRequired: [null, i1.Validators.required],
|
|
32902
32942
|
enable: [null, i1.Validators.required],
|
|
32903
32943
|
disable: [null, i1.Validators.required],
|
|
32944
|
+
noTime: [null, i1.Validators.required],
|
|
32904
32945
|
readonly: [null]
|
|
32905
32946
|
}, {
|
|
32906
32947
|
validators: SharedFormGroupValidators.dateRange('empty', 'enable')
|
|
@@ -32927,6 +32968,7 @@
|
|
|
32927
32968
|
emptyRequired: null,
|
|
32928
32969
|
enable: toDateISOString(now),
|
|
32929
32970
|
disable: now,
|
|
32971
|
+
noTime: DateUtils.markNoTime(DateUtils.resetTime(now)),
|
|
32930
32972
|
readonly: now
|
|
32931
32973
|
};
|
|
32932
32974
|
this.form.setValue(data);
|
|
@@ -32937,6 +32979,9 @@
|
|
|
32937
32979
|
this.form.get('enable').valueChanges
|
|
32938
32980
|
.pipe(operators.debounceTime(300))
|
|
32939
32981
|
.subscribe(function (value) { return _this.log('[test-page] Value n°2: ' + JSON.stringify(value)); });
|
|
32982
|
+
this.form.get('noTime').valueChanges
|
|
32983
|
+
.pipe(operators.debounceTime(300))
|
|
32984
|
+
.subscribe(function (value) { return _this.log('[test-page] Value n°3: ' + JSON.stringify(value)); });
|
|
32940
32985
|
return [2 /*return*/];
|
|
32941
32986
|
});
|
|
32942
32987
|
});
|
|
@@ -32978,7 +33023,7 @@
|
|
|
32978
33023
|
DateTimeTestPage.decorators = [
|
|
32979
33024
|
{ type: i0.Component, args: [{
|
|
32980
33025
|
selector: 'app-data-time-test',
|
|
32981
|
-
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date/Time field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-time-field formControlName=\"emptyRequired\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Empty value + required -->\n <ion-col>\n\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value + required\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"emptyRequired\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Empty required value -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value + required\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"emptyRequired\"\n placeholder=\"Date/Time\"\n required\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-time-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date/Time\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
33026
|
+
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date/Time field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-time-field formControlName=\"emptyRequired\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Empty value + required -->\n <ion-col>\n\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value + required\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"emptyRequired\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"empty\"\n placeholder=\"Date/Time\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Empty required value -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value + required\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"emptyRequired\"\n placeholder=\"Date/Time\"\n required\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"enable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"disable\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- NoTime -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value (No time)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.noTime.value) + ' noTime:' + (form.controls.noTime.value && form.controls.noTime.value[noTimeProperty])}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"noTime\"\n placeholder=\"Date/Time\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-time-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date/Time\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-time-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
32982
33027
|
},] }
|
|
32983
33028
|
];
|
|
32984
33029
|
DateTimeTestPage.ctorParameters = function () { return [
|
|
@@ -34153,6 +34198,106 @@
|
|
|
34153
34198
|
},] }
|
|
34154
34199
|
];
|
|
34155
34200
|
|
|
34201
|
+
var UserEventTest_1;
|
|
34202
|
+
// @dynamic
|
|
34203
|
+
var UserEventTest = UserEventTest_1 = /** @class */ (function (_super) {
|
|
34204
|
+
__extends(UserEventTest, _super);
|
|
34205
|
+
function UserEventTest() {
|
|
34206
|
+
return _super.call(this, UserEventTest_1.TYPENAME) || this;
|
|
34207
|
+
}
|
|
34208
|
+
UserEventTest.prototype.asObject = function (opts) {
|
|
34209
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
34210
|
+
target.creationDate = toDateISOString(this.creationDate);
|
|
34211
|
+
target.readDate = toDateISOString(this.readDate);
|
|
34212
|
+
// Serialize content
|
|
34213
|
+
if (typeof target.content === 'object') {
|
|
34214
|
+
target.content = JSON.stringify(target.content);
|
|
34215
|
+
}
|
|
34216
|
+
delete target.avatar;
|
|
34217
|
+
delete target.avatarIcon;
|
|
34218
|
+
delete target.icon;
|
|
34219
|
+
delete target.actions;
|
|
34220
|
+
return target;
|
|
34221
|
+
};
|
|
34222
|
+
UserEventTest.prototype.fromObject = function (source) {
|
|
34223
|
+
Object.assign(this, source); // Copy all properties
|
|
34224
|
+
_super.prototype.fromObject.call(this, source);
|
|
34225
|
+
this.creationDate = fromDateISOString(source.creationDate);
|
|
34226
|
+
this.readDate = fromDateISOString(source.readDate);
|
|
34227
|
+
try {
|
|
34228
|
+
// Deserialize content
|
|
34229
|
+
if (typeof source.content === 'string' && source.content.startsWith('{')) {
|
|
34230
|
+
this.content = JSON.parse(source.content);
|
|
34231
|
+
}
|
|
34232
|
+
// Deserialize content.context
|
|
34233
|
+
if (this.content && typeof this.content.context === 'string' && this.content.context.startsWith('{')) {
|
|
34234
|
+
this.content.context = JSON.parse(this.content.context);
|
|
34235
|
+
}
|
|
34236
|
+
}
|
|
34237
|
+
catch (err) {
|
|
34238
|
+
console.error('Error during UserEvent deserialization', err);
|
|
34239
|
+
}
|
|
34240
|
+
};
|
|
34241
|
+
return UserEventTest;
|
|
34242
|
+
}(Entity));
|
|
34243
|
+
UserEventTest = UserEventTest_1 = __decorate([
|
|
34244
|
+
EntityClass({ typename: 'UserEventTestVO' })
|
|
34245
|
+
], UserEventTest);
|
|
34246
|
+
// @dynamic
|
|
34247
|
+
var UserEventTestFilter = /** @class */ (function (_super) {
|
|
34248
|
+
__extends(UserEventTestFilter, _super);
|
|
34249
|
+
function UserEventTestFilter() {
|
|
34250
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
34251
|
+
_this.types = [];
|
|
34252
|
+
_this.levels = [];
|
|
34253
|
+
_this.issuers = [];
|
|
34254
|
+
_this.recipients = [];
|
|
34255
|
+
_this.startDate = null;
|
|
34256
|
+
_this.excludeRead = false;
|
|
34257
|
+
return _this;
|
|
34258
|
+
}
|
|
34259
|
+
UserEventTestFilter.prototype.fromObject = function (source, opts) {
|
|
34260
|
+
_super.prototype.fromObject.call(this, source, opts);
|
|
34261
|
+
this.types = source.types || [];
|
|
34262
|
+
this.levels = source.levels || [];
|
|
34263
|
+
this.issuers = source.issuers || [];
|
|
34264
|
+
this.recipients = source.recipients || [];
|
|
34265
|
+
this.startDate = fromDateISOString(source.startDate);
|
|
34266
|
+
this.excludeRead = source.excludeRead || false;
|
|
34267
|
+
};
|
|
34268
|
+
UserEventTestFilter.prototype.buildFilter = function () {
|
|
34269
|
+
var _this = this;
|
|
34270
|
+
var filterFns = _super.prototype.buildFilter.call(this);
|
|
34271
|
+
if (isNotEmptyArray(this.types)) {
|
|
34272
|
+
filterFns.push(function (t) { return _this.types.includes(t.type); });
|
|
34273
|
+
}
|
|
34274
|
+
if (isNotEmptyArray(this.levels)) {
|
|
34275
|
+
filterFns.push(function (t) { return _this.levels.includes(t.level); });
|
|
34276
|
+
}
|
|
34277
|
+
if (isNotEmptyArray(this.issuers)) {
|
|
34278
|
+
filterFns.push(function (t) { return _this.issuers.includes(t.issuer); });
|
|
34279
|
+
}
|
|
34280
|
+
if (isNotEmptyArray(this.recipients)) {
|
|
34281
|
+
filterFns.push(function (t) { return _this.recipients.includes(t.recipient); });
|
|
34282
|
+
}
|
|
34283
|
+
if (isNotNil(this.startDate)) {
|
|
34284
|
+
filterFns.push(function (t) { return _this.startDate.isSameOrBefore(t.creationDate); });
|
|
34285
|
+
}
|
|
34286
|
+
if (this.excludeRead === true) {
|
|
34287
|
+
filterFns.push(function (t) { return isNil(t.readSignature); }); // todo or t.signature ?
|
|
34288
|
+
}
|
|
34289
|
+
return filterFns;
|
|
34290
|
+
};
|
|
34291
|
+
UserEventTestFilter.prototype.asObject = function (opts) {
|
|
34292
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
34293
|
+
return target;
|
|
34294
|
+
};
|
|
34295
|
+
return UserEventTestFilter;
|
|
34296
|
+
}(EntityFilter));
|
|
34297
|
+
UserEventTestFilter = __decorate([
|
|
34298
|
+
EntityClass({ typename: 'UserEventTestFilterVO' })
|
|
34299
|
+
], UserEventTestFilter);
|
|
34300
|
+
|
|
34156
34301
|
var UserEventTestService = /** @class */ (function (_super) {
|
|
34157
34302
|
__extends(UserEventTestService, _super);
|
|
34158
34303
|
function UserEventTestService(graphql, accountService, network, translate, environment) {
|
|
@@ -34168,25 +34313,38 @@
|
|
|
34168
34313
|
_this.network = network;
|
|
34169
34314
|
_this.translate = translate;
|
|
34170
34315
|
_this.environment = environment;
|
|
34171
|
-
_this
|
|
34316
|
+
_this.$userEvents = new rxjs.BehaviorSubject([]);
|
|
34317
|
+
_this.$newUserEvents = new rxjs.Subject();
|
|
34172
34318
|
return _this;
|
|
34173
34319
|
}
|
|
34174
34320
|
UserEventTestService.prototype.fromObject = function (source) {
|
|
34175
|
-
return
|
|
34321
|
+
return UserEventTest.fromObject(source);
|
|
34176
34322
|
};
|
|
34177
34323
|
UserEventTestService.prototype.add = function (entity) {
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34324
|
+
var _a;
|
|
34325
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
34326
|
+
return __generator(this, function (_b) {
|
|
34327
|
+
switch (_b.label) {
|
|
34328
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
34329
|
+
case 1:
|
|
34330
|
+
entity = _b.sent();
|
|
34331
|
+
entity.id = (((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0) + 1;
|
|
34332
|
+
this.$userEvents.next(__spread([
|
|
34333
|
+
entity
|
|
34334
|
+
], this.$userEvents.value));
|
|
34335
|
+
this._countSubject.next((this._countSubject.value || 0) + 1);
|
|
34336
|
+
this.$newUserEvents.next([entity]);
|
|
34337
|
+
return [2 /*return*/];
|
|
34338
|
+
}
|
|
34339
|
+
});
|
|
34340
|
+
});
|
|
34184
34341
|
};
|
|
34185
34342
|
UserEventTestService.prototype.asFilter = function (filter) {
|
|
34186
34343
|
return filter;
|
|
34187
34344
|
};
|
|
34188
34345
|
UserEventTestService.prototype.count = function (filter, options) {
|
|
34189
|
-
|
|
34346
|
+
var _a;
|
|
34347
|
+
return Promise.resolve(((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
34190
34348
|
};
|
|
34191
34349
|
UserEventTestService.prototype.delete = function (entity) {
|
|
34192
34350
|
return Promise.resolve(undefined);
|
|
@@ -34194,12 +34352,12 @@
|
|
|
34194
34352
|
UserEventTestService.prototype.deleteAll = function (data, opts) {
|
|
34195
34353
|
return Promise.resolve(undefined);
|
|
34196
34354
|
};
|
|
34197
|
-
UserEventTestService.prototype.
|
|
34198
|
-
return
|
|
34355
|
+
UserEventTestService.prototype.listenAllChanges = function (filter, options) {
|
|
34356
|
+
return this.$newUserEvents.asObservable();
|
|
34199
34357
|
};
|
|
34200
34358
|
UserEventTestService.prototype.save = function (entity, options) {
|
|
34201
34359
|
var _a;
|
|
34202
|
-
var toSave = (_a = this.
|
|
34360
|
+
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
34361
|
Object.assign(toSave, entity);
|
|
34204
34362
|
return entity;
|
|
34205
34363
|
};
|
|
@@ -34234,31 +34392,33 @@
|
|
|
34234
34392
|
}
|
|
34235
34393
|
finally { if (e_1) throw e_1.error; }
|
|
34236
34394
|
return [7 /*endfinally*/];
|
|
34237
|
-
case 7: return [2 /*return*/,
|
|
34395
|
+
case 7: return [2 /*return*/, this.$userEvents.toPromise()];
|
|
34238
34396
|
}
|
|
34239
34397
|
});
|
|
34240
34398
|
});
|
|
34241
34399
|
};
|
|
34242
34400
|
UserEventTestService.prototype.watchAll = function (offset, size, sortBy, sortDirection, filter, opts) {
|
|
34243
34401
|
var _this = this;
|
|
34244
|
-
|
|
34245
|
-
|
|
34246
|
-
|
|
34247
|
-
|
|
34248
|
-
|
|
34249
|
-
|
|
34250
|
-
|
|
34251
|
-
|
|
34252
|
-
|
|
34253
|
-
|
|
34254
|
-
|
|
34255
|
-
|
|
34402
|
+
return this.$userEvents.pipe(operators.map(function (userEvents) {
|
|
34403
|
+
var _a;
|
|
34404
|
+
var data = (userEvents || []).slice(offset || 0, offset + size);
|
|
34405
|
+
var total = ((_a = _this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
34406
|
+
var res = { data: data, total: total };
|
|
34407
|
+
// Must re-order because of listenChanges result will add new event at the end
|
|
34408
|
+
data = EntityUtils.sort(data, sortBy, sortDirection);
|
|
34409
|
+
// Add fetch more
|
|
34410
|
+
var nextOffset = offset + data.length;
|
|
34411
|
+
if (nextOffset < res.total) {
|
|
34412
|
+
res.fetchMore = function (_) { return _this.loadAll(nextOffset, size, sortBy, sortDirection, filter, Object.assign(Object.assign({}, opts), { fetchPolicy: 'no-cache' })); };
|
|
34413
|
+
}
|
|
34414
|
+
return res;
|
|
34415
|
+
}));
|
|
34256
34416
|
};
|
|
34257
34417
|
UserEventTestService.prototype.loadAll = function (offset, size, sortBy, sortDirection, filter, opts) {
|
|
34258
34418
|
var _this = this;
|
|
34259
34419
|
var _a;
|
|
34260
|
-
var data = (this.
|
|
34261
|
-
var total = ((_a = this.
|
|
34420
|
+
var data = (this.$userEvents.value || []).slice(offset || 0, offset + size);
|
|
34421
|
+
var total = ((_a = this.$userEvents.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
34262
34422
|
var res = { data: data, total: total };
|
|
34263
34423
|
// Must re-order because of listenChanges result will add new event at the end
|
|
34264
34424
|
data = EntityUtils.sort(data, sortBy, sortDirection);
|
|
@@ -34302,6 +34462,16 @@
|
|
|
34302
34462
|
onRead: function (userEvent) { _this.showMessage("debug message read "); }
|
|
34303
34463
|
});
|
|
34304
34464
|
}
|
|
34465
|
+
Object.defineProperty(UserEventTestingPage.prototype, "timerStarted", {
|
|
34466
|
+
get: function () {
|
|
34467
|
+
return !!this._timerSubscription;
|
|
34468
|
+
},
|
|
34469
|
+
enumerable: false,
|
|
34470
|
+
configurable: true
|
|
34471
|
+
});
|
|
34472
|
+
UserEventTestingPage.prototype.ngOnDestroy = function () {
|
|
34473
|
+
this.stopTimer();
|
|
34474
|
+
};
|
|
34305
34475
|
UserEventTestingPage.prototype.customize = function (userEvent) {
|
|
34306
34476
|
// Choose avatarIcon
|
|
34307
34477
|
switch (userEvent.level) {
|
|
@@ -34332,7 +34502,7 @@
|
|
|
34332
34502
|
}
|
|
34333
34503
|
};
|
|
34334
34504
|
UserEventTestingPage.prototype.addNotification = function () {
|
|
34335
|
-
this.userEventService.add(
|
|
34505
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34336
34506
|
issuer: 'system',
|
|
34337
34507
|
recipient: 'me',
|
|
34338
34508
|
type: 'message',
|
|
@@ -34342,7 +34512,7 @@
|
|
|
34342
34512
|
}));
|
|
34343
34513
|
};
|
|
34344
34514
|
UserEventTestingPage.prototype.addError = function () {
|
|
34345
|
-
this.userEventService.add(
|
|
34515
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34346
34516
|
issuer: 'system',
|
|
34347
34517
|
recipient: 'me',
|
|
34348
34518
|
type: 'upload',
|
|
@@ -34352,7 +34522,7 @@
|
|
|
34352
34522
|
}));
|
|
34353
34523
|
};
|
|
34354
34524
|
UserEventTestingPage.prototype.addWarning = function () {
|
|
34355
|
-
this.userEventService.add(
|
|
34525
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34356
34526
|
issuer: 'system',
|
|
34357
34527
|
recipient: 'me',
|
|
34358
34528
|
type: 'download',
|
|
@@ -34362,7 +34532,7 @@
|
|
|
34362
34532
|
}));
|
|
34363
34533
|
};
|
|
34364
34534
|
UserEventTestingPage.prototype.addDebug = function () {
|
|
34365
|
-
this.userEventService.add(
|
|
34535
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34366
34536
|
issuer: 'system',
|
|
34367
34537
|
recipient: 'me',
|
|
34368
34538
|
type: 'debug',
|
|
@@ -34373,7 +34543,7 @@
|
|
|
34373
34543
|
};
|
|
34374
34544
|
UserEventTestingPage.prototype.addNotificationWithLink = function () {
|
|
34375
34545
|
var _this = this;
|
|
34376
|
-
this.userEventService.add(
|
|
34546
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34377
34547
|
issuer: 'system',
|
|
34378
34548
|
recipient: 'me',
|
|
34379
34549
|
type: 'message',
|
|
@@ -34391,7 +34561,7 @@
|
|
|
34391
34561
|
};
|
|
34392
34562
|
UserEventTestingPage.prototype.addNotificationWithAction = function () {
|
|
34393
34563
|
var _this = this;
|
|
34394
|
-
this.userEventService.add(
|
|
34564
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34395
34565
|
issuer: 'system',
|
|
34396
34566
|
recipient: 'me',
|
|
34397
34567
|
type: 'message',
|
|
@@ -34418,9 +34588,54 @@
|
|
|
34418
34588
|
]
|
|
34419
34589
|
}));
|
|
34420
34590
|
};
|
|
34591
|
+
UserEventTestingPage.prototype.addMany = function (count) {
|
|
34592
|
+
count = count || 20;
|
|
34593
|
+
for (var i = 0; i < count; i++) {
|
|
34594
|
+
this.addRandom(i);
|
|
34595
|
+
}
|
|
34596
|
+
};
|
|
34597
|
+
UserEventTestingPage.prototype.startTimer = function (period) {
|
|
34598
|
+
var _this = this;
|
|
34599
|
+
var _a;
|
|
34600
|
+
(_a = this._timerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
34601
|
+
period = period || 1000;
|
|
34602
|
+
var counter = 0;
|
|
34603
|
+
this._timerSubscription = rxjs.timer(period, period)
|
|
34604
|
+
.subscribe(function () {
|
|
34605
|
+
_this.addRandom(counter);
|
|
34606
|
+
counter++;
|
|
34607
|
+
});
|
|
34608
|
+
};
|
|
34609
|
+
UserEventTestingPage.prototype.stopTimer = function () {
|
|
34610
|
+
var _a;
|
|
34611
|
+
(_a = this._timerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
34612
|
+
this._timerSubscription = null;
|
|
34613
|
+
};
|
|
34614
|
+
UserEventTestingPage.prototype.addRandom = function (value) {
|
|
34615
|
+
switch (value % 6) {
|
|
34616
|
+
case 0:
|
|
34617
|
+
this.addNotification();
|
|
34618
|
+
break;
|
|
34619
|
+
case 1:
|
|
34620
|
+
this.addError();
|
|
34621
|
+
break;
|
|
34622
|
+
case 2:
|
|
34623
|
+
this.addDebug();
|
|
34624
|
+
break;
|
|
34625
|
+
case 3:
|
|
34626
|
+
this.addNotificationWithLink();
|
|
34627
|
+
break;
|
|
34628
|
+
case 4:
|
|
34629
|
+
this.addNotificationWithAction();
|
|
34630
|
+
break;
|
|
34631
|
+
case 5:
|
|
34632
|
+
this.addNotificationWithDefaultAction();
|
|
34633
|
+
break;
|
|
34634
|
+
}
|
|
34635
|
+
};
|
|
34421
34636
|
UserEventTestingPage.prototype.addNotificationWithDefaultAction = function () {
|
|
34422
34637
|
var _this = this;
|
|
34423
|
-
this.userEventService.add(
|
|
34638
|
+
this.userEventService.add(UserEventTest.fromObject({
|
|
34424
34639
|
issuer: 'system',
|
|
34425
34640
|
recipient: 'me',
|
|
34426
34641
|
type: 'message',
|
|
@@ -34444,7 +34659,7 @@
|
|
|
34444
34659
|
UserEventTestingPage.decorators = [
|
|
34445
34660
|
{ type: i0.Component, args: [{
|
|
34446
34661
|
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"
|
|
34662
|
+
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
34663
|
},] }
|
|
34449
34664
|
];
|
|
34450
34665
|
UserEventTestingPage.ctorParameters = function () { return [
|
|
@@ -34602,6 +34817,7 @@
|
|
|
34602
34817
|
exports.CryptoService = CryptoService;
|
|
34603
34818
|
exports.CsvUtils = CsvUtils;
|
|
34604
34819
|
exports.DATE_ISO_PATTERN = DATE_ISO_PATTERN;
|
|
34820
|
+
exports.DATE_PATTERN = DATE_PATTERN;
|
|
34605
34821
|
exports.DATE_UNIX_MS_TIMESTAMP = DATE_UNIX_MS_TIMESTAMP;
|
|
34606
34822
|
exports.DATE_UNIX_TIMESTAMP = DATE_UNIX_TIMESTAMP;
|
|
34607
34823
|
exports.DEFAULT_MENU_SHOW_WHEN = DEFAULT_MENU_SHOW_WHEN;
|
|
@@ -34657,6 +34873,8 @@
|
|
|
34657
34873
|
exports.HomePage = HomePage;
|
|
34658
34874
|
exports.Hotkeys = Hotkeys;
|
|
34659
34875
|
exports.HotkeysDialogComponent = HotkeysDialogComponent;
|
|
34876
|
+
exports.IMAGE_DEFAULTS = IMAGE_DEFAULTS;
|
|
34877
|
+
exports.ImagesUtils = ImagesUtils;
|
|
34660
34878
|
exports.InMemoryEntitiesService = InMemoryEntitiesService;
|
|
34661
34879
|
exports.IsLoginAccountPipe = IsLoginAccountPipe;
|
|
34662
34880
|
exports.IsNilOrBlankPipe = IsNilOrBlankPipe;
|
|
@@ -34682,6 +34900,7 @@
|
|
|
34682
34900
|
exports.LongitudeFormatPipe = LongitudeFormatPipe;
|
|
34683
34901
|
exports.MINIFY_ENTITY_FOR_LOCAL_STORAGE = MINIFY_ENTITY_FOR_LOCAL_STORAGE;
|
|
34684
34902
|
exports.MINIFY_ENTITY_FOR_POD = MINIFY_ENTITY_FOR_POD;
|
|
34903
|
+
exports.MOMENT_NO_TIME_PROPERTY = MOMENT_NO_TIME_PROPERTY;
|
|
34685
34904
|
exports.MapGetPipe = MapGetPipe;
|
|
34686
34905
|
exports.MapKeysPipe = MapKeysPipe;
|
|
34687
34906
|
exports.MapValuesPipe = MapValuesPipe;
|
|
@@ -34808,12 +35027,10 @@
|
|
|
34808
35027
|
exports.UploadFileTestingModule = UploadFileTestingModule;
|
|
34809
35028
|
exports.UploadFileTestingPage = UploadFileTestingPage;
|
|
34810
35029
|
exports.UriUtils = UriUtils;
|
|
34811
|
-
exports.UserEventFragments = UserEventFragments;
|
|
34812
35030
|
exports.UserEventModule = UserEventModule;
|
|
34813
35031
|
exports.UserEventTestService = UserEventTestService;
|
|
34814
35032
|
exports.UserEventTestingModule = UserEventTestingModule;
|
|
34815
35033
|
exports.UserEventTestingPage = UserEventTestingPage;
|
|
34816
|
-
exports.UserEventTypes = UserEventTypes;
|
|
34817
35034
|
exports.UsersPage = UsersPage;
|
|
34818
35035
|
exports.accountToString = accountToString;
|
|
34819
35036
|
exports.adaptValueToControl = adaptValueToControl;
|