@mx-cartographer/experiences 9.4.16 → 9.4.18

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/common/components/dialog/Dialog.es.js +36 -36
  3. package/dist/common/components/dialog/Dialog.es.js.map +1 -1
  4. package/dist/core/types/localization/InsightsFeedCopy.d.ts +59 -0
  5. package/dist/core/types/localization/index.d.ts +1 -1
  6. package/dist/insights-v2/beatActions.d.ts +25 -0
  7. package/dist/insights-v2/beatActions.es.js.map +1 -1
  8. package/dist/insights-v2/components/BaseLayout.d.ts +3 -1
  9. package/dist/insights-v2/components/BaseLayout.es.js +67 -37
  10. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  11. package/dist/insights-v2/components/DismissInsightDialog.d.ts +18 -0
  12. package/dist/insights-v2/components/DismissInsightDialog.es.js +109 -0
  13. package/dist/insights-v2/components/DismissInsightDialog.es.js.map +1 -0
  14. package/dist/insights-v2/components/FeedbackBar.d.ts +20 -0
  15. package/dist/insights-v2/components/FeedbackBar.es.js +64 -0
  16. package/dist/insights-v2/components/FeedbackBar.es.js.map +1 -0
  17. package/dist/insights-v2/components/FeedbackDialog.d.ts +37 -0
  18. package/dist/insights-v2/components/FeedbackDialog.es.js +92 -0
  19. package/dist/insights-v2/components/FeedbackDialog.es.js.map +1 -0
  20. package/dist/insights-v2/components/HiddenConfirmationCard.d.ts +20 -0
  21. package/dist/insights-v2/components/HiddenConfirmationCard.es.js +123 -0
  22. package/dist/insights-v2/components/HiddenConfirmationCard.es.js.map +1 -0
  23. package/dist/insights-v2/hooks/useBeatFeedbackFlow.d.ts +44 -0
  24. package/dist/insights-v2/hooks/useBeatFeedbackFlow.es.js +73 -0
  25. package/dist/insights-v2/hooks/useBeatFeedbackFlow.es.js.map +1 -0
  26. package/dist/insights-v2/index.d.ts +5 -1
  27. package/dist/insights-v2/index.es.js +56 -48
  28. package/dist/microinsights/cards/InsightCard.es.js +22 -18
  29. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  30. package/package.json +1 -1
@@ -1,69 +1,77 @@
1
1
  import { BAR_CHART_VARIANTS as r, barChartVariant as t, buildChartData as m, buildDataSeries as i } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
2
2
  import { BarchartBlock as p } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
3
3
  import { DoubleBarChartBlock as e } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
4
- import n from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
5
- import s from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
6
- import B from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
7
- import g from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
8
- import S from "./components/TransferLogoCard.es.js";
9
- import k from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
10
- import { BudgetBlock as T } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
11
- import D from "./components/SaveAnExtraCard.es.js";
4
+ import c from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
5
+ import l from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
6
+ import C from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
7
+ import d from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
8
+ import k from "./components/TransferLogoCard.es.js";
9
+ import S from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
10
+ import { BudgetBlock as D } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
11
+ import T from "./components/SaveAnExtraCard.es.js";
12
12
  import v from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
13
- import y from "./components/InsightTransactionRow.es.js";
14
- import I from "./components/TransactionListCard.es.js";
13
+ import I from "./components/InsightTransactionRow.es.js";
14
+ import y from "./components/TransactionListCard.es.js";
15
15
  import { CategoryTransactionsBlock as R } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
16
16
  import { SVGImageBlock as x } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
17
17
  import O from "./components/AccountHeroCard.es.js";
18
- import _ from "./components/AmountPill.es.js";
19
- import N from "./components/DesignateEmergencySavingsCard.es.js";
20
- import { useBeatActions as j } from "./beatActions.es.js";
21
- import { OverflowMenu as z } from "./components/OverflowMenu.es.js";
18
+ import F from "./components/AmountPill.es.js";
19
+ import G from "./components/DesignateEmergencySavingsCard.es.js";
20
+ import { useBeatActions as U } from "./beatActions.es.js";
21
+ import { OverflowMenu as q } from "./components/OverflowMenu.es.js";
22
22
  import { InsightOptionsMenu as J } from "./components/InsightOptionsMenu.es.js";
