ordering-ui-admin-external 1.2.0 → 1.3.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.
Files changed (153) hide show
  1. package/_bundles/main.css +2 -2
  2. package/_bundles/{ordering-ui-admin.509785f9d6ed069b4b5d.js → ordering-ui-admin.977451ddd1e3c8d3a2d7.js} +2 -2
  3. package/_bundles/{ordering-ui-admin.509785f9d6ed069b4b5d.js.LICENSE.txt → ordering-ui-admin.977451ddd1e3c8d3a2d7.js.LICENSE.txt} +10 -4
  4. package/_modules/components/BusinessIntelligence/Reports/index.js +27 -3
  5. package/_modules/components/BusinessIntelligence/Reports/styles.js +9 -2
  6. package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +9 -1
  7. package/_modules/components/DisabledFeatureAlert/index.js +63 -0
  8. package/_modules/components/DisabledFeatureAlert/styles.js +42 -0
  9. package/_modules/components/Loyalty/RewardsPrograms/index.js +38 -12
  10. package/_modules/components/Loyalty/RewardsPrograms/styles.js +13 -6
  11. package/_modules/components/Marketing/CampaignHeader/index.js +5 -2
  12. package/_modules/components/Marketing/CampaignHeader/styles.js +7 -4
  13. package/_modules/components/Marketing/CampaignList/index.js +8 -4
  14. package/_modules/components/Marketing/CampaignList/styles.js +30 -22
  15. package/_modules/components/Marketing/CampaignListing/index.js +29 -3
  16. package/_modules/components/Marketing/EnterprisePromotionListing/index.js +46 -22
  17. package/_modules/components/Marketing/EnterprisePromotionListing/styles.js +1 -1
  18. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +24 -426
  19. package/_modules/components/OrderingProducts/OrderingProductDetails/styles.js +35 -114
  20. package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/index.js +480 -0
  21. package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +127 -0
  22. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +3 -1
  23. package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +23 -3
  24. package/_modules/components/OrderingProducts/SiteTheme/ThemeComponent.js +119 -0
  25. package/_modules/components/OrderingProducts/SiteTheme/ThemeImage.js +267 -0
  26. package/_modules/components/OrderingProducts/SiteTheme/ThemeOption.js +135 -0
  27. package/_modules/components/OrderingProducts/SiteTheme/index.js +266 -0
  28. package/_modules/components/OrderingProducts/SiteTheme/styles.js +114 -0
  29. package/_modules/components/Orders/CountryFilter/index.js +114 -0
  30. package/_modules/components/Orders/CountryFilter/styles.js +34 -0
  31. package/_modules/components/Orders/CurrencyFilter/index.js +114 -0
  32. package/_modules/components/Orders/CurrencyFilter/styles.js +34 -0
  33. package/_modules/components/Orders/DeliveriesLocation/index.js +22 -12
  34. package/_modules/components/Orders/DriversLocation/index.js +13 -7
  35. package/_modules/components/Orders/OrdersFilterGroup/index.js +13 -1
  36. package/_modules/components/Orders/OrdersListing/index.js +8 -2
  37. package/_modules/components/Orders/OrdersTable/index.js +296 -174
  38. package/_modules/components/Orders/OrdersTable/styles.js +30 -4
  39. package/_modules/components/Orders/index.js +9 -1
  40. package/_modules/components/Settings/SettingItemUI/index.js +3 -1
  41. package/_modules/components/Settings/SettingItemUI/styles.js +18 -11
  42. package/_modules/components/Settings/Settings/index.js +1 -11
  43. package/_modules/components/Settings/SettingsDetail/index.js +40 -3
  44. package/_modules/components/Settings/SettingsDetail/styles.js +27 -8
  45. package/_modules/components/Settings/SettingsList/index.js +43 -6
  46. package/_modules/components/Shared/ColorPicker/styles.js +3 -1
  47. package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +4 -2
  48. package/_modules/components/Shared/SearchBar/index.js +4 -2
  49. package/_modules/components/SidebarMenu/index.js +25 -14
  50. package/_modules/components/SidebarMenu/styles.js +19 -9
  51. package/_modules/components/Stores/BusinessMenu/index.js +36 -5
  52. package/_modules/components/Stores/BusinessMenu/styles.js +27 -16
  53. package/_modules/components/Stores/BusinessMenuOptions/styles.js +9 -4
  54. package/_modules/components/Stores/BusinessPaymentMethods/index.js +53 -16
  55. package/_modules/components/Stores/BusinessProductList/index.js +7 -10
  56. package/_modules/components/Stores/BusinessProductsCategories/index.js +2 -2
  57. package/_modules/components/Stores/BusinessProductsListing/index.js +44 -21
  58. package/_modules/components/Stores/BusinessProductsListing/styles.js +20 -16
  59. package/_modules/components/Stores/BusinessesListing/index.js +4 -1
  60. package/_modules/components/Stores/BusinessesListingHeader/index.js +20 -3
  61. package/_modules/components/Stores/BusinessesListingHeader/styles.js +6 -2
  62. package/_modules/components/Stores/ImportersList/index.js +5 -2
  63. package/_modules/components/Stores/ImportersList/styles.js +18 -15
  64. package/_modules/components/Stores/ImportersListing/index.js +31 -4
  65. package/_modules/components/Stores/PaymentOption/index.js +12 -7
  66. package/_modules/components/Stores/PaymentOption/styles.js +9 -4
  67. package/_modules/components/Stores/PaymentOptionMethods/index.js +9 -4
  68. package/_modules/components/Stores/PaymentOptionMethods/styles.js +10 -5
  69. package/_modules/components/Stores/PaymentOptionPaypal/index.js +9 -4
  70. package/_modules/components/Stores/PaymentOptionSquare/index.js +10 -5
  71. package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +10 -5
  72. package/_modules/components/Stores/PaymentOptionStripeDirect/styles.js +10 -5
  73. package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +9 -4
  74. package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +9 -4
  75. package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +9 -4
  76. package/_modules/components/Users/UsersList/index.js +8 -2
  77. package/_modules/components/Users/UsersList/styles.js +15 -12
  78. package/package.json +2 -2
  79. package/src/components/BusinessIntelligence/Reports/index.js +18 -4
  80. package/src/components/BusinessIntelligence/Reports/styles.js +11 -0
  81. package/src/components/BusinessIntelligence/ReviewsListing/index.js +12 -0
  82. package/src/components/DisabledFeatureAlert/index.js +37 -0
  83. package/src/components/DisabledFeatureAlert/styles.js +32 -0
  84. package/src/components/Loyalty/RewardsPrograms/index.js +18 -5
  85. package/src/components/Loyalty/RewardsPrograms/styles.js +10 -0
  86. package/src/components/Marketing/CampaignHeader/index.js +3 -2
  87. package/src/components/Marketing/CampaignHeader/styles.js +8 -0
  88. package/src/components/Marketing/CampaignList/index.js +5 -3
  89. package/src/components/Marketing/CampaignList/styles.js +16 -0
  90. package/src/components/Marketing/CampaignListing/index.js +18 -2
  91. package/src/components/Marketing/EnterprisePromotionListing/index.js +17 -4
  92. package/src/components/Marketing/EnterprisePromotionListing/styles.js +5 -1
  93. package/src/components/OrderingProducts/OrderingProductDetails/index.js +34 -497
  94. package/src/components/OrderingProducts/OrderingProductDetails/styles.js +38 -288
  95. package/src/components/OrderingProducts/OrderingProductGeneralDetails/index.js +514 -0
  96. package/src/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +279 -0
  97. package/src/components/OrderingProducts/OrderingProductsListing/index.js +14 -2
  98. package/src/components/OrderingProducts/OrderingProductsListing/styles.js +62 -0
  99. package/src/components/OrderingProducts/SiteTheme/ThemeComponent.js +104 -0
  100. package/src/components/OrderingProducts/SiteTheme/ThemeImage.js +151 -0
  101. package/src/components/OrderingProducts/SiteTheme/ThemeOption.js +118 -0
  102. package/src/components/OrderingProducts/SiteTheme/index.js +221 -0
  103. package/src/components/OrderingProducts/SiteTheme/styles.js +160 -0
  104. package/src/components/Orders/CountryFilter/index.js +68 -0
  105. package/src/components/Orders/CountryFilter/styles.js +29 -0
  106. package/src/components/Orders/CurrencyFilter/index.js +68 -0
  107. package/src/components/Orders/CurrencyFilter/styles.js +29 -0
  108. package/src/components/Orders/DeliveriesLocation/index.js +60 -8
  109. package/src/components/Orders/DriversLocation/index.js +32 -4
  110. package/src/components/Orders/OrdersFilterGroup/index.js +15 -1
  111. package/src/components/Orders/OrdersListing/index.js +8 -1
  112. package/src/components/Orders/OrdersTable/index.js +297 -252
  113. package/src/components/Orders/OrdersTable/styles.js +33 -0
  114. package/src/components/Orders/index.js +3 -1
  115. package/src/components/Settings/SettingItemUI/index.js +2 -1
  116. package/src/components/Settings/SettingItemUI/styles.js +5 -0
  117. package/src/components/Settings/Settings/index.js +0 -11
  118. package/src/components/Settings/SettingsDetail/index.js +23 -4
  119. package/src/components/Settings/SettingsDetail/styles.js +9 -2
  120. package/src/components/Settings/SettingsList/index.js +30 -3
  121. package/src/components/Shared/ColorPicker/styles.js +1 -0
  122. package/src/components/Shared/ColumnAllowSettingPopover/index.js +2 -2
  123. package/src/components/Shared/SearchBar/index.js +3 -2
  124. package/src/components/SidebarMenu/index.js +22 -7
  125. package/src/components/SidebarMenu/styles.js +13 -0
  126. package/src/components/Stores/BusinessMenu/index.js +21 -3
  127. package/src/components/Stores/BusinessMenu/styles.js +19 -0
  128. package/src/components/Stores/BusinessMenuOptions/styles.js +6 -0
  129. package/src/components/Stores/BusinessPaymentMethods/index.js +62 -32
  130. package/src/components/Stores/BusinessProductList/index.js +2 -1
  131. package/src/components/Stores/BusinessProductsCategories/index.js +2 -2
  132. package/src/components/Stores/BusinessProductsListing/index.js +18 -4
  133. package/src/components/Stores/BusinessProductsListing/styles.js +40 -10
  134. package/src/components/Stores/BusinessesListing/index.js +3 -0
  135. package/src/components/Stores/BusinessesListingHeader/index.js +15 -3
  136. package/src/components/Stores/BusinessesListingHeader/styles.js +38 -0
  137. package/src/components/Stores/ImportersList/index.js +3 -2
  138. package/src/components/Stores/ImportersList/styles.js +8 -1
  139. package/src/components/Stores/ImportersListing/index.js +25 -1
  140. package/src/components/Stores/PaymentOption/index.js +9 -5
  141. package/src/components/Stores/PaymentOption/styles.js +8 -0
  142. package/src/components/Stores/PaymentOptionMethods/index.js +8 -3
  143. package/src/components/Stores/PaymentOptionMethods/styles.js +8 -0
  144. package/src/components/Stores/PaymentOptionPaypal/index.js +8 -3
  145. package/src/components/Stores/PaymentOptionSquare/index.js +183 -176
  146. package/src/components/Stores/PaymentOptionStripeDirect/index.js +8 -3
  147. package/src/components/Stores/PaymentOptionStripeDirect/styles.js +8 -0
  148. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +8 -3
  149. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +8 -3
  150. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +8 -3
  151. package/src/components/Users/UsersList/index.js +10 -1
  152. package/src/components/Users/UsersList/styles.js +9 -0
  153. package/template/app.js +8 -8
