@artaio/arta-browser 2.6.0 → 2.9.4-add-backdrop72cde9bc5f6b74ebbea4e133e6113ca295d73401
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/arta.d.ts +5 -1
- package/dist/arta.js +14 -1
- package/dist/bundle.js +1 -1
- package/dist/components/Date/SimpleDate.d.ts +6 -0
- package/dist/components/Date/SimpleDate.js +25 -0
- package/dist/components/Date/index.d.ts +6 -0
- package/dist/components/Date/index.js +39 -0
- package/dist/components/DrawerFooter/index.d.ts +1 -0
- package/dist/components/DrawerFooter/index.js +19 -0
- package/dist/components/DrawerHeader/index.d.ts +6 -0
- package/dist/components/DrawerHeader/index.js +20 -0
- package/dist/components/DrawerInsurance/index.d.ts +1 -0
- package/dist/components/DrawerInsurance/index.js +19 -0
- package/dist/components/Loading/index.js +1 -1
- package/dist/components/Modal/index.js +2 -3
- package/dist/components/Package/index.d.ts +10 -0
- package/dist/components/Package/index.js +57 -0
- package/dist/components/PackageEvents/index.d.ts +15 -0
- package/dist/components/PackageEvents/index.js +131 -0
- package/dist/components/Pill/index.d.ts +8 -0
- package/dist/components/Pill/index.js +20 -0
- package/dist/components/ShipToFrom/index.d.ts +7 -0
- package/dist/components/ShipToFrom/index.js +29 -0
- package/dist/components/ShipmentException/icons/ExceptionIcon.d.ts +7 -0
- package/dist/components/ShipmentException/icons/ExceptionIcon.js +18 -0
- package/dist/components/ShipmentException/icons/HexagonAlertBase.d.ts +4 -0
- package/dist/components/ShipmentException/icons/HexagonAlertBase.js +20 -0
- package/dist/components/ShipmentException/icons/HexagonPauseBase.d.ts +4 -0
- package/dist/components/ShipmentException/icons/HexagonPauseBase.js +20 -0
- package/dist/components/ShipmentException/icons/HexagonStopBase.d.ts +4 -0
- package/dist/components/ShipmentException/icons/HexagonStopBase.js +20 -0
- package/dist/components/ShipmentException/index.d.ts +8 -0
- package/dist/components/ShipmentException/index.js +97 -0
- package/dist/components/Summary/index.d.ts +7 -0
- package/dist/components/Summary/index.js +20 -0
- package/dist/components/Timeline/CheckedStep.d.ts +8 -0
- package/dist/components/Timeline/CheckedStep.js +26 -0
- package/dist/components/Timeline/CheckedSteps.d.ts +4 -0
- package/dist/components/Timeline/CheckedSteps.js +20 -0
- package/dist/components/Timeline/EmptyStep.d.ts +3 -0
- package/dist/components/Timeline/EmptyStep.js +20 -0
- package/dist/components/Timeline/SecondaryStep.d.ts +4 -0
- package/dist/components/Timeline/SecondaryStep.js +20 -0
- package/dist/components/Timeline/SecondarySteps.d.ts +4 -0
- package/dist/components/Timeline/SecondarySteps.js +20 -0
- package/dist/components/Timeline/TimelineDefault.d.ts +2 -0
- package/dist/components/Timeline/TimelineDefault.js +44 -0
- package/dist/components/Timeline/TimlineMinimal.d.ts +2 -0
- package/dist/components/Timeline/TimlineMinimal.js +45 -0
- package/dist/components/Timeline/defaultIcons/CancelledIcon.d.ts +4 -0
- package/dist/components/Timeline/defaultIcons/CancelledIcon.js +21 -0
- package/dist/components/Timeline/defaultIcons/CollectedIcon.d.ts +2 -0
- package/dist/components/Timeline/defaultIcons/CollectedIcon.js +22 -0
- package/dist/components/Timeline/defaultIcons/CompletedIcon.d.ts +2 -0
- package/dist/components/Timeline/defaultIcons/CompletedIcon.js +22 -0
- package/dist/components/Timeline/defaultIcons/ConfirmedIcon.d.ts +2 -0
- package/dist/components/Timeline/defaultIcons/ConfirmedIcon.js +22 -0
- package/dist/components/Timeline/defaultIcons/InTransitIcon.d.ts +2 -0
- package/dist/components/Timeline/defaultIcons/InTransitIcon.js +22 -0
- package/dist/components/Timeline/defaultIcons/PendingIcon.d.ts +4 -0
- package/dist/components/Timeline/defaultIcons/PendingIcon.js +21 -0
- package/dist/components/Timeline/icons/CancelledIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/CancelledIconBase.js +20 -0
- package/dist/components/Timeline/icons/CollectedIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/CollectedIconBase.js +20 -0
- package/dist/components/Timeline/icons/CompletedIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/CompletedIconBase.js +20 -0
- package/dist/components/Timeline/icons/ConfirmedIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/ConfirmedIconBase.js +20 -0
- package/dist/components/Timeline/icons/InTransitIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/InTransitIconBase.js +20 -0
- package/dist/components/Timeline/icons/PendingIconBase.d.ts +4 -0
- package/dist/components/Timeline/icons/PendingIconBase.js +20 -0
- package/dist/components/Timeline/index.d.ts +7 -0
- package/dist/components/Timeline/index.js +22 -0
- package/dist/components/TrackingDrawer/index.css +1088 -0
- package/dist/components/TrackingDrawer/index.d.ts +114 -0
- package/dist/components/TrackingDrawer/index.js +98 -0
- package/dist/components/TrackingTop/index.d.ts +7 -0
- package/dist/components/TrackingTop/index.js +76 -0
- package/dist/estimateConfig.d.ts +5 -8
- package/dist/estimateConfig.js +4 -27
- package/dist/helper.d.ts +23 -1
- package/dist/helper.js +50 -6
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2 -0
- package/dist/requests.d.ts +5 -0
- package/dist/requests.js +75 -27
- package/dist/tracking.d.ts +14 -0
- package/dist/tracking.js +86 -0
- package/dist/trackingConfig.d.ts +108 -0
- package/dist/trackingConfig.js +138 -0
- package/package.json +2 -2
package/dist/arta.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { EstimateBody, PartialEstimateConfig } from './estimateConfig';
|
|
1
|
+
import { type EstimateBody, type PartialEstimateConfig } from './estimateConfig';
|
|
2
|
+
import { type PartialTrackingConfig } from './trackingConfig';
|
|
2
3
|
import Estimate from './estimate';
|
|
4
|
+
import Tracking from './tracking';
|
|
3
5
|
export interface ArtaJsConfig {
|
|
4
6
|
host: string;
|
|
7
|
+
httpSchema?: 'http' | 'https';
|
|
5
8
|
}
|
|
6
9
|
export interface ArtaJsFullConfig extends ArtaJsConfig {
|
|
7
10
|
apiKey: string;
|
|
@@ -11,4 +14,5 @@ export default class Arta {
|
|
|
11
14
|
private config;
|
|
12
15
|
init(apiKey: string, config?: Partial<ArtaJsConfig>): void;
|
|
13
16
|
estimate(estimateBody: EstimateBody, esimateConfig?: PartialEstimateConfig): Estimate;
|
|
17
|
+
tracking(shipmentId: string, trackingConfig?: PartialTrackingConfig): Tracking;
|
|
14
18
|
}
|
package/dist/arta.js
CHANGED
|
@@ -15,9 +15,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var estimateConfig_1 = require("./estimateConfig");
|
|
18
|
+
var trackingConfig_1 = require("./trackingConfig");
|
|
18
19
|
var estimate_1 = __importDefault(require("./estimate"));
|
|
20
|
+
var tracking_1 = __importDefault(require("./tracking"));
|
|
19
21
|
var defaultConfig = {
|
|
20
22
|
host: 'api.arta.io',
|
|
23
|
+
httpSchema: 'https',
|
|
21
24
|
};
|
|
22
25
|
var Arta = /** @class */ (function () {
|
|
23
26
|
function Arta() {
|
|
@@ -34,13 +37,23 @@ var Arta = /** @class */ (function () {
|
|
|
34
37
|
Arta.prototype.estimate = function (estimateBody, esimateConfig) {
|
|
35
38
|
if (esimateConfig === void 0) { esimateConfig = {}; }
|
|
36
39
|
if (this.config && this.el) {
|
|
37
|
-
var fullEstimateConfig = (0, estimateConfig_1.
|
|
40
|
+
var fullEstimateConfig = (0, estimateConfig_1.getFullEstimateConfig)(this.config, esimateConfig);
|
|
38
41
|
return new estimate_1.default(estimateBody, fullEstimateConfig, this.el);
|
|
39
42
|
}
|
|
40
43
|
else {
|
|
41
44
|
throw new Error('Please initialize the SDK with Arta.init before creating estimates');
|
|
42
45
|
}
|
|
43
46
|
};
|
|
47
|
+
Arta.prototype.tracking = function (shipmentId, trackingConfig) {
|
|
48
|
+
if (trackingConfig === void 0) { trackingConfig = {}; }
|
|
49
|
+
if (this.config && this.el) {
|
|
50
|
+
var fullTrackingConfig = (0, trackingConfig_1.getFullTrackingConfig)(this.config, trackingConfig);
|
|
51
|
+
return new tracking_1.default(shipmentId, fullTrackingConfig, this.el);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
throw new Error('Please initialize the SDK with Arta.init before creating tracking');
|
|
55
|
+
}
|
|
56
|
+
};
|
|
44
57
|
return Arta;
|
|
45
58
|
}());
|
|
46
59
|
exports.default = Arta;
|