@bikdotai/bik-component-library 0.0.836-beta.3 → 0.0.837-0
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/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +23 -41
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/DiscardModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/DiscardModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +2 -2
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +6 -6
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js +1 -1
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js.map +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +1 -3
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +7 -3
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/button/themes.js +3 -3
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.styled.js +7 -10
- package/dist/cjs/components/checkBox/CheckBox.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/ChipInput.js +1 -1
- package/dist/cjs/components/dropdown/ChipInput.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.styled.js +25 -12
- package/dist/cjs/components/input/Input.styled.js.map +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.js.map +1 -1
- package/dist/cjs/components/product-picker-v2/product.js +1 -1
- package/dist/cjs/components/product-picker-v2/product.js.map +1 -1
- package/dist/cjs/components/tabs/Tabs.js +1 -1
- package/dist/cjs/components/tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/tabs/Tabs.styles.js +22 -8
- package/dist/cjs/components/tabs/Tabs.styles.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewButton.js +2 -2
- package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +42 -74
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/extensions/characterLimit/CharacterLimitExtension.js.map +1 -1
- package/dist/cjs/utils/rgba.js +2 -0
- package/dist/cjs/utils/rgba.js.map +1 -0
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +77 -80
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -3
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +84 -106
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +21 -29
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +21 -21
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +23 -24
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/DiscardModal.js +8 -15
- package/dist/esm/components/agent-builder/components/DiscardModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -11
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +40 -41
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +21 -22
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +4 -13
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +144 -167
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js +7 -7
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +103 -104
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +82 -84
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +19 -20
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +79 -23
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentListing.js +65 -70
- package/dist/esm/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTable.d.ts +0 -2
- package/dist/esm/components/agent-listing/AgentTable.js +15 -16
- package/dist/esm/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +7 -7
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/components/button/Button.styled.js +24 -25
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/themes.d.ts +1 -1
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.d.ts +2 -0
- package/dist/esm/components/checkBox/CheckBox.js +66 -55
- package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.d.ts +1 -0
- package/dist/esm/components/checkBox/CheckBox.styled.js +9 -11
- package/dist/esm/components/checkBox/CheckBox.styled.js.map +1 -1
- package/dist/esm/components/dropdown/ChipInput.d.ts +1 -0
- package/dist/esm/components/dropdown/ChipInput.js +37 -30
- package/dist/esm/components/dropdown/ChipInput.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.d.ts +2 -0
- package/dist/esm/components/dropdown/Dropdown.js +95 -93
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/esm/components/input/Input.js +104 -101
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.model.d.ts +2 -0
- package/dist/esm/components/input/Input.styled.d.ts +2 -0
- package/dist/esm/components/input/Input.styled.js +38 -25
- package/dist/esm/components/input/Input.styled.js.map +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.js.map +1 -1
- package/dist/esm/components/product-picker-v2/product.js +47 -46
- package/dist/esm/components/product-picker-v2/product.js.map +1 -1
- package/dist/esm/components/tabs/Tabs.js +93 -73
- package/dist/esm/components/tabs/Tabs.js.map +1 -1
- package/dist/esm/components/tabs/Tabs.model.d.ts +7 -0
- package/dist/esm/components/tabs/Tabs.styles.d.ts +2 -0
- package/dist/esm/components/tabs/Tabs.styles.js +23 -9
- package/dist/esm/components/tabs/Tabs.styles.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.d.ts +1 -0
- package/dist/esm/components/whats-new/WhatsNew.js +19 -17
- package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +1 -0
- package/dist/esm/components/whats-new/WhatsNewButton.js +40 -32
- package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +160 -173
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.d.ts +3 -20
- package/dist/esm/editor/BikEditor.styles.js +44 -78
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/extensions/characterLimit/CharacterLimitExtension.js.map +1 -1
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/utils/rgba.js +10 -0
- package/dist/esm/utils/rgba.js.map +1 -0
- package/package.json +4 -2
- package/dist/cjs/components/agent-listing/AgentTableShimmer.js +0 -2
- package/dist/cjs/components/agent-listing/AgentTableShimmer.js.map +0 -1
- package/dist/esm/components/agent-builder/__fixtures__/agentValue.d.ts +0 -11
- package/dist/esm/components/agent-listing/AgentTableShimmer.d.ts +0 -12
- package/dist/esm/components/agent-listing/AgentTableShimmer.js +0 -20
- package/dist/esm/components/agent-listing/AgentTableShimmer.js.map +0 -1
- package/dist/esm/components/agent-listing/__fixtures__/agents.d.ts +0 -3
|
@@ -3,19 +3,19 @@ import { COLORS as D } from "../../constants/Theme.js";
|
|
|
3
3
|
import B from "../../assets/icons/info.svg.js";
|
|
4
4
|
import { TitleSmall as $, BodyCaption as R } from "../TypographyStyle.js";
|
|
5
5
|
import { CurrencySymbols as O } from "./constants.js";
|
|
6
|
-
import { ProductHelper as
|
|
7
|
-
import { ProductPickerTag as
|
|
6
|
+
import { ProductHelper as L } from "./helpers/ProductHelper.js";
|
|
7
|
+
import { ProductPickerTag as K } from "./ProductPickerTag.js";
|
|
8
8
|
import { ProductCardStyle as E, ProductInfo as G, ProductSubTitle as H, SKUIDBadge as _, EllipsedBodyTiny as q } from "./style.js";
|
|
9
9
|
import { shouldShowVariant as V, getSkuId as z } from "./utility.js";
|
|
10
10
|
import { CheckBox as J } from "../checkBox/CheckBox.js";
|
|
11
11
|
import { ShimmerImage as M } from "../shimmer-image/ShimmerImage.js";
|
|
12
12
|
import { Tooltip as A } from "../tooltips/Tooltip.js";
|
|
13
13
|
import { IconButton as N } from "../icon-button/IconButton.js";
|
|
14
|
-
const
|
|
14
|
+
const le = (v) => {
|
|
15
15
|
const {
|
|
16
16
|
collectionId: c,
|
|
17
|
-
productId:
|
|
18
|
-
data:
|
|
17
|
+
productId: t,
|
|
18
|
+
data: e,
|
|
19
19
|
selectedData: o,
|
|
20
20
|
selectedCollectionsDispatch: a,
|
|
21
21
|
viewOnly: n,
|
|
@@ -24,18 +24,18 @@ const lt = (v) => {
|
|
|
24
24
|
hideProductCheckbox: l,
|
|
25
25
|
outOfStockAction: y,
|
|
26
26
|
hideVariantCheckbox: p,
|
|
27
|
-
hideProductVariants:
|
|
27
|
+
hideProductVariants: m,
|
|
28
28
|
pickerType: P,
|
|
29
29
|
onProductDetailClick: s,
|
|
30
30
|
showProductDetailInfoIcon: C
|
|
31
|
-
} = v, g = () => !!o?.[c]?.products?.[
|
|
31
|
+
} = v, g = () => !!o?.[c]?.products?.[t], S = (i) => o?.[c]?.products?.[t] ? !!o?.[c]?.products?.[t]?.variants?.[i] : !1, b = !m && V(e) ? "" : `${e.currency ? O[e.currency] ?? "" : ""}${Object.values(e.variants ?? {})?.[0]?.price ?? Object.values(e.variants ?? {})?.[0]?.actualPrice ?? ""}`;
|
|
32
32
|
return /* @__PURE__ */ u("div", { children: [
|
|
33
33
|
/* @__PURE__ */ r(
|
|
34
34
|
U,
|
|
35
35
|
{
|
|
36
36
|
isVariant: !1,
|
|
37
|
-
data:
|
|
38
|
-
productId:
|
|
37
|
+
data: e,
|
|
38
|
+
productId: t,
|
|
39
39
|
collectionId: c,
|
|
40
40
|
isSelected: g(),
|
|
41
41
|
isPartiallyChecked: f,
|
|
@@ -44,28 +44,28 @@ const lt = (v) => {
|
|
|
44
44
|
viewOnly: n,
|
|
45
45
|
hideProductCheckbox: l,
|
|
46
46
|
hideVariantCheckbox: p,
|
|
47
|
-
hideProductVariants:
|
|
47
|
+
hideProductVariants: m,
|
|
48
48
|
pickerType: P,
|
|
49
49
|
outOfStockAction: y,
|
|
50
50
|
onProductDetailClick: s,
|
|
51
51
|
showProductDetailInfoIcon: C,
|
|
52
52
|
currencyAndPrice: b
|
|
53
53
|
},
|
|
54
|
-
|
|
54
|
+
t
|
|
55
55
|
),
|
|
56
|
-
|
|
57
|
-
const
|
|
56
|
+
m ? null : V(e) && Object.keys(e.variants || []).map((i) => {
|
|
57
|
+
const h = `${e.currency ? O[e.currency] ?? "" : ""}${e.variants?.[i]?.price ?? e.variants?.[i]?.actualPrice ?? ""}`;
|
|
58
58
|
return /* @__PURE__ */ r(
|
|
59
59
|
U,
|
|
60
60
|
{
|
|
61
61
|
isVariant: !0,
|
|
62
62
|
hideVariantCheckbox: p,
|
|
63
63
|
data: {
|
|
64
|
-
...
|
|
65
|
-
currency:
|
|
64
|
+
...e.variants[i],
|
|
65
|
+
currency: e.currency
|
|
66
66
|
},
|
|
67
67
|
variantId: i,
|
|
68
|
-
productId:
|
|
68
|
+
productId: t,
|
|
69
69
|
viewOnly: n,
|
|
70
70
|
upliftAdditions: d,
|
|
71
71
|
collectionId: c,
|
|
@@ -74,7 +74,7 @@ const lt = (v) => {
|
|
|
74
74
|
outOfStockAction: y,
|
|
75
75
|
onProductDetailClick: s,
|
|
76
76
|
showProductDetailInfoIcon: C,
|
|
77
|
-
currencyAndPrice:
|
|
77
|
+
currencyAndPrice: h
|
|
78
78
|
},
|
|
79
79
|
i
|
|
80
80
|
);
|
|
@@ -83,8 +83,8 @@ const lt = (v) => {
|
|
|
83
83
|
}, U = (v) => {
|
|
84
84
|
const {
|
|
85
85
|
isVariant: c,
|
|
86
|
-
data:
|
|
87
|
-
productId:
|
|
86
|
+
data: t,
|
|
87
|
+
productId: e,
|
|
88
88
|
collectionId: o,
|
|
89
89
|
variantId: a,
|
|
90
90
|
isSelected: n,
|
|
@@ -93,7 +93,7 @@ const lt = (v) => {
|
|
|
93
93
|
upliftAdditions: l,
|
|
94
94
|
isPartiallyChecked: y,
|
|
95
95
|
hideProductCheckbox: p,
|
|
96
|
-
outOfStockAction:
|
|
96
|
+
outOfStockAction: m,
|
|
97
97
|
hideVariantCheckbox: P,
|
|
98
98
|
hideProductVariants: s,
|
|
99
99
|
pickerType: C = "PRODUCT",
|
|
@@ -102,44 +102,44 @@ const lt = (v) => {
|
|
|
102
102
|
currencyAndPrice: b
|
|
103
103
|
} = v, {
|
|
104
104
|
isVariantForProductPickerTag: i,
|
|
105
|
-
dataForProductPickerTag:
|
|
105
|
+
dataForProductPickerTag: h,
|
|
106
106
|
tagText: I,
|
|
107
107
|
tagType: w
|
|
108
|
-
} =
|
|
109
|
-
|
|
108
|
+
} = L.getDataForProductPickerTag(
|
|
109
|
+
t,
|
|
110
110
|
c,
|
|
111
|
-
|
|
112
|
-
), x = z(
|
|
111
|
+
m
|
|
112
|
+
), x = z(t, c);
|
|
113
113
|
return /* @__PURE__ */ u(
|
|
114
114
|
E,
|
|
115
115
|
{
|
|
116
116
|
isVariant: c,
|
|
117
117
|
onClick: (k) => {
|
|
118
118
|
if (k.stopPropagation(), C === "PRODUCT" && (p || P)) {
|
|
119
|
-
const T = Object.keys(
|
|
119
|
+
const T = Object.keys(t.variants);
|
|
120
120
|
s ? n ? d({
|
|
121
121
|
type: "productUnselected",
|
|
122
122
|
data: {
|
|
123
|
-
productId:
|
|
123
|
+
productId: e,
|
|
124
124
|
collectionId: o
|
|
125
125
|
}
|
|
126
126
|
}) : l("productSelected", {
|
|
127
|
-
productId:
|
|
127
|
+
productId: e,
|
|
128
128
|
variantId: a,
|
|
129
129
|
collectionId: o,
|
|
130
|
-
product:
|
|
130
|
+
product: t
|
|
131
131
|
}) : n ? d({
|
|
132
132
|
type: "variantUnselected",
|
|
133
133
|
data: {
|
|
134
|
-
productId:
|
|
134
|
+
productId: e,
|
|
135
135
|
variantId: a,
|
|
136
136
|
collectionId: o
|
|
137
137
|
}
|
|
138
138
|
}) : l("variantSelected", {
|
|
139
|
-
productId:
|
|
139
|
+
productId: e,
|
|
140
140
|
variantId: a || T[0],
|
|
141
141
|
collectionId: o,
|
|
142
|
-
variant:
|
|
142
|
+
variant: t
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
},
|
|
@@ -150,30 +150,31 @@ const lt = (v) => {
|
|
|
150
150
|
{
|
|
151
151
|
isChecked: n,
|
|
152
152
|
isPartiallyChecked: y || !1,
|
|
153
|
+
ariaLabel: t.name,
|
|
153
154
|
onValueChange: function(k, T, j) {
|
|
154
155
|
j?.stopPropagation(), c ? k ? l(
|
|
155
156
|
s ? "productSelected" : "variantSelected",
|
|
156
157
|
{
|
|
157
|
-
productId:
|
|
158
|
+
productId: e,
|
|
158
159
|
variantId: a,
|
|
159
160
|
collectionId: o,
|
|
160
|
-
variant:
|
|
161
|
+
variant: t
|
|
161
162
|
}
|
|
162
163
|
) : d({
|
|
163
164
|
type: s ? "productUnselected" : "variantUnselected",
|
|
164
165
|
data: {
|
|
165
|
-
productId:
|
|
166
|
+
productId: e,
|
|
166
167
|
variantId: a,
|
|
167
168
|
collectionId: o
|
|
168
169
|
}
|
|
169
170
|
}) : k ? l("productSelected", {
|
|
170
|
-
productId:
|
|
171
|
+
productId: e,
|
|
171
172
|
collectionId: o,
|
|
172
|
-
product:
|
|
173
|
+
product: t
|
|
173
174
|
}) : d({
|
|
174
175
|
type: "productUnselected",
|
|
175
176
|
data: {
|
|
176
|
-
productId:
|
|
177
|
+
productId: e,
|
|
177
178
|
collectionId: o
|
|
178
179
|
}
|
|
179
180
|
});
|
|
@@ -185,7 +186,7 @@ const lt = (v) => {
|
|
|
185
186
|
{
|
|
186
187
|
width: 40,
|
|
187
188
|
height: 40,
|
|
188
|
-
imageUrl:
|
|
189
|
+
imageUrl: t.image,
|
|
189
190
|
alt: "Item",
|
|
190
191
|
borderRadius: 4
|
|
191
192
|
}
|
|
@@ -213,7 +214,7 @@ const lt = (v) => {
|
|
|
213
214
|
A,
|
|
214
215
|
{
|
|
215
216
|
variant: "light",
|
|
216
|
-
body:
|
|
217
|
+
body: t.name,
|
|
217
218
|
placement: "bottom",
|
|
218
219
|
delay: 400,
|
|
219
220
|
children: /* @__PURE__ */ r(
|
|
@@ -223,17 +224,17 @@ const lt = (v) => {
|
|
|
223
224
|
flex: 1
|
|
224
225
|
},
|
|
225
226
|
numberOfLines: 1,
|
|
226
|
-
children:
|
|
227
|
+
children: t.name
|
|
227
228
|
}
|
|
228
229
|
)
|
|
229
230
|
}
|
|
230
231
|
),
|
|
231
232
|
/* @__PURE__ */ u(G, { children: [
|
|
232
233
|
/* @__PURE__ */ r(
|
|
233
|
-
|
|
234
|
+
K,
|
|
234
235
|
{
|
|
235
236
|
isVariant: i,
|
|
236
|
-
data:
|
|
237
|
+
data: h,
|
|
237
238
|
tagText: I,
|
|
238
239
|
tagType: w
|
|
239
240
|
}
|
|
@@ -242,7 +243,7 @@ const lt = (v) => {
|
|
|
242
243
|
N,
|
|
243
244
|
{
|
|
244
245
|
onClick: () => {
|
|
245
|
-
g?.(
|
|
246
|
+
g?.(t);
|
|
246
247
|
},
|
|
247
248
|
Icon: () => /* @__PURE__ */ r(
|
|
248
249
|
B,
|
|
@@ -259,7 +260,7 @@ const lt = (v) => {
|
|
|
259
260
|
}
|
|
260
261
|
),
|
|
261
262
|
/* @__PURE__ */ u(H, { children: [
|
|
262
|
-
!
|
|
263
|
+
!h?.fbStatus && i || I ? null : /* @__PURE__ */ r(R, { color: D.content.secondary, children: b }),
|
|
263
264
|
x && /* @__PURE__ */ r(A, { body: x, placement: "top", children: /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(q, { children: `SKU ID: ${x}` }) }) })
|
|
264
265
|
] })
|
|
265
266
|
]
|
|
@@ -271,6 +272,6 @@ const lt = (v) => {
|
|
|
271
272
|
};
|
|
272
273
|
export {
|
|
273
274
|
U as ProductCard,
|
|
274
|
-
|
|
275
|
+
le as ProductGroup
|
|
275
276
|
};
|
|
276
277
|
//# sourceMappingURL=product.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","sources":["../../../../src/components/product-picker-v2/product.tsx"],"sourcesContent":["import { COLORS } from '@src/constants/Theme';\nimport InfoIcon from '../../assets/icons/info.svg';\nimport { CheckBox } from '../checkBox';\nimport { IconButton } from '../icon-button';\nimport { ShimmerImage } from '../shimmer-image';\nimport { Tooltip } from '../tooltips';\nimport { BodyCaption, TitleSmall } from '../TypographyStyle';\nimport { CurrencySymbols } from './constants';\nimport { ProductHelper } from './helpers/ProductHelper';\nimport { ProductPickerTag } from './ProductPickerTag';\nimport type { SelectedCollectionsActions } from './reducers';\nimport {\n\tEllipsedBodyTiny,\n\tProductCardStyle,\n\tProductInfo,\n\tProductSubTitle,\n\tSKUIDBadge,\n} from './style';\nimport {\n\tOUT_OF_STOCK_ACTION,\n\ttype Product,\n\ttype ProductVariant,\n\ttype SelectedItems,\n} from './type';\nimport { getSkuId, shouldShowVariant } from './utility';\n\ninterface ProductGroupInterface {\n\tcollectionId: string;\n\tproductId: string;\n\tdata: Product;\n\tselectedData: SelectedItems;\n\tselectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;\n\tviewOnly: boolean;\n\tisProductPartiallyChecked?: boolean;\n\tupliftAdditions: any;\n\thideProductCheckbox?: boolean;\n\toutOfStockAction?: OUT_OF_STOCK_ACTION;\n\thideVariantCheckbox?: boolean;\n\thideProductVariants?: boolean;\n\tshowProductDetailInfoIcon?: boolean;\n\tpickerType?: 'COLLECTION' | 'PRODUCT';\n\tonProductDetailClick?: (productData: Product | ProductVariant) => void;\n}\n\nexport const ProductGroup = (props: ProductGroupInterface) => {\n\tconst {\n\t\tcollectionId,\n\t\tproductId,\n\t\tdata,\n\t\tselectedData,\n\t\tselectedCollectionsDispatch,\n\t\tviewOnly,\n\t\tupliftAdditions,\n\t\tisProductPartiallyChecked,\n\t\thideProductCheckbox,\n\t\toutOfStockAction,\n\t\thideVariantCheckbox,\n\t\thideProductVariants,\n\t\tpickerType,\n\t\tonProductDetailClick,\n\t\tshowProductDetailInfoIcon,\n\t} = props;\n\n\tconst containsProduct = () => {\n\t\tconst product = selectedData?.[collectionId]?.['products']?.[productId];\n\t\treturn product ? true : false;\n\t};\n\n\tconst containsVariant = (variantId: string) => {\n\t\tconst product = selectedData?.[collectionId]?.['products']?.[productId];\n\t\tif (!product) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst variant =\n\t\t\tselectedData?.[collectionId]?.['products']?.[productId]?.['variants']?.[\n\t\t\t\tvariantId\n\t\t\t];\n\n\t\treturn variant ? true : false;\n\t};\n\n\tconst currencyAndPriceForProduct = !(\n\t\t!hideProductVariants && shouldShowVariant(data)\n\t)\n\t\t? `${data.currency ? CurrencySymbols[data.currency] ?? '' : ''}${\n\t\t\t\tObject.values(data['variants'] ?? {})?.[0]?.price ??\n\t\t\t\tObject.values(data['variants'] ?? {})?.[0]?.actualPrice ??\n\t\t\t\t''\n\t\t }`\n\t\t: '';\n\n\treturn (\n\t\t<div>\n\t\t\t<ProductCard\n\t\t\t\tisVariant={false}\n\t\t\t\tdata={data}\n\t\t\t\tproductId={productId}\n\t\t\t\tcollectionId={collectionId}\n\t\t\t\tisSelected={containsProduct()}\n\t\t\t\tisPartiallyChecked={isProductPartiallyChecked}\n\t\t\t\tselectedCollectionsDispatch={selectedCollectionsDispatch}\n\t\t\t\tkey={productId}\n\t\t\t\tupliftAdditions={upliftAdditions}\n\t\t\t\tviewOnly={viewOnly}\n\t\t\t\thideProductCheckbox={hideProductCheckbox}\n\t\t\t\thideVariantCheckbox={hideVariantCheckbox}\n\t\t\t\thideProductVariants={hideProductVariants}\n\t\t\t\tpickerType={pickerType}\n\t\t\t\toutOfStockAction={outOfStockAction}\n\t\t\t\tonProductDetailClick={onProductDetailClick}\n\t\t\t\tshowProductDetailInfoIcon={showProductDetailInfoIcon}\n\t\t\t\tcurrencyAndPrice={currencyAndPriceForProduct}\n\t\t\t/>\n\n\t\t\t{hideProductVariants\n\t\t\t\t? null\n\t\t\t\t: shouldShowVariant(data) &&\n\t\t\t\t Object.keys(data['variants'] || []).map((variantId: any) => {\n\t\t\t\t\t\tconst currencyAndPriceForVariant = `${\n\t\t\t\t\t\t\tdata.currency ? CurrencySymbols[data.currency] ?? '' : ''\n\t\t\t\t\t\t}${\n\t\t\t\t\t\t\tdata['variants']?.[variantId]?.price ??\n\t\t\t\t\t\t\tdata['variants']?.[variantId]?.actualPrice ??\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t}`;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ProductCard\n\t\t\t\t\t\t\t\tisVariant={true}\n\t\t\t\t\t\t\t\tkey={variantId}\n\t\t\t\t\t\t\t\thideVariantCheckbox={hideVariantCheckbox}\n\t\t\t\t\t\t\t\tdata={{\n\t\t\t\t\t\t\t\t\t...(data['variants'] as { [key: string]: ProductVariant })[\n\t\t\t\t\t\t\t\t\t\tvariantId\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tcurrency: data.currency,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvariantId={variantId}\n\t\t\t\t\t\t\t\tproductId={productId}\n\t\t\t\t\t\t\t\tviewOnly={viewOnly}\n\t\t\t\t\t\t\t\tupliftAdditions={upliftAdditions}\n\t\t\t\t\t\t\t\tcollectionId={collectionId}\n\t\t\t\t\t\t\t\tisSelected={containsVariant(variantId)}\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch={selectedCollectionsDispatch}\n\t\t\t\t\t\t\t\toutOfStockAction={outOfStockAction}\n\t\t\t\t\t\t\t\tonProductDetailClick={onProductDetailClick}\n\t\t\t\t\t\t\t\tshowProductDetailInfoIcon={showProductDetailInfoIcon}\n\t\t\t\t\t\t\t\tcurrencyAndPrice={currencyAndPriceForVariant}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t })}\n\t\t</div>\n\t);\n};\n\ninterface ProductCardInterface {\n\tisVariant: boolean;\n\tdata: Product | ProductVariant;\n\tproductId: string;\n\tcollectionId: string;\n\tvariantId?: string;\n\tisSelected: boolean;\n\tselectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;\n\tviewOnly: boolean;\n\tisPartiallyChecked?: boolean;\n\tupliftAdditions: any;\n\thideProductCheckbox?: boolean;\n\toutOfStockAction?: OUT_OF_STOCK_ACTION;\n\thideVariantCheckbox?: boolean;\n\thideProductVariants?: boolean;\n\tshowProductDetailInfoIcon?: boolean;\n\tpickerType?: 'COLLECTION' | 'PRODUCT';\n\tonProductDetailClick?: (productData: Product | ProductVariant) => void;\n\tcurrencyAndPrice?: string;\n}\n\nexport const ProductCard = (props: ProductCardInterface) => {\n\tconst {\n\t\tisVariant,\n\t\tdata,\n\t\tproductId,\n\t\tcollectionId,\n\t\tvariantId,\n\t\tisSelected,\n\t\tselectedCollectionsDispatch,\n\t\tviewOnly,\n\t\tupliftAdditions,\n\t\tisPartiallyChecked,\n\t\thideProductCheckbox,\n\t\toutOfStockAction,\n\t\thideVariantCheckbox,\n\t\thideProductVariants,\n\t\tpickerType = 'PRODUCT',\n\t\tonProductDetailClick,\n\t\tshowProductDetailInfoIcon,\n\t\tcurrencyAndPrice,\n\t} = props;\n\tconst {\n\t\tisVariantForProductPickerTag,\n\t\tdataForProductPickerTag,\n\t\ttagText,\n\t\ttagType,\n\t} = ProductHelper.getDataForProductPickerTag(\n\t\tdata,\n\t\tisVariant,\n\t\toutOfStockAction,\n\t);\n\n\t//show skuid for every variant\n\t//show skuid for product if there is only one variant (as the product itself is the variant)\n\tconst skuId = getSkuId(data, isVariant);\n\n\tconst onProductCardClick = (event) => {\n\t\tevent.stopPropagation();\n\n\t\tif (\n\t\t\tpickerType === 'PRODUCT' &&\n\t\t\t(hideProductCheckbox || hideVariantCheckbox)\n\t\t) {\n\t\t\tconst keys = Object.keys(data['variants']);\n\t\t\tif (hideProductVariants) {\n\t\t\t\tif (!isSelected) {\n\t\t\t\t\tupliftAdditions('productSelected', {\n\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\tproduct: data,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\ttype: 'productUnselected',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!isSelected) {\n\t\t\t\t\tupliftAdditions('variantSelected', {\n\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\tvariantId: variantId || keys[0],\n\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\tvariant: data,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\ttype: 'variantUnselected',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<ProductCardStyle\n\t\t\tisVariant={isVariant}\n\t\t\tonClick={onProductCardClick}\n\t\t\tisActive={isSelected}\n\t\t>\n\t\t\t{(isVariant && !(viewOnly || hideVariantCheckbox)) ||\n\t\t\t(!isVariant && !(viewOnly || hideProductCheckbox)) ? (\n\t\t\t\t<CheckBox\n\t\t\t\t\tisChecked={isSelected}\n\t\t\t\t\tisPartiallyChecked={isPartiallyChecked || false}\n\t\t\t\t\tonValueChange={function (checked: boolean, _val, event): void {\n\t\t\t\t\t\tevent?.stopPropagation();\n\n\t\t\t\t\t\tif (!isVariant) {\n\t\t\t\t\t\t\tif (!checked) {\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\t\t\t\ttype: 'productUnselected',\n\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupliftAdditions('productSelected', {\n\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\tproduct: data,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!checked) {\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\t\t\t\ttype: hideProductVariants\n\t\t\t\t\t\t\t\t\t\t? 'productUnselected'\n\t\t\t\t\t\t\t\t\t\t: 'variantUnselected',\n\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupliftAdditions(\n\t\t\t\t\t\t\t\t\thideProductVariants ? 'productSelected' : 'variantSelected',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t\tvariant: data,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\t\t\t<div>\n\t\t\t\t<ShimmerImage\n\t\t\t\t\twidth={40}\n\t\t\t\t\theight={40}\n\t\t\t\t\timageUrl={data.image}\n\t\t\t\t\talt=\"Item\"\n\t\t\t\t\tborderRadius={4}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: 1,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'space-between',\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tvariant={'light'}\n\t\t\t\t\t\tbody={data.name}\n\t\t\t\t\t\tplacement={'bottom'}\n\t\t\t\t\t\tdelay={400}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TitleSmall\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tnumberOfLines={1}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{data.name}\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t</Tooltip>\n\n\t\t\t\t\t<ProductInfo>\n\t\t\t\t\t\t<ProductPickerTag\n\t\t\t\t\t\t\tisVariant={isVariantForProductPickerTag}\n\t\t\t\t\t\t\tdata={dataForProductPickerTag}\n\t\t\t\t\t\t\ttagText={tagText}\n\t\t\t\t\t\t\ttagType={tagType}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{showProductDetailInfoIcon && (\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tonProductDetailClick?.(data);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tIcon={() => (\n\t\t\t\t\t\t\t\t\t<InfoIcon\n\t\t\t\t\t\t\t\t\t\twidth={20}\n\t\t\t\t\t\t\t\t\t\theight={20}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.placeholder}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ProductInfo>\n\t\t\t\t</div>\n\t\t\t\t<ProductSubTitle>\n\t\t\t\t\t{/* in the cases where we show tags, do not show the currency and price and sku id */}\n\t\t\t\t\t{(!(dataForProductPickerTag as ProductVariant)?.fbStatus &&\n\t\t\t\t\t\tisVariantForProductPickerTag) ||\n\t\t\t\t\ttagText ? null : (\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t{currencyAndPrice}\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t)}\n\t\t\t\t\t{skuId && (\n\t\t\t\t\t\t<Tooltip body={skuId} placement=\"top\">\n\t\t\t\t\t\t\t<SKUIDBadge>\n\t\t\t\t\t\t\t\t<EllipsedBodyTiny>{`SKU ID: ${skuId}`}</EllipsedBodyTiny>\n\t\t\t\t\t\t\t</SKUIDBadge>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t)}\n\t\t\t\t</ProductSubTitle>\n\t\t\t</div>\n\t\t</ProductCardStyle>\n\t);\n};\n"],"names":["ProductGroup","props","collectionId","productId","data","selectedData","selectedCollectionsDispatch","viewOnly","upliftAdditions","isProductPartiallyChecked","hideProductCheckbox","outOfStockAction","hideVariantCheckbox","hideProductVariants","pickerType","onProductDetailClick","showProductDetailInfoIcon","containsProduct","containsVariant","variantId","currencyAndPriceForProduct","shouldShowVariant","CurrencySymbols","jsx","ProductCard","currencyAndPriceForVariant","isVariant","isSelected","isPartiallyChecked","currencyAndPrice","isVariantForProductPickerTag","dataForProductPickerTag","tagText","tagType","ProductHelper","skuId","getSkuId","jsxs","ProductCardStyle","event","keys","CheckBox","checked","_val","Fragment","ShimmerImage","Tooltip","TitleSmall","ProductInfo","ProductPickerTag","IconButton","InfoIcon","COLORS","ProductSubTitle","BodyCaption","SKUIDBadge","EllipsedBodyTiny"],"mappings":";;;;;;;;;;;;;AA4CO,MAAMA,KAAe,CAACC,MAAiC;AAC7D,QAAM;AAAA,IACL,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,2BAAAC;AAAA,EAAA,IACGf,GAEEgB,IAAkB,MAEhB,EADSZ,IAAeH,CAAY,GAAI,WAAcC,CAAS,GAIjEe,IAAkB,CAACC,MACRd,IAAeH,CAAY,GAAI,WAAcC,CAAS,IAU/D,EAJNE,IAAeH,CAAY,GAAI,WAAcC,CAAS,GAAI,WACzDgB,CACD,IANO,IAWHC,IACL,CAACP,KAAuBQ,EAAkBjB,CAAI,IAO5C,KALA,GAAGA,EAAK,WAAWkB,EAAgBlB,EAAK,QAAQ,KAAK,KAAK,EAAE,GAC5D,OAAO,OAAOA,EAAK,YAAe,EAAE,IAAI,CAAC,GAAG,SAC5C,OAAO,OAAOA,EAAK,YAAe,CAAA,CAAE,IAAI,CAAC,GAAG,eAC5C,EACA;AAGH,2BACE,OAAA,EACA,UAAA;AAAA,IAAA,gBAAAmB;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,WAAW;AAAA,QACX,MAAApB;AAAA,QACA,WAAAD;AAAA,QACA,cAAAD;AAAA,QACA,YAAYe,EAAA;AAAA,QACZ,oBAAoBR;AAAA,QACpB,6BAAAH;AAAA,QAE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UAAA,WAAWrB,CAAK,IAAG,GACvC,EAAA,CACD;AAAA,cAAA,EAAA,CAEF;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACD;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
1
|
+
{"version":3,"file":"product.js","sources":["../../../../src/components/product-picker-v2/product.tsx"],"sourcesContent":["import { COLORS } from '@src/constants/Theme';\nimport InfoIcon from '../../assets/icons/info.svg';\nimport { CheckBox } from '../checkBox';\nimport { IconButton } from '../icon-button';\nimport { ShimmerImage } from '../shimmer-image';\nimport { Tooltip } from '../tooltips';\nimport { BodyCaption, TitleSmall } from '../TypographyStyle';\nimport { CurrencySymbols } from './constants';\nimport { ProductHelper } from './helpers/ProductHelper';\nimport { ProductPickerTag } from './ProductPickerTag';\nimport type { SelectedCollectionsActions } from './reducers';\nimport {\n\tEllipsedBodyTiny,\n\tProductCardStyle,\n\tProductInfo,\n\tProductSubTitle,\n\tSKUIDBadge,\n} from './style';\nimport {\n\tOUT_OF_STOCK_ACTION,\n\ttype Product,\n\ttype ProductVariant,\n\ttype SelectedItems,\n} from './type';\nimport { getSkuId, shouldShowVariant } from './utility';\n\ninterface ProductGroupInterface {\n\tcollectionId: string;\n\tproductId: string;\n\tdata: Product;\n\tselectedData: SelectedItems;\n\tselectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;\n\tviewOnly: boolean;\n\tisProductPartiallyChecked?: boolean;\n\tupliftAdditions: any;\n\thideProductCheckbox?: boolean;\n\toutOfStockAction?: OUT_OF_STOCK_ACTION;\n\thideVariantCheckbox?: boolean;\n\thideProductVariants?: boolean;\n\tshowProductDetailInfoIcon?: boolean;\n\tpickerType?: 'COLLECTION' | 'PRODUCT';\n\tonProductDetailClick?: (productData: Product | ProductVariant) => void;\n}\n\nexport const ProductGroup = (props: ProductGroupInterface) => {\n\tconst {\n\t\tcollectionId,\n\t\tproductId,\n\t\tdata,\n\t\tselectedData,\n\t\tselectedCollectionsDispatch,\n\t\tviewOnly,\n\t\tupliftAdditions,\n\t\tisProductPartiallyChecked,\n\t\thideProductCheckbox,\n\t\toutOfStockAction,\n\t\thideVariantCheckbox,\n\t\thideProductVariants,\n\t\tpickerType,\n\t\tonProductDetailClick,\n\t\tshowProductDetailInfoIcon,\n\t} = props;\n\n\tconst containsProduct = () => {\n\t\tconst product = selectedData?.[collectionId]?.['products']?.[productId];\n\t\treturn product ? true : false;\n\t};\n\n\tconst containsVariant = (variantId: string) => {\n\t\tconst product = selectedData?.[collectionId]?.['products']?.[productId];\n\t\tif (!product) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst variant =\n\t\t\tselectedData?.[collectionId]?.['products']?.[productId]?.['variants']?.[\n\t\t\t\tvariantId\n\t\t\t];\n\n\t\treturn variant ? true : false;\n\t};\n\n\tconst currencyAndPriceForProduct = !(\n\t\t!hideProductVariants && shouldShowVariant(data)\n\t)\n\t\t? `${data.currency ? CurrencySymbols[data.currency] ?? '' : ''}${\n\t\t\t\tObject.values(data['variants'] ?? {})?.[0]?.price ??\n\t\t\t\tObject.values(data['variants'] ?? {})?.[0]?.actualPrice ??\n\t\t\t\t''\n\t\t }`\n\t\t: '';\n\n\treturn (\n\t\t<div>\n\t\t\t<ProductCard\n\t\t\t\tisVariant={false}\n\t\t\t\tdata={data}\n\t\t\t\tproductId={productId}\n\t\t\t\tcollectionId={collectionId}\n\t\t\t\tisSelected={containsProduct()}\n\t\t\t\tisPartiallyChecked={isProductPartiallyChecked}\n\t\t\t\tselectedCollectionsDispatch={selectedCollectionsDispatch}\n\t\t\t\tkey={productId}\n\t\t\t\tupliftAdditions={upliftAdditions}\n\t\t\t\tviewOnly={viewOnly}\n\t\t\t\thideProductCheckbox={hideProductCheckbox}\n\t\t\t\thideVariantCheckbox={hideVariantCheckbox}\n\t\t\t\thideProductVariants={hideProductVariants}\n\t\t\t\tpickerType={pickerType}\n\t\t\t\toutOfStockAction={outOfStockAction}\n\t\t\t\tonProductDetailClick={onProductDetailClick}\n\t\t\t\tshowProductDetailInfoIcon={showProductDetailInfoIcon}\n\t\t\t\tcurrencyAndPrice={currencyAndPriceForProduct}\n\t\t\t/>\n\n\t\t\t{hideProductVariants\n\t\t\t\t? null\n\t\t\t\t: shouldShowVariant(data) &&\n\t\t\t\t Object.keys(data['variants'] || []).map((variantId: any) => {\n\t\t\t\t\t\tconst currencyAndPriceForVariant = `${\n\t\t\t\t\t\t\tdata.currency ? CurrencySymbols[data.currency] ?? '' : ''\n\t\t\t\t\t\t}${\n\t\t\t\t\t\t\tdata['variants']?.[variantId]?.price ??\n\t\t\t\t\t\t\tdata['variants']?.[variantId]?.actualPrice ??\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t}`;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ProductCard\n\t\t\t\t\t\t\t\tisVariant={true}\n\t\t\t\t\t\t\t\tkey={variantId}\n\t\t\t\t\t\t\t\thideVariantCheckbox={hideVariantCheckbox}\n\t\t\t\t\t\t\t\tdata={{\n\t\t\t\t\t\t\t\t\t...(data['variants'] as { [key: string]: ProductVariant })[\n\t\t\t\t\t\t\t\t\t\tvariantId\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tcurrency: data.currency,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvariantId={variantId}\n\t\t\t\t\t\t\t\tproductId={productId}\n\t\t\t\t\t\t\t\tviewOnly={viewOnly}\n\t\t\t\t\t\t\t\tupliftAdditions={upliftAdditions}\n\t\t\t\t\t\t\t\tcollectionId={collectionId}\n\t\t\t\t\t\t\t\tisSelected={containsVariant(variantId)}\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch={selectedCollectionsDispatch}\n\t\t\t\t\t\t\t\toutOfStockAction={outOfStockAction}\n\t\t\t\t\t\t\t\tonProductDetailClick={onProductDetailClick}\n\t\t\t\t\t\t\t\tshowProductDetailInfoIcon={showProductDetailInfoIcon}\n\t\t\t\t\t\t\t\tcurrencyAndPrice={currencyAndPriceForVariant}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t })}\n\t\t</div>\n\t);\n};\n\ninterface ProductCardInterface {\n\tisVariant: boolean;\n\tdata: Product | ProductVariant;\n\tproductId: string;\n\tcollectionId: string;\n\tvariantId?: string;\n\tisSelected: boolean;\n\tselectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;\n\tviewOnly: boolean;\n\tisPartiallyChecked?: boolean;\n\tupliftAdditions: any;\n\thideProductCheckbox?: boolean;\n\toutOfStockAction?: OUT_OF_STOCK_ACTION;\n\thideVariantCheckbox?: boolean;\n\thideProductVariants?: boolean;\n\tshowProductDetailInfoIcon?: boolean;\n\tpickerType?: 'COLLECTION' | 'PRODUCT';\n\tonProductDetailClick?: (productData: Product | ProductVariant) => void;\n\tcurrencyAndPrice?: string;\n}\n\nexport const ProductCard = (props: ProductCardInterface) => {\n\tconst {\n\t\tisVariant,\n\t\tdata,\n\t\tproductId,\n\t\tcollectionId,\n\t\tvariantId,\n\t\tisSelected,\n\t\tselectedCollectionsDispatch,\n\t\tviewOnly,\n\t\tupliftAdditions,\n\t\tisPartiallyChecked,\n\t\thideProductCheckbox,\n\t\toutOfStockAction,\n\t\thideVariantCheckbox,\n\t\thideProductVariants,\n\t\tpickerType = 'PRODUCT',\n\t\tonProductDetailClick,\n\t\tshowProductDetailInfoIcon,\n\t\tcurrencyAndPrice,\n\t} = props;\n\tconst {\n\t\tisVariantForProductPickerTag,\n\t\tdataForProductPickerTag,\n\t\ttagText,\n\t\ttagType,\n\t} = ProductHelper.getDataForProductPickerTag(\n\t\tdata,\n\t\tisVariant,\n\t\toutOfStockAction,\n\t);\n\n\t//show skuid for every variant\n\t//show skuid for product if there is only one variant (as the product itself is the variant)\n\tconst skuId = getSkuId(data, isVariant);\n\n\tconst onProductCardClick = (event) => {\n\t\tevent.stopPropagation();\n\n\t\tif (\n\t\t\tpickerType === 'PRODUCT' &&\n\t\t\t(hideProductCheckbox || hideVariantCheckbox)\n\t\t) {\n\t\t\tconst keys = Object.keys(data['variants']);\n\t\t\tif (hideProductVariants) {\n\t\t\t\tif (!isSelected) {\n\t\t\t\t\tupliftAdditions('productSelected', {\n\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\tproduct: data,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\ttype: 'productUnselected',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!isSelected) {\n\t\t\t\t\tupliftAdditions('variantSelected', {\n\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\tvariantId: variantId || keys[0],\n\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\tvariant: data,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\ttype: 'variantUnselected',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<ProductCardStyle\n\t\t\tisVariant={isVariant}\n\t\t\tonClick={onProductCardClick}\n\t\t\tisActive={isSelected}\n\t\t>\n\t\t\t{(isVariant && !(viewOnly || hideVariantCheckbox)) ||\n\t\t\t(!isVariant && !(viewOnly || hideProductCheckbox)) ? (\n\t\t\t\t<CheckBox\n\t\t\t\t\tisChecked={isSelected}\n\t\t\t\t\tisPartiallyChecked={isPartiallyChecked || false}\n\t\t\t\t\tariaLabel={data.name}\n\t\t\t\t\tonValueChange={function (checked: boolean, _val, event): void {\n\t\t\t\t\t\tevent?.stopPropagation();\n\n\t\t\t\t\t\tif (!isVariant) {\n\t\t\t\t\t\t\tif (!checked) {\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\t\t\t\ttype: 'productUnselected',\n\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupliftAdditions('productSelected', {\n\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\tproduct: data,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!checked) {\n\t\t\t\t\t\t\t\tselectedCollectionsDispatch({\n\t\t\t\t\t\t\t\t\ttype: hideProductVariants\n\t\t\t\t\t\t\t\t\t\t? 'productUnselected'\n\t\t\t\t\t\t\t\t\t\t: 'variantUnselected',\n\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupliftAdditions(\n\t\t\t\t\t\t\t\t\thideProductVariants ? 'productSelected' : 'variantSelected',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tproductId: productId,\n\t\t\t\t\t\t\t\t\t\tvariantId: variantId,\n\t\t\t\t\t\t\t\t\t\tcollectionId: collectionId,\n\t\t\t\t\t\t\t\t\t\tvariant: data,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\t\t\t<div>\n\t\t\t\t<ShimmerImage\n\t\t\t\t\twidth={40}\n\t\t\t\t\theight={40}\n\t\t\t\t\timageUrl={data.image}\n\t\t\t\t\talt=\"Item\"\n\t\t\t\t\tborderRadius={4}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: 1,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'space-between',\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tvariant={'light'}\n\t\t\t\t\t\tbody={data.name}\n\t\t\t\t\t\tplacement={'bottom'}\n\t\t\t\t\t\tdelay={400}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TitleSmall\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tnumberOfLines={1}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{data.name}\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t</Tooltip>\n\n\t\t\t\t\t<ProductInfo>\n\t\t\t\t\t\t<ProductPickerTag\n\t\t\t\t\t\t\tisVariant={isVariantForProductPickerTag}\n\t\t\t\t\t\t\tdata={dataForProductPickerTag}\n\t\t\t\t\t\t\ttagText={tagText}\n\t\t\t\t\t\t\ttagType={tagType}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{showProductDetailInfoIcon && (\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tonProductDetailClick?.(data);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tIcon={() => (\n\t\t\t\t\t\t\t\t\t<InfoIcon\n\t\t\t\t\t\t\t\t\t\twidth={20}\n\t\t\t\t\t\t\t\t\t\theight={20}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.placeholder}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ProductInfo>\n\t\t\t\t</div>\n\t\t\t\t<ProductSubTitle>\n\t\t\t\t\t{/* in the cases where we show tags, do not show the currency and price and sku id */}\n\t\t\t\t\t{(!(dataForProductPickerTag as ProductVariant)?.fbStatus &&\n\t\t\t\t\t\tisVariantForProductPickerTag) ||\n\t\t\t\t\ttagText ? null : (\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t{currencyAndPrice}\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t)}\n\t\t\t\t\t{skuId && (\n\t\t\t\t\t\t<Tooltip body={skuId} placement=\"top\">\n\t\t\t\t\t\t\t<SKUIDBadge>\n\t\t\t\t\t\t\t\t<EllipsedBodyTiny>{`SKU ID: ${skuId}`}</EllipsedBodyTiny>\n\t\t\t\t\t\t\t</SKUIDBadge>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t)}\n\t\t\t\t</ProductSubTitle>\n\t\t\t</div>\n\t\t</ProductCardStyle>\n\t);\n};\n"],"names":["ProductGroup","props","collectionId","productId","data","selectedData","selectedCollectionsDispatch","viewOnly","upliftAdditions","isProductPartiallyChecked","hideProductCheckbox","outOfStockAction","hideVariantCheckbox","hideProductVariants","pickerType","onProductDetailClick","showProductDetailInfoIcon","containsProduct","containsVariant","variantId","currencyAndPriceForProduct","shouldShowVariant","CurrencySymbols","jsx","ProductCard","currencyAndPriceForVariant","isVariant","isSelected","isPartiallyChecked","currencyAndPrice","isVariantForProductPickerTag","dataForProductPickerTag","tagText","tagType","ProductHelper","skuId","getSkuId","jsxs","ProductCardStyle","event","keys","CheckBox","checked","_val","Fragment","ShimmerImage","Tooltip","TitleSmall","ProductInfo","ProductPickerTag","IconButton","InfoIcon","COLORS","ProductSubTitle","BodyCaption","SKUIDBadge","EllipsedBodyTiny"],"mappings":";;;;;;;;;;;;;AA4CO,MAAMA,KAAe,CAACC,MAAiC;AAC7D,QAAM;AAAA,IACL,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,2BAAAC;AAAA,EAAA,IACGf,GAEEgB,IAAkB,MAEhB,EADSZ,IAAeH,CAAY,GAAI,WAAcC,CAAS,GAIjEe,IAAkB,CAACC,MACRd,IAAeH,CAAY,GAAI,WAAcC,CAAS,IAU/D,EAJNE,IAAeH,CAAY,GAAI,WAAcC,CAAS,GAAI,WACzDgB,CACD,IANO,IAWHC,IACL,CAACP,KAAuBQ,EAAkBjB,CAAI,IAO5C,KALA,GAAGA,EAAK,WAAWkB,EAAgBlB,EAAK,QAAQ,KAAK,KAAK,EAAE,GAC5D,OAAO,OAAOA,EAAK,YAAe,EAAE,IAAI,CAAC,GAAG,SAC5C,OAAO,OAAOA,EAAK,YAAe,CAAA,CAAE,IAAI,CAAC,GAAG,eAC5C,EACA;AAGH,2BACE,OAAA,EACA,UAAA;AAAA,IAAA,gBAAAmB;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,WAAW;AAAA,QACX,MAAApB;AAAA,QACA,WAAAD;AAAA,QACA,cAAA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AZ,EAACuB,GAAA,EAAQ,MAAMX,GAAO,WAAU,OAC/B,UAAA,gBAAAZ,EAACgC,GAAA,EACA,4BAACC,GAAA,EAAkB,UAAA,WAAWrB,CAAK,IAAG,GACvC,EAAA,CACD;AAAA,cAAA,EAAA,CAEF;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACD;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -1,135 +1,155 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { DEFAULT_THEME as
|
|
4
|
-
import { TabItem as
|
|
5
|
-
import { Tag as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as S, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as q, useState as v, useEffect as P } from "react";
|
|
3
|
+
import { DEFAULT_THEME as N } from "../../constants/Theme.js";
|
|
4
|
+
import { TabItem as z, TrailingNumberContainer as k, TabItemText as F, TabHeader as L, EmptyTab as j, RightComponent as H } from "./Tabs.styles.js";
|
|
5
|
+
import { Tag as h } from "../tag/Tag.js";
|
|
6
|
+
const R = (e) => {
|
|
7
7
|
const {
|
|
8
8
|
tabs: t,
|
|
9
9
|
initialTab: d,
|
|
10
|
-
onTabSelected:
|
|
10
|
+
onTabSelected: c,
|
|
11
11
|
TabItemStyledProps: m,
|
|
12
|
-
selectedTab:
|
|
12
|
+
selectedTab: o,
|
|
13
13
|
extendedBorder: i,
|
|
14
|
-
rightComponent:
|
|
15
|
-
size:
|
|
14
|
+
rightComponent: u,
|
|
15
|
+
size: b = "default",
|
|
16
16
|
isSquared: T = !1,
|
|
17
|
-
containerStyles: g
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
containerStyles: g,
|
|
18
|
+
gap: r,
|
|
19
|
+
selectedNumberBackground: a
|
|
20
|
+
} = e, [l, C] = v(d || t[0].key), { colorsV2: x } = N;
|
|
21
|
+
P(() => {
|
|
22
|
+
o && o !== l && C(o);
|
|
23
|
+
}, [o, l]);
|
|
24
|
+
const I = e.backgroundColor, B = e.selectedTextColor ?? x.background.brand, p = e.textColor ?? x.content.secondary;
|
|
25
|
+
return /* @__PURE__ */ S(
|
|
26
|
+
L,
|
|
25
27
|
{
|
|
26
28
|
style: g ?? {},
|
|
27
|
-
bgColor:
|
|
29
|
+
bgColor: I,
|
|
30
|
+
tabGap: r,
|
|
28
31
|
"data-test": e["data-test"],
|
|
29
32
|
children: [
|
|
30
|
-
t.map((s,
|
|
31
|
-
|
|
33
|
+
t.map((s, y) => /* @__PURE__ */ n(
|
|
34
|
+
E,
|
|
32
35
|
{
|
|
33
36
|
hasEqualSpacing: e.hasEqualSpacing,
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
uniformBorder: !!r,
|
|
38
|
+
selectedTextColor: B,
|
|
39
|
+
textColor: p,
|
|
36
40
|
tab: s,
|
|
37
|
-
currentTab:
|
|
41
|
+
currentTab: l,
|
|
38
42
|
TabItemStyledProps: m,
|
|
39
43
|
IconComponent: s.icon,
|
|
40
|
-
size:
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
size: b,
|
|
45
|
+
selectedNumberBackground: a,
|
|
46
|
+
setCurrentTab: (f) => {
|
|
47
|
+
C(f), c && c(f);
|
|
43
48
|
},
|
|
44
49
|
isSquared: T,
|
|
45
|
-
isFirstlement:
|
|
46
|
-
isLastElement:
|
|
50
|
+
isFirstlement: y == 0,
|
|
51
|
+
isLastElement: y == t.length - 1,
|
|
47
52
|
iconPosition: s.iconPosition ?? "left"
|
|
48
53
|
},
|
|
49
54
|
s.key
|
|
50
55
|
)),
|
|
51
|
-
i && /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
56
|
+
i && /* @__PURE__ */ n(j, {}),
|
|
57
|
+
/* @__PURE__ */ n(H, { children: u })
|
|
53
58
|
]
|
|
54
59
|
}
|
|
55
60
|
);
|
|
56
|
-
},
|
|
61
|
+
}, E = (e) => {
|
|
57
62
|
const {
|
|
58
63
|
tab: t,
|
|
59
64
|
currentTab: d,
|
|
60
|
-
setCurrentTab:
|
|
65
|
+
setCurrentTab: c,
|
|
61
66
|
TabItemStyledProps: m,
|
|
62
|
-
IconComponent:
|
|
67
|
+
IconComponent: o,
|
|
63
68
|
iconPosition: i = "left",
|
|
64
|
-
size:
|
|
65
|
-
isSquared:
|
|
69
|
+
size: u = "default",
|
|
70
|
+
isSquared: b = !1,
|
|
66
71
|
isFirstlement: T,
|
|
67
72
|
isLastElement: g
|
|
68
|
-
} = e,
|
|
73
|
+
} = e, r = t.key === d, { colorsV2: a } = N, l = q(() => ({
|
|
69
74
|
...m,
|
|
70
75
|
borderRadius: e.isSquared ? T ? "4px 0px 0px 4px" : g ? "0px 4px 4px 0px" : "" : ""
|
|
71
76
|
}), []);
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
77
|
+
return /* @__PURE__ */ S(
|
|
78
|
+
z,
|
|
74
79
|
{
|
|
75
|
-
style:
|
|
76
|
-
selected:
|
|
80
|
+
style: l(),
|
|
81
|
+
selected: r,
|
|
82
|
+
uniformBorder: e.uniformBorder,
|
|
77
83
|
hasEqualSpacing: e.hasEqualSpacing,
|
|
78
|
-
onClick: () =>
|
|
84
|
+
onClick: () => c(e.tab.key),
|
|
79
85
|
selectedTextColor: e.selectedTextColor,
|
|
80
|
-
isSquared:
|
|
86
|
+
isSquared: b,
|
|
81
87
|
"data-test": e["data-test"],
|
|
82
88
|
children: [
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
o && i === "left" && /* @__PURE__ */ n(
|
|
90
|
+
o,
|
|
85
91
|
{
|
|
86
|
-
selected:
|
|
92
|
+
selected: r ? a.background.brand : a.content.secondary
|
|
87
93
|
}
|
|
88
94
|
),
|
|
89
|
-
t.leadingNumber !== void 0 && t.leadingNumber !== null && /* @__PURE__ */
|
|
90
|
-
|
|
95
|
+
t.leadingNumber !== void 0 && t.leadingNumber !== null && /* @__PURE__ */ n(
|
|
96
|
+
k,
|
|
91
97
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
selected: r,
|
|
99
|
+
selectedBackground: e.selectedNumberBackground,
|
|
100
|
+
children: /* @__PURE__ */ n(
|
|
101
|
+
h,
|
|
102
|
+
{
|
|
103
|
+
tagText: t?.leadingNumber ?? 0,
|
|
104
|
+
theme: "dark",
|
|
105
|
+
type: t.numberTagType,
|
|
106
|
+
variant: "circle",
|
|
107
|
+
color: a.content.primaryInverse
|
|
108
|
+
}
|
|
109
|
+
)
|
|
97
110
|
}
|
|
98
|
-
)
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ n(
|
|
113
|
+
F,
|
|
101
114
|
{
|
|
102
|
-
style:
|
|
115
|
+
style: u === "small" ? { fontSize: 14, fontStyle: "normal", fontWeight: 600 } : void 0,
|
|
103
116
|
textColor: e.textColor,
|
|
104
117
|
selectedTextColor: e.selectedTextColor,
|
|
105
|
-
selected:
|
|
118
|
+
selected: r,
|
|
106
119
|
children: t.title
|
|
107
120
|
}
|
|
108
121
|
),
|
|
109
|
-
t.trailingNumber !== void 0 && t.trailingNumber !== null && /* @__PURE__ */
|
|
110
|
-
|
|
122
|
+
t.trailingNumber !== void 0 && t.trailingNumber !== null && /* @__PURE__ */ n(
|
|
123
|
+
k,
|
|
111
124
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
selected: r,
|
|
126
|
+
selectedBackground: e.selectedNumberBackground,
|
|
127
|
+
children: /* @__PURE__ */ n(
|
|
128
|
+
h,
|
|
129
|
+
{
|
|
130
|
+
tagText: t?.trailingNumber ?? 0,
|
|
131
|
+
theme: "dark",
|
|
132
|
+
type: t.numberTagType,
|
|
133
|
+
variant: "circle",
|
|
134
|
+
color: a.content.primaryInverse
|
|
135
|
+
}
|
|
136
|
+
)
|
|
117
137
|
}
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
|
|
138
|
+
),
|
|
139
|
+
o && i === "right" && /* @__PURE__ */ n(
|
|
140
|
+
o,
|
|
121
141
|
{
|
|
122
|
-
selected:
|
|
142
|
+
selected: r ? a.background.brand : a.content.secondary
|
|
123
143
|
}
|
|
124
144
|
)
|
|
125
145
|
]
|
|
126
146
|
}
|
|
127
147
|
);
|
|
128
148
|
};
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
R.displayName = "Tabs";
|
|
150
|
+
E.displayName = "TabItemComponent";
|
|
131
151
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
152
|
+
E as TabItemComponent,
|
|
153
|
+
R as Tabs
|
|
134
154
|
};
|
|
135
155
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { DEFAULT_THEME } from '@src/constants/Theme';\nimport { Tag } from '../tag';\nimport { TabItemComponentProps, TabViewHeaderProps } from './Tabs.model';\nimport {\n\tEmptyTab,\n\tRightComponent,\n\tTabHeader,\n\tTabItem,\n\tTabItemText,\n\tTrailingNumberContainer,\n} from './Tabs.styles';\n\nexport const Tabs: React.FC<TabViewHeaderProps> = (props) => {\n\tconst {\n\t\ttabs,\n\t\tinitialTab,\n\t\tonTabSelected,\n\t\tTabItemStyledProps,\n\t\tselectedTab,\n\t\textendedBorder,\n\t\trightComponent,\n\t\tsize = 'default',\n\t\tisSquared = false,\n\t\tcontainerStyles,\n\t} = props;\n\tconst [currentTab, setCurrentTab] = useState(initialTab || tabs[0].key);\n\tconst { colorsV2 } = DEFAULT_THEME;\n\n\tuseEffect(() => {\n\t\tif (selectedTab && selectedTab !== currentTab) {\n\t\t\tsetCurrentTab(selectedTab);\n\t\t}\n\t}, [selectedTab, currentTab]);\n\n\tconst backgroundColor = props.backgroundColor;\n\tconst selectedTextColor =\n\t\tprops.selectedTextColor ?? colorsV2.background.brand;\n\tconst textColor = props.textColor ?? colorsV2.content.secondary;\n\n\treturn (\n\t\t<TabHeader\n\t\t\tstyle={containerStyles ?? {}}\n\t\t\tbgColor={backgroundColor}\n\t\t\tdata-test={props['data-test']}\n\t\t>\n\t\t\t{tabs.map((tab, index) => (\n\t\t\t\t<TabItemComponent\n\t\t\t\t\thasEqualSpacing={props.hasEqualSpacing}\n\t\t\t\t\tselectedTextColor={selectedTextColor}\n\t\t\t\t\ttextColor={textColor}\n\t\t\t\t\tkey={tab.key}\n\t\t\t\t\ttab={tab}\n\t\t\t\t\tcurrentTab={currentTab}\n\t\t\t\t\tTabItemStyledProps={TabItemStyledProps}\n\t\t\t\t\tIconComponent={tab.icon}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tsetCurrentTab={(tabKey) => {\n\t\t\t\t\t\tsetCurrentTab(tabKey);\n\t\t\t\t\t\tif (onTabSelected) {\n\t\t\t\t\t\t\tonTabSelected(tabKey as string);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tisSquared={isSquared}\n\t\t\t\t\tisFirstlement={index == 0}\n\t\t\t\t\tisLastElement={index == tabs.length - 1}\n\t\t\t\t\ticonPosition={tab.iconPosition ?? 'left'}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{extendedBorder && <EmptyTab />}\n\t\t\t<RightComponent>{rightComponent}</RightComponent>\n\t\t</TabHeader>\n\t);\n};\n\nexport const TabItemComponent: React.FC<TabItemComponentProps> = (props) => {\n\tconst {\n\t\ttab,\n\t\tcurrentTab,\n\t\tsetCurrentTab,\n\t\tTabItemStyledProps,\n\t\tIconComponent,\n\t\ticonPosition = 'left',\n\t\tsize = 'default',\n\t\tisSquared = false,\n\t\tisFirstlement,\n\t\tisLastElement,\n\t} = props;\n\tconst selected = tab.key === currentTab;\n\tconst { colorsV2 } = DEFAULT_THEME;\n\n\tconst tabStyles = useCallback(() => {\n\t\treturn {\n\t\t\t...TabItemStyledProps,\n\t\t\tborderRadius: props.isSquared\n\t\t\t\t? isFirstlement\n\t\t\t\t\t? '4px 0px 0px 4px'\n\t\t\t\t\t: isLastElement\n\t\t\t\t\t? '0px 4px 4px 0px'\n\t\t\t\t\t: ''\n\t\t\t\t: '',\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\treturn (\n\t\t<TabItem\n\t\t\tstyle={tabStyles()}\n\t\t\tselected={selected}\n\t\t\thasEqualSpacing={props.hasEqualSpacing}\n\t\t\tonClick={() => setCurrentTab(props.tab.key)}\n\t\t\tselectedTextColor={props.selectedTextColor}\n\t\t\tisSquared={isSquared}\n\t\t\tdata-test={props['data-test']}\n\t\t>\n\t\t\t{IconComponent && iconPosition === 'left' && (\n\t\t\t\t<IconComponent\n\t\t\t\t\tselected={\n\t\t\t\t\t\tselected ? colorsV2.background.brand : colorsV2.content.secondary\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{tab.leadingNumber !== undefined && tab.leadingNumber !== null && (\n\t\t\t\t<TrailingNumberContainer
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["../../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { DEFAULT_THEME } from '@src/constants/Theme';\nimport { Tag } from '../tag';\nimport { TabItemComponentProps, TabViewHeaderProps } from './Tabs.model';\nimport {\n\tEmptyTab,\n\tRightComponent,\n\tTabHeader,\n\tTabItem,\n\tTabItemText,\n\tTrailingNumberContainer,\n} from './Tabs.styles';\n\nexport const Tabs: React.FC<TabViewHeaderProps> = (props) => {\n\tconst {\n\t\ttabs,\n\t\tinitialTab,\n\t\tonTabSelected,\n\t\tTabItemStyledProps,\n\t\tselectedTab,\n\t\textendedBorder,\n\t\trightComponent,\n\t\tsize = 'default',\n\t\tisSquared = false,\n\t\tcontainerStyles,\n\t\tgap,\n\t\tselectedNumberBackground,\n\t} = props;\n\tconst [currentTab, setCurrentTab] = useState(initialTab || tabs[0].key);\n\tconst { colorsV2 } = DEFAULT_THEME;\n\n\tuseEffect(() => {\n\t\tif (selectedTab && selectedTab !== currentTab) {\n\t\t\tsetCurrentTab(selectedTab);\n\t\t}\n\t}, [selectedTab, currentTab]);\n\n\tconst backgroundColor = props.backgroundColor;\n\tconst selectedTextColor =\n\t\tprops.selectedTextColor ?? colorsV2.background.brand;\n\tconst textColor = props.textColor ?? colorsV2.content.secondary;\n\n\treturn (\n\t\t<TabHeader\n\t\t\tstyle={containerStyles ?? {}}\n\t\t\tbgColor={backgroundColor}\n\t\t\ttabGap={gap}\n\t\t\tdata-test={props['data-test']}\n\t\t>\n\t\t\t{tabs.map((tab, index) => (\n\t\t\t\t<TabItemComponent\n\t\t\t\t\thasEqualSpacing={props.hasEqualSpacing}\n\t\t\t\t\tuniformBorder={!!gap}\n\t\t\t\t\tselectedTextColor={selectedTextColor}\n\t\t\t\t\ttextColor={textColor}\n\t\t\t\t\tkey={tab.key}\n\t\t\t\t\ttab={tab}\n\t\t\t\t\tcurrentTab={currentTab}\n\t\t\t\t\tTabItemStyledProps={TabItemStyledProps}\n\t\t\t\t\tIconComponent={tab.icon}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tselectedNumberBackground={selectedNumberBackground}\n\t\t\t\t\tsetCurrentTab={(tabKey) => {\n\t\t\t\t\t\tsetCurrentTab(tabKey);\n\t\t\t\t\t\tif (onTabSelected) {\n\t\t\t\t\t\t\tonTabSelected(tabKey as string);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tisSquared={isSquared}\n\t\t\t\t\tisFirstlement={index == 0}\n\t\t\t\t\tisLastElement={index == tabs.length - 1}\n\t\t\t\t\ticonPosition={tab.iconPosition ?? 'left'}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{extendedBorder && <EmptyTab />}\n\t\t\t<RightComponent>{rightComponent}</RightComponent>\n\t\t</TabHeader>\n\t);\n};\n\nexport const TabItemComponent: React.FC<TabItemComponentProps> = (props) => {\n\tconst {\n\t\ttab,\n\t\tcurrentTab,\n\t\tsetCurrentTab,\n\t\tTabItemStyledProps,\n\t\tIconComponent,\n\t\ticonPosition = 'left',\n\t\tsize = 'default',\n\t\tisSquared = false,\n\t\tisFirstlement,\n\t\tisLastElement,\n\t} = props;\n\tconst selected = tab.key === currentTab;\n\tconst { colorsV2 } = DEFAULT_THEME;\n\n\tconst tabStyles = useCallback(() => {\n\t\treturn {\n\t\t\t...TabItemStyledProps,\n\t\t\tborderRadius: props.isSquared\n\t\t\t\t? isFirstlement\n\t\t\t\t\t? '4px 0px 0px 4px'\n\t\t\t\t\t: isLastElement\n\t\t\t\t\t? '0px 4px 4px 0px'\n\t\t\t\t\t: ''\n\t\t\t\t: '',\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\treturn (\n\t\t<TabItem\n\t\t\tstyle={tabStyles()}\n\t\t\tselected={selected}\n\t\t\tuniformBorder={props.uniformBorder}\n\t\t\thasEqualSpacing={props.hasEqualSpacing}\n\t\t\tonClick={() => setCurrentTab(props.tab.key)}\n\t\t\tselectedTextColor={props.selectedTextColor}\n\t\t\tisSquared={isSquared}\n\t\t\tdata-test={props['data-test']}\n\t\t>\n\t\t\t{IconComponent && iconPosition === 'left' && (\n\t\t\t\t<IconComponent\n\t\t\t\t\tselected={\n\t\t\t\t\t\tselected ? colorsV2.background.brand : colorsV2.content.secondary\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{tab.leadingNumber !== undefined && tab.leadingNumber !== null && (\n\t\t\t\t<TrailingNumberContainer\n\t\t\t\t\tselected={selected}\n\t\t\t\t\tselectedBackground={props.selectedNumberBackground}\n\t\t\t\t>\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttagText={tab?.leadingNumber ?? 0}\n\t\t\t\t\t\ttheme=\"dark\"\n\t\t\t\t\t\ttype={tab.numberTagType}\n\t\t\t\t\t\tvariant=\"circle\"\n\t\t\t\t\t\tcolor={colorsV2.content.primaryInverse}\n\t\t\t\t\t/>\n\t\t\t\t</TrailingNumberContainer>\n\t\t\t)}\n\t\t\t<TabItemText\n\t\t\t\tstyle={\n\t\t\t\t\tsize === 'small'\n\t\t\t\t\t\t? { fontSize: 14, fontStyle: 'normal', fontWeight: 600 }\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\ttextColor={props.textColor}\n\t\t\t\tselectedTextColor={props.selectedTextColor}\n\t\t\t\tselected={selected}\n\t\t\t>\n\t\t\t\t{tab.title}\n\t\t\t</TabItemText>\n\t\t\t{tab.trailingNumber !== undefined && tab.trailingNumber !== null && (\n\t\t\t\t<TrailingNumberContainer\n\t\t\t\t\tselected={selected}\n\t\t\t\t\tselectedBackground={props.selectedNumberBackground}\n\t\t\t\t>\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttagText={tab?.trailingNumber ?? 0}\n\t\t\t\t\t\ttheme=\"dark\"\n\t\t\t\t\t\ttype={tab.numberTagType}\n\t\t\t\t\t\tvariant=\"circle\"\n\t\t\t\t\t\tcolor={colorsV2.content.primaryInverse}\n\t\t\t\t\t/>\n\t\t\t\t</TrailingNumberContainer>\n\t\t\t)}\n\t\t\t{IconComponent && iconPosition === 'right' && (\n\t\t\t\t<IconComponent\n\t\t\t\t\tselected={\n\t\t\t\t\t\tselected ? colorsV2.background.brand : colorsV2.content.secondary\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</TabItem>\n\t);\n};\n\nTabs.displayName = 'Tabs';\n\nTabItemComponent.displayName = 'TabItemComponent';\n"],"names":["Tabs","props","tabs","initialTab","onTabSelected","TabItemStyledProps","selectedTab","extendedBorder","rightComponent","size","isSquared","containerStyles","gap","selectedNumberBackground","currentTab","setCurrentTab","useState","colorsV2","DEFAULT_THEME","useEffect","backgroundColor","selectedTextColor","textColor","jsxs","TabHeader","tab","index","jsx","TabItemComponent","tabKey","EmptyTab","RightComponent","IconComponent","iconPosition","isFirstlement","isLastElement","selected","tabStyles","useCallback","TabItem","TrailingNumberContainer","Tag","TabItemText"],"mappings":";;;;;AAaO,MAAMA,IAAqC,CAACC,MAAU;AAC5D,QAAM;AAAA,IACL,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,WAAAC,IAAY;AAAA,IACZ,iBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,0BAAAC;AAAA,EAAA,IACGZ,GACE,CAACa,GAAYC,CAAa,IAAIC,EAASb,KAAcD,EAAK,CAAC,EAAE,GAAG,GAChE,EAAE,UAAAe,MAAaC;AAErB,EAAAC,EAAU,MAAM;AACf,IAAIb,KAAeA,MAAgBQ,KAClCC,EAAcT,CAAW;AAAA,EAE3B,GAAG,CAACA,GAAaQ,CAAU,CAAC;AAE5B,QAAMM,IAAkBnB,EAAM,iBACxBoB,IACLpB,EAAM,qBAAqBgB,EAAS,WAAW,OAC1CK,IAAYrB,EAAM,aAAagB,EAAS,QAAQ;AAEtD,SACC,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACA,OAAOb,KAAmB,CAAA;AAAA,MAC1B,SAASS;AAAA,MACT,QAAQR;AAAA,MACR,aAAWX,EAAM,WAAW;AAAA,MAE3B,UAAA;AAAA,QAAAC,EAAK,IAAI,CAACuB,GAAKC,MACf,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACA,iBAAiB3B,EAAM;AAAA,YACvB,eAAe,CAAC,CAACW;AAAA,YACjB,mBAAAS;AAAA,YACA,WAAAC;AAAA,YAEA,KAAAG;AAAA,YACA,YAAAX;AAAA,YACA,oBAAAT;AAAA,YACA,eAAeoB,EAAI;AAAA,YACnB,MAAAhB;AAAA,YACA,0BAAAI;AAAA,YACA,eAAe,C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