@@ -9,7 +9,7 @@ exports.UserInfo = exports.SubMenu = exports.SidebarMainContent = exports.Sideba
9
9
 
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
13
13
 
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
 
@@ -83,32 +83,42 @@ var UserInfo = _styledComponents.default.div(_templateObject13 || (_templateObje
83
83
 
84
84
  exports.UserInfo = UserInfo;
85
85
 
86
- var MenuContainer = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 5px 0;\n > button {\n width: 100%;\n text-align: initial;\n }\n"])));
86
+ var MenuContainer = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 5px 0;\n > button {\n width: 100%;\n text-align: initial;\n }\n\n ", "\n"])), function (_ref3) {
87
+ var disabledFeature = _ref3.disabledFeature;
88
+ return disabledFeature && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n background-color: ", ";\n cursor: not-allowed;\n > button {\n pointer-events: none;\n }\n "])), function (props) {
89
+ return props.theme.colors.disabled;
90
+ });
91
+ });
87
92
 
88
93
  exports.MenuContainer = MenuContainer;
89
94
 
90
- var MenuContent = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n padding: 5px 0;\n"])));
95
+ var MenuContent = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n padding: 5px 0;\n"])));
91
96
 
92
97
  exports.MenuContent = MenuContent;
93
98
 
94
- var SubMenu = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n cursor: pointer;\n padding: 5px 0;\n font-size: 14px;\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-radius: 8px;\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n ", "\n"])), function (props) {
99
+ var SubMenu = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n cursor: pointer;\n padding: 5px 0;\n font-size: 14px;\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-radius: 8px;\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n ", "\n\n ", "\n"])), function (props) {
95
100
  return props.theme.colors.lightGray;
