@artaio/arta-browser 2.19.0 → 2.19.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/ModalStatus.js +3 -4
- package/dist/arta.js +26 -39
- package/dist/bundle.js +1 -1
- package/dist/components/Date/SimpleDate.js +11 -11
- package/dist/components/Date/index.js +13 -13
- package/dist/components/Destination/countriesWithoutPostalCode.js +5 -4
- package/dist/components/Destination/index.js +20 -25
- package/dist/components/Disqualified/index.js +15 -14
- package/dist/components/DrawerFooter/index.js +7 -6
- package/dist/components/DrawerHeader/index.js +8 -8
- package/dist/components/DrawerInsurance/index.js +7 -6
- package/dist/components/Footer/index.js +7 -7
- package/dist/components/Header/index.js +7 -7
- package/dist/components/Invalidated/index.js +7 -7
- package/dist/components/Loading/index.js +7 -6
- package/dist/components/Modal/index.css.js +7 -0
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/Modal/index.js +67 -132
- package/dist/components/Package/index.js +24 -25
- package/dist/components/PackageEvents/index.js +43 -88
- package/dist/components/Pill/index.js +8 -8
- package/dist/components/Quotes/index.js +26 -25
- package/dist/components/SelectTrackingShipment/index.js +31 -35
- package/dist/components/ShipToFrom/index.js +13 -13
- package/dist/components/ShipmentException/icons/ExceptionIcon.js +12 -12
- package/dist/components/ShipmentException/icons/HexagonAlertBase.js +7 -7
- package/dist/components/ShipmentException/icons/HexagonPauseBase.js +7 -7
- package/dist/components/ShipmentException/icons/HexagonStopBase.js +7 -7
- package/dist/components/ShipmentException/index.js +25 -27
- package/dist/components/Summary/index.js +7 -7
- package/dist/components/Timeline/CheckedStep.js +12 -12
- package/dist/components/Timeline/CheckedSteps.js +7 -7
- package/dist/components/Timeline/EmptyStep.js +7 -7
- package/dist/components/Timeline/SecondaryStep.js +7 -7
- package/dist/components/Timeline/SecondarySteps.js +7 -7
- package/dist/components/Timeline/TimelineDefault.js +22 -22
- package/dist/components/Timeline/TimlineMinimal.js +24 -25
- package/dist/components/Timeline/defaultIcons/CancelledIcon.js +8 -8
- package/dist/components/Timeline/defaultIcons/CollectedIcon.js +9 -9
- package/dist/components/Timeline/defaultIcons/CompletedIcon.js +9 -9
- package/dist/components/Timeline/defaultIcons/ConfirmedIcon.js +9 -9
- package/dist/components/Timeline/defaultIcons/InTransitIcon.js +9 -9
- package/dist/components/Timeline/defaultIcons/PendingIcon.js +8 -8
- package/dist/components/Timeline/icons/CancelledIconBase.js +7 -7
- package/dist/components/Timeline/icons/CollectedIconBase.js +7 -7
- package/dist/components/Timeline/icons/CompletedIconBase.js +7 -7
- package/dist/components/Timeline/icons/ConfirmedIconBase.js +7 -7
- package/dist/components/Timeline/icons/InTransitIconBase.js +7 -7
- package/dist/components/Timeline/icons/PendingIconBase.js +7 -7
- package/dist/components/Timeline/index.js +9 -9
- package/dist/components/TrackingDrawer/index.css.js +7 -0
- package/dist/components/TrackingDrawer/index.d.ts +0 -1
- package/dist/components/TrackingDrawer/index.js +33 -81
- package/dist/components/TrackingShipment/index.js +27 -66
- package/dist/components/TrackingTop/index.js +14 -14
- package/dist/estimate.js +41 -83
- package/dist/estimateConfig.js +16 -14
- package/dist/fixtures/countries.js +5 -4
- package/dist/helper.js +61 -64
- package/dist/index.js +15 -34
- package/dist/requests.js +71 -191
- package/dist/tracking.js +77 -128
- package/dist/trackingConfig.js +11 -9
- package/package.json +8 -5
- package/dist/MetadataTypes.js +0 -2
- package/dist/typing.js +0 -1
package/dist/ModalStatus.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
3
|
exports.ModalStatus = void 0;
|
|
4
|
-
var ModalStatus;
|
|
5
4
|
(function (ModalStatus) {
|
|
6
5
|
ModalStatus[ModalStatus["CLOSED"] = 0] = "CLOSED";
|
|
7
6
|
ModalStatus[ModalStatus["DISQUALIFIED"] = 1] = "DISQUALIFIED";
|
|
@@ -9,4 +8,4 @@ var ModalStatus;
|
|
|
9
8
|
ModalStatus[ModalStatus["OPEN"] = 3] = "OPEN";
|
|
10
9
|
ModalStatus[ModalStatus["QUOTED"] = 4] = "QUOTED";
|
|
11
10
|
ModalStatus[ModalStatus["INVALIDATED"] = 5] = "INVALIDATED";
|
|
12
|
-
})(ModalStatus || (exports.ModalStatus =
|
|
11
|
+
})(exports.ModalStatus || (exports.ModalStatus = {}));
|
package/dist/arta.js
CHANGED
|
@@ -1,59 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var estimateConfig_1 = require("./estimateConfig");
|
|
18
|
-
var trackingConfig_1 = require("./trackingConfig");
|
|
19
|
-
var estimate_1 = __importDefault(require("./estimate"));
|
|
20
|
-
var tracking_1 = __importDefault(require("./tracking"));
|
|
21
|
-
var defaultConfig = {
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var estimateConfig = require('./estimateConfig.js');
|
|
6
|
+
var trackingConfig = require('./trackingConfig.js');
|
|
7
|
+
var estimate = require('./estimate.js');
|
|
8
|
+
var tracking = require('./tracking.js');
|
|
9
|
+
|
|
10
|
+
const defaultConfig = {
|
|
22
11
|
host: 'api.arta.io',
|
|
23
12
|
httpSchema: 'https',
|
|
24
13
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.config = Object.assign(
|
|
14
|
+
class Arta {
|
|
15
|
+
el;
|
|
16
|
+
config;
|
|
17
|
+
init(apiKey, config) {
|
|
18
|
+
this.config = Object.assign({ ...defaultConfig, apiKey }, config);
|
|
30
19
|
if (document.querySelectorAll('#arta-widget').length) {
|
|
31
20
|
return;
|
|
32
21
|
}
|
|
33
22
|
this.el = document.createElement('div');
|
|
34
23
|
this.el.id = 'arta-widget';
|
|
35
24
|
document.body.appendChild(this.el);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (esimateConfig === void 0) { esimateConfig = {}; }
|
|
25
|
+
}
|
|
26
|
+
estimate(estimateBody, esimateConfig = {}) {
|
|
39
27
|
if (this.config && this.el) {
|
|
40
|
-
|
|
41
|
-
return new
|
|
28
|
+
const fullEstimateConfig = estimateConfig.getFullEstimateConfig(this.config, esimateConfig);
|
|
29
|
+
return new estimate.default(estimateBody, fullEstimateConfig, this.el);
|
|
42
30
|
}
|
|
43
31
|
else {
|
|
44
32
|
throw new Error('Please initialize the SDK with Arta.init before creating estimates');
|
|
45
33
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (trackingConfig === void 0) { trackingConfig = {}; }
|
|
34
|
+
}
|
|
35
|
+
tracking(shipmentId, trackingConfig$1 = {}) {
|
|
49
36
|
if (this.config && this.el) {
|
|
50
|
-
|
|
51
|
-
return new
|
|
37
|
+
const fullTrackingConfig = trackingConfig.getFullTrackingConfig(this.config, trackingConfig$1);
|
|
38
|
+
return new tracking.default(shipmentId, fullTrackingConfig, this.el);
|
|
52
39
|
}
|
|
53
40
|
else {
|
|
54
41
|
throw new Error('Please initialize the SDK with Arta.init before creating tracking');
|
|
55
42
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
59
46
|
exports.default = Arta;
|