@deallony/shared 1.2.79 → 1.2.81

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 (104) hide show
  1. package/dist/cjs/constants/events/EventBirthday.d.ts +2 -0
  2. package/dist/cjs/constants/events/EventBirthday.js +12 -0
  3. package/dist/cjs/constants/events/EventCustomization.d.ts +90 -0
  4. package/dist/cjs/constants/events/EventCustomization.js +72 -0
  5. package/dist/cjs/constants/events/EventDressCode.d.ts +65 -0
  6. package/dist/cjs/constants/events/EventDressCode.js +56 -0
  7. package/dist/cjs/constants/events/EventOccasion.d.ts +63 -0
  8. package/dist/cjs/constants/events/EventOccasion.js +242 -0
  9. package/dist/cjs/constants/events/EventPreview.d.ts +9 -0
  10. package/dist/cjs/constants/events/EventPreview.js +11 -1
  11. package/dist/cjs/constants/events/EventTemplate.d.ts +518 -10
  12. package/dist/cjs/constants/events/EventTemplate.js +81 -11
  13. package/dist/cjs/constants/events/EventTextPolicy.d.ts +7 -0
  14. package/dist/cjs/constants/events/EventTextPolicy.js +66 -0
  15. package/dist/cjs/constants/events/EventType.d.ts +273 -8
  16. package/dist/cjs/constants/events/EventType.js +38 -2
  17. package/dist/cjs/constants/events/EventVisibility.d.ts +19 -0
  18. package/dist/cjs/constants/events/EventVisibility.js +18 -0
  19. package/dist/cjs/constants/events/EventWedding.js +3 -0
  20. package/dist/cjs/constants/events/EventWeddingReligion.d.ts +72 -0
  21. package/dist/cjs/constants/events/EventWeddingReligion.js +126 -0
  22. package/dist/cjs/constants/events/index.d.ts +7 -0
  23. package/dist/cjs/constants/events/index.js +7 -0
  24. package/dist/cjs/constants/payments/PaymentStatus.d.ts +1 -1
  25. package/dist/cjs/constants/routes/app.d.ts +42 -0
  26. package/dist/cjs/constants/routes/app.js +14 -0
  27. package/dist/cjs/dto/events/EventBirthday.dto.d.ts +3 -0
  28. package/dist/cjs/dto/events/EventBirthday.dto.js +2 -0
  29. package/dist/cjs/dto/events/EventOccasion.dto.d.ts +3 -0
  30. package/dist/cjs/dto/events/EventOccasion.dto.js +2 -0
  31. package/dist/cjs/dto/events/index.d.ts +2 -0
  32. package/dist/cjs/dto/events/index.js +2 -0
  33. package/dist/cjs/schema/communication/ai-conversation.schema.d.ts +156 -0
  34. package/dist/cjs/schema/communication/ai-conversation.schema.js +57 -1
  35. package/dist/cjs/schema/communication/support-ticket.schema.d.ts +136 -0
  36. package/dist/cjs/schema/communication/support-ticket.schema.js +47 -2
  37. package/dist/cjs/schema/events/Event.schema.d.ts +399 -0
  38. package/dist/cjs/schema/events/Event.schema.js +67 -1
  39. package/dist/cjs/schema/events/EventBirthday.schema.d.ts +19 -0
  40. package/dist/cjs/schema/events/EventBirthday.schema.js +17 -0
  41. package/dist/cjs/schema/events/EventOccasion.schema.d.ts +22 -0
  42. package/dist/cjs/schema/events/EventOccasion.schema.js +31 -0
  43. package/dist/cjs/schema/events/EventRsvp.schema.d.ts +4 -0
  44. package/dist/cjs/schema/events/EventRsvp.schema.js +1 -0
  45. package/dist/cjs/schema/events/EventTimeline.schema.d.ts +5 -0
  46. package/dist/cjs/schema/events/EventTimeline.schema.js +14 -1
  47. package/dist/cjs/schema/events/EventWedding.schema.d.ts +32 -0
  48. package/dist/cjs/schema/events/EventWedding.schema.js +11 -0
  49. package/dist/cjs/schema/events/index.d.ts +2 -0
  50. package/dist/cjs/schema/events/index.js +2 -0
  51. package/dist/cjs/types/communication/Notification.d.ts +13 -2
  52. package/dist/cjs/types/communication/Notification.js +8 -0
  53. package/dist/cjs/types/events/Event.d.ts +18 -1
  54. package/dist/cjs/types/events/EventBirthday.d.ts +17 -0
  55. package/dist/cjs/types/events/EventBirthday.js +2 -0
  56. package/dist/cjs/types/events/EventCustomization.d.ts +20 -0
  57. package/dist/cjs/types/events/EventCustomization.js +2 -0
  58. package/dist/cjs/types/events/EventDressCode.d.ts +13 -0
  59. package/dist/cjs/types/events/EventDressCode.js +2 -0
  60. package/dist/cjs/types/events/EventOccasion.d.ts +24 -0
  61. package/dist/cjs/types/events/EventOccasion.js +2 -0
  62. package/dist/cjs/types/events/EventRsvp.d.ts +2 -0
  63. package/dist/cjs/types/events/EventTimeline.d.ts +2 -0
  64. package/dist/cjs/types/events/EventWedding.d.ts +7 -0
  65. package/dist/cjs/types/events/index.d.ts +4 -0
  66. package/dist/cjs/types/events/index.js +4 -0
  67. package/dist/cjs/types/index.d.ts +3 -0
  68. package/dist/cjs/types/index.js +5 -2
  69. package/dist/cjs/types/user/SavedSearch.d.ts +38 -0
  70. package/dist/cjs/types/user/SavedSearch.js +11 -0
  71. package/dist/esm/constants/events/EventBirthday.js +9 -0
  72. package/dist/esm/constants/events/EventCustomization.js +65 -0
  73. package/dist/esm/constants/events/EventDressCode.js +49 -0
  74. package/dist/esm/constants/events/EventOccasion.js +235 -0
  75. package/dist/esm/constants/events/EventPreview.js +9 -0
  76. package/dist/esm/constants/events/EventTemplate.js +78 -10
  77. package/dist/esm/constants/events/EventTextPolicy.js +61 -0
  78. package/dist/esm/constants/events/EventType.js +34 -1
  79. package/dist/esm/constants/events/EventVisibility.js +15 -0
  80. package/dist/esm/constants/events/EventWedding.js +3 -0
  81. package/dist/esm/constants/events/EventWeddingReligion.js +118 -0
  82. package/dist/esm/constants/events/index.js +7 -0
  83. package/dist/esm/constants/routes/app.js +14 -0
  84. package/dist/esm/dto/events/EventBirthday.dto.js +1 -0
  85. package/dist/esm/dto/events/EventOccasion.dto.js +1 -0
  86. package/dist/esm/dto/events/index.js +2 -0
  87. package/dist/esm/schema/communication/ai-conversation.schema.js +56 -0
  88. package/dist/esm/schema/communication/support-ticket.schema.js +46 -1
  89. package/dist/esm/schema/events/Event.schema.js +67 -1
  90. package/dist/esm/schema/events/EventBirthday.schema.js +14 -0
  91. package/dist/esm/schema/events/EventOccasion.schema.js +28 -0
  92. package/dist/esm/schema/events/EventRsvp.schema.js +1 -0
  93. package/dist/esm/schema/events/EventTimeline.schema.js +14 -1
  94. package/dist/esm/schema/events/EventWedding.schema.js +11 -0
  95. package/dist/esm/schema/events/index.js +2 -0
  96. package/dist/esm/types/communication/Notification.js +8 -0
  97. package/dist/esm/types/events/EventBirthday.js +1 -0
  98. package/dist/esm/types/events/EventCustomization.js +1 -0
  99. package/dist/esm/types/events/EventDressCode.js +1 -0
  100. package/dist/esm/types/events/EventOccasion.js +1 -0
  101. package/dist/esm/types/events/index.js +4 -0
  102. package/dist/esm/types/index.js +3 -0
  103. package/dist/esm/types/user/SavedSearch.js +8 -0
  104. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ export declare const normalizeTextForPolicy: (value: string) => string;
