@one-commerce/sdk-core 1.16.0 → 1.18.0-alpha.0
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/lib/bundles/bundle.esm.js +116 -38
- package/lib/bundles/bundle.esm.js.map +1 -1
- package/lib/bundles/bundle.esm.min.js +1 -1
- package/lib/bundles/bundle.esm.min.js.map +1 -1
- package/lib/bundles/bundle.umd.js +116 -38
- package/lib/bundles/bundle.umd.js.map +1 -1
- package/lib/bundles/bundle.umd.min.js +1 -1
- package/lib/bundles/bundle.umd.min.js.map +1 -1
- package/lib/cjs/backofficeServices.js +50 -1
- package/lib/cjs/backofficeServices.js.map +1 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/shopServices.js +71 -38
- package/lib/cjs/shopServices.js.map +1 -1
- package/lib/esm/backofficeServices.js +26 -0
- package/lib/esm/backofficeServices.js.map +1 -1
- package/lib/esm/index.js +5 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/shopServices.js +12 -0
- package/lib/esm/shopServices.js.map +1 -1
- package/lib/types/backofficeServices.d.ts +9 -0
- package/lib/types/backofficeServices.d.ts.map +1 -1
- package/lib/types/index.d.ts +6 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shopServices.d.ts +30 -0
- package/lib/types/shopServices.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -525,6 +525,52 @@
|
|
|
525
525
|
|
|
526
526
|
return _createClass(BackofficePlugin);
|
|
527
527
|
}(BaseCallClass);
|
|
528
|
+
var BackofficeAddToCartContext = /*#__PURE__*/function (_BaseCallClass9) {
|
|
529
|
+
_inherits(BackofficeAddToCartContext, _BaseCallClass9);
|
|
530
|
+
|
|
531
|
+
var _super9 = _createSuper(BackofficeAddToCartContext);
|
|
532
|
+
|
|
533
|
+
function BackofficeAddToCartContext() {
|
|
534
|
+
var _this9;
|
|
535
|
+
|
|
536
|
+
_classCallCheck(this, BackofficeAddToCartContext);
|
|
537
|
+
|
|
538
|
+
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
539
|
+
args[_key9] = arguments[_key9];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
_this9 = _super9.call.apply(_super9, [this].concat(args));
|
|
543
|
+
|
|
544
|
+
_defineProperty(_assertThisInitialized(_this9), "serviceName", 'addToCartContext');
|
|
545
|
+
|
|
546
|
+
_defineProperty(_assertThisInitialized(_this9), "productId", void 0);
|
|
547
|
+
|
|
548
|
+
_defineProperty(_assertThisInitialized(_this9), "cartId", void 0);
|
|
549
|
+
|
|
550
|
+
_defineProperty(_assertThisInitialized(_this9), "warehouses", void 0);
|
|
551
|
+
|
|
552
|
+
return _this9;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
_createClass(BackofficeAddToCartContext, [{
|
|
556
|
+
key: "closePlugin",
|
|
557
|
+
value: function closePlugin() {
|
|
558
|
+
this.call('closePlugin');
|
|
559
|
+
}
|
|
560
|
+
}, {
|
|
561
|
+
key: "closePluginAndAddToCart",
|
|
562
|
+
value: function closePluginAndAddToCart() {
|
|
563
|
+
this.call('closePluginAndAddToCart');
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
key: "closePluginAndRefreshCart",
|
|
567
|
+
value: function closePluginAndRefreshCart() {
|
|
568
|
+
this.call('closePluginAndRefreshCart');
|
|
569
|
+
}
|
|
570
|
+
}]);
|
|
571
|
+
|
|
572
|
+
return BackofficeAddToCartContext;
|
|
573
|
+
}(BaseCallClass);
|
|
528
574
|
|
|
529
575
|
var Events = /*#__PURE__*/function () {
|
|
530
576
|
function Events() {
|
|
@@ -686,41 +732,71 @@
|
|
|
686
732
|
|
|
687
733
|
return ShopCart;
|
|
688
734
|
}(BaseCallClass);
|
|
689
|
-
var
|
|
690
|
-
_inherits(
|
|
735
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
736
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
691
737
|
|
|
692
|
-
var _super4 = _createSuper(
|
|
738
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
693
739
|
|
|
694
|
-
function
|
|
740
|
+
function ShopAuthorization() {
|
|
695
741
|
var _this4;
|
|
696
742
|
|
|
743
|
+
_classCallCheck(this, ShopAuthorization);
|
|
744
|
+
|
|
745
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
746
|
+
args[_key4] = arguments[_key4];
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
_this4 = _super4.call.apply(_super4, [this].concat(args));
|
|
750
|
+
|
|
751
|
+
_defineProperty(_assertThisInitialized(_this4), "serviceName", 'authorization');
|
|
752
|
+
|
|
753
|
+
return _this4;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
_createClass(ShopAuthorization, [{
|
|
757
|
+
key: "getAuthToken",
|
|
758
|
+
value: function getAuthToken() {
|
|
759
|
+
return this.call('getAuthToken');
|
|
760
|
+
}
|
|
761
|
+
}]);
|
|
762
|
+
|
|
763
|
+
return ShopAuthorization;
|
|
764
|
+
}(BaseCallClass);
|
|
765
|
+
var ShopUtils = /*#__PURE__*/function (_BaseCallClass5) {
|
|
766
|
+
_inherits(ShopUtils, _BaseCallClass5);
|
|
767
|
+
|
|
768
|
+
var _super5 = _createSuper(ShopUtils);
|
|
769
|
+
|
|
770
|
+
function ShopUtils(call) {
|
|
771
|
+
var _this5;
|
|
772
|
+
|
|
697
773
|
_classCallCheck(this, ShopUtils);
|
|
698
774
|
|
|
699
|
-
|
|
775
|
+
_this5 = _super5.call(this, call);
|
|
700
776
|
|
|
701
|
-
_defineProperty(_assertThisInitialized(
|
|
777
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
702
778
|
|
|
703
|
-
_defineProperty(_assertThisInitialized(
|
|
779
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
704
780
|
|
|
705
|
-
_defineProperty(_assertThisInitialized(
|
|
781
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
706
782
|
|
|
707
|
-
_defineProperty(_assertThisInitialized(
|
|
783
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
708
784
|
|
|
709
|
-
_defineProperty(_assertThisInitialized(
|
|
785
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
710
786
|
|
|
711
|
-
_defineProperty(_assertThisInitialized(
|
|
787
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
712
788
|
|
|
713
|
-
_defineProperty(_assertThisInitialized(
|
|
789
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
714
790
|
|
|
715
|
-
_defineProperty(_assertThisInitialized(
|
|
791
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
716
792
|
|
|
717
|
-
|
|
718
|
-
getCategoryPath:
|
|
719
|
-
getManufacturerSearchUrl:
|
|
720
|
-
getProductUrl:
|
|
721
|
-
isExternalUrl:
|
|
793
|
+
_this5.routes = {
|
|
794
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
795
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
796
|
+
getProductUrl: _this5.getProductUrl,
|
|
797
|
+
isExternalUrl: _this5.isExternalUrl
|
|
722
798
|
};
|
|
723
|
-
return
|
|
799
|
+
return _this5;
|
|
724
800
|
}
|
|
725
801
|
|
|
726
802
|
_createClass(ShopUtils, [{
|
|
@@ -747,43 +823,43 @@
|
|
|
747
823
|
|
|
748
824
|
return ShopUtils;
|
|
749
825
|
}(BaseCallClass);
|
|
750
|
-
var ShopConfig = /*#__PURE__*/function (
|
|
751
|
-
_inherits(ShopConfig,
|
|
826
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
827
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
752
828
|
|
|
753
|
-
var
|
|
829
|
+
var _super6 = _createSuper(ShopConfig);
|
|
754
830
|
|
|
755
831
|
function ShopConfig() {
|
|
756
|
-
var
|
|
832
|
+
var _this6;
|
|
757
833
|
|
|
758
834
|
_classCallCheck(this, ShopConfig);
|
|
759
835
|
|
|
760
|
-
for (var
|
|
761
|
-
args[
|
|
836
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
837
|
+
args[_key5] = arguments[_key5];
|
|
762
838
|
}
|
|
763
839
|
|
|
764
|
-
|
|
840
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
765
841
|
|
|
766
|
-
_defineProperty(_assertThisInitialized(
|
|
842
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
767
843
|
|
|
768
|
-
_defineProperty(_assertThisInitialized(
|
|
844
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
769
845
|
|
|
770
|
-
_defineProperty(_assertThisInitialized(
|
|
846
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
771
847
|
|
|
772
|
-
_defineProperty(_assertThisInitialized(
|
|
848
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
773
849
|
|
|
774
|
-
_defineProperty(_assertThisInitialized(
|
|
850
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
775
851
|
|
|
776
|
-
_defineProperty(_assertThisInitialized(
|
|
852
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
777
853
|
|
|
778
|
-
_defineProperty(_assertThisInitialized(
|
|
854
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
779
855
|
|
|
780
|
-
_defineProperty(_assertThisInitialized(
|
|
856
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
781
857
|
|
|
782
|
-
_defineProperty(_assertThisInitialized(
|
|
858
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
783
859
|
|
|
784
|
-
_defineProperty(_assertThisInitialized(
|
|
860
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
785
861
|
|
|
786
|
-
return
|
|
862
|
+
return _this6;
|
|
787
863
|
}
|
|
788
864
|
|
|
789
865
|
return _createClass(ShopConfig);
|
|
@@ -1048,7 +1124,8 @@
|
|
|
1048
1124
|
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1049
1125
|
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1050
1126
|
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1051
|
-
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1127
|
+
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1128
|
+
addToCartContext: new BackofficeAddToCartContext(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1052
1129
|
});
|
|
1053
1130
|
|
|
1054
1131
|
return _this5;
|
|
@@ -1077,6 +1154,7 @@
|
|
|
1077
1154
|
hash: '',
|
|
1078
1155
|
query: {}
|
|
1079
1156
|
},
|
|
1157
|
+
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1080
1158
|
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1081
1159
|
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1082
1160
|
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|