@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.
Files changed (214) hide show
  1. package/functions/auth.js +1 -2
  2. package/functions/communication.js +1 -2
  3. package/functions/communicationComment.js +1 -2
  4. package/functions/customer.js +1 -2
  5. package/functions/customerGroup.js +1 -2
  6. package/functions/event.js +2 -5
  7. package/functions/eventPlayer.js +2 -5
  8. package/functions/eventRepertory.js +1 -2
  9. package/functions/federation.js +1 -2
  10. package/functions/federationPartnership.js +1 -2
  11. package/functions/group.js +1 -2
  12. package/functions/groupPlayer.js +1 -2
  13. package/functions/groupRepertory.js +1 -2
  14. package/functions/index.js +2 -5
  15. package/functions/jwt.js +1 -2
  16. package/functions/misc.js +1 -2
  17. package/functions/notification.js +1 -2
  18. package/functions/partner.js +1 -2
  19. package/functions/partnership.js +1 -2
  20. package/functions/partnershipGroup.js +1 -2
  21. package/functions/partnershipPlan.js +1 -2
  22. package/functions/regions.js +124 -128
  23. package/functions/subscription.js +1 -2
  24. package/functions/user.js +1 -2
  25. package/helpers/appScenes.js +2 -5
  26. package/helpers/audios.js +5 -9
  27. package/helpers/auth.js +5 -9
  28. package/helpers/badges.js +10 -19
  29. package/helpers/collections.js +2 -5
  30. package/helpers/countries.js +1 -4
  31. package/helpers/dlinks.js +2 -5
  32. package/helpers/errors.js +2 -5
  33. package/helpers/fileSections/index.js +5 -8
  34. package/helpers/fileSections/orders.js +11 -16
  35. package/helpers/glissandooAdmin.js +2 -6
  36. package/helpers/instruments/index.js +3 -6
  37. package/helpers/instruments/lists.js +11 -19
  38. package/helpers/musicStyles/index.js +29 -36
  39. package/helpers/musicStyles/orders.js +174 -179
  40. package/helpers/notifications/index.js +119 -122
  41. package/helpers/notifications/placeholders.js +18 -26
  42. package/helpers/objects.js +15 -23
  43. package/helpers/payments.js +5 -8
  44. package/helpers/plans.js +6 -9
  45. package/helpers/rates.js +2 -6
  46. package/helpers/reasons.js +17 -21
  47. package/helpers/slate.js +5 -12
  48. package/helpers/styles.js +1 -4
  49. package/helpers/ts-extras/array-includes.js +1 -5
  50. package/helpers/ts-extras/as-mutable.js +1 -5
  51. package/helpers/ts-extras/assert-error.js +1 -5
  52. package/helpers/ts-extras/index.js +15 -33
  53. package/helpers/ts-extras/is-defined.js +1 -5
  54. package/helpers/ts-extras/is-empty.js +1 -5
  55. package/helpers/ts-extras/is-finite.js +1 -4
  56. package/helpers/ts-extras/is-infinite.js +1 -5
  57. package/helpers/ts-extras/is-integer.js +1 -4
  58. package/helpers/ts-extras/is-present.js +1 -5
  59. package/helpers/ts-extras/is-safe-integer.js +1 -4
  60. package/helpers/ts-extras/object-entries.js +1 -4
  61. package/helpers/ts-extras/object-from-entries.js +1 -4
  62. package/helpers/ts-extras/object-has-own.js +1 -5
  63. package/helpers/ts-extras/object-keys.js +1 -4
  64. package/helpers/ts-extras/set-has.js +1 -5
  65. package/helpers/types.js +2 -5
  66. package/helpers/utils.js +8 -16
  67. package/lang/index.js +42 -51
  68. package/models/Communication/Comment/index.d.ts +4 -4
  69. package/models/Communication/Comment/index.js +5 -12
  70. package/models/Communication/Comment/types.js +1 -2
  71. package/models/Communication/index.d.ts +3 -2
  72. package/models/Communication/index.js +15 -21
  73. package/models/Communication/types.js +4 -7
  74. package/models/Counters/Group/Analytics/index.d.ts +2 -3
  75. package/models/Counters/Group/Analytics/index.js +5 -12
  76. package/models/Counters/Group/Analytics/types.js +2 -5
  77. package/models/Counters/Group/index.d.ts +2 -3
  78. package/models/Counters/Group/index.js +2 -8
  79. package/models/Counters/Group/types.js +1 -2
  80. package/models/Counters/event.d.ts +2 -2
  81. package/models/Counters/event.js +2 -8
  82. package/models/Counters/index.d.ts +2 -3
  83. package/models/Counters/index.js +2 -8
  84. package/models/Counters/types.js +1 -2
  85. package/models/Customer/Group/index.d.ts +2 -2
  86. package/models/Customer/Group/index.js +7 -14
  87. package/models/Customer/Group/types.js +1 -2
  88. package/models/Customer/basic.d.ts +2 -3
  89. package/models/Customer/basic.js +4 -10
  90. package/models/Customer/index.d.ts +2 -2
  91. package/models/Customer/index.js +5 -11
  92. package/models/Customer/types.js +2 -5
  93. package/models/Evento/Player/basic.js +10 -11
  94. package/models/Evento/Player/index.d.ts +4 -4
  95. package/models/Evento/Player/index.js +12 -18
  96. package/models/Evento/Player/types.js +4 -7
  97. package/models/Evento/Repertory/index.d.ts +3 -3
  98. package/models/Evento/Repertory/index.js +3 -10
  99. package/models/Evento/Repertory/types.js +1 -2
  100. package/models/Evento/basic.d.ts +2 -2
  101. package/models/Evento/basic.js +12 -18
  102. package/models/Evento/index.d.ts +3 -2
  103. package/models/Evento/index.js +32 -38
  104. package/models/Evento/promoter.d.ts +3 -2
  105. package/models/Evento/promoter.js +2 -8
  106. package/models/Evento/tiny.js +9 -9
  107. package/models/Evento/types.js +14 -17
  108. package/models/Federation/Partnership/index.d.ts +2 -2
  109. package/models/Federation/Partnership/index.js +3 -10
  110. package/models/Federation/Partnership/types.js +1 -2
  111. package/models/Federation/index.d.ts +2 -3
  112. package/models/Federation/index.js +7 -13
  113. package/models/Federation/types.js +1 -2
  114. package/models/Group/Analytics/index.d.ts +3 -4
  115. package/models/Group/Analytics/index.js +5 -12
  116. package/models/Group/Analytics/types.js +2 -5
  117. package/models/Group/Event/index.d.ts +2 -2
  118. package/models/Group/Event/index.js +6 -12
  119. package/models/Group/Event/types.js +1 -2
  120. package/models/Group/Player/Event/index.d.ts +2 -2
  121. package/models/Group/Player/Event/index.js +11 -18
  122. package/models/Group/Player/Event/types.js +1 -2
  123. package/models/Group/Player/Log/index.d.ts +2 -3
  124. package/models/Group/Player/Log/index.js +2 -8
  125. package/models/Group/Player/Log/types.js +1 -2
  126. package/models/Group/Player/index.d.ts +5 -5
  127. package/models/Group/Player/index.js +18 -24
  128. package/models/Group/Player/types.js +2 -5
  129. package/models/Group/Repertory/File/Section/index.js +12 -16
  130. package/models/Group/Repertory/File/Section/types.js +2 -5
  131. package/models/Group/Repertory/File/index.js +11 -12
  132. package/models/Group/Repertory/File/types.js +1 -2
  133. package/models/Group/Repertory/FilePath/index.js +12 -15
  134. package/models/Group/Repertory/index.d.ts +8 -8
  135. package/models/Group/Repertory/index.js +25 -32
  136. package/models/Group/Repertory/types.js +2 -5
  137. package/models/Group/StageTemplate/index.d.ts +2 -3
  138. package/models/Group/StageTemplate/index.js +2 -8
  139. package/models/Group/StageTemplate/types.js +1 -2
  140. package/models/Group/basic.d.ts +2 -2
  141. package/models/Group/basic.js +5 -11
  142. package/models/Group/index.d.ts +3 -2
  143. package/models/Group/index.js +41 -47
  144. package/models/Group/types.js +14 -17
  145. package/models/Instrument/group.js +6 -11
  146. package/models/Instrument/index.js +8 -9
  147. package/models/Metrics/index.d.ts +4 -5
  148. package/models/Metrics/index.js +10 -16
  149. package/models/Metrics/types.js +1 -2
  150. package/models/Model/index.d.ts +15 -3
  151. package/models/Model/index.js +8 -7
  152. package/models/Model/lang.d.ts +2 -3
  153. package/models/Model/lang.js +5 -10
  154. package/models/MusicStyle/index.js +9 -10
  155. package/models/Notification/index.d.ts +4 -5
  156. package/models/Notification/index.js +2 -8
  157. package/models/Notification/types.js +2 -5
  158. package/models/Partner/basic.d.ts +2 -2
  159. package/models/Partner/basic.js +6 -12
  160. package/models/Partner/index.d.ts +2 -2
  161. package/models/Partner/index.js +4 -10
  162. package/models/Partner/tiny.d.ts +2 -3
  163. package/models/Partner/tiny.js +2 -8
  164. package/models/Partner/types.js +2 -5
  165. package/models/Partnership/Group/index.d.ts +2 -2
  166. package/models/Partnership/Group/index.js +5 -12
  167. package/models/Partnership/Group/types.js +1 -2
  168. package/models/Partnership/Partner/Subscription/index.d.ts +2 -2
  169. package/models/Partnership/Partner/Subscription/index.js +8 -15
  170. package/models/Partnership/Partner/Subscription/types.js +2 -5
  171. package/models/Partnership/Partner/index.d.ts +2 -2
  172. package/models/Partnership/Partner/index.js +3 -10
  173. package/models/Partnership/Partner/types.js +1 -2
  174. package/models/Partnership/Payment/index.d.ts +2 -2
  175. package/models/Partnership/Payment/index.js +2 -8
  176. package/models/Partnership/Payment/types.js +1 -2
  177. package/models/Partnership/Plan/basic.d.ts +2 -3
  178. package/models/Partnership/Plan/basic.js +12 -18
  179. package/models/Partnership/Plan/index.d.ts +2 -2
  180. package/models/Partnership/Plan/index.js +3 -10
  181. package/models/Partnership/Plan/types.js +2 -5
  182. package/models/Partnership/basic.d.ts +2 -3
  183. package/models/Partnership/basic.js +4 -10
  184. package/models/Partnership/index.d.ts +2 -2
  185. package/models/Partnership/index.js +5 -11
  186. package/models/Partnership/types.js +4 -7
  187. package/models/Payment/basic.d.ts +3 -4
  188. package/models/Payment/basic.js +7 -13
  189. package/models/Payment/index.d.ts +2 -2
  190. package/models/Payment/index.js +2 -8
  191. package/models/Payment/types.js +4 -7
  192. package/models/Player/basic.d.ts +2 -2
  193. package/models/Player/basic.js +4 -10
  194. package/models/Player/types.js +1 -2
  195. package/models/Repertory/basic.d.ts +2 -3
  196. package/models/Repertory/basic.js +2 -8
  197. package/models/Repertory/types.js +1 -2
  198. package/models/User/Group/index.d.ts +2 -2
  199. package/models/User/Group/index.js +8 -15
  200. package/models/User/Group/types.js +1 -2
  201. package/models/User/Notification/index.d.ts +6 -6
  202. package/models/User/Notification/index.js +18 -20
  203. package/models/User/Notification/types.js +1 -2
  204. package/models/User/basic.d.ts +2 -2
  205. package/models/User/basic.js +4 -10
  206. package/models/User/index.d.ts +2 -2
  207. package/models/User/index.js +18 -24
  208. package/models/User/types.js +12 -15
  209. package/models/WebhookEvent/index.d.ts +2 -3
  210. package/models/WebhookEvent/index.js +2 -8
  211. package/models/WebhookEvent/types.js +2 -5
  212. package/package.json +1 -1
  213. package/types/firestore.js +2 -5
  214. package/types/messagebirdChatWidget.js +1 -2
