@artaio/arta-browser 2.3.5 → 2.3.7
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/bundle.js +1 -1
- package/dist/components/Destination/index.d.ts +1 -1
- package/dist/components/Destination/index.js +5 -5
- package/dist/components/Disqualified/index.js +1 -1
- package/dist/components/Footer/index.d.ts +1 -6
- package/dist/components/Footer/index.js +2 -3
- package/dist/components/Header/index.d.ts +2 -1
- package/dist/components/Header/index.js +2 -2
- package/dist/components/Loading/index.d.ts +1 -5
- package/dist/components/Loading/index.js +2 -14
- package/dist/components/Modal/index.css +252 -237
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Quotes/index.d.ts +0 -2
- package/dist/components/Quotes/index.js +1 -2
- package/dist/estimateConfig.d.ts +13 -8
- package/dist/estimateConfig.js +18 -13
- package/dist/helper.d.ts +13 -4
- package/dist/helper.js +14 -5
- package/package.json +1 -1
|
@@ -126,7 +126,7 @@ var Modal = function (_a) {
|
|
|
126
126
|
});
|
|
127
127
|
}); })();
|
|
128
128
|
}, [destination]);
|
|
129
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs" }, { children: [position === 'center' && (0, jsx_runtime_1.jsx)("div", { class: "artajs__modal__backdrop" }), (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal artajs__modal__".concat(position), style: style }, { children: [(0, jsx_runtime_1.jsx)(Header_1.Header, { onClose: onClose, title: config.text.header.title }), status === ModalStatus_1.ModalStatus.LOADING && ((0, jsx_runtime_1.jsx)(Loading_1.Loading, {
|
|
129
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs" }, { children: [position === 'center' && (0, jsx_runtime_1.jsx)("div", { class: "artajs__modal__backdrop" }), (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal artajs__modal__".concat(position), style: style }, { children: [(0, jsx_runtime_1.jsx)(Header_1.Header, { onClose: onClose, title: config.text.header.title, lineColor: config.style.color.border }), status === ModalStatus_1.ModalStatus.LOADING && ((0, jsx_runtime_1.jsx)(Loading_1.Loading, {})), status === ModalStatus_1.ModalStatus.OPEN && ((0, jsx_runtime_1.jsx)(Destination_1.Destination, { parsedOrigin: parsedOrigin, textConfig: (0, helper_1.getDestinationConfig)(config), setDestination: setDestination })), status === ModalStatus_1.ModalStatus.QUOTED && quoteRequest && ((0, jsx_runtime_1.jsx)(Quotes_1.Quotes, { quoteRequest: quoteRequest, showCostRange: config.style.pricingDisplay === 'range', textConfig: (0, helper_1.getQuoteConfig)(config), setStatus: setStatus })), status === ModalStatus_1.ModalStatus.DISQUALIFIED && quoteRequest && ((0, jsx_runtime_1.jsx)(Disqualified_1.Disqualified, { quoteRequest: quoteRequest, textConfig: (0, helper_1.getDisqualifiedConfig)(config), setStatus: setStatus })), (0, jsx_runtime_1.jsx)(Footer_1.Footer, {}), errors && errors.length > 0 && ((0, jsx_runtime_1.jsx)("div", __assign({ class: "artajs__modal__error__container" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ class: "artajs__modal__error" }, { children: errors.map(function (error, i) {
|
|
130
130
|
return (0, jsx_runtime_1.jsx)("span", { children: error }, "arta-error-".concat(i));
|
|
131
131
|
}) })) })))] }))] })) }));
|
|
132
132
|
};
|
|
@@ -4,7 +4,6 @@ export declare const defaultQuoteConfig: {
|
|
|
4
4
|
shipFromLabel: string;
|
|
5
5
|
shipToLabel: string;
|
|
6
6
|
disclaimerLabel: string;
|
|
7
|
-
excludeDisclaimerLabel: string;
|
|
8
7
|
rangeLabel: string;
|
|
9
8
|
startsAtLabel: string;
|
|
10
9
|
artaInsuranceLabel: string;
|
|
@@ -13,7 +12,6 @@ export interface QuoteTextConfig {
|
|
|
13
12
|
shipFromLabel: string;
|
|
14
13
|
shipToLabel: string;
|
|
15
14
|
disclaimerLabel: string;
|
|
16
|
-
excludeDisclaimerLabel: string;
|
|
17
15
|
rangeLabel: string;
|
|
18
16
|
startsAtLabel: string;
|
|
19
17
|
artaInsuranceLabel: string;
|
|
@@ -23,7 +23,6 @@ exports.defaultQuoteConfig = {
|
|
|
23
23
|
shipFromLabel: 'These goods ship from:',
|
|
24
24
|
shipToLabel: 'To:',
|
|
25
25
|
disclaimerLabel: 'Actual shipping costs will be provided at checkout.',
|
|
26
|
-
excludeDisclaimerLabel: 'Excludes duties & taxes',
|
|
27
26
|
rangeLabel: 'Shipping estimated between',
|
|
28
27
|
startsAtLabel: 'Shipping Starts at',
|
|
29
28
|
artaInsuranceLabel: 'This estimate includes ARTA Full Risk Insurance',
|
|
@@ -46,6 +45,6 @@ var Quotes = function (_a) {
|
|
|
46
45
|
quoteRequest.destination.estimated_country;
|
|
47
46
|
var parsedOrigin = (0, helper_1.parseEstimatedLocation)(quoteRequest.origin);
|
|
48
47
|
var parsedDestination = (0, helper_1.parseEstimatedLocation)(quoteRequest.destination);
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes" }, { children: [(0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__context" }, { children: textConfig.shipFromLabel })), (0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__origin" }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes" }, { children: [(0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__context" }, { children: textConfig.shipFromLabel })), (0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__origin" }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ class: "artajs__modal__capitalize" }, { children: parsedOrigin })), ' ', (0, jsx_runtime_1.jsx)("span", __assign({ class: "artajs__modal__quotes__light" }, { children: textConfig.detailOriginLabel }))] }) })), (0, jsx_runtime_1.jsxs)("p", __assign({ class: "artajs__modal__quotes__destination" }, { children: [(0, jsx_runtime_1.jsx)("span", __assign({ class: "artajs__modal__quotes__small" }, { children: textConfig.shipToLabel })), ' ', parsedDestination ? ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", __assign({ class: "artajs__modal__capitalize" }, { children: parsedDestination })), ' ', (0, jsx_runtime_1.jsx)("span", __assign({ class: "artajs__modal__quotes__light" }, { children: textConfig.detailDestinationLabel }))] })) : ((0, jsx_runtime_1.jsx)("span", { children: "..." }))] })), showCostRange && quotes.length > 1 ? ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__box ".concat(!isInternational ? 'artajs__modal__quotes__box__padding__y' : '') }, { children: [(0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__context" }, { children: textConfig.rangeLabel })), (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__price" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__price__amount" }, { children: [currencySymbol, Math.round(quotes[0].total), " - ", currencySymbol, Math.round(quotes[quotes.length - 1].total)] })), (0, jsx_runtime_1.jsx)("div", __assign({ class: "artajs__modal__quotes__price__currency_code" }, { children: quoteRequest.currency }))] })), isInternational && ((0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__disclaimer" }, { children: textConfig.disclaimerLabel }))), hasInsurance && ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__insurance" }, { children: [(0, jsx_runtime_1.jsx)("svg", __assign({ width: "11", height: "11", viewBox: "0 0 11 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.48465 2.79298C9.87517 3.1835 9.87518 3.81666 9.48465 4.20719L4.56126 9.13062C4.37166 9.32022 4.11386 9.42574 3.84574 9.42348C3.57761 9.42123 3.32163 9.31139 3.13525 9.11863L1.10866 7.02269C0.72476 6.62566 0.73541 5.99258 1.13245 5.60868C1.52948 5.22478 2.16256 5.23543 2.54646 5.63247L3.86614 6.99731L8.07043 2.79298C8.46096 2.40246 9.09412 2.40245 9.48465 2.79298Z", fill: "white" }) })), (0, jsx_runtime_1.jsx)("p", { children: textConfig.artaInsuranceLabel })] })))] }))) : ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__box ".concat(!isInternational ? 'artajs__modal__quotes__box__padding__y' : '') }, { children: [(0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__context" }, { children: textConfig.startsAtLabel })), (0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__price" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__price__amount" }, { children: [currencySymbol, Math.round(quotes[0].total)] })), (0, jsx_runtime_1.jsx)("div", __assign({ class: "artajs__modal__quotes__price__currency_code" }, { children: quoteRequest.currency }))] })), isInternational && ((0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__disclaimer" }, { children: textConfig.disclaimerLabel }))), hasInsurance && ((0, jsx_runtime_1.jsxs)("div", __assign({ class: "artajs__modal__quotes__insurance" }, { children: [(0, jsx_runtime_1.jsx)("svg", __assign({ width: "11", height: "11", viewBox: "0 0 11 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.48465 2.79298C9.87517 3.1835 9.87518 3.81666 9.48465 4.20719L4.56126 9.13062C4.37166 9.32022 4.11386 9.42574 3.84574 9.42348C3.57761 9.42123 3.32163 9.31139 3.13525 9.11863L1.10866 7.02269C0.72476 6.62566 0.73541 5.99258 1.13245 5.60868C1.52948 5.22478 2.16256 5.23543 2.54646 5.63247L3.86614 6.99731L8.07043 2.79298C8.46096 2.40246 9.09412 2.40245 9.48465 2.79298Z", fill: "white" }) })), (0, jsx_runtime_1.jsx)("p", { children: textConfig.artaInsuranceLabel })] })))] }))), (0, jsx_runtime_1.jsx)("p", __assign({ class: "artajs__modal__quotes__change" }, { children: (0, jsx_runtime_1.jsxs)("a", __assign({ onClick: onChangeDestination, href: "#" }, { children: [(0, jsx_runtime_1.jsx)("svg", __assign({ height: "12", id: "chevron-left", viewBox: "0 0 32 32", width: "12", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M20 1 L24 5 L14 16 L24 27 L20 31 L6 16 z" }) })), textConfig.returnLinkLabel] })) }))] })));
|
|
50
49
|
};
|
|
51
50
|
exports.Quotes = Quotes;
|
package/dist/estimateConfig.d.ts
CHANGED
|
@@ -17,12 +17,20 @@ export interface EstimateBody {
|
|
|
17
17
|
export interface EstimateConfig {
|
|
18
18
|
style: {
|
|
19
19
|
color: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
background: string;
|
|
21
|
+
textPrimary: string;
|
|
22
|
+
textSecondary: string;
|
|
23
|
+
border: string;
|
|
24
|
+
borderHover: string;
|
|
25
|
+
borderFocused: string;
|
|
26
|
+
buttonBackground: string;
|
|
27
|
+
buttonBackgroundHover: string;
|
|
28
|
+
buttonBackgroundDisabled: string;
|
|
29
|
+
buttonText: string;
|
|
30
|
+
buttonTextHover: string;
|
|
31
|
+
buttonTextDisabled: string;
|
|
32
|
+
quoteBackground: string;
|
|
23
33
|
errorColor: string;
|
|
24
|
-
backgroundColor: string;
|
|
25
|
-
poweredByButtonColor: string;
|
|
26
34
|
};
|
|
27
35
|
position: 'center' | 'left' | 'right';
|
|
28
36
|
pricingDisplay: 'starts_at' | 'range';
|
|
@@ -38,9 +46,6 @@ export interface EstimateConfig {
|
|
|
38
46
|
header: {
|
|
39
47
|
title: string;
|
|
40
48
|
};
|
|
41
|
-
loading: {
|
|
42
|
-
message: string;
|
|
43
|
-
};
|
|
44
49
|
destination: DestinationTextConfig;
|
|
45
50
|
quoted: QuoteTextConfig;
|
|
46
51
|
disqualified: DisqualifiedTextConfig;
|
package/dist/estimateConfig.js
CHANGED
|
@@ -7,27 +7,32 @@ var Quotes_1 = require("./components/Quotes");
|
|
|
7
7
|
exports.defaultEstimateConfig = {
|
|
8
8
|
style: {
|
|
9
9
|
color: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
background: '#FFFFFF',
|
|
11
|
+
textPrimary: '#110F10',
|
|
12
|
+
textSecondary: '#6F6C65',
|
|
13
|
+
border: '#D7D6D0',
|
|
14
|
+
borderHover: '#6F6C65',
|
|
15
|
+
borderFocused: '#110F10',
|
|
16
|
+
buttonBackground: '#110F10',
|
|
17
|
+
buttonBackgroundHover: '#6F6C65',
|
|
18
|
+
buttonBackgroundDisabled: '#F2F2F2',
|
|
19
|
+
buttonText: '#FFFFFF',
|
|
20
|
+
buttonTextHover: '#FFFFFF',
|
|
21
|
+
buttonTextDisabled: '#9D9D9D',
|
|
22
|
+
quoteBackground: '#F2F2F2',
|
|
23
|
+
errorColor: 'red',
|
|
16
24
|
},
|
|
17
25
|
position: 'right',
|
|
18
26
|
pricingDisplay: 'starts_at',
|
|
19
|
-
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
20
|
-
fontSize:
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
27
|
+
fontFamily: 'Neue Haas Grotesk Text Pro, Arial, Helvetica, sans-serif',
|
|
28
|
+
fontSize: 14,
|
|
29
|
+
width: 320,
|
|
30
|
+
height: 467,
|
|
23
31
|
},
|
|
24
32
|
text: {
|
|
25
33
|
detailOriginLabel: '(origin)',
|
|
26
34
|
detailDestinationLabel: '(destination)',
|
|
27
35
|
returnLinkLabel: 'Change Destination',
|
|
28
|
-
loading: {
|
|
29
|
-
message: 'Retrieving shipping costs...',
|
|
30
|
-
},
|
|
31
36
|
header: {
|
|
32
37
|
title: 'Estimate Shipping Costs',
|
|
33
38
|
},
|
package/dist/helper.d.ts
CHANGED
|
@@ -11,11 +11,20 @@ export declare const getQuoteConfig: (config: EstimateFullConfig) => QuoteFullTe
|
|
|
11
11
|
export declare const getDisqualifiedConfig: (config: EstimateFullConfig) => DisqualifiedFullTextConfig;
|
|
12
12
|
export declare const getDestinationConfig: (config: EstimateFullConfig) => DestinationFullTextConfig;
|
|
13
13
|
export declare const getStyle: (config: EstimateFullConfig) => {
|
|
14
|
-
'--
|
|
15
|
-
'--primary
|
|
16
|
-
'--secondary
|
|
14
|
+
'--background': string;
|
|
15
|
+
'--text-primary': string;
|
|
16
|
+
'--text-secondary': string;
|
|
17
|
+
'--border': string;
|
|
18
|
+
'--border-hover': string;
|
|
19
|
+
'--border-focused': string;
|
|
20
|
+
'--button-background': string;
|
|
21
|
+
'--button-background-hover': string;
|
|
22
|
+
'--button-background-disabled': string;
|
|
23
|
+
'--button-text': string;
|
|
24
|
+
'--button-text-hover': string;
|
|
25
|
+
'--button-text-disabled': string;
|
|
26
|
+
'--quote-background': string;
|
|
17
27
|
'--error-color': string;
|
|
18
|
-
'--background-color': string;
|
|
19
28
|
'--font-family': string;
|
|
20
29
|
'--font-size': string;
|
|
21
30
|
'--width': string;
|
package/dist/helper.js
CHANGED
|
@@ -52,16 +52,25 @@ var getDisqualifiedConfig = function (config) {
|
|
|
52
52
|
};
|
|
53
53
|
exports.getDisqualifiedConfig = getDisqualifiedConfig;
|
|
54
54
|
var getDestinationConfig = function (config) {
|
|
55
|
-
return __assign(__assign({}, config.text.destination), { detailOriginLabel: config.text.detailOriginLabel,
|
|
55
|
+
return __assign(__assign({}, config.text.destination), { detailOriginLabel: config.text.detailOriginLabel, background: config.style.color.background });
|
|
56
56
|
};
|
|
57
57
|
exports.getDestinationConfig = getDestinationConfig;
|
|
58
58
|
var getStyle = function (config) {
|
|
59
59
|
return {
|
|
60
|
-
'--
|
|
61
|
-
'--primary
|
|
62
|
-
'--secondary
|
|
60
|
+
'--background': config.style.color.background,
|
|
61
|
+
'--text-primary': config.style.color.textPrimary,
|
|
62
|
+
'--text-secondary': config.style.color.textSecondary,
|
|
63
|
+
'--border': config.style.color.border,
|
|
64
|
+
'--border-hover': config.style.color.borderHover,
|
|
65
|
+
'--border-focused': config.style.color.borderFocused,
|
|
66
|
+
'--button-background': config.style.color.buttonBackground,
|
|
67
|
+
'--button-background-hover': config.style.color.buttonBackgroundHover,
|
|
68
|
+
'--button-background-disabled': config.style.color.buttonBackgroundDisabled,
|
|
69
|
+
'--button-text': config.style.color.buttonText,
|
|
70
|
+
'--button-text-hover': config.style.color.buttonTextHover,
|
|
71
|
+
'--button-text-disabled': config.style.color.buttonTextDisabled,
|
|
72
|
+
'--quote-background': config.style.color.quoteBackground,
|
|
63
73
|
'--error-color': config.style.color.errorColor,
|
|
64
|
-
'--background-color': config.style.color.backgroundColor,
|
|
65
74
|
'--font-family': config.style.fontFamily,
|
|
66
75
|
'--font-size': "".concat(config.style.fontSize, "px"),
|
|
67
76
|
'--width': "".concat(config.style.width, "px"),
|