@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/module.js
CHANGED
|
@@ -997,7 +997,7 @@ const $9ea2f2608ea58c4b$var$loadFirebaseDB = (testMode = 'production', externalC
|
|
|
997
997
|
try {
|
|
998
998
|
let firebaseConfig;
|
|
999
999
|
if (externalConfig && externalConfig.provider) firebaseConfig = externalConfig.provider;
|
|
1000
|
-
else
|
|
1000
|
+
else return console.error('No Firebase configuration provided');
|
|
1001
1001
|
if ((0, $5OpyM$firebaseapp).apps.length === 0) (0, $5OpyM$firebaseapp).initializeApp(firebaseConfig);
|
|
1002
1002
|
} catch (error) {
|
|
1003
1003
|
if (!/already exist/.test(error.message)) console.error('Firebase initialization error', error.stack);
|
|
@@ -2328,15 +2328,14 @@ var $49f826b4fff6422b$export$2e2bcd8739ae039 = $49f826b4fff6422b$var$Timer;
|
|
|
2328
2328
|
var $6f87a65d2d16a22f$exports = {};
|
|
2329
2329
|
|
|
2330
2330
|
class $6f87a65d2d16a22f$var$EndPoints {
|
|
2331
|
-
constructor(testMode = 'production'){
|
|
2331
|
+
constructor(testMode = 'production', externalConfig = null){
|
|
2332
2332
|
this._testMode = testMode;
|
|
2333
|
-
this.baseUrl =
|
|
2333
|
+
this.baseUrl = externalConfig && externalConfig.url;
|
|
2334
2334
|
this.path_managment_operations = `${this.baseUrl}/handle-operations`;
|
|
2335
2335
|
}
|
|
2336
|
-
get HEADERS() {
|
|
2337
|
-
return this.baseUrl =
|
|
2338
|
-
}
|
|
2339
|
-
get COUPON() {
|
|
2336
|
+
/*get HEADERS() {
|
|
2337
|
+
return this.baseUrl = BACKEND_SETTINGS[this._testMode].HEADERS;
|
|
2338
|
+
};*/ get COUPON() {
|
|
2340
2339
|
return {
|
|
2341
2340
|
validate: `${this.path_managment_operations}/coupon/v1/validate`
|
|
2342
2341
|
};
|
|
@@ -2538,7 +2537,7 @@ class $e8a8a43586c972c2$var$Calculator extends (0, $5OpyM$Component) {
|
|
|
2538
2537
|
taxSender: 0.00,
|
|
2539
2538
|
taxReceiver: 0.00
|
|
2540
2539
|
};
|
|
2541
|
-
ENDPOINTS = new (0, (/*@__PURE__*/$parcel$interopDefault($6f87a65d2d16a22f$exports)))(this.state.testMode);
|
|
2540
|
+
ENDPOINTS = new (0, (/*@__PURE__*/$parcel$interopDefault($6f87a65d2d16a22f$exports)))(this.state.testMode, this.state.config);
|
|
2542
2541
|
constructor(props){
|
|
2543
2542
|
super(props);
|
|
2544
2543
|
this.unsubscribe = [];
|