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.
@@ -0,0 +1,4 @@
1
+ <link
2
+ href="https://fonts.googleapis.com/icon?family=Material+Icons"
3
+ rel="stylesheet"
4
+ />
@@ -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
- try {
12
- var resizedImage = "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
13
- bucket: process.env.REACT_APP_IMAGES_BUCKET,
14
- key: "retailers/".concat(retailerId, ".png"),
15
- edits: {
16
- resize: {
17
- width: width,
18
- height: height,
19
- fit: "fill",
20
- background: {
21
- r: 255,
22
- g: 255,
23
- b: 255,
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/Roboto/Roboto-Medium.ttf");
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/Roboto/Roboto-Regular.ttf");
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/Roboto/Roboto-Regular.ttf");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.95",
3
+ "version": "21.2.97",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -1,36 +1,23 @@
1
1
  import { Base64 } from "js-base64";
2
2
 
3
- export const getRetailerPicture = (retailerId, width, height) => {
4
- try {
5
- const resizedImage =
6
- "https://d24s337exbt5zr.cloudfront.net/" +
7
- Base64.encode(
8
- JSON.stringify({
9
- bucket: process.env.REACT_APP_IMAGES_BUCKET,
10
- key: `retailers/${retailerId}.png`,
11
- edits: {
12
- resize: {
13
- width: width,
14
- height: height,
15
- fit: "fill",
16
- background: {
17
- r: 255,
18
- g: 255,
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
- var http = new XMLHttpRequest();
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
+ );
@@ -69,4 +69,6 @@ OrderDetailDefault.args = {
69
69
  },
70
70
  getOrderDetail,
71
71
  updateBilling,
72
+ updateGeneralBilling: (...args) => console.log(args),
73
+ setShowOrderDetail: (...args) => console.log(args),
72
74
  };
@@ -46,19 +46,25 @@
46
46
 
47
47
  @font-face {
48
48
  font-family: "RobotoMedium";
49
- src: url("../assets/fonts/Roboto/Roboto-Medium.ttf");
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/Roboto/Roboto-Regular.ttf");
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/Roboto/Roboto-Regular.ttf");
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