@intelact/bright 0.9.104 → 0.9.106

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"post.model.js","sourceRoot":"","sources":["../../src/post/post.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAE5D,mDAA0C;AAC1C,yDAAgD;AAChD,kEAAyD;AACzD,sDAA6C;AAC7C,4DAAuD;AACvD,+DAAsD;AACtD,mDAA0C;AAC1C,yDAAgD;AAChD,uDAAmD;AACnD,2CAAuC;AACvC,qDAA4C;AAC5C,qEAA4D;AAE5D,kCAAoC;AAapC,MAAa,IAAI;IAIhB,EAAE,CAAS;IAGX,IAAI,CAAS;IAKb,KAAK,CAAS;IAGd,WAAW,CAAS;IAGpB,OAAO,CAAS;IAahB,IAAI,CAAmB;IAIvB,QAAQ,CAAS;IAOjB,IAAI,CAAW;IAOf,OAAO,CAAS;IAKhB,MAAM,CAAS;IAGf,QAAQ,CAAS;IAGjB,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,SAAS,CAAS;IAKlB,MAAM,CAAa;IAGnB,QAAQ,CAAW;IAInB,MAAM,CAAS;IAKf,UAAU,CAAa;IAevB,OAAO,CAAW;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,eAAe,CAAO;IAItB,eAAe,CAAO;IAItB,WAAW,CAAO;IAIlB,WAAW,CAAO;IAIlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAMhB,SAAS,CAAY;IAIrB,MAAM,CAAS;IAGf,MAAM,CAAU;IAIhB,QAAQ,CAAW;IAInB,UAAU,CAAQ;IAIlB,OAAO,CAAgB;IAIvB,YAAY,KAAqB;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,QAAoB,CAAC;IAClC,CAAC;IAED,IAAI,IAAI;QACP,OAAO,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CAAC;;oCACF;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yBAAQ,CAAC;8BACX,yBAAQ;sCAAC;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;;wCACC;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAAW,CAAC;;qCACD;AAKvB;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;2CAa7B;AAID;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;;wCACW;AAqC5B;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;yCAkF7B;AAQD;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;oCAwG7B;AAOD;IAAC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;yCAa7B;AAGM;IADN,IAAA,0BAAM,GAAE;;;;yBAgBR"}
@@ -2,6 +2,16 @@ import { StatusType } from "../common/status.type";
2
2
  import { StatusLabel } from "../common/status.label";
3
3
  import { Metric } from "../metric/metric.model";
4
4
  import { User } from "../user/user.model";