96
101
  }, function (props) {
97
102
  return props.theme.colors.lightPrimary;
98
- }, function (_ref3) {
99
- var active = _ref3.active;
100
- return active && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
103
+ }, function (_ref4) {
104
+ var active = _ref4.active;
105
+ return active && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
101
106
  return props.theme.colors.primary;
102
107
  });
108
+ }, function (_ref5) {
109
+ var disabledFeature = _ref5.disabledFeature;
110
+ return disabledFeature && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n background-color: ", "!important;\n cursor: not-allowed;\n "])), function (props) {
111
+ return props.theme.colors.disabled;
112
+ });
103
113
  }, function (props) {
104
114
  var _props$theme5;
105
115
 
106
- return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n padding-right: 40px;\n "]))) : (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n padding-left: 40px;\n "])));
116
+ return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n padding-right: 40px;\n "]))) : (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n padding-left: 40px;\n "])));
107
117
  });
108
118
 
109
119
  exports.SubMenu = SubMenu;
110
120
 
111
- var LanguageSelectorContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n position: relative;\n border-radius: 8px;\n min-height: 35px;\n\n &:hover {\n background-color: ", ";\n }\n\n .options {\n > div {\n font-size: 14px;\n }\n }\n"])), function (props) {
121
+ var LanguageSelectorContainer = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n position: relative;\n border-radius: 8px;\n min-height: 35px;\n\n &:hover {\n background-color: ", ";\n }\n\n .options {\n > div {\n font-size: 14px;\n }\n }\n"])), function (props) {
112
122
  return props.theme.colors.lightPrimary;
113
123
  });
114
124
 
@@ -21,6 +21,8 @@ var _styles = require("../../../styles");
21
21
 
22
22
  var _reactBootstrapIcons = require("react-bootstrap-icons");
23
23
 
24
+ var _DisabledFeatureAlert = require("../../DisabledFeatureAlert");
25
+
24
26
  var _styles2 = require("./styles");
25
27
 
26
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -67,6 +69,14 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
67
69
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
68
70
  t = _useLanguage2[1];
69
71
 
72
+ var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
73
+ _useConfig2 = _slicedToArray(_useConfig, 1),
74
+ configs = _useConfig2[0].configs;
75
+
76
+ var _useSession = (0, _orderingComponentsAdminExternal.useSession)(),
77
+ _useSession2 = _slicedToArray(_useSession, 1),
78
+ user = _useSession2[0].user;
79
+
70
80
  var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
71
81
  width = _useWindowSize.width;
72
82
 
@@ -104,6 +114,13 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
104
114
  menuList = _useState12[0],
105
115
  setMenuList = _useState12[1];
106
116
 
