@glissandoo/lib 1.60.0 → 1.61.0
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 +1 -2
- package/functions/communication.js +1 -2
- package/functions/communicationComment.js +1 -2
- package/functions/customer.js +1 -2
- package/functions/customerGroup.js +1 -2
- package/functions/event.js +2 -5
- package/functions/eventPlayer.js +2 -5
- package/functions/eventRepertory.js +1 -2
- package/functions/federation.js +1 -2
- package/functions/federationPartnership.js +1 -2
- package/functions/group.js +1 -2
- package/functions/groupPlayer.js +1 -2
- package/functions/groupRepertory.js +1 -2
- package/functions/index.js +2 -5
- package/functions/jwt.js +1 -2
- package/functions/misc.js +1 -2
- package/functions/notification.js +1 -2
- package/functions/partner.js +1 -2
- package/functions/partnership.js +1 -2
- package/functions/partnershipGroup.js +1 -2
- package/functions/partnershipPlan.js +1 -2
- package/functions/regions.js +124 -128
- package/functions/subscription.js +1 -2
- package/functions/user.js +1 -2
- package/helpers/appScenes.js +2 -5
- package/helpers/audios.js +5 -9
- package/helpers/auth.js +5 -9
- package/helpers/badges.js +10 -19
- package/helpers/collections.js +2 -5
- package/helpers/countries.js +1 -4
- package/helpers/dlinks.js +2 -5
- package/helpers/errors.js +2 -5
- package/helpers/fileSections/index.js +5 -8
- package/helpers/fileSections/orders.js +11 -16
- package/helpers/glissandooAdmin.js +2 -6
- package/helpers/instruments/index.js +3 -6
- package/helpers/instruments/lists.js +11 -19
- package/helpers/musicStyles/index.js +29 -36
- package/helpers/musicStyles/orders.js +174 -179
- package/helpers/notifications/index.js +119 -122
- package/helpers/notifications/placeholders.js +18 -26
- package/helpers/objects.js +15 -23
- package/helpers/payments.js +5 -8
- package/helpers/plans.js +6 -9
- package/helpers/rates.js +2 -6
- package/helpers/reasons.js +17 -21
- package/helpers/slate.js +5 -12
- package/helpers/styles.js +1 -4
- package/helpers/ts-extras/array-includes.js +1 -5
- package/helpers/ts-extras/as-mutable.js +1 -5
- package/helpers/ts-extras/assert-error.js +1 -5
- package/helpers/ts-extras/index.js +15 -33
- package/helpers/ts-extras/is-defined.js +1 -5
- package/helpers/ts-extras/is-empty.js +1 -5
- package/helpers/ts-extras/is-finite.js +1 -4
- package/helpers/ts-extras/is-infinite.js +1 -5
- package/helpers/ts-extras/is-integer.js +1 -4
- package/helpers/ts-extras/is-present.js +1 -5
- package/helpers/ts-extras/is-safe-integer.js +1 -4
- package/helpers/ts-extras/object-entries.js +1 -4
- package/helpers/ts-extras/object-from-entries.js +1 -4
- package/helpers/ts-extras/object-has-own.js +1 -5
- package/helpers/ts-extras/object-keys.js +1 -4
- package/helpers/ts-extras/set-has.js +1 -5
- package/helpers/types.js +2 -5
- package/helpers/utils.js +8 -16
- package/lang/index.js +42 -51
- package/models/Communication/Comment/index.d.ts +4 -4
- package/models/Communication/Comment/index.js +5 -12
- package/models/Communication/Comment/types.js +1 -2
- package/models/Communication/index.d.ts +3 -2
- package/models/Communication/index.js +15 -21
- package/models/Communication/types.js +4 -7
- package/models/Counters/Group/Analytics/index.d.ts +2 -3
- package/models/Counters/Group/Analytics/index.js +5 -12
- package/models/Counters/Group/Analytics/types.js +2 -5
- package/models/Counters/Group/index.d.ts +2 -3
- package/models/Counters/Group/index.js +2 -8
- package/models/Counters/Group/types.js +1 -2
- package/models/Counters/event.d.ts +2 -2
- package/models/Counters/event.js +2 -8
- package/models/Counters/index.d.ts +2 -3
- package/models/Counters/index.js +2 -8
- package/models/Counters/types.js +1 -2
- package/models/Customer/Group/index.d.ts +2 -2
- package/models/Customer/Group/index.js +7 -14
- package/models/Customer/Group/types.js +1 -2
- package/models/Customer/basic.d.ts +2 -3
- package/models/Customer/basic.js +4 -10
- package/models/Customer/index.d.ts +2 -2
- package/models/Customer/index.js +5 -11
- package/models/Customer/types.js +2 -5
- package/models/Evento/Player/basic.js +10 -11
- package/models/Evento/Player/index.d.ts +4 -4
- package/models/Evento/Player/index.js +12 -18
- package/models/Evento/Player/types.js +4 -7
- package/models/Evento/Repertory/index.d.ts +3 -3
- package/models/Evento/Repertory/index.js +3 -10
- package/models/Evento/Repertory/types.js +1 -2
- package/models/Evento/basic.d.ts +2 -2
- package/models/Evento/basic.js +12 -18
- package/models/Evento/index.d.ts +3 -2
- package/models/Evento/index.js +32 -38
- package/models/Evento/promoter.d.ts +3 -2
- package/models/Evento/promoter.js +2 -8
- package/models/Evento/tiny.js +9 -9
- package/models/Evento/types.js +14 -17
- package/models/Federation/Partnership/index.d.ts +2 -2
- package/models/Federation/Partnership/index.js +3 -10
- package/models/Federation/Partnership/types.js +1 -2
- package/models/Federation/index.d.ts +2 -3
- package/models/Federation/index.js +7 -13
- package/models/Federation/types.js +1 -2
- package/models/Group/Analytics/index.d.ts +3 -4
- package/models/Group/Analytics/index.js +5 -12
- package/models/Group/Analytics/types.js +2 -5
- package/models/Group/Event/index.d.ts +2 -2
- package/models/Group/Event/index.js +6 -12
- package/models/Group/Event/types.js +1 -2
- package/models/Group/Player/Event/index.d.ts +2 -2
- package/models/Group/Player/Event/index.js +11 -18
- package/models/Group/Player/Event/types.js +1 -2
- package/models/Group/Player/Log/index.d.ts +2 -3
- package/models/Group/Player/Log/index.js +2 -8
- package/models/Group/Player/Log/types.js +1 -2
- package/models/Group/Player/index.d.ts +5 -5
- package/models/Group/Player/index.js +18 -24
- package/models/Group/Player/types.js +2 -5
- package/models/Group/Repertory/File/Section/index.js +12 -16
- package/models/Group/Repertory/File/Section/types.js +2 -5
- package/models/Group/Repertory/File/index.js +11 -12
- package/models/Group/Repertory/File/types.js +1 -2
- package/models/Group/Repertory/FilePath/index.js +12 -15
- package/models/Group/Repertory/index.d.ts +8 -8
- package/models/Group/Repertory/index.js +25 -32
- package/models/Group/Repertory/types.js +2 -5
- package/models/Group/StageTemplate/index.d.ts +2 -3
- package/models/Group/StageTemplate/index.js +2 -8
- package/models/Group/StageTemplate/types.js +1 -2
- package/models/Group/basic.d.ts +2 -2
- package/models/Group/basic.js +5 -11
- package/models/Group/index.d.ts +3 -2
- package/models/Group/index.js +41 -47
- package/models/Group/types.js +14 -17
- package/models/Instrument/group.js +6 -11
- package/models/Instrument/index.js +8 -9
- package/models/Metrics/index.d.ts +4 -5
- package/models/Metrics/index.js +10 -16
- package/models/Metrics/types.js +1 -2
- package/models/Model/index.d.ts +15 -3
- package/models/Model/index.js +8 -7
- package/models/Model/lang.d.ts +2 -3
- package/models/Model/lang.js +5 -10
- package/models/MusicStyle/index.js +9 -10
- package/models/Notification/index.d.ts +4 -5
- package/models/Notification/index.js +2 -8
- package/models/Notification/types.js +2 -5
- package/models/Partner/basic.d.ts +2 -2
- package/models/Partner/basic.js +6 -12
- package/models/Partner/index.d.ts +2 -2
- package/models/Partner/index.js +4 -10
- package/models/Partner/tiny.d.ts +2 -3
- package/models/Partner/tiny.js +2 -8
- package/models/Partner/types.js +2 -5
- package/models/Partnership/Group/index.d.ts +2 -2
- package/models/Partnership/Group/index.js +5 -12
- package/models/Partnership/Group/types.js +1 -2
- package/models/Partnership/Partner/Subscription/index.d.ts +2 -2
- package/models/Partnership/Partner/Subscription/index.js +8 -15
- package/models/Partnership/Partner/Subscription/types.js +2 -5
- package/models/Partnership/Partner/index.d.ts +2 -2
- package/models/Partnership/Partner/index.js +3 -10
- package/models/Partnership/Partner/types.js +1 -2
- package/models/Partnership/Payment/index.d.ts +2 -2
- package/models/Partnership/Payment/index.js +2 -8
- package/models/Partnership/Payment/types.js +1 -2
- package/models/Partnership/Plan/basic.d.ts +2 -3
- package/models/Partnership/Plan/basic.js +12 -18
- package/models/Partnership/Plan/index.d.ts +2 -2
- package/models/Partnership/Plan/index.js +3 -10
- package/models/Partnership/Plan/types.js +2 -5
- package/models/Partnership/basic.d.ts +2 -3
- package/models/Partnership/basic.js +4 -10
- package/models/Partnership/index.d.ts +2 -2
- package/models/Partnership/index.js +5 -11
- package/models/Partnership/types.js +4 -7
- package/models/Payment/basic.d.ts +3 -4
- package/models/Payment/basic.js +7 -13
- package/models/Payment/index.d.ts +2 -2
- package/models/Payment/index.js +2 -8
- package/models/Payment/types.js +4 -7
- package/models/Player/basic.d.ts +2 -2
- package/models/Player/basic.js +4 -10
- package/models/Player/types.js +1 -2
- package/models/Repertory/basic.d.ts +2 -3
- package/models/Repertory/basic.js +2 -8
- package/models/Repertory/types.js +1 -2
- package/models/User/Group/index.d.ts +2 -2
- package/models/User/Group/index.js +8 -15
- package/models/User/Group/types.js +1 -2
- package/models/User/Notification/index.d.ts +6 -6
- package/models/User/Notification/index.js +18 -20
- package/models/User/Notification/types.js +1 -2
- package/models/User/basic.d.ts +2 -2
- package/models/User/basic.js +4 -10
- package/models/User/index.d.ts +2 -2
- package/models/User/index.js +18 -24
- package/models/User/types.js +12 -15
- package/models/WebhookEvent/index.d.ts +2 -3
- package/models/WebhookEvent/index.js +2 -8
- package/models/WebhookEvent/types.js +2 -5
- package/package.json +1 -1
- package/types/firestore.js +2 -5
- package/types/messagebirdChatWidget.js +1 -2
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[badges_1.BadgesTypes.AccPerformances]: {
|
|
10
|
-
firstLevel: types_1.NotificationActions.BadgeAccPerformancesFirstLevel,
|
|
11
|
-
upLevel: types_1.NotificationActions.BadgeAccPerformancesUpLevel,
|
|
1
|
+
import { EventoFbFunctionsTypes } from '../../functions/event';
|
|
2
|
+
import { NotificationActions } from '../../models/Notification/types';
|
|
3
|
+
import { UserNotificationSettings } from '../../models/User/types';
|
|
4
|
+
import { BadgesTypes } from '../badges';
|
|
5
|
+
export const notificationActionsBadges = {
|
|
6
|
+
[BadgesTypes.AccPerformances]: {
|
|
7
|
+
firstLevel: NotificationActions.BadgeAccPerformancesFirstLevel,
|
|
8
|
+
upLevel: NotificationActions.BadgeAccPerformancesUpLevel,
|
|
12
9
|
},
|
|
13
|
-
[
|
|
14
|
-
firstLevel:
|
|
15
|
-
upLevel:
|
|
10
|
+
[BadgesTypes.AccPractices]: {
|
|
11
|
+
firstLevel: NotificationActions.BadgeAccPracticesFirstLevel,
|
|
12
|
+
upLevel: NotificationActions.BadgeAccPracticesUpLevel,
|
|
16
13
|
},
|
|
17
|
-
[
|
|
18
|
-
firstLevel:
|
|
19
|
-
upLevel:
|
|
14
|
+
[BadgesTypes.AnswerEvents]: {
|
|
15
|
+
firstLevel: NotificationActions.BadgeAnswerEventsFirstLevel,
|
|
16
|
+
upLevel: NotificationActions.BadgeAnswerEventsUpLevel,
|
|
20
17
|
},
|
|
21
|
-
[
|
|
22
|
-
firstLevel:
|
|
23
|
-
upLevel:
|
|
18
|
+
[BadgesTypes.StrikePractices]: {
|
|
19
|
+
firstLevel: NotificationActions.BadgeStrikePracticesFirstLevel,
|
|
20
|
+
upLevel: NotificationActions.BadgeStrikePracticesUpLevel,
|
|
24
21
|
},
|
|
25
22
|
};
|
|
26
|
-
var NotificationEventActions;
|
|
23
|
+
export var NotificationEventActions;
|
|
27
24
|
(function (NotificationEventActions) {
|
|
28
25
|
NotificationEventActions["Create"] = "create";
|
|
29
26
|
NotificationEventActions["Cancel"] = "cancel";
|
|
@@ -51,113 +48,113 @@ var NotificationEventActions;
|
|
|
51
48
|
NotificationEventActions["ReminderDeadlineEndedInSelectionModeOpen"] = "reminderDeadlineEndedInSelectionModeOpenEvent";
|
|
52
49
|
NotificationEventActions["ReminderDeadlineEndedInSelectionModeClosedOrNotActive"] = "reminderDeadlineEndedInSelectionModeClosedOrNotActiveEvent";
|
|
53
50
|
NotificationEventActions["ReminderRollcall"] = "reminderRollcall";
|
|
54
|
-
})(NotificationEventActions
|
|
55
|
-
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
51
|
+
})(NotificationEventActions || (NotificationEventActions = {}));
|
|
52
|
+
export const editScopeToAction = {
|
|
53
|
+
[EventoFbFunctionsTypes.EditScope.Title]: NotificationEventActions.EditTitle,
|
|
54
|
+
[EventoFbFunctionsTypes.EditScope.Locality]: NotificationEventActions.EditLocality,
|
|
55
|
+
[EventoFbFunctionsTypes.EditScope.Comments]: NotificationEventActions.EditComments,
|
|
56
|
+
[EventoFbFunctionsTypes.EditScope.Attendance]: NotificationEventActions.EditAttendance,
|
|
57
|
+
[EventoFbFunctionsTypes.EditScope.Stage]: NotificationEventActions.EditStage,
|
|
61
58
|
};
|
|
62
|
-
|
|
63
|
-
[NotificationEventActions.Cancel]:
|
|
64
|
-
[NotificationEventActions.Create]:
|
|
65
|
-
[NotificationEventActions.EditAttendance]:
|
|
66
|
-
[NotificationEventActions.EditComments]:
|
|
67
|
-
[NotificationEventActions.EditDatetime]:
|
|
68
|
-
[NotificationEventActions.EditLocality]:
|
|
69
|
-
[NotificationEventActions.EditRepertory]:
|
|
70
|
-
[NotificationEventActions.EditTitle]:
|
|
71
|
-
[NotificationEventActions.EditStage]:
|
|
72
|
-
[NotificationEventActions.EditResponseDeadline]:
|
|
73
|
-
[NotificationEventActions.AddPlayers]:
|
|
74
|
-
[NotificationEventActions.RemovePlayers]:
|
|
75
|
-
[NotificationEventActions.ConfirmAssistance]:
|
|
76
|
-
[NotificationEventActions.DeclineAssistance]:
|
|
77
|
-
[NotificationEventActions.ConfirmAssistanceByAdmin]:
|
|
78
|
-
[NotificationEventActions.DeclineAssistanceByAdmin]:
|
|
79
|
-
[NotificationEventActions.ConfirmInterest]:
|
|
80
|
-
[NotificationEventActions.LoseInterest]:
|
|
81
|
-
[NotificationEventActions.SelectionSelected]:
|
|
82
|
-
[NotificationEventActions.SelectionDeselected]:
|
|
83
|
-
[NotificationEventActions.Reminder]:
|
|
84
|
-
[NotificationEventActions.ReminderDatetimeToConfirmed]:
|
|
85
|
-
[NotificationEventActions.ReminderDeadlineSoonToPending]:
|
|
86
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]:
|
|
87
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]:
|
|
88
|
-
[NotificationEventActions.ReminderRollcall]:
|
|
59
|
+
export const notificationPerformance = {
|
|
60
|
+
[NotificationEventActions.Cancel]: NotificationActions.PerformanceCancel,
|
|
61
|
+
[NotificationEventActions.Create]: NotificationActions.PerformanceCreate,
|
|
62
|
+
[NotificationEventActions.EditAttendance]: NotificationActions.PerformanceEditAttendance,
|
|
63
|
+
[NotificationEventActions.EditComments]: NotificationActions.PerformanceEditComments,
|
|
64
|
+
[NotificationEventActions.EditDatetime]: NotificationActions.PerformanceEditDatetime,
|
|
65
|
+
[NotificationEventActions.EditLocality]: NotificationActions.PerformanceEditLocality,
|
|
66
|
+
[NotificationEventActions.EditRepertory]: NotificationActions.PerformanceEditRepertory,
|
|
67
|
+
[NotificationEventActions.EditTitle]: NotificationActions.PerformanceEditTitle,
|
|
68
|
+
[NotificationEventActions.EditStage]: NotificationActions.PerformanceEditStage,
|
|
69
|
+
[NotificationEventActions.EditResponseDeadline]: NotificationActions.PerformanceEditResponseDeadline,
|
|
70
|
+
[NotificationEventActions.AddPlayers]: NotificationActions.PerformancePlayersAdd,
|
|
71
|
+
[NotificationEventActions.RemovePlayers]: NotificationActions.PerformancePlayersRemove,
|
|
72
|
+
[NotificationEventActions.ConfirmAssistance]: NotificationActions.PerformanceAssistanceConfirm,
|
|
73
|
+
[NotificationEventActions.DeclineAssistance]: NotificationActions.PerformanceAssistanceDecline,
|
|
74
|
+
[NotificationEventActions.ConfirmAssistanceByAdmin]: NotificationActions.PerformanceAssistanceConfirmByAdmin,
|
|
75
|
+
[NotificationEventActions.DeclineAssistanceByAdmin]: NotificationActions.PerformanceAssistanceDeclineByAdmin,
|
|
76
|
+
[NotificationEventActions.ConfirmInterest]: NotificationActions.PerformanceInterestConfirm,
|
|
77
|
+
[NotificationEventActions.LoseInterest]: NotificationActions.PerformanceInterestLose,
|
|
78
|
+
[NotificationEventActions.SelectionSelected]: NotificationActions.PerformanceSelectionSelect,
|
|
79
|
+
[NotificationEventActions.SelectionDeselected]: NotificationActions.PerformanceSelectionDeselect,
|
|
80
|
+
[NotificationEventActions.Reminder]: NotificationActions.PerformanceReminder,
|
|
81
|
+
[NotificationEventActions.ReminderDatetimeToConfirmed]: NotificationActions.PerformanceReminderDatetimeToConfirmed,
|
|
82
|
+
[NotificationEventActions.ReminderDeadlineSoonToPending]: NotificationActions.PerformanceReminderDeadlineSoonToPending,
|
|
83
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: NotificationActions.PerformanceReminderDeadlineEndedInSelectionModeOpen,
|
|
84
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: NotificationActions.PerformanceReminderDeadlineEndedInSelectionModeClosedOrNotActive,
|
|
85
|
+
[NotificationEventActions.ReminderRollcall]: NotificationActions.PerformanceRollCallReminder,
|
|
89
86
|
};
|
|
90
|
-
|
|
91
|
-
[NotificationEventActions.Cancel]:
|
|
92
|
-
[NotificationEventActions.Create]:
|
|
93
|
-
[NotificationEventActions.EditAttendance]:
|
|
94
|
-
[NotificationEventActions.EditComments]:
|
|
95
|
-
[NotificationEventActions.EditDatetime]:
|
|
96
|
-
[NotificationEventActions.EditLocality]:
|
|
97
|
-
[NotificationEventActions.EditRepertory]:
|
|
98
|
-
[NotificationEventActions.EditTitle]:
|
|
99
|
-
[NotificationEventActions.EditStage]:
|
|
100
|
-
[NotificationEventActions.EditResponseDeadline]:
|
|
101
|
-
[NotificationEventActions.AddPlayers]:
|
|
102
|
-
[NotificationEventActions.RemovePlayers]:
|
|
103
|
-
[NotificationEventActions.ConfirmAssistance]:
|
|
104
|
-
[NotificationEventActions.DeclineAssistance]:
|
|
105
|
-
[NotificationEventActions.ConfirmAssistanceByAdmin]:
|
|
106
|
-
[NotificationEventActions.DeclineAssistanceByAdmin]:
|
|
107
|
-
[NotificationEventActions.ConfirmInterest]:
|
|
108
|
-
[NotificationEventActions.LoseInterest]:
|
|
109
|
-
[NotificationEventActions.SelectionSelected]:
|
|
110
|
-
[NotificationEventActions.SelectionDeselected]:
|
|
111
|
-
[NotificationEventActions.Reminder]:
|
|
112
|
-
[NotificationEventActions.ReminderDatetimeToConfirmed]:
|
|
113
|
-
[NotificationEventActions.ReminderDeadlineSoonToPending]:
|
|
114
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]:
|
|
115
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]:
|
|
116
|
-
[NotificationEventActions.ReminderRollcall]:
|
|
87
|
+
export const notificationSinglePractice = {
|
|
88
|
+
[NotificationEventActions.Cancel]: NotificationActions.PracticeCancel,
|
|
89
|
+
[NotificationEventActions.Create]: NotificationActions.PracticeCreate,
|
|
90
|
+
[NotificationEventActions.EditAttendance]: NotificationActions.PracticeEditAttendance,
|
|
91
|
+
[NotificationEventActions.EditComments]: NotificationActions.PracticeEditComments,
|
|
92
|
+
[NotificationEventActions.EditDatetime]: NotificationActions.PracticeEditDatetime,
|
|
93
|
+
[NotificationEventActions.EditLocality]: NotificationActions.PracticeEditLocality,
|
|
94
|
+
[NotificationEventActions.EditRepertory]: NotificationActions.PracticeEditRepertory,
|
|
95
|
+
[NotificationEventActions.EditTitle]: NotificationActions.PracticeEditTitle,
|
|
96
|
+
[NotificationEventActions.EditStage]: NotificationActions.PracticeEditStage,
|
|
97
|
+
[NotificationEventActions.EditResponseDeadline]: NotificationActions.PracticeEditResponseDeadline,
|
|
98
|
+
[NotificationEventActions.AddPlayers]: NotificationActions.PracticePlayersAdd,
|
|
99
|
+
[NotificationEventActions.RemovePlayers]: NotificationActions.PracticePlayersRemove,
|
|
100
|
+
[NotificationEventActions.ConfirmAssistance]: NotificationActions.PracticeAssistanceConfirm,
|
|
101
|
+
[NotificationEventActions.DeclineAssistance]: NotificationActions.PracticeAssistanceDecline,
|
|
102
|
+
[NotificationEventActions.ConfirmAssistanceByAdmin]: NotificationActions.PracticeAssistanceConfirmByAdmin,
|
|
103
|
+
[NotificationEventActions.DeclineAssistanceByAdmin]: NotificationActions.PracticeAssistanceDeclineByAdmin,
|
|
104
|
+
[NotificationEventActions.ConfirmInterest]: NotificationActions.PracticeInterestConfirm,
|
|
105
|
+
[NotificationEventActions.LoseInterest]: NotificationActions.PracticeInterestLose,
|
|
106
|
+
[NotificationEventActions.SelectionSelected]: NotificationActions.PracticeSelectionSelect,
|
|
107
|
+
[NotificationEventActions.SelectionDeselected]: NotificationActions.PracticeSelectionDeselect,
|
|
108
|
+
[NotificationEventActions.Reminder]: NotificationActions.PracticeReminder,
|
|
109
|
+
[NotificationEventActions.ReminderDatetimeToConfirmed]: NotificationActions.PracticeReminderDatetimeToConfirmed,
|
|
110
|
+
[NotificationEventActions.ReminderDeadlineSoonToPending]: NotificationActions.PracticeReminderDeadlineSoonToPending,
|
|
111
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: NotificationActions.PracticeReminderDeadlineEndedInSelectionModeOpen,
|
|
112
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: NotificationActions.PracticeReminderDeadlineEndedInSelectionModeClosedOrNotActive,
|
|
113
|
+
[NotificationEventActions.ReminderRollcall]: NotificationActions.PracticeRollCallReminder,
|
|
117
114
|
};
|
|
118
|
-
|
|
119
|
-
[NotificationEventActions.Cancel]:
|
|
120
|
-
[NotificationEventActions.Create]:
|
|
121
|
-
[NotificationEventActions.EditAttendance]:
|
|
122
|
-
[NotificationEventActions.EditComments]:
|
|
123
|
-
[NotificationEventActions.EditDatetime]:
|
|
124
|
-
[NotificationEventActions.EditLocality]:
|
|
125
|
-
[NotificationEventActions.EditRepertory]:
|
|
126
|
-
[NotificationEventActions.EditTitle]:
|
|
127
|
-
[NotificationEventActions.EditStage]:
|
|
128
|
-
[NotificationEventActions.EditResponseDeadline]:
|
|
129
|
-
[NotificationEventActions.AddPlayers]:
|
|
130
|
-
[NotificationEventActions.RemovePlayers]:
|
|
131
|
-
[NotificationEventActions.ConfirmAssistance]:
|
|
132
|
-
[NotificationEventActions.DeclineAssistance]:
|
|
133
|
-
[NotificationEventActions.ConfirmAssistanceByAdmin]:
|
|
134
|
-
[NotificationEventActions.DeclineAssistanceByAdmin]:
|
|
135
|
-
[NotificationEventActions.ConfirmInterest]:
|
|
136
|
-
[NotificationEventActions.LoseInterest]:
|
|
137
|
-
[NotificationEventActions.SelectionSelected]:
|
|
138
|
-
[NotificationEventActions.SelectionDeselected]:
|
|
139
|
-
[NotificationEventActions.Reminder]:
|
|
140
|
-
[NotificationEventActions.ReminderDatetimeToConfirmed]:
|
|
141
|
-
[NotificationEventActions.ReminderDeadlineSoonToPending]:
|
|
142
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]:
|
|
143
|
-
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]:
|
|
144
|
-
[NotificationEventActions.ReminderRollcall]:
|
|
115
|
+
export const notificationMultiplePractice = {
|
|
116
|
+
[NotificationEventActions.Cancel]: NotificationActions.PracticesCancel,
|
|
117
|
+
[NotificationEventActions.Create]: NotificationActions.PracticesCreate,
|
|
118
|
+
[NotificationEventActions.EditAttendance]: NotificationActions.PracticesEditAttendance,
|
|
119
|
+
[NotificationEventActions.EditComments]: NotificationActions.PracticesEditComments,
|
|
120
|
+
[NotificationEventActions.EditDatetime]: NotificationActions.PracticesEditDatetime,
|
|
121
|
+
[NotificationEventActions.EditLocality]: NotificationActions.PracticesEditLocality,
|
|
122
|
+
[NotificationEventActions.EditRepertory]: NotificationActions.PracticesEditRepertory,
|
|
123
|
+
[NotificationEventActions.EditTitle]: NotificationActions.PracticesEditTitle,
|
|
124
|
+
[NotificationEventActions.EditStage]: NotificationActions.PracticesEditStage,
|
|
125
|
+
[NotificationEventActions.EditResponseDeadline]: NotificationActions.PracticesEditResponseDeadline,
|
|
126
|
+
[NotificationEventActions.AddPlayers]: NotificationActions.PracticesPlayersAdd,
|
|
127
|
+
[NotificationEventActions.RemovePlayers]: NotificationActions.PracticesPlayersRemove,
|
|
128
|
+
[NotificationEventActions.ConfirmAssistance]: NotificationActions.PracticeAssistanceConfirm,
|
|
129
|
+
[NotificationEventActions.DeclineAssistance]: NotificationActions.PracticeAssistanceDecline,
|
|
130
|
+
[NotificationEventActions.ConfirmAssistanceByAdmin]: NotificationActions.PracticeAssistanceConfirmByAdmin,
|
|
131
|
+
[NotificationEventActions.DeclineAssistanceByAdmin]: NotificationActions.PracticeAssistanceDeclineByAdmin,
|
|
132
|
+
[NotificationEventActions.ConfirmInterest]: NotificationActions.PracticeInterestConfirm,
|
|
133
|
+
[NotificationEventActions.LoseInterest]: NotificationActions.PracticeInterestLose,
|
|
134
|
+
[NotificationEventActions.SelectionSelected]: NotificationActions.PracticeSelectionSelect,
|
|
135
|
+
[NotificationEventActions.SelectionDeselected]: NotificationActions.PracticeSelectionDeselect,
|
|
136
|
+
[NotificationEventActions.Reminder]: NotificationActions.PracticeReminder,
|
|
137
|
+
[NotificationEventActions.ReminderDatetimeToConfirmed]: NotificationActions.PracticeReminderDatetimeToConfirmed,
|
|
138
|
+
[NotificationEventActions.ReminderDeadlineSoonToPending]: NotificationActions.PracticeReminderDeadlineSoonToPending,
|
|
139
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: NotificationActions.PracticeReminderDeadlineEndedInSelectionModeOpen,
|
|
140
|
+
[NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: NotificationActions.PracticeReminderDeadlineEndedInSelectionModeClosedOrNotActive,
|
|
141
|
+
[NotificationEventActions.ReminderRollcall]: NotificationActions.PracticeRollCallReminder,
|
|
145
142
|
};
|
|
146
|
-
|
|
147
|
-
[
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
export const userNotificationSettings = {
|
|
144
|
+
[UserNotificationSettings.AttendanceConfirmed]: [
|
|
145
|
+
NotificationActions.PerformanceAssistanceConfirm,
|
|
146
|
+
NotificationActions.PracticeAssistanceConfirm,
|
|
150
147
|
],
|
|
151
|
-
[
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
[UserNotificationSettings.AttendanceDeclined]: [
|
|
149
|
+
NotificationActions.PerformanceAssistanceDecline,
|
|
150
|
+
NotificationActions.PracticeAssistanceDecline,
|
|
154
151
|
],
|
|
155
|
-
[
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
[UserNotificationSettings.InterestConfirmed]: [
|
|
153
|
+
NotificationActions.PerformanceInterestConfirm,
|
|
154
|
+
NotificationActions.PracticeInterestConfirm,
|
|
158
155
|
],
|
|
159
|
-
[
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
[UserNotificationSettings.InterestLost]: [
|
|
157
|
+
NotificationActions.PerformanceInterestLose,
|
|
158
|
+
NotificationActions.PracticeInterestLose,
|
|
162
159
|
],
|
|
163
160
|
};
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.replaceKeysNotification = exports.replaceVarsBrackets = void 0;
|
|
7
|
-
const date_fns_1 = require("date-fns");
|
|
8
|
-
const date_fns_tz_1 = require("date-fns-tz");
|
|
9
|
-
const lodash_1 = require("lodash");
|
|
10
|
-
const lang_1 = require("../../lang");
|
|
11
|
-
const Instrument_1 = __importDefault(require("../../models/Instrument"));
|
|
1
|
+
import { format } from 'date-fns';
|
|
2
|
+
import { utcToZonedTime } from 'date-fns-tz';
|
|
3
|
+
import { get, mapValues } from 'lodash';
|
|
4
|
+
import { getDateLang } from '../../lang';
|
|
5
|
+
import Instrument from '../../models/Instrument';
|
|
12
6
|
var PlaceholderType;
|
|
13
7
|
(function (PlaceholderType) {
|
|
14
8
|
PlaceholderType["Instrument"] = "instrument";
|
|
15
9
|
PlaceholderType["Date"] = "date";
|
|
16
10
|
PlaceholderType["String"] = "string";
|
|
17
11
|
})(PlaceholderType || (PlaceholderType = {}));
|
|
18
|
-
const replaceVarsBrackets = (string, values) => {
|
|
12
|
+
export const replaceVarsBrackets = (string, values) => {
|
|
19
13
|
const matches = string.match(/[^[\]]+(?=])/g);
|
|
20
14
|
let replaceString = string;
|
|
21
15
|
if (matches && matches.length > 0) {
|
|
22
16
|
matches.forEach((match) => {
|
|
23
|
-
replaceString = replaceString.replace(`[${match}]`,
|
|
17
|
+
replaceString = replaceString.replace(`[${match}]`, get(values, match));
|
|
24
18
|
});
|
|
25
19
|
}
|
|
26
20
|
return replaceString;
|
|
27
21
|
};
|
|
28
|
-
exports.replaceVarsBrackets = replaceVarsBrackets;
|
|
29
22
|
const getTypeAndPathFromPlaceholder = (placeholder) => {
|
|
30
23
|
const placeholderWithoutBrackets = placeholder.slice(1, -1);
|
|
31
24
|
const [type, key, formatValue] = placeholderWithoutBrackets.split(':');
|
|
@@ -41,13 +34,13 @@ const getPropsPathsFromArrayPlaceholderInPath = (path) => {
|
|
|
41
34
|
const props = placeholder ? placeholder.slice(1, -1).replace(' ', '').split(',') : [];
|
|
42
35
|
return props.map((prop) => [...path, prop]);
|
|
43
36
|
};
|
|
44
|
-
const replaceKeysNotification = (text, values, lang) => {
|
|
37
|
+
export const replaceKeysNotification = (text, values, lang) => {
|
|
45
38
|
const placeholders = text.match(/(\{).+?(\})/g);
|
|
46
39
|
if (!placeholders || placeholders.length === 0) {
|
|
47
40
|
return text;
|
|
48
41
|
}
|
|
49
42
|
const { extra, ...entityObjects } = values;
|
|
50
|
-
const entityArrays =
|
|
43
|
+
const entityArrays = mapValues(entityObjects, (value) => value ? Object.values(value) : undefined);
|
|
51
44
|
const newValues = {
|
|
52
45
|
extra,
|
|
53
46
|
...entityArrays,
|
|
@@ -57,34 +50,33 @@ const replaceKeysNotification = (text, values, lang) => {
|
|
|
57
50
|
switch (type) {
|
|
58
51
|
case PlaceholderType.Instrument: {
|
|
59
52
|
const [instrumentIdPropPath, customInstrumentNamePropPath] = getPropsPathsFromArrayPlaceholderInPath(path);
|
|
60
|
-
const customInstrumentName =
|
|
53
|
+
const customInstrumentName = get(newValues, customInstrumentNamePropPath);
|
|
61
54
|
if (customInstrumentName) {
|
|
62
55
|
return text.replace(placeholder, customInstrumentName.toLowerCase());
|
|
63
56
|
}
|
|
64
|
-
const instrumentId =
|
|
65
|
-
const instrument = new
|
|
57
|
+
const instrumentId = get(newValues, instrumentIdPropPath);
|
|
58
|
+
const instrument = new Instrument(instrumentId, lang);
|
|
66
59
|
if (!instrument)
|
|
67
60
|
return text;
|
|
68
61
|
return text.replace(placeholder, instrument.name.toLowerCase());
|
|
69
62
|
}
|
|
70
63
|
case PlaceholderType.Date: {
|
|
71
64
|
const [datetimePropPath, timezonePropPath] = getPropsPathsFromArrayPlaceholderInPath(path);
|
|
72
|
-
const datetime =
|
|
65
|
+
const datetime = get(newValues, datetimePropPath);
|
|
73
66
|
if (!datetime)
|
|
74
67
|
return text.replace(placeholder, '');
|
|
75
|
-
const timezone =
|
|
76
|
-
const zonedDatetime =
|
|
77
|
-
const dateLang =
|
|
78
|
-
const dateFormat =
|
|
68
|
+
const timezone = get(newValues, timezonePropPath) || 'Europe/Madrid';
|
|
69
|
+
const zonedDatetime = utcToZonedTime(datetime.toDate(), timezone);
|
|
70
|
+
const dateLang = getDateLang(lang);
|
|
71
|
+
const dateFormat = format(zonedDatetime, get(dateLang.format, formatValue), {
|
|
79
72
|
locale: dateLang.locale,
|
|
80
73
|
});
|
|
81
74
|
return text.replace(placeholder, dateFormat);
|
|
82
75
|
}
|
|
83
76
|
case PlaceholderType.String:
|
|
84
|
-
return text.replace(placeholder,
|
|
77
|
+
return text.replace(placeholder, get(newValues, path));
|
|
85
78
|
default:
|
|
86
79
|
return text;
|
|
87
80
|
}
|
|
88
81
|
}, text);
|
|
89
82
|
};
|
|
90
|
-
exports.replaceKeysNotification = replaceKeysNotification;
|
package/helpers/objects.js
CHANGED
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const ts_extras_1 = require("./ts-extras");
|
|
6
|
-
const mapToArray = (obj) => {
|
|
7
|
-
return (0, ts_extras_1.objectEntries)(obj).map(([key, value]) => ({
|
|
1
|
+
import { omit } from 'lodash';
|
|
2
|
+
import { objectEntries, objectFromEntries } from './ts-extras';
|
|
3
|
+
export const mapToArray = (obj) => {
|
|
4
|
+
return objectEntries(obj).map(([key, value]) => ({
|
|
8
5
|
...value,
|
|
9
6
|
id: key,
|
|
10
7
|
}));
|
|
11
8
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return (0, ts_extras_1.objectEntries)(obj)
|
|
9
|
+
export const orderedMapToArray = (obj) => {
|
|
10
|
+
return objectEntries(obj)
|
|
15
11
|
.map(([key, value]) => ({
|
|
16
12
|
...value,
|
|
17
13
|
id: key,
|
|
18
14
|
}))
|
|
19
15
|
.sort((a, b) => a.order - b.order)
|
|
20
|
-
.map((obj) =>
|
|
16
|
+
.map((obj) => omit(obj, 'order'));
|
|
21
17
|
};
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const entries = (0, ts_extras_1.objectEntries)(obj);
|
|
18
|
+
export const map = (obj, fn) => {
|
|
19
|
+
const entries = objectEntries(obj);
|
|
25
20
|
const mappedEntries = entries.map(([key, value], index) => fn(key, value, index));
|
|
26
|
-
return
|
|
21
|
+
return objectFromEntries(mappedEntries);
|
|
27
22
|
};
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const entries = (0, ts_extras_1.objectEntries)(obj);
|
|
23
|
+
export const filter = (obj, fn) => {
|
|
24
|
+
const entries = objectEntries(obj);
|
|
31
25
|
const filteredEntries = entries.filter(([key, value], index) => fn(key, value, index));
|
|
32
|
-
return
|
|
26
|
+
return objectFromEntries(filteredEntries);
|
|
33
27
|
};
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const entries = (0, ts_extras_1.objectEntries)(obj);
|
|
28
|
+
export const forEach = (obj, fn) => {
|
|
29
|
+
const entries = objectEntries(obj);
|
|
37
30
|
return entries.forEach(([key, value], index) => fn(key, value, index));
|
|
38
31
|
};
|
|
39
|
-
exports.forEach = forEach;
|
package/helpers/payments.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
types_1.PaymentStatus.Error,
|
|
7
|
-
types_1.PaymentStatus.Chargeback,
|
|
8
|
-
types_1.PaymentStatus.Canceled,
|
|
1
|
+
import { PaymentStatus } from '../models/Payment/types';
|
|
2
|
+
export const paymentStatusErrors = [
|
|
3
|
+
PaymentStatus.Error,
|
|
4
|
+
PaymentStatus.Chargeback,
|
|
5
|
+
PaymentStatus.Canceled,
|
|
9
6
|
];
|
package/helpers/plans.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pricesPerPlan = exports.membersPerPlan = exports.PlanPeriod = exports.PlansGroup = void 0;
|
|
4
|
-
var PlansGroup;
|
|
1
|
+
export var PlansGroup;
|
|
5
2
|
(function (PlansGroup) {
|
|
6
3
|
PlansGroup["Piano"] = "piano";
|
|
7
4
|
PlansGroup["MezzoPiano"] = "mezzopiano";
|
|
@@ -9,13 +6,13 @@ var PlansGroup;
|
|
|
9
6
|
PlansGroup["Forte"] = "forte";
|
|
10
7
|
PlansGroup["Fortissimo"] = "fortissimo";
|
|
11
8
|
PlansGroup["Tutti"] = "tutti";
|
|
12
|
-
})(PlansGroup
|
|
13
|
-
var PlanPeriod;
|
|
9
|
+
})(PlansGroup || (PlansGroup = {}));
|
|
10
|
+
export var PlanPeriod;
|
|
14
11
|
(function (PlanPeriod) {
|
|
15
12
|
PlanPeriod["Yearly"] = "yearly";
|
|
16
13
|
PlanPeriod["Monthly"] = "monthly";
|
|
17
|
-
})(PlanPeriod
|
|
18
|
-
|
|
14
|
+
})(PlanPeriod || (PlanPeriod = {}));
|
|
15
|
+
export const membersPerPlan = {
|
|
19
16
|
[PlansGroup.Piano]: 20,
|
|
20
17
|
[PlansGroup.MezzoPiano]: 40,
|
|
21
18
|
[PlansGroup.MezzoForte]: 60,
|
|
@@ -23,7 +20,7 @@ exports.membersPerPlan = {
|
|
|
23
20
|
[PlansGroup.Fortissimo]: 100,
|
|
24
21
|
[PlansGroup.Tutti]: 1000,
|
|
25
22
|
};
|
|
26
|
-
|
|
23
|
+
export const pricesPerPlan = {
|
|
27
24
|
[PlanPeriod.Monthly]: {
|
|
28
25
|
[PlansGroup.Piano]: 0,
|
|
29
26
|
[PlansGroup.MezzoPiano]: 9.9,
|
package/helpers/rates.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStepRating = exports.rateSteps = void 0;
|
|
4
|
-
exports.rateSteps = [
|
|
1
|
+
export const rateSteps = [
|
|
5
2
|
{
|
|
6
3
|
id: 'love',
|
|
7
4
|
emoji: '😍',
|
|
@@ -27,5 +24,4 @@ exports.rateSteps = [
|
|
|
27
24
|
range: [1, 1.74],
|
|
28
25
|
},
|
|
29
26
|
];
|
|
30
|
-
const getStepRating = (rating) =>
|
|
31
|
-
exports.getStepRating = getStepRating;
|
|
27
|
+
export const getStepRating = (rating) => rateSteps.find((step) => rating >= step.range[0] && rating <= step.range[1]);
|
package/helpers/reasons.js
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[types_1.EventPlayerReason.Sick]: '🤒',
|
|
9
|
-
[types_1.EventPlayerReason.Vacation]: '🏖',
|
|
10
|
-
[types_1.EventPlayerReason.Other]: '✏️',
|
|
1
|
+
import { EventPlayerReason, EventPlayerStatus } from '../models/Evento/Player/types';
|
|
2
|
+
export const reasonEmojis = {
|
|
3
|
+
[EventPlayerReason.ArrivingLate]: '⏱',
|
|
4
|
+
[EventPlayerReason.LeavingEarly]: '🏃',
|
|
5
|
+
[EventPlayerReason.Sick]: '🤒',
|
|
6
|
+
[EventPlayerReason.Vacation]: '🏖',
|
|
7
|
+
[EventPlayerReason.Other]: '✏️',
|
|
11
8
|
};
|
|
12
9
|
const reasonsByType = {
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
[EventPlayerStatus.Confirmed]: [
|
|
11
|
+
EventPlayerReason.ArrivingLate,
|
|
12
|
+
EventPlayerReason.LeavingEarly,
|
|
13
|
+
EventPlayerReason.Other,
|
|
17
14
|
],
|
|
18
|
-
[
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
[EventPlayerStatus.Declined]: [
|
|
16
|
+
EventPlayerReason.Vacation,
|
|
17
|
+
EventPlayerReason.Sick,
|
|
18
|
+
EventPlayerReason.Other,
|
|
22
19
|
],
|
|
23
20
|
};
|
|
24
|
-
const getOptionsByType = (type) => {
|
|
21
|
+
export const getOptionsByType = (type) => {
|
|
25
22
|
const reasons = Object.values(reasonsByType[type] || {});
|
|
26
23
|
return reasons.map((id) => ({
|
|
27
24
|
id,
|
|
28
|
-
emoji:
|
|
25
|
+
emoji: reasonEmojis[id],
|
|
29
26
|
}));
|
|
30
27
|
};
|
|
31
|
-
exports.getOptionsByType = getOptionsByType;
|
package/helpers/slate.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.serializeSlateBlock = void 0;
|
|
7
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const serializeSlateBlock = (nodes) => {
|
|
1
|
+
import get from 'lodash/get';
|
|
2
|
+
export const serializeSlateBlock = (nodes) => {
|
|
9
3
|
return nodes
|
|
10
4
|
.map((node) => {
|
|
11
|
-
const children = (
|
|
5
|
+
const children = get(node, 'children');
|
|
12
6
|
if (children) {
|
|
13
|
-
return
|
|
7
|
+
return serializeSlateBlock(children);
|
|
14
8
|
}
|
|
15
|
-
const text = (
|
|
9
|
+
const text = get(node, 'text');
|
|
16
10
|
return text || '';
|
|
17
11
|
})
|
|
18
12
|
.join(' ');
|
|
19
13
|
};
|
|
20
|
-
exports.serializeSlateBlock = serializeSlateBlock;
|
package/helpers/styles.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.arrayIncludes = void 0;
|
|
4
1
|
/**
|
|
5
2
|
An alternative to `Array#includes()` that properly acts as a type guard.
|
|
6
3
|
|
|
@@ -21,7 +18,6 @@ if (arrayIncludes(values, valueToCheck)) {
|
|
|
21
18
|
@category Improved builtin
|
|
22
19
|
@category Type guard
|
|
23
20
|
*/
|
|
24
|
-
function arrayIncludes(array, item, fromIndex) {
|
|
21
|
+
export function arrayIncludes(array, item, fromIndex) {
|
|
25
22
|
return array.includes(item, fromIndex);
|
|
26
23
|
}
|
|
27
|
-
exports.arrayIncludes = arrayIncludes;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asMutable = void 0;
|
|
4
1
|
/**
|
|
5
2
|
Cast the given value to be [`Mutable`](https://github.com/sindresorhus/type-fest/blob/main/source/mutable.d.ts).
|
|
6
3
|
|
|
@@ -15,7 +12,6 @@ const mutableContext = asMutable((await import('x')).context);
|
|
|
15
12
|
|
|
16
13
|
@category General
|
|
17
14
|
*/
|
|
18
|
-
function asMutable(value) {
|
|
15
|
+
export function asMutable(value) {
|
|
19
16
|
return value; // eslint-disable-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-explicit-any
|
|
20
17
|
}
|
|
21
|
-
exports.asMutable = asMutable;
|