@intelact/bright 0.9.76 → 0.9.77
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/dtos/boost.dto.d.ts +0 -12
- package/lib/dtos/boost.dto.js +1 -50
- package/lib/dtos/boost.dto.js.map +1 -1
- package/lib/dtos/brand.dto.d.ts +0 -15
- package/lib/dtos/brand.dto.js +1 -46
- package/lib/dtos/brand.dto.js.map +1 -1
- package/lib/dtos/feedback.dto.d.ts +0 -9
- package/lib/dtos/feedback.dto.js +1 -28
- package/lib/dtos/feedback.dto.js.map +1 -1
- package/lib/dtos/general.dto.d.ts +3 -0
- package/lib/dtos/general.dto.js +10 -1
- package/lib/dtos/general.dto.js.map +1 -1
- package/lib/dtos/index.d.ts +0 -4
- package/lib/dtos/index.js +0 -4
- package/lib/dtos/index.js.map +1 -1
- package/lib/dtos/post.dto.d.ts +0 -22
- package/lib/dtos/post.dto.js +1 -65
- package/lib/dtos/post.dto.js.map +1 -1
- package/lib/dtos/promotion.dto.d.ts +0 -8
- package/lib/dtos/promotion.dto.js +1 -37
- package/lib/dtos/promotion.dto.js.map +1 -1
- package/lib/dtos/question.dto.d.ts +0 -19
- package/lib/dtos/question.dto.js +1 -62
- package/lib/dtos/question.dto.js.map +1 -1
- package/lib/dtos/search.dto.d.ts +12 -0
- package/lib/dtos/search.dto.js +72 -0
- package/lib/dtos/search.dto.js.map +1 -0
- package/lib/dtos/survey.dto.d.ts +0 -24
- package/lib/dtos/survey.dto.js +1 -90
- package/lib/dtos/survey.dto.js.map +1 -1
- package/lib/dtos/user.dto.d.ts +0 -3
- package/lib/dtos/user.dto.js +1 -10
- package/lib/dtos/user.dto.js.map +1 -1
- package/lib/enums/asset.enum.js.map +1 -1
- package/lib/enums/index.d.ts +0 -1
- package/lib/enums/index.js +0 -1
- package/lib/enums/index.js.map +1 -1
- package/lib/enums/module.enum.d.ts +0 -19
- package/lib/enums/module.enum.js +1 -21
- package/lib/enums/module.enum.js.map +1 -1
- package/lib/enums/setting.enum.d.ts +2 -2
- package/lib/enums/setting.enum.js +2 -2
- package/lib/enums/tracks.enum.d.ts +13 -2
- package/lib/enums/tracks.enum.js +23 -11
- package/lib/enums/tracks.enum.js.map +1 -1
- package/lib/models/author.d.ts +6 -4
- package/lib/models/author.js +22 -18
- package/lib/models/author.js.map +1 -1
- package/lib/models/boost.d.ts +5 -6
- package/lib/models/boost.js +17 -23
- package/lib/models/boost.js.map +1 -1
- package/lib/models/brand.d.ts +3 -1
- package/lib/models/brand.js +23 -3
- package/lib/models/brand.js.map +1 -1
- package/lib/models/category.d.ts +2 -1
- package/lib/models/category.js +7 -5
- package/lib/models/category.js.map +1 -1
- package/lib/models/collection.d.ts +5 -5
- package/lib/models/collection.js +19 -18
- package/lib/models/collection.js.map +1 -1
- package/lib/models/feedback.d.ts +7 -2
- package/lib/models/feedback.js +35 -28
- package/lib/models/feedback.js.map +1 -1
- package/lib/models/index.d.ts +2 -1
- package/lib/models/index.js +2 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/log.d.ts +11 -0
- package/lib/models/log.js +16 -0
- package/lib/models/log.js.map +1 -0
- package/lib/models/metric.d.ts +20 -0
- package/lib/models/metric.js +186 -0
- package/lib/models/metric.js.map +1 -0
- package/lib/models/post.d.ts +21 -29
- package/lib/models/post.js +213 -242
- package/lib/models/post.js.map +1 -1
- package/lib/models/promotion.d.ts +7 -2
- package/lib/models/promotion.js +31 -3
- package/lib/models/promotion.js.map +1 -1
- package/lib/models/publisher.d.ts +7 -3
- package/lib/models/publisher.js +30 -14
- package/lib/models/publisher.js.map +1 -1
- package/lib/models/question.d.ts +20 -29
- package/lib/models/question.js +88 -174
- package/lib/models/question.js.map +1 -1
- package/lib/models/quote.d.ts +0 -1
- package/lib/models/quote.js +0 -6
- package/lib/models/quote.js.map +1 -1
- package/lib/models/survey.d.ts +10 -2
- package/lib/models/survey.js +51 -25
- package/lib/models/survey.js.map +1 -1
- package/lib/models/topic.d.ts +5 -1
- package/lib/models/topic.js +26 -10
- package/lib/models/topic.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/lib/models/boost.js
CHANGED
@@ -12,18 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Boost = void 0;
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
14
14
|
const post_1 = require("./post");
|
15
|
-
const
|
16
|
-
const
|
15
|
+
const metric_1 = require("./metric");
|
16
|
+
const log_1 = require("./log");
|
17
17
|
let Boost = class Boost {
|
18
18
|
id;
|
19
19
|
title;
|
20
20
|
startDate;
|
21
21
|
endDate;
|
22
|
-
totalItems;
|
23
22
|
items;
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
metricPosts;
|
24
|
+
logCreated;
|
25
|
+
logUpdated;
|
27
26
|
constructor(props) {
|
28
27
|
Object.assign(this, props);
|
29
28
|
}
|
@@ -48,31 +47,26 @@ __decorate([
|
|
48
47
|
(0, class_transformer_1.Type)(() => Date),
|
49
48
|
__metadata("design:type", Date)
|
50
49
|
], Boost.prototype, "endDate", void 0);
|
51
|
-
__decorate([
|
52
|
-
(0, class_transformer_1.Expose)(),
|
53
|
-
(0, class_transformer_1.Type)(() => Number),
|
54
|
-
__metadata("design:type", Number)
|
55
|
-
], Boost.prototype, "totalItems", void 0);
|
56
50
|
__decorate([
|
57
51
|
(0, class_transformer_1.Expose)(),
|
58
52
|
(0, class_transformer_1.Type)(() => post_1.Post),
|
59
53
|
__metadata("design:type", Array)
|
60
54
|
], Boost.prototype, "items", void 0);
|
61
55
|
__decorate([
|
62
|
-
(0, class_transformer_1.
|
63
|
-
(0, class_transformer_1.
|
64
|
-
__metadata("design:type",
|
65
|
-
], Boost.prototype, "
|
56
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
57
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalPosts', obj?.totalPosts, ['fas', 'book-open'])),
|
58
|
+
__metadata("design:type", metric_1.Metric)
|
59
|
+
], Boost.prototype, "metricPosts", void 0);
|
66
60
|
__decorate([
|
67
|
-
(0, class_transformer_1.Expose)(),
|
68
|
-
(0, class_transformer_1.Type)(() =>
|
69
|
-
__metadata("design:type",
|
70
|
-
], Boost.prototype, "
|
61
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
62
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
63
|
+
__metadata("design:type", log_1.Log)
|
64
|
+
], Boost.prototype, "logCreated", void 0);
|
71
65
|
__decorate([
|
72
|
-
(0, class_transformer_1.Expose)(),
|
73
|
-
(0, class_transformer_1.Type)(() =>
|
74
|
-
__metadata("design:type",
|
75
|
-
], Boost.prototype, "
|
66
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
67
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
68
|
+
__metadata("design:type", log_1.Log)
|
69
|
+
], Boost.prototype, "logUpdated", void 0);
|
76
70
|
exports.Boost = Boost = __decorate([
|
77
71
|
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
78
72
|
__metadata("design:paramtypes", [Object])
|
package/lib/models/boost.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boost.js","sourceRoot":"","sources":["../../src/models/boost.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"boost.js","sourceRoot":"","sources":["../../src/models/boost.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAC5D,iCAA8B;AAC9B,qCAAkC;AAClC,+BAA4B;AAGrB,IAAM,KAAK,GAAX,MAAM,KAAK;IAIjB,EAAE,CAAS;IAGX,KAAK,CAAS;IAId,SAAS,CAAO;IAIhB,OAAO,CAAO;IAId,KAAK,CAAS;IAUd,WAAW,CAAS;IAMpB,UAAU,CAAM;IAIhB,UAAU,CAAM;IAEhB,YAAY,KAAsB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AA5CY,sBAAK;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;iCACR;AAGX;IADC,IAAA,0BAAM,GAAE;;oCACK;AAId;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;wCAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACR,IAAI;sCAAC;AAId;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;;oCACH;AAUd;IANC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;IAClB,IAAA,6BAAS,EAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CACnC,YAAY,EACZ,GAAG,EAAE,UAAU,EACf,CAAC,KAAK,EAAE,WAAW,CAAC,CACpB,CAAC;8BACW,eAAM;0CAAC;AAMpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACJ,SAAG;yCAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACJ,SAAG;yCAAC;gBAvCJ,KAAK;IADjB,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;GACjB,KAAK,CA4CjB"}
|
package/lib/models/brand.d.ts
CHANGED
@@ -3,8 +3,8 @@ import { Publisher } from './publisher';
|
|
3
3
|
import { Link } from './link';
|
4
4
|
export declare class Brand {
|
5
5
|
id: number;
|
6
|
+
shortcut: string;
|
6
7
|
name: string;
|
7
|
-
title: string;
|
8
8
|
slogan: string;
|
9
9
|
url: string;
|
10
10
|
email: string;
|
@@ -23,6 +23,8 @@ export declare class Brand {
|
|
23
23
|
getMobileStoreLinks(): Link[];
|
24
24
|
getSocialLinks(): Link[];
|
25
25
|
getLegalLinks(): Link[];
|
26
|
+
getExternImageProviders(): string[];
|
27
|
+
getExternVideoProviders(): string[];
|
26
28
|
}
|
27
29
|
export declare class BrandSetting {
|
28
30
|
id: number;
|
package/lib/models/brand.js
CHANGED
@@ -16,8 +16,8 @@ const publisher_1 = require("./publisher");
|
|
16
16
|
const link_1 = require("./link");
|
17
17
|
class Brand {
|
18
18
|
id;
|
19
|
+
shortcut;
|
19
20
|
name;
|
20
|
-
title;
|
21
21
|
slogan;
|
22
22
|
url;
|
23
23
|
email;
|
@@ -83,6 +83,14 @@ class Brand {
|
|
83
83
|
url: i.value.replaceAll(this.url, '')
|
84
84
|
})));
|
85
85
|
}
|
86
|
+
getExternImageProviders() {
|
87
|
+
const setting = this.settings.find(i => i.scope === enums_1.SettingType.Provider && i.name === 'extern-images');
|
88
|
+
return setting?.value?.length > 0 ? setting.value.split(',') : [];
|
89
|
+
}
|
90
|
+
getExternVideoProviders() {
|
91
|
+
const setting = this.settings.find(i => i.scope === enums_1.SettingType.Provider && i.name === 'extern-videos');
|
92
|
+
return setting?.value?.length > 0 ? setting.value.split(',') : [];
|
93
|
+
}
|
86
94
|
}
|
87
95
|
exports.Brand = Brand;
|
88
96
|
__decorate([
|
@@ -93,11 +101,11 @@ __decorate([
|
|
93
101
|
__decorate([
|
94
102
|
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
95
103
|
__metadata("design:type", String)
|
96
|
-
], Brand.prototype, "
|
104
|
+
], Brand.prototype, "shortcut", void 0);
|
97
105
|
__decorate([
|
98
106
|
(0, class_transformer_1.Expose)(),
|
99
107
|
__metadata("design:type", String)
|
100
|
-
], Brand.prototype, "
|
108
|
+
], Brand.prototype, "name", void 0);
|
101
109
|
__decorate([
|
102
110
|
(0, class_transformer_1.Expose)(),
|
103
111
|
__metadata("design:type", String)
|
@@ -176,6 +184,18 @@ __decorate([
|
|
176
184
|
__metadata("design:paramtypes", []),
|
177
185
|
__metadata("design:returntype", Array)
|
178
186
|
], Brand.prototype, "getLegalLinks", null);
|
187
|
+
__decorate([
|
188
|
+
(0, class_transformer_1.Expose)(),
|
189
|
+
__metadata("design:type", Function),
|
190
|
+
__metadata("design:paramtypes", []),
|
191
|
+
__metadata("design:returntype", Array)
|
192
|
+
], Brand.prototype, "getExternImageProviders", null);
|
193
|
+
__decorate([
|
194
|
+
(0, class_transformer_1.Expose)(),
|
195
|
+
__metadata("design:type", Function),
|
196
|
+
__metadata("design:paramtypes", []),
|
197
|
+
__metadata("design:returntype", Array)
|
198
|
+
], Brand.prototype, "getExternVideoProviders", null);
|
179
199
|
class BrandSetting {
|
180
200
|
id;
|
181
201
|
scope;
|
package/lib/models/brand.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/models/brand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAEjD,oCAAgF;AAChF,2CAAwC;AACxC,iCAA8B;AAE9B,MAAa,KAAK;IAIjB,EAAE,CAAS;
|
1
|
+
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/models/brand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAEjD,oCAAgF;AAChF,2CAAwC;AACxC,iCAA8B;AAE9B,MAAa,KAAK;IAIjB,EAAE,CAAS;IASX,QAAQ,CAAS;IAMjB,IAAI,CAAS;IAMb,MAAM,CAAS;IAMf,GAAG,CAAS;IAMZ,KAAK,CAAS;IAMd,WAAW,CAAS;IAMpB,QAAQ,CAAS;IAMjB,IAAI,CAAS;IAMb,MAAM,CAAoB;IAO1B,UAAU,CAAU;IAMpB,UAAU,CAAS;IAOnB,UAAU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metric";
|
2
3
|
export declare class Category {
|
3
4
|
id: number;
|
4
5
|
title: string;
|
@@ -6,7 +7,7 @@ export declare class Category {
|
|
6
7
|
description: string;
|
7
8
|
sort: number;
|
8
9
|
questionEnabled: boolean;
|
9
|
-
|
10
|
+
metricQuestions: Metric;
|
10
11
|
constructor(props?: Partial<Category>);
|
11
12
|
static toItemList(data: Category[], key?: 'id' | 'hash'): Item<any>[];
|
12
13
|
}
|
package/lib/models/category.js
CHANGED
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Category = void 0;
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
14
14
|
const item_1 = require("./item");
|
15
|
+
const metric_1 = require("./metric");
|
15
16
|
class Category {
|
16
17
|
id;
|
17
18
|
title;
|
@@ -19,7 +20,7 @@ class Category {
|
|
19
20
|
description;
|
20
21
|
sort;
|
21
22
|
questionEnabled;
|
22
|
-
|
23
|
+
metricQuestions;
|
23
24
|
constructor(props) {
|
24
25
|
Object.assign(this, props);
|
25
26
|
}
|
@@ -61,8 +62,9 @@ __decorate([
|
|
61
62
|
__metadata("design:type", Boolean)
|
62
63
|
], Category.prototype, "questionEnabled", void 0);
|
63
64
|
__decorate([
|
64
|
-
(0, class_transformer_1.Expose)(),
|
65
|
-
(0, class_transformer_1.Type)(() =>
|
66
|
-
|
67
|
-
|
65
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
66
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
67
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalQuestions', obj?.totalQuestions, ['fas', 'circle-question'])),
|
68
|
+
__metadata("design:type", metric_1.Metric)
|
69
|
+
], Category.prototype, "metricQuestions", void 0);
|
68
70
|
//# sourceMappingURL=category.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/models/category.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
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G,EAAE,CAAC,OAAO,CAAC;;iDACK;AAWzB;IAPC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;IAClB,IAAA,6BAAS,EAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CACnC,gBAAgB,EAChB,GAAG,EAAE,cAAc,EACnB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAC1B,CAAC;8BACe,eAAM;iDAAC"}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { Post } from './post';
|
2
2
|
import { Publisher } from './publisher';
|
3
|
-
import {
|
4
|
-
import {
|
3
|
+
import { Metric } from './metric';
|
4
|
+
import { Log } from './log';
|
5
5
|
export declare class Collection {
|
6
6
|
id: number;
|
7
7
|
title: string;
|
8
8
|
items: Post[];
|
9
9
|
publisher: Publisher;
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
metricPosts: Metric;
|
11
|
+
logCreated: Log;
|
12
|
+
logUpdated: Log;
|
13
13
|
constructor(props?: Partial<Collection>);
|
14
14
|
}
|
package/lib/models/collection.js
CHANGED
@@ -13,16 +13,16 @@ exports.Collection = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
14
14
|
const post_1 = require("./post");
|
15
15
|
const publisher_1 = require("./publisher");
|
16
|
-
const
|
17
|
-
const
|
16
|
+
const metric_1 = require("./metric");
|
17
|
+
const log_1 = require("./log");
|
18
18
|
class Collection {
|
19
19
|
id;
|
20
20
|
title;
|
21
21
|
items;
|
22
22
|
publisher;
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
metricPosts;
|
24
|
+
logCreated;
|
25
|
+
logUpdated;
|
26
26
|
constructor(props) {
|
27
27
|
Object.assign(this, props);
|
28
28
|
}
|
@@ -44,22 +44,23 @@ __decorate([
|
|
44
44
|
], Collection.prototype, "items", void 0);
|
45
45
|
__decorate([
|
46
46
|
(0, class_transformer_1.Expose)(),
|
47
|
-
(0, class_transformer_1.Type)(() =>
|
47
|
+
(0, class_transformer_1.Type)(() => publisher_1.Publisher),
|
48
48
|
__metadata("design:type", publisher_1.Publisher)
|
49
49
|
], Collection.prototype, "publisher", void 0);
|
50
50
|
__decorate([
|
51
|
-
(0, class_transformer_1.Expose)(),
|
52
|
-
(0, class_transformer_1.Type)(() =>
|
53
|
-
|
54
|
-
|
51
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
52
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
53
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalPosts', obj?.totalPosts, ['fas', 'book-open'])),
|
54
|
+
__metadata("design:type", metric_1.Metric)
|
55
|
+
], Collection.prototype, "metricPosts", void 0);
|
55
56
|
__decorate([
|
56
|
-
(0, class_transformer_1.Expose)(),
|
57
|
-
(0, class_transformer_1.Type)(() =>
|
58
|
-
__metadata("design:type",
|
59
|
-
], Collection.prototype, "
|
57
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
58
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
59
|
+
__metadata("design:type", log_1.Log)
|
60
|
+
], Collection.prototype, "logCreated", void 0);
|
60
61
|
__decorate([
|
61
|
-
(0, class_transformer_1.Expose)(),
|
62
|
-
(0, class_transformer_1.Type)(() =>
|
63
|
-
__metadata("design:type",
|
64
|
-
], Collection.prototype, "
|
62
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
63
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
64
|
+
__metadata("design:type", log_1.Log)
|
65
|
+
], Collection.prototype, "logUpdated", void 0);
|
65
66
|
//# sourceMappingURL=collection.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/models/collection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{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CAAC,SAAG,CAAC;8BACJ,SAAG;8CAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACJ,SAAG;8CAAC"}
|
package/lib/models/feedback.d.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import { PostType } from '../enums';
|
2
2
|
import { Item } from './item';
|
3
|
+
import { Metric } from './metric';
|
4
|
+
import { Log } from './log';
|
3
5
|
export declare class Feedback {
|
4
6
|
id: number;
|
5
7
|
type: PostType;
|
@@ -7,9 +9,12 @@ export declare class Feedback {
|
|
7
9
|
description: string;
|
8
10
|
items: FeedbackItem[];
|
9
11
|
icon: string;
|
10
|
-
|
12
|
+
metricQuestions: Metric;
|
13
|
+
metricPosts: Metric;
|
14
|
+
metricUsers: Metric;
|
15
|
+
logCreated: Log;
|
16
|
+
logUpdated: Log;
|
11
17
|
constructor(props?: Partial<Feedback>);
|
12
|
-
updateMetrics(): void;
|
13
18
|
}
|
14
19
|
export declare class FeedbackItem {
|
15
20
|
id: number;
|
package/lib/models/feedback.js
CHANGED
@@ -13,6 +13,8 @@ exports.FeedbackOption = exports.FeedbackItem = exports.Feedback = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
14
14
|
const enums_1 = require("../enums");
|
15
15
|
const item_1 = require("./item");
|
16
|
+
const metric_1 = require("./metric");
|
17
|
+
const log_1 = require("./log");
|
16
18
|
class Feedback {
|
17
19
|
id;
|
18
20
|
type;
|
@@ -20,32 +22,14 @@ class Feedback {
|
|
20
22
|
description;
|
21
23
|
items;
|
22
24
|
icon;
|
23
|
-
|
25
|
+
metricQuestions;
|
26
|
+
metricPosts;
|
27
|
+
metricUsers;
|
28
|
+
logCreated;
|
29
|
+
logUpdated;
|
24
30
|
constructor(props) {
|
25
31
|
Object.assign(this, props);
|
26
32
|
}
|
27
|
-
updateMetrics() {
|
28
|
-
if (!this.metrics || this.metrics.length === 0) {
|
29
|
-
return;
|
30
|
-
}
|
31
|
-
let totalQuestion = 0;
|
32
|
-
let totalOptions = 0;
|
33
|
-
if (this.items?.length > 0) {
|
34
|
-
for (const question of this.items) {
|
35
|
-
totalQuestion++;
|
36
|
-
totalOptions += question?.options?.length;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
this.metrics = this.metrics.map(item => {
|
40
|
-
if (item.name === 'items') {
|
41
|
-
item.value = totalQuestion;
|
42
|
-
}
|
43
|
-
if (item.name === 'options') {
|
44
|
-
item.value = totalOptions;
|
45
|
-
}
|
46
|
-
return item;
|
47
|
-
});
|
48
|
-
}
|
49
33
|
}
|
50
34
|
exports.Feedback = Feedback;
|
51
35
|
__decorate([
|
@@ -73,7 +57,7 @@ __decorate([
|
|
73
57
|
__decorate([
|
74
58
|
(0, class_transformer_1.Expose)(),
|
75
59
|
(0, class_transformer_1.Transform)(({ obj }) => {
|
76
|
-
switch (obj
|
60
|
+
switch (obj?.type) {
|
77
61
|
case enums_1.PostType.Article:
|
78
62
|
return '/assets/icons/content-type-article.svg';
|
79
63
|
case enums_1.PostType.Book:
|
@@ -91,10 +75,33 @@ __decorate([
|
|
91
75
|
__metadata("design:type", String)
|
92
76
|
], Feedback.prototype, "icon", void 0);
|
93
77
|
__decorate([
|
94
|
-
(0, class_transformer_1.Expose)(),
|
95
|
-
(0, class_transformer_1.Type)(() =>
|
96
|
-
|
97
|
-
|
78
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
79
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
80
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalQuestion', obj?.totalPosts, ['fas', 'circle-question'])),
|
81
|
+
__metadata("design:type", metric_1.Metric)
|
82
|
+
], Feedback.prototype, "metricQuestions", void 0);
|
83
|
+
__decorate([
|
84
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
85
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
86
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalPosts', obj?.totalPosts, ['fas', 'book-open'])),
|
87
|
+
__metadata("design:type", metric_1.Metric)
|
88
|
+
], Feedback.prototype, "metricPosts", void 0);
|
89
|
+
__decorate([
|
90
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
91
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
92
|
+
(0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalUsers', obj?.totalUsers, ['fas', 'users'])),
|
93
|
+
__metadata("design:type", metric_1.Metric)
|
94
|
+
], Feedback.prototype, "metricUsers", void 0);
|
95
|
+
__decorate([
|
96
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
97
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
98
|
+
__metadata("design:type", log_1.Log)
|
99
|
+
], Feedback.prototype, "logCreated", void 0);
|
100
|
+
__decorate([
|
101
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
102
|
+
(0, class_transformer_1.Type)(() => log_1.Log),
|
103
|
+
__metadata("design:type", log_1.Log)
|
104
|
+
], Feedback.prototype, "logUpdated", void 0);
|
98
105
|
class FeedbackItem {
|
99
106
|
id;
|
100
107
|
question;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/models/feedback.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAC5D,oCAAoC;AACpC,iCAA8B;
|
1
|
+
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/models/feedback.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAC5D,oCAAoC;AACpC,iCAA8B;AAC9B,qCAAkC;AAClC,+BAA4B;AAE5B,MAAa,QAAQ;IAIpB,EAAE,CAAS;IAGX,IAAI,CAAW;IAGf,KAAK,CAAS;IAGd,WAAW,CAAQ;IAInB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C;AAhBA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;0CACR;AAGX;IADC,IAAA,0BAAM,GAAE;;+CACO;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACN;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;kDACA"}
|
package/lib/models/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export * from './asset';
|
2
1
|
export * from './author';
|
3
2
|
export * from './boost';
|
4
3
|
export * from './brand';
|
@@ -8,6 +7,8 @@ export * from './feedback';
|
|
8
7
|
export * from './gallery';
|
9
8
|
export * from './item';
|
10
9
|
export * from './link';
|
10
|
+
export * from './log';
|
11
|
+
export * from './metric';
|
11
12
|
export * from './notification';
|
12
13
|
export * from './post';
|
13
14
|
export * from './promotion';
|
package/lib/models/index.js
CHANGED
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./asset"), exports);
|
18
17
|
__exportStar(require("./author"), exports);
|
19
18
|
__exportStar(require("./boost"), exports);
|
20
19
|
__exportStar(require("./brand"), exports);
|
@@ -24,6 +23,8 @@ __exportStar(require("./feedback"), exports);
|
|
24
23
|
__exportStar(require("./gallery"), exports);
|
25
24
|
__exportStar(require("./item"), exports);
|
26
25
|
__exportStar(require("./link"), exports);
|
26
|
+
__exportStar(require("./log"), exports);
|
27
|
+
__exportStar(require("./metric"), exports);
|
27
28
|
__exportStar(require("./notification"), exports);
|
28
29
|
__exportStar(require("./post"), exports);
|
29
30
|
__exportStar(require("./promotion"), exports);
|
package/lib/models/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,+CAA6B;AAC7B,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,wCAAsB;AACtB,2CAAyB;AACzB,iDAA+B;AAC/B,yCAAuB;AACvB,8CAA4B;AAC5B,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,yCAAuB"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { LogType, StatusType } from "../enums";
|
2
|
+
import { User } from "./user";
|
3
|
+
export declare class Log {
|
4
|
+
type: LogType;
|
5
|
+
date: Date;
|
6
|
+
user: User;
|
7
|
+
name?: string;
|
8
|
+
status?: StatusType;
|
9
|
+
description?: string;
|
10
|
+
constructor(props?: Partial<Log>);
|
11
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Log = void 0;
|
4
|
+
class Log {
|
5
|
+
type;
|
6
|
+
date;
|
7
|
+
user;
|
8
|
+
name;
|
9
|
+
status;
|
10
|
+
description;
|
11
|
+
constructor(props) {
|
12
|
+
Object.assign(this, props);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
exports.Log = Log;
|
16
|
+
//# sourceMappingURL=log.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/models/log.ts"],"names":[],"mappings":";;;AAIA,MAAa,GAAG;IAKf,IAAI,CAAU;IAKd,IAAI,CAAO;IAKX,IAAI,CAAO;IAKX,IAAI,CAAU;IAKd,MAAM,CAAc;IAKpB,WAAW,CAAU;IAErB,YAAY,KAAoB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAnCD,kBAmCC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
2
|
+
import { MetricType } from "../enums";
|
3
|
+
export declare class Metric {
|
4
|
+
name?: string;
|
5
|
+
title?: string;
|
6
|
+
type: MetricType;
|
7
|
+
value: number;
|
8
|
+
active: boolean;
|
9
|
+
icon: IconProp;
|
10
|
+
iconActive: IconProp;
|
11
|
+
constructor(props?: Partial<Metric>);
|
12
|
+
static seen(val: number, active?: boolean): Metric;
|
13
|
+
static open(val: number, active?: boolean): Metric;
|
14
|
+
static like(val: number, active?: boolean): Metric;
|
15
|
+
static bookmark(val: number, active?: boolean): Metric;
|
16
|
+
static share(val: number, active?: boolean): Metric;
|
17
|
+
static download(val: number, active?: boolean): Metric;
|
18
|
+
static feedback(val: number, active?: boolean): Metric;
|
19
|
+
static total(title: string, val: number, icon?: IconProp, active?: boolean): Metric;
|
20
|
+
}
|