@artaio/arta-browser 2.11.0-readme-footers6ec60294f5732fa1e7f6c99e89ae14bcacea24a4 → 2.11.0-readme-footersb9a24f14b569b309a4850d51ff2fc9b46dd58d9a

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.
Files changed (2) hide show
  1. package/README.md +36 -30
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,35 +41,38 @@ Arta.init('<YOUR_API_KEY>');
41
41
  // Set up origin and object details, request preferences as well as
42
42
  // your widget configuration overrides
43
43
  const origin = {
44
- city: "Brooklyn",
45
- region: "NY",
46
- country: "US",
47
- postal_code: "11249"
48
- }
44
+ city: 'Brooklyn',
45
+ region: 'NY',
46
+ country: 'US',
47
+ postal_code: '11249',
48
+ };
49
49
 
50
50
  const objects = [
51
- {
52
- depth: 2,
53
- width: 36,
54
- height: 24,
55
- subtype: "painting_unframed",
56
- unit_of_measurement: "in",
57
- value_currency: "USD",
58
- value: 500.00
59
- }
60
- ]
61
-
62
- const requestPreferences = {currency: "EUR"};
51
+ {
52
+ depth: 2,
53
+ width: 36,
54
+ height: 24,
55
+ subtype: 'painting_unframed',
56
+ unit_of_measurement: 'in',
57
+ value_currency: 'USD',
58
+ value: 500.0,
59
+ },
60
+ ];
61
+
62
+ const requestPreferences = { currency: 'EUR' };
63
63
 
64
64
  const widgetConfig = {
65
65
  style: {
66
- position: "center",
67
- pricingDisplay: "range",
66
+ position: 'center',
67
+ pricingDisplay: 'range',
68
68
  },
69
69
  };
70
70
 
71
71
  // Setup an instance of the estimates widget
72
- const estimate = Arta.estimate({origin, objects, requestPreferences}, widgetConfig);
72
+ const estimate = Arta.estimate(
73
+ { origin, objects, requestPreferences },
74
+ widgetConfig
75
+ );
73
76
 
74
77
  // Validate the widget before rendering it
75
78
  await esimate.validate();
@@ -79,7 +82,10 @@ await esimate.validate();
79
82
  // when the widget has been validated.
80
83
  //
81
84
  // `estimate.open()` will render the widget on your page.
82
- esimate.isReady && <Button onClick={() => estimate.open()}>Estimate Shipping</Button>
85
+ esimate.isReady && (
86
+ <Button onClick={() => estimate.open()}>Estimate Shipping</Button>
87
+ );
88
+
83
89
  ```
84
90
 
85
91
  The Arta Estimates widget has many configuration options to customize the look and feel of the widget. You can view the full list of options in [/lib/estimateConfig.ts](/lib/estimateConfig.ts) and view a live demo at [manual.arta.io/estimates-demo](https://manual.arta.io/estimates-demo/).
@@ -96,22 +102,22 @@ Arta.init('<YOUR_API_KEY>');
96
102
  const config = {
97
103
  animation: {
98
104
  in: {
99
- type: "slide",
105
+ type: 'slide',
100
106
  duration: 500,
101
- easing: "ease-in-out",
107
+ easing: 'ease-in-out',
102
108
  },
103
109
  out: {
104
- type: "slide",
110
+ type: 'slide',
105
111
  duration: 250,
106
- easing: "ease-in-out",
112
+ easing: 'ease-in-out',
107
113
  },
108
114
  },
109
115
  style: {
110
116
  color: {
111
- iconPrimary: "blue"
112
- }
113
- }
114
- }
117
+ iconPrimary: 'blue',
118
+ },
119
+ },
120
+ };
115
121
 
116
122
  // Setup an instance of the tracking widget
117
123
  const tracking = Arta.tracking('<SHIPMENT_ID>', config);
@@ -123,7 +129,7 @@ await tracking.validate();
123
129
  // when the widget has been validated.
124
130
  //
125
131
  // `tracking.open()` will render the widget on your page.
126
- tracking.isReady && <Button onClick={() => tracking.open()}>Track</Button>
132
+ tracking.isReady && <Button onClick={() => tracking.open()}>Track</Button>;
127
133
  ```
128
134
 
129
135
  The Arta Tracking widget has many configuration options to customize the look and feel of the widget. You can view the full list of options in [/lib/trackingConfig.ts](/lib/trackingConfig.ts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/arta-browser",
3
- "version": "2.11.0-readme-footers6ec60294f5732fa1e7f6c99e89ae14bcacea24a4",
3
+ "version": "2.11.0-readme-footersb9a24f14b569b309a4850d51ff2fc9b46dd58d9a",
4
4
  "description": "",
5
5
  "source": "lib/index.ts",
6
6
  "main": "./dist/index.js",