@@ -1,29 +1,26 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userNotificationSettings = exports.notificationMultiplePractice = exports.notificationSinglePractice = exports.notificationPerformance = exports.editScopeToAction = exports.NotificationEventActions = exports.notificationActionsBadges = void 0;
4
- const event_1 = require("../../functions/event");
5
- const types_1 = require("../../models/Notification/types");
6
- const types_2 = require("../../models/User/types");
7
- const badges_1 = require("../badges");
8
- exports.notificationActionsBadges = {
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
- [badges_1.BadgesTypes.AccPractices]: {
14
- firstLevel: types_1.NotificationActions.BadgeAccPracticesFirstLevel,
15
- upLevel: types_1.NotificationActions.BadgeAccPracticesUpLevel,
10
+ [BadgesTypes.AccPractices]: {
11
+ firstLevel: NotificationActions.BadgeAccPracticesFirstLevel,
12
+ upLevel: NotificationActions.BadgeAccPracticesUpLevel,
16
13
  },
17
- [badges_1.BadgesTypes.AnswerEvents]: {
18
- firstLevel: types_1.NotificationActions.BadgeAnswerEventsFirstLevel,
19
- upLevel: types_1.NotificationActions.BadgeAnswerEventsUpLevel,
14
+ [BadgesTypes.AnswerEvents]: {
15
+ firstLevel: NotificationActions.BadgeAnswerEventsFirstLevel,
16
+ upLevel: NotificationActions.BadgeAnswerEventsUpLevel,
20
17
  },
21
- [badges_1.BadgesTypes.StrikePractices]: {
22
- firstLevel: types_1.NotificationActions.BadgeStrikePracticesFirstLevel,
23
- upLevel: types_1.NotificationActions.BadgeStrikePracticesUpLevel,
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 = exports.NotificationEventActions || (exports.NotificationEventActions = {}));
55
- exports.editScopeToAction = {
56
- [event_1.EventoFbFunctionsTypes.EditScope.Title]: NotificationEventActions.EditTitle,
57
- [event_1.EventoFbFunctionsTypes.EditScope.Locality]: NotificationEventActions.EditLocality,
58
- [event_1.EventoFbFunctionsTypes.EditScope.Comments]: NotificationEventActions.EditComments,
59
- [event_1.EventoFbFunctionsTypes.EditScope.Attendance]: NotificationEventActions.EditAttendance,
60
- [event_1.EventoFbFunctionsTypes.EditScope.Stage]: NotificationEventActions.EditStage,
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
- exports.notificationPerformance = {
63
- [NotificationEventActions.Cancel]: types_1.NotificationActions.PerformanceCancel,
64
- [NotificationEventActions.Create]: types_1.NotificationActions.PerformanceCreate,
65
- [NotificationEventActions.EditAttendance]: types_1.NotificationActions.PerformanceEditAttendance,
66
- [NotificationEventActions.EditComments]: types_1.NotificationActions.PerformanceEditComments,
67
- [NotificationEventActions.EditDatetime]: types_1.NotificationActions.PerformanceEditDatetime,
68
- [NotificationEventActions.EditLocality]: types_1.NotificationActions.PerformanceEditLocality,
69
- [NotificationEventActions.EditRepertory]: types_1.NotificationActions.PerformanceEditRepertory,
70
- [NotificationEventActions.EditTitle]: types_1.NotificationActions.PerformanceEditTitle,
71
- [NotificationEventActions.EditStage]: types_1.NotificationActions.PerformanceEditStage,
72
- [NotificationEventActions.EditResponseDeadline]: types_1.NotificationActions.PerformanceEditResponseDeadline,
73
- [NotificationEventActions.AddPlayers]: types_1.NotificationActions.PerformancePlayersAdd,
74
- [NotificationEventActions.RemovePlayers]: types_1.NotificationActions.PerformancePlayersRemove,
75
- [NotificationEventActions.ConfirmAssistance]: types_1.NotificationActions.PerformanceAssistanceConfirm,
76
- [NotificationEventActions.DeclineAssistance]: types_1.NotificationActions.PerformanceAssistanceDecline,
77
- [NotificationEventActions.ConfirmAssistanceByAdmin]: types_1.NotificationActions.PerformanceAssistanceConfirmByAdmin,
78
- [NotificationEventActions.DeclineAssistanceByAdmin]: types_1.NotificationActions.PerformanceAssistanceDeclineByAdmin,
79
- [NotificationEventActions.ConfirmInterest]: types_1.NotificationActions.PerformanceInterestConfirm,
80
- [NotificationEventActions.LoseInterest]: types_1.NotificationActions.PerformanceInterestLose,
81
- [NotificationEventActions.SelectionSelected]: types_1.NotificationActions.PerformanceSelectionSelect,
82
- [NotificationEventActions.SelectionDeselected]: types_1.NotificationActions.PerformanceSelectionDeselect,
83
- [NotificationEventActions.Reminder]: types_1.NotificationActions.PerformanceReminder,
84
- [NotificationEventActions.ReminderDatetimeToConfirmed]: types_1.NotificationActions.PerformanceReminderDatetimeToConfirmed,
85
- [NotificationEventActions.ReminderDeadlineSoonToPending]: types_1.NotificationActions.PerformanceReminderDeadlineSoonToPending,
86
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: types_1.NotificationActions.PerformanceReminderDeadlineEndedInSelectionModeOpen,
87
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: types_1.NotificationActions.PerformanceReminderDeadlineEndedInSelectionModeClosedOrNotActive,
88
- [NotificationEventActions.ReminderRollcall]: types_1.NotificationActions.PerformanceRollCallReminder,
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
- exports.notificationSinglePractice = {
91
- [NotificationEventActions.Cancel]: types_1.NotificationActions.PracticeCancel,
92
- [NotificationEventActions.Create]: types_1.NotificationActions.PracticeCreate,
93
- [NotificationEventActions.EditAttendance]: types_1.NotificationActions.PracticeEditAttendance,
94
- [NotificationEventActions.EditComments]: types_1.NotificationActions.PracticeEditComments,
95
- [NotificationEventActions.EditDatetime]: types_1.NotificationActions.PracticeEditDatetime,
96
- [NotificationEventActions.EditLocality]: types_1.NotificationActions.PracticeEditLocality,
97
- [NotificationEventActions.EditRepertory]: types_1.NotificationActions.PracticeEditRepertory,
98
- [NotificationEventActions.EditTitle]: types_1.NotificationActions.PracticeEditTitle,
99
- [NotificationEventActions.EditStage]: types_1.NotificationActions.PracticeEditStage,
100
- [NotificationEventActions.EditResponseDeadline]: types_1.NotificationActions.PracticeEditResponseDeadline,
101
- [NotificationEventActions.AddPlayers]: types_1.NotificationActions.PracticePlayersAdd,
102
- [NotificationEventActions.RemovePlayers]: types_1.NotificationActions.PracticePlayersRemove,
103
- [NotificationEventActions.ConfirmAssistance]: types_1.NotificationActions.PracticeAssistanceConfirm,
104
- [NotificationEventActions.DeclineAssistance]: types_1.NotificationActions.PracticeAssistanceDecline,
105
- [NotificationEventActions.ConfirmAssistanceByAdmin]: types_1.NotificationActions.PracticeAssistanceConfirmByAdmin,
106
- [NotificationEventActions.DeclineAssistanceByAdmin]: types_1.NotificationActions.PracticeAssistanceDeclineByAdmin,
107
- [NotificationEventActions.ConfirmInterest]: types_1.NotificationActions.PracticeInterestConfirm,
108
- [NotificationEventActions.LoseInterest]: types_1.NotificationActions.PracticeInterestLose,
109
- [NotificationEventActions.SelectionSelected]: types_1.NotificationActions.PracticeSelectionSelect,
110
- [NotificationEventActions.SelectionDeselected]: types_1.NotificationActions.PracticeSelectionDeselect,
111
- [NotificationEventActions.Reminder]: types_1.NotificationActions.PracticeReminder,
112
- [NotificationEventActions.ReminderDatetimeToConfirmed]: types_1.NotificationActions.PracticeReminderDatetimeToConfirmed,
113
- [NotificationEventActions.ReminderDeadlineSoonToPending]: types_1.NotificationActions.PracticeReminderDeadlineSoonToPending,
114
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: types_1.NotificationActions.PracticeReminderDeadlineEndedInSelectionModeOpen,
115
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: types_1.NotificationActions.PracticeReminderDeadlineEndedInSelectionModeClosedOrNotActive,
116
- [NotificationEventActions.ReminderRollcall]: types_1.NotificationActions.PracticeRollCallReminder,
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
- exports.notificationMultiplePractice = {
119
- [NotificationEventActions.Cancel]: types_1.NotificationActions.PracticesCancel,
120
- [NotificationEventActions.Create]: types_1.NotificationActions.PracticesCreate,
121
- [NotificationEventActions.EditAttendance]: types_1.NotificationActions.PracticesEditAttendance,
122
- [NotificationEventActions.EditComments]: types_1.NotificationActions.PracticesEditComments,
123
- [NotificationEventActions.EditDatetime]: types_1.NotificationActions.PracticesEditDatetime,
124
- [NotificationEventActions.EditLocality]: types_1.NotificationActions.PracticesEditLocality,
125
- [NotificationEventActions.EditRepertory]: types_1.NotificationActions.PracticesEditRepertory,
126
- [NotificationEventActions.EditTitle]: types_1.NotificationActions.PracticesEditTitle,
127
- [NotificationEventActions.EditStage]: types_1.NotificationActions.PracticesEditStage,
128
- [NotificationEventActions.EditResponseDeadline]: types_1.NotificationActions.PracticesEditResponseDeadline,
129
- [NotificationEventActions.AddPlayers]: types_1.NotificationActions.PracticesPlayersAdd,
130
- [NotificationEventActions.RemovePlayers]: types_1.NotificationActions.PracticesPlayersRemove,
131
- [NotificationEventActions.ConfirmAssistance]: types_1.NotificationActions.PracticeAssistanceConfirm,
132
- [NotificationEventActions.DeclineAssistance]: types_1.NotificationActions.PracticeAssistanceDecline,
133
- [NotificationEventActions.ConfirmAssistanceByAdmin]: types_1.NotificationActions.PracticeAssistanceConfirmByAdmin,
134
- [NotificationEventActions.DeclineAssistanceByAdmin]: types_1.NotificationActions.PracticeAssistanceDeclineByAdmin,
135
- [NotificationEventActions.ConfirmInterest]: types_1.NotificationActions.PracticeInterestConfirm,
136
- [NotificationEventActions.LoseInterest]: types_1.NotificationActions.PracticeInterestLose,
137
- [NotificationEventActions.SelectionSelected]: types_1.NotificationActions.PracticeSelectionSelect,
138
- [NotificationEventActions.SelectionDeselected]: types_1.NotificationActions.PracticeSelectionDeselect,
139
- [NotificationEventActions.Reminder]: types_1.NotificationActions.PracticeReminder,
140
- [NotificationEventActions.ReminderDatetimeToConfirmed]: types_1.NotificationActions.PracticeReminderDatetimeToConfirmed,
141
- [NotificationEventActions.ReminderDeadlineSoonToPending]: types_1.NotificationActions.PracticeReminderDeadlineSoonToPending,
142
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeOpen]: types_1.NotificationActions.PracticeReminderDeadlineEndedInSelectionModeOpen,
143
- [NotificationEventActions.ReminderDeadlineEndedInSelectionModeClosedOrNotActive]: types_1.NotificationActions.PracticeReminderDeadlineEndedInSelectionModeClosedOrNotActive,
144
- [NotificationEventActions.ReminderRollcall]: types_1.NotificationActions.PracticeRollCallReminder,
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
- exports.userNotificationSettings = {
147
- [types_2.UserNotificationSettings.AttendanceConfirmed]: [
148
- types_1.NotificationActions.PerformanceAssistanceConfirm,
149
- types_1.NotificationActions.PracticeAssistanceConfirm,
143
+ export const userNotificationSettings = {
144
+ [UserNotificationSettings.AttendanceConfirmed]: [
145
+ NotificationActions.PerformanceAssistanceConfirm,
146
+ NotificationActions.PracticeAssistanceConfirm,
150
147
  ],
151
- [types_2.UserNotificationSettings.AttendanceDeclined]: [
152
- types_1.NotificationActions.PerformanceAssistanceDecline,
153
- types_1.NotificationActions.PracticeAssistanceDecline,
148
+ [UserNotificationSettings.AttendanceDeclined]: [
149
+ NotificationActions.PerformanceAssistanceDecline,
150
+ NotificationActions.PracticeAssistanceDecline,
154
151
  ],
155
- [types_2.UserNotificationSettings.InterestConfirmed]: [
156
- types_1.NotificationActions.PerformanceInterestConfirm,
157
- types_1.NotificationActions.PracticeInterestConfirm,
152
+ [UserNotificationSettings.InterestConfirmed]: [
153
+ NotificationActions.PerformanceInterestConfirm,
154
+ NotificationActions.PracticeInterestConfirm,
158
155
  ],
159
- [types_2.UserNotificationSettings.InterestLost]: [
160
- types_1.NotificationActions.PerformanceInterestLose,
161
- types_1.NotificationActions.PracticeInterestLose,
156
+ [UserNotificationSettings.InterestLost]: [
157
+ NotificationActions.PerformanceInterestLose,
158
+ NotificationActions.PracticeInterestLose,
162
159
  ],
163
160
  };
@@ -1,31 +1,24 @@
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.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}]`, (0, lodash_1.get)(values, 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 = (0, lodash_1.mapValues)(entityObjects, (value) => value ? Object.values(value) : undefined);
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 = (0, lodash_1.get)(newValues, customInstrumentNamePropPath);
53
+ const customInstrumentName = get(newValues, customInstrumentNamePropPath);
61
54
  if (customInstrumentName) {
62
55
  return text.replace(placeholder, customInstrumentName.toLowerCase());
63
56
  }
64
- const instrumentId = (0, lodash_1.get)(newValues, instrumentIdPropPath);
65
- const instrument = new Instrument_1.default(instrumentId, lang);
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 = (0, lodash_1.get)(newValues, datetimePropPath);
65
+ const datetime = get(newValues, datetimePropPath);
73
66
  if (!datetime)
74
67
  return text.replace(placeholder, '');
75
- const timezone = (0, lodash_1.get)(newValues, timezonePropPath) || 'Europe/Madrid';
76
- const zonedDatetime = (0, date_fns_tz_1.utcToZonedTime)(datetime.toDate(), timezone);
77
- const dateLang = (0, lang_1.getDateLang)(lang);
78
- const dateFormat = (0, date_fns_1.format)(zonedDatetime, (0, lodash_1.get)(dateLang.format, formatValue), {
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, (0, lodash_1.get)(newValues, path));
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;
@@ -1,39 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.forEach = exports.filter = exports.map = exports.orderedMapToArray = exports.mapToArray = void 0;
4
- const lodash_1 = require("lodash");
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
- exports.mapToArray = mapToArray;
13
- const orderedMapToArray = (obj) => {
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) => (0, lodash_1.omit)(obj, 'order'));
16
+ .map((obj) => omit(obj, 'order'));
21
17
  };
22
- exports.orderedMapToArray = orderedMapToArray;
23
- const map = (obj, fn) => {
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 (0, ts_extras_1.objectFromEntries)(mappedEntries);
21
+ return objectFromEntries(mappedEntries);
27
22
  };
28
- exports.map = map;
29
- const filter = (obj, fn) => {
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 (0, ts_extras_1.objectFromEntries)(filteredEntries);
26
+ return objectFromEntries(filteredEntries);
33
27
  };
34
- exports.filter = filter;
35
- const forEach = (obj, fn) => {
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;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paymentStatusErrors = void 0;
4
- const types_1 = require("../models/Payment/types");
5
- exports.paymentStatusErrors = [
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
- "use strict";
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 = exports.PlansGroup || (exports.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 = exports.PlanPeriod || (exports.PlanPeriod = {}));
18
- exports.membersPerPlan = {
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
- exports.pricesPerPlan = {
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
- "use strict";
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) => exports.rateSteps.find((step) => rating >= step.range[0] && rating <= step.range[1]);
31
- exports.getStepRating = getStepRating;
27
+ export const getStepRating = (rating) => rateSteps.find((step) => rating >= step.range[0] && rating <= step.range[1]);
@@ -1,31 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOptionsByType = exports.reasonEmojis = void 0;
4
- const types_1 = require("../models/Evento/Player/types");
5
- exports.reasonEmojis = {
6
- [types_1.EventPlayerReason.ArrivingLate]: '',
7
- [types_1.EventPlayerReason.LeavingEarly]: '🏃',
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
- [types_1.EventPlayerStatus.Confirmed]: [
14
- types_1.EventPlayerReason.ArrivingLate,
15
- types_1.EventPlayerReason.LeavingEarly,
16
- types_1.EventPlayerReason.Other,
10
+ [EventPlayerStatus.Confirmed]: [
11
+ EventPlayerReason.ArrivingLate,
12
+ EventPlayerReason.LeavingEarly,
13
+ EventPlayerReason.Other,
17
14
  ],
18
- [types_1.EventPlayerStatus.Declined]: [
19
- types_1.EventPlayerReason.Vacation,
20
- types_1.EventPlayerReason.Sick,
21
- types_1.EventPlayerReason.Other,
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: exports.reasonEmojis[id],
25
+ emoji: reasonEmojis[id],
29
26
  }));
30
27
  };
31
- exports.getOptionsByType = getOptionsByType;
package/helpers/slate.js CHANGED
@@ -1,20 +1,13 @@
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.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 = (0, get_1.default)(node, 'children');
5
+ const children = get(node, 'children');
12
6
  if (children) {
13
- return (0, exports.serializeSlateBlock)(children);
7
+ return serializeSlateBlock(children);
14
8
  }
15
- const text = (0, get_1.default)(node, '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,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.colors = void 0;
4
- exports.colors = {
1
+ export const colors = {
5
2
  white: '#FFFFFF',
6
3
  black: '#000000',
7
4
  primary: '#66c94a',
@@ -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;