23
- import Q from "./components/BaseLayout.es.js";
24
- import X from "./components/StatusMessageCard.es.js";
25
- import Z from "./components/LogoTile.es.js";
26
- import oo from "./components/LogoClusterCard.es.js";
27
- import to from "./components/MerchantHighlightCard.es.js";
28
- import io from "./components/P2PLogoStack.es.js";
29
- import po from "./components/SavingsOpportunityCard.es.js";
30
- import eo from "./components/StatusPill.es.js";
31
- import no from "./components/SubscriptionHeroCard.es.js";
32
- import so from "./components/UpcomingBillCard.es.js";
23
+ import { FeedbackBar as Q } from "./components/FeedbackBar.es.js";
24
+ import X from "./components/FeedbackDialog.es.js";
25
+ import { DismissInsightDialog as Z } from "./components/DismissInsightDialog.es.js";
26
+ import { HiddenConfirmationCard as oo } from "./components/HiddenConfirmationCard.es.js";
27
+ import to from "./components/BaseLayout.es.js";
28
+ import io from "./components/StatusMessageCard.es.js";
29
+ import po from "./components/LogoTile.es.js";
30
+ import eo from "./components/LogoClusterCard.es.js";
31
+ import co from "./components/MerchantHighlightCard.es.js";
32
+ import lo from "./components/P2PLogoStack.es.js";
33
+ import Co from "./components/SavingsOpportunityCard.es.js";
34
+ import uo from "./components/StatusPill.es.js";
35
+ import ho from "./components/SubscriptionHeroCard.es.js";
36
+ import Ao from "./components/UpcomingBillCard.es.js";
33
37
  export {
34
- g as AccountBlock,
38
+ d as AccountBlock,
35
39
  O as AccountHeroCard,
36
- k as AccountSwitchBlock,
37
- _ as AmountPill,
40
+ S as AccountSwitchBlock,
41
+ F as AmountPill,
38
42
  r as BAR_CHART_VARIANTS,
39
43
  p as BarchartBlock,
40
- Q as BaseLayout,
41
- T as BudgetBlock,
44
+ to as BaseLayout,
45
+ D as BudgetBlock,
42
46
  R as CategoryTransactionsBlock,
43
- N as DesignateEmergencySavingsCard,
44
- s as DonutChartBlock,
47
+ G as DesignateEmergencySavingsCard,
48
+ Z as DismissInsightDialog,
49
+ l as DonutChartBlock,
45
50
  e as DoubleBarChartBlock,
46
- B as DoubleProgressBarBlock,
51
+ C as DoubleProgressBarBlock,
52
+ Q as FeedbackBar,
53
+ X as FeedbackDialog,
54
+ oo as HiddenConfirmationCard,
47
55
  J as InsightOptionsMenu,
48
- y as InsightTransactionRow,
49
- oo as LogoClusterCard,
50
- Z as LogoTile,
51
- to as MerchantHighlightCard,
52
- z as OverflowMenu,
53
- io as P2PLogoStack,
56
+ I as InsightTransactionRow,
57
+ eo as LogoClusterCard,
58
+ po as LogoTile,
59
+ co as MerchantHighlightCard,
60
+ q as OverflowMenu,
61
+ lo as P2PLogoStack,
54
62
  x as SVGImageBlock,
55
- D as SaveAnExtraCard,
63
+ T as SaveAnExtraCard,
56
64
  v as SaveExtraBlock,
57
- po as SavingsOpportunityCard,
58
- X as StatusMessageCard,
59
- eo as StatusPill,
60
- n as StepChartBlock,
61
- no as SubscriptionHeroCard,
62
- I as TransactionListCard,
63
- S as TransferLogoCard,
64
- so as UpcomingBillCard,
65
+ Co as SavingsOpportunityCard,
66
+ io as StatusMessageCard,
67
+ uo as StatusPill,
68
+ c as StepChartBlock,
69
+ ho as SubscriptionHeroCard,
70
+ y as TransactionListCard,
71
+ k as TransferLogoCard,
72
+ Ao as UpcomingBillCard,
65
73
  t as barChartVariant,
66
74
  m as buildChartData,
67
75
  i as buildDataSeries,
68
- j as useBeatActions
76
+ U as useBeatActions
69
77
  };
