@getmicdrop/svelte-components 5.17.4 → 5.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar/AboutShow/AboutShow.svelte +9 -5
- package/dist/calendar/AboutShow/AboutShow.svelte.d.ts +2 -2
- package/dist/calendar/AboutShow/AboutShow.svelte.d.ts.map +1 -1
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +39 -18
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts +4 -0
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
- package/dist/calendar/FAQs/FAQs.svelte +16 -5
- package/dist/calendar/FAQs/FAQs.svelte.d.ts +6 -4
- package/dist/calendar/FAQs/FAQs.svelte.d.ts.map +1 -1
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +19 -4
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts +2 -0
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts.map +1 -1
- package/dist/calendar/OrderSummary/OrderSummary.spec.js +3 -3
- package/dist/calendar/OrderSummary/OrderSummary.svelte +17 -13
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts +4 -2
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts.map +1 -1
- package/dist/calendar/PublicCard/PublicCard.svelte +11 -2
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts +4 -0
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowCard/ShowCard.svelte +25 -11
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts +4 -0
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +12 -4
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts +4 -0
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/patterns/chat/ChatBubble.svelte +9 -1
- package/dist/patterns/chat/ChatBubble.svelte.d.ts +6 -4
- package/dist/patterns/chat/ChatBubble.svelte.d.ts.map +1 -1
- package/dist/patterns/chat/ChatInvitationBubble.svelte +10 -1
- package/dist/patterns/chat/ChatInvitationBubble.svelte.d.ts +6 -3
- package/dist/patterns/chat/ChatInvitationBubble.svelte.d.ts.map +1 -1
- package/dist/patterns/chat/ChatInvitationNotice.svelte +10 -1
- package/dist/patterns/chat/ChatInvitationNotice.svelte.d.ts +6 -3
- package/dist/patterns/chat/ChatInvitationNotice.svelte.d.ts.map +1 -1
- package/dist/patterns/forms/FormValidationSummary.svelte +9 -1
- package/dist/patterns/forms/FormValidationSummary.svelte.d.ts +5 -3
- package/dist/patterns/forms/FormValidationSummary.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/BottomNav.svelte +9 -1
- package/dist/patterns/navigation/BottomNav.svelte.d.ts +10 -9
- package/dist/patterns/navigation/BottomNav.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/Header.svelte +20 -8
- package/dist/patterns/navigation/Header.svelte.d.ts +17 -9
- package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageLoader.svelte +12 -3
- package/dist/patterns/page/PageLoader.svelte.d.ts +6 -3
- package/dist/patterns/page/PageLoader.svelte.d.ts.map +1 -1
- package/dist/primitives/Accordion/AccordionItem.svelte +9 -1
- package/dist/primitives/Accordion/AccordionItem.svelte.d.ts +6 -4
- package/dist/primitives/Accordion/AccordionItem.svelte.d.ts.map +1 -1
- package/dist/primitives/Alert/Alert.svelte +10 -2
- package/dist/primitives/Alert/Alert.svelte.d.ts +6 -4
- package/dist/primitives/Alert/Alert.svelte.d.ts.map +1 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +9 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte.d.ts +13 -9
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/primitives/DarkModeToggle.svelte +16 -5
- package/dist/primitives/DarkModeToggle.svelte.d.ts +9 -3
- package/dist/primitives/DarkModeToggle.svelte.d.ts.map +1 -1
- package/dist/primitives/Dropdown/Dropdown.svelte +11 -2
- package/dist/primitives/Dropdown/Dropdown.svelte.d.ts +7 -4
- package/dist/primitives/Dropdown/Dropdown.svelte.d.ts.map +1 -1
- package/dist/primitives/Input/Input.svelte +19 -6
- package/dist/primitives/Input/Input.svelte.d.ts.map +1 -1
- package/dist/primitives/NumberInput/NumberInput.svelte +10 -2
- package/dist/primitives/NumberInput/NumberInput.svelte.d.ts.map +1 -1
- package/dist/primitives/Pagination/Pagination.svelte +21 -7
- package/dist/primitives/Pagination/Pagination.svelte.d.ts +14 -6
- package/dist/primitives/Pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/CardPlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/CardPlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/ListPlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/ListPlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/Skeleton.svelte +11 -2
- package/dist/primitives/Skeleton/Skeleton.svelte.d.ts +7 -4
- package/dist/primitives/Skeleton/Skeleton.svelte.d.ts.map +1 -1
- package/dist/primitives/Spinner/Spinner.svelte +9 -1
- package/dist/primitives/Spinner/Spinner.svelte.d.ts +6 -4
- package/dist/primitives/Spinner/Spinner.svelte.d.ts.map +1 -1
- package/dist/recipes/ImageUploader/ImageUploader.svelte +5 -3
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts +1 -0
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts.map +1 -1
- package/dist/recipes/SuperLogin/SuperLogin.svelte +25 -23
- package/dist/recipes/SuperLogin/SuperLogin.svelte.d.ts.map +1 -1
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +12 -3
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts +7 -4
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/MultiSelect.svelte +10 -2
- package/dist/recipes/inputs/MultiSelect.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/OTPInput.svelte +14 -3
- package/dist/recipes/inputs/OTPInput.svelte.d.ts +14 -12
- package/dist/recipes/inputs/OTPInput.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PasswordInput.svelte +10 -1
- package/dist/recipes/inputs/PasswordInput.svelte.d.ts +7 -4
- package/dist/recipes/inputs/PasswordInput.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +21 -10
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts +8 -3
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PhoneInput.svelte +254 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts +40 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +22 -9
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts +21 -16
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/Search.svelte +10 -2
- package/dist/recipes/inputs/Search.svelte.d.ts +7 -5
- package/dist/recipes/inputs/Search.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/index.d.ts +1 -0
- package/dist/recipes/inputs/index.js +1 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +240 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts +15 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts +18 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.js +211 -0
- package/dist/recipes/modals/AlertModal.svelte +11 -2
- package/dist/recipes/modals/AlertModal.svelte.d.ts +4 -2
- package/dist/recipes/modals/AlertModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/ConfirmationModal.svelte +8 -1
- package/dist/recipes/modals/ConfirmationModal.svelte.d.ts +2 -0
- package/dist/recipes/modals/ConfirmationModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/InputModal.svelte +19 -7
- package/dist/recipes/modals/InputModal.svelte.d.ts +6 -4
- package/dist/recipes/modals/InputModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/StatusModal.svelte +14 -4
- package/dist/recipes/modals/StatusModal.svelte.d.ts +4 -2
- package/dist/recipes/modals/StatusModal.svelte.d.ts.map +1 -1
- package/dist/tokens/__tests__/variants.test.js +12 -4
- package/dist/tokens/variants.d.ts +4 -4
- package/dist/tokens/variants.js +4 -4
- package/dist/utils/formatters.d.ts +6 -0
- package/dist/utils/formatters.d.ts.map +1 -1
- package/dist/utils/formatters.js +8 -0
- package/dist/utils/phoneUtils.d.ts +35 -0
- package/dist/utils/phoneUtils.d.ts.map +1 -0
- package/dist/utils/phoneUtils.js +104 -0
- package/dist/utils/utils.js +25 -16
- package/package.json +6 -1
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
import Modal from "../../primitives/Modal/Modal.svelte";
|
|
6
6
|
import { typography } from '../../tokens/typography';
|
|
7
7
|
|
|
8
|
+
const defaultLabels = {
|
|
9
|
+
confirm: 'Confirm',
|
|
10
|
+
cancel: 'Cancel',
|
|
11
|
+
close: 'Close',
|
|
12
|
+
invalidEmail: 'Please enter a valid email address',
|
|
13
|
+
};
|
|
14
|
+
|
|
8
15
|
let {
|
|
9
16
|
open = $bindable(false),
|
|
10
17
|
size = "md", // "sm" | "md" | "lg" | "xl"
|
|
@@ -29,8 +36,8 @@
|
|
|
29
36
|
validateEmail = false, // Auto-validate email format
|
|
30
37
|
|
|
31
38
|
// Buttons
|
|
32
|
-
primaryButtonText =
|
|
33
|
-
secondaryButtonText =
|
|
39
|
+
primaryButtonText = undefined,
|
|
40
|
+
secondaryButtonText = undefined,
|
|
34
41
|
primaryButtonVariant = "blue-solid", // blue-solid | red-solid
|
|
35
42
|
|
|
36
43
|
// State
|
|
@@ -41,8 +48,13 @@
|
|
|
41
48
|
onconfirm,
|
|
42
49
|
oncancel,
|
|
43
50
|
onclose,
|
|
51
|
+
labels: userLabels = {},
|
|
44
52
|
} = $props();
|
|
45
53
|
|
|
54
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
55
|
+
let effectivePrimaryText = $derived(primaryButtonText ?? labels.confirm);
|
|
56
|
+
let effectiveSecondaryText = $derived(secondaryButtonText ?? labels.cancel);
|
|
57
|
+
|
|
46
58
|
// Email validation
|
|
47
59
|
const isValidEmail = (email) => {
|
|
48
60
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -84,7 +96,7 @@
|
|
|
84
96
|
{#if closeBtn}
|
|
85
97
|
<div class="flex justify-end -mt-2 -mr-2 mb-2">
|
|
86
98
|
<Button variant="icon" size="xs" onclick={handleClose} {disabled}>
|
|
87
|
-
<img src={Cancel} alt=
|
|
99
|
+
<img src={Cancel} alt={labels.close} class="w-5 h-5" />
|
|
88
100
|
</Button>
|
|
89
101
|
</div>
|
|
90
102
|
{/if}
|
|
@@ -144,7 +156,7 @@
|
|
|
144
156
|
{#if hasError && (errorMessage || emailError)}
|
|
145
157
|
<p class={`${typography.label} text-red-600 dark:text-red-400 mt-2 flex items-center gap-1`}>
|
|
146
158
|
<ExclamationTriangleOutline class="w-4 h-4" />
|
|
147
|
-
{emailError ?
|
|
159
|
+
{emailError ? labels.invalidEmail : errorMessage}
|
|
148
160
|
</p>
|
|
149
161
|
{:else if helpText && !hasError}
|
|
150
162
|
<p class={`${typography.xsMuted} pt-2`}>
|
|
@@ -157,14 +169,14 @@
|
|
|
157
169
|
|
|
158
170
|
{#snippet footer()}
|
|
159
171
|
<div class="flex gap-3">
|
|
160
|
-
{#if
|
|
172
|
+
{#if effectiveSecondaryText}
|
|
161
173
|
<Button
|
|
162
174
|
size="full"
|
|
163
175
|
variant="alternative"
|
|
164
176
|
onclick={handleSecondaryAction}
|
|
165
177
|
disabled={disabled || loading}
|
|
166
178
|
>
|
|
167
|
-
{
|
|
179
|
+
{effectiveSecondaryText}
|
|
168
180
|
</Button>
|
|
169
181
|
{/if}
|
|
170
182
|
|
|
@@ -175,7 +187,7 @@
|
|
|
175
187
|
disabled={isDisabled}
|
|
176
188
|
{loading}
|
|
177
189
|
>
|
|
178
|
-
{
|
|
190
|
+
{effectivePrimaryText}
|
|
179
191
|
</Button>
|
|
180
192
|
</div>
|
|
181
193
|
{/snippet}
|
|
@@ -21,14 +21,15 @@ declare const InputModal: import("svelte").Component<{
|
|
|
21
21
|
errorMessage?: string;
|
|
22
22
|
showError?: boolean;
|
|
23
23
|
validateEmail?: boolean;
|
|
24
|
-
primaryButtonText?:
|
|
25
|
-
secondaryButtonText?:
|
|
24
|
+
primaryButtonText?: any;
|
|
25
|
+
secondaryButtonText?: any;
|
|
26
26
|
primaryButtonVariant?: string;
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
loading?: boolean;
|
|
29
29
|
onconfirm: any;
|
|
30
30
|
oncancel: any;
|
|
31
31
|
onclose: any;
|
|
32
|
+
labels?: Record<string, any>;
|
|
32
33
|
}, {}, "open" | "inputValue">;
|
|
33
34
|
type $$ComponentProps = {
|
|
34
35
|
open?: boolean;
|
|
@@ -48,13 +49,14 @@ type $$ComponentProps = {
|
|
|
48
49
|
errorMessage?: string;
|
|
49
50
|
showError?: boolean;
|
|
50
51
|
validateEmail?: boolean;
|
|
51
|
-
primaryButtonText?:
|
|
52
|
-
secondaryButtonText?:
|
|
52
|
+
primaryButtonText?: any;
|
|
53
|
+
secondaryButtonText?: any;
|
|
53
54
|
primaryButtonVariant?: string;
|
|
54
55
|
disabled?: boolean;
|
|
55
56
|
loading?: boolean;
|
|
56
57
|
onconfirm: any;
|
|
57
58
|
oncancel: any;
|
|
58
59
|
onclose: any;
|
|
60
|
+
labels?: Record<string, any>;
|
|
59
61
|
};
|
|
60
62
|
//# sourceMappingURL=InputModal.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputModal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/modals/InputModal.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"InputModal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/modals/InputModal.svelte.js"],"names":[],"mappings":";;;;;AAiLA;WA1J4B,OAAO;WAAS,MAAM;YAAU,MAAM;kBAAgB,MAAM;eAAa,OAAO;iBAAe,OAAO;iBAAe,MAAM;uBAAqB,MAAM;gBAAc,MAAM;iBAAe,MAAM;oBAAkB,OAAO;gBAAc,MAAM;gBAAc,GAAG;eAAa,MAAM;mBAAiB,MAAM;gBAAc,OAAO;oBAAkB,OAAO;wBAAsB,GAAG;0BAAwB,GAAG;2BAAyB,MAAM;eAAa,OAAO;cAAY,OAAO;eAAa,GAAG;cAAY,GAAG;aAAW,GAAG;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;8BA0J7f;wBA1JtC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,iBAAiB,CAAC,EAAE,GAAG,CAAC;IAAC,mBAAmB,CAAC,EAAE,GAAG,CAAC;IAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
import Modal from "../../primitives/Modal/Modal.svelte";
|
|
6
6
|
import { typography } from '../../tokens/typography';
|
|
7
7
|
|
|
8
|
+
const defaultLabels = {
|
|
9
|
+
ok: 'Ok',
|
|
10
|
+
close: 'Close',
|
|
11
|
+
statusIcon: 'Status icon',
|
|
12
|
+
};
|
|
13
|
+
|
|
8
14
|
let {
|
|
9
15
|
open = $bindable(false),
|
|
10
16
|
size = "sm",
|
|
11
17
|
title = "",
|
|
12
18
|
subtitle = "",
|
|
13
19
|
description = "",
|
|
14
|
-
buttonText =
|
|
20
|
+
buttonText = undefined,
|
|
15
21
|
iconType = "success",
|
|
16
22
|
customIcon = null,
|
|
17
23
|
image = null,
|
|
@@ -22,9 +28,13 @@
|
|
|
22
28
|
closeBtn = false,
|
|
23
29
|
onconfirm,
|
|
24
30
|
onclose,
|
|
31
|
+
labels: userLabels = {},
|
|
25
32
|
...restProps
|
|
26
33
|
} = $props();
|
|
27
34
|
|
|
35
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
36
|
+
let effectiveButtonText = $derived(buttonText ?? labels.ok);
|
|
37
|
+
|
|
28
38
|
let effectiveVariant = $derived(variant || iconType);
|
|
29
39
|
let isProfileMode = $derived(!!image);
|
|
30
40
|
|
|
@@ -117,7 +127,7 @@
|
|
|
117
127
|
{#if closeBtn}
|
|
118
128
|
<div class="flex justify-end -mt-2 -mr-2 mb-2">
|
|
119
129
|
<Button variant="icon" size="xs" onclick={handleClose} {disabled}>
|
|
120
|
-
<img src={Cancel} alt=
|
|
130
|
+
<img src={Cancel} alt={labels.close} class="w-5 h-5" />
|
|
121
131
|
</Button>
|
|
122
132
|
</div>
|
|
123
133
|
{/if}
|
|
@@ -141,7 +151,7 @@
|
|
|
141
151
|
<div class="flex justify-center items-center">
|
|
142
152
|
{#if customIcon}
|
|
143
153
|
<div class="w-14 h-14 rounded-full {colors.bg} flex items-center justify-center">
|
|
144
|
-
<img src={customIcon} alt=
|
|
154
|
+
<img src={customIcon} alt={labels.statusIcon} class="w-8 h-8" />
|
|
145
155
|
</div>
|
|
146
156
|
{:else}
|
|
147
157
|
<div class="w-14 h-14 rounded-full {colors.bg} flex items-center justify-center">
|
|
@@ -198,7 +208,7 @@
|
|
|
198
208
|
{loading}
|
|
199
209
|
onclick={handleButtonClick}
|
|
200
210
|
>
|
|
201
|
-
{
|
|
211
|
+
{effectiveButtonText}
|
|
202
212
|
</Button>
|
|
203
213
|
{/if}
|
|
204
214
|
</div>
|
|
@@ -9,7 +9,7 @@ declare const StatusModal: import("svelte").Component<{
|
|
|
9
9
|
title?: string;
|
|
10
10
|
subtitle?: string;
|
|
11
11
|
description?: string;
|
|
12
|
-
buttonText?:
|
|
12
|
+
buttonText?: any;
|
|
13
13
|
iconType?: string;
|
|
14
14
|
customIcon?: any;
|
|
15
15
|
image?: any;
|
|
@@ -20,6 +20,7 @@ declare const StatusModal: import("svelte").Component<{
|
|
|
20
20
|
closeBtn?: boolean;
|
|
21
21
|
onconfirm: any;
|
|
22
22
|
onclose: any;
|
|
23
|
+
labels?: Record<string, any>;
|
|
23
24
|
} & Record<string, any>, {}, "open">;
|
|
24
25
|
type $$ComponentProps = {
|
|
25
26
|
open?: boolean;
|
|
@@ -27,7 +28,7 @@ type $$ComponentProps = {
|
|
|
27
28
|
title?: string;
|
|
28
29
|
subtitle?: string;
|
|
29
30
|
description?: string;
|
|
30
|
-
buttonText?:
|
|
31
|
+
buttonText?: any;
|
|
31
32
|
iconType?: string;
|
|
32
33
|
customIcon?: any;
|
|
33
34
|
image?: any;
|
|
@@ -38,5 +39,6 @@ type $$ComponentProps = {
|
|
|
38
39
|
closeBtn?: boolean;
|
|
39
40
|
onconfirm: any;
|
|
40
41
|
onclose: any;
|
|
42
|
+
labels?: Record<string, any>;
|
|
41
43
|
} & Record<string, any>;
|
|
42
44
|
//# sourceMappingURL=StatusModal.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusModal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/modals/StatusModal.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"StatusModal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/recipes/modals/StatusModal.svelte.js"],"names":[],"mappings":";;;;;AAoNA;WA9L4B,OAAO;WAAS,MAAM;YAAU,MAAM;eAAa,MAAM;kBAAgB,MAAM;iBAAe,GAAG;eAAa,MAAM;iBAAe,GAAG;YAAU,GAAG;eAAa,OAAO;cAAY,OAAO;cAAY,GAAG;cAAY,GAAG,EAAE;eAAa,OAAO;eAAa,GAAG;aAAW,GAAG;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;qCA8L5Q;wBA9LvC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC"}
|
|
@@ -82,25 +82,33 @@ describe('color variant tokens', () => {
|
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
describe('alertColorVariants', () => {
|
|
85
|
-
it('has info variant with blue-50 background', () => {
|
|
85
|
+
it('has info variant with blue-50 background and border', () => {
|
|
86
86
|
expect(alertColorVariants.info).toContain('text-blue-800');
|
|
87
87
|
expect(alertColorVariants.info).toContain('bg-blue-50');
|
|
88
|
+
expect(alertColorVariants.info).toContain('border-blue-300');
|
|
88
89
|
expect(alertColorVariants.info).toContain('dark:bg-gray-800');
|
|
89
90
|
expect(alertColorVariants.info).toContain('dark:text-blue-400');
|
|
91
|
+
expect(alertColorVariants.info).toContain('dark:border-blue-800');
|
|
90
92
|
});
|
|
91
|
-
it('has success variant with green-50 background', () => {
|
|
93
|
+
it('has success variant with green-50 background and border', () => {
|
|
92
94
|
expect(alertColorVariants.success).toContain('text-green-800');
|
|
93
95
|
expect(alertColorVariants.success).toContain('bg-green-50');
|
|
96
|
+
expect(alertColorVariants.success).toContain('border-green-300');
|
|
97
|
+
expect(alertColorVariants.success).toContain('dark:bg-gray-800');
|
|
94
98
|
expect(alertColorVariants.success).toContain('dark:text-green-400');
|
|
95
99
|
});
|
|
96
|
-
it('has warning variant with yellow-50 background', () => {
|
|
100
|
+
it('has warning variant with yellow-50 background and border', () => {
|
|
97
101
|
expect(alertColorVariants.warning).toContain('text-yellow-800');
|
|
98
102
|
expect(alertColorVariants.warning).toContain('bg-yellow-50');
|
|
103
|
+
expect(alertColorVariants.warning).toContain('border-yellow-300');
|
|
104
|
+
expect(alertColorVariants.warning).toContain('dark:bg-gray-800');
|
|
99
105
|
expect(alertColorVariants.warning).toContain('dark:text-yellow-300');
|
|
100
106
|
});
|
|
101
|
-
it('has danger variant with red-50 background', () => {
|
|
107
|
+
it('has danger variant with red-50 background and border', () => {
|
|
102
108
|
expect(alertColorVariants.danger).toContain('text-red-800');
|
|
103
109
|
expect(alertColorVariants.danger).toContain('bg-red-50');
|
|
110
|
+
expect(alertColorVariants.danger).toContain('border-red-300');
|
|
111
|
+
expect(alertColorVariants.danger).toContain('dark:bg-gray-800');
|
|
104
112
|
expect(alertColorVariants.danger).toContain('dark:text-red-400');
|
|
105
113
|
});
|
|
106
114
|
it('has exactly 4 variants', () => {
|
|
@@ -34,10 +34,10 @@ export type BadgeColorVariant = keyof typeof badgeColorVariants;
|
|
|
34
34
|
* Alert color variants - slightly different pattern (uses bg-*-50).
|
|
35
35
|
*/
|
|
36
36
|
export declare const alertColorVariants: {
|
|
37
|
-
readonly info: "text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400";
|
|
38
|
-
readonly success: "text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400";
|
|
39
|
-
readonly warning: "text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300";
|
|
40
|
-
readonly danger: "text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400";
|
|
37
|
+
readonly info: "text-blue-800 border border-blue-300 bg-blue-50 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-800";
|
|
38
|
+
readonly success: "text-green-800 border border-green-300 bg-green-50 dark:bg-gray-800 dark:text-green-400 dark:border-green-800";
|
|
39
|
+
readonly warning: "text-yellow-800 border border-yellow-300 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300 dark:border-yellow-700";
|
|
40
|
+
readonly danger: "text-red-800 border border-red-300 bg-red-50 dark:bg-gray-800 dark:text-red-400 dark:border-red-800";
|
|
41
41
|
};
|
|
42
42
|
export type AlertColorVariant = keyof typeof alertColorVariants;
|
|
43
43
|
/**
|
package/dist/tokens/variants.js
CHANGED
|
@@ -36,10 +36,10 @@ export const badgeColorVariants = {
|
|
|
36
36
|
* Alert color variants - slightly different pattern (uses bg-*-50).
|
|
37
37
|
*/
|
|
38
38
|
export const alertColorVariants = {
|
|
39
|
-
info: 'text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400',
|
|
40
|
-
success: 'text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400',
|
|
41
|
-
warning: 'text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300',
|
|
42
|
-
danger: 'text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400',
|
|
39
|
+
info: 'text-blue-800 border border-blue-300 bg-blue-50 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-800',
|
|
40
|
+
success: 'text-green-800 border border-green-300 bg-green-50 dark:bg-gray-800 dark:text-green-400 dark:border-green-800',
|
|
41
|
+
warning: 'text-yellow-800 border border-yellow-300 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300 dark:border-yellow-700',
|
|
42
|
+
danger: 'text-red-800 border border-red-300 bg-red-50 dark:bg-gray-800 dark:text-red-400 dark:border-red-800',
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
45
|
* Alert close button color variants - specific hover states per type.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rounds a number to 2 decimal places (cents precision).
|
|
3
|
+
* Use after any arithmetic on currency values to avoid IEEE 754 drift.
|
|
4
|
+
* e.g. roundCurrency(167.79999999999) → 167.8
|
|
5
|
+
*/
|
|
6
|
+
export declare function roundCurrency(value: number): number;
|
|
1
7
|
/**
|
|
2
8
|
* Format a credit card number with spaces every 4 digits
|
|
3
9
|
* @param value - Raw input (digits only)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOvD"}
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOvD"}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rounds a number to 2 decimal places (cents precision).
|
|
3
|
+
* Use after any arithmetic on currency values to avoid IEEE 754 drift.
|
|
4
|
+
* e.g. roundCurrency(167.79999999999) → 167.8
|
|
5
|
+
*/
|
|
6
|
+
export function roundCurrency(value) {
|
|
7
|
+
return Math.round(value * 100) / 100;
|
|
8
|
+
}
|
|
1
9
|
/**
|
|
2
10
|
* Format a credit card number with spaces every 4 digits
|
|
3
11
|
* @param value - Raw input (digits only)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CountryCode } from 'libphonenumber-js/min';
|
|
2
|
+
export interface ParsedPhone {
|
|
3
|
+
countryCode: CountryCode;
|
|
4
|
+
nationalNumber: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Parse an E.164 string or bare 10-digit US number into country + national number.
|
|
8
|
+
* Returns null if unparseable.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseStoredPhone(value: string): ParsedPhone | null;
|
|
11
|
+
/**
|
|
12
|
+
* Format digits for display using the country's national format.
|
|
13
|
+
* e.g. formatNational('US', '5551234567') → '(555) 123-4567'
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatNational(isoCode: CountryCode, digits: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format digits as-you-type for live input formatting.
|
|
18
|
+
* e.g. formatAsYouType('US', '555123') → '(555) 123'
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatAsYouType(isoCode: CountryCode, digits: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Combine country code + national digits into E.164.
|
|
23
|
+
* e.g. toE164('US', '5551234567') → '+15551234567'
|
|
24
|
+
*/
|
|
25
|
+
export declare function toE164(isoCode: CountryCode, digits: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Validate a complete E.164 number.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isValidE164(value: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Backward-compat: normalize bare 10-digit US numbers to E.164.
|
|
32
|
+
* Already-E.164 numbers pass through unchanged.
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeIncoming(value: string): string;
|
|
35
|
+
//# sourceMappingURL=phoneUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phoneUtils.d.ts","sourceRoot":"","sources":["../../src/lib/utils/phoneUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CA4BlE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAI5E;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAWnE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQlD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOvD"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { AsYouType, parsePhoneNumber, isValidPhoneNumber } from 'libphonenumber-js/min';
|
|
2
|
+
/**
|
|
3
|
+
* Parse an E.164 string or bare 10-digit US number into country + national number.
|
|
4
|
+
* Returns null if unparseable.
|
|
5
|
+
*/
|
|
6
|
+
export function parseStoredPhone(value) {
|
|
7
|
+
if (!value)
|
|
8
|
+
return null;
|
|
9
|
+
// Bare 10-digit US number (legacy format)
|
|
10
|
+
const digits = value.replace(/\D/g, '');
|
|
11
|
+
if (digits.length === 10 && !value.startsWith('+')) {
|
|
12
|
+
return { countryCode: 'US', nationalNumber: digits };
|
|
13
|
+
}
|
|
14
|
+
// E.164 or other formatted number
|
|
15
|
+
try {
|
|
16
|
+
const parsed = parsePhoneNumber(value);
|
|
17
|
+
if (parsed && parsed.country) {
|
|
18
|
+
return {
|
|
19
|
+
countryCode: parsed.country,
|
|
20
|
+
nationalNumber: parsed.nationalNumber
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// Fall through
|
|
26
|
+
}
|
|
27
|
+
// +1 with 10 digits but parsePhoneNumber didn't resolve country (US/CA ambiguity)
|
|
28
|
+
if (value.startsWith('+1') && digits.length === 11) {
|
|
29
|
+
return { countryCode: 'US', nationalNumber: digits.slice(1) };
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Format digits for display using the country's national format.
|
|
35
|
+
* e.g. formatNational('US', '5551234567') → '(555) 123-4567'
|
|
36
|
+
*/
|
|
37
|
+
export function formatNational(isoCode, digits) {
|
|
38
|
+
if (!digits)
|
|
39
|
+
return '';
|
|
40
|
+
const formatter = new AsYouType(isoCode);
|
|
41
|
+
formatter.input(digits);
|
|
42
|
+
return formatter.getNumber()?.formatNational() ?? formatter.getNumber()?.number ?? digits;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Format digits as-you-type for live input formatting.
|
|
46
|
+
* e.g. formatAsYouType('US', '555123') → '(555) 123'
|
|
47
|
+
*/
|
|
48
|
+
export function formatAsYouType(isoCode, digits) {
|
|
49
|
+
if (!digits)
|
|
50
|
+
return '';
|
|
51
|
+
const formatter = new AsYouType(isoCode);
|
|
52
|
+
return formatter.input(digits);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Combine country code + national digits into E.164.
|
|
56
|
+
* e.g. toE164('US', '5551234567') → '+15551234567'
|
|
57
|
+
*/
|
|
58
|
+
export function toE164(isoCode, digits) {
|
|
59
|
+
if (!digits)
|
|
60
|
+
return '';
|
|
61
|
+
const clean = digits.replace(/\D/g, '');
|
|
62
|
+
if (!clean)
|
|
63
|
+
return '';
|
|
64
|
+
try {
|
|
65
|
+
const parsed = parsePhoneNumber(clean, isoCode);
|
|
66
|
+
if (parsed)
|
|
67
|
+
return parsed.format('E.164');
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// Fall through
|
|
71
|
+
}
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Validate a complete E.164 number.
|
|
76
|
+
*/
|
|
77
|
+
export function isValidE164(value) {
|
|
78
|
+
if (!value)
|
|
79
|
+
return false;
|
|
80
|
+
if (!value.startsWith('+'))
|
|
81
|
+
return false;
|
|
82
|
+
try {
|
|
83
|
+
return isValidPhoneNumber(value);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Backward-compat: normalize bare 10-digit US numbers to E.164.
|
|
91
|
+
* Already-E.164 numbers pass through unchanged.
|
|
92
|
+
*/
|
|
93
|
+
export function normalizeIncoming(value) {
|
|
94
|
+
if (!value)
|
|
95
|
+
return '';
|
|
96
|
+
if (value.startsWith('+'))
|
|
97
|
+
return value;
|
|
98
|
+
const digits = value.replace(/\D/g, '');
|
|
99
|
+
if (digits.length === 10)
|
|
100
|
+
return `+1${digits}`;
|
|
101
|
+
if (digits.length === 11 && digits.startsWith('1'))
|
|
102
|
+
return `+${digits}`;
|
|
103
|
+
return value;
|
|
104
|
+
}
|
package/dist/utils/utils.js
CHANGED
|
@@ -585,41 +585,50 @@ export const getRoleFromRoleOnStage = (roleOnStage) => {
|
|
|
585
585
|
};
|
|
586
586
|
|
|
587
587
|
// Format Event as Show for Listing data
|
|
588
|
+
// Handles both V1 (EventPerformer with event.Event) and V2 (PerformerInvite with event.event) shapes
|
|
588
589
|
export const formatEvent = (event) => {
|
|
590
|
+
// V2 uses lowercase "event", V1 uses uppercase "Event"
|
|
591
|
+
const eventData = event.event || event.Event;
|
|
592
|
+
|
|
589
593
|
// Get venue stage name (the physical stage at the venue, e.g., "Main Room", "Showroom")
|
|
590
594
|
// Not to be confused with performer's stage name (their performance alias)
|
|
591
|
-
const venueStageName =
|
|
595
|
+
const venueStageName = eventData?.stage?.name || eventData?.stage?.googleName || eventData?.googleName || "";
|
|
592
596
|
|
|
593
597
|
// Handle potentially undefined venue address
|
|
594
|
-
const venueAddress =
|
|
598
|
+
const venueAddress = eventData?.venue?.address || "";
|
|
595
599
|
|
|
596
600
|
// Map roleOnStage number to role name string
|
|
597
601
|
const role = getRoleFromRoleOnStage(event.roleOnStage);
|
|
598
602
|
|
|
599
603
|
// Get custom booking notification message from venue (set in venue edit page)
|
|
600
|
-
const bookingMessage =
|
|
604
|
+
const bookingMessage = eventData?.venue?.booking_notification || "No additional details available.";
|
|
605
|
+
|
|
606
|
+
// V2 returns "status" string, V1 returns numeric "acceptedState"
|
|
607
|
+
const status = event.status || (event.acceptedState !== undefined ? { 0: "invited", 2: "confirmed", 1: "declined", 3: "declined", 4: "cancelled" }[event.acceptedState] : "unknown");
|
|
608
|
+
|
|
609
|
+
const setLength = event.setLength ?? 0;
|
|
601
610
|
|
|
602
611
|
return {
|
|
603
|
-
eventId:
|
|
604
|
-
venueId:
|
|
605
|
-
title:
|
|
612
|
+
eventId: eventData?.ID,
|
|
613
|
+
venueId: eventData?.venue?.ID,
|
|
614
|
+
title: eventData?.title,
|
|
606
615
|
role: role,
|
|
607
|
-
startDateTime:
|
|
608
|
-
|
|
609
|
-
doorsOpenTime:
|
|
610
|
-
spotDuration: `${
|
|
611
|
-
venueName:
|
|
616
|
+
startDateTime: eventData?.startDateTime,
|
|
617
|
+
status: status,
|
|
618
|
+
doorsOpenTime: eventData?.doorsOpenTime,
|
|
619
|
+
spotDuration: `${setLength} min spot`,
|
|
620
|
+
venueName: eventData?.venue?.name,
|
|
612
621
|
location: venueAddress,
|
|
613
|
-
id: event.invitationId,
|
|
614
|
-
image:
|
|
622
|
+
id: event.invitationId || String(event.id || event.ID),
|
|
623
|
+
image: eventData?.image,
|
|
615
624
|
details: {
|
|
616
|
-
venue:
|
|
625
|
+
venue: eventData?.venue?.name,
|
|
617
626
|
stageName: venueStageName,
|
|
618
627
|
address: venueAddress,
|
|
619
|
-
setLength: `${
|
|
628
|
+
setLength: `${setLength} min`,
|
|
620
629
|
eventDetails: bookingMessage,
|
|
621
630
|
},
|
|
622
|
-
lastUpdated: event.UpdatedAt,
|
|
631
|
+
lastUpdated: event.updatedAt || event.UpdatedAt,
|
|
623
632
|
};
|
|
624
633
|
};
|
|
625
634
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmicdrop/svelte-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.1",
|
|
4
4
|
"description": "Shared component library for Micdrop applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -107,6 +107,10 @@
|
|
|
107
107
|
"./utils/imageValidation": {
|
|
108
108
|
"import": "./dist/utils/imageValidation.js"
|
|
109
109
|
},
|
|
110
|
+
"./utils/phoneUtils": {
|
|
111
|
+
"types": "./dist/utils/phoneUtils.d.ts",
|
|
112
|
+
"import": "./dist/utils/phoneUtils.js"
|
|
113
|
+
},
|
|
110
114
|
"./utils/portal": {
|
|
111
115
|
"import": "./dist/utils/portal.js"
|
|
112
116
|
},
|
|
@@ -227,6 +231,7 @@
|
|
|
227
231
|
"filepond-plugin-image-exif-orientation": "^1.0.11",
|
|
228
232
|
"filepond-plugin-image-preview": "^4.6.12",
|
|
229
233
|
"jwt-decode": "^4.0.0",
|
|
234
|
+
"libphonenumber-js": "^1.12.38",
|
|
230
235
|
"sortablejs": "^1.15.6",
|
|
231
236
|
"svelte-easy-crop": "^5.0.0",
|
|
232
237
|
"svelte-filepond": "^0.2.2",
|