contentoh-components-library 21.2.95 → 21.2.97
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/.storybook/preview-head.html +4 -0
- package/dist/_utils/helper.js +15 -25
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +15 -1
- package/dist/global-files/fonts.css +9 -3
- package/package.json +1 -1
- package/src/_utils/helper.js +20 -33
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +2 -0
- package/src/global-files/fonts.css +9 -3
package/dist/_utils/helper.js
CHANGED
|
@@ -8,33 +8,23 @@ exports.getRetailerPicture = void 0;
|
|
|
8
8
|
var _jsBase = require("js-base64");
|
|
9
9
|
|
|
10
10
|
var getRetailerPicture = function getRetailerPicture(retailerId, width, height) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
alpha: 0
|
|
25
|
-
}
|
|
11
|
+
return "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
|
|
12
|
+
bucket: process.env.REACT_APP_IMAGES_BUCKET,
|
|
13
|
+
key: "retailers/".concat(retailerId, ".png"),
|
|
14
|
+
edits: {
|
|
15
|
+
resize: {
|
|
16
|
+
width: width,
|
|
17
|
+
height: height,
|
|
18
|
+
fit: "fill",
|
|
19
|
+
background: {
|
|
20
|
+
r: 255,
|
|
21
|
+
g: 255,
|
|
22
|
+
b: 255,
|
|
23
|
+
alpha: 0
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var http = new XMLHttpRequest();
|
|
31
|
-
http.open("HEAD", resizedImage, false);
|
|
32
|
-
http.send();
|
|
33
|
-
if (http.status === 404) return defaultPp;
|
|
34
|
-
return resizedImage;
|
|
35
|
-
} catch (err) {
|
|
36
|
-
console.log("err", err);
|
|
37
|
-
}
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
38
28
|
};
|
|
39
29
|
|
|
40
30
|
exports.getRetailerPicture = getRetailerPicture;
|
|
@@ -185,5 +185,19 @@ OrderDetailDefault.args = {
|
|
|
185
185
|
is_billing: 0
|
|
186
186
|
},
|
|
187
187
|
getOrderDetail: getOrderDetail,
|
|
188
|
-
updateBilling: updateBilling
|
|
188
|
+
updateBilling: updateBilling,
|
|
189
|
+
updateGeneralBilling: function updateGeneralBilling() {
|
|
190
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
191
|
+
args[_key] = arguments[_key];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return console.log(args);
|
|
195
|
+
},
|
|
196
|
+
setShowOrderDetail: function setShowOrderDetail() {
|
|
197
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
198
|
+
args[_key2] = arguments[_key2];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return console.log(args);
|
|
202
|
+
}
|
|
189
203
|
};
|
|
@@ -46,19 +46,25 @@
|
|
|
46
46
|
|
|
47
47
|
@font-face {
|
|
48
48
|
font-family: "RobotoMedium";
|
|
49
|
-
src: url("../assets/fonts/
|
|
49
|
+
src: url("../assets/fonts/roboto/Roboto-Medium.ttf");
|
|
50
50
|
font-weight: 500;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@font-face {
|
|
54
54
|
font-family: "RobotoRegular";
|
|
55
|
-
src: url("../assets/fonts/
|
|
55
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
56
56
|
font-weight: 400;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
@font-face {
|
|
60
60
|
font-family: "Roboto";
|
|
61
|
-
src: url("../assets/fonts/
|
|
61
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: "Roboto";
|
|
67
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
62
68
|
font-weight: 400;
|
|
63
69
|
}
|
|
64
70
|
|
package/package.json
CHANGED
package/src/_utils/helper.js
CHANGED
|
@@ -1,36 +1,23 @@
|
|
|
1
1
|
import { Base64 } from "js-base64";
|
|
2
2
|
|
|
3
|
-
export const getRetailerPicture = (retailerId, width, height) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
b: 255,
|
|
20
|
-
alpha: 0,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
3
|
+
export const getRetailerPicture = (retailerId, width, height) =>
|
|
4
|
+
"https://d24s337exbt5zr.cloudfront.net/" +
|
|
5
|
+
Base64.encode(
|
|
6
|
+
JSON.stringify({
|
|
7
|
+
bucket: process.env.REACT_APP_IMAGES_BUCKET,
|
|
8
|
+
key: `retailers/${retailerId}.png`,
|
|
9
|
+
edits: {
|
|
10
|
+
resize: {
|
|
11
|
+
width: width,
|
|
12
|
+
height: height,
|
|
13
|
+
fit: "fill",
|
|
14
|
+
background: {
|
|
15
|
+
r: 255,
|
|
16
|
+
g: 255,
|
|
17
|
+
b: 255,
|
|
18
|
+
alpha: 0,
|
|
23
19
|
},
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
http.open("HEAD", resizedImage, false);
|
|
29
|
-
http.send();
|
|
30
|
-
if (http.status === 404) return defaultPp;
|
|
31
|
-
|
|
32
|
-
return resizedImage;
|
|
33
|
-
} catch (err) {
|
|
34
|
-
console.log("err", err);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
);
|
|
@@ -46,19 +46,25 @@
|
|
|
46
46
|
|
|
47
47
|
@font-face {
|
|
48
48
|
font-family: "RobotoMedium";
|
|
49
|
-
src: url("../assets/fonts/
|
|
49
|
+
src: url("../assets/fonts/roboto/Roboto-Medium.ttf");
|
|
50
50
|
font-weight: 500;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@font-face {
|
|
54
54
|
font-family: "RobotoRegular";
|
|
55
|
-
src: url("../assets/fonts/
|
|
55
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
56
56
|
font-weight: 400;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
@font-face {
|
|
60
60
|
font-family: "Roboto";
|
|
61
|
-
src: url("../assets/fonts/
|
|
61
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: "Roboto";
|
|
67
|
+
src: url("../assets/fonts/roboto/Roboto-Regular.ttf");
|
|
62
68
|
font-weight: 400;
|
|
63
69
|
}
|
|
64
70
|
|