@mobielnl/elements 0.12.24 → 0.12.26
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/elements.css +1 -1
- package/dist/elements.js +5 -5
- package/dist/elements.umd.cjs +139 -137
- package/dist/{index-D3B78uDJ.js → index-C85ws3HF.js} +27500 -26966
- package/dist/index-YciEToXc.js +1678 -0
- package/dist/index.d.ts +181 -30
- package/package.json +3 -3
- package/dist/index-V6otpA26.js +0 -1763
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,23 @@ export declare type AddToCartEvent = {
|
|
|
30
30
|
proposition: ProductCardPropositionFragment;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
declare type AlertClassNames = {
|
|
34
|
+
/** Alert container */
|
|
35
|
+
base?: string;
|
|
36
|
+
/** Alert title text */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Alert description text */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Alert main content wrapper */
|
|
41
|
+
mainWrapper?: string;
|
|
42
|
+
/** Alert close button */
|
|
43
|
+
closeButton?: string;
|
|
44
|
+
/** Alert icon wrapper */
|
|
45
|
+
iconWrapper?: string;
|
|
46
|
+
/** Alert icon */
|
|
47
|
+
alertIcon?: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
33
50
|
declare type AverageSectionClassNames = {
|
|
34
51
|
/** Container for the average per month section */
|
|
35
52
|
container?: string;
|
|
@@ -88,6 +105,15 @@ export declare type Block = {
|
|
|
88
105
|
amount: number;
|
|
89
106
|
};
|
|
90
107
|
|
|
108
|
+
export declare type BundleInfoViewedEvent = {
|
|
109
|
+
type: 'bundle_info_viewed';
|
|
110
|
+
/** The bundle group with bundle options */
|
|
111
|
+
bundleTypeSet: BundleTypeSet;
|
|
112
|
+
/** The bundle option within the bundle group
|
|
113
|
+
* @note if this is `undefined`, the user clicked the info icon for the bundle group label */
|
|
114
|
+
bundleSet?: BundleSet;
|
|
115
|
+
};
|
|
116
|
+
|
|
91
117
|
/**
|
|
92
118
|
* ClassNames for styling different parts of the `BundleModal` component
|
|
93
119
|
*/
|
|
@@ -156,6 +182,10 @@ declare type BundleSelectorClassNames = {
|
|
|
156
182
|
bundleTypeSetCheckboxGroup?: CheckboxGroupClassNames;
|
|
157
183
|
};
|
|
158
184
|
|
|
185
|
+
export declare type BundleSet = BundleTypeSet['bundleSets'][number];
|
|
186
|
+
|
|
187
|
+
export declare type BundleTypeSet = NonNullable<NonNullable<PropositionSelectorQuery['propositionSelector']>['bundleTypeSets']>[number];
|
|
188
|
+
|
|
159
189
|
/**
|
|
160
190
|
* ClassNames for styling different parts of the `Carousel` component
|
|
161
191
|
*/
|
|
@@ -232,6 +262,10 @@ declare type CheckboxGroupClassNames = {
|
|
|
232
262
|
label?: string;
|
|
233
263
|
/** Bundle Price component class styling slots - see type `BundlePriceClassNames` */
|
|
234
264
|
bundlePrice?: BundlePriceClassNames;
|
|
265
|
+
/** Image wrapper */
|
|
266
|
+
imgWrapper?: string;
|
|
267
|
+
/** Image */
|
|
268
|
+
img?: string;
|
|
235
269
|
};
|
|
236
270
|
};
|
|
237
271
|
|
|
@@ -572,22 +606,7 @@ declare type ErrorAlertClassNames = {
|
|
|
572
606
|
/** Main wrapper container for the error component */
|
|
573
607
|
base?: string;
|
|
574
608
|
/** Alert component class styling slots */
|
|
575
|
-
alert?:
|
|
576
|
-
/** Alert container */
|
|
577
|
-
base?: string;
|
|
578
|
-
/** Alert title text */
|
|
579
|
-
title?: string;
|
|
580
|
-
/** Alert description text */
|
|
581
|
-
description?: string;
|
|
582
|
-
/** Alert main content wrapper */
|
|
583
|
-
mainWrapper?: string;
|
|
584
|
-
/** Alert close button */
|
|
585
|
-
closeButton?: string;
|
|
586
|
-
/** Alert icon wrapper */
|
|
587
|
-
iconWrapper?: string;
|
|
588
|
-
/** Alert icon */
|
|
589
|
-
alertIcon?: string;
|
|
590
|
-
};
|
|
609
|
+
alert?: AlertClassNames;
|
|
591
610
|
/** Refresh page button */
|
|
592
611
|
button?: string;
|
|
593
612
|
};
|
|
@@ -1832,6 +1851,11 @@ export declare function PropositionSelector({ propositionKey, classNames, initia
|
|
|
1832
1851
|
export declare type PropositionSelectorClassNames = {
|
|
1833
1852
|
/** Wrapper container for the entire proposition selector */
|
|
1834
1853
|
base?: string;
|
|
1854
|
+
/** Main content wrapper container */
|
|
1855
|
+
mainContentWrapper?: string;
|
|
1856
|
+
/** Alert class styling slots - see type `AlertClassNames`
|
|
1857
|
+
* @note only visible for fixed propositions with the same fixed provider in profile */
|
|
1858
|
+
sameFixedProviderAlert?: AlertClassNames;
|
|
1835
1859
|
/** HandsetCreditSelector component class styling slots - see type `HandsetCreditSelectorClassNames` */
|
|
1836
1860
|
handsetCreditSelector?: HandsetCreditSelectorClassNames;
|
|
1837
1861
|
/** ProductHeader class styling slots - see type `ProductHeaderClassNames` */
|
|
@@ -1884,6 +1908,10 @@ export declare type PropositionSelectorClassNames = {
|
|
|
1884
1908
|
};
|
|
1885
1909
|
/** BundleSelector component class styling slots - see type `BundleSelectorClassNames` */
|
|
1886
1910
|
bundleSelector?: BundleSelectorClassNames;
|
|
1911
|
+
/** Retention section class styling slots - see type `SectionClassNames` */
|
|
1912
|
+
retentionSelector?: SectionClassNames_2;
|
|
1913
|
+
/** Modification section class styling slots - see type `SectionClassNames` */
|
|
1914
|
+
modificationSelector?: SectionClassNames_2;
|
|
1887
1915
|
/** BundleModal component class styling slots - see type `BundleModalClassNames` */
|
|
1888
1916
|
bundleModal?: BundleModalClassNames;
|
|
1889
1917
|
/** Profile buttons component class styling slots - see type `SelectorClassNames` */
|
|
@@ -1936,22 +1964,26 @@ export declare type PropositionSelectorProps = {
|
|
|
1936
1964
|
* Callback function fired when user actions occur.
|
|
1937
1965
|
*
|
|
1938
1966
|
* Events:
|
|
1939
|
-
* - `details_viewed`: User opened proposition details modal
|
|
1940
1967
|
* - `add_to_cart`: User clicked the add-to-cart CTA
|
|
1968
|
+
* - `bundle_info_viewed`: User clicked the info icon for the bundle group or bundle option
|
|
1969
|
+
* - `details_viewed`: User opened proposition details modal
|
|
1941
1970
|
* - `profile_changed`: User profile changed (includes from/to values)
|
|
1942
1971
|
*
|
|
1943
1972
|
* @example
|
|
1944
1973
|
* onAction={(event) => {
|
|
1945
1974
|
* switch(event.type) {
|
|
1946
|
-
*
|
|
1947
|
-
*
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
*
|
|
1951
|
-
*
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
1954
|
-
*
|
|
1975
|
+
* case 'add_to_cart':
|
|
1976
|
+
* console.log(event.proposition)
|
|
1977
|
+
* break
|
|
1978
|
+
* case 'bundle_info_viewed':
|
|
1979
|
+
* console.log(event.bundleTypeSet, event.bundleSet)
|
|
1980
|
+
* break
|
|
1981
|
+
* case 'details_viewed':
|
|
1982
|
+
* console.log(event.proposition, event.tab)
|
|
1983
|
+
* break
|
|
1984
|
+
* case 'profile_changed':
|
|
1985
|
+
* console.log(event.from, event.to)
|
|
1986
|
+
* break
|
|
1955
1987
|
* }
|
|
1956
1988
|
* }}
|
|
1957
1989
|
*/
|
|
@@ -1967,6 +1999,99 @@ export declare type PropositionSelectorProps = {
|
|
|
1967
1999
|
* }}
|
|
1968
2000
|
*/
|
|
1969
2001
|
onRender?: () => void;
|
|
2002
|
+
/** Boolean to hide number retention question when profile if filled. Does not apply to fixed propositions */
|
|
2003
|
+
hideRetentionOnFilledProfile?: boolean;
|
|
2004
|
+
};
|
|
2005
|
+
|
|
2006
|
+
declare type PropositionSelectorQuery = {
|
|
2007
|
+
__typename?: 'RootQueryType';
|
|
2008
|
+
propositionSelector?: {
|
|
2009
|
+
__typename?: 'BundleSelector';
|
|
2010
|
+
key: string;
|
|
2011
|
+
planVariantKey: string;
|
|
2012
|
+
phoneVariantKey?: string | null;
|
|
2013
|
+
modificationKey?: string | null;
|
|
2014
|
+
providerSlug: string;
|
|
2015
|
+
handsetCreditKeys: Array<string>;
|
|
2016
|
+
phoneVariantKeys: Array<string>;
|
|
2017
|
+
modificationDescription?: string | null;
|
|
2018
|
+
modificationInfoUrl?: string | null;
|
|
2019
|
+
hasModifications: boolean;
|
|
2020
|
+
basePrice: number;
|
|
2021
|
+
creditFee: number;
|
|
2022
|
+
planVariant: {
|
|
2023
|
+
__typename?: 'BundleSelectorPlanVariant';
|
|
2024
|
+
contractType: string;
|
|
2025
|
+
};
|
|
2026
|
+
alternatePlanVariant?: {
|
|
2027
|
+
__typename?: 'BundleSelectorPlanVariant';
|
|
2028
|
+
unitKey: string;
|
|
2029
|
+
} | null;
|
|
2030
|
+
provider: {
|
|
2031
|
+
__typename?: 'Provider';
|
|
2032
|
+
name: string;
|
|
2033
|
+
slug: string;
|
|
2034
|
+
};
|
|
2035
|
+
planVariants: Array<{
|
|
2036
|
+
__typename?: 'BundleSelectorPlanVariant';
|
|
2037
|
+
unitKey: string;
|
|
2038
|
+
contractTerm: number;
|
|
2039
|
+
contractType: string;
|
|
2040
|
+
plan: string;
|
|
2041
|
+
}>;
|
|
2042
|
+
bundleTypeSets: Array<{
|
|
2043
|
+
__typename?: 'BundleSelectorBundleTypeSet';
|
|
2044
|
+
unitKey: string;
|
|
2045
|
+
name: string;
|
|
2046
|
+
required: boolean;
|
|
2047
|
+
multiSelect: boolean;
|
|
2048
|
+
requiredBundleTypeSetId?: string | null;
|
|
2049
|
+
infoUrl?: string | null;
|
|
2050
|
+
bundleTypes: Array<string>;
|
|
2051
|
+
bundleSets: Array<{
|
|
2052
|
+
__typename?: 'BundleSelectorBundleSet';
|
|
2053
|
+
infoUrl?: string | null;
|
|
2054
|
+
imageUrl?: string | null;
|
|
2055
|
+
unitKey: string;
|
|
2056
|
+
name: string;
|
|
2057
|
+
label: string;
|
|
2058
|
+
usps: Array<string>;
|
|
2059
|
+
requiredBundleTypeSetId?: string | null;
|
|
2060
|
+
requiredModificationGroupId?: string | null;
|
|
2061
|
+
baseMonthlyFee: number;
|
|
2062
|
+
lifetimeMonthlyFee: number;
|
|
2063
|
+
monthlyFees: Array<number>;
|
|
2064
|
+
content: {
|
|
2065
|
+
__typename?: 'PropositionContent';
|
|
2066
|
+
data: number;
|
|
2067
|
+
minutes: number;
|
|
2068
|
+
sms: number;
|
|
2069
|
+
sharedCredits?: Array<string | null> | null;
|
|
2070
|
+
dataSpeedDown: number;
|
|
2071
|
+
dataSpeedUp: number;
|
|
2072
|
+
channels: Array<string>;
|
|
2073
|
+
hdChannels: Array<string>;
|
|
2074
|
+
receivers: number;
|
|
2075
|
+
};
|
|
2076
|
+
modifications?: {
|
|
2077
|
+
__typename?: 'BundleSelectorModifications';
|
|
2078
|
+
name?: string | null;
|
|
2079
|
+
monthlyFees: Array<number>;
|
|
2080
|
+
content: {
|
|
2081
|
+
__typename?: 'PropositionContent';
|
|
2082
|
+
data: number;
|
|
2083
|
+
minutes: number;
|
|
2084
|
+
sms: number;
|
|
2085
|
+
};
|
|
2086
|
+
} | null;
|
|
2087
|
+
}>;
|
|
2088
|
+
}>;
|
|
2089
|
+
blacklists: Array<{
|
|
2090
|
+
__typename?: 'BundleSelectorBlacklist';
|
|
2091
|
+
unitKey: string;
|
|
2092
|
+
blacklist: Array<string>;
|
|
2093
|
+
}>;
|
|
2094
|
+
} | null;
|
|
1970
2095
|
};
|
|
1971
2096
|
|
|
1972
2097
|
export declare type ProviderOption = {
|
|
@@ -2046,6 +2171,10 @@ declare type RadioGroupClassNames = {
|
|
|
2046
2171
|
description?: string;
|
|
2047
2172
|
/** Bundle Price component class styling slots - see type `BundlePriceClassNames` */
|
|
2048
2173
|
bundlePrice?: BundlePriceClassNames;
|
|
2174
|
+
/** Image wrapper */
|
|
2175
|
+
imgWrapper?: string;
|
|
2176
|
+
/** Image */
|
|
2177
|
+
img?: string;
|
|
2049
2178
|
};
|
|
2050
2179
|
};
|
|
2051
2180
|
|
|
@@ -2114,6 +2243,20 @@ declare type SectionClassNames = {
|
|
|
2114
2243
|
table?: TableClassNames;
|
|
2115
2244
|
};
|
|
2116
2245
|
|
|
2246
|
+
/**
|
|
2247
|
+
* ClassNames for styling different parts of the `Section` component
|
|
2248
|
+
*/
|
|
2249
|
+
declare type SectionClassNames_2 = {
|
|
2250
|
+
/** Root container */
|
|
2251
|
+
base?: string;
|
|
2252
|
+
/** Section title */
|
|
2253
|
+
title?: string;
|
|
2254
|
+
/** Section number pill */
|
|
2255
|
+
number?: string;
|
|
2256
|
+
/** Section description */
|
|
2257
|
+
description?: string;
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2117
2260
|
/**
|
|
2118
2261
|
* ClassNames for styling different parts of the `SelectFilter` component
|
|
2119
2262
|
*/
|
|
@@ -2154,10 +2297,8 @@ declare type SelectFilterClassNames = {
|
|
|
2154
2297
|
/**
|
|
2155
2298
|
* Union type of all PropositionSelector action events.
|
|
2156
2299
|
*
|
|
2157
|
-
* Re-uses `DetailsViewedEvent` and `ProfileChangedEvent` from `ProductResults`
|
|
2158
|
-
|
|
2159
|
-
*/
|
|
2160
|
-
export declare type SelectorActionEvent = AddToCartEvent | DetailsViewedEvent | ProfileChangedEvent;
|
|
2300
|
+
* Re-uses `DetailsViewedEvent` and `ProfileChangedEvent` from `ProductResults` */
|
|
2301
|
+
export declare type SelectorActionEvent = AddToCartEvent | BundleInfoViewedEvent | DetailsViewedEvent | ProfileChangedEvent;
|
|
2161
2302
|
|
|
2162
2303
|
/**
|
|
2163
2304
|
* ClassNames for styling different parts of the `Selector` component
|
|
@@ -2654,6 +2795,8 @@ export declare type Translations = {
|
|
|
2654
2795
|
};
|
|
2655
2796
|
propositionSelector: {
|
|
2656
2797
|
return: string;
|
|
2798
|
+
sameFixedProviderTitle: string;
|
|
2799
|
+
sameFixedProviderDescription: string;
|
|
2657
2800
|
productVersionTitle: string;
|
|
2658
2801
|
benefitsTitle: string;
|
|
2659
2802
|
bundleSelectorTitle: string;
|
|
@@ -2669,6 +2812,14 @@ export declare type Translations = {
|
|
|
2669
2812
|
installationFee: string;
|
|
2670
2813
|
none: string;
|
|
2671
2814
|
showMore: string;
|
|
2815
|
+
retentionTitle: string;
|
|
2816
|
+
retentionDescription: string;
|
|
2817
|
+
retentionYes: string;
|
|
2818
|
+
retentionNo: string;
|
|
2819
|
+
modificationTitle: string;
|
|
2820
|
+
modificationDescription: string;
|
|
2821
|
+
modificationYes: string;
|
|
2822
|
+
modificationNo: string;
|
|
2672
2823
|
};
|
|
2673
2824
|
handsetCreditSelector: {
|
|
2674
2825
|
handsetPriceInfo: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobielnl/elements",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.26",
|
|
4
4
|
"description": "Mobiel.nl Elements - React component library for partner websites",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"@graphql-codegen/typescript-operations": "^4.4.0",
|
|
51
51
|
"@heroui/accordion": "^2.2.29",
|
|
52
52
|
"@heroui/alert": "^2.2.29",
|
|
53
|
-
"@heroui/avatar": "^2.2.
|
|
53
|
+
"@heroui/avatar": "^2.2.25",
|
|
54
54
|
"@heroui/badge": "^2.2.18",
|
|
55
55
|
"@heroui/button": "^2.2.29",
|
|
56
56
|
"@heroui/card": "^2.2.27",
|
|
57
57
|
"@heroui/checkbox": "^2.3.29",
|
|
58
58
|
"@heroui/chip": "^2.2.24",
|
|
59
59
|
"@heroui/divider": "^2.2.21",
|
|
60
|
-
"@heroui/image": "^2.2.
|
|
60
|
+
"@heroui/image": "^2.2.19",
|
|
61
61
|
"@heroui/input": "^2.4.30",
|
|
62
62
|
"@heroui/link": "^2.2.25",
|
|
63
63
|
"@heroui/listbox": "^2.3.28",
|