@glissandoo/lib 1.61.0 → 1.61.1
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/functions/auth.js +2 -1
- package/functions/communication.js +2 -1
- package/functions/communicationComment.js +2 -1
- package/functions/customer.js +2 -1
- package/functions/customerGroup.js +2 -1
- package/functions/event.js +5 -2
- package/functions/eventPlayer.js +5 -2
- package/functions/eventRepertory.js +2 -1
- package/functions/federation.js +2 -1
- package/functions/federationPartnership.js +2 -1
- package/functions/group.js +2 -1
- package/functions/groupPlayer.js +2 -1
- package/functions/groupRepertory.js +2 -1
- package/functions/index.js +5 -2
- package/functions/jwt.js +2 -1
- package/functions/misc.js +2 -1
- package/functions/notification.js +2 -1
- package/functions/partner.js +2 -1
- package/functions/partnership.js +2 -1
- package/functions/partnershipGroup.js +2 -1
- package/functions/partnershipPlan.js +2 -1
- package/functions/regions.js +128 -124
- package/functions/subscription.js +2 -1
- package/functions/user.js +2 -1
- package/helpers/appScenes.js +5 -2
- package/helpers/audios.js +9 -5
- package/helpers/auth.js +9 -5
- package/helpers/badges.js +19 -10
- package/helpers/collections.js +5 -2
- package/helpers/countries.js +4 -1
- package/helpers/dlinks.js +5 -2
- package/helpers/errors.js +5 -2
- package/helpers/fileSections/index.js +8 -5
- package/helpers/fileSections/orders.js +16 -11
- package/helpers/glissandooAdmin.js +6 -2
- package/helpers/instruments/index.js +6 -3
- package/helpers/instruments/lists.js +19 -11
- package/helpers/musicStyles/index.js +36 -29
- package/helpers/musicStyles/orders.js +179 -174
- package/helpers/notifications/index.js +122 -119
- package/helpers/notifications/placeholders.js +26 -18
- package/helpers/objects.js +23 -15
- package/helpers/payments.js +8 -5
- package/helpers/plans.js +9 -6
- package/helpers/rates.js +6 -2
- package/helpers/reasons.js +21 -17
- package/helpers/slate.js +12 -5
- package/helpers/styles.js +4 -1
- package/helpers/ts-extras/array-includes.js +5 -1
- package/helpers/ts-extras/as-mutable.js +5 -1
- package/helpers/ts-extras/assert-error.js +5 -1
- package/helpers/ts-extras/index.js +33 -15
- package/helpers/ts-extras/is-defined.js +5 -1
- package/helpers/ts-extras/is-empty.js +5 -1
- package/helpers/ts-extras/is-finite.js +4 -1
- package/helpers/ts-extras/is-infinite.js +5 -1
- package/helpers/ts-extras/is-integer.js +4 -1
- package/helpers/ts-extras/is-present.js +5 -1
- package/helpers/ts-extras/is-safe-integer.js +4 -1
- package/helpers/ts-extras/object-entries.js +4 -1
- package/helpers/ts-extras/object-from-entries.js +4 -1
- package/helpers/ts-extras/object-has-own.js +5 -1
- package/helpers/ts-extras/object-keys.js +4 -1
- package/helpers/ts-extras/set-has.js +5 -1
- package/helpers/types.js +5 -2
- package/helpers/utils.d.ts +1 -0
- package/helpers/utils.js +23 -8
- package/lang/index.js +51 -42
- package/models/Communication/Comment/index.js +12 -5
- package/models/Communication/Comment/types.js +2 -1
- package/models/Communication/index.js +21 -15
- package/models/Communication/types.js +7 -4
- package/models/Counters/Group/Analytics/index.js +12 -5
- package/models/Counters/Group/Analytics/types.js +5 -2
- package/models/Counters/Group/index.js +8 -2
- package/models/Counters/Group/types.js +2 -1
- package/models/Counters/event.js +8 -2
- package/models/Counters/index.js +8 -2
- package/models/Counters/types.js +2 -1
- package/models/Customer/Group/index.js +14 -7
- package/models/Customer/Group/types.js +2 -1
- package/models/Customer/basic.js +10 -4
- package/models/Customer/index.js +11 -5
- package/models/Customer/types.js +5 -2
- package/models/Evento/Player/basic.js +11 -10
- package/models/Evento/Player/index.js +19 -12
- package/models/Evento/Player/types.js +7 -4
- package/models/Evento/Repertory/index.js +10 -3
- package/models/Evento/Repertory/types.js +2 -1
- package/models/Evento/basic.js +18 -12
- package/models/Evento/index.js +38 -32
- package/models/Evento/promoter.js +8 -2
- package/models/Evento/tiny.js +9 -9
- package/models/Evento/types.js +17 -14
- package/models/Federation/Partnership/index.js +10 -3
- package/models/Federation/Partnership/types.js +2 -1
- package/models/Federation/index.js +13 -7
- package/models/Federation/types.js +2 -1
- package/models/Group/Analytics/index.js +12 -5
- package/models/Group/Analytics/types.js +5 -2
- package/models/Group/Event/index.js +12 -6
- package/models/Group/Event/types.js +2 -1
- package/models/Group/Player/Event/index.js +18 -11
- package/models/Group/Player/Event/types.js +2 -1
- package/models/Group/Player/Log/index.js +8 -2
- package/models/Group/Player/Log/types.js +2 -1
- package/models/Group/Player/index.js +25 -18
- package/models/Group/Player/types.js +5 -2
- package/models/Group/Repertory/File/Section/index.js +16 -12
- package/models/Group/Repertory/File/Section/types.js +5 -2
- package/models/Group/Repertory/File/index.js +12 -11
- package/models/Group/Repertory/File/types.js +2 -1
- package/models/Group/Repertory/FilePath/index.js +15 -12
- package/models/Group/Repertory/index.js +32 -25
- package/models/Group/Repertory/types.js +5 -2
- package/models/Group/StageTemplate/index.js +8 -2
- package/models/Group/StageTemplate/types.js +2 -1
- package/models/Group/basic.js +11 -5
- package/models/Group/index.js +47 -41
- package/models/Group/types.js +17 -14
- package/models/Instrument/group.js +11 -6
- package/models/Instrument/index.js +9 -8
- package/models/Metrics/index.js +16 -10
- package/models/Metrics/types.js +2 -1
- package/models/Model/index.js +6 -7
- package/models/Model/lang.js +10 -5
- package/models/MusicStyle/index.js +10 -9
- package/models/Notification/index.js +8 -2
- package/models/Notification/types.js +5 -2
- package/models/Partner/basic.js +12 -6
- package/models/Partner/index.js +10 -4
- package/models/Partner/tiny.js +8 -2
- package/models/Partner/types.js +5 -2
- package/models/Partnership/Group/index.js +12 -5
- package/models/Partnership/Group/types.js +2 -1
- package/models/Partnership/Partner/Subscription/index.js +15 -8
- package/models/Partnership/Partner/Subscription/types.js +5 -2
- package/models/Partnership/Partner/index.js +10 -3
- package/models/Partnership/Partner/types.js +2 -1
- package/models/Partnership/Payment/index.js +8 -2
- package/models/Partnership/Payment/types.js +2 -1
- package/models/Partnership/Plan/basic.js +18 -12
- package/models/Partnership/Plan/index.js +10 -3
- package/models/Partnership/Plan/types.js +5 -2
- package/models/Partnership/basic.js +10 -4
- package/models/Partnership/index.js +11 -5
- package/models/Partnership/types.js +7 -4
- package/models/Payment/basic.js +13 -7
- package/models/Payment/index.js +8 -2
- package/models/Payment/types.js +7 -4
- package/models/Player/basic.js +10 -4
- package/models/Player/types.js +2 -1
- package/models/Repertory/basic.js +8 -2
- package/models/Repertory/types.js +2 -1
- package/models/User/Group/index.js +15 -8
- package/models/User/Group/types.js +2 -1
- package/models/User/Notification/index.d.ts +1 -1
- package/models/User/Notification/index.js +21 -16
- package/models/User/Notification/types.js +2 -1
- package/models/User/basic.js +10 -4
- package/models/User/index.js +24 -18
- package/models/User/types.js +15 -12
- package/models/WebhookEvent/index.js +8 -2
- package/models/WebhookEvent/types.js +5 -2
- package/package.json +1 -1
- package/types/firestore.js +5 -2
- package/types/messagebirdChatWidget.js +2 -1
|
@@ -1,15 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setHas = exports.objectKeys = exports.objectHasOwn = exports.objectFromEntries = exports.objectEntries = exports.isSafeInteger = exports.isInteger = exports.isInfinite = exports.isFinite = exports.isEmpty = exports.isPresent = exports.isDefined = exports.assertError = exports.asMutable = exports.arrayIncludes = void 0;
|
|
4
|
+
var array_includes_1 = require("./array-includes");
|
|
5
|
+
Object.defineProperty(exports, "arrayIncludes", { enumerable: true, get: function () { return array_includes_1.arrayIncludes; } });
|
|
6
|
+
var as_mutable_1 = require("./as-mutable");
|
|
7
|
+
Object.defineProperty(exports, "asMutable", { enumerable: true, get: function () { return as_mutable_1.asMutable; } });
|
|
8
|
+
var assert_error_1 = require("./assert-error");
|
|
9
|
+
Object.defineProperty(exports, "assertError", { enumerable: true, get: function () { return assert_error_1.assertError; } });
|
|
10
|
+
var is_defined_1 = require("./is-defined");
|
|
11
|
+
Object.defineProperty(exports, "isDefined", { enumerable: true, get: function () { return is_defined_1.isDefined; } });
|
|
12
|
+
var is_present_1 = require("./is-present");
|
|
13
|
+
Object.defineProperty(exports, "isPresent", { enumerable: true, get: function () { return is_present_1.isPresent; } });
|
|
14
|
+
var is_empty_1 = require("./is-empty");
|
|
15
|
+
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return is_empty_1.isEmpty; } });
|
|
16
|
+
var is_finite_1 = require("./is-finite");
|
|
17
|
+
Object.defineProperty(exports, "isFinite", { enumerable: true, get: function () { return is_finite_1.isFinite; } });
|
|
18
|
+
var is_infinite_1 = require("./is-infinite");
|
|
19
|
+
Object.defineProperty(exports, "isInfinite", { enumerable: true, get: function () { return is_infinite_1.isInfinite; } });
|
|
20
|
+
var is_integer_1 = require("./is-integer");
|
|
21
|
+
Object.defineProperty(exports, "isInteger", { enumerable: true, get: function () { return is_integer_1.isInteger; } });
|
|
22
|
+
var is_safe_integer_1 = require("./is-safe-integer");
|
|
23
|
+
Object.defineProperty(exports, "isSafeInteger", { enumerable: true, get: function () { return is_safe_integer_1.isSafeInteger; } });
|
|
24
|
+
var object_entries_1 = require("./object-entries");
|
|
25
|
+
Object.defineProperty(exports, "objectEntries", { enumerable: true, get: function () { return object_entries_1.objectEntries; } });
|
|
26
|
+
var object_from_entries_1 = require("./object-from-entries");
|
|
27
|
+
Object.defineProperty(exports, "objectFromEntries", { enumerable: true, get: function () { return object_from_entries_1.objectFromEntries; } });
|
|
28
|
+
var object_has_own_1 = require("./object-has-own");
|
|
29
|
+
Object.defineProperty(exports, "objectHasOwn", { enumerable: true, get: function () { return object_has_own_1.objectHasOwn; } });
|
|
30
|
+
var object_keys_1 = require("./object-keys");
|
|
31
|
+
Object.defineProperty(exports, "objectKeys", { enumerable: true, get: function () { return object_keys_1.objectKeys; } });
|
|
32
|
+
var set_has_1 = require("./set-has");
|
|
33
|
+
Object.defineProperty(exports, "setHas", { enumerable: true, get: function () { return set_has_1.setHas; } });
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDefined = void 0;
|
|
1
4
|
/**
|
|
2
5
|
Check whether a value is defined, meaning it is not `undefined`.
|
|
3
6
|
|
|
@@ -13,6 +16,7 @@ import {isDefined} from 'ts-extras';
|
|
|
13
16
|
|
|
14
17
|
@category Type guard
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
function isDefined(value) {
|
|
17
20
|
return value !== undefined;
|
|
18
21
|
}
|
|
22
|
+
exports.isDefined = isDefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFinite = void 0;
|
|
1
4
|
/**
|
|
2
5
|
An alternative to `Number.isFinite()` that properly acts as a type guard.
|
|
3
6
|
|
|
4
7
|
@category Improved builtin
|
|
5
8
|
@category Type guard
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
exports.isFinite = Number.isFinite;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInfinite = void 0;
|
|
1
4
|
/**
|
|
2
5
|
Check whether a value is infinite.
|
|
3
6
|
|
|
4
7
|
@category Type guard
|
|
5
8
|
*/
|
|
6
|
-
|
|
9
|
+
function isInfinite(value) {
|
|
7
10
|
return !Number.isNaN(value) && !Number.isFinite(value);
|
|
8
11
|
}
|
|
12
|
+
exports.isInfinite = isInfinite;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInteger = void 0;
|
|
1
4
|
/**
|
|
2
5
|
An alternative to `Number.isInteger()` that properly acts as a type guard.
|
|
3
6
|
|
|
4
7
|
@category Improved builtin
|
|
5
8
|
@category Type guard
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
exports.isInteger = Number.isInteger;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPresent = void 0;
|
|
1
4
|
/**
|
|
2
5
|
Check whether a value is present (non-nullable), meaning it is neither `null` or `undefined`.
|
|
3
6
|
|
|
@@ -13,6 +16,7 @@ import {isPresent} from 'ts-extras';
|
|
|
13
16
|
|
|
14
17
|
@category Type guard
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
function isPresent(value) {
|
|
17
20
|
return value !== null && value !== undefined;
|
|
18
21
|
}
|
|
22
|
+
exports.isPresent = isPresent;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSafeInteger = void 0;
|
|
1
4
|
/**
|
|
2
5
|
An alternative to `Number.isSafeInteger()` that properly acts as a type guard.
|
|
3
6
|
|
|
4
7
|
@category Improved builtin
|
|
5
8
|
@category Type guard
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
exports.isSafeInteger = Number.isSafeInteger;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectEntries = void 0;
|
|
1
4
|
/**
|
|
2
5
|
A strongly-typed version of `Object.entries()`.
|
|
3
6
|
|
|
@@ -19,4 +22,4 @@ const untypedEntries = Object.entries(items);
|
|
|
19
22
|
@category Improved builtin
|
|
20
23
|
@category Type guard
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
exports.objectEntries = Object.entries;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectFromEntries = void 0;
|
|
1
4
|
/**
|
|
2
5
|
A strongly-typed version of `Object.fromEntries()`.
|
|
3
6
|
|
|
@@ -23,4 +26,4 @@ const untypedEntries = Object.fromEntries(entries);
|
|
|
23
26
|
@category Improved builtin
|
|
24
27
|
@category Type guard
|
|
25
28
|
*/
|
|
26
|
-
|
|
29
|
+
exports.objectFromEntries = Object.fromEntries;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectHasOwn = void 0;
|
|
1
4
|
/**
|
|
2
5
|
A strongly-typed version of `Object.hasOwn()`.
|
|
3
6
|
|
|
@@ -17,6 +20,7 @@ objectHasOwn([1, 2, 3], 0);
|
|
|
17
20
|
@category Improved builtin
|
|
18
21
|
@category Type guard
|
|
19
22
|
*/
|
|
20
|
-
|
|
23
|
+
function objectHasOwn(object, key) {
|
|
21
24
|
return Object.prototype.hasOwnProperty.call(object, key);
|
|
22
25
|
}
|
|
26
|
+
exports.objectHasOwn = objectHasOwn;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.objectKeys = void 0;
|
|
2
5
|
/**
|
|
3
6
|
A strongly-typed version of `Object.keys()`.
|
|
4
7
|
|
|
@@ -18,4 +21,4 @@ const untypedItems = Object.keys(items); // => Array<string>
|
|
|
18
21
|
@category Improved builtin
|
|
19
22
|
@category Type guard
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
exports.objectKeys = Object.keys;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setHas = void 0;
|
|
1
4
|
/**
|
|
2
5
|
An alternative to `Set#has()` that properly acts as a type guard.
|
|
3
6
|
|
|
@@ -19,6 +22,7 @@ if (setHas(valueSet, valueToCheck)) {
|
|
|
19
22
|
@category Improved builtin
|
|
20
23
|
@category Type guard
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
function setHas(set, item) {
|
|
23
26
|
return set.has(item);
|
|
24
27
|
}
|
|
28
|
+
exports.setHas = setHas;
|
package/helpers/types.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminItemStatus = void 0;
|
|
4
|
+
var AdminItemStatus;
|
|
2
5
|
(function (AdminItemStatus) {
|
|
3
6
|
AdminItemStatus["Pending"] = "pending";
|
|
4
7
|
AdminItemStatus["Accepted"] = "accepted";
|
|
5
|
-
})(AdminItemStatus || (AdminItemStatus = {}));
|
|
8
|
+
})(AdminItemStatus = exports.AdminItemStatus || (exports.AdminItemStatus = {}));
|
package/helpers/utils.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare const sortByMatch: <T>(list: T[], field: keyof T, order: string[]
|
|
|
2
2
|
export declare const enumToObj: (enumObject: Record<string, string>, defaultValue: string | number | boolean) => {
|
|
3
3
|
[k: string]: string | number | boolean;
|
|
4
4
|
};
|
|
5
|
+
export declare const at: <D>(array: D[], index: number) => D | null;
|
package/helpers/utils.js
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.at = exports.enumToObj = exports.sortByMatch = void 0;
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
9
|
+
const sortByMatch = (list, field, order) => {
|
|
10
|
+
const [match, noMatch] = (0, lodash_1.partition)(list, (item) => order.includes((0, get_1.default)(item, field)));
|
|
11
|
+
const sortedmatch = (0, lodash_1.sortBy)(match, [
|
|
12
|
+
(player) => order.indexOf((0, get_1.default)(player, field)),
|
|
7
13
|
'displayName',
|
|
8
14
|
]);
|
|
9
|
-
const sortedNoMatch = orderBy(noMatch, field, 'asc');
|
|
15
|
+
const sortedNoMatch = (0, lodash_1.orderBy)(noMatch, field, 'asc');
|
|
10
16
|
return [...sortedmatch, ...sortedNoMatch];
|
|
11
17
|
};
|
|
12
|
-
|
|
18
|
+
exports.sortByMatch = sortByMatch;
|
|
19
|
+
const enumToObj = (enumObject, defaultValue) => Object.fromEntries(Object.values(enumObject).map((key) => [key, defaultValue]));
|
|
20
|
+
exports.enumToObj = enumToObj;
|
|
21
|
+
const at = (array, index) => {
|
|
22
|
+
if (index >= 0 && index < array.length) {
|
|
23
|
+
return array[index];
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
exports.at = at;
|
package/lang/index.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getTranslation = exports.getFormattedDate = exports.getDateLang = exports.defaultLocale = exports.langByCoLang = exports.mainLangs = exports.LanguagesTypes = void 0;
|
|
7
|
+
const ca_1 = __importDefault(require("date-fns/locale/ca"));
|
|
8
|
+
const de_1 = __importDefault(require("date-fns/locale/de"));
|
|
9
|
+
const en_US_1 = __importDefault(require("date-fns/locale/en-US"));
|
|
10
|
+
const es_1 = __importDefault(require("date-fns/locale/es"));
|
|
11
|
+
const eu_1 = __importDefault(require("date-fns/locale/eu"));
|
|
12
|
+
const gl_1 = __importDefault(require("date-fns/locale/gl"));
|
|
13
|
+
const pt_1 = __importDefault(require("date-fns/locale/pt"));
|
|
14
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
15
|
+
const date_fns_1 = require("date-fns");
|
|
16
|
+
const ca_json_1 = __importDefault(require("./ca.json"));
|
|
17
|
+
const de_json_1 = __importDefault(require("./de.json"));
|
|
18
|
+
const en_json_1 = __importDefault(require("./en.json"));
|
|
19
|
+
const es_json_1 = __importDefault(require("./es.json"));
|
|
20
|
+
const eu_json_1 = __importDefault(require("./eu.json"));
|
|
21
|
+
const gl_json_1 = __importDefault(require("./gl.json"));
|
|
22
|
+
const pt_json_1 = __importDefault(require("./pt.json"));
|
|
23
|
+
var LanguagesTypes;
|
|
18
24
|
(function (LanguagesTypes) {
|
|
19
25
|
LanguagesTypes["ES"] = "es";
|
|
20
26
|
LanguagesTypes["EN"] = "en";
|
|
@@ -23,8 +29,8 @@ export var LanguagesTypes;
|
|
|
23
29
|
LanguagesTypes["DE"] = "de";
|
|
24
30
|
LanguagesTypes["PT"] = "pt";
|
|
25
31
|
LanguagesTypes["EU"] = "eu";
|
|
26
|
-
})(LanguagesTypes || (LanguagesTypes = {}));
|
|
27
|
-
|
|
32
|
+
})(LanguagesTypes = exports.LanguagesTypes || (exports.LanguagesTypes = {}));
|
|
33
|
+
exports.mainLangs = {
|
|
28
34
|
[LanguagesTypes.ES]: LanguagesTypes.ES,
|
|
29
35
|
[LanguagesTypes.CA]: LanguagesTypes.ES,
|
|
30
36
|
[LanguagesTypes.GL]: LanguagesTypes.ES,
|
|
@@ -33,7 +39,7 @@ export const mainLangs = {
|
|
|
33
39
|
[LanguagesTypes.DE]: LanguagesTypes.EN,
|
|
34
40
|
[LanguagesTypes.PT]: LanguagesTypes.EN,
|
|
35
41
|
};
|
|
36
|
-
|
|
42
|
+
exports.langByCoLang = {
|
|
37
43
|
[LanguagesTypes.ES]: LanguagesTypes.ES,
|
|
38
44
|
[LanguagesTypes.CA]: LanguagesTypes.ES,
|
|
39
45
|
[LanguagesTypes.GL]: LanguagesTypes.ES,
|
|
@@ -44,9 +50,9 @@ export const langByCoLang = {
|
|
|
44
50
|
};
|
|
45
51
|
const languageProvider = {
|
|
46
52
|
es: {
|
|
47
|
-
messages:
|
|
53
|
+
messages: es_json_1.default,
|
|
48
54
|
date: {
|
|
49
|
-
locale:
|
|
55
|
+
locale: es_1.default,
|
|
50
56
|
format: {
|
|
51
57
|
date: "iiii d 'de' MMMM",
|
|
52
58
|
datetime: "iiii d 'de' MMMM 'a las' HH:mm'h.'",
|
|
@@ -56,9 +62,9 @@ const languageProvider = {
|
|
|
56
62
|
},
|
|
57
63
|
},
|
|
58
64
|
en: {
|
|
59
|
-
messages:
|
|
65
|
+
messages: en_json_1.default,
|
|
60
66
|
date: {
|
|
61
|
-
locale:
|
|
67
|
+
locale: en_US_1.default,
|
|
62
68
|
format: {
|
|
63
69
|
date: "iiii',' MMMM d",
|
|
64
70
|
datetime: "iiii',' MMMM d 'at' h:mm aaaa",
|
|
@@ -68,9 +74,9 @@ const languageProvider = {
|
|
|
68
74
|
},
|
|
69
75
|
},
|
|
70
76
|
ca: {
|
|
71
|
-
messages:
|
|
77
|
+
messages: ca_json_1.default,
|
|
72
78
|
date: {
|
|
73
|
-
locale:
|
|
79
|
+
locale: ca_1.default,
|
|
74
80
|
format: {
|
|
75
81
|
date: "iiii d 'de' MMMM",
|
|
76
82
|
datetime: "iiii d 'de' MMMM 'a les' HH:mm'h.'",
|
|
@@ -80,9 +86,9 @@ const languageProvider = {
|
|
|
80
86
|
},
|
|
81
87
|
},
|
|
82
88
|
gl: {
|
|
83
|
-
messages:
|
|
89
|
+
messages: gl_json_1.default,
|
|
84
90
|
date: {
|
|
85
|
-
locale:
|
|
91
|
+
locale: gl_1.default,
|
|
86
92
|
format: {
|
|
87
93
|
date: "iiii d 'de' MMMM",
|
|
88
94
|
datetime: "iiii d 'de' MMMM 'a las' HH:mm'h.'",
|
|
@@ -92,9 +98,9 @@ const languageProvider = {
|
|
|
92
98
|
},
|
|
93
99
|
},
|
|
94
100
|
de: {
|
|
95
|
-
messages:
|
|
101
|
+
messages: de_json_1.default,
|
|
96
102
|
date: {
|
|
97
|
-
locale:
|
|
103
|
+
locale: de_1.default,
|
|
98
104
|
format: {
|
|
99
105
|
date: "iiii',' MMMM d",
|
|
100
106
|
datetime: "iiii',' MMMM d 'um' HH:mm 'Uhr'",
|
|
@@ -104,9 +110,9 @@ const languageProvider = {
|
|
|
104
110
|
},
|
|
105
111
|
},
|
|
106
112
|
pt: {
|
|
107
|
-
messages:
|
|
113
|
+
messages: pt_json_1.default,
|
|
108
114
|
date: {
|
|
109
|
-
locale:
|
|
115
|
+
locale: pt_1.default,
|
|
110
116
|
format: {
|
|
111
117
|
date: "iiii d 'de' MMMM",
|
|
112
118
|
datetime: "iiii d 'de' MMMM 'às' HH:mm'h.'",
|
|
@@ -116,9 +122,9 @@ const languageProvider = {
|
|
|
116
122
|
},
|
|
117
123
|
},
|
|
118
124
|
eu: {
|
|
119
|
-
messages:
|
|
125
|
+
messages: eu_json_1.default,
|
|
120
126
|
date: {
|
|
121
|
-
locale:
|
|
127
|
+
locale: eu_1.default,
|
|
122
128
|
format: {
|
|
123
129
|
date: "MMMM d ', ' iiii",
|
|
124
130
|
datetime: "MMMM d ', ' iiii ', ' HH:mm'etan'",
|
|
@@ -128,15 +134,18 @@ const languageProvider = {
|
|
|
128
134
|
},
|
|
129
135
|
},
|
|
130
136
|
};
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
exports.defaultLocale = LanguagesTypes.ES;
|
|
138
|
+
const getDateLang = (lang) => {
|
|
133
139
|
return languageProvider[lang].date;
|
|
134
140
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
exports.getDateLang = getDateLang;
|
|
142
|
+
const getFormattedDate = (date, formatType, lang) => {
|
|
143
|
+
const dateLang = (0, exports.getDateLang)(lang);
|
|
144
|
+
return (0, date_fns_1.format)(date, dateLang.format[formatType], { locale: dateLang.locale });
|
|
138
145
|
};
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
exports.getFormattedDate = getFormattedDate;
|
|
147
|
+
const getTranslation = (key, lang) => {
|
|
148
|
+
return (0, get_1.default)(languageProvider, [lang, 'messages', key]) || null;
|
|
141
149
|
};
|
|
142
|
-
|
|
150
|
+
exports.getTranslation = getTranslation;
|
|
151
|
+
exports.default = languageProvider;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../helpers/utils");
|
|
7
|
+
const lang_1 = require("../../../lang");
|
|
8
|
+
const basic_1 = __importDefault(require("../../Player/basic"));
|
|
9
|
+
class CommunicationCommment extends basic_1.default {
|
|
10
|
+
constructor(doc, lang = lang_1.defaultLocale) {
|
|
5
11
|
super(doc, lang);
|
|
6
12
|
}
|
|
7
13
|
get communicationId() {
|
|
8
|
-
return this.ref.path.split('/')
|
|
14
|
+
return (0, utils_1.at)(this.ref.path.split('/'), 1) || '';
|
|
9
15
|
}
|
|
10
16
|
get text() {
|
|
11
17
|
return this.data.text || '';
|
|
@@ -23,3 +29,4 @@ export default class CommunicationCommment extends PlayerBasic {
|
|
|
23
29
|
return this.data.editedAt !== null;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
32
|
+
exports.default = CommunicationCommment;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const slate_1 = require("../../helpers/slate");
|
|
8
|
+
const lang_1 = require("../../lang");
|
|
9
|
+
const lang_2 = __importDefault(require("../Model/lang"));
|
|
10
|
+
const types_1 = require("./types");
|
|
11
|
+
class Communication extends lang_2.default {
|
|
12
|
+
constructor(doc, lang = lang_1.defaultLocale) {
|
|
8
13
|
super(doc, lang);
|
|
14
|
+
this.getRecipient = (userId) => {
|
|
15
|
+
return userId in this.recipientsInfo ? this.recipientsInfo[userId] : null;
|
|
16
|
+
};
|
|
9
17
|
}
|
|
10
18
|
get title() {
|
|
11
19
|
return this.data.title;
|
|
@@ -47,10 +55,10 @@ export default class Communication extends ModelWithLang {
|
|
|
47
55
|
return this.data.type;
|
|
48
56
|
}
|
|
49
57
|
get isPrivate() {
|
|
50
|
-
return this.data.type === CommunicationType.Private;
|
|
58
|
+
return this.data.type === types_1.CommunicationType.Private;
|
|
51
59
|
}
|
|
52
60
|
get isPublic() {
|
|
53
|
-
return this.data.type === CommunicationType.Public;
|
|
61
|
+
return this.data.type === types_1.CommunicationType.Public;
|
|
54
62
|
}
|
|
55
63
|
get attachmentsPath() {
|
|
56
64
|
return this.data.attachmentsPath || [];
|
|
@@ -62,13 +70,13 @@ export default class Communication extends ModelWithLang {
|
|
|
62
70
|
return this.data.deletedAt || null;
|
|
63
71
|
}
|
|
64
72
|
get isDeleted() {
|
|
65
|
-
return !this.exists || !isNull(this.deletedAt);
|
|
73
|
+
return !this.exists || !(0, lodash_1.isNull)(this.deletedAt);
|
|
66
74
|
}
|
|
67
75
|
get isActive() {
|
|
68
76
|
return !this.isDeleted;
|
|
69
77
|
}
|
|
70
78
|
get plainText() {
|
|
71
|
-
return serializeSlateBlock(this.message);
|
|
79
|
+
return (0, slate_1.serializeSlateBlock)(this.message);
|
|
72
80
|
}
|
|
73
81
|
get createdAt() {
|
|
74
82
|
return this.data.createdAt;
|
|
@@ -98,11 +106,9 @@ export default class Communication extends ModelWithLang {
|
|
|
98
106
|
get isServer() {
|
|
99
107
|
return this.data.server === true;
|
|
100
108
|
}
|
|
101
|
-
getRecipient = (userId) => {
|
|
102
|
-
return userId in this.recipientsInfo ? this.recipientsInfo[userId] : null;
|
|
103
|
-
};
|
|
104
109
|
getReactionsOrdered(maxItems) {
|
|
105
|
-
const array = sortBy(Object.entries(this.reactions), [(e) => e[1].length]).reverse();
|
|
110
|
+
const array = (0, lodash_1.sortBy)(Object.entries(this.reactions), [(e) => e[1].length]).reverse();
|
|
106
111
|
return maxItems ? array.slice(0, maxItems) : array;
|
|
107
112
|
}
|
|
108
113
|
}
|
|
114
|
+
exports.default = Communication;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommunicationReactions = exports.CommunicationType = void 0;
|
|
4
|
+
var CommunicationType;
|
|
2
5
|
(function (CommunicationType) {
|
|
3
6
|
CommunicationType["Private"] = "user";
|
|
4
7
|
CommunicationType["Public"] = "group";
|
|
5
|
-
})(CommunicationType || (CommunicationType = {}));
|
|
6
|
-
|
|
8
|
+
})(CommunicationType = exports.CommunicationType || (exports.CommunicationType = {}));
|
|
9
|
+
var CommunicationReactions;
|
|
7
10
|
(function (CommunicationReactions) {
|
|
8
11
|
CommunicationReactions["OK"] = "\uD83D\uDC4D";
|
|
9
12
|
CommunicationReactions["Claps"] = "\uD83D\uDC4F";
|
|
@@ -20,4 +23,4 @@ export var CommunicationReactions;
|
|
|
20
23
|
CommunicationReactions["Fire"] = "\uD83D\uDD25";
|
|
21
24
|
CommunicationReactions["Rocket"] = "\uD83D\uDE80";
|
|
22
25
|
CommunicationReactions["Car"] = "\uD83D\uDE97";
|
|
23
|
-
})(CommunicationReactions || (CommunicationReactions = {}));
|
|
26
|
+
})(CommunicationReactions = exports.CommunicationReactions || (exports.CommunicationReactions = {}));
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const date_fns_1 = require("date-fns");
|
|
7
|
+
const utils_1 = require("../../../../helpers/utils");
|
|
8
|
+
const Model_1 = __importDefault(require("../../../Model"));
|
|
9
|
+
class GroupAnalytics extends Model_1.default {
|
|
4
10
|
constructor(doc) {
|
|
5
11
|
super(doc);
|
|
6
12
|
}
|
|
7
13
|
get groupId() {
|
|
8
|
-
return this.ref.path.split('/')
|
|
14
|
+
return (0, utils_1.at)(this.ref.path.split('/'), 1) || '';
|
|
9
15
|
}
|
|
10
16
|
get satisfactionIndex() {
|
|
11
17
|
return this.data.satisfactionIndex || 0;
|
|
@@ -17,9 +23,10 @@ export default class GroupAnalytics extends Model {
|
|
|
17
23
|
return this.data.createdAt;
|
|
18
24
|
}
|
|
19
25
|
get weekDate() {
|
|
20
|
-
return parse(this.id, 'yyyyMMdd', new Date());
|
|
26
|
+
return (0, date_fns_1.parse)(this.id, 'yyyyMMdd', new Date());
|
|
21
27
|
}
|
|
22
28
|
get status() {
|
|
23
29
|
return this.data.status;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
32
|
+
exports.default = GroupAnalytics;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SatisfactionIndexElements = void 0;
|
|
4
|
+
var SatisfactionIndexElements;
|
|
2
5
|
(function (SatisfactionIndexElements) {
|
|
3
6
|
SatisfactionIndexElements["ROLLCALLED_EVENTS_RATIO"] = "ROLLCALLED_EVENTS_RATIO";
|
|
4
7
|
SatisfactionIndexElements["ADMIN_COUNT"] = "ADMIN_COUNT";
|
|
@@ -11,4 +14,4 @@ export var SatisfactionIndexElements;
|
|
|
11
14
|
SatisfactionIndexElements["COMMUNICATION_COUNT"] = "COMMUNICATION_COUNT";
|
|
12
15
|
SatisfactionIndexElements["EVENTS_COUNT"] = "EVENTS_COUNT";
|
|
13
16
|
SatisfactionIndexElements["EVENTS_FUTURE_COUNT"] = "EVENTS_FUTURE_COUNT";
|
|
14
|
-
})(SatisfactionIndexElements || (SatisfactionIndexElements = {}));
|
|
17
|
+
})(SatisfactionIndexElements = exports.SatisfactionIndexElements || (exports.SatisfactionIndexElements = {}));
|