@@ -2,26 +2,28 @@ import { ON_CLICK_EVENT as C, ON_VIEW_EVENT as O, ON_VIEW_FIRST_TIME_EVENT as T
2
2
  import { BeatIcon as V } from "../beaticons/BeatIcon.es.js";
3
3
  import { useCopyStore as N, useEvent as k, useInsightsMicroWidgetStore as v } from "../context/hooks.es.js";
4
4
  import M from "../MicroCardTemplate.es.js";
5
- import { useEffect as p } from "react";
6
- import { jsx as _ } from "react/jsx-runtime";
5
+ import { useEffect as c } from "react";
6
+ import { jsx as s } from "react/jsx-runtime";
7
7
  import { useInView as w } from "react-intersection-observer";
8
- var K = ({ ariaLabel: s, beat: i, elevation: l, index: m, isActiveCard: a, onCardClick: o, posthog: t, widthOverrides: d, variant: g, showIcon: f, heightOverrides: u }) => {
9
- const { ref: h, inView: r } = w({ threshold: 1 }), { cardsCopy: E } = N(), { onEvent: n } = k(), { updateBeat: I, updateOffer: y } = v();
10
- p(() => {
11
- r && (i.has_been_displayed ? n(O(i.template)) : (i.guid.startsWith("OFR") ? y({
8
+ var K = ({ ariaLabel: p, beat: i, elevation: l, index: m, isActiveCard: a, onCardClick: n, posthog: t, widthOverrides: d, variant: g, showIcon: u, heightOverrides: f }) => {
9
+ const { ref: h, inView: r } = w({ threshold: 1 }), { cardsCopy: E } = N(), { onEvent: o } = k(), { updateBeat: I, updateOffer: y } = v();
10
+ c(() => {
11
+ r && (i.has_been_displayed ? o(O(i.template)) : (i.guid.startsWith("OFR") ? y({
12
12
  ...i,
13
13
  has_been_displayed: !0
14
14
  }) : I({
15
15
  ...i,
16
16
  has_been_displayed: !0
17
- }), n(T(i.template))));
18
- }, [r]), p(() => {
17
+ }), o(T(i.template))));
18
+ }, [r]), c(() => {
19
19
  if (r && i) if (i.template === "MarketingOffer") {
20
20
  const e = i;
21
21
  t?.capture("viewed_messaging_insight", {
22
22
  template: i.template,
23
23
  campaign_guid: e.campaign_guid,
24
- campaign_name: e.pulse_campaign_name
24
+ campaign_name: e.pulse_campaign_name,
25
+ offer_guid: e.guid,
26
+ user_guid: e.user_guid
25
27
  });
26
28
  } else t?.capture("viewed_insight", {
27
29
  beat_guid: i.guid,
@@ -33,13 +35,15 @@ var K = ({ ariaLabel: s, beat: i, elevation: l, index: m, isActiveCard: a, onCar
33
35
  m,
34
36
  r
35
37
  ]);
36
- const c = () => {
37
- if (o && o(i), n(C(i.template)), i.template === "MarketingOffer") {
38
+ const _ = () => {
39
+ if (n && n(i), o(C(i.template)), i.template === "MarketingOffer") {
38
40
  const e = i;
39
41
  t?.capture("clicked_messaging_insight", {
40
42
  template: i.template,
41
43
  campaign_guid: e.campaign_guid,
42
- campaign_name: e.pulse_campaign_name
44
+ campaign_name: e.pulse_campaign_name,
45
+ offer_guid: e.guid,
46
+ user_guid: e.user_guid
43
47
  });
44
48
  } else t?.capture("clicked_insight", {
45
49
  beat_guid: i.guid,
@@ -47,16 +51,16 @@ var K = ({ ariaLabel: s, beat: i, elevation: l, index: m, isActiveCard: a, onCar
47
51
  position: m
48
52
  });
49
53
  };
50
- return /* @__PURE__ */ _(M, {
54
+ return /* @__PURE__ */ s(M, {
51
55
  "aria-roledescription": "slide",
52
- ariaLabel: s,
56
+ ariaLabel: p,
53
57
  description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
54
58
  elevation: l,
55
- heightOverrides: u,
56
- icon: f && /* @__PURE__ */ _(V, { beat: i }),
59
+ heightOverrides: f,
60
+ icon: u && /* @__PURE__ */ s(V, { beat: i }),
57
61
  isActiveCard: a,
58
- onCardClick: c,
59
- onPrimaryAction: c,
62
+ onCardClick: _,
63
+ onPrimaryAction: _,
60
64
  primaryActionText: i.micro_call_to_action || E?.micro_card_cta,
61
65
  ref: h,
62
66
  title: i.micro_title && i.micro_title.length > 0 ? i.micro_title : i.title,
@@ -1 +1 @@
1
- {"version":3,"file":"InsightCard.es.js","names":[],"sources":["../../../src/microinsights/cards/InsightCard.tsx"],"sourcesContent":["import React, { useEffect } from 'react'\nimport { useInView } from 'react-intersection-observer'\n\nimport { BeatIcon } from '../beaticons'\n\nimport { useCopyStore, useEvent, useInsightsMicroWidgetStore } from '../context/hooks'\n\nimport { ON_CLICK_EVENT, ON_VIEW_EVENT, ON_VIEW_FIRST_TIME_EVENT } from '../constants/Analytics'\nimport { VIEW_THRESHOLD } from '../constants/App'\n\nimport type { BeatLikeOffer, MicroInsightCardProps } from '../interfaces'\nimport type { Beat } from '../../core/types/Beat'\nimport MicroCardTemplate from '../MicroCardTemplate'\n\nexport interface InsightCardProps extends MicroInsightCardProps {\n beat: Beat | BeatLikeOffer\n index?: number\n}\n\nexport const InsightCard: React.FC<InsightCardProps> = ({\n ariaLabel,\n beat,\n elevation,\n index,\n isActiveCard,\n onCardClick,\n posthog,\n widthOverrides,\n variant,\n showIcon,\n heightOverrides,\n}) => {\n const { ref, inView } = useInView({\n threshold: VIEW_THRESHOLD,\n })\n\n // *************** Context functions *********************\n const { cardsCopy } = useCopyStore()\n const { onEvent } = useEvent()\n const { updateBeat, updateOffer } = useInsightsMicroWidgetStore()\n\n // ************** Use Effects Hooks **********************\n useEffect(() => {\n if (inView) {\n if (!beat.has_been_displayed) {\n if (beat.guid.startsWith('OFR')) {\n updateOffer({\n ...beat,\n has_been_displayed: true,\n })\n } else {\n updateBeat({\n ...beat,\n has_been_displayed: true,\n })\n }\n onEvent(ON_VIEW_FIRST_TIME_EVENT(beat.template))\n } else {\n onEvent(ON_VIEW_EVENT(beat.template))\n }\n }\n }, [inView])\n\n useEffect(() => {\n if (inView && beat) {\n if (beat.template === 'MarketingOffer') {\n const offerBeat = beat as BeatLikeOffer\n posthog?.capture('viewed_messaging_insight', {\n template: beat.template,\n campaign_guid: offerBeat.campaign_guid,\n campaign_name: offerBeat.pulse_campaign_name,\n })\n } else {\n posthog?.capture('viewed_insight', {\n beat_guid: beat.guid,\n template: beat.template,\n position: index,\n })\n }\n }\n }, [beat, index, inView])\n\n // *************** Click handlers ************************\n const handleClick = () => {\n /* eslint-disable no-unused-expressions */\n onCardClick && onCardClick(beat)\n onEvent(ON_CLICK_EVENT(beat.template))\n\n if (beat.template === 'MarketingOffer') {\n const offerBeat = beat as BeatLikeOffer\n posthog?.capture('clicked_messaging_insight', {\n template: beat.template,\n campaign_guid: offerBeat.campaign_guid,\n campaign_name: offerBeat.pulse_campaign_name,\n })\n } else {\n posthog?.capture('clicked_insight', {\n beat_guid: beat.guid,\n template: beat.template,\n position: index,\n })\n }\n }\n\n return (\n <MicroCardTemplate\n aria-roledescription=\"slide\"\n ariaLabel={ariaLabel}\n description={\n beat?.html_micro_description && beat?.html_micro_description.length > 0\n ? beat.html_micro_description\n : beat.html_description || ''\n }\n elevation={elevation}\n heightOverrides={heightOverrides}\n icon={showIcon && <BeatIcon beat={beat} />}\n isActiveCard={isActiveCard}\n onCardClick={handleClick}\n onPrimaryAction={handleClick}\n primaryActionText={beat.micro_call_to_action || cardsCopy?.micro_card_cta}\n ref={ref}\n title={beat.micro_title && beat.micro_title.length > 0 ? beat.micro_title : beat.title}\n variant={variant}\n widthOverrides={widthOverrides}\n />\n )\n}\n"],"mappings":";;;;;;;AAmBA,IAAa,IAAA,CAA2C,EACtD,WAAA,GACA,MAAA,GACA,WAAA,GACA,OAAA,GACA,cAAA,GACA,aAAA,GACA,SAAA,GACA,gBAAA,GACA,SAAA,GACA,UAAA,GACA,iBAAA,EAAA,MACI;AACJ,QAAM,EAAE,KAAA,GAAK,QAAA,EAAA,IAAW,EAAU,EAChC,WAAA,EACF,CAAC,GAGK,EAAE,WAAA,EAAA,IAAc,EAAa,GAC7B,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,YAAA,GAAY,aAAA,EAAA,IAAgB,EAA4B;AAGhE,EAAA,EAAA,MAAgB;AACd,IAAI,MACG,EAAK,qBAcR,EAAQ,EAA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A,IAEpB,WAAA;AAAA,IACM,iBAAA;AAAA,IACjB,MAAM,KAAY,gBAAA,EAAC,GAAD,EAAgB,MAAA,EAAO,CAAA;AAAA,IAC3B,cAAA;AAAA,IACd,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB,EAAK,wBAAwB,GAAW;AAAA,IACtD,KAAA;AAAA,IACL,OAAO,EAAK,eAAe,EAAK,YAAY,SAAS,IAAI,EAAK,cAAc,EAAK;AAAA,IACxE,SAAA;AAAA,IACO,gBAAA;AAAA,EACjB,CAAA;AAEL"}
1
+ {"version":3,"file":"InsightCard.es.js","names":[],"sources":["../../../src/microinsights/cards/InsightCard.tsx"],"sourcesContent":["import React, { useEffect } from 'react'\nimport { useInView } from 'react-intersection-observer'\n\nimport { BeatIcon } from '../beaticons'\n\nimport { useCopyStore, useEvent, useInsightsMicroWidgetStore } from '../context/hooks'\n\nimport { ON_CLICK_EVENT, ON_VIEW_EVENT, ON_VIEW_FIRST_TIME_EVENT } from '../constants/Analytics'\nimport { VIEW_THRESHOLD } from '../constants/App'\n\nimport type { BeatLikeOffer, MicroInsightCardProps } from '../interfaces'\nimport type { Beat } from '../../core/types/Beat'\nimport MicroCardTemplate from '../MicroCardTemplate'\n\nexport interface InsightCardProps extends MicroInsightCardProps {\n beat: Beat | BeatLikeOffer\n index?: number\n}\n\nexport const InsightCard: React.FC<InsightCardProps> = ({\n ariaLabel,\n beat,\n elevation,\n index,\n isActiveCard,\n onCardClick,\n posthog,\n widthOverrides,\n variant,\n showIcon,\n heightOverrides,\n}) => {\n const { ref, inView } = useInView({\n threshold: VIEW_THRESHOLD,\n })\n\n // *************** Context functions *********************\n const { cardsCopy } = useCopyStore()\n const { onEvent } = useEvent()\n const { updateBeat, updateOffer } = useInsightsMicroWidgetStore()\n\n // ************** Use Effects Hooks **********************\n useEffect(() => {\n if (inView) {\n if (!beat.has_been_displayed) {\n if (beat.guid.startsWith('OFR')) {\n updateOffer({\n ...beat,\n has_been_displayed: true,\n })\n } else {\n updateBeat({\n ...beat,\n has_been_displayed: true,\n })\n }\n onEvent(ON_VIEW_FIRST_TIME_EVENT(beat.template))\n } else {\n onEvent(ON_VIEW_EVENT(beat.template))\n }\n }\n }, [inView])\n\n useEffect(() => {\n if (inView && beat) {\n if (beat.template === 'MarketingOffer') {\n const offerBeat = beat as BeatLikeOffer\n posthog?.capture('viewed_messaging_insight', {\n template: beat.template,\n campaign_guid: offerBeat.campaign_guid,\n campaign_name: offerBeat.pulse_campaign_name,\n offer_guid: offerBeat.guid,\n user_guid: offerBeat.user_guid,\n })\n } else {\n posthog?.capture('viewed_insight', {\n beat_guid: beat.guid,\n template: beat.template,\n position: index,\n })\n }\n }\n }, [beat, index, inView])\n\n // *************** Click handlers ************************\n const handleClick = () => {\n /* eslint-disable no-unused-expressions */\n onCardClick && onCardClick(beat)\n onEvent(ON_CLICK_EVENT(beat.template))\n\n if (beat.template === 'MarketingOffer') {\n const offerBeat = beat as BeatLikeOffer\n posthog?.capture('clicked_messaging_insight', {\n template: beat.template,\n campaign_guid: offerBeat.campaign_guid,\n campaign_name: offerBeat.pulse_campaign_name,\n offer_guid: offerBeat.guid,\n user_guid: offerBeat.user_guid,\n })\n } else {\n posthog?.capture('clicked_insight', {\n beat_guid: beat.guid,\n template: beat.template,\n position: index,\n })\n }\n }\n\n return (\n <MicroCardTemplate\n aria-roledescription=\"slide\"\n ariaLabel={ariaLabel}\n description={\n beat?.html_micro_description && beat?.html_micro_description.length > 0\n ? beat.html_micro_description\n : beat.html_description || ''\n }\n elevation={elevation}\n heightOverrides={heightOverrides}\n icon={showIcon && <BeatIcon beat={beat} />}\n isActiveCard={isActiveCard}\n onCardClick={handleClick}\n onPrimaryAction={handleClick}\n primaryActionText={beat.micro_call_to_action || cardsCopy?.micro_card_cta}\n ref={ref}\n title={beat.micro_title && beat.micro_title.length > 0 ? beat.micro_title : beat.title}\n variant={variant}\n widthOverrides={widthOverrides}\n />\n )\n}\n"],"mappings":";;;;;;;AAmBA,I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AC,GAEjC,EAAK,aAAa,kBAAkB;AACtC,YAAM,IAAY;AAClB,MAAA,GAAS,QAAQ,6BAA6B;AAAA,QAC5C,UAAU,EAAK;AAAA,QACf,eAAe,EAAU;AAAA,QACzB,eAAe,EAAU;AAAA,QACzB,YAAY,EAAU;AAAA,QACtB,WAAW,EAAU;AAAA,MACvB,CAAC;AAAA,IACH,MACE,CAAA,GAAS,QAAQ,mBAAmB;AAAA,MAClC,WAAW,EAAK;AAAA,MAChB,UAAU,EAAK;AAAA,MACf,UAAU;AAAA,IACZ,CAAC;AAAA,EAEL;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,wBAAqB;AAAA,IACV,WAAA;AAAA,IACX,aACE,GAAM,0BAA0B,GAAM,uBAAuB,SAAS,IAClE,EAAK,yBACL,EAAK,oBAAoB;AAAA,IAEpB,WAAA;AAAA,IACM,iBAAA;AAAA,IACjB,MAAM,KAAY,gBAAA,EAAC,GAAD,EAAgB,MAAA,EAAO,CAAA;AAAA,IAC3B,cAAA;AAAA,IACd,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB,EAAK,wBAAwB,GAAW;AAAA,IACtD,KAAA;AAAA,IACL,OAAO,EAAK,eAAe,EAAK,YAAY,SAAS,IAAI,EAAK,cAAc,EAAK;AAAA,IACxE,SAAA;AAAA,IACO,gBAAA;AAAA,EACjB,CAAA;AAEL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.16",
3
+ "version": "9.4.18",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",