@sumaris-net/ngx-components 1.22.11-rc1 → 1.22.11-rc4
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 +465 -6
- 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 +10 -1
- package/esm2015/src/app/social/job/testing/job-progression.testing.js +48 -0
- package/esm2015/src/app/social/job/testing/job-progression.testing.service.js +30 -0
- package/esm2015/src/app/social/job/testing/job.testing.module.js +25 -0
- package/esm2015/src/app/social/social.module.js +1 -1
- package/esm2015/src/app/social/social.testing.module.js +39 -0
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +32 -7
- package/esm2015/src/app/social/user-event/testing/user-event.testing.js +165 -0
- package/esm2015/src/app/social/user-event/testing/user-event.testing.module.js +25 -0
- package/fesm2015/sumaris-net.ngx-components.js +400 -8
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +7 -0
- package/src/app/social/job/testing/job-progression.testing.d.ts +11 -0
- package/src/app/social/job/testing/job-progression.testing.service.d.ts +10 -0
- package/src/app/social/job/testing/job.testing.module.d.ts +2 -0
- package/src/app/social/social.testing.module.d.ts +4 -0
- package/src/app/social/user-event/notification/user-event-notification.list.d.ts +3 -2
- package/src/app/social/user-event/testing/user-event.testing.d.ts +22 -0
- package/src/app/social/user-event/testing/user-event.testing.module.d.ts +2 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -30836,7 +30836,17 @@
|
|
|
30836
30836
|
UserEventNotificationList.prototype.ngOnDestroy = function () {
|
|
30837
30837
|
this.subscriptions.unsubscribe();
|
|
30838
30838
|
};
|
|
30839
|
-
UserEventNotificationList.prototype.
|
|
30839
|
+
UserEventNotificationList.prototype.click = function (event, userEvent) {
|
|
30840
|
+
if (!userEvent)
|
|
30841
|
+
return; // Skip
|
|
30842
|
+
// MarkAsRead
|
|
30843
|
+
this.markAsRead(event, userEvent);
|
|
30844
|
+
var action = ((userEvent === null || userEvent === void 0 ? void 0 : userEvent.actions) || []).find(function (a) { return a.name === 'click' || a.name === 'default'; });
|
|
30845
|
+
if (action) {
|
|
30846
|
+
this.executeAction(event, action, userEvent);
|
|
30847
|
+
}
|
|
30848
|
+
};
|
|
30849
|
+
UserEventNotificationList.prototype.markAsRead = function (event, userEvent) {
|
|
30840
30850
|
var _a;
|
|
30841
30851
|
if (userEvent === null || userEvent === void 0 ? void 0 : userEvent.readDate)
|
|
30842
30852
|
return;
|
|
@@ -30849,10 +30859,36 @@
|
|
|
30849
30859
|
return;
|
|
30850
30860
|
(_a = this.readEvents) === null || _a === void 0 ? void 0 : _a.emit(unreadUserEvents);
|
|
30851
30861
|
};
|
|
30852
|
-
UserEventNotificationList.prototype.executeAction = function (action, userEvent) {
|
|
30853
|
-
|
|
30854
|
-
|
|
30855
|
-
|
|
30862
|
+
UserEventNotificationList.prototype.executeAction = function (event, action, userEvent) {
|
|
30863
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30864
|
+
var res, err_1;
|
|
30865
|
+
return __generator(this, function (_b) {
|
|
30866
|
+
switch (_b.label) {
|
|
30867
|
+
case 0:
|
|
30868
|
+
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
30869
|
+
return [2 /*return*/]; // Skip if prevented
|
|
30870
|
+
// Disable default action (.e.g avoid to call click() function)
|
|
30871
|
+
if (event)
|
|
30872
|
+
event.preventDefault();
|
|
30873
|
+
_b.label = 1;
|
|
30874
|
+
case 1:
|
|
30875
|
+
_b.trys.push([1, 4, , 5]);
|
|
30876
|
+
res = action.executeAction(userEvent);
|
|
30877
|
+
this.dismiss();
|
|
30878
|
+
if (!(res instanceof Promise)) return [3 /*break*/, 3];
|
|
30879
|
+
return [4 /*yield*/, res];
|
|
30880
|
+
case 2:
|
|
30881
|
+
_b.sent();
|
|
30882
|
+
_b.label = 3;
|
|
30883
|
+
case 3: return [3 /*break*/, 5];
|
|
30884
|
+
case 4:
|
|
30885
|
+
err_1 = _b.sent();
|
|
30886
|
+
console.error(err_1);
|
|
30887
|
+
return [3 /*break*/, 5];
|
|
30888
|
+
case 5: return [2 /*return*/];
|
|
30889
|
+
}
|
|
30890
|
+
});
|
|
30891
|
+
});
|
|
30856
30892
|
};
|
|
30857
30893
|
UserEventNotificationList.prototype.dismiss = function () {
|
|
30858
30894
|
this.popoverController.dismiss();
|
|
@@ -30865,7 +30901,7 @@
|
|
|
30865
30901
|
UserEventNotificationList.decorators = [
|
|
30866
30902
|
{ type: i0.Component, args: [{
|
|
30867
30903
|
selector: 'app-user-event-notification-list',
|
|
30868
|
-
template: "\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=\"userEvents|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"readAll($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item *ngIf=\"userEvents|async|isEmptyArray\" lines=\"none\">\n <ion-text color=\"dark\" class=\"text-italic\">{{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}</ion-text>\n </ion-item>\n <ion-item\n *ngFor=\"let userEvent of userEvents | async\"\n (click)=\"
|
|
30904
|
+
template: "\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=\"userEvents|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"readAll($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item *ngIf=\"userEvents|async|isEmptyArray\" lines=\"none\">\n <ion-text color=\"dark\" class=\"text-italic\">{{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}</ion-text>\n </ion-item>\n <ion-item\n *ngFor=\"let userEvent of userEvents | async\"\n (click)=\"click($event, userEvent)\"\n >\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"userEvent.avatar; else avatarIcon\" src=\"{{ userEvent.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"userEvent.avatarIcon\"\n [ref]=\"userEvent.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>\n <p [class.unread]=\"!userEvent.readDate\" [innerHTML]=\"userEvent.message\"></p>\n </ion-col>\n </ion-row>\n <ion-row *ngIf=\"userEvent.actions?.length\">\n <ion-col>\n <span *ngFor=\"let action of userEvent.actions\" class=\"action\">\n <a (click)=\"executeAction($event, action, userEvent)\" [title]=\"action.title|translate\">\n <app-icon *ngIf=\"action.iconRef\" slot=\"start\" height=\"20\" width=\"20\" [ref]=\"action.iconRef\"></app-icon>\n {{ action.name | translate }}\n </a>\n </span>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <app-icon\n *ngIf=\"userEvent.icon\"\n [ref]=\"userEvent.icon\"\n height=\"16\"\n width=\"16\"\n style=\"vertical-align: sub; margin-right: 3px\"\n ></app-icon>\n <small>\n <span>{{userEvent.creationDate|dateFromNow}}</span>\n <span style=\"color: gray\">{{ ' | ' + (userEvent.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-item>\n\n <ion-row class=\"ion-list-footer column\">\n </ion-row>\n\n</ion-list>\n",
|
|
30869
30905
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
30870
30906
|
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.unread{font-weight:700}.message{font-size:.9em}.message p{margin-top:5px;margin-bottom:5px}.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}.action a{margin-right:10px;cursor:pointer}.action app-icon{vertical-align:middle}"]
|
|
30871
30907
|
},] }
|
|
@@ -33853,6 +33889,421 @@
|
|
|
33853
33889
|
},] }
|
|
33854
33890
|
];
|
|
33855
33891
|
|
|
33892
|
+
var JobProgressionTestService = /** @class */ (function () {
|
|
33893
|
+
function JobProgressionTestService() {
|
|
33894
|
+
}
|
|
33895
|
+
JobProgressionTestService.prototype.listenChanges = function (id, options) {
|
|
33896
|
+
return rxjs.interval(100).pipe(operators.take(111), operators.map(function (value) {
|
|
33897
|
+
if (value <= 10) {
|
|
33898
|
+
return {
|
|
33899
|
+
id: id,
|
|
33900
|
+
name: "Job #" + id,
|
|
33901
|
+
current: 0,
|
|
33902
|
+
total: 0,
|
|
33903
|
+
message: "Progression pending"
|
|
33904
|
+
};
|
|
33905
|
+
}
|
|
33906
|
+
value = value - 10;
|
|
33907
|
+
return {
|
|
33908
|
+
id: id,
|
|
33909
|
+
name: "Job #" + id,
|
|
33910
|
+
current: value,
|
|
33911
|
+
total: 100,
|
|
33912
|
+
message: "Progression " + value + "/100"
|
|
33913
|
+
};
|
|
33914
|
+
}));
|
|
33915
|
+
};
|
|
33916
|
+
return JobProgressionTestService;
|
|
33917
|
+
}());
|
|
33918
|
+
JobProgressionTestService.decorators = [
|
|
33919
|
+
{ type: i0.Injectable }
|
|
33920
|
+
];
|
|
33921
|
+
|
|
33922
|
+
var JobProgressionTestingPage = /** @class */ (function () {
|
|
33923
|
+
function JobProgressionTestingPage() {
|
|
33924
|
+
this.nJob = 0;
|
|
33925
|
+
this.options = {
|
|
33926
|
+
autoHide: true
|
|
33927
|
+
};
|
|
33928
|
+
this.job = new exports.JobProgression();
|
|
33929
|
+
this.job.id = 0;
|
|
33930
|
+
this.job.name = 'test';
|
|
33931
|
+
this.job.current = 0;
|
|
33932
|
+
this.job.total = 100;
|
|
33933
|
+
}
|
|
33934
|
+
JobProgressionTestingPage.prototype.incrementJob = function (value) {
|
|
33935
|
+
this.job.current = Math.max(0, this.job.current + value);
|
|
33936
|
+
this.job.message = "Fake progression (very long message very long message very long message very long message) " + this.job.current + "/100";
|
|
33937
|
+
if (this.job.current > this.job.total) {
|
|
33938
|
+
this.jobProgression.removeJob(0);
|
|
33939
|
+
this.job.current = 0;
|
|
33940
|
+
}
|
|
33941
|
+
else if (!this.jobProgression.getProgression(0)) {
|
|
33942
|
+
this.jobProgression.jobProgressions.push(this.job);
|
|
33943
|
+
}
|
|
33944
|
+
this.jobProgression.updateValue();
|
|
33945
|
+
};
|
|
33946
|
+
JobProgressionTestingPage.prototype.addJob = function () {
|
|
33947
|
+
// Add fake job
|
|
33948
|
+
this.nJob++;
|
|
33949
|
+
this.jobProgression.addJob(this.nJob);
|
|
33950
|
+
};
|
|
33951
|
+
return JobProgressionTestingPage;
|
|
33952
|
+
}());
|
|
33953
|
+
JobProgressionTestingPage.decorators = [
|
|
33954
|
+
{ type: i0.Component, args: [{
|
|
33955
|
+
selector: 'job-progression-testing',
|
|
33956
|
+
template: "<ion-toolbar color=\"primary\">\n <ion-title>Job progression</ion-title>\n</ion-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <app-job-progression #jobProgression [debug]=\"true\" [options]=\"options\" ></app-job-progression>\n\n <p>\n <ion-button (click)=\"incrementJob(10)\">\n +10\n </ion-button>\n <ion-button (click)=\"incrementJob(-10)\">\n -10\n </ion-button>\n </p>\n <p>\n <ion-button (click)=\"addJob()\">Add Job</ion-button>\n </p>\n</ion-content>\n",
|
|
33957
|
+
providers: [
|
|
33958
|
+
{ provide: JobProgressionServiceToken, useClass: JobProgressionTestService }
|
|
33959
|
+
]
|
|
33960
|
+
},] }
|
|
33961
|
+
];
|
|
33962
|
+
JobProgressionTestingPage.ctorParameters = function () { return []; };
|
|
33963
|
+
JobProgressionTestingPage.propDecorators = {
|
|
33964
|
+
jobProgression: [{ type: i0.ViewChild, args: ['jobProgression',] }]
|
|
33965
|
+
};
|
|
33966
|
+
|
|
33967
|
+
var JobTestingModule = /** @class */ (function () {
|
|
33968
|
+
function JobTestingModule() {
|
|
33969
|
+
}
|
|
33970
|
+
return JobTestingModule;
|
|
33971
|
+
}());
|
|
33972
|
+
JobTestingModule.decorators = [
|
|
33973
|
+
{ type: i0.NgModule, args: [{
|
|
33974
|
+
imports: [
|
|
33975
|
+
i1$4.CommonModule,
|
|
33976
|
+
i1$2.TranslateModule.forChild(),
|
|
33977
|
+
SharedModule,
|
|
33978
|
+
JobModule
|
|
33979
|
+
],
|
|
33980
|
+
declarations: [
|
|
33981
|
+
JobProgressionTestingPage
|
|
33982
|
+
],
|
|
33983
|
+
exports: [
|
|
33984
|
+
JobProgressionTestingPage
|
|
33985
|
+
]
|
|
33986
|
+
},] }
|
|
33987
|
+
];
|
|
33988
|
+
|
|
33989
|
+
var UserEventTestService = /** @class */ (function (_super) {
|
|
33990
|
+
__extends(UserEventTestService, _super);
|
|
33991
|
+
function UserEventTestService(graphql, accountService, network, translate, environment) {
|
|
33992
|
+
var _this = _super.call(this, graphql, accountService, network, translate, {
|
|
33993
|
+
queries: {
|
|
33994
|
+
loadAll: null,
|
|
33995
|
+
loadAllWithContent: null
|
|
33996
|
+
},
|
|
33997
|
+
production: environment === null || environment === void 0 ? void 0 : environment.production
|
|
33998
|
+
}) || this;
|
|
33999
|
+
_this.graphql = graphql;
|
|
34000
|
+
_this.accountService = accountService;
|
|
34001
|
+
_this.network = network;
|
|
34002
|
+
_this.translate = translate;
|
|
34003
|
+
_this.environment = environment;
|
|
34004
|
+
_this.userEvents = [];
|
|
34005
|
+
return _this;
|
|
34006
|
+
}
|
|
34007
|
+
UserEventTestService.prototype.fromObject = function (source) {
|
|
34008
|
+
return exports.UserEvent.fromObject(source);
|
|
34009
|
+
};
|
|
34010
|
+
UserEventTestService.prototype.add = function (entity) {
|
|
34011
|
+
entity = this.processUserEvent(entity);
|
|
34012
|
+
entity.id = this.userEvents.length + 1;
|
|
34013
|
+
this.userEvents = __spread([
|
|
34014
|
+
entity
|
|
34015
|
+
], this.userEvents);
|
|
34016
|
+
this._countSubject.next((this._countSubject.value || 0) + 1);
|
|
34017
|
+
};
|
|
34018
|
+
UserEventTestService.prototype.asFilter = function (filter) {
|
|
34019
|
+
return filter;
|
|
34020
|
+
};
|
|
34021
|
+
UserEventTestService.prototype.count = function (filter, options) {
|
|
34022
|
+
return Promise.resolve(this.userEvents.length);
|
|
34023
|
+
};
|
|
34024
|
+
UserEventTestService.prototype.delete = function (entity) {
|
|
34025
|
+
return Promise.resolve(undefined);
|
|
34026
|
+
};
|
|
34027
|
+
UserEventTestService.prototype.deleteAll = function (data, opts) {
|
|
34028
|
+
return Promise.resolve(undefined);
|
|
34029
|
+
};
|
|
34030
|
+
UserEventTestService.prototype.listenChanges = function (filter, options) {
|
|
34031
|
+
return rxjs.of();
|
|
34032
|
+
};
|
|
34033
|
+
UserEventTestService.prototype.save = function (entity, options) {
|
|
34034
|
+
var _a;
|
|
34035
|
+
var toSave = (_a = this.userEvents) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id == (entity === null || entity === void 0 ? void 0 : entity.id); });
|
|
34036
|
+
Object.assign(toSave, entity);
|
|
34037
|
+
return entity;
|
|
34038
|
+
};
|
|
34039
|
+
UserEventTestService.prototype.saveAll = function (data, opts) {
|
|
34040
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
34041
|
+
var _b, _c, entity, e_1_1;
|
|
34042
|
+
var e_1, _d;
|
|
34043
|
+
return __generator(this, function (_e) {
|
|
34044
|
+
switch (_e.label) {
|
|
34045
|
+
case 0:
|
|
34046
|
+
_e.trys.push([0, 5, 6, 7]);
|
|
34047
|
+
_b = __values((data || [])), _c = _b.next();
|
|
34048
|
+
_e.label = 1;
|
|
34049
|
+
case 1:
|
|
34050
|
+
if (!!_c.done) return [3 /*break*/, 4];
|
|
34051
|
+
entity = _c.value;
|
|
34052
|
+
return [4 /*yield*/, this.save(entity)];
|
|
34053
|
+
case 2:
|
|
34054
|
+
_e.sent();
|
|
34055
|
+
_e.label = 3;
|
|
34056
|
+
case 3:
|
|
34057
|
+
_c = _b.next();
|
|
34058
|
+
return [3 /*break*/, 1];
|
|
34059
|
+
case 4: return [3 /*break*/, 7];
|
|
34060
|
+
case 5:
|
|
34061
|
+
e_1_1 = _e.sent();
|
|
34062
|
+
e_1 = { error: e_1_1 };
|
|
34063
|
+
return [3 /*break*/, 7];
|
|
34064
|
+
case 6:
|
|
34065
|
+
try {
|
|
34066
|
+
if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
|
|
34067
|
+
}
|
|
34068
|
+
finally { if (e_1) throw e_1.error; }
|
|
34069
|
+
return [7 /*endfinally*/];
|
|
34070
|
+
case 7: return [2 /*return*/, Promise.resolve(this.userEvents)];
|
|
34071
|
+
}
|
|
34072
|
+
});
|
|
34073
|
+
});
|
|
34074
|
+
};
|
|
34075
|
+
UserEventTestService.prototype.watchAll = function (offset, size, sortBy, sortDirection, filter, options) {
|
|
34076
|
+
return rxjs.of({ data: this.userEvents });
|
|
34077
|
+
};
|
|
34078
|
+
return UserEventTestService;
|
|
34079
|
+
}(AbstractUserEventService));
|
|
34080
|
+
UserEventTestService.decorators = [
|
|
34081
|
+
{ type: i0.Injectable }
|
|
34082
|
+
];
|
|
34083
|
+
UserEventTestService.ctorParameters = function () { return [
|
|
34084
|
+
{ type: GraphqlService },
|
|
34085
|
+
{ type: AccountService },
|
|
34086
|
+
{ type: NetworkService },
|
|
34087
|
+
{ type: i1$2.TranslateService },
|
|
34088
|
+
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
34089
|
+
]; };
|
|
34090
|
+
|
|
34091
|
+
var moment$a = momentImported__namespace;
|
|
34092
|
+
var UserEventTestingPage = /** @class */ (function () {
|
|
34093
|
+
function UserEventTestingPage(userEventService, router, alertController, translateService) {
|
|
34094
|
+
var _this = this;
|
|
34095
|
+
this.userEventService = userEventService;
|
|
34096
|
+
this.router = router;
|
|
34097
|
+
this.alertController = alertController;
|
|
34098
|
+
this.translateService = translateService;
|
|
34099
|
+
userEventService.registerListener({
|
|
34100
|
+
accept: function (userEvent) { return true; },
|
|
34101
|
+
onReceived: function (userEvent) {
|
|
34102
|
+
_this.customize(userEvent);
|
|
34103
|
+
return userEvent;
|
|
34104
|
+
}
|
|
34105
|
+
});
|
|
34106
|
+
userEventService.registerListener({
|
|
34107
|
+
accept: function (userEvent) { return userEvent.level == "DEBUG"; },
|
|
34108
|
+
onRead: function (userEvent) { _this.showMessage("debug message read "); }
|
|
34109
|
+
});
|
|
34110
|
+
}
|
|
34111
|
+
UserEventTestingPage.prototype.customize = function (userEvent) {
|
|
34112
|
+
// Choose avatarIcon
|
|
34113
|
+
switch (userEvent.level) {
|
|
34114
|
+
case 'ERROR':
|
|
34115
|
+
userEvent.avatarIcon = { icon: 'close-outline', color: 'danger' };
|
|
34116
|
+
break;
|
|
34117
|
+
case 'WARNING':
|
|
34118
|
+
userEvent.avatarIcon = { icon: 'warning-outline', color: 'warning' };
|
|
34119
|
+
break;
|
|
34120
|
+
case 'INFO':
|
|
34121
|
+
userEvent.avatarIcon = { icon: 'information-circle-outline' };
|
|
34122
|
+
break;
|
|
34123
|
+
case 'DEBUG':
|
|
34124
|
+
userEvent.avatarIcon = { icon: 'cog', color: "medium" };
|
|
34125
|
+
break;
|
|
34126
|
+
}
|
|
34127
|
+
// Choose icon
|
|
34128
|
+
switch (userEvent.type) {
|
|
34129
|
+
case 'message':
|
|
34130
|
+
userEvent.icon = { matIcon: 'inbox', color: 'accent' };
|
|
34131
|
+
break;
|
|
34132
|
+
case 'upload':
|
|
34133
|
+
userEvent.icon = { matIcon: 'file_upload' };
|
|
34134
|
+
break;
|
|
34135
|
+
case 'download':
|
|
34136
|
+
userEvent.icon = { matIcon: 'file_download' };
|
|
34137
|
+
break;
|
|
34138
|
+
}
|
|
34139
|
+
};
|
|
34140
|
+
UserEventTestingPage.prototype.addNotification = function () {
|
|
34141
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34142
|
+
issuer: 'system',
|
|
34143
|
+
recipient: 'me',
|
|
34144
|
+
type: 'message',
|
|
34145
|
+
level: 'INFO',
|
|
34146
|
+
message: 'message test message test message test message test message test message test message test message test',
|
|
34147
|
+
creationDate: moment$a(),
|
|
34148
|
+
}));
|
|
34149
|
+
};
|
|
34150
|
+
UserEventTestingPage.prototype.addError = function () {
|
|
34151
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34152
|
+
issuer: 'system',
|
|
34153
|
+
recipient: 'me',
|
|
34154
|
+
type: 'upload',
|
|
34155
|
+
level: 'ERROR',
|
|
34156
|
+
message: 'message error',
|
|
34157
|
+
creationDate: moment$a(),
|
|
34158
|
+
}));
|
|
34159
|
+
};
|
|
34160
|
+
UserEventTestingPage.prototype.addWarning = function () {
|
|
34161
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34162
|
+
issuer: 'system',
|
|
34163
|
+
recipient: 'me',
|
|
34164
|
+
type: 'download',
|
|
34165
|
+
level: 'WARNING',
|
|
34166
|
+
message: 'message warning',
|
|
34167
|
+
creationDate: moment$a(),
|
|
34168
|
+
}));
|
|
34169
|
+
};
|
|
34170
|
+
UserEventTestingPage.prototype.addDebug = function () {
|
|
34171
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34172
|
+
issuer: 'system',
|
|
34173
|
+
recipient: 'me',
|
|
34174
|
+
type: 'debug',
|
|
34175
|
+
level: 'DEBUG',
|
|
34176
|
+
message: 'message DEBUG',
|
|
34177
|
+
creationDate: moment$a(),
|
|
34178
|
+
}));
|
|
34179
|
+
};
|
|
34180
|
+
UserEventTestingPage.prototype.addNotificationWithLink = function () {
|
|
34181
|
+
var _this = this;
|
|
34182
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34183
|
+
issuer: 'system',
|
|
34184
|
+
recipient: 'me',
|
|
34185
|
+
type: 'message',
|
|
34186
|
+
level: 'INFO',
|
|
34187
|
+
message: 'message with link',
|
|
34188
|
+
creationDate: moment$a(),
|
|
34189
|
+
actions: [{
|
|
34190
|
+
name: 'click here',
|
|
34191
|
+
iconRef: {
|
|
34192
|
+
icon: 'arrow-forward-outline'
|
|
34193
|
+
},
|
|
34194
|
+
executeAction: function (event) { _this.router.navigateByUrl('/'); }
|
|
34195
|
+
}]
|
|
34196
|
+
}));
|
|
34197
|
+
};
|
|
34198
|
+
UserEventTestingPage.prototype.addNotificationWithAction = function () {
|
|
34199
|
+
var _this = this;
|
|
34200
|
+
this.userEventService.add(exports.UserEvent.fromObject({
|
|
34201
|
+
issuer: 'system',
|
|
34202
|
+
recipient: 'me',
|
|
34203
|
+
type: 'message',
|
|
34204
|
+
level: 'INFO',
|
|
34205
|
+
message: 'message with action',
|
|
34206
|
+
creationDate: moment$a(),
|
|
34207
|
+
actions: [
|
|
34208
|
+
{
|
|
34209
|
+
name: 'click here',
|
|
34210
|
+
iconRef: {
|
|
34211
|
+
icon: 'arrow-forward-outline',
|
|
34212
|
+
color: 'warning'
|
|
34213
|
+
},
|
|
34214
|
+
executeAction: function (event) { _this.showMessage('action 1'); }
|
|
34215
|
+
},
|
|
34216
|
+
{
|
|
34217
|
+
name: 'click here 2',
|
|
34218
|
+
iconRef: {
|
|
34219
|
+
matIcon: 'settings_applications',
|
|
34220
|
+
color: 'secondary'
|
|
34221
|
+
},
|
|
34222
|
+
executeAction: function (event) { _this.showMessage('action 2'); }
|
|
34223
|
+
}
|
|
34224
|
+
]
|
|
34225
|
+
}));
|
|
34226
|
+
};
|
|
34227
|
+
UserEventTestingPage.prototype.showMessage = function (text) {
|
|
34228
|
+
return Alerts.showError(text, this.alertController, this.translateService);
|
|
34229
|
+
};
|
|
34230
|
+
return UserEventTestingPage;
|
|
34231
|
+
}());
|
|
34232
|
+
UserEventTestingPage.decorators = [
|
|
34233
|
+
{ type: i0.Component, args: [{
|
|
34234
|
+
selector: 'job-progression-testing',
|
|
34235
|
+
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 </p>\n</ion-content>\n",
|
|
34236
|
+
providers: [
|
|
34237
|
+
{ provide: USER_EVENT_SERVICE, useClass: UserEventTestService }
|
|
34238
|
+
]
|
|
34239
|
+
},] }
|
|
34240
|
+
];
|
|
34241
|
+
UserEventTestingPage.ctorParameters = function () { return [
|
|
34242
|
+
{ type: UserEventTestService, decorators: [{ type: i0.Inject, args: [USER_EVENT_SERVICE,] }] },
|
|
34243
|
+
{ type: i3.Router },
|
|
34244
|
+
{ type: i1$5.AlertController },
|
|
34245
|
+
{ type: i1$2.TranslateService }
|
|
34246
|
+
]; };
|
|
34247
|
+
UserEventTestingPage.propDecorators = {
|
|
34248
|
+
notification: [{ type: i0.ViewChild, args: ['notification',] }]
|
|
34249
|
+
};
|
|
34250
|
+
|
|
34251
|
+
var UserEventTestingModule = /** @class */ (function () {
|
|
34252
|
+
function UserEventTestingModule() {
|
|
34253
|
+
}
|
|
34254
|
+
return UserEventTestingModule;
|
|
34255
|
+
}());
|
|
34256
|
+
UserEventTestingModule.decorators = [
|
|
34257
|
+
{ type: i0.NgModule, args: [{
|
|
34258
|
+
imports: [
|
|
34259
|
+
i1$4.CommonModule,
|
|
34260
|
+
i1$2.TranslateModule.forChild(),
|
|
34261
|
+
SharedModule,
|
|
34262
|
+
UserEventModule
|
|
34263
|
+
],
|
|
34264
|
+
declarations: [
|
|
34265
|
+
UserEventTestingPage
|
|
34266
|
+
],
|
|
34267
|
+
exports: [
|
|
34268
|
+
UserEventTestingPage
|
|
34269
|
+
]
|
|
34270
|
+
},] }
|
|
34271
|
+
];
|
|
34272
|
+
|
|
34273
|
+
var SOCIAL_TESTING_PAGES = [
|
|
34274
|
+
{ label: 'Social components', divider: true },
|
|
34275
|
+
{ label: 'User event', page: '/testing/social/user-event' },
|
|
34276
|
+
{ label: 'Job progression', page: '/testing/social/job-progression' }
|
|
34277
|
+
];
|
|
34278
|
+
var routes$6 = [
|
|
34279
|
+
{
|
|
34280
|
+
path: 'job-progression',
|
|
34281
|
+
pathMatch: 'full',
|
|
34282
|
+
component: JobProgressionTestingPage
|
|
34283
|
+
},
|
|
34284
|
+
{
|
|
34285
|
+
path: 'user-event',
|
|
34286
|
+
pathMatch: 'full',
|
|
34287
|
+
component: UserEventTestingPage
|
|
34288
|
+
},
|
|
34289
|
+
];
|
|
34290
|
+
var SocialTestingModule = /** @class */ (function () {
|
|
34291
|
+
function SocialTestingModule() {
|
|
34292
|
+
}
|
|
34293
|
+
return SocialTestingModule;
|
|
34294
|
+
}());
|
|
34295
|
+
SocialTestingModule.decorators = [
|
|
34296
|
+
{ type: i0.NgModule, args: [{
|
|
34297
|
+
imports: [
|
|
34298
|
+
i1$4.CommonModule,
|
|
34299
|
+
i1$2.TranslateModule.forChild(),
|
|
34300
|
+
i3.RouterModule.forChild(routes$6),
|
|
34301
|
+
JobTestingModule,
|
|
34302
|
+
UserEventTestingModule
|
|
34303
|
+
],
|
|
34304
|
+
},] }
|
|
34305
|
+
];
|
|
34306
|
+
|
|
33856
34307
|
// Environment
|
|
33857
34308
|
|
|
33858
34309
|
/**
|
|
@@ -34008,6 +34459,9 @@
|
|
|
34008
34459
|
exports.JobProgressionComponent = JobProgressionComponent;
|
|
34009
34460
|
exports.JobProgressionService = JobProgressionService;
|
|
34010
34461
|
exports.JobProgressionServiceToken = JobProgressionServiceToken;
|
|
34462
|
+
exports.JobProgressionTestService = JobProgressionTestService;
|
|
34463
|
+
exports.JobProgressionTestingPage = JobProgressionTestingPage;
|
|
34464
|
+
exports.JobTestingModule = JobTestingModule;
|
|
34011
34465
|
exports.JobUtils = JobUtils;
|
|
34012
34466
|
exports.KEYBOARD_HIDE_DELAY_MS = KEYBOARD_HIDE_DELAY_MS;
|
|
34013
34467
|
exports.LAT_LONG_DEFAULT_MAX_DECIMALS = LAT_LONG_DEFAULT_MAX_DECIMALS;
|
|
@@ -34087,6 +34541,7 @@
|
|
|
34087
34541
|
exports.SETTINGS_TRANSIENT_PROPERTIES = SETTINGS_TRANSIENT_PROPERTIES;
|
|
34088
34542
|
exports.SHARED_MATERIAL_TESTING_PAGES = SHARED_MATERIAL_TESTING_PAGES;
|
|
34089
34543
|
exports.SHARED_TESTING_PAGES = SHARED_TESTING_PAGES;
|
|
34544
|
+
exports.SOCIAL_TESTING_PAGES = SOCIAL_TESTING_PAGES;
|
|
34090
34545
|
exports.SPACE_PLACEHOLDER_CHAR = SPACE_PLACEHOLDER_CHAR;
|
|
34091
34546
|
exports.SelectPeerModal = SelectPeerModal;
|
|
34092
34547
|
exports.ServerErrorCodes = ServerErrorCodes;
|
|
@@ -34115,6 +34570,7 @@
|
|
|
34115
34570
|
exports.SocialErrorCodes = SocialErrorCodes;
|
|
34116
34571
|
exports.SocialModule = SocialModule;
|
|
34117
34572
|
exports.SocialModuleOptionsToken = SocialModuleOptionsToken;
|
|
34573
|
+
exports.SocialTestingModule = SocialTestingModule;
|
|
34118
34574
|
exports.StartableService = StartableService;
|
|
34119
34575
|
exports.StatusById = StatusById;
|
|
34120
34576
|
exports.StatusIds = StatusIds;
|
|
@@ -34145,6 +34601,9 @@
|
|
|
34145
34601
|
exports.UriUtils = UriUtils;
|
|
34146
34602
|
exports.UserEventFragments = UserEventFragments;
|
|
34147
34603
|
exports.UserEventModule = UserEventModule;
|
|
34604
|
+
exports.UserEventTestService = UserEventTestService;
|
|
34605
|
+
exports.UserEventTestingModule = UserEventTestingModule;
|
|
34606
|
+
exports.UserEventTestingPage = UserEventTestingPage;
|
|
34148
34607
|
exports.UserEventTypes = UserEventTypes;
|
|
34149
34608
|
exports.UsersPage = UsersPage;
|
|
34150
34609
|
exports.accountToString = accountToString;
|