@getmicdrop/svelte-components 2.0.4 → 2.0.6
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/components/Alert/Alert.spec.js +170 -170
- package/dist/components/Badges/Badge.spec.js +103 -103
- package/dist/components/BottomSheet/BottomSheet.spec.js +127 -127
- package/dist/components/Breadcrumb/Breadcrumb.spec.js +120 -120
- package/dist/components/Button/Button.spec.js +211 -211
- package/dist/components/Button/ButtonSaveDemo.spec.js +48 -48
- package/dist/components/Calendar/Calendar.spec.js +131 -131
- package/dist/components/Calendar/QuarterView.spec.js +394 -394
- package/dist/components/Card.spec.js +47 -47
- package/dist/components/CropImage/CropImage.spec.js +216 -216
- package/dist/components/DarkModeToggle.spec.js +357 -357
- package/dist/components/ErrorDisplay.spec.js +69 -69
- package/dist/components/FormActions.spec.js +88 -88
- package/dist/components/FormValidationSummary.spec.js +203 -203
- package/dist/components/Icons/Icon.spec.js +175 -175
- package/dist/components/Icons/MoreHori.spec.js +67 -67
- package/dist/components/Icons/WarningIcon.spec.js +30 -30
- package/dist/components/Input/Input.spec.js +573 -573
- package/dist/components/Input/MultiSelect.spec.js +257 -257
- package/dist/components/Input/OTPInput.spec.js +238 -238
- package/dist/components/Input/Select.spec.js +218 -218
- package/dist/components/Layout/BottomNav.spec.js +130 -130
- package/dist/components/Layout/Header.spec.js +203 -203
- package/dist/components/Modal/ConfirmationModal.spec.js +191 -191
- package/dist/components/Modal/Modal.spec.js +95 -95
- package/dist/components/Modal/ModalStateManager.spec.js +100 -100
- package/dist/components/PageLoader.spec.js +54 -54
- package/dist/components/PasswordStrengthIndicator/PasswordStrengthIndicator.spec.js +173 -173
- package/dist/components/PlaceAutocomplete/PlaceAutocomplete.spec.js +300 -300
- package/dist/components/Spinner/Spinner.spec.js +75 -75
- package/dist/components/StatusIndicator/StatusIndicator.spec.js +129 -129
- package/dist/components/Toaster/Toaster.stories.svelte +1 -1
- package/dist/components/Toggle.spec.js +158 -158
- package/dist/components/ValidationError.spec.js +79 -79
- package/dist/components/pages/performers/AvailabilityCalendarModal.spec.js +606 -606
- package/dist/components/pages/performers/AvailabilityCalendarModal.svelte +4 -4
- package/dist/components/pages/performers/ModalShowInfo.spec.js +124 -124
- package/dist/components/pages/performers/ModalShowInfo.svelte +1 -1
- package/dist/components/pages/performers/PageBackButton.spec.js +89 -89
- package/dist/components/pages/performers/SectionHeader.spec.js +75 -75
- package/dist/components/pages/performers/ShowDetails.spec.js +166 -166
- package/dist/components/pages/performers/ShowItemCard.spec.js +793 -793
- package/dist/components/pages/performers/ShowItemCard.svelte +4 -4
- package/dist/components/pages/performers/SwitchOption.spec.js +127 -127
- package/dist/components/pages/performers/VenueInfo.spec.js +167 -167
- package/dist/components/pages/performers/VenueInfo.svelte +1 -1
- package/dist/components/pages/performers/VenueItemCard.spec.js +763 -763
- package/dist/components/pages/performers/VenueItemCard.svelte +4 -4
- package/dist/components/pages/profile/profile-form.spec.js +9 -9
- package/dist/components/pages/settings/tabs/CustomImageDropzone.svelte +3 -3
- package/dist/components/pages/shows/ShowList.spec.js +33 -33
- package/dist/components/pages/shows/TabContent.spec.js +90 -90
- package/dist/components/pages/shows/TabNavigation.spec.js +143 -143
- package/dist/config.js +5 -5
- package/dist/config.spec.js +29 -29
- package/dist/constants/formOptions.js +25 -25
- package/dist/constants/formOptions.spec.js +88 -88
- package/dist/index.js +111 -111
- package/dist/stores/auth.d.ts +9 -0
- package/dist/stores/auth.d.ts.map +1 -0
- package/dist/stores/auth.js +36 -0
- package/dist/stores/auth.spec.d.ts +2 -0
- package/dist/stores/auth.spec.d.ts.map +1 -0
- package/dist/stores/auth.spec.js +139 -0
- package/dist/stores/formDataStore.d.ts +17 -0
- package/dist/stores/formDataStore.d.ts.map +1 -0
- package/dist/stores/formDataStore.js +25 -0
- package/dist/stores/formDataStore.spec.d.ts +2 -0
- package/dist/stores/formDataStore.spec.d.ts.map +1 -0
- package/dist/stores/formDataStore.spec.js +257 -0
- package/dist/stores/formSave.d.ts +24 -0
- package/dist/stores/formSave.d.ts.map +1 -0
- package/dist/stores/formSave.js +132 -0
- package/dist/stores/formSave.spec.d.ts +2 -0
- package/dist/stores/formSave.spec.d.ts.map +1 -0
- package/dist/stores/formSave.spec.js +296 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/stores/index.js +0 -0
- package/dist/stores/navigation.d.ts +5 -0
- package/dist/stores/navigation.d.ts.map +1 -0
- package/dist/stores/navigation.js +12 -0
- package/dist/stores/navigation.spec.d.ts +2 -0
- package/dist/stores/navigation.spec.d.ts.map +1 -0
- package/dist/stores/navigation.spec.js +136 -0
- package/dist/stores/toaster.d.ts +4 -0
- package/dist/stores/toaster.d.ts.map +1 -0
- package/dist/stores/toaster.js +13 -0
- package/dist/stores/toaster.spec.d.ts +2 -0
- package/dist/stores/toaster.spec.d.ts.map +1 -0
- package/dist/stores/toaster.spec.js +59 -0
- package/dist/telemetry.js +357 -357
- package/dist/telemetry.server.js +211 -211
- package/dist/telemetry.server.spec.js +434 -434
- package/dist/telemetry.spec.js +660 -660
- package/dist/utils/apiConfig.js +49 -49
- package/dist/utils/apiConfig.spec.js +118 -118
- package/dist/utils/greetings.js +187 -187
- package/dist/utils/greetings.spec.js +337 -337
- package/dist/utils/imageValidation.js +121 -121
- package/dist/utils/imageValidation.spec.js +220 -220
- package/dist/utils/portal.js +25 -25
- package/dist/utils/portal.spec.js +143 -143
- package/dist/utils/utils/utils.js +323 -323
- package/dist/utils/utils/utils.spec.js +698 -698
- package/dist/utils/utils.spec.js +643 -643
- package/package.json +1 -1
package/dist/config.spec.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
|
|
3
|
-
describe('config.js', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
vi.resetModules();
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it('exports API_BASE_URL', async () => {
|
|
9
|
-
const config = await import('./config.js');
|
|
10
|
-
expect(config.API_BASE_URL).toBeDefined();
|
|
11
|
-
expect(typeof config.API_BASE_URL).toBe('string');
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('exports PUBLIC_GOOGLE_MAPS_API_KEY', async () => {
|
|
15
|
-
const config = await import('./config.js');
|
|
16
|
-
expect(config.PUBLIC_GOOGLE_MAPS_API_KEY).toBeDefined();
|
|
17
|
-
expect(typeof config.PUBLIC_GOOGLE_MAPS_API_KEY).toBe('string');
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('uses default API_BASE_URL when env var not set', async () => {
|
|
21
|
-
const config = await import('./config.js');
|
|
22
|
-
expect(config.API_BASE_URL).toContain('get-micdrop.com');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('uses default Google Maps key when env var not set', async () => {
|
|
26
|
-
const config = await import('./config.js');
|
|
27
|
-
expect(config.PUBLIC_GOOGLE_MAPS_API_KEY).toContain('AIzaSy');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('config.js', () => {
|
|
4
|
+
beforeEach(() => {
|
|
5
|
+
vi.resetModules();
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('exports API_BASE_URL', async () => {
|
|
9
|
+
const config = await import('./config.js');
|
|
10
|
+
expect(config.API_BASE_URL).toBeDefined();
|
|
11
|
+
expect(typeof config.API_BASE_URL).toBe('string');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('exports PUBLIC_GOOGLE_MAPS_API_KEY', async () => {
|
|
15
|
+
const config = await import('./config.js');
|
|
16
|
+
expect(config.PUBLIC_GOOGLE_MAPS_API_KEY).toBeDefined();
|
|
17
|
+
expect(typeof config.PUBLIC_GOOGLE_MAPS_API_KEY).toBe('string');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('uses default API_BASE_URL when env var not set', async () => {
|
|
21
|
+
const config = await import('./config.js');
|
|
22
|
+
expect(config.API_BASE_URL).toContain('get-micdrop.com');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('uses default Google Maps key when env var not set', async () => {
|
|
26
|
+
const config = await import('./config.js');
|
|
27
|
+
expect(config.PUBLIC_GOOGLE_MAPS_API_KEY).toContain('AIzaSy');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Form options for dropdowns used across the performers portal.
|
|
3
|
-
* Use these with Select and MultiSelect components instead of
|
|
4
|
-
* creating wrapper components like GenderInput or EthnicityDropdown.
|
|
5
|
-
*
|
|
6
|
-
* Example:
|
|
7
|
-
* import { GENDER_OPTIONS } from './formOptions';
|
|
8
|
-
* <Select items={GENDER_OPTIONS} label="Gender" />
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export const GENDER_OPTIONS = [
|
|
12
|
-
{ name: "Male", value: 1 },
|
|
13
|
-
{ name: "Female", value: 2 },
|
|
14
|
-
{ name: "Non-Binary", value: 3 },
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
export const ETHNICITY_OPTIONS = [
|
|
18
|
-
{ name: "American Indian or Alaska Native", value: 0 },
|
|
19
|
-
{ name: "Asian", value: 1 },
|
|
20
|
-
{ name: "Black or African American", value: 2 },
|
|
21
|
-
{ name: "Hispanic or Latino", value: 3 },
|
|
22
|
-
{ name: "Middle Eastern or North African", value: 4 },
|
|
23
|
-
{ name: "Native Hawaiian or Pacific Islander", value: 5 },
|
|
24
|
-
{ name: "White", value: 6 },
|
|
25
|
-
];
|
|
1
|
+
/**
|
|
2
|
+
* Form options for dropdowns used across the performers portal.
|
|
3
|
+
* Use these with Select and MultiSelect components instead of
|
|
4
|
+
* creating wrapper components like GenderInput or EthnicityDropdown.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
* import { GENDER_OPTIONS } from './formOptions';
|
|
8
|
+
* <Select items={GENDER_OPTIONS} label="Gender" />
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const GENDER_OPTIONS = [
|
|
12
|
+
{ name: "Male", value: 1 },
|
|
13
|
+
{ name: "Female", value: 2 },
|
|
14
|
+
{ name: "Non-Binary", value: 3 },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const ETHNICITY_OPTIONS = [
|
|
18
|
+
{ name: "American Indian or Alaska Native", value: 0 },
|
|
19
|
+
{ name: "Asian", value: 1 },
|
|
20
|
+
{ name: "Black or African American", value: 2 },
|
|
21
|
+
{ name: "Hispanic or Latino", value: 3 },
|
|
22
|
+
{ name: "Middle Eastern or North African", value: 4 },
|
|
23
|
+
{ name: "Native Hawaiian or Pacific Islander", value: 5 },
|
|
24
|
+
{ name: "White", value: 6 },
|
|
25
|
+
];
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { GENDER_OPTIONS, ETHNICITY_OPTIONS } from './formOptions.js';
|
|
3
|
-
|
|
4
|
-
describe('formOptions', () => {
|
|
5
|
-
describe('GENDER_OPTIONS', () => {
|
|
6
|
-
it('exports gender options array', () => {
|
|
7
|
-
expect(GENDER_OPTIONS).toBeDefined();
|
|
8
|
-
expect(Array.isArray(GENDER_OPTIONS)).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it('has three options', () => {
|
|
12
|
-
expect(GENDER_OPTIONS.length).toBe(3);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
it('contains Male option with value 1', () => {
|
|
16
|
-
const male = GENDER_OPTIONS.find(opt => opt.name === 'Male');
|
|
17
|
-
expect(male).toBeDefined();
|
|
18
|
-
expect(male.value).toBe(1);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('contains Female option with value 2', () => {
|
|
22
|
-
const female = GENDER_OPTIONS.find(opt => opt.name === 'Female');
|
|
23
|
-
expect(female).toBeDefined();
|
|
24
|
-
expect(female.value).toBe(2);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('contains Non-Binary option with value 3', () => {
|
|
28
|
-
const nonBinary = GENDER_OPTIONS.find(opt => opt.name === 'Non-Binary');
|
|
29
|
-
expect(nonBinary).toBeDefined();
|
|
30
|
-
expect(nonBinary.value).toBe(3);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('each option has name and value properties', () => {
|
|
34
|
-
GENDER_OPTIONS.forEach(option => {
|
|
35
|
-
expect(option).toHaveProperty('name');
|
|
36
|
-
expect(option).toHaveProperty('value');
|
|
37
|
-
expect(typeof option.name).toBe('string');
|
|
38
|
-
expect(typeof option.value).toBe('number');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
describe('ETHNICITY_OPTIONS', () => {
|
|
44
|
-
it('exports ethnicity options array', () => {
|
|
45
|
-
expect(ETHNICITY_OPTIONS).toBeDefined();
|
|
46
|
-
expect(Array.isArray(ETHNICITY_OPTIONS)).toBe(true);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('has seven options', () => {
|
|
50
|
-
expect(ETHNICITY_OPTIONS.length).toBe(7);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('contains all expected ethnicities', () => {
|
|
54
|
-
const names = ETHNICITY_OPTIONS.map(opt => opt.name);
|
|
55
|
-
expect(names).toContain('American Indian or Alaska Native');
|
|
56
|
-
expect(names).toContain('Asian');
|
|
57
|
-
expect(names).toContain('Black or African American');
|
|
58
|
-
expect(names).toContain('Hispanic or Latino');
|
|
59
|
-
expect(names).toContain('Middle Eastern or North African');
|
|
60
|
-
expect(names).toContain('Native Hawaiian or Pacific Islander');
|
|
61
|
-
expect(names).toContain('White');
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('has values 0 through 6', () => {
|
|
65
|
-
const values = ETHNICITY_OPTIONS.map(opt => opt.value).sort((a, b) => a - b);
|
|
66
|
-
expect(values).toEqual([0, 1, 2, 3, 4, 5, 6]);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('each option has name and value properties', () => {
|
|
70
|
-
ETHNICITY_OPTIONS.forEach(option => {
|
|
71
|
-
expect(option).toHaveProperty('name');
|
|
72
|
-
expect(option).toHaveProperty('value');
|
|
73
|
-
expect(typeof option.name).toBe('string');
|
|
74
|
-
expect(typeof option.value).toBe('number');
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it('American Indian or Alaska Native has value 0', () => {
|
|
79
|
-
const option = ETHNICITY_OPTIONS.find(opt => opt.name === 'American Indian or Alaska Native');
|
|
80
|
-
expect(option.value).toBe(0);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('White has value 6', () => {
|
|
84
|
-
const option = ETHNICITY_OPTIONS.find(opt => opt.name === 'White');
|
|
85
|
-
expect(option.value).toBe(6);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { GENDER_OPTIONS, ETHNICITY_OPTIONS } from './formOptions.js';
|
|
3
|
+
|
|
4
|
+
describe('formOptions', () => {
|
|
5
|
+
describe('GENDER_OPTIONS', () => {
|
|
6
|
+
it('exports gender options array', () => {
|
|
7
|
+
expect(GENDER_OPTIONS).toBeDefined();
|
|
8
|
+
expect(Array.isArray(GENDER_OPTIONS)).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('has three options', () => {
|
|
12
|
+
expect(GENDER_OPTIONS.length).toBe(3);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('contains Male option with value 1', () => {
|
|
16
|
+
const male = GENDER_OPTIONS.find(opt => opt.name === 'Male');
|
|
17
|
+
expect(male).toBeDefined();
|
|
18
|
+
expect(male.value).toBe(1);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('contains Female option with value 2', () => {
|
|
22
|
+
const female = GENDER_OPTIONS.find(opt => opt.name === 'Female');
|
|
23
|
+
expect(female).toBeDefined();
|
|
24
|
+
expect(female.value).toBe(2);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('contains Non-Binary option with value 3', () => {
|
|
28
|
+
const nonBinary = GENDER_OPTIONS.find(opt => opt.name === 'Non-Binary');
|
|
29
|
+
expect(nonBinary).toBeDefined();
|
|
30
|
+
expect(nonBinary.value).toBe(3);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('each option has name and value properties', () => {
|
|
34
|
+
GENDER_OPTIONS.forEach(option => {
|
|
35
|
+
expect(option).toHaveProperty('name');
|
|
36
|
+
expect(option).toHaveProperty('value');
|
|
37
|
+
expect(typeof option.name).toBe('string');
|
|
38
|
+
expect(typeof option.value).toBe('number');
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
describe('ETHNICITY_OPTIONS', () => {
|
|
44
|
+
it('exports ethnicity options array', () => {
|
|
45
|
+
expect(ETHNICITY_OPTIONS).toBeDefined();
|
|
46
|
+
expect(Array.isArray(ETHNICITY_OPTIONS)).toBe(true);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('has seven options', () => {
|
|
50
|
+
expect(ETHNICITY_OPTIONS.length).toBe(7);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('contains all expected ethnicities', () => {
|
|
54
|
+
const names = ETHNICITY_OPTIONS.map(opt => opt.name);
|
|
55
|
+
expect(names).toContain('American Indian or Alaska Native');
|
|
56
|
+
expect(names).toContain('Asian');
|
|
57
|
+
expect(names).toContain('Black or African American');
|
|
58
|
+
expect(names).toContain('Hispanic or Latino');
|
|
59
|
+
expect(names).toContain('Middle Eastern or North African');
|
|
60
|
+
expect(names).toContain('Native Hawaiian or Pacific Islander');
|
|
61
|
+
expect(names).toContain('White');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('has values 0 through 6', () => {
|
|
65
|
+
const values = ETHNICITY_OPTIONS.map(opt => opt.value).sort((a, b) => a - b);
|
|
66
|
+
expect(values).toEqual([0, 1, 2, 3, 4, 5, 6]);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('each option has name and value properties', () => {
|
|
70
|
+
ETHNICITY_OPTIONS.forEach(option => {
|
|
71
|
+
expect(option).toHaveProperty('name');
|
|
72
|
+
expect(option).toHaveProperty('value');
|
|
73
|
+
expect(typeof option.name).toBe('string');
|
|
74
|
+
expect(typeof option.value).toBe('number');
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('American Indian or Alaska Native has value 0', () => {
|
|
79
|
+
const option = ETHNICITY_OPTIONS.find(opt => opt.name === 'American Indian or Alaska Native');
|
|
80
|
+
expect(option.value).toBe(0);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('White has value 6', () => {
|
|
84
|
+
const option = ETHNICITY_OPTIONS.find(opt => opt.name === 'White');
|
|
85
|
+
expect(option.value).toBe(6);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
// Core Components
|
|
2
|
-
export { default as Alert } from './components/Alert/Alert.svelte';
|
|
3
|
-
export { default as Badge } from './components/Badges/Badge.svelte';
|
|
4
|
-
export { default as BottomSheet } from './components/BottomSheet/BottomSheet.svelte';
|
|
5
|
-
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.svelte';
|
|
6
|
-
export { default as Button } from './components/Button/Button.svelte';
|
|
7
|
-
export { default as ButtonSaveDemo } from './components/Button/ButtonSaveDemo.svelte';
|
|
8
|
-
export { default as Card } from './components/Card.svelte';
|
|
9
|
-
export { default as DarkModeToggle } from './components/DarkModeToggle.svelte';
|
|
10
|
-
export { default as ErrorDisplay } from './components/ErrorDisplay.svelte';
|
|
11
|
-
export { default as FormActions } from './components/FormActions.svelte';
|
|
12
|
-
export { default as FormValidationSummary } from './components/FormValidationSummary.svelte';
|
|
13
|
-
export { default as PageLoader } from './components/PageLoader.svelte';
|
|
14
|
-
export { default as Toggle } from './components/Toggle.svelte';
|
|
15
|
-
export { default as ValidationError } from './components/ValidationError.svelte';
|
|
16
|
-
|
|
17
|
-
// Calendar Components
|
|
18
|
-
export { default as Calendar } from './components/Calendar/Calendar.svelte';
|
|
19
|
-
export { default as QuarterView } from './components/Calendar/QuarterView.svelte';
|
|
20
|
-
|
|
21
|
-
// CropImage
|
|
22
|
-
export { default as CropImage } from './components/CropImage/CropImage.svelte';
|
|
23
|
-
|
|
24
|
-
// Icons
|
|
25
|
-
export { default as Icon } from './components/Icons/Icon.svelte';
|
|
26
|
-
export { default as ArrowLeft } from './components/Icons/ArrowLeft.svelte';
|
|
27
|
-
export { default as ArrowRight } from './components/Icons/ArrowRight.svelte';
|
|
28
|
-
export { default as Availability } from './components/Icons/Availability.svelte';
|
|
29
|
-
export { default as Back } from './components/Icons/Back.svelte';
|
|
30
|
-
export { default as CheckCircle } from './components/Icons/CheckCircle.svelte';
|
|
31
|
-
export { default as CheckCircleOutline } from './components/Icons/CheckCircleOutline.svelte';
|
|
32
|
-
export { default as ChevronLeft } from './components/Icons/ChevronLeft.svelte';
|
|
33
|
-
export { default as ChevronRight } from './components/Icons/ChevronRight.svelte';
|
|
34
|
-
export { default as Copy } from './components/Icons/Copy.svelte';
|
|
35
|
-
export { default as Cross } from './components/Icons/Cross.svelte';
|
|
36
|
-
export { default as DownArrow } from './components/Icons/DownArrow.svelte';
|
|
37
|
-
export { default as ErrorCircle } from './components/Icons/ErrorCircle.svelte';
|
|
38
|
-
export { default as FacebookIcon } from './components/Icons/FacebookIcon.svelte';
|
|
39
|
-
export { default as Home } from './components/Icons/Home.svelte';
|
|
40
|
-
export { default as Info } from './components/Icons/Info.svelte';
|
|
41
|
-
export { default as InstagramIcon } from './components/Icons/InstagramIcon.svelte';
|
|
42
|
-
export { default as Message } from './components/Icons/Message.svelte';
|
|
43
|
-
export { default as MoonIcon } from './components/Icons/MoonIcon.svelte';
|
|
44
|
-
export { default as More } from './components/Icons/More.svelte';
|
|
45
|
-
export { default as MoreHori } from './components/Icons/MoreHori.svelte';
|
|
46
|
-
export { default as Notification } from './components/Icons/Notification.svelte';
|
|
47
|
-
export { default as Payment } from './components/Icons/Payment.svelte';
|
|
48
|
-
export { default as Profile } from './components/Icons/Profile.svelte';
|
|
49
|
-
export { default as Reload } from './components/Icons/Reload.svelte';
|
|
50
|
-
export { default as Shows } from './components/Icons/Shows.svelte';
|
|
51
|
-
export { default as Signout } from './components/Icons/Signout.svelte';
|
|
52
|
-
export { default as SunIcon } from './components/Icons/SunIcon.svelte';
|
|
53
|
-
export { default as TiktokIcon } from './components/Icons/TiktokIcon.svelte';
|
|
54
|
-
export { default as TwitterIcon } from './components/Icons/TwitterIcon.svelte';
|
|
55
|
-
export { default as WarningIcon } from './components/Icons/WarningIcon.svelte';
|
|
56
|
-
|
|
57
|
-
// Input Components
|
|
58
|
-
export { default as Input } from './components/Input/Input.svelte';
|
|
59
|
-
export { default as MultiSelect } from './components/Input/MultiSelect.svelte';
|
|
60
|
-
export { default as OTPInput } from './components/Input/OTPInput.svelte';
|
|
61
|
-
export { default as Select } from './components/Input/Select.svelte';
|
|
62
|
-
|
|
63
|
-
// Layout Components
|
|
64
|
-
export { default as BottomNav } from './components/Layout/BottomNav.svelte';
|
|
65
|
-
export { default as Header } from './components/Layout/Header.svelte';
|
|
66
|
-
|
|
67
|
-
// Modal Components
|
|
68
|
-
export { default as Modal } from './components/Modal/Modal.svelte';
|
|
69
|
-
export { default as ConfirmationModal } from './components/Modal/ConfirmationModal.svelte';
|
|
70
|
-
export { default as ModalStateManager } from './components/Modal/ModalStateManager.svelte';
|
|
71
|
-
export { default as ModalTestWrapper } from './components/Modal/ModalTestWrapper.svelte';
|
|
72
|
-
|
|
73
|
-
// PlaceAutocomplete
|
|
74
|
-
export { default as PlaceAutocomplete } from './components/PlaceAutocomplete/PlaceAutocomplete.svelte';
|
|
75
|
-
|
|
76
|
-
// Spinner
|
|
77
|
-
export { default as Spinner } from './components/Spinner/Spinner.svelte';
|
|
78
|
-
|
|
79
|
-
// Password Strength Indicator
|
|
80
|
-
export { default as PasswordStrengthIndicator } from './components/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte';
|
|
81
|
-
|
|
82
|
-
// Status Indicator
|
|
83
|
-
export { default as StatusIndicator } from './components/StatusIndicator/StatusIndicator.svelte';
|
|
84
|
-
|
|
85
|
-
// Page-specific Components - Performers
|
|
86
|
-
export { default as AvailabilityCalendarModal } from './components/pages/performers/AvailabilityCalendarModal.svelte';
|
|
87
|
-
export { default as ModalShowInfo } from './components/pages/performers/ModalShowInfo.svelte';
|
|
88
|
-
export { default as PageBackButton } from './components/pages/performers/PageBackButton.svelte';
|
|
89
|
-
export { default as SectionHeader } from './components/pages/performers/SectionHeader.svelte';
|
|
90
|
-
export { default as ShowDetails } from './components/pages/performers/ShowDetails.svelte';
|
|
91
|
-
export { default as ShowItemCard } from './components/pages/performers/ShowItemCard.svelte';
|
|
92
|
-
export { default as SwitchOption } from './components/pages/performers/SwitchOption.svelte';
|
|
93
|
-
export { default as VenueInfo } from './components/pages/performers/VenueInfo.svelte';
|
|
94
|
-
export { default as VenueItemCard } from './components/pages/performers/VenueItemCard.svelte';
|
|
95
|
-
|
|
96
|
-
// Page-specific Components - Profile
|
|
97
|
-
export { default as ProfileForm } from './components/pages/profile/profile-form.svelte';
|
|
98
|
-
export { default as ProfilePhotos } from './components/pages/profile/profile-photos.svelte';
|
|
99
|
-
|
|
100
|
-
// Page-specific Components - Settings
|
|
101
|
-
export { default as CustomImageDropzone } from './components/pages/settings/tabs/CustomImageDropzone.svelte';
|
|
102
|
-
|
|
103
|
-
// Page-specific Components - Shows
|
|
104
|
-
export { default as ShowList } from './components/pages/shows/ShowList.svelte';
|
|
105
|
-
export { default as TabContent } from './components/pages/shows/TabContent.svelte';
|
|
106
|
-
export { default as TabNavigation } from './components/pages/shows/TabNavigation.svelte';
|
|
107
|
-
|
|
108
|
-
// Lib exports (non-component)
|
|
109
|
-
export { config } from './config.js';
|
|
110
|
-
export * from './telemetry.js';
|
|
111
|
-
export * from './constants/formOptions.js';
|
|
1
|
+
// Core Components
|
|
2
|
+
export { default as Alert } from './components/Alert/Alert.svelte';
|
|
3
|
+
export { default as Badge } from './components/Badges/Badge.svelte';
|
|
4
|
+
export { default as BottomSheet } from './components/BottomSheet/BottomSheet.svelte';
|
|
5
|
+
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb.svelte';
|
|
6
|
+
export { default as Button } from './components/Button/Button.svelte';
|
|
7
|
+
export { default as ButtonSaveDemo } from './components/Button/ButtonSaveDemo.svelte';
|
|
8
|
+
export { default as Card } from './components/Card.svelte';
|
|
9
|
+
export { default as DarkModeToggle } from './components/DarkModeToggle.svelte';
|
|
10
|
+
export { default as ErrorDisplay } from './components/ErrorDisplay.svelte';
|
|
11
|
+
export { default as FormActions } from './components/FormActions.svelte';
|
|
12
|
+
export { default as FormValidationSummary } from './components/FormValidationSummary.svelte';
|
|
13
|
+
export { default as PageLoader } from './components/PageLoader.svelte';
|
|
14
|
+
export { default as Toggle } from './components/Toggle.svelte';
|
|
15
|
+
export { default as ValidationError } from './components/ValidationError.svelte';
|
|
16
|
+
|
|
17
|
+
// Calendar Components
|
|
18
|
+
export { default as Calendar } from './components/Calendar/Calendar.svelte';
|
|
19
|
+
export { default as QuarterView } from './components/Calendar/QuarterView.svelte';
|
|
20
|
+
|
|
21
|
+
// CropImage
|
|
22
|
+
export { default as CropImage } from './components/CropImage/CropImage.svelte';
|
|
23
|
+
|
|
24
|
+
// Icons
|
|
25
|
+
export { default as Icon } from './components/Icons/Icon.svelte';
|
|
26
|
+
export { default as ArrowLeft } from './components/Icons/ArrowLeft.svelte';
|
|
27
|
+
export { default as ArrowRight } from './components/Icons/ArrowRight.svelte';
|
|
28
|
+
export { default as Availability } from './components/Icons/Availability.svelte';
|
|
29
|
+
export { default as Back } from './components/Icons/Back.svelte';
|
|
30
|
+
export { default as CheckCircle } from './components/Icons/CheckCircle.svelte';
|
|
31
|
+
export { default as CheckCircleOutline } from './components/Icons/CheckCircleOutline.svelte';
|
|
32
|
+
export { default as ChevronLeft } from './components/Icons/ChevronLeft.svelte';
|
|
33
|
+
export { default as ChevronRight } from './components/Icons/ChevronRight.svelte';
|
|
34
|
+
export { default as Copy } from './components/Icons/Copy.svelte';
|
|
35
|
+
export { default as Cross } from './components/Icons/Cross.svelte';
|
|
36
|
+
export { default as DownArrow } from './components/Icons/DownArrow.svelte';
|
|
37
|
+
export { default as ErrorCircle } from './components/Icons/ErrorCircle.svelte';
|
|
38
|
+
export { default as FacebookIcon } from './components/Icons/FacebookIcon.svelte';
|
|
39
|
+
export { default as Home } from './components/Icons/Home.svelte';
|
|
40
|
+
export { default as Info } from './components/Icons/Info.svelte';
|
|
41
|
+
export { default as InstagramIcon } from './components/Icons/InstagramIcon.svelte';
|
|
42
|
+
export { default as Message } from './components/Icons/Message.svelte';
|
|
43
|
+
export { default as MoonIcon } from './components/Icons/MoonIcon.svelte';
|
|
44
|
+
export { default as More } from './components/Icons/More.svelte';
|
|
45
|
+
export { default as MoreHori } from './components/Icons/MoreHori.svelte';
|
|
46
|
+
export { default as Notification } from './components/Icons/Notification.svelte';
|
|
47
|
+
export { default as Payment } from './components/Icons/Payment.svelte';
|
|
48
|
+
export { default as Profile } from './components/Icons/Profile.svelte';
|
|
49
|
+
export { default as Reload } from './components/Icons/Reload.svelte';
|
|
50
|
+
export { default as Shows } from './components/Icons/Shows.svelte';
|
|
51
|
+
export { default as Signout } from './components/Icons/Signout.svelte';
|
|
52
|
+
export { default as SunIcon } from './components/Icons/SunIcon.svelte';
|
|
53
|
+
export { default as TiktokIcon } from './components/Icons/TiktokIcon.svelte';
|
|
54
|
+
export { default as TwitterIcon } from './components/Icons/TwitterIcon.svelte';
|
|
55
|
+
export { default as WarningIcon } from './components/Icons/WarningIcon.svelte';
|
|
56
|
+
|
|
57
|
+
// Input Components
|
|
58
|
+
export { default as Input } from './components/Input/Input.svelte';
|
|
59
|
+
export { default as MultiSelect } from './components/Input/MultiSelect.svelte';
|
|
60
|
+
export { default as OTPInput } from './components/Input/OTPInput.svelte';
|
|
61
|
+
export { default as Select } from './components/Input/Select.svelte';
|
|
62
|
+
|
|
63
|
+
// Layout Components
|
|
64
|
+
export { default as BottomNav } from './components/Layout/BottomNav.svelte';
|
|
65
|
+
export { default as Header } from './components/Layout/Header.svelte';
|
|
66
|
+
|
|
67
|
+
// Modal Components
|
|
68
|
+
export { default as Modal } from './components/Modal/Modal.svelte';
|
|
69
|
+
export { default as ConfirmationModal } from './components/Modal/ConfirmationModal.svelte';
|
|
70
|
+
export { default as ModalStateManager } from './components/Modal/ModalStateManager.svelte';
|
|
71
|
+
export { default as ModalTestWrapper } from './components/Modal/ModalTestWrapper.svelte';
|
|
72
|
+
|
|
73
|
+
// PlaceAutocomplete
|
|
74
|
+
export { default as PlaceAutocomplete } from './components/PlaceAutocomplete/PlaceAutocomplete.svelte';
|
|
75
|
+
|
|
76
|
+
// Spinner
|
|
77
|
+
export { default as Spinner } from './components/Spinner/Spinner.svelte';
|
|
78
|
+
|
|
79
|
+
// Password Strength Indicator
|
|
80
|
+
export { default as PasswordStrengthIndicator } from './components/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte';
|
|
81
|
+
|
|
82
|
+
// Status Indicator
|
|
83
|
+
export { default as StatusIndicator } from './components/StatusIndicator/StatusIndicator.svelte';
|
|
84
|
+
|
|
85
|
+
// Page-specific Components - Performers
|
|
86
|
+
export { default as AvailabilityCalendarModal } from './components/pages/performers/AvailabilityCalendarModal.svelte';
|
|
87
|
+
export { default as ModalShowInfo } from './components/pages/performers/ModalShowInfo.svelte';
|
|
88
|
+
export { default as PageBackButton } from './components/pages/performers/PageBackButton.svelte';
|
|
89
|
+
export { default as SectionHeader } from './components/pages/performers/SectionHeader.svelte';
|
|
90
|
+
export { default as ShowDetails } from './components/pages/performers/ShowDetails.svelte';
|
|
91
|
+
export { default as ShowItemCard } from './components/pages/performers/ShowItemCard.svelte';
|
|
92
|
+
export { default as SwitchOption } from './components/pages/performers/SwitchOption.svelte';
|
|
93
|
+
export { default as VenueInfo } from './components/pages/performers/VenueInfo.svelte';
|
|
94
|
+
export { default as VenueItemCard } from './components/pages/performers/VenueItemCard.svelte';
|
|
95
|
+
|
|
96
|
+
// Page-specific Components - Profile
|
|
97
|
+
export { default as ProfileForm } from './components/pages/profile/profile-form.svelte';
|
|
98
|
+
export { default as ProfilePhotos } from './components/pages/profile/profile-photos.svelte';
|
|
99
|
+
|
|
100
|
+
// Page-specific Components - Settings
|
|
101
|
+
export { default as CustomImageDropzone } from './components/pages/settings/tabs/CustomImageDropzone.svelte';
|
|
102
|
+
|
|
103
|
+
// Page-specific Components - Shows
|
|
104
|
+
export { default as ShowList } from './components/pages/shows/ShowList.svelte';
|
|
105
|
+
export { default as TabContent } from './components/pages/shows/TabContent.svelte';
|
|
106
|
+
export { default as TabNavigation } from './components/pages/shows/TabNavigation.svelte';
|
|
107
|
+
|
|
108
|
+
// Lib exports (non-component)
|
|
109
|
+
export { config } from './config.js';
|
|
110
|
+
export * from './telemetry.js';
|
|
111
|
+
export * from './constants/formOptions.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const auth: import("svelte/store").Writable<{
|
|
2
|
+
isAuthenticated: boolean;
|
|
3
|
+
token: null;
|
|
4
|
+
userDetails: null;
|
|
5
|
+
}>;
|
|
6
|
+
export function setAuthState(state: any): void;
|
|
7
|
+
export function clearAuthState(): void;
|
|
8
|
+
export function initializeAuthState(): void;
|
|
9
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["auth.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAGI,+CAEN;AAGM,uCAEN;AAGM,4CAeN"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { writable } from "svelte/store";
|
|
2
|
+
|
|
3
|
+
// Store to manage authentication state
|
|
4
|
+
export const auth = writable({
|
|
5
|
+
isAuthenticated: false,
|
|
6
|
+
token: null,
|
|
7
|
+
userDetails: null, // To store email and first name
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Function to set authentication state
|
|
11
|
+
export const setAuthState = (state) => {
|
|
12
|
+
auth.set(state);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// Function to clear the authentication state
|
|
16
|
+
export const clearAuthState = () => {
|
|
17
|
+
auth.set({ isAuthenticated: false, token: null, userDetails: null });
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Initialize the store from cookies
|
|
21
|
+
export const initializeAuthState = () => {
|
|
22
|
+
const cookies = Object.fromEntries(
|
|
23
|
+
document.cookie
|
|
24
|
+
.split("; ")
|
|
25
|
+
.map((c) => c.split("="))
|
|
26
|
+
.map(([k, v]) => [k, decodeURIComponent(v)])
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
if (cookies.performer_token) {
|
|
30
|
+
setAuthState({
|
|
31
|
+
isAuthenticated: true,
|
|
32
|
+
token: cookies.performer_token,
|
|
33
|
+
userDetails: cookies.userDetails ? JSON.parse(cookies.userDetails) : null,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.spec.d.ts","sourceRoot":"","sources":["../../src/lib/stores/auth.spec.js"],"names":[],"mappings":""}
|