@weareconceptstudio/account 2.0.6 → 2.0.7
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/components/TotalCheckout/PromoCodeComp/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/PromoCodeComp/index.js +11 -3
- package/dist/components/TotalCheckout/PromoCodeComp/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/translations/hy.js +2 -2
- package/dist/utils/useCartSticky.d.ts +10 -0
- package/dist/utils/useCartSticky.d.ts.map +1 -0
- package/dist/utils/useCartSticky.js +112 -0
- package/dist/utils/useCartSticky.js.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TotalCheckout/PromoCodeComp/index.js"],"names":[],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TotalCheckout/PromoCodeComp/index.js"],"names":[],"mappings":";AAWA,oDAoGC;kBA/G8B,OAAO"}
|
|
@@ -8,15 +8,23 @@ import { promoCodeFields } from './utils';
|
|
|
8
8
|
//* Style
|
|
9
9
|
import PromoCodeCompStyle from './style';
|
|
10
10
|
const PromoCodeComp = () => {
|
|
11
|
-
const { itemsCount, appliedPromotions, fillCart, fillCheckoutData, togglePromotion, checkoutData } = useCart();
|
|
11
|
+
const { itemsCount, appliedPromotions, fillCart, fillCheckoutData, togglePromotion, checkoutData, actionLoading } = useCart();
|
|
12
|
+
const [formKey, setFormKey] = React.useState(0);
|
|
12
13
|
const onFinish = (values) => {
|
|
13
14
|
fillCart('promotion_code', values?.promo_code || null);
|
|
14
15
|
};
|
|
16
|
+
// Reset form when promotion_code changes or when there's an error
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (checkoutData.promotion_code || checkoutData.promotion_error) {
|
|
19
|
+
setFormKey((prev) => prev + 1);
|
|
20
|
+
}
|
|
21
|
+
}, [checkoutData.promotion_code, checkoutData.promotion_error]);
|
|
15
22
|
const clearPromotionError = () => {
|
|
16
23
|
if (checkoutData.promotion_error) {
|
|
17
24
|
fillCheckoutData('promotion_error', null);
|
|
18
25
|
}
|
|
19
26
|
};
|
|
27
|
+
const isPromotionLoading = actionLoading?.promotion || false;
|
|
20
28
|
const promotions = useMemo(() => {
|
|
21
29
|
return appliedPromotions?.map((promotion) => (React.createElement(AppliedPromotion, { key: promotion.id, ...promotion, isExcluded: checkoutData?.excludedPromotions?.includes(promotion.id), onClick: () => (promotion.is_manual ? onFinish(null) : togglePromotion({ promotionId: promotion.id })) })));
|
|
22
30
|
}, [appliedPromotions, checkoutData.excludedPromotions]);
|
|
@@ -28,11 +36,11 @@ const PromoCodeComp = () => {
|
|
|
28
36
|
React.createElement("path", { d: 'M6 12L6 0', stroke: 'black', strokeWidth: '2' }))),
|
|
29
37
|
React.createElement(Text, { className: 'account-p account-p4 account-primary-color1 account-font-medium promo-code-text', text: 'account.balance_promotions.gotPromotionCode' })), description: React.createElement(React.Fragment, null,
|
|
30
38
|
promotions,
|
|
31
|
-
!checkoutData.promotion_code ? (React.createElement(FormBuilder, { onSubmit: onFinish, fields: promoCodeFields(clearPromotionError), className: `promo-code-block`, formOptions: {
|
|
39
|
+
!checkoutData.promotion_code || checkoutData.promotion_error || isPromotionLoading ? (React.createElement(FormBuilder, { key: formKey, onSubmit: onFinish, fields: promoCodeFields(clearPromotionError), className: `promo-code-block`, formOptions: {
|
|
32
40
|
className: 'promo-code-container',
|
|
33
41
|
mode: 'onSubmit',
|
|
34
42
|
} },
|
|
35
|
-
React.createElement(AccountButton, { type: 'submit', btnType: `promo-code-version`, text: `account.general_actions.add
|
|
43
|
+
React.createElement(AccountButton, { type: 'submit', btnType: `promo-code-version`, text: `account.general_actions.add`, loading: isPromotionLoading, disabled: isPromotionLoading }),
|
|
36
44
|
React.createElement(ErrorMessage, { name: 'promo_code', as: React.createElement("div", { className: 'error-message' }), message: checkoutData.promotion_error }))) : null) })));
|
|
37
45
|
};
|
|
38
46
|
export default PromoCodeComp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/TotalCheckout/PromoCodeComp/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,SAAS;AACT,OAAO,kBAAkB,MAAM,SAAS,CAAC;AAEzC,MAAM,aAAa,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/TotalCheckout/PromoCodeComp/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MA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,kBAAkB,EAC7B,WAAW,EAAE;wBACZ,SAAS,EAAE,sBAAsB;wBACjC,IAAI,EAAE,UAAU;qBAChB;oBACD,oBAAC,aAAa,IACb,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,oBAAoB,EAC7B,IAAI,EAAE,6BAA6B,EACnC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,kBAAkB,GAC3B;oBAEF,oBAAC,YAAY,IACZ,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,6BAAK,SAAS,EAAC,eAAe,GAAG,EACrC,OAAO,EAAE,YAAY,CAAC,eAAe,GACpC,CACW,CACd,CAAC,CAAC,CAAC,IAAI,CACN,GACa,CACE,CACrB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export { default as AccountCustomCheckbox } from './components/CustomCheckbox';
|
|
|
2
2
|
export * from './AccountProvider';
|
|
3
3
|
export * from './modules';
|
|
4
4
|
export * from './utils/payment';
|
|
5
|
+
export * from './utils/useCartSticky';
|
|
5
6
|
export * from './components';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,6 @@ export { default as AccountCustomCheckbox } from './components/CustomCheckbox';
|
|
|
3
3
|
export * from './AccountProvider';
|
|
4
4
|
export * from './modules';
|
|
5
5
|
export * from './utils/payment';
|
|
6
|
+
export * from './utils/useCartSticky';
|
|
6
7
|
export * from './components';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
package/dist/translations/hy.js
CHANGED
|
@@ -227,7 +227,7 @@ export default {
|
|
|
227
227
|
balance_promotions: {
|
|
228
228
|
balance: 'Մնացորդ',
|
|
229
229
|
balancePlaceholder: 'Մուտքագրեք գումարը',
|
|
230
|
-
balanceCashback: '
|
|
230
|
+
balanceCashback: 'Քեշբեք',
|
|
231
231
|
balanceTotalSpent: 'ընդհանուր ծախսված',
|
|
232
232
|
balanceNextStatusDescription: 'Շարունակե՛ք այդպես: Ձեզ {nextStatusTitle} դառնալու համար պակասում է {nextStatusValue}։',
|
|
233
233
|
balanceHowToEarn: 'Ինչպե՞ս վաստակել',
|
|
@@ -243,7 +243,7 @@ export default {
|
|
|
243
243
|
balanceCategoryAmount: 'Գումար',
|
|
244
244
|
useYourMoney: 'Օգտագործեք Ձեր muramoney-ն',
|
|
245
245
|
muramoney: 'Muramoney',
|
|
246
|
-
cashback: '{percentage}
|
|
246
|
+
cashback: '{percentage} Քեշբեք',
|
|
247
247
|
},
|
|
248
248
|
voucher: {
|
|
249
249
|
title: 'Փոխանակեք նվեր քարտը',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCartSticky.d.ts","sourceRoot":"","sources":["../../src/utils/useCartSticky.js"],"names":[],"mappings":"AAUO;IALqB,OAAO,EAAxB,OAAO;IACS,UAAU,EAA1B,MAAM;IACW,OAAO,EAAxB,OAAO;IACQ,YAAY;;;EA8HrC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { useEffect, useRef, useCallback } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to handle cart sticky sidebar with GSAP ScrollTrigger
|
|
4
|
+
* @param {Object} options - Configuration options
|
|
5
|
+
* @param {boolean} options.enabled - Enable/disable sticky behavior (default: true)
|
|
6
|
+
* @param {number} options.breakpoint - Minimum width for sticky (default: 1024)
|
|
7
|
+
* @param {boolean} options.loading - Loading state to wait before initializing
|
|
8
|
+
* @param {Array} options.dependencies - Dependencies to trigger re-calculation
|
|
9
|
+
*/
|
|
10
|
+
export const useCartSticky = (options = {}) => {
|
|
11
|
+
const { enabled = true, breakpoint = 1024, loading, dependencies = [] } = options;
|
|
12
|
+
const scrollTriggerRef = useRef(null);
|
|
13
|
+
const matchMediaRef = useRef(null);
|
|
14
|
+
const isInitializedRef = useRef(false);
|
|
15
|
+
// Recreate ScrollTrigger with new dimensions
|
|
16
|
+
const recreateScrollTrigger = useCallback(async () => {
|
|
17
|
+
if (typeof window === 'undefined')
|
|
18
|
+
return;
|
|
19
|
+
const { default: gsap } = await import('gsap');
|
|
20
|
+
const { ScrollTrigger } = await import('gsap/ScrollTrigger');
|
|
21
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
22
|
+
// Get elements
|
|
23
|
+
const leftPanel = document.querySelector('.left-panel-wrap');
|
|
24
|
+
const pinElement = document.querySelector('.sticky-wrap');
|
|
25
|
+
const header = document.querySelector('header');
|
|
26
|
+
const container = document.querySelector('.cart-main-wrap');
|
|
27
|
+
if (!leftPanel || !pinElement || !header || !container) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
// Cleanup previous
|
|
31
|
+
if (scrollTriggerRef.current) {
|
|
32
|
+
scrollTriggerRef.current.kill(true);
|
|
33
|
+
scrollTriggerRef.current = null;
|
|
34
|
+
}
|
|
35
|
+
if (matchMediaRef.current) {
|
|
36
|
+
matchMediaRef.current.revert();
|
|
37
|
+
matchMediaRef.current = null;
|
|
38
|
+
}
|
|
39
|
+
// Get dimensions
|
|
40
|
+
const headerHeight = header.clientHeight;
|
|
41
|
+
const containerPadding = parseInt(window.getComputedStyle(container).paddingBlockStart) || 0;
|
|
42
|
+
const startOffset = headerHeight + containerPadding;
|
|
43
|
+
matchMediaRef.current = gsap.matchMedia();
|
|
44
|
+
matchMediaRef.current.add(`(min-width: ${breakpoint}px)`, () => {
|
|
45
|
+
const pinHeight = pinElement.clientHeight;
|
|
46
|
+
const leftPanelHeight = leftPanel.clientHeight;
|
|
47
|
+
// Only pin if content is taller than sidebar
|
|
48
|
+
if (leftPanelHeight > pinHeight) {
|
|
49
|
+
scrollTriggerRef.current = ScrollTrigger.create({
|
|
50
|
+
trigger: leftPanel,
|
|
51
|
+
start: `top ${startOffset}px`,
|
|
52
|
+
end: `bottom ${startOffset + pinHeight}px`,
|
|
53
|
+
pin: pinElement,
|
|
54
|
+
pinSpacing: false,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
isInitializedRef.current = true;
|
|
59
|
+
}, [breakpoint]);
|
|
60
|
+
// Initial setup effect
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (!enabled || typeof window === 'undefined' || loading === true) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
let mounted = true;
|
|
66
|
+
let initTimeout;
|
|
67
|
+
const init = async () => {
|
|
68
|
+
// Wait for DOM and any animations on first load
|
|
69
|
+
if (!isInitializedRef.current) {
|
|
70
|
+
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
71
|
+
}
|
|
72
|
+
if (!mounted)
|
|
73
|
+
return;
|
|
74
|
+
await recreateScrollTrigger();
|
|
75
|
+
};
|
|
76
|
+
initTimeout = setTimeout(init, 0);
|
|
77
|
+
return () => {
|
|
78
|
+
mounted = false;
|
|
79
|
+
clearTimeout(initTimeout);
|
|
80
|
+
if (scrollTriggerRef.current) {
|
|
81
|
+
scrollTriggerRef.current.kill(true);
|
|
82
|
+
}
|
|
83
|
+
if (matchMediaRef.current) {
|
|
84
|
+
matchMediaRef.current.revert();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}, [enabled, loading, breakpoint, recreateScrollTrigger]);
|
|
88
|
+
// Dependency change effect - only recreate, no re-render
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (!enabled || !isInitializedRef.current || loading === true) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
let mounted = true;
|
|
94
|
+
let updateTimeout;
|
|
95
|
+
const update = async () => {
|
|
96
|
+
// Wait for DOM updates (item deletion animations, etc.)
|
|
97
|
+
await new Promise((resolve) => setTimeout(resolve, 400));
|
|
98
|
+
if (!mounted)
|
|
99
|
+
return;
|
|
100
|
+
await recreateScrollTrigger();
|
|
101
|
+
};
|
|
102
|
+
updateTimeout = setTimeout(update, 0);
|
|
103
|
+
return () => {
|
|
104
|
+
mounted = false;
|
|
105
|
+
clearTimeout(updateTimeout);
|
|
106
|
+
};
|
|
107
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
+
}, dependencies);
|
|
109
|
+
return { isSetup: !!scrollTriggerRef.current };
|
|
110
|
+
};
|
|
111
|
+
export default useCartSticky;
|
|
112
|
+
//# sourceMappingURL=useCartSticky.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCartSticky.js","sourceRoot":"","sources":["../../src/utils/useCartSticky.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE;IAC7C,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAElF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEvC,6CAA6C;IAC7C,MAAM,qBAAqB,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACpD,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO;QAE1C,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAE7D,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAEnC,eAAe;QACf,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,QA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AAI,CAAC,gBAAgB,CAAC,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YAC/D,OAAO;QACR,CAAC;QAED,IAAI,OAAO,GAAG,IAAI,CAAC;QACnB,IAAI,aAAa,CAAC;QAElB,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;YACzB,wDAAwD;YACxD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;YAEzD,IAAI,CAAC,OAAO;gBAAE,OAAO;YAErB,MAAM,qBAAqB,EAAE,CAAC;QAC/B,CAAC,CAAC;QAEF,aAAa,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAEtC,OAAO,GAAG,EAAE;YACX,OAAO,GAAG,KAAK,CAAC;YAChB,YAAY,CAAC,aAAa,CAAC,CAAC;QAC7B,CAAC,CAAC;QACF,uDAAuD;IACxD,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;AAChD,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weareconceptstudio/account",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Concept Studio Account",
|
|
5
5
|
"author": "Concept Studio",
|
|
6
6
|
"license": "ISC",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"watch": "tsc -m es6 --watch"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@weareconceptstudio/cart": "^0.0.
|
|
24
|
+
"@weareconceptstudio/cart": "^0.0.6",
|
|
25
25
|
"@weareconceptstudio/core": "^0.4.7",
|
|
26
26
|
"@weareconceptstudio/form": "^0.5.3",
|
|
27
27
|
"classnames": "2.5.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"swiper": "11.1.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@weareconceptstudio/cart": "^0.0.
|
|
38
|
+
"@weareconceptstudio/cart": "^0.0.6",
|
|
39
39
|
"@weareconceptstudio/core": "^0.4.7",
|
|
40
40
|
"@weareconceptstudio/form": "^0.5.3",
|
|
41
41
|
"rimraf": "6.0.1",
|