@weareconceptstudio/account 0.9.0 → 0.9.1
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/Loader/index.d.ts +1 -2
- package/dist/components/Loader/index.d.ts.map +1 -1
- package/dist/components/Loader/index.js +48 -43
- package/dist/components/Loader/index.js.map +1 -1
- package/dist/components/Loader/style.d.ts.map +1 -1
- package/dist/components/Loader/style.js +21 -172
- package/dist/components/Loader/style.js.map +1 -1
- package/dist/modules/account/AccountTemplate/style.d.ts.map +1 -1
- package/dist/modules/account/AccountTemplate/style.js.map +1 -1
- package/dist/modules/order/OrdersList/index.js +3 -3
- package/dist/modules/order/OrdersList/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/index.js"],"names":[],"mappings":";AAIA;;sBAyDC;kBA7D0C,OAAO"}
|
|
@@ -1,50 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { useResizeObserver } from '@weareconceptstudio/core';
|
|
4
|
-
//* Styles
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { SpinLoader, subscribeToApiCount } from '@weareconceptstudio/core';
|
|
5
3
|
import LoaderStyle from './style';
|
|
6
|
-
const Loader = ({
|
|
7
|
-
|
|
8
|
-
const [
|
|
9
|
-
const intervalStart = useRef();
|
|
10
|
-
const intervalEnd = useRef();
|
|
11
|
-
const intervalRerender = useRef();
|
|
4
|
+
const Loader = ({ pathname }) => {
|
|
5
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
6
|
+
const [inFlightRequests, setInFlightRequests] = useState(true);
|
|
12
7
|
useEffect(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
let isMounted = true;
|
|
9
|
+
let loadedImages = 0;
|
|
10
|
+
const unsubscribe = subscribeToApiCount((count) => {
|
|
11
|
+
if (!isMounted)
|
|
12
|
+
return;
|
|
13
|
+
setInFlightRequests(count);
|
|
14
|
+
});
|
|
15
|
+
const checkImages = () => {
|
|
16
|
+
const images = Array.from(document.images);
|
|
17
|
+
if (images.length === 0 && inFlightRequests === 0) {
|
|
18
|
+
setIsLoading(false);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const onImageDone = () => {
|
|
22
|
+
loadedImages++;
|
|
23
|
+
if (loadedImages >= images.length && inFlightRequests === 0) {
|
|
24
|
+
setIsLoading(false);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
images.forEach((img) => {
|
|
28
|
+
if (img.complete) {
|
|
29
|
+
onImageDone();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
img.addEventListener('load', onImageDone);
|
|
33
|
+
img.addEventListener('error', onImageDone);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
if (document.readyState === 'complete') {
|
|
38
|
+
checkImages();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
window.addEventListener('load', checkImages);
|
|
42
|
+
}
|
|
22
43
|
return () => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
clearTimeout(intervalRerender.current);
|
|
44
|
+
isMounted = false;
|
|
45
|
+
unsubscribe();
|
|
46
|
+
window.removeEventListener('load', checkImages);
|
|
27
47
|
};
|
|
28
|
-
}, [pathname]);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const resizes = useResizeObserver(document.querySelector('body'));
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
if (typeof window === 'undefined')
|
|
36
|
-
return;
|
|
37
|
-
const getElementSize = (selector, prop = 'clientHeight') => document.querySelector(selector)?.[prop] ?? null;
|
|
38
|
-
setDimensions({
|
|
39
|
-
headerHeight: getElementSize('header'),
|
|
40
|
-
});
|
|
41
|
-
}, [resizes]);
|
|
42
|
-
return (React.createElement(LoaderStyle, { "$headerHeight": headerHeight, className: `${loaderState || ''}` },
|
|
43
|
-
React.createElement("div", { className: `loader ${className || ''}` },
|
|
44
|
-
React.createElement("div", { className: 'cont' },
|
|
45
|
-
React.createElement("span", { className: 'line-top' }),
|
|
46
|
-
React.createElement("div", { className: 'circle' }),
|
|
47
|
-
React.createElement("span", { className: 'line-bottom' })))));
|
|
48
|
+
}, [pathname, inFlightRequests]);
|
|
49
|
+
if (!isLoading && !inFlightRequests)
|
|
50
|
+
return null;
|
|
51
|
+
return (React.createElement(LoaderStyle, { className: 'loader-wrapper' },
|
|
52
|
+
React.createElement(SpinLoader, null)));
|
|
48
53
|
};
|
|
49
54
|
export default Loader;
|
|
50
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Loader/index.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Loader/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,WAAW,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/D,SAAS,CAAC,GAAG,EAAE;QACd,IAA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AAS,GAAG,KAAK,CAAC;YAClB,WAAW,EAAE,CAAC;YACd,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACjD,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEjC,IAAI,CAAC,SAAS,IAAI,CAAC,gBAAgB;QAAE,OAAO,IAAI,CAAC;IAEjD,OAAO,CACN,oBAAC,WAAW,IAAC,SAAS,EAAC,gBAAgB;QACtC,oBAAC,UAAU,OAAG,CACD,CACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/style.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/style.js"],"names":[],"mappings":";AAEA,uPAuBE"}
|
|
@@ -1,177 +1,26 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
const LoaderStyle = styled.div `
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
bottom: 0;
|
|
27
|
-
right: 0;
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 100vh;
|
|
30
|
-
z-index: 10;
|
|
31
|
-
pointer-events: none;
|
|
32
|
-
opacity: 1;
|
|
33
|
-
visibility: visible;
|
|
34
|
-
|
|
35
|
-
&:before {
|
|
36
|
-
background-color: var(--account_backgroundColor);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:before {
|
|
40
|
-
content: '';
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
left: 0;
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
opacity: 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.cont {
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 50%;
|
|
52
|
-
left: 50%;
|
|
53
|
-
transform: translate(-50%, -50%) scale(1);
|
|
54
|
-
width: var(--sizeCircle);
|
|
55
|
-
height: var(--sizeCircle);
|
|
56
|
-
|
|
57
|
-
span {
|
|
58
|
-
background-color: var(--account_primaryColor1);
|
|
59
|
-
height: var(--sizeLine);
|
|
60
|
-
width: 0;
|
|
61
|
-
position: absolute;
|
|
62
|
-
|
|
63
|
-
&.line-top {
|
|
64
|
-
bottom: calc(100% + var(--sizeLine));
|
|
65
|
-
left: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&.line-bottom {
|
|
69
|
-
top: calc(100% + var(--sizeLine));
|
|
70
|
-
right: 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.circle {
|
|
75
|
-
border-radius: 100%;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
width: 100%;
|
|
78
|
-
height: 100%;
|
|
79
|
-
position: relative;
|
|
80
|
-
background-color: var(--account_primaryColor5);
|
|
81
|
-
|
|
82
|
-
&:before {
|
|
83
|
-
content: '';
|
|
84
|
-
position: absolute;
|
|
85
|
-
top: 100%;
|
|
86
|
-
left: 0;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
background: linear-gradient(45deg, rgba(167, 0, 222, 1) 0%, rgba(254, 0, 133, 1) 100%);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&.initial {
|
|
96
|
-
opacity: 0;
|
|
97
|
-
visibility: hidden;
|
|
98
|
-
transition: 0s linear;
|
|
99
|
-
|
|
100
|
-
&:before {
|
|
101
|
-
visibility: hidden;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.start {
|
|
106
|
-
&:before {
|
|
107
|
-
opacity: 1;
|
|
108
|
-
visibility: visible;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.loader {
|
|
112
|
-
opacity: 1;
|
|
113
|
-
visibility: visible;
|
|
114
|
-
|
|
115
|
-
&:before {
|
|
116
|
-
opacity: 1;
|
|
117
|
-
transition: 1s linear 1.8s;
|
|
118
|
-
visibility: visible;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.cont {
|
|
122
|
-
transform: translate(-50%, -50%) scale(0);
|
|
123
|
-
transition: 0.5s linear 1.5s;
|
|
124
|
-
|
|
125
|
-
span {
|
|
126
|
-
width: 100%;
|
|
127
|
-
transition: 0.5s ease-out 1s;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.circle {
|
|
131
|
-
&:before {
|
|
132
|
-
top: 0%;
|
|
133
|
-
transition: 0.5s ease-in-out;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&.end {
|
|
141
|
-
&:before,
|
|
142
|
-
.loader {
|
|
143
|
-
opacity: 0;
|
|
144
|
-
visibility: hidden;
|
|
145
|
-
transition: 0.2s linear;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.loader {
|
|
150
|
-
&.account {
|
|
151
|
-
top: calc(-1 * (${(props) => `${props.$headerHeight}px`} + var(--account_accountPadT) + var(--account_stickyMarTop)));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
156
|
-
--sizeCircle: calc(var(--sp6x) + var(--sp0-5x));
|
|
157
|
-
--sizeLine: calc(var(--sp1x) + var(--sp0-5x) / 2);
|
|
158
|
-
|
|
159
|
-
.loader {
|
|
160
|
-
&.account {
|
|
161
|
-
top: 0;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
167
|
-
--sizeCircle: calc(var(--sp6x) + var(--sp0-5x));
|
|
168
|
-
--sizeLine: calc(var(--sp1x) + var(--sp0-5x) / 2);
|
|
169
|
-
|
|
170
|
-
.loader {
|
|
171
|
-
&.account {
|
|
172
|
-
top: 0;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
cursor: default;
|
|
14
|
+
user-select: none;
|
|
15
|
+
backface-visibility: hidden;
|
|
16
|
+
isolation: isolate;
|
|
17
|
+
background-color: var(--account_backgroundColor);
|
|
18
|
+
z-index: 1;
|
|
19
|
+
|
|
20
|
+
.spin-loader {
|
|
21
|
+
--spinLoaderSize: var(--account_h1);
|
|
22
|
+
--spinLoaderBorderSize: 6px;
|
|
23
|
+
--spinLoaderBackground: var(--catalog_pink1000);
|
|
175
24
|
}
|
|
176
25
|
`;
|
|
177
26
|
export default LoaderStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/components/Loader/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/components/Loader/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuB7B,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/AccountTemplate/style.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/AccountTemplate/style.js"],"names":[],"mappings":";AAEA,kPAyUE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/account/AccountTemplate/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA2HG,CAAC,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/account/AccountTemplate/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA2HG,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAw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AAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDrG,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -11,7 +11,7 @@ import OrdersListStyle from './style';
|
|
|
11
11
|
const OrdersList = () => {
|
|
12
12
|
const { winWidth } = useUi();
|
|
13
13
|
const containerRef = useRef();
|
|
14
|
-
const { data,
|
|
14
|
+
const { data, pagination, currentPage, getOrders, setCurrentPage } = useOrderStore();
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
getOrders(currentPage);
|
|
17
17
|
}, [currentPage]);
|
|
@@ -38,12 +38,12 @@ const OrdersList = () => {
|
|
|
38
38
|
return (React.createElement(ItemMobile, { key: index, data: item }));
|
|
39
39
|
}))) : null;
|
|
40
40
|
}, [winWidth, data]);
|
|
41
|
-
return
|
|
41
|
+
return data?.length > 0 ? (React.createElement(OrdersListStyle, { ref: containerRef },
|
|
42
42
|
React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: 'account.account_info.orderHistory' }),
|
|
43
43
|
React.createElement("div", { className: `order-history-line` }),
|
|
44
44
|
listStore,
|
|
45
45
|
React.createElement("div", { className: `pagination-wrap` },
|
|
46
|
-
React.createElement(Pagination, { activePageState: currentPage, parentElement: containerRef.current, onChange: (page) => setCurrentPage(page), ...pagination })))) :
|
|
46
|
+
React.createElement(Pagination, { activePageState: currentPage, parentElement: containerRef.current, onChange: (page) => setCurrentPage(page), ...pagination })))) : (React.createElement(EmptyOrders, null));
|
|
47
47
|
};
|
|
48
48
|
export default OrdersList;
|
|
49
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/order/OrdersList/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,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": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Concept Studio Account",
|
|
5
5
|
"author": "Concept Studio",
|
|
6
6
|
"license": "ISC",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"watch": "tsc -m es6 --watch"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@weareconceptstudio/core": "^0.4.
|
|
25
|
-
"@weareconceptstudio/form": "^0.4.
|
|
24
|
+
"@weareconceptstudio/core": "^0.4.3",
|
|
25
|
+
"@weareconceptstudio/form": "^0.4.5"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"react-helmet": "6.1.0",
|
|
29
29
|
"swiper": "11.1.14"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@weareconceptstudio/core": "^0.4.
|
|
33
|
-
"@weareconceptstudio/form": "^0.4.
|
|
32
|
+
"@weareconceptstudio/core": "^0.4.3",
|
|
33
|
+
"@weareconceptstudio/form": "^0.4.5",
|
|
34
34
|
"rimraf": "6.0.1",
|
|
35
35
|
"typescript": "5.3.3"
|
|
36
36
|
}
|