@traund/orquezta-widget-calculator 1.0.1 → 1.0.2
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.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/module.js +7 -8
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/src/calculatorV2.js +1 -1
- package/src/core/endpoints.js +4 -4
- package/src/firebase.config.js +1 -1
package/dist/index.js
CHANGED
|
@@ -1004,7 +1004,7 @@ const $9a120cc4db7b0570$var$loadFirebaseDB = (testMode = 'production', externalC
|
|
|
1004
1004
|
try {
|
|
1005
1005
|
let firebaseConfig;
|
|
1006
1006
|
if (externalConfig && externalConfig.provider) firebaseConfig = externalConfig.provider;
|
|
1007
|
-
else
|
|
1007
|
+
else return console.error('No Firebase configuration provided');
|
|
1008
1008
|
if ((0, ($parcel$interopDefault($gXNCa$firebaseapp))).apps.length === 0) (0, ($parcel$interopDefault($gXNCa$firebaseapp))).initializeApp(firebaseConfig);
|
|
1009
1009
|
} catch (error) {
|
|
1010
1010
|
if (!/already exist/.test(error.message)) console.error('Firebase initialization error', error.stack);
|
|
@@ -2335,15 +2335,14 @@ var $3641e36ddb9c1c48$export$2e2bcd8739ae039 = $3641e36ddb9c1c48$var$Timer;
|
|
|
2335
2335
|
var $df8d2892fe6558f0$exports = {};
|
|
2336
2336
|
|
|
2337
2337
|
class $df8d2892fe6558f0$var$EndPoints {
|
|
2338
|
-
constructor(testMode = 'production'){
|
|
2338
|
+
constructor(testMode = 'production', externalConfig = null){
|
|
2339
2339
|
this._testMode = testMode;
|
|
2340
|
-
this.baseUrl =
|
|
2340
|
+
this.baseUrl = externalConfig && externalConfig.url;
|
|
2341
2341
|
this.path_managment_operations = `${this.baseUrl}/handle-operations`;
|
|
2342
2342
|
}
|
|
2343
|
-
get HEADERS() {
|
|
2344
|
-
return this.baseUrl =
|
|
2345
|
-
}
|
|
2346
|
-
get COUPON() {
|
|
2343
|
+
/*get HEADERS() {
|
|
2344
|
+
return this.baseUrl = BACKEND_SETTINGS[this._testMode].HEADERS;
|
|
2345
|
+
};*/ get COUPON() {
|
|
2347
2346
|
return {
|
|
2348
2347
|
validate: `${this.path_managment_operations}/coupon/v1/validate`
|
|
2349
2348
|
};
|
|
@@ -2545,7 +2544,7 @@ class $c530beedeaeedc25$var$Calculator extends (0, $gXNCa$react.Component) {
|
|
|
2545
2544
|
taxSender: 0.00,
|
|
2546
2545
|
taxReceiver: 0.00
|
|
2547
2546
|
};
|
|
2548
|
-
ENDPOINTS = new (0, (/*@__PURE__*/$parcel$interopDefault($df8d2892fe6558f0$exports)))(this.state.testMode);
|
|
2547
|
+
ENDPOINTS = new (0, (/*@__PURE__*/$parcel$interopDefault($df8d2892fe6558f0$exports)))(this.state.testMode, this.state.config);
|
|
2549
2548
|
constructor(props){
|
|
2550
2549
|
super(props);
|
|
2551
2550
|
this.unsubscribe = [];
|