117
+ var _useState13 = (0, _react.useState)(false),
118
+ _useState14 = _slicedToArray(_useState13, 2),
119
+ isDisabledFeature = _useState14[0],
120
+ setIsDisabledFeature = _useState14[1];
121
+
122
+ var featureName = 'shared_menus';
123
+
107
124
  var handleOpenOptions = function handleOpenOptions(name, menu) {
108
125
  setCurrentMenu(menu);
109
126
  setIsExtendExtraOpen(true);
@@ -133,6 +150,16 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
133
150
  });
134
151
  setMenuList(filteredMenus);
135
152
  }, [JSON.stringify(businessMenusState.menus), JSON.stringify(businessMenusState.menusShared), searchValue, isSelectedSharedMenus]);
153
+ (0, _react.useEffect)(function () {
154
+ if (configs && Object.keys(configs).length > 0 && user) {
155
+ if (!Object.keys(configs).includes(featureName) && (user === null || user === void 0 ? void 0 : user.level) === 0 && isSelectedSharedMenus) {
156
+ setIsDisabledFeature(true);
157
+ return;
158
+ }
159
+
160
+ setIsDisabledFeature(false);
161
+ }
162
+ }, [configs, isSelectedSharedMenus]);
136
163
  return /*#__PURE__*/_react.default.createElement(_styles2.MainContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.MenuContainer, {
137
164
  isHide: isOpenSharedProduct
138
165
  }, /*#__PURE__*/_react.default.createElement(_styles2.Header, null, /*#__PURE__*/_react.default.createElement(_styles2.Title, null, t('MENU_V21', 'Menu')), /*#__PURE__*/_react.default.createElement(_styles.Button, {
@@ -140,7 +167,8 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
140
167
  color: "lightPrimary",
141
168
  onClick: function onClick() {
142
169
  return handleOpenOptions('option', {});
143
- }
170
+ },
171
+ disabled: isDisabledFeature
144
172
  }, t('ADD_MENU', 'Add menu'))), /*#__PURE__*/_react.default.createElement(_styles2.TabsContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.Tab, {
145
173
  active: !isSelectedSharedMenus,
146
174
  onClick: function onClick() {
@@ -153,7 +181,9 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
153
181
  handleCloseOption();
154
182
  setIsSelectedSharedMenus(true);
155
183
  }
156
- }, t('SHARED_MENUS', 'Shared menus'))), /*#__PURE__*/_react.default.createElement(_styles2.SearchBarWrapper, null, /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
184
+ }, t('SHARED_MENUS', 'Shared menus'))), /*#__PURE__*/_react.default.createElement(_styles2.SearchBarWrapper, {
185
+ isDisabledFeature: isDisabledFeature
186
+ }, /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
157
187
  isCustomLayout: true,
158
188
  lazyLoad: true,
159
189
  placeholder: t('SEARCH', 'Search'),
@@ -167,8 +197,9 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
167
197
  isBorderTop: index === 0,
168
198
  active: menu.id === (currentMenu === null || currentMenu === void 0 ? void 0 : currentMenu.id),
169
199
  onClick: function onClick(e) {
170
- return handleOpenEdit(e, menu);
171
- }
200
+ return !isDisabledFeature && handleOpenEdit(e, menu);
201
+ },
202
+ isDisabledFeature: isDisabledFeature
172
203
  }, /*#__PURE__*/_react.default.createElement(_styles2.CheckboxWrapper, {
173
204
  className: "business_checkbox_control"
174
205
  }, /*#__PURE__*/_react.default.createElement(_styles.Checkbox, {
@@ -181,7 +212,7 @@ var BusinessMenuUI = function BusinessMenuUI(props) {
181
212
  onClick: function onClick() {
182
213
  return handleOpenOptions('option', {});
183
214
  }
184
- }, t('ADD_MENU', 'Add menu'))), width >= 1000 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showOption === 'option' && /*#__PURE__*/_react.default.createElement(_BusinessMenuOptions.BusinessMenuOptions, {
215
+ }, t('ADD_MENU', 'Add menu'))), isDisabledFeature && /*#__PURE__*/_react.default.createElement(_DisabledFeatureAlert.DisabledFeatureAlert, null), width >= 1000 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showOption === 'option' && /*#__PURE__*/_react.default.createElement(_BusinessMenuOptions.BusinessMenuOptions, {
185
216
  open: showOption === 'option',
186
217
  business: business,
187
218
  menu: currentMenu,
@@ -9,7 +9,7 @@ exports.Title = exports.TabsContainer = exports.Tab = exports.SelectButtonGroup
9
9
 
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28;
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
13
13
 
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
 
@@ -45,7 +45,7 @@ var Title = _styledComponents.default.h1(_templateObject10 || (_templateObject10
45
45
 
46
46
  exports.Title = Title;
47
47
 
48
- var MeunItem = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0;\n border-bottom: 1px solid ", ";\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n\n > svg {\n color: ", ";\n margin: 0 3px;\n font-size: 13px;\n }\n"])), function (props) {
48
+ var MeunItem = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0;\n border-bottom: 1px solid ", ";\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n\n > svg {\n color: ", ";\n margin: 0 3px;\n font-size: 13px;\n }\n\n ", "\n"])), function (props) {
49
49
  return props.theme.colors.borderColor;
50
50
  }, function (props) {
51
51
  return props.theme.colors.lightPrimary;
@@ -65,66 +65,77 @@ var MeunItem = _styledComponents.default.div(_templateObject11 || (_templateObje
65
65
  });
66
66
  }, function (props) {
67
67
  return props.theme.colors.secundaryLight;
68
+ }, function (_ref5) {
69
+ var isDisabledFeature = _ref5.isDisabledFeature;
70
+ return isDisabledFeature && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: 0.4;\n &:hover {\n background-color: ", ";\n }\n "])), function (props) {
71
+ return props.theme.colors.white;
72
+ });
68
73
  });
