@veevarts/design-system 1.9.0 → 1.10.0-alpha.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/index.cjs +10 -10
- package/dist/index.js +2387 -2350
- package/dist/patterns/TicketSelection/types.d.ts +23 -10
- package/package.json +1 -1
|
@@ -16,35 +16,48 @@ export type TicketData = {
|
|
|
16
16
|
originalPrice: number;
|
|
17
17
|
max: number;
|
|
18
18
|
};
|
|
19
|
+
export type ExhibitionDateData = {
|
|
20
|
+
/** Unique identifier for the rendered date group */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Display label shown above the tickets for this group */
|
|
23
|
+
date: string;
|
|
24
|
+
/** Tickets available under this exhibition date */
|
|
25
|
+
tickets: TicketData[];
|
|
26
|
+
};
|
|
19
27
|
export type ExhibitionData = {
|
|
28
|
+
/** Unique identifier for the exhibition accordion section */
|
|
20
29
|
id: string;
|
|
30
|
+
/** Heading rendered for the exhibition section */
|
|
21
31
|
exhibitionName: string;
|
|
22
|
-
|
|
32
|
+
/** Date buckets rendered inside the exhibition section */
|
|
33
|
+
dates: ExhibitionDateData[];
|
|
23
34
|
};
|
|
24
35
|
export type TicketSelectionState = {
|
|
25
36
|
[groupId: string]: {
|
|
26
|
-
[
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
[dateGroupId: string]: {
|
|
38
|
+
[ticketId: string]: {
|
|
39
|
+
id: string;
|
|
40
|
+
selectedQuantity: number;
|
|
41
|
+
originalPrice: number;
|
|
42
|
+
discountedPrice: number;
|
|
43
|
+
};
|
|
31
44
|
};
|
|
32
45
|
};
|
|
33
46
|
};
|
|
34
47
|
export type TicketSelectionData = ExhibitionData[];
|
|
35
48
|
export interface TicketSelectionProps {
|
|
36
|
-
/** Maximum number of tickets the user can select globally */
|
|
49
|
+
/** Maximum number of tickets the user can select globally. Omit it to rely only on per-ticket limits. */
|
|
37
50
|
userMaxLimit?: number;
|
|
38
|
-
/** Initial expanded state for all exhibition groups */
|
|
51
|
+
/** Initial expanded state for all exhibition groups. This is read when each section mounts. */
|
|
39
52
|
initialExpanded?: boolean;
|
|
40
53
|
/** Labels for internationalization */
|
|
41
54
|
labels?: Partial<TicketSelectionLabels>;
|
|
42
55
|
/** Regional settings for locale and currency formatting */
|
|
43
56
|
settings?: TicketSelectionSettings;
|
|
44
|
-
/** Exhibition and ticket data */
|
|
57
|
+
/** Exhibition and date-grouped ticket data used to build the initial rendered state. */
|
|
45
58
|
ticketSelectionData?: TicketSelectionData;
|
|
46
59
|
/** Additional CSS classes for the root element */
|
|
47
60
|
className?: string;
|
|
48
|
-
/** Callback fired
|
|
61
|
+
/** Callback fired with the nested exhibition -> dateGroup -> ticket selection state whenever quantities change. */
|
|
49
62
|
onSelectionChange?: (state: TicketSelectionState) => void;
|
|
50
63
|
}
|