2
+ /** True when the text holds a blocked religious symbol or phrase */
3
+ export declare const hasBlockedReligiousText: (value: string | null | undefined) => boolean;
4
+ export declare const BLOCKED_RELIGIOUS_TEXT_MESSAGE: {
5
+ en: string;
6
+ ar: string;
7
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BLOCKED_RELIGIOUS_TEXT_MESSAGE = exports.hasBlockedReligiousText = exports.normalizeTextForPolicy = void 0;
4
+ /**
5
+ * Free texts owners type (welcome line, RSVP line, occasion details, program items) must not carry
6
+ * Christian religious symbols, creeds or rites (owner decision 2026-11-04). Social wording is fine.
7
+ */
8
+ const BLOCKED_SYMBOLS = /[✝✞✟†☦☩✙✚✛✜♰♱⛪]/u;
9
+ /** Matched against the text after removing diacritics/tatweel and unifying alef/ya/ta marbuta forms */
10
+ const BLOCKED_PHRASES = [
11
+ "الاب والابن",
12
+ "الروح القدس",
13
+ "الثالوث",
14
+ "التثليث",
15
+ "ابن الله",
16
+ "الرب يسوع",
17
+ "يسوع",
18
+ "السيد المسيح",
19
+ "المسيح الرب",
20
+ "ام الله",
21
+ "والده الاله",
22
+ "الاكليل",
23
+ "اكليل",
24
+ "المعموديه",
25
+ "التعميد",
26
+ "العماد المقدس",
27
+ "الانجيل",
28
+ "انجيل",
29
+ "الكتاب المقدس",
30
+ "سفر التكوين",
31
+ "كورنثوس",
32
+ "هللويا",
33
+ "in the name of the father",
34
+ "holy spirit",
35
+ "holy ghost",
36
+ "jesus",
37
+ "trinity",
38
+ "son of god",
39
+ "holy matrimony",
40
+ "bible",
41
+ "gospel",
42
+ "hallelujah",
43
+ ];
44
+ const normalizeTextForPolicy = (value) => value
45
+ .toLowerCase()
46
+ .replace(/[ً-ٰٟـ]/g, "")
47
+ .replace(/[إأآٱ]/g, "ا")
48
+ .replace(/ى/g, "ي")
49
+ .replace(/ة/g, "ه")
50
+ .replace(/\s+/g, " ");
51
+ exports.normalizeTextForPolicy = normalizeTextForPolicy;
52
+ const NORMALIZED_PHRASES = BLOCKED_PHRASES.map(exports.normalizeTextForPolicy);
53
+ /** True when the text holds a blocked religious symbol or phrase */
54
+ const hasBlockedReligiousText = (value) => {
55
+ if (!value)
56
+ return false;
57
+ if (BLOCKED_SYMBOLS.test(value))
58
+ return true;
59
+ const text = (0, exports.normalizeTextForPolicy)(value);
60
+ return NORMALIZED_PHRASES.some((p) => text.includes(p));
61
+ };
62
+ exports.hasBlockedReligiousText = hasBlockedReligiousText;
63
+ exports.BLOCKED_RELIGIOUS_TEXT_MESSAGE = {
64
+ en: "This text contains religious wording or symbols that invitations cannot include.",
65
+ ar: "يحتوي النص على عبارات أو رموز دينية لا يمكن إضافتها إلى الدعوة.",
66
+ };
@@ -1,16 +1,281 @@
1
+ /** Groups on the «ما نوع المناسبة؟» step */
2
+ export declare const EventTypeGroups: {
3
+ readonly CELEBRATIONS: {
4
+ readonly value: "celebrations";
5
+ readonly name: {
6
+ readonly en: "Weddings & engagements";
7
+ readonly ar: "أفراح";
8
+ };
9
+ };
10
+ readonly FAMILY: {
11
+ readonly value: "family";
12
+ readonly name: {
13
+ readonly en: "Family & kids";
14
+ readonly ar: "العائلة والأطفال";
15
+ };
16
+ };
17
+ readonly MILESTONES: {
18
+ readonly value: "milestones";
19
+ readonly name: {
20
+ readonly en: "Milestones & occasions";
21
+ readonly ar: "إنجازات ومناسبات";
22
+ };
23
+ };
24
+ readonly BUSINESS: {
25
+ readonly value: "business";
26
+ readonly name: {
27
+ readonly en: "Business & general";
28
+ readonly ar: "أعمال وعامة";
29
+ };
30
+ };
31
+ };
32
+ export type EventTypeGroup = (typeof EventTypeGroups)[keyof typeof EventTypeGroups]['value'];
33
+ /**
34
+ * Every invitation type. `details` says where its details are stored:
35
+ * wedding = event.wedding (couple), occasion = event.occasion (generic, see EventOccasionTypeConfigs).
36
+ */
1
37
  export declare const EventTypes: {
2
- WEDDING: {
3
- value: string;
4
- name: {
5
- en: string;
6
- ar: string;
38
+ readonly WEDDING: {
39
+ readonly value: "wedding";
40
+ readonly name: {
41
+ readonly en: "Wedding";
42
+ readonly ar: "زفاف";
43
+ };
44
+ readonly group: "celebrations";
45
+ readonly details: "wedding";
46
+ };
47
+ readonly ENGAGEMENT: {
48
+ readonly value: "engagement";
49
+ readonly name: {
50
+ readonly en: "Engagement";
51
+ readonly ar: "حفلة خطبة";
52
+ };
53
+ readonly group: "celebrations";
54
+ readonly details: "wedding";
55
+ };
56
+ readonly MARRIAGE: {
57
+ readonly value: "marriage";
58
+ readonly name: {
59
+ readonly en: "Marriage contract";
60
+ readonly ar: "حفل زواج";
61
+ };
62
+ readonly group: "celebrations";
63
+ readonly details: "wedding";
64
+ };
65
+ readonly PROPOSAL: {
66
+ readonly value: "proposal";
67
+ readonly name: {
68
+ readonly en: "Proposal";
69
+ readonly ar: "حفل Proposal";
7
70
  };
71
+ readonly group: "celebrations";
72
+ readonly details: "occasion";
73
+ };
74
+ readonly BACHELOR: {
75
+ readonly value: "bachelor";
76
+ readonly name: {
77
+ readonly en: "Bachelor party";
78
+ readonly ar: "حفل توديع عزوبية";
79
+ };
80
+ readonly group: "celebrations";
81
+ readonly details: "occasion";
82
+ };
83
+ readonly BIRTHDAY: {
84
+ readonly value: "birthday";
85
+ readonly name: {
86
+ readonly en: "Birthday";
87
+ readonly ar: "عيد ميلاد";
88
+ };
89
+ readonly group: "family";
90
+ readonly details: "occasion";
91
+ };
92
+ readonly NEWBORN: {
93
+ readonly value: "newborn";
94
+ readonly name: {
95
+ readonly en: "New baby";
96
+ readonly ar: "مباركة مولود";
97
+ };
98
+ readonly group: "family";
99
+ readonly details: "occasion";
100
+ };
101
+ readonly GENDER_REVEAL: {
102
+ readonly value: "gender_reveal";
103
+ readonly name: {
104
+ readonly en: "Gender reveal";
105
+ readonly ar: "احتفال جنس المولود";
106
+ };
107
+ readonly group: "family";
108
+ readonly details: "occasion";
109
+ };
110
+ readonly CIRCUMCISION: {
111
+ readonly value: "circumcision";
112
+ readonly name: {
113
+ readonly en: "Circumcision";
114
+ readonly ar: "حفل طهور";
115
+ };
116
+ readonly group: "family";
117
+ readonly details: "occasion";
118
+ };
119
+ readonly GRADUATION: {
120
+ readonly value: "graduation";
121
+ readonly name: {
122
+ readonly en: "Graduation";
123
+ readonly ar: "حفل تخرج";
124
+ };
125
+ readonly group: "milestones";
126
+ readonly details: "occasion";
127
+ };
128
+ readonly HAJJ: {
129
+ readonly value: "hajj";
130
+ readonly name: {
131
+ readonly en: "Hajj return";
132
+ readonly ar: "حفلة حج";
133
+ };
134
+ readonly group: "milestones";
135
+ readonly details: "occasion";
136
+ };
137
+ readonly MOTHERS_DAY: {
138
+ readonly value: "mothers_day";
139
+ readonly name: {
140
+ readonly en: "Mother's Day";
141
+ readonly ar: "حفل عيد الأم";
142
+ };
143
+ readonly group: "milestones";
144
+ readonly details: "occasion";
145
+ };
146
+ readonly VALENTINE: {
147
+ readonly value: "valentine";
148
+ readonly name: {
149
+ readonly en: "Valentine's Day";
150
+ readonly ar: "حفل لعيد الحب";
151
+ };
152
+ readonly group: "milestones";
153
+ readonly details: "occasion";
154
+ };
155
+ readonly OPENING: {
156
+ readonly value: "opening";
157
+ readonly name: {
158
+ readonly en: "Business opening";
159
+ readonly ar: "افتتاح عمل تجاري";
160
+ };
161
+ readonly group: "business";
162
+ readonly details: "occasion";
163
+ };
164
+ readonly GENERAL: {
165
+ readonly value: "general";
166
+ readonly name: {
167
+ readonly en: "General party";
168
+ readonly ar: "حفلة عامة";
169
+ };
170
+ readonly group: "business";
171
+ readonly details: "occasion";
8
172
  };
9
173
  };
174
+ export type EventTypeValue = (typeof EventTypes)[keyof typeof EventTypes]['value'];
175
+ export declare const EventTypeValues: [EventTypeValue, ...EventTypeValue[]];
10
176
  export declare const EventTypeOptions: {
11
- value: string;
177
+ value: "general" | "wedding" | "engagement" | "marriage" | "proposal" | "valentine" | "birthday" | "bachelor" | "newborn" | "gender_reveal" | "circumcision" | "graduation" | "hajj" | "mothers_day" | "opening";
12
178
  name: {
13
- en: string;
14
- ar: string;
179
+ readonly en: "Wedding";
180
+ readonly ar: "زفاف";
181
+ } | {
182
+ readonly en: "Engagement";
183
+ readonly ar: "حفلة خطبة";
184
+ } | {
185
+ readonly en: "Marriage contract";
186
+ readonly ar: "حفل زواج";
187
+ } | {
188
+ readonly en: "Proposal";
189
+ readonly ar: "حفل Proposal";
190
+ } | {
191
+ readonly en: "Bachelor party";
192
+ readonly ar: "حفل توديع عزوبية";
193
+ } | {
194
+ readonly en: "Birthday";
195
+ readonly ar: "عيد ميلاد";
196
+ } | {
197
+ readonly en: "New baby";
198
+ readonly ar: "مباركة مولود";
199
+ } | {
200
+ readonly en: "Gender reveal";
201
+ readonly ar: "احتفال جنس المولود";
202
+ } | {
203
+ readonly en: "Circumcision";
204
+ readonly ar: "حفل طهور";
205
+ } | {
206
+ readonly en: "Graduation";
207
+ readonly ar: "حفل تخرج";
208
+ } | {
209
+ readonly en: "Hajj return";
210
+ readonly ar: "حفلة حج";
211
+ } | {
212
+ readonly en: "Mother's Day";
213
+ readonly ar: "حفل عيد الأم";
214
+ } | {
215
+ readonly en: "Valentine's Day";
216
+ readonly ar: "حفل لعيد الحب";
217
+ } | {
218
+ readonly en: "Business opening";
219
+ readonly ar: "افتتاح عمل تجاري";
220
+ } | {
221
+ readonly en: "General party";
222
+ readonly ar: "حفلة عامة";
15
223
  };
224
+ group: EventTypeGroup;
225
+ details: "wedding" | "occasion";
16
226
  }[];
227
+ export declare const findEventType: (value: string | null | undefined) => {
228
+ value: "general" | "wedding" | "engagement" | "marriage" | "proposal" | "valentine" | "birthday" | "bachelor" | "newborn" | "gender_reveal" | "circumcision" | "graduation" | "hajj" | "mothers_day" | "opening";
229
+ name: {
230
+ readonly en: "Wedding";
231
+ readonly ar: "زفاف";
232
+ } | {
233
+ readonly en: "Engagement";
234
+ readonly ar: "حفلة خطبة";
235
+ } | {
236
+ readonly en: "Marriage contract";
237
+ readonly ar: "حفل زواج";
238
+ } | {
239
+ readonly en: "Proposal";
240
+ readonly ar: "حفل Proposal";
241
+ } | {
242
+ readonly en: "Bachelor party";
243
+ readonly ar: "حفل توديع عزوبية";
244
+ } | {
245
+ readonly en: "Birthday";
246
+ readonly ar: "عيد ميلاد";
247
+ } | {
248
+ readonly en: "New baby";
249
+ readonly ar: "مباركة مولود";
250
+ } | {
251
+ readonly en: "Gender reveal";
252
+ readonly ar: "احتفال جنس المولود";
253
+ } | {
254
+ readonly en: "Circumcision";
255
+ readonly ar: "حفل طهور";
256
+ } | {
257
+ readonly en: "Graduation";
258
+ readonly ar: "حفل تخرج";
259
+ } | {
260
+ readonly en: "Hajj return";
261
+ readonly ar: "حفلة حج";
262
+ } | {
263
+ readonly en: "Mother's Day";
264
+ readonly ar: "حفل عيد الأم";
265
+ } | {
266
+ readonly en: "Valentine's Day";
267
+ readonly ar: "حفل لعيد الحب";
268
+ } | {
269
+ readonly en: "Business opening";
270
+ readonly ar: "افتتاح عمل تجاري";
271
+ } | {
272
+ readonly en: "General party";
273
+ readonly ar: "حفلة عامة";
274
+ };
275
+ group: EventTypeGroup;
276
+ details: "wedding" | "occasion";
277
+ } | null;
278
+ /** Types whose details are a couple stored in event.wedding (events without a type are weddings) */
279
+ export declare const isCoupleEventType: (value: string | null | undefined) => boolean;
280
+ /** Types whose details are stored in event.occasion */
281
+ export declare const isOccasionEventType: (value: string | null | undefined) => boolean;
@@ -1,10 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventTypeOptions = exports.EventTypes = void 0;
3
+ exports.isOccasionEventType = exports.isCoupleEventType = exports.findEventType = exports.EventTypeOptions = exports.EventTypeValues = exports.EventTypes = exports.EventTypeGroups = void 0;
4
+ /** Groups on the «ما نوع المناسبة؟» step */
5
+ exports.EventTypeGroups = {
6
+ CELEBRATIONS: { value: 'celebrations', name: { en: 'Weddings & engagements', ar: 'أفراح' } },
7
+ FAMILY: { value: 'family', name: { en: 'Family & kids', ar: 'العائلة والأطفال' } },
8
+ MILESTONES: { value: 'milestones', name: { en: 'Milestones & occasions', ar: 'إنجازات ومناسبات' } },
9
+ BUSINESS: { value: 'business', name: { en: 'Business & general', ar: 'أعمال وعامة' } },
10
+ };
11
+ /**
12
+ * Every invitation type. `details` says where its details are stored:
13
+ * wedding = event.wedding (couple), occasion = event.occasion (generic, see EventOccasionTypeConfigs).
14
+ */
4
15
  exports.EventTypes = {
5
- WEDDING: { value: 'wedding', name: { en: 'Wedding', ar: 'زفاف' } },
16
+ WEDDING: { value: 'wedding', name: { en: 'Wedding', ar: 'زفاف' }, group: 'celebrations', details: 'wedding' },
17
+ ENGAGEMENT: { value: 'engagement', name: { en: 'Engagement', ar: 'حفلة خطبة' }, group: 'celebrations', details: 'wedding' },
18
+ MARRIAGE: { value: 'marriage', name: { en: 'Marriage contract', ar: 'حفل زواج' }, group: 'celebrations', details: 'wedding' },
19
+ PROPOSAL: { value: 'proposal', name: { en: 'Proposal', ar: 'حفل Proposal' }, group: 'celebrations', details: 'occasion' },
20
+ BACHELOR: { value: 'bachelor', name: { en: 'Bachelor party', ar: 'حفل توديع عزوبية' }, group: 'celebrations', details: 'occasion' },
21
+ BIRTHDAY: { value: 'birthday', name: { en: 'Birthday', ar: 'عيد ميلاد' }, group: 'family', details: 'occasion' },
22
+ NEWBORN: { value: 'newborn', name: { en: 'New baby', ar: 'مباركة مولود' }, group: 'family', details: 'occasion' },
23
+ GENDER_REVEAL: { value: 'gender_reveal', name: { en: 'Gender reveal', ar: 'احتفال جنس المولود' }, group: 'family', details: 'occasion' },
24
+ CIRCUMCISION: { value: 'circumcision', name: { en: 'Circumcision', ar: 'حفل طهور' }, group: 'family', details: 'occasion' },
25
+ GRADUATION: { value: 'graduation', name: { en: 'Graduation', ar: 'حفل تخرج' }, group: 'milestones', details: 'occasion' },
26
+ HAJJ: { value: 'hajj', name: { en: 'Hajj return', ar: 'حفلة حج' }, group: 'milestones', details: 'occasion' },
27
+ MOTHERS_DAY: { value: 'mothers_day', name: { en: "Mother's Day", ar: 'حفل عيد الأم' }, group: 'milestones', details: 'occasion' },
28
+ VALENTINE: { value: 'valentine', name: { en: "Valentine's Day", ar: 'حفل لعيد الحب' }, group: 'milestones', details: 'occasion' },
29
+ OPENING: { value: 'opening', name: { en: 'Business opening', ar: 'افتتاح عمل تجاري' }, group: 'business', details: 'occasion' },
30
+ GENERAL: { value: 'general', name: { en: 'General party', ar: 'حفلة عامة' }, group: 'business', details: 'occasion' },
6
31
  };
32
+ exports.EventTypeValues = Object.values(exports.EventTypes).map((t) => t.value);
7
33
  exports.EventTypeOptions = Object.values(exports.EventTypes).map((type) => ({
8
34
  value: type.value,
9
35
  name: type.name,
36
+ group: type.group,
37
+ details: type.details,
10
38
  }));
39
+ const findEventType = (value) => { var _a; return (_a = exports.EventTypeOptions.find((t) => t.value === (value || 'wedding'))) !== null && _a !== void 0 ? _a : null; };
40
+ exports.findEventType = findEventType;
41
+ /** Types whose details are a couple stored in event.wedding (events without a type are weddings) */
42
+ const isCoupleEventType = (value) => { var _a, _b; return ((_b = (_a = (0, exports.findEventType)(value)) === null || _a === void 0 ? void 0 : _a.details) !== null && _b !== void 0 ? _b : 'wedding') === 'wedding'; };
43
+ exports.isCoupleEventType = isCoupleEventType;
44
+ /** Types whose details are stored in event.occasion */
45
+ const isOccasionEventType = (value) => { var _a; return ((_a = (0, exports.findEventType)(value)) === null || _a === void 0 ? void 0 : _a.details) === 'occasion'; };
46
+ exports.isOccasionEventType = isOccasionEventType;
@@ -0,0 +1,19 @@
1
+ /** Who can find an event: private = only people with its link, public = can be listed and indexed */
2
+ export declare const EventVisibilityValues: readonly ["private", "public"];
3
+ export type EventVisibility = (typeof EventVisibilityValues)[number];
4
+ export declare const EventVisibility: {
5
+ readonly PRIVATE: "private";
6
+ readonly PUBLIC: "public";
7
+ };
8
+ export declare const DEFAULT_EVENT_VISIBILITY: EventVisibility;
9
+ export declare const EventVisibilityNames: Record<EventVisibility, {
10
+ en: string;
11
+ ar: string;
12
+ }>;
13
+ export declare const EventVisibilityOptions: {
14
+ value: "private" | "public";
15
+ name: {
16
+ en: string;
17
+ ar: string;
18
+ };
19
+ }[];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventVisibilityOptions = exports.EventVisibilityNames = exports.DEFAULT_EVENT_VISIBILITY = exports.EventVisibility = exports.EventVisibilityValues = void 0;
4
+ /** Who can find an event: private = only people with its link, public = can be listed and indexed */
5
+ exports.EventVisibilityValues = ["private", "public"];
6
+ exports.EventVisibility = {
7
+ PRIVATE: "private",
8
+ PUBLIC: "public",
9
+ };
10
+ exports.DEFAULT_EVENT_VISIBILITY = "private";
11
+ exports.EventVisibilityNames = {
12
+ private: { en: "Private", ar: "خاصة" },
13
+ public: { en: "Public", ar: "عامة" },
14
+ };
15
+ exports.EventVisibilityOptions = exports.EventVisibilityValues.map((value) => ({
16
+ value,
17
+ name: exports.EventVisibilityNames[value],
18
+ }));
@@ -11,4 +11,7 @@ exports.emptyEventWedding = {
11
11
  last_groom_name: null,
12
12
  bride_phone: null,
13
13
  groom_phone: null,
14
+ religion: 'muslim',
15
+ verse_key: null,
16
+ custom_verse: null,
14
17
  };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Invitation style of a wedding (also used by engagement and marriage, which share event.wedding).
3
+ * muslim = the Islamic opening, Quran verse and dua (the original templates).
4
+ * general = social congratulations only: names, place, date, program. Suits Christian weddings.
5
+ *
6
+ * Content rule (owner decision 2026-11-04): no Christian religious symbols, creeds, Bible verses or rites
7
+ * may appear in any invitation. The general style therefore carries no religious text at all.
8
+ */
9
+ export declare const EventWeddingReligionValues: readonly ["muslim", "general"];
10
+ export type EventWeddingReligion = (typeof EventWeddingReligionValues)[number];
11
+ export declare const EventWeddingReligion: {
12
+ readonly MUSLIM: "muslim";
13
+ readonly GENERAL: "general";
14
+ };
15
+ export declare const DEFAULT_EVENT_WEDDING_RELIGION: EventWeddingReligion;
16
+ export declare const EventWeddingReligionNames: Record<EventWeddingReligion, {
17
+ en: string;
18
+ ar: string;
19
+ hint_en: string;
20
+ hint_ar: string;
21
+ }>;
22
+ export declare const EventWeddingReligionOptions: {
23
+ value: "muslim" | "general";
24
+ name: {
25
+ en: string;
26
+ ar: string;
27
+ hint_en: string;
28
+ hint_ar: string;
29
+ };
30
+ }[];
31
+ export type EventWeddingVerse = {
32
+ value: string;
33
+ religion: EventWeddingReligion;
34
+ text: string;
35
+ /** Source shown under the text; null for social phrases */
36
+ reference: string | null;
37
+ /** Short label for pickers */
38
+ label: {
39
+ en: string;
40
+ ar: string;
41
+ };
42
+ };
43
+ export declare const EventWeddingVerses: EventWeddingVerse[];
44
+ /** General style only: the owner writes the couple's words by hand (event.wedding.custom_verse) */
45
+ export declare const EVENT_WEDDING_CUSTOM_VERSE = "custom";
46
+ export declare const EVENT_WEDDING_CUSTOM_VERSE_MAX = 160;
47
+ export declare const EventWeddingVerseValues: [string, ...string[]];
48
+ /** The hand-written text applies only to the general style */
49
+ export declare const eventWeddingCustomVerse: (verseKey: string | null | undefined, religion: string | null | undefined, customVerse: string | null | undefined) => string | null;
50
+ /** Texts each invitation template shows for the chosen style */
51
+ export type EventWeddingReligionTexts = {
52
+ /** Line above everything (bismillah); null = nothing */
53
+ opening: string | null;
54
+ /** Heading over the verse / phrase */
55
+ verse_title: string;
56
+ /** Closing wish for the couple */
57
+ blessing: string;
58
+ /** Title of the short wish card */
59
+ blessing_title: string;
60
+ /** Small ornament next to the opening */
61
+ symbol: string;
62
+ /** Contract line used by some designs (على سنة الله ورسوله); null = hide */
63
+ contract_line: string | null;
64
+ };
65
+ export declare const EventWeddingReligionTextsMap: Record<EventWeddingReligion, EventWeddingReligionTexts>;
66
+ /** Ready-made program item offered for the general style */
67
+ export declare const EVENT_WEDDING_CEREMONY_TIMELINE_TITLE = "\u0645\u0631\u0627\u0633\u0645 \u0627\u0644\u0632\u0648\u0627\u062C";
68
+ export declare const normalizeEventWeddingReligion: (value: string | null | undefined) => EventWeddingReligion;
69
+ export declare const eventWeddingVersesFor: (religion: string | null | undefined) => EventWeddingVerse[];
70
+ /** The saved verse when it belongs to the style, otherwise the style's first one */
71
+ export declare const findEventWeddingVerse: (value: string | null | undefined, religion: string | null | undefined) => EventWeddingVerse;
72
+ export declare const eventWeddingReligionTexts: (religion: string | null | undefined) => EventWeddingReligionTexts;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventWeddingReligionTexts = exports.findEventWeddingVerse = exports.eventWeddingVersesFor = exports.normalizeEventWeddingReligion = exports.EVENT_WEDDING_CEREMONY_TIMELINE_TITLE = exports.EventWeddingReligionTextsMap = exports.eventWeddingCustomVerse = exports.EventWeddingVerseValues = exports.EVENT_WEDDING_CUSTOM_VERSE_MAX = exports.EVENT_WEDDING_CUSTOM_VERSE = exports.EventWeddingVerses = exports.EventWeddingReligionOptions = exports.EventWeddingReligionNames = exports.DEFAULT_EVENT_WEDDING_RELIGION = exports.EventWeddingReligion = exports.EventWeddingReligionValues = void 0;
4
+ /**
5
+ * Invitation style of a wedding (also used by engagement and marriage, which share event.wedding).
6
+ * muslim = the Islamic opening, Quran verse and dua (the original templates).
7
+ * general = social congratulations only: names, place, date, program. Suits Christian weddings.
8
+ *
9
+ * Content rule (owner decision 2026-11-04): no Christian religious symbols, creeds, Bible verses or rites
10
+ * may appear in any invitation. The general style therefore carries no religious text at all.
11
+ */
12
+ exports.EventWeddingReligionValues = ["muslim", "general"];
13
+ exports.EventWeddingReligion = {
14
+ MUSLIM: "muslim",
15
+ GENERAL: "general",
16
+ };
17
+ exports.DEFAULT_EVENT_WEDDING_RELIGION = "muslim";
18
+ exports.EventWeddingReligionNames = {
19
+ muslim: {
20
+ en: "Islamic",
21
+ ar: "إسلامي",
22
+ hint_en: "Bismillah, a Quran verse and a dua.",
23
+ hint_ar: "البسملة وآية قرآنية ودعاء للعروسين.",
24
+ },
25
+ general: {
26
+ en: "General",
27
+ ar: "عام",
28
+ hint_en: "Social congratulations only, with no religious text.",
29
+ hint_ar: "تهنئة اجتماعية فقط بدون نصوص دينية.",
30
+ },
31
+ };
32
+ exports.EventWeddingReligionOptions = exports.EventWeddingReligionValues.map((value) => ({
33
+ value,
34
+ name: exports.EventWeddingReligionNames[value],
35
+ }));
36
+ exports.EventWeddingVerses = [
37
+ {
38
+ value: "rum-21",
39
+ religion: "muslim",
40
+ text: "﴿ وَمِنْ آيَاتِهِ أَنْ خَلَقَ لَكُمْ مِنْ أَنْفُسِكُمْ أَزْوَاجًا لِتَسْكُنُوا إِلَيْهَا وَجَعَلَ بَيْنَكُمْ مَوَدَّةً وَرَحْمَةً ﴾",
41
+ reference: "سورة الروم - آية ٢١",
42
+ label: { en: "Ar-Rum 21", ar: "سورة الروم - آية ٢١" },
43
+ },
44
+ {
45
+ value: "furqan-74",
46
+ religion: "muslim",
47
+ text: "﴿ رَبَّنَا هَبْ لَنَا مِنْ أَزْوَاجِنَا وَذُرِّيَّاتِنَا قُرَّةَ أَعْيُنٍ وَاجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا ﴾",
48
+ reference: "سورة الفرقان - آية ٧٤",
49
+ label: { en: "Al-Furqan 74", ar: "سورة الفرقان - آية ٧٤" },
50
+ },
51
+ {
52
+ value: "rum-mawadda",
53
+ religion: "muslim",
54
+ text: "﴿ وَجَعَلَ بَيْنَكُم مَّوَدَّةً وَرَحْمَةً ﴾",
55
+ reference: "سورة الروم",
56
+ label: { en: "Mawadda wa rahma", ar: "وجعل بينكم مودة ورحمة" },
57
+ },
58
+ {
59
+ value: "together",
60
+ religion: "general",
61
+ text: "«معاً نبدأ أجمل حكايات العمر»",
62
+ reference: null,
63
+ label: { en: "Together we begin", ar: "معاً نبدأ أجمل حكايات العمر" },
64
+ },
65
+ {
66
+ value: "love-loyalty",
67
+ religion: "general",
68
+ text: "«بالحب والوفاء نبدأ رحلتنا، وبحضوركم تكتمل فرحتنا»",
69
+ reference: null,
70
+ label: { en: "Love and loyalty", ar: "بالحب والوفاء نبدأ رحلتنا" },
71
+ },
72
+ {
73
+ value: "night-of-life",
74
+ religion: "general",
75
+ text: "«ليلة العمر لا تكتمل إلا بوجود من نحب»",
76
+ reference: null,
77
+ label: { en: "Night of a lifetime", ar: "ليلة العمر لا تكتمل إلا بوجود من نحب" },
78
+ },
79
+ ];
80
+ /** General style only: the owner writes the couple's words by hand (event.wedding.custom_verse) */
81
+ exports.EVENT_WEDDING_CUSTOM_VERSE = "custom";
82
+ exports.EVENT_WEDDING_CUSTOM_VERSE_MAX = 160;
83
+ exports.EventWeddingVerseValues = [
84
+ exports.EVENT_WEDDING_CUSTOM_VERSE,
85
+ ...exports.EventWeddingVerses.map((v) => v.value),
86
+ ];
87
+ /** The hand-written text applies only to the general style */
88
+ const eventWeddingCustomVerse = (verseKey, religion, customVerse) => verseKey === exports.EVENT_WEDDING_CUSTOM_VERSE && (0, exports.normalizeEventWeddingReligion)(religion) === "general"
89
+ ? (customVerse === null || customVerse === void 0 ? void 0 : customVerse.trim()) || null
90
+ : null;
91
+ exports.eventWeddingCustomVerse = eventWeddingCustomVerse;
92
+ exports.EventWeddingReligionTextsMap = {
93
+ muslim: {
94
+ opening: "بسم الله الرحمن الرحيم",
95
+ verse_title: "مقتطف قرآني مبارك",
96
+ blessing: "اللهم بارك لهما وبارك عليهما واجمع بينهما في خير، واجعل أيامهما مودة ورحمة وسكينة.",
97
+ blessing_title: "دعاء",
98
+ symbol: "۞",
99
+ contract_line: "على سنّة الله ورسوله",
100
+ },
101
+ general: {
102
+ opening: null,
103
+ verse_title: "كلمة افتتاحية",
104
+ blessing: "نتمنى لهما حياة مليئة بالحب والسعادة، وأياماً عامرة بالفرح والوفاق.",
105
+ blessing_title: "أمنية",
106
+ symbol: "⚭",
107
+ contract_line: null,
108
+ },
109
+ };
110
+ /** Ready-made program item offered for the general style */
111
+ exports.EVENT_WEDDING_CEREMONY_TIMELINE_TITLE = "مراسم الزواج";
112
+ const normalizeEventWeddingReligion = (value) => exports.EventWeddingReligionValues.includes(value !== null && value !== void 0 ? value : "")
113
+ ? value
114
+ : exports.DEFAULT_EVENT_WEDDING_RELIGION;
115
+ exports.normalizeEventWeddingReligion = normalizeEventWeddingReligion;
116
+ const eventWeddingVersesFor = (religion) => exports.EventWeddingVerses.filter((v) => v.religion === (0, exports.normalizeEventWeddingReligion)(religion));
117
+ exports.eventWeddingVersesFor = eventWeddingVersesFor;
118
+ /** The saved verse when it belongs to the style, otherwise the style's first one */
119
+ const findEventWeddingVerse = (value, religion) => {
120
+ var _a;
121
+ const list = (0, exports.eventWeddingVersesFor)(religion);
122
+ return (_a = list.find((v) => v.value === value)) !== null && _a !== void 0 ? _a : list[0];
123
+ };
124
+ exports.findEventWeddingVerse = findEventWeddingVerse;
125
+ const eventWeddingReligionTexts = (religion) => exports.EventWeddingReligionTextsMap[(0, exports.normalizeEventWeddingReligion)(religion)];
126
+ exports.eventWeddingReligionTexts = eventWeddingReligionTexts;