@mobielnl/elements 0.12.3 → 0.12.5

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as j, i as N, m as Z, r as ze, h as Lt, a as qe, w as Q, b as pe, c as Ce, d as Xe, e as oe, f as Pe, t as O, g as Nt, j as G, v as Gt, k as $, M as H, K as Ye, l as $t, o as Ht, p as ge, q as Wt, s as _t, u as jt, x as Je, y as Ut, z as zt, A as qt, B as ke, C as Fe, D as z, E as Oe, F as Xt, V as Yt, G as Jt, H as Zt, I as Qt, J as en, L as tn, N as Ze, O as nn, P as sn, Q as rn, R as an, S as on, T as Qe, U as et, W as tt, X as nt, Y as ln } from "./index-DlwfL1kL.js";
2
+ import { n as j, i as N, m as Z, r as ze, h as Lt, a as qe, w as Q, b as pe, c as Ce, d as Xe, e as oe, f as Pe, t as O, g as Nt, j as G, v as Gt, k as $, M as H, K as Ye, l as $t, o as Ht, p as ge, q as Wt, s as _t, u as jt, x as Je, y as Ut, z as zt, A as qt, B as ke, C as Fe, D as z, E as Oe, F as Xt, V as Yt, G as Jt, H as Zt, I as Qt, J as en, L as tn, N as Ze, O as nn, P as sn, Q as rn, R as an, S as on, T as Qe, U as et, W as tt, X as nt, Y as ln } from "./index-BgNKtJUh.js";
3
3
  import { Fragment as un } from "react";
4
4
  var Bt = typeof globalThis < "u" && globalThis.process ? globalThis.process : { env: { NODE_ENV: "production" } };
5
5
  // @__NO_SIDE_EFFECTS__
package/dist/index.d.ts CHANGED
@@ -1198,15 +1198,26 @@ export declare type ProductResultsClassNames = {
1198
1198
  results?: ResultsClassNames;
1199
1199
  /** Error alert class styling slots - see type `ErrorAlertClassNames` */
1200
1200
  errorAlert?: ErrorAlertClassNames;
1201
+ /** Profile banner component class styling slots - see type `ProfileBannerClassNames` */
1202
+ profileBanner?: ProfileBannerClassNames;
1201
1203
  };
1202
1204
 
1203
1205
  export declare type ProductResultsProps = {
1204
1206
  /** Product type of the results */
1205
1207
  productCategory: Exclude<ProductCategory, 'smartphone-proposition-extended'>;
1208
+ /** Whether to show the profile banner */
1209
+ showProfileBanner?: boolean;
1206
1210
  /** Whether to show the dynamic top 3 propositions based on the user's profile
1211
+ *
1212
+ * Can be a boolean to enable/disable the feature, or a config object to specify requirements:
1213
+ * - `requireNumberPreservation`: Show top propositions if user has filled in number preservation data
1214
+ * - `requireCustomerBenefits`: Show top propositions if user has filled in customer benefits data
1207
1215
  *
1208
1216
  * Not available for smartphone propositions when no phone is selected */
1209
- showTopPropositions?: boolean;
1217
+ showTopPropositions?: boolean | {
1218
+ requireNumberPreservation: boolean;
1219
+ requireCustomerBenefits: boolean;
1220
+ };
1210
1221
  /** Configure the color of the labels for the propositions
1211
1222
  *
1212
1223
  * @example color: 'primary' | 'secondary' | 'default' | 'success' | 'warning' | 'danger'
@@ -1280,6 +1291,33 @@ export declare type ProductResultsProps = {
1280
1291
  * }}
1281
1292
  */
1282
1293
  onAction?: (event: ActionEvent) => void;
1294
+ /**
1295
+ * Callback function fired when a deal/proposition is selected
1296
+ *
1297
+ * When this callback function is provided, no click-out will occur.
1298
+ *
1299
+ * Do not provide this function, if you want to use the click-out functionality
1300
+ *
1301
+ * This can be used to navigate to the proposition selector
1302
+ *
1303
+ * @example
1304
+ * const [propositionKey, setPropositionKey] = useState<string | null>(null)
1305
+ *
1306
+ * <ElementsRoot>
1307
+ * {propositionKey ? (
1308
+ * <PropositionSelector
1309
+ * propositionKey={propositionKey}
1310
+ * onReturnClick={() => setPropositionKey(null)}
1311
+ * />
1312
+ * ) : (
1313
+ * <ProductResults
1314
+ * productCategory="sim-only-proposition"
1315
+ * onDealSelected={key => setPropositionKey(key)}
1316
+ * />
1317
+ * )}
1318
+ * </ElementsRoot>
1319
+ */
1320
+ onDealSelected?: (propositionKey: string) => void;
1283
1321
  };
1284
1322
 
1285
1323
  /** Product version lifecycle status */
@@ -1294,6 +1332,28 @@ declare enum ProductVersionStatusEnum {
1294
1332
 
1295
1333
  export declare type Profile = z.infer<typeof profileSchema>;
1296
1334
 
1335
+ declare type ProfileBannerClassNames = {
1336
+ /** Container styling */
1337
+ container?: string;
1338
+ /** Title text styling */
1339
+ title?: string;
1340
+ /** Description text styling */
1341
+ description?: string;
1342
+ /** Buttons styling */
1343
+ button?: string;
1344
+ /** Icon component styling - discount icon */
1345
+ icon?: string;
1346
+ /** Badge component */
1347
+ badge?: string;
1348
+ /** Avatar component displaying the icon */
1349
+ avatar?: {
1350
+ /** Base wrapper styling for the avatar container */
1351
+ base?: string;
1352
+ /** Icon wrapper styling */
1353
+ icon?: string;
1354
+ };
1355
+ };
1356
+
1297
1357
  /** Event fired when user profile changes */
1298
1358
  export declare type ProfileChangedEvent = {
1299
1359
  type: 'profile_changed';
@@ -1807,6 +1867,9 @@ export declare type Translations = {
1807
1867
  otherSubscriptions: string;
1808
1868
  movingOption: string;
1809
1869
  otherProvider: string;
1870
+ question: string;
1871
+ yes: string;
1872
+ no: string;
1810
1873
  };
1811
1874
  postcodeCheck: {
1812
1875
  loading: string;
@@ -1818,6 +1881,10 @@ export declare type Translations = {
1818
1881
  houseNumberAddition: string;
1819
1882
  selectProvider: string;
1820
1883
  homeInternet: string;
1884
+ currentProvider: string;
1885
+ question: string;
1886
+ yes: string;
1887
+ no: string;
1821
1888
  };
1822
1889
  profile: {
1823
1890
  personalizeTitle: string;
@@ -2088,6 +2155,9 @@ export declare type Translations = {
2088
2155
  /** One or more mobile subscriptions */
2089
2156
  'mobile/delta': string;
2090
2157
  };
2158
+ propositionSelector: {
2159
+ return: string;
2160
+ };
2091
2161
  };
2092
2162
 
2093
2163
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobielnl/elements",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "Mobiel.nl Elements - React component library for partner websites",
5
5
  "private": false,
6
6
  "type": "module",