5
+ import { Item } from "../item";
6
+ import { Context } from "../ui";
7
+ export interface IPromotionAuthorisation {
8
+ edit: boolean;
9
+ publish: boolean;
10
+ unpublish: boolean;
11
+ end: boolean;
12
+ delete: boolean;
13
+ isValid: boolean;
14
+ }
5
15
  export declare class Promotion {
6
16
  id: number;
7
17
  title: string;
@@ -21,6 +31,12 @@ export declare class Promotion {
21
31
  statusChangedOn: Date;
22
32
  publishedBy: User;
23
33
  publishedOn: Date;
34
+ authorisation: IPromotionAuthorisation;
35
+ validators: Item<boolean>[];
24
36
  constructor(props?: Partial<Promotion>);
25
37
  get totalSeen(): Metric;
38
+ setValidators(): void;
39
+ validate(): void;
40
+ get statusContext(): Context;
41
+ get labelContext(): Context;
26
42
  }
@@ -16,6 +16,8 @@ const status_label_1 = require("../common/status.label");
16
16
  const metric_model_1 = require("../metric/metric.model");
17
17
  const user_model_1 = require("../user/user.model");
18
18
  const user_1 = require("../user");
19
+ const item_1 = require("../item");
20
+ const ui_1 = require("../ui");
19
21
  class Promotion {
20
22
  id;
21
23
  title;
@@ -35,12 +37,112 @@ class Promotion {
35
37
  statusChangedOn;
36
38
  publishedBy;
37
39
  publishedOn;
40
+ authorisation = {
41
+ edit: false,
42
+ publish: false,
43
+ unpublish: false,
44
+ end: false,
45
+ delete: false,
46
+ isValid: false
47
+ };
48
+ validators;
38
49
  constructor(props) {
39
50
  Object.assign(this, props);
40
51
  }
41
52
  get totalSeen() {
42
53
  return this?.metrics?.find(i => i.event === user_1.UserEvent.Seen);
43
54
  }
55
+ setValidators() {
56
+ this.validators = [
57
+ new item_1.Item({
58
+ name: 'title',
59
+ title: 'promotionTitle',
60
+ value: false,
61
+ icon: 't'
62
+ }),
63
+ new item_1.Item({
64
+ name: 'period',
65
+ title: 'promotionPeriod',
66
+ value: false,
67
+ icon: 'calendar'
68
+ }),
69
+ new item_1.Item({
70
+ name: 'image',
71
+ title: 'promotionImage',
72
+ value: false,
73
+ icon: 'image'
74
+ }),
75
+ new item_1.Item({
76
+ name: 'feed',
77
+ title: 'promotionFeedImage',
78
+ value: false,
79
+ icon: 'image'
80
+ }),
81
+ ];
82
+ }
83
+ validate() {
84
+ if (!this.validators) {
85
+ this.setValidators();
86
+ }
87
+ this.authorisation.edit = false;
88
+ this.authorisation.delete = false;
89
+ this.authorisation.publish = false;
90
+ this.authorisation.unpublish = false;
91
+ this.authorisation.end = false;
92
+ this.authorisation.isValid = true;
93
+ let validator;
94
+ if (!this.title || this.title.trim().length === 0) {
95
+ validator = this.validators?.find(i => i.name === 'title');
96
+ validator.value = false;
97
+ this.authorisation.isValid = false;
98
+ }
99
+ if (!this.startDate || !this.endDate) {
100
+ validator = this.validators?.find(i => i.name === 'period');
101
+ validator.value = false;
102
+ this.authorisation.isValid = false;
103
+ }
104
+ if (!this.imageUrl || this.imageUrl.trim().length === 0) {
105
+ validator = this.validators?.find(i => i.name === 'image');
106
+ validator.value = false;
107
+ this.authorisation.isValid = false;
108
+ }
109
+ if (!this.feedUrl || this.feedUrl.trim().length === 0) {
110
+ validator = this.validators?.find(i => i.name === 'feed');
111
+ validator.value = false;
112
+ this.authorisation.isValid = false;
113
+ }
114
+ if (this.status === status_type_1.StatusType.Draft) {
115
+ this.authorisation.edit = true;
116
+ this.authorisation.delete = true;
117
+ }
118
+ if (this.status === status_type_1.StatusType.Published &&
119
+ this.label === status_label_1.StatusLabel.Upcoming) {
120
+ this.authorisation.unpublish = true;
121
+ }
122
+ if (this.status === status_type_1.StatusType.Published &&
123
+ this.label === status_label_1.StatusLabel.Live) {
124
+ this.authorisation.end = true;
125
+ }
126
+ if (this.status === status_type_1.StatusType.Draft) {
127
+ const isExpired = this.label === status_label_1.StatusLabel.Expired;
128
+ const isEnded = this.label === status_label_1.StatusLabel.Ended;
129
+ this.authorisation.publish = !isExpired && !isEnded;
130
+ }
131
+ }
132
+ get statusContext() {
133
+ return this.status === status_type_1.StatusType.Published ? ui_1.Context.Info : ui_1.Context.Secondary;
134
+ }
135
+ get labelContext() {
136
+ return this.label === status_label_1.StatusLabel.Expired
137
+ ? ui_1.Context.Secondary
138
+ : this.label === status_label_1.StatusLabel.Live
139
+ ? ui_1.Context.Danger
140
+ : this.label === status_label_1.StatusLabel.Upcoming
141
+ ? ui_1.Context.Success
142
+ : this.label === status_label_1.StatusLabel.Ended
143
+ ? ui_1.Context.Dark
144
+ : ui_1.Context.Secondary;
145
+ }
44
146
  }
45
147
  exports.Promotion = Promotion;
46
148
  __decorate([
@@ -127,4 +229,35 @@ __decorate([
127
229
  (0, class_transformer_1.Type)(() => Date),
128
230
  __metadata("design:type", Date)
129
231
  ], Promotion.prototype, "publishedOn", void 0);
232
+ __decorate([
233
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
234
+ __metadata("design:type", Object)
235
+ ], Promotion.prototype, "authorisation", void 0);
236
+ __decorate([
237
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
238
+ (0, class_transformer_1.Type)(() => item_1.Item),
239
+ __metadata("design:type", Array)
240
+ ], Promotion.prototype, "validators", void 0);
241
+ __decorate([
242
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
243
+ __metadata("design:type", Function),
244
+ __metadata("design:paramtypes", []),
245
+ __metadata("design:returntype", void 0)
246
+ ], Promotion.prototype, "setValidators", null);
247
+ __decorate([
248
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
249
+ __metadata("design:type", Function),
250
+ __metadata("design:paramtypes", []),
251
+ __metadata("design:returntype", void 0)
252
+ ], Promotion.prototype, "validate", null);
253
+ __decorate([
254
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
255
+ __metadata("design:type", String),
256
+ __metadata("design:paramtypes", [])
257
+ ], Promotion.prototype, "statusContext", null);
258
+ __decorate([
259
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
260
+ __metadata("design:type", String),
261
+ __metadata("design:paramtypes", [])
262
+ ], Promotion.prototype, "labelContext", null);
130
263
  //# sourceMappingURL=promotion.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"promotion.model.js","sourceRoot":"","sources":["../../src/promotion/promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,uDAAmD;AACnD,yDAAqD;AACrD,yDAAgD;AAChD,mDAA0C;AAC1C,kCAAoC;AAGpC,MAAa,SAAS;IAIrB,EAAE,CAAS;IAKX,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,OA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+3,16 @@ import { StatusLabel } from '../common/status.label';
3
3
  import { Metric } from '../metric/metric.model';
4
4
  import { User } from '../user/user.model';
5
5
  import { SurveyItem } from './survey-item.model';
6
+ import { Item } from '../item';
7
+ import { Context } from '../ui';
8
+ export interface ISurveyAuthorisation {
9
+ edit: boolean;
10
+ publish: boolean;
11
+ unpublish: boolean;
12
+ end: boolean;
13
+ delete: boolean;
14
+ isValid: boolean;
15
+ }
6
16
  export declare class Survey {
7
17
  id: number;
8
18
  slug: string;
@@ -24,9 +34,15 @@ export declare class Survey {
24
34
  statusChangedOn: Date;
25
35
  publishedBy: User;
26
36
  publishedOn: Date;
37
+ authorisation: ISurveyAuthorisation;
38
+ validators: Item<boolean>[];
27
39
  constructor(props?: Partial<Survey>);
28
40
  get totalStars(): Metric;
29
41
  get totalCompletions(): Metric;
30
42
  get totalRejects(): Metric;
31
43
  get totalItems(): Metric;
44
+ setValidators(): void;
45
+ validate(): void;
46
+ get statusContext(): Context;
47
+ get labelContext(): Context;
32
48
  }
@@ -18,6 +18,8 @@ const user_model_1 = require("../user/user.model");
18
18
  const survey_item_model_1 = require("./survey-item.model");
19
19
  const user_1 = require("../user");
20
20
  const metric_1 = require("../metric");
21
+ const item_1 = require("../item");
22
+ const ui_1 = require("../ui");
21
23
  class Survey {
22
24
  id;
23
25
  slug;
@@ -39,6 +41,15 @@ class Survey {
39
41
  statusChangedOn;
40
42
  publishedBy;
41
43
  publishedOn;
44
+ authorisation = {
45
+ edit: false,
46
+ publish: false,
47
+ unpublish: false,
48
+ end: false,
49
+ delete: false,
50
+ isValid: false
51
+ };
52
+ validators;
42
53
  constructor(props) {
43
54
  Object.assign(this, props);
44
55
  }
@@ -54,6 +65,108 @@ class Survey {
54
65
  get totalItems() {
55
66
  return this?.metrics?.find(i => i.event === metric_1.MetricType.Items);
56
67
  }
68
+ setValidators() {
69
+ this.validators = [
70
+ new item_1.Item({
71
+ name: 'name',
72
+ title: 'surveyName',
73
+ value: false,
74
+ icon: 't'
75
+ }),
76
+ new item_1.Item({
77
+ name: 'description',
78
+ title: 'surveyDescription',
79
+ value: false,
80
+ icon: 'comment-dots'
81
+ }),
82
+ new item_1.Item({
83
+ name: 'period',
84
+ title: 'promotionPeriod',
85
+ value: false,
86
+ icon: 'calendar'
87
+ }),
88
+ new item_1.Item({
89
+ name: 'image',
90
+ title: 'surveyImage',
91
+ value: false,
92
+ icon: 'image'
93
+ }),
94
+ new item_1.Item({
95
+ name: 'items',
96
+ title: 'surveyQuestions',
97
+ value: false,
98
+ icon: 'circle-question'
99
+ }),
100
+ ];
101
+ }
102
+ validate() {
103
+ if (!this.validators) {
104
+ this.setValidators();
105
+ }
106
+ this.authorisation.edit = false;
107
+ this.authorisation.delete = false;
108
+ this.authorisation.publish = false;
109
+ this.authorisation.unpublish = false;
110
+ this.authorisation.end = false;
111
+ this.authorisation.isValid = true;
112
+ if (this.status === status_type_1.StatusType.Draft) {
113
+ this.authorisation.edit = true;
114
+ this.authorisation.delete = true;
115
+ }
116
+ if (this.status === status_type_1.StatusType.Published &&
117
+ this.label === status_label_1.StatusLabel.Upcoming) {
118
+ this.authorisation.unpublish = true;
119
+ }
120
+ if (this.status === status_type_1.StatusType.Published &&
121
+ this.label === status_label_1.StatusLabel.Live) {
122
+ this.authorisation.end = true;
123
+ }
124
+ let validator;
125
+ if (!this.name || this.name.trim().length === 0) {
126
+ validator = this.validators?.find(i => i.name === 'name');
127
+ validator.value = false;
128
+ this.authorisation.isValid = false;
129
+ }
130
+ if (!this.description || this.description.trim().length === 0) {
131
+ validator = this.validators?.find(i => i.name === 'description');
132
+ validator.value = false;
133
+ this.authorisation.isValid = false;
134
+ }
135
+ if (!this.startDate || !this.endDate) {
136
+ validator = this.validators?.find(i => i.name === 'period');
137
+ validator.value = false;
138
+ this.authorisation.isValid = false;
139
+ }
140
+ if (!this.imageUrl || this.imageUrl.trim().length === 0) {
141
+ validator = this.validators?.find(i => i.name === 'image');
142
+ validator.value = false;
143
+ this.authorisation.isValid = false;
144
+ }
145
+ if (!this.items || this.items.length === 0) {
146
+ validator = this.validators?.find(i => i.name === 'items');
147
+ validator.value = false;
148
+ this.authorisation.isValid = false;
149
+ }
150
+ if (this.status === status_type_1.StatusType.Draft) {
151
+ const isExpired = this.label === status_label_1.StatusLabel.Expired;
152
+ const isEnded = this.label === status_label_1.StatusLabel.Ended;
153
+ this.authorisation.publish = !isExpired && !isEnded;
154
+ }
155
+ }
156
+ get statusContext() {
157
+ return this.status === status_type_1.StatusType.Published ? ui_1.Context.Info : ui_1.Context.Secondary;
158
+ }
159
+ get labelContext() {
160
+ return this.label === status_label_1.StatusLabel.Expired
161
+ ? ui_1.Context.Secondary
162
+ : this.label === status_label_1.StatusLabel.Live
163
+ ? ui_1.Context.Danger
164
+ : this.label === status_label_1.StatusLabel.Upcoming
165
+ ? ui_1.Context.Success
166
+ : this.label === status_label_1.StatusLabel.Ended
167
+ ? ui_1.Context.Dark
168
+ : ui_1.Context.Secondary;
169
+ }
57
170
  }
58
171
  exports.Survey = Survey;
59
172
  __decorate([
@@ -150,4 +263,35 @@ __decorate([
150
263
  (0, class_transformer_1.Type)(() => Date),
151
264
  __metadata("design:type", Date)
152
265
  ], Survey.prototype, "publishedOn", void 0);
266
+ __decorate([
267
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
268
+ __metadata("design:type", Object)
269
+ ], Survey.prototype, "authorisation", void 0);
270
+ __decorate([
271
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
272
+ (0, class_transformer_1.Type)(() => item_1.Item),
273
+ __metadata("design:type", Array)
274
+ ], Survey.prototype, "validators", void 0);
275
+ __decorate([
276
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
277
+ __metadata("design:type", Function),
278
+ __metadata("design:paramtypes", []),
279
+ __metadata("design:returntype", void 0)
280
+ ], Survey.prototype, "setValidators", null);
281
+ __decorate([
282
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
283
+ __metadata("design:type", Function),
284
+ __metadata("design:paramtypes", []),
285
+ __metadata("design:returntype", void 0)
286
+ ], Survey.prototype, "validate", null);
287
+ __decorate([
288
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
289
+ __metadata("design:type", String),
290
+ __metadata("design:paramtypes", [])
291
+ ], Survey.prototype, "statusContext", null);
292
+ __decorate([
293
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
294
+ __metadata("design:type", String),
295
+ __metadata("design:paramtypes", [])
296
+ ], Survey.prototype, "labelContext", null);
153
297
  //# sourceMappingURL=survey.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"survey.model.js","sourceRoot":"","sources":["../../src/survey/survey.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,uDAAmD;AACnD,yDAAqD;AACrD,yDAAgD;AAChD,mDAA0C;AAC1C,2DAAiD;AACjD,kCAAoC;AACpC,sCAAuC;AAGvC,MAAa,MAAM;IAIlB,EAAE,CAAS;IAGX,IAAI,CAAS;IAKb,IAAI,CAAS;IAGb,WAAW,CAAS;IAGpB,QAAQ,CAAS;IAIjB,KAAK,CAAe;IAKpB,MAAM,CAAa;IAGnB,KAAK,CAAc;IAInB,SAAS,CAAO;IAIhB,OAAO,CAAO;IAId,SAAS,CAAU;IAanB,OAAO,CAAW;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,eAAe,CAAO;IAItB,eAAe,CAAO;IAItB,WAAW,CAAO;IAIlB,WAAW,CAAO;IAElB,YAAY,KAAuB;QAClC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,gBAAS,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,IAAI,EAAE,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