69
74
 
70
75
  exports.MeunItem = MeunItem;
71
76
 
72
- var MenuName = _styledComponents.default.span(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex: 1;\n font-size: 14px;\n"])));
77
+ var MenuName = _styledComponents.default.span(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n flex: 1;\n font-size: 14px;\n"])));
73
78
 
74
79
  exports.MenuName = MenuName;
75
80
 
76
- var CheckboxWrapper = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n ", "\n"])), function (props) {
81
+ var CheckboxWrapper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n ", "\n"])), function (props) {
77
82
  var _props$theme2;
78
83
 
79
- return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "])));
84
+ return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "])));
80
85
  });
81
86
 
82
87
  exports.CheckboxWrapper = CheckboxWrapper;
83
88
 
84
- var AddMenuButton = _styledComponents.default.a(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n margin: 15px 0;\n display: inline-block;\n text-decoration: none;\n font-size: 14px;\n"])), function (props) {
89
+ var AddMenuButton = _styledComponents.default.a(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n margin: 15px 0;\n display: inline-block;\n text-decoration: none;\n font-size: 14px;\n"])), function (props) {
85
90
  return props.theme.colors.lightGray;
86
91
  });
87
92
 
88
93
  exports.AddMenuButton = AddMenuButton;
89
94
 
90
- var TabsContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: 10px;\n"])), function (props) {
95
+ var TabsContainer = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: 10px;\n"])), function (props) {
91
96
  return props.theme.colors.borderColor;
92
97
  });
93
98
 
94
99
  exports.TabsContainer = TabsContainer;
95
100
 
96
- var Tab = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n user-select: none;\n padding: 10px 0px;\n cursor: pointer;\n color: ", ";\n font-size: 14px;\n white-space: nowrap;\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
101
+ var Tab = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n user-select: none;\n padding: 10px 0px;\n cursor: pointer;\n color: ", ";\n font-size: 14px;\n white-space: nowrap;\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
97
102
  var _props$theme$colors;
98
103
 
99
104
  return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.headingColor;
100
105
  }, function (props) {
101
106
  var _props$theme3;
102
107
 
103
- return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n margin-left: 30px;\n "]))) : (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin-right: 30px;\n "])));
104
- }, function (_ref5) {
105
- var active = _ref5.active;
106
- return active && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n border-bottom: 2px solid;\n font-weight: 500;\n "])));
108
+ return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin-left: 30px;\n "]))) : (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n margin-right: 30px;\n "])));
107
109
  }, function (_ref6) {
108
110
  var active = _ref6.active;
109
- return !active && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
111
+ return active && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n border-bottom: 2px solid;\n font-weight: 500;\n "])));
112
+ }, function (_ref7) {
113
+ var active = _ref7.active;
114
+ return !active && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
110
115
  var _props$theme$colors2;
111
116
 
112
117
  return (_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.lightGray;
113
118
  });
119
+ }, function (_ref8) {
120
+ var disabledFeature = _ref8.disabledFeature;
121
+ return disabledFeature && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n "])));
114
122
  });
115
123
 
116
124
  exports.Tab = Tab;
117
125
 
118
- var SearchBarWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n margin-bottom: 15px;\n"])));
126
+ var SearchBarWrapper = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n margin-bottom: 15px;\n ", "\n"])), function (_ref9) {
127
+ var isDisabledFeature = _ref9.isDisabledFeature;
128
+ return isDisabledFeature && (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n > div {\n pointer-events: none;\n opacity: 0.4;\n }\n "])));
129
+ });
119
130
 
120
131
  exports.SearchBarWrapper = SearchBarWrapper;
121
132
 
122
- var SelectButtonGroup = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding-bottom: 15px;\n border-bottom: 1px solid ", ";\n button {\n font-size: 12px;\n\n &:first-child {\n ", "\n }\n }\n"])), function (props) {
133
+ var SelectButtonGroup = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding-bottom: 15px;\n border-bottom: 1px solid ", ";\n button {\n font-size: 12px;\n\n &:first-child {\n ", "\n }\n }\n"])), function (props) {
123
134
  return props.theme.colors.borderColor;
124
135
  }, function (props) {
125
136
  var _props$theme4;
126
137
 
127
- return (_props$theme4 = props.theme) !== null && _props$theme4 !== void 0 && _props$theme4.rtl ? (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n margin-left: 16px;\n "]))) : (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n margin-right: 16px;\n "])));
138
+ return (_props$theme4 = props.theme) !== null && _props$theme4 !== void 0 && _props$theme4.rtl ? (0, _styledComponents.css)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n margin-left: 16px;\n "]))) : (0, _styledComponents.css)(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n margin-right: 16px;\n "])));
128
139
  });
129
140
 
130
141
  exports.SelectButtonGroup = SelectButtonGroup;
@@ -11,7 +11,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
12
  var _polished = require("polished");
13
13
 
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
15
15
 
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
 
