@blerp/design 1.2.52 → 1.2.54
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/index.cjs.js +34 -23
- package/dist/index.esm.js +34 -23
- package/dist/index.umd.js +34 -23
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -89201,6 +89201,8 @@ var NewLoadingBlob = function NewLoadingBlob(props) {
|
|
|
89201
89201
|
};
|
|
89202
89202
|
|
|
89203
89203
|
var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
89204
|
+
var _window;
|
|
89205
|
+
|
|
89204
89206
|
var amount = _ref.amount,
|
|
89205
89207
|
setSalesTax = _ref.setSalesTax,
|
|
89206
89208
|
setTotal = _ref.setTotal,
|
|
@@ -89209,15 +89211,30 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89209
89211
|
postalCode = _ref.postalCode,
|
|
89210
89212
|
setPostalCode = _ref.setPostalCode;
|
|
89211
89213
|
React.useEffect(function () {
|
|
89212
|
-
|
|
89213
|
-
|
|
89214
|
-
|
|
89215
|
-
|
|
89216
|
-
|
|
89214
|
+
var scriptUrl = "https://js.quaderno.io/v4/";
|
|
89215
|
+
|
|
89216
|
+
if (!document.querySelector("script[src=\"".concat(scriptUrl, "\"]"))) {
|
|
89217
|
+
var script = document.createElement("script");
|
|
89218
|
+
script.src = scriptUrl;
|
|
89219
|
+
document.head.appendChild(script);
|
|
89220
|
+
}
|
|
89217
89221
|
}, []);
|
|
89222
|
+
React.useEffect(function () {
|
|
89223
|
+
if (window.Quaderno) {
|
|
89224
|
+
var _window$Quaderno;
|
|
89225
|
+
|
|
89226
|
+
(_window$Quaderno = window.Quaderno) === null || _window$Quaderno === void 0 ? void 0 : _window$Quaderno.init("pk_live_JLZ6dgFdcXEVZySpVxb7").then(function () {
|
|
89227
|
+
console.log("Quaderno.js successfully initialized");
|
|
89228
|
+
}).catch(function (error) {
|
|
89229
|
+
console.log(error.description, error.messages);
|
|
89230
|
+
});
|
|
89231
|
+
}
|
|
89232
|
+
}, [(_window = window) === null || _window === void 0 ? void 0 : _window.Quaderno]);
|
|
89218
89233
|
|
|
89219
89234
|
var reloadTaxes = /*#__PURE__*/function () {
|
|
89220
89235
|
var _ref2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(options) {
|
|
89236
|
+
var _window2, _window2$Quaderno;
|
|
89237
|
+
|
|
89221
89238
|
var taxObject, taxAmount, totalAmount;
|
|
89222
89239
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
89223
89240
|
while (1) {
|
|
@@ -89227,11 +89244,10 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89227
89244
|
options.taxType = "included"; // console.log("Calling calculateTaxes with params", options);
|
|
89228
89245
|
|
|
89229
89246
|
_context.next = 4;
|
|
89230
|
-
return window.Quaderno.calculateTaxes(options);
|
|
89247
|
+
return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Quaderno = _window2.Quaderno) === null || _window2$Quaderno === void 0 ? void 0 : _window2$Quaderno.calculateTaxes(options);
|
|
89231
89248
|
|
|
89232
89249
|
case 4:
|
|
89233
89250
|
taxObject = _context.sent;
|
|
89234
|
-
console.log(taxObject);
|
|
89235
89251
|
taxAmount = parseFloat(amount * (taxObject.rate / 100)).toFixed(2);
|
|
89236
89252
|
totalAmount = (parseFloat(amount) + parseFloat(taxAmount)).toFixed(2);
|
|
89237
89253
|
setSalesTax(taxAmount);
|
|
@@ -89242,7 +89258,7 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89242
89258
|
// taxObject.name + " " + taxObject.rate + "%"; // ie.: VAT 20%
|
|
89243
89259
|
// });
|
|
89244
89260
|
|
|
89245
|
-
case
|
|
89261
|
+
case 9:
|
|
89246
89262
|
case "end":
|
|
89247
89263
|
return _context.stop();
|
|
89248
89264
|
}
|
|
@@ -89263,21 +89279,17 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89263
89279
|
}, wait);
|
|
89264
89280
|
}
|
|
89265
89281
|
|
|
89266
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
89282
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
89267
89283
|
id: "quaderno-payment-form",
|
|
89268
|
-
|
|
89269
|
-
width: "100%"
|
|
89270
|
-
},
|
|
89271
|
-
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7"
|
|
89272
|
-
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
89284
|
+
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7",
|
|
89273
89285
|
direction: "row",
|
|
89274
89286
|
justifyContent: "space-between",
|
|
89275
89287
|
width: "90%",
|
|
89276
89288
|
alignItems: "center",
|
|
89277
|
-
margin: "
|
|
89289
|
+
margin: "10px auto"
|
|
89278
89290
|
}, /*#__PURE__*/React__default['default'].createElement(Dropdown, {
|
|
89279
89291
|
id: "country",
|
|
89280
|
-
buttonTitle: country.name,
|
|
89292
|
+
buttonTitle: country === null || country === void 0 ? void 0 : country.name,
|
|
89281
89293
|
buttonLabel: "Country",
|
|
89282
89294
|
buttonStyle: {
|
|
89283
89295
|
backgroundColor: "white.override",
|
|
@@ -90056,12 +90068,14 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
90056
90068
|
label: "Postal Code",
|
|
90057
90069
|
size: "small",
|
|
90058
90070
|
required: true,
|
|
90071
|
+
variant: "filled",
|
|
90072
|
+
color: "grey4",
|
|
90059
90073
|
sx: {
|
|
90060
|
-
backgroundColor: "white.override",
|
|
90061
90074
|
width: "150px",
|
|
90062
|
-
margin: "12px 16px",
|
|
90063
90075
|
"& label": {
|
|
90064
|
-
|
|
90076
|
+
color: "grey4.real",
|
|
90077
|
+
position: "absolute",
|
|
90078
|
+
"&:hover": {}
|
|
90065
90079
|
}
|
|
90066
90080
|
},
|
|
90067
90081
|
onChange: function onChange(e) {
|
|
@@ -90073,7 +90087,7 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
90073
90087
|
}, 1500);
|
|
90074
90088
|
setPostalCode(e.target.value);
|
|
90075
90089
|
}
|
|
90076
|
-
}))
|
|
90090
|
+
}));
|
|
90077
90091
|
};
|
|
90078
90092
|
|
|
90079
90093
|
var _templateObject;
|
|
@@ -90377,9 +90391,6 @@ var CheckoutModal = function CheckoutModal(_ref) {
|
|
|
90377
90391
|
}();
|
|
90378
90392
|
|
|
90379
90393
|
if (show) {
|
|
90380
|
-
var script = document.createElement("script");
|
|
90381
|
-
script.src = "https://js.quaderno.io/v4/";
|
|
90382
|
-
document.head.appendChild(script);
|
|
90383
90394
|
createBraintreeDropIn();
|
|
90384
90395
|
}
|
|
90385
90396
|
}, [show, googleMerchantId, venmoProfileId, clientToken, type, total]);
|
package/dist/index.esm.js
CHANGED
|
@@ -89125,6 +89125,8 @@ var NewLoadingBlob = function NewLoadingBlob(props) {
|
|
|
89125
89125
|
};
|
|
89126
89126
|
|
|
89127
89127
|
var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
89128
|
+
var _window;
|
|
89129
|
+
|
|
89128
89130
|
var amount = _ref.amount,
|
|
89129
89131
|
setSalesTax = _ref.setSalesTax,
|
|
89130
89132
|
setTotal = _ref.setTotal,
|
|
@@ -89133,15 +89135,30 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89133
89135
|
postalCode = _ref.postalCode,
|
|
89134
89136
|
setPostalCode = _ref.setPostalCode;
|
|
89135
89137
|
useEffect(function () {
|
|
89136
|
-
|
|
89137
|
-
|
|
89138
|
-
|
|
89139
|
-
|
|
89140
|
-
|
|
89138
|
+
var scriptUrl = "https://js.quaderno.io/v4/";
|
|
89139
|
+
|
|
89140
|
+
if (!document.querySelector("script[src=\"".concat(scriptUrl, "\"]"))) {
|
|
89141
|
+
var script = document.createElement("script");
|
|
89142
|
+
script.src = scriptUrl;
|
|
89143
|
+
document.head.appendChild(script);
|
|
89144
|
+
}
|
|
89141
89145
|
}, []);
|
|
89146
|
+
useEffect(function () {
|
|
89147
|
+
if (window.Quaderno) {
|
|
89148
|
+
var _window$Quaderno;
|
|
89149
|
+
|
|
89150
|
+
(_window$Quaderno = window.Quaderno) === null || _window$Quaderno === void 0 ? void 0 : _window$Quaderno.init("pk_live_JLZ6dgFdcXEVZySpVxb7").then(function () {
|
|
89151
|
+
console.log("Quaderno.js successfully initialized");
|
|
89152
|
+
}).catch(function (error) {
|
|
89153
|
+
console.log(error.description, error.messages);
|
|
89154
|
+
});
|
|
89155
|
+
}
|
|
89156
|
+
}, [(_window = window) === null || _window === void 0 ? void 0 : _window.Quaderno]);
|
|
89142
89157
|
|
|
89143
89158
|
var reloadTaxes = /*#__PURE__*/function () {
|
|
89144
89159
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
89160
|
+
var _window2, _window2$Quaderno;
|
|
89161
|
+
|
|
89145
89162
|
var taxObject, taxAmount, totalAmount;
|
|
89146
89163
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
89147
89164
|
while (1) {
|
|
@@ -89151,11 +89168,10 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89151
89168
|
options.taxType = "included"; // console.log("Calling calculateTaxes with params", options);
|
|
89152
89169
|
|
|
89153
89170
|
_context.next = 4;
|
|
89154
|
-
return window.Quaderno.calculateTaxes(options);
|
|
89171
|
+
return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Quaderno = _window2.Quaderno) === null || _window2$Quaderno === void 0 ? void 0 : _window2$Quaderno.calculateTaxes(options);
|
|
89155
89172
|
|
|
89156
89173
|
case 4:
|
|
89157
89174
|
taxObject = _context.sent;
|
|
89158
|
-
console.log(taxObject);
|
|
89159
89175
|
taxAmount = parseFloat(amount * (taxObject.rate / 100)).toFixed(2);
|
|
89160
89176
|
totalAmount = (parseFloat(amount) + parseFloat(taxAmount)).toFixed(2);
|
|
89161
89177
|
setSalesTax(taxAmount);
|
|
@@ -89166,7 +89182,7 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89166
89182
|
// taxObject.name + " " + taxObject.rate + "%"; // ie.: VAT 20%
|
|
89167
89183
|
// });
|
|
89168
89184
|
|
|
89169
|
-
case
|
|
89185
|
+
case 9:
|
|
89170
89186
|
case "end":
|
|
89171
89187
|
return _context.stop();
|
|
89172
89188
|
}
|
|
@@ -89187,21 +89203,17 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89187
89203
|
}, wait);
|
|
89188
89204
|
}
|
|
89189
89205
|
|
|
89190
|
-
return /*#__PURE__*/React__default.createElement(
|
|
89206
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
89191
89207
|
id: "quaderno-payment-form",
|
|
89192
|
-
|
|
89193
|
-
width: "100%"
|
|
89194
|
-
},
|
|
89195
|
-
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7"
|
|
89196
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
89208
|
+
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7",
|
|
89197
89209
|
direction: "row",
|
|
89198
89210
|
justifyContent: "space-between",
|
|
89199
89211
|
width: "90%",
|
|
89200
89212
|
alignItems: "center",
|
|
89201
|
-
margin: "
|
|
89213
|
+
margin: "10px auto"
|
|
89202
89214
|
}, /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
89203
89215
|
id: "country",
|
|
89204
|
-
buttonTitle: country.name,
|
|
89216
|
+
buttonTitle: country === null || country === void 0 ? void 0 : country.name,
|
|
89205
89217
|
buttonLabel: "Country",
|
|
89206
89218
|
buttonStyle: {
|
|
89207
89219
|
backgroundColor: "white.override",
|
|
@@ -89980,12 +89992,14 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89980
89992
|
label: "Postal Code",
|
|
89981
89993
|
size: "small",
|
|
89982
89994
|
required: true,
|
|
89995
|
+
variant: "filled",
|
|
89996
|
+
color: "grey4",
|
|
89983
89997
|
sx: {
|
|
89984
|
-
backgroundColor: "white.override",
|
|
89985
89998
|
width: "150px",
|
|
89986
|
-
margin: "12px 16px",
|
|
89987
89999
|
"& label": {
|
|
89988
|
-
|
|
90000
|
+
color: "grey4.real",
|
|
90001
|
+
position: "absolute",
|
|
90002
|
+
"&:hover": {}
|
|
89989
90003
|
}
|
|
89990
90004
|
},
|
|
89991
90005
|
onChange: function onChange(e) {
|
|
@@ -89997,7 +90011,7 @@ var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
|
89997
90011
|
}, 1500);
|
|
89998
90012
|
setPostalCode(e.target.value);
|
|
89999
90013
|
}
|
|
90000
|
-
}))
|
|
90014
|
+
}));
|
|
90001
90015
|
};
|
|
90002
90016
|
|
|
90003
90017
|
var _templateObject;
|
|
@@ -90301,9 +90315,6 @@ var CheckoutModal = function CheckoutModal(_ref) {
|
|
|
90301
90315
|
}();
|
|
90302
90316
|
|
|
90303
90317
|
if (show) {
|
|
90304
|
-
var script = document.createElement("script");
|
|
90305
|
-
script.src = "https://js.quaderno.io/v4/";
|
|
90306
|
-
document.head.appendChild(script);
|
|
90307
90318
|
createBraintreeDropIn();
|
|
90308
90319
|
}
|
|
90309
90320
|
}, [show, googleMerchantId, venmoProfileId, clientToken, type, total]);
|
package/dist/index.umd.js
CHANGED
|
@@ -89146,6 +89146,8 @@
|
|
|
89146
89146
|
};
|
|
89147
89147
|
|
|
89148
89148
|
var QuadernoTaxCalc = function QuadernoTaxCalc(_ref) {
|
|
89149
|
+
var _window;
|
|
89150
|
+
|
|
89149
89151
|
var amount = _ref.amount,
|
|
89150
89152
|
setSalesTax = _ref.setSalesTax,
|
|
89151
89153
|
setTotal = _ref.setTotal,
|
|
@@ -89154,15 +89156,30 @@
|
|
|
89154
89156
|
postalCode = _ref.postalCode,
|
|
89155
89157
|
setPostalCode = _ref.setPostalCode;
|
|
89156
89158
|
React.useEffect(function () {
|
|
89157
|
-
|
|
89158
|
-
|
|
89159
|
-
|
|
89160
|
-
|
|
89161
|
-
|
|
89159
|
+
var scriptUrl = "https://js.quaderno.io/v4/";
|
|
89160
|
+
|
|
89161
|
+
if (!document.querySelector("script[src=\"".concat(scriptUrl, "\"]"))) {
|
|
89162
|
+
var script = document.createElement("script");
|
|
89163
|
+
script.src = scriptUrl;
|
|
89164
|
+
document.head.appendChild(script);
|
|
89165
|
+
}
|
|
89162
89166
|
}, []);
|
|
89167
|
+
React.useEffect(function () {
|
|
89168
|
+
if (window.Quaderno) {
|
|
89169
|
+
var _window$Quaderno;
|
|
89170
|
+
|
|
89171
|
+
(_window$Quaderno = window.Quaderno) === null || _window$Quaderno === void 0 ? void 0 : _window$Quaderno.init("pk_live_JLZ6dgFdcXEVZySpVxb7").then(function () {
|
|
89172
|
+
console.log("Quaderno.js successfully initialized");
|
|
89173
|
+
}).catch(function (error) {
|
|
89174
|
+
console.log(error.description, error.messages);
|
|
89175
|
+
});
|
|
89176
|
+
}
|
|
89177
|
+
}, [(_window = window) === null || _window === void 0 ? void 0 : _window.Quaderno]);
|
|
89163
89178
|
|
|
89164
89179
|
var reloadTaxes = /*#__PURE__*/function () {
|
|
89165
89180
|
var _ref2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(options) {
|
|
89181
|
+
var _window2, _window2$Quaderno;
|
|
89182
|
+
|
|
89166
89183
|
var taxObject, taxAmount, totalAmount;
|
|
89167
89184
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
89168
89185
|
while (1) {
|
|
@@ -89172,11 +89189,10 @@
|
|
|
89172
89189
|
options.taxType = "included"; // console.log("Calling calculateTaxes with params", options);
|
|
89173
89190
|
|
|
89174
89191
|
_context.next = 4;
|
|
89175
|
-
return window.Quaderno.calculateTaxes(options);
|
|
89192
|
+
return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Quaderno = _window2.Quaderno) === null || _window2$Quaderno === void 0 ? void 0 : _window2$Quaderno.calculateTaxes(options);
|
|
89176
89193
|
|
|
89177
89194
|
case 4:
|
|
89178
89195
|
taxObject = _context.sent;
|
|
89179
|
-
console.log(taxObject);
|
|
89180
89196
|
taxAmount = parseFloat(amount * (taxObject.rate / 100)).toFixed(2);
|
|
89181
89197
|
totalAmount = (parseFloat(amount) + parseFloat(taxAmount)).toFixed(2);
|
|
89182
89198
|
setSalesTax(taxAmount);
|
|
@@ -89187,7 +89203,7 @@
|
|
|
89187
89203
|
// taxObject.name + " " + taxObject.rate + "%"; // ie.: VAT 20%
|
|
89188
89204
|
// });
|
|
89189
89205
|
|
|
89190
|
-
case
|
|
89206
|
+
case 9:
|
|
89191
89207
|
case "end":
|
|
89192
89208
|
return _context.stop();
|
|
89193
89209
|
}
|
|
@@ -89208,21 +89224,17 @@
|
|
|
89208
89224
|
}, wait);
|
|
89209
89225
|
}
|
|
89210
89226
|
|
|
89211
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
89227
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
89212
89228
|
id: "quaderno-payment-form",
|
|
89213
|
-
|
|
89214
|
-
width: "100%"
|
|
89215
|
-
},
|
|
89216
|
-
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7"
|
|
89217
|
-
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
89229
|
+
"data-publishable-key": "pk_live_JLZ6dgFdcXEVZySpVxb7",
|
|
89218
89230
|
direction: "row",
|
|
89219
89231
|
justifyContent: "space-between",
|
|
89220
89232
|
width: "90%",
|
|
89221
89233
|
alignItems: "center",
|
|
89222
|
-
margin: "
|
|
89234
|
+
margin: "10px auto"
|
|
89223
89235
|
}, /*#__PURE__*/React__default['default'].createElement(Dropdown, {
|
|
89224
89236
|
id: "country",
|
|
89225
|
-
buttonTitle: country.name,
|
|
89237
|
+
buttonTitle: country === null || country === void 0 ? void 0 : country.name,
|
|
89226
89238
|
buttonLabel: "Country",
|
|
89227
89239
|
buttonStyle: {
|
|
89228
89240
|
backgroundColor: "white.override",
|
|
@@ -90001,12 +90013,14 @@
|
|
|
90001
90013
|
label: "Postal Code",
|
|
90002
90014
|
size: "small",
|
|
90003
90015
|
required: true,
|
|
90016
|
+
variant: "filled",
|
|
90017
|
+
color: "grey4",
|
|
90004
90018
|
sx: {
|
|
90005
|
-
backgroundColor: "white.override",
|
|
90006
90019
|
width: "150px",
|
|
90007
|
-
margin: "12px 16px",
|
|
90008
90020
|
"& label": {
|
|
90009
|
-
|
|
90021
|
+
color: "grey4.real",
|
|
90022
|
+
position: "absolute",
|
|
90023
|
+
"&:hover": {}
|
|
90010
90024
|
}
|
|
90011
90025
|
},
|
|
90012
90026
|
onChange: function onChange(e) {
|
|
@@ -90018,7 +90032,7 @@
|
|
|
90018
90032
|
}, 1500);
|
|
90019
90033
|
setPostalCode(e.target.value);
|
|
90020
90034
|
}
|
|
90021
|
-
}))
|
|
90035
|
+
}));
|
|
90022
90036
|
};
|
|
90023
90037
|
|
|
90024
90038
|
var _templateObject;
|
|
@@ -90322,9 +90336,6 @@
|
|
|
90322
90336
|
}();
|
|
90323
90337
|
|
|
90324
90338
|
if (show) {
|
|
90325
|
-
var script = document.createElement("script");
|
|
90326
|
-
script.src = "https://js.quaderno.io/v4/";
|
|
90327
|
-
document.head.appendChild(script);
|
|
90328
90339
|
createBraintreeDropIn();
|
|
90329
90340
|
}
|
|
90330
90341
|
}, [show, googleMerchantId, venmoProfileId, clientToken, type, total]);
|