@@ -83,7 +83,7 @@ var TabInnerContainer = _styledComponents.default.div(_templateObject14 || (_tem
83
83
 
84
84
  exports.TabInnerContainer = TabInnerContainer;
85
85
 
86
- var Tab = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n cursor: pointer;\n color: ", ";\n white-space: nowrap;\n font-size: 14px;\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
86
+ var Tab = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding: 10px 0px;\n cursor: pointer;\n color: ", ";\n white-space: nowrap;\n font-size: 14px;\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
87
87
  var _props$theme$colors2;
88
88
 
89
89
  return (_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.headingColor;
@@ -99,14 +99,19 @@ var Tab = _styledComponents.default.div(_templateObject15 || (_templateObject15
99
99
  return !active && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (props) {
100
100
  return props.theme.colors.lightGray;
101
101
  });
102
+ }, function (_ref3) {
103
+ var disabledFeature = _ref3.disabledFeature;
104
+ return disabledFeature && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: 5px;\n cursor: not-allowed;\n "])), function (props) {
105
+ return props.theme.colors.disabled;
106
+ });
102
107
  });
103
108
 
104
109
  exports.Tab = Tab;
105
110
 
106
- var BusinessMenuBasicContainer = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
111
+ var BusinessMenuBasicContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
107
112
 
108
113
  exports.BusinessMenuBasicContainer = BusinessMenuBasicContainer;
109
114
 
110
- var BusinessScheduleWrapper = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n > div {\n padding: 0px;\n\n h1 {\n font-size: 18px;\n margin-top: 30px;\n }\n\n > div {\n margin-top: 0px;\n }\n }\n"])));
115
+ var BusinessScheduleWrapper = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n > div {\n padding: 0px;\n\n h1 {\n font-size: 18px;\n margin-top: 30px;\n }\n\n > div {\n margin-top: 0px;\n }\n }\n"])));
111
116
 
112
117
  exports.BusinessScheduleWrapper = BusinessScheduleWrapper;
@@ -116,6 +116,10 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
116
116
  _useConfig2 = _slicedToArray(_useConfig, 1),
117
117
  configs = _useConfig2[0].configs;
118
118
 
119
+ var _useSession = (0, _orderingComponentsAdminExternal.useSession)(),
120
+ _useSession2 = _slicedToArray(_useSession, 1),
121
+ user = _useSession2[0].user;
122
+
119
123
  var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
120
124
  width = _useWindowSize.width;
121
125
 
@@ -152,6 +156,13 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
152
156
  isOpenWalletDetails = _useState12[0],
153
157
  setIsOpenWalletDetails = _useState12[1];
154
158
 
159
+ var featureName = 'payments_advanced';
160
+
161
+ var _useState13 = (0, _react.useState)(false),
162
+ _useState14 = _slicedToArray(_useState13, 2),
163
+ isDisabledFeature = _useState14[0],
164
+ setIsDisabledFeature = _useState14[1];
165
+
155
166
  var isWalletCashEnabled = (configs === null || configs === void 0 ? void 0 : (_configs$wallet_enabl = configs.wallet_enabled) === null || _configs$wallet_enabl === void 0 ? void 0 : _configs$wallet_enabl.value) === '1';
156
167
  var orderTypes = [{
157
168
  value: 1,
@@ -250,6 +261,16 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
250
261
  });
251
262
  setSelectedBusinessPaymethod(updatedPaymethod);
252
263
  }, [businessPaymethodsState === null || businessPaymethodsState === void 0 ? void 0 : businessPaymethodsState.paymethods, selectedBusinessPaymethod]);
264
+ (0, _react.useEffect)(function () {
265
+ if (configs && Object.keys(configs).length > 0 && user) {
266
+ if (!Object.keys(configs).includes(featureName) && (user === null || user === void 0 ? void 0 : user.level) === 0) {
267
+ setIsDisabledFeature(true);
268
+ return;
269
+ }
270
+
271
+ setIsDisabledFeature(false);
272
+ }
273
+ }, [configs]);
253
274
  return /*#__PURE__*/_react.default.createElement(_styles2.MainContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.PaymentMethodsContainer, {
254
275
  isOpenWalletDetails: isOpenWalletDetails
255
276
  }, /*#__PURE__*/_react.default.createElement("h1", null, t('PAYMETHODS', 'Payment methods')), /*#__PURE__*/_react.default.createElement(_styles2.SearchBarWrapper, null, /*#__PURE__*/_react.default.createElement(_Shared.SearchBar, {
@@ -329,7 +350,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
329
350
  handleChangeSandbox: handleChangeSandbox,
330
351
  handleChangeInput: handleChangeInput,
331
352
  handleSaveClick: handleSaveClick,
332
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
353
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
354
+ isDisabledFeature: isDisabledFeature
333
355
  }), selectedPaymethodGateway === 'apple_pay' && /*#__PURE__*/_react.default.createElement(_PaymentOptionMethods.PaymentOptionMethods, {
334
356
  sitesState: sitesState,
335
357
  open: isEdit,
@@ -347,7 +369,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
347
369
  handleSaveClick: handleSaveClick,
348
370
  handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
349
371
  id: selectedPaymethodGateway,
350
- title: "Apple pay"
372
+ title: "Apple pay",
373
+ isDisabledFeature: isDisabledFeature
351
374
  }), selectedPaymethodGateway === 'google_pay' && /*#__PURE__*/_react.default.createElement(_PaymentOptionMethods.PaymentOptionMethods, {
352
375
  sitesState: sitesState,
353
376
  open: isEdit,
@@ -365,7 +388,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
365
388
  handleSaveClick: handleSaveClick,
366
389
  handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
367
390
  id: selectedPaymethodGateway,
368
- title: "Google pay"
391
+ title: "Google pay",
392
+ isDisabledFeature: isDisabledFeature
369
393
  }), selectedPaymethodGateway === 'stripe_direct' && /*#__PURE__*/_react.default.createElement(_PaymentOptionStripeDirect.PaymentOptionStripeDirect, {
370
394
  sitesState: sitesState,
371
395
  open: isEdit,
@@ -381,7 +405,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
381
405
  handleChangeSandbox: handleChangeSandbox,
382
406
  handleChangeInput: handleChangeInput,
383
407
  handleSaveClick: handleSaveClick,
384
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
408
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
409
+ isDisabledFeature: isDisabledFeature
385
410
  }), selectedPaymethodGateway === 'paypal' && /*#__PURE__*/_react.default.createElement(_PaymentOptionPaypal.PaymentOptionPaypal, {
386
411
  open: isEdit,
387
412
  sitesState: sitesState,
@@ -397,7 +422,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
397
422
  handleChangeSandbox: handleChangeSandbox,
398
423
  handleChangeInput: handleChangeInput,
399
424
  handleSaveClick: handleSaveClick,
400
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
425
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
426
+ isDisabledFeature: isDisabledFeature
401
427
  }), selectedPaymethodGateway === 'paypal_express' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionPaypalExpress.PaymethodOptionPaypalExpress, {
402
428
  open: isEdit,
403
429
  sitesState: sitesState,
@@ -413,7 +439,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
413
439
  handleChangeSandbox: handleChangeSandbox,
414
440
  handleChangeInput: handleChangeInput,
415
441
  handleSaveClick: handleSaveClick,
416
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
442
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
443
+ isDisabledFeature: isDisabledFeature
417
444
  }), selectedPaymethodGateway === 'stripe_redirect' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionStripeRedirect.PaymethodOptionStripeRedirect, {
418
445
  open: isEdit,
419
446
  sitesState: sitesState,
@@ -429,7 +456,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
429
456
  handleChangeSandbox: handleChangeSandbox,
430
457
  handleChangeInput: handleChangeInput,
431
458
  handleSaveClick: handleSaveClick,
432
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
459
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
460
+ isDisabledFeature: isDisabledFeature
433
461
  }), selectedPaymethodGateway === 'stripe_connect' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionStripeConnect.PaymethodOptionStripeConnect, {
434
462
  open: isEdit,
435
463
  sitesState: sitesState,
@@ -445,7 +473,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
445
473
  handleStripeConnect: handleStripeConnect,
446
474
  handleChangeStripeInput: handleChangeStripeInput,
447
475
  handleStripeSave: handleStripeSave,
448
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
476
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
477
+ isDisabledFeature: isDisabledFeature
449
478
  }), selectedPaymethodGateway === 'square' && /*#__PURE__*/_react.default.createElement(_PaymentOptionSquare.PaymentOptionSquare, {
450
479
  open: isEdit,
451
480
  sitesState: sitesState,
@@ -459,7 +488,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
459
488
  handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
460
489
  handleChangeBusinessPaymentState: handleChangeBusinessPaymentState,
461
490
  businessPaymethods: businessPaymethodsState === null || businessPaymethodsState === void 0 ? void 0 : businessPaymethodsState.paymethods,
462
- handleSuccessPaymethodUpdate: handleSuccessPaymethodUpdate
491
+ handleSuccessPaymethodUpdate: handleSuccessPaymethodUpdate,
492
+ isDisabledFeature: isDisabledFeature
463
493
  }))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isEdit && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Shared.Modal, {
464
494
  width: "80%",
465
495
  open: isEdit,
@@ -481,7 +511,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
481
511
  handleChangeSandbox: handleChangeSandbox,
482
512
  handleChangeInput: handleChangeInput,
483
513
  handleSaveClick: handleSaveClick,
484
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
514
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
515
+ isDisabledFeature: isDisabledFeature
485
516
  }), selectedPaymethodGateway === 'stripe_direct' && /*#__PURE__*/_react.default.createElement(_PaymentOptionStripeDirect.PaymentOptionStripeDirect, {
486
517
  sitesState: sitesState,
487
518
  open: isEdit,
@@ -497,7 +528,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
497
528
  handleChangeSandbox: handleChangeSandbox,
498
529
  handleChangeInput: handleChangeInput,
499
530
  handleSaveClick: handleSaveClick,
500
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
531
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
532
+ isDisabledFeature: isDisabledFeature
501
533
  }), selectedPaymethodGateway === 'paypal' && /*#__PURE__*/_react.default.createElement(_PaymentOptionPaypal.PaymentOptionPaypal, {
502
534
  open: isEdit,
503
535
  sitesState: sitesState,
@@ -513,7 +545,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
513
545
  handleChangeSandbox: handleChangeSandbox,
514
546
  handleChangeInput: handleChangeInput,
515
547
  handleSaveClick: handleSaveClick,
516
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
548
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
549
+ isDisabledFeature: isDisabledFeature
517
550
  }), selectedPaymethodGateway === 'paypal_express' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionPaypalExpress.PaymethodOptionPaypalExpress, {
518
551
  open: isEdit,
519
552
  sitesState: sitesState,
@@ -529,7 +562,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
529
562
  handleChangeSandbox: handleChangeSandbox,
530
563
  handleChangeInput: handleChangeInput,
531
564
  handleSaveClick: handleSaveClick,
532
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
565
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
566
+ isDisabledFeature: isDisabledFeature
533
567
  }), selectedPaymethodGateway === 'stripe_redirect' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionStripeRedirect.PaymethodOptionStripeRedirect, {
534
568
  open: isEdit,
535
569
  sitesState: sitesState,
@@ -545,7 +579,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
545
579
  handleChangeSandbox: handleChangeSandbox,
546
580
  handleChangeInput: handleChangeInput,
547
581
  handleSaveClick: handleSaveClick,
548
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
582
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
583
+ isDisabledFeature: isDisabledFeature
549
584
  }), selectedPaymethodGateway === 'stripe_connect' && /*#__PURE__*/_react.default.createElement(_PaymethodOptionStripeConnect.PaymethodOptionStripeConnect, {
550
585
  open: isEdit,
551
586
  sitesState: sitesState,
@@ -562,7 +597,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
562
597
  handleStripeConnect: handleStripeConnect,
563
598
  handleChangeStripeInput: handleChangeStripeInput,
564
599
  handleStripeSave: handleStripeSave,
565
- handleDeletePaymethod: handleDeleteBusinessPaymethodOption
600
+ handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
601
+ isDisabledFeature: isDisabledFeature
566
602
  }), selectedPaymethodGateway === 'square' && /*#__PURE__*/_react.default.createElement(_PaymentOptionSquare.PaymentOptionSquare, {
567
603
  open: isEdit,
568
604
  sitesState: sitesState,
@@ -576,7 +612,8 @@ var BusinessPaymentMethodsUI = function BusinessPaymentMethodsUI(props) {
576
612
  handleDeletePaymethod: handleDeleteBusinessPaymethodOption,
577
613
  handleChangeBusinessPaymentState: handleChangeBusinessPaymentState,
578
614
  businessPaymethods: businessPaymethodsState === null || businessPaymethodsState === void 0 ? void 0 : businessPaymethodsState.paymethods,
579
- handleSuccessPaymethodUpdate: handleSuccessPaymethodUpdate
615
+ handleSuccessPaymethodUpdate: handleSuccessPaymethodUpdate,
616
+ isDisabledFeature: isDisabledFeature
580
617
  })))), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
581
618
  title: t('PAYMETHODS', 'Payment methods'),
582
619
  content: alertState.content,
@@ -69,6 +69,8 @@ var BusinessProductList = function BusinessProductList(props) {
69
69
  handleParentProductAdd = props.handleParentProductAdd,
70
70
  allowSpreadColumns = props.allowSpreadColumns,
71
71
  getPageProducts = props.getPageProducts,
72
+ productsPerPage = props.productsPerPage,
73
+ setProductsPerPage = props.setProductsPerPage,
72
74
  categorySelected = props.categorySelected;
73
75
 
74
76
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
@@ -132,18 +134,13 @@ var BusinessProductList = function BusinessProductList(props) {
132
134
  var _useState7 = (0, _react.useState)(1),
133
135
  _useState8 = _slicedToArray(_useState7, 2),
134
136
  currentPage = _useState8[0],
135
- setCurrentPage = _useState8[1];
136
-
137
- var _useState9 = (0, _react.useState)(10),
138
- _useState10 = _slicedToArray(_useState9, 2),
139
- productsPerPage = _useState10[0],
140
- setProductsPerPage = _useState10[1]; // Get current products
137
+ setCurrentPage = _useState8[1]; // Get current products
141
138
 
142
139
 
143
- var _useState11 = (0, _react.useState)([]),
144
- _useState12 = _slicedToArray(_useState11, 2),
145
- currentProducts = _useState12[0],
146
- setCurrentProducts = _useState12[1];
140
+ var _useState9 = (0, _react.useState)([]),
141
+ _useState10 = _slicedToArray(_useState9, 2),
142
+ currentProducts = _useState10[0],
143
+ setCurrentProducts = _useState10[1];
147
144
 
148
145
  var handleChangePage = function handleChangePage(page) {
149
146
  setCurrentPage(page);
@@ -83,12 +83,12 @@ var BusinessProductsCategories = function BusinessProductsCategories(props) {
83
83
  ref: containerRef
84
84
  }, /*#__PURE__*/_react.default.createElement(_styles.HeaderContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('BUSINESS_CATEGORY', 'Business category'))), /*#__PURE__*/_react.default.createElement(_styles.ListContent, {
85
85
  ref: listRef
86
- }, businessState.loading && _toConsumableArray(Array(6).keys()).map(function (i) {
86
+ }, (businessState === null || businessState === void 0 ? void 0 : businessState.loading) && _toConsumableArray(Array(6).keys()).map(function (i) {
87
87
  return /*#__PURE__*/_react.default.createElement(_SingleBusinessSubCateogries.SingleBusinessSubCateogries, {
88
88
  key: i,
89
89
  isSkeleton: true
90
90
  });
91
- }), (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : (_businessState$busine2 = _businessState$busine.categories) === null || _businessState$busine2 === void 0 ? void 0 : _businessState$busine2.length) > 0 && (businessState === null || businessState === void 0 ? void 0 : businessState.business.categories.sort(function (a, b) {
91
+ }), !(businessState !== null && businessState !== void 0 && businessState.loading) && (businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : (_businessState$busine2 = _businessState$busine.categories) === null || _businessState$busine2 === void 0 ? void 0 : _businessState$busine2.length) > 0 && (businessState === null || businessState === void 0 ? void 0 : businessState.business.categories.sort(function (a, b) {
92
92
  return a.rank - b.rank;
93
93
  }).map(function (category, i) {
94
94
  var _businessState$busine3, _businessState$busine4;