ordering-ui-admin-external 1.1.1 → 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.
- package/_bundles/main.css +2868 -1994
- package/_bundles/{ordering-ui-admin.2a3c1a73c2eac0c338db.js → ordering-ui-admin.977451ddd1e3c8d3a2d7.js} +2 -2
- package/_bundles/{ordering-ui-admin.2a3c1a73c2eac0c338db.js.LICENSE.txt → ordering-ui-admin.977451ddd1e3c8d3a2d7.js.LICENSE.txt} +10 -4
- package/_modules/components/BusinessIntelligence/AnalyticsProductCategories/index.js +1 -1
- package/_modules/components/BusinessIntelligence/Reports/index.js +27 -3
- package/_modules/components/BusinessIntelligence/Reports/styles.js +9 -2
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +9 -1
- package/_modules/components/DisabledFeatureAlert/index.js +63 -0
- package/_modules/components/DisabledFeatureAlert/styles.js +42 -0
- package/_modules/components/Loyalty/RewardsPrograms/index.js +38 -12
- package/_modules/components/Loyalty/RewardsPrograms/styles.js +13 -6
- package/_modules/components/Marketing/CampaignHeader/index.js +5 -2
- package/_modules/components/Marketing/CampaignHeader/styles.js +7 -4
- package/_modules/components/Marketing/CampaignList/index.js +8 -4
- package/_modules/components/Marketing/CampaignList/styles.js +30 -22
- package/_modules/components/Marketing/CampaignListing/index.js +29 -3
- package/_modules/components/Marketing/EnterprisePromotionConditions/index.js +7 -2
- package/_modules/components/Marketing/EnterprisePromotionList/index.js +8 -4
- package/_modules/components/Marketing/EnterprisePromotionList/styles.js +36 -26
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +46 -22
- package/_modules/components/Marketing/EnterprisePromotionListing/styles.js +1 -1
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +24 -426
- package/_modules/components/OrderingProducts/OrderingProductDetails/styles.js +35 -114
- package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/index.js +480 -0
- package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +127 -0
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +3 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +23 -3
- package/_modules/components/OrderingProducts/SiteTheme/ThemeComponent.js +119 -0
- package/_modules/components/OrderingProducts/SiteTheme/ThemeImage.js +267 -0
- package/_modules/components/OrderingProducts/SiteTheme/ThemeOption.js +135 -0
- package/_modules/components/OrderingProducts/SiteTheme/index.js +266 -0
- package/_modules/components/OrderingProducts/SiteTheme/styles.js +114 -0
- package/_modules/components/Orders/Appointments/CalendarHeader.js +103 -0
- package/_modules/components/Orders/Appointments/EventComponent.js +63 -0
- package/_modules/components/Orders/Appointments/index.js +174 -0
- package/_modules/components/Orders/Appointments/styles.js +88 -0
- package/_modules/components/Orders/CountryFilter/index.js +114 -0
- package/_modules/components/Orders/CountryFilter/styles.js +34 -0
- package/_modules/components/Orders/CurrencyFilter/index.js +114 -0
- package/_modules/components/Orders/CurrencyFilter/styles.js +34 -0
- package/_modules/components/Orders/DeliveriesLocation/index.js +22 -12
- package/_modules/components/Orders/DriversLocation/index.js +13 -7
- package/_modules/components/Orders/OrderContactInformation/index.js +3 -2
- package/_modules/components/Orders/OrderDetails/index.js +4 -1
- package/_modules/components/Orders/OrderDetailsHeader/index.js +4 -3
- package/_modules/components/Orders/OrderDetailsHeader/styles.js +1 -1
- package/_modules/components/Orders/OrdersFilterGroup/index.js +13 -1
- package/_modules/components/Orders/OrdersListing/index.js +8 -2
- package/_modules/components/Orders/OrdersTable/index.js +296 -174
- package/_modules/components/Orders/OrdersTable/styles.js +30 -4
- package/_modules/components/Orders/index.js +17 -1
- package/_modules/components/Settings/SettingItemUI/index.js +3 -1
- package/_modules/components/Settings/SettingItemUI/styles.js +18 -11
- package/_modules/components/Settings/Settings/index.js +1 -11
- package/_modules/components/Settings/SettingsDetail/index.js +40 -3
- package/_modules/components/Settings/SettingsDetail/styles.js +27 -8
- package/_modules/components/Settings/SettingsList/index.js +43 -6
- package/_modules/components/Shared/ColorPicker/styles.js +3 -1
- package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +4 -2
- package/_modules/components/Shared/SearchBar/index.js +4 -2
- package/_modules/components/SidebarMenu/index.js +32 -16
- package/_modules/components/SidebarMenu/styles.js +19 -9
- package/_modules/components/Stores/BusinessMenu/index.js +36 -5
- package/_modules/components/Stores/BusinessMenu/styles.js +27 -16
- package/_modules/components/Stores/BusinessMenuOptions/styles.js +9 -4
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +53 -16
- package/_modules/components/Stores/BusinessProductList/index.js +7 -10
- package/_modules/components/Stores/BusinessProductsCategories/index.js +2 -2
- package/_modules/components/Stores/BusinessProductsListing/index.js +44 -21
- package/_modules/components/Stores/BusinessProductsListing/styles.js +20 -16
- package/_modules/components/Stores/BusinessesListing/index.js +4 -1
- package/_modules/components/Stores/BusinessesListingHeader/index.js +20 -3
- package/_modules/components/Stores/BusinessesListingHeader/styles.js +6 -2
- package/_modules/components/Stores/ImportersList/index.js +5 -2
- package/_modules/components/Stores/ImportersList/styles.js +18 -15
- package/_modules/components/Stores/ImportersListing/index.js +31 -4
- package/_modules/components/Stores/PaymentOption/index.js +12 -7
- package/_modules/components/Stores/PaymentOption/styles.js +9 -4
- package/_modules/components/Stores/PaymentOptionMethods/index.js +9 -4
- package/_modules/components/Stores/PaymentOptionMethods/styles.js +10 -5
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +9 -4
- package/_modules/components/Stores/PaymentOptionSquare/index.js +10 -5
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +10 -5
- package/_modules/components/Stores/PaymentOptionStripeDirect/styles.js +10 -5
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +9 -4
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +9 -4
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +9 -4
- package/_modules/components/Users/UsersList/index.js +8 -2
- package/_modules/components/Users/UsersList/styles.js +15 -12
- package/_modules/index.js +6 -0
- package/package.json +3 -2
- package/src/components/BusinessIntelligence/AnalyticsProductCategories/index.js +1 -1
- package/src/components/BusinessIntelligence/Reports/index.js +18 -4
- package/src/components/BusinessIntelligence/Reports/styles.js +11 -0
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +12 -0
- package/src/components/DisabledFeatureAlert/index.js +37 -0
- package/src/components/DisabledFeatureAlert/styles.js +32 -0
- package/src/components/Loyalty/RewardsPrograms/index.js +18 -5
- package/src/components/Loyalty/RewardsPrograms/styles.js +10 -0
- package/src/components/Marketing/CampaignHeader/index.js +3 -2
- package/src/components/Marketing/CampaignHeader/styles.js +8 -0
- package/src/components/Marketing/CampaignList/index.js +5 -3
- package/src/components/Marketing/CampaignList/styles.js +16 -0
- package/src/components/Marketing/CampaignListing/index.js +18 -2
- package/src/components/Marketing/EnterprisePromotionConditions/index.js +2 -1
- package/src/components/Marketing/EnterprisePromotionList/index.js +5 -3
- package/src/components/Marketing/EnterprisePromotionList/styles.js +12 -2
- package/src/components/Marketing/EnterprisePromotionListing/index.js +17 -4
- package/src/components/Marketing/EnterprisePromotionListing/styles.js +5 -1
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +34 -497
- package/src/components/OrderingProducts/OrderingProductDetails/styles.js +38 -288
- package/src/components/OrderingProducts/OrderingProductGeneralDetails/index.js +514 -0
- package/src/components/OrderingProducts/OrderingProductGeneralDetails/styles.js +279 -0
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +14 -2
- package/src/components/OrderingProducts/OrderingProductsListing/styles.js +62 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeComponent.js +104 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeImage.js +151 -0
- package/src/components/OrderingProducts/SiteTheme/ThemeOption.js +118 -0
- package/src/components/OrderingProducts/SiteTheme/index.js +221 -0
- package/src/components/OrderingProducts/SiteTheme/styles.js +160 -0
- package/src/components/Orders/Appointments/CalendarHeader.js +74 -0
- package/src/components/Orders/Appointments/EventComponent.js +40 -0
- package/src/components/Orders/Appointments/index.js +135 -0
- package/src/components/Orders/Appointments/styles.js +192 -0
- package/src/components/Orders/CountryFilter/index.js +68 -0
- package/src/components/Orders/CountryFilter/styles.js +29 -0
- package/src/components/Orders/CurrencyFilter/index.js +68 -0
- package/src/components/Orders/CurrencyFilter/styles.js +29 -0
- package/src/components/Orders/DeliveriesLocation/index.js +60 -8
- package/src/components/Orders/DriversLocation/index.js +32 -4
- package/src/components/Orders/OrderContactInformation/index.js +3 -2
- package/src/components/Orders/OrderDetails/index.js +4 -1
- package/src/components/Orders/OrderDetailsHeader/index.js +31 -26
- package/src/components/Orders/OrderDetailsHeader/styles.js +1 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +15 -1
- package/src/components/Orders/OrdersListing/index.js +8 -1
- package/src/components/Orders/OrdersTable/index.js +297 -252
- package/src/components/Orders/OrdersTable/styles.js +33 -0
- package/src/components/Orders/index.js +5 -1
- package/src/components/Settings/SettingItemUI/index.js +2 -1
- package/src/components/Settings/SettingItemUI/styles.js +5 -0
- package/src/components/Settings/Settings/index.js +0 -11
- package/src/components/Settings/SettingsDetail/index.js +23 -4
- package/src/components/Settings/SettingsDetail/styles.js +9 -2
- package/src/components/Settings/SettingsList/index.js +30 -3
- package/src/components/Shared/ColorPicker/styles.js +1 -0
- package/src/components/Shared/ColumnAllowSettingPopover/index.js +2 -2
- package/src/components/Shared/SearchBar/index.js +3 -2
- package/src/components/SidebarMenu/index.js +29 -8
- package/src/components/SidebarMenu/styles.js +13 -0
- package/src/components/Stores/BusinessMenu/index.js +21 -3
- package/src/components/Stores/BusinessMenu/styles.js +19 -0
- package/src/components/Stores/BusinessMenuOptions/styles.js +6 -0
- package/src/components/Stores/BusinessPaymentMethods/index.js +62 -32
- package/src/components/Stores/BusinessProductList/index.js +2 -1
- package/src/components/Stores/BusinessProductsCategories/index.js +2 -2
- package/src/components/Stores/BusinessProductsListing/index.js +18 -4
- package/src/components/Stores/BusinessProductsListing/styles.js +40 -10
- package/src/components/Stores/BusinessesListing/index.js +3 -0
- package/src/components/Stores/BusinessesListingHeader/index.js +15 -3
- package/src/components/Stores/BusinessesListingHeader/styles.js +38 -0
- package/src/components/Stores/ImportersList/index.js +3 -2
- package/src/components/Stores/ImportersList/styles.js +8 -1
- package/src/components/Stores/ImportersListing/index.js +25 -1
- package/src/components/Stores/PaymentOption/index.js +9 -5
- package/src/components/Stores/PaymentOption/styles.js +8 -0
- package/src/components/Stores/PaymentOptionMethods/index.js +8 -3
- package/src/components/Stores/PaymentOptionMethods/styles.js +8 -0
- package/src/components/Stores/PaymentOptionPaypal/index.js +8 -3
- package/src/components/Stores/PaymentOptionSquare/index.js +183 -176
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +8 -3
- package/src/components/Stores/PaymentOptionStripeDirect/styles.js +8 -0
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +8 -3
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +8 -3
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +8 -3
- package/src/components/Users/UsersList/index.js +10 -1
- package/src/components/Users/UsersList/styles.js +9 -0
- package/src/index.js +2 -0
- package/template/app.js +12 -8
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/Appointments/index.js +12 -0
|
@@ -9,26 +9,20 @@ exports.OrderingProductDetails = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _utils = require("../../../utils");
|
|
12
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var _styles = require("../../../styles");
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
19
17
|
|
|
20
18
|
var _Shared = require("../../Shared");
|
|
21
19
|
|
|
22
|
-
var
|
|
20
|
+
var _OrderingProductGeneralDetails = require("../OrderingProductGeneralDetails");
|
|
23
21
|
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
22
|
+
var _SiteTheme = require("../SiteTheme");
|
|
27
23
|
|
|
28
24
|
var _styles2 = require("./styles");
|
|
29
25
|
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
26
|
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); }
|
|
33
27
|
|
|
34
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -52,36 +46,20 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
52
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
47
|
|
|
54
48
|
var OrderingProductDetailsUI = function OrderingProductDetailsUI(props) {
|
|
55
|
-
var _siteState$site,
|
|
49
|
+
var _siteState$site, _siteState$site2;
|
|
56
50
|
|
|
57
51
|
var siteState = props.siteState,
|
|
58
|
-
formState = props.formState,
|
|
59
52
|
isAddMode = props.isAddMode,
|
|
60
|
-
handleChangeInput = props.handleChangeInput,
|
|
61
|
-
handlechangeImage = props.handlechangeImage,
|
|
62
|
-
handleUpdateSite = props.handleUpdateSite,
|
|
63
|
-
handleAddSite = props.handleAddSite,
|
|
64
53
|
handleDeleteSite = props.handleDeleteSite;
|
|
65
54
|
|
|
66
55
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
67
56
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
68
57
|
t = _useLanguage2[1];
|
|
69
58
|
|
|
70
|
-
var
|
|
71
|
-
handleSubmit = _useForm.handleSubmit,
|
|
72
|
-
register = _useForm.register,
|
|
73
|
-
errors = _useForm.errors,
|
|
74
|
-
watch = _useForm.watch;
|
|
75
|
-
|
|
76
|
-
var businessUrlTemplate = watch('business_url_template', '');
|
|
77
|
-
|
|
78
|
-
var _useState = (0, _react.useState)({
|
|
79
|
-
open: false,
|
|
80
|
-
content: []
|
|
81
|
-
}),
|
|
59
|
+
var _useState = (0, _react.useState)('general'),
|
|
82
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
83
|
-
|
|
84
|
-
|
|
61
|
+
selectedTab = _useState2[0],
|
|
62
|
+
setSelectedTab = _useState2[1];
|
|
85
63
|
|
|
86
64
|
var _useState3 = (0, _react.useState)({
|
|
87
65
|
open: false,
|
|
@@ -92,95 +70,18 @@ var OrderingProductDetailsUI = function OrderingProductDetailsUI(props) {
|
|
|
92
70
|
confirm = _useState4[0],
|
|
93
71
|
setConfirm = _useState4[1];
|
|
94
72
|
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var availableBusinessUrls = [{
|
|
99
|
-
key: 0,
|
|
100
|
-
value: '/:business_slug'
|
|
101
|
-
}, {
|
|
102
|
-
key: 1,
|
|
103
|
-
value: '/store/:business_slug'
|
|
104
|
-
}, {
|
|
105
|
-
key: 2,
|
|
106
|
-
value: '/store?<any>=:business_slug'
|
|
107
|
-
}];
|
|
108
|
-
var availableProductUrls = [{
|
|
109
|
-
key: 0,
|
|
110
|
-
value: '/store/:business_slug/:category_slug/:product_slug'
|
|
73
|
+
var tabs = [{
|
|
74
|
+
key: 'general',
|
|
75
|
+
content: t('GENERAL', 'General')
|
|
111
76
|
}, {
|
|
112
|
-
key:
|
|
113
|
-
|
|
114
|
-
}, {
|
|
115
|
-
key: 2,
|
|
116
|
-
value: '/store/:business_slug?<any>=:category_id&<any>=:product_id'
|
|
117
|
-
}, {
|
|
118
|
-
key: 3,
|
|
119
|
-
value: '/:business_slug/:category_slug/:product_slug'
|
|
120
|
-
}, {
|
|
121
|
-
key: 4,
|
|
122
|
-
value: '/:business_slug?<any>=:category_id&<any>=:product_id'
|
|
77
|
+
key: 'theme',
|
|
78
|
+
content: t('THEME', 'Theme')
|
|
123
79
|
}];
|
|
124
80
|
var moreOptions = [{
|
|
125
81
|
value: 0,
|
|
126
82
|
content: t('DELETE', 'Delete')
|
|
127
83
|
}];
|
|
128
84
|
|
|
129
|
-
var handleClickImage = function handleClickImage(type) {
|
|
130
|
-
if (type === 'header') {
|
|
131
|
-
headerImageInputRef.current.click();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (type === 'logo') {
|
|
135
|
-
logoImageInputRef.current.click();
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (type === 'social_share') {
|
|
139
|
-
socialShareInputRef.current.click();
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
var handleFiles = function handleFiles(files, name) {
|
|
144
|
-
if (files.length === 1) {
|
|
145
|
-
var _files$;
|
|
146
|
-
|
|
147
|
-
var type = files[0].type.split('/')[0];
|
|
148
|
-
|
|
149
|
-
if (type !== 'image') {
|
|
150
|
-
setAlertState({
|
|
151
|
-
open: true,
|
|
152
|
-
content: [t('ERROR_ONLY_IMAGES', 'Only images can be accepted')]
|
|
153
|
-
});
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if ((0, _utils.bytesConverter)((_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size) > 2048) {
|
|
158
|
-
setAlertState({
|
|
159
|
-
open: true,
|
|
160
|
-
content: [t('IMAGE_MAXIMUM_SIZE', 'The maximum image size is 2 megabytes')]
|
|
161
|
-
});
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
handlechangeImage(files[0], name);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
var onSubmit = function onSubmit() {
|
|
170
|
-
if (isAddMode) {
|
|
171
|
-
handleAddSite && handleAddSite();
|
|
172
|
-
} else {
|
|
173
|
-
handleUpdateSite && handleUpdateSite();
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
var closeAlert = function closeAlert() {
|
|
178
|
-
setAlertState({
|
|
179
|
-
open: false,
|
|
180
|
-
content: []
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
|
|
184
85
|
var onClickDelete = function onClickDelete() {
|
|
185
86
|
setConfirm({
|
|
186
87
|
open: true,
|
|
@@ -194,325 +95,22 @@ var OrderingProductDetailsUI = function OrderingProductDetailsUI(props) {
|
|
|
194
95
|
});
|
|
195
96
|
};
|
|
196
97
|
|
|
197
|
-
|
|
198
|
-
if (businessUrlTemplate.includes('?')) {
|
|
199
|
-
var urls = businessUrlTemplate.split('?');
|
|
200
|
-
|
|
201
|
-
if (value.indexOf(urls[0]) === 0 && value.includes(urls[1])) {
|
|
202
|
-
return true;
|
|
203
|
-
} else {
|
|
204
|
-
return t('VALIDATE_PRODUCT_TEMPLATE_URL', 'The product url template do not match with business url template');
|
|
205
|
-
}
|
|
206
|
-
} else {
|
|
207
|
-
if (value.indexOf(businessUrlTemplate) === 0) {
|
|
208
|
-
return true;
|
|
209
|
-
} else {
|
|
210
|
-
return t('VALIDATE_PRODUCT_TEMPLATE_URL', 'The product url template do not match with business url template');
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
(0, _react.useEffect)(function () {
|
|
216
|
-
if (!formState.error) return;
|
|
217
|
-
setAlertState({
|
|
218
|
-
open: true,
|
|
219
|
-
content: formState.error
|
|
220
|
-
});
|
|
221
|
-
}, [formState.error]);
|
|
222
|
-
(0, _react.useEffect)(function () {
|
|
223
|
-
if (Object.keys(errors).length > 0) {
|
|
224
|
-
setAlertState({
|
|
225
|
-
open: true,
|
|
226
|
-
content: Object.values(errors).map(function (error) {
|
|
227
|
-
return error.message;
|
|
228
|
-
})
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
}, [errors]);
|
|
232
|
-
return /*#__PURE__*/_react.default.createElement(_styles2.DetailContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.DetailHeaderContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.TitleWrapper, null, /*#__PURE__*/_react.default.createElement("h2", null, (_siteState$site = siteState.site) === null || _siteState$site === void 0 ? void 0 : _siteState$site.name)), !isAddMode && /*#__PURE__*/_react.default.createElement(_styles2.ActionSelectorWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.DefaultSelect, {
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.Container, null, /*#__PURE__*/_react.default.createElement(_styles2.DetailHeaderContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.TitleWrapper, null, /*#__PURE__*/_react.default.createElement("h2", null, (_siteState$site = siteState.site) === null || _siteState$site === void 0 ? void 0 : _siteState$site.name)), !isAddMode && /*#__PURE__*/_react.default.createElement(_styles2.ActionSelectorWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.DefaultSelect, {
|
|
233
99
|
placeholder: /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ThreeDots, null),
|
|
234
100
|
options: moreOptions,
|
|
235
101
|
onChange: function onChange() {
|
|
236
102
|
return onClickDelete();
|
|
237
103
|
}
|
|
238
|
-
}))), !isAddMode && /*#__PURE__*/_react.default.createElement(_styles2.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
}, t('CONTACT_US', 'Contact us'))), /*#__PURE__*/_react.default.createElement(_styles2.FormContainer, {
|
|
246
|
-
onSubmit: handleSubmit(onSubmit)
|
|
247
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.BusinessImg, {
|
|
248
|
-
onClick: function onClick() {
|
|
249
|
-
return handleClickImage('header');
|
|
250
|
-
}
|
|
251
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.ExamineClick, {
|
|
252
|
-
onFiles: function onFiles(files) {
|
|
253
|
-
return handleFiles(files, 'header');
|
|
254
|
-
},
|
|
255
|
-
childRef: function childRef(e) {
|
|
256
|
-
headerImageInputRef.current = e;
|
|
257
|
-
},
|
|
258
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
259
|
-
disabled: formState.loading
|
|
260
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.DragAndDrop, {
|
|
261
|
-
onDrop: function onDrop(dataTransfer) {
|
|
262
|
-
return handleFiles(dataTransfer.files, 'header');
|
|
263
|
-
},
|
|
264
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
265
|
-
disabled: formState.loading
|
|
266
|
-
}, formState.loading ? /*#__PURE__*/_react.default.createElement(_styles2.SkeletonWrapper, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, null)) : !((_formState$changes = formState.changes) !== null && _formState$changes !== void 0 && _formState$changes.header) || formState.error ? ((_siteState$site2 = siteState.site) === null || _siteState$site2 === void 0 ? void 0 : _siteState$site2.header) && /*#__PURE__*/_react.default.createElement("img", {
|
|
267
|
-
src: (_siteState$site3 = siteState.site) === null || _siteState$site3 === void 0 ? void 0 : _siteState$site3.header,
|
|
268
|
-
alt: "header image",
|
|
269
|
-
loading: "lazy"
|
|
270
|
-
}) : (formState === null || formState === void 0 ? void 0 : (_formState$changes2 = formState.changes) === null || _formState$changes2 === void 0 ? void 0 : _formState$changes2.header) && /*#__PURE__*/_react.default.createElement("img", {
|
|
271
|
-
src: formState === null || formState === void 0 ? void 0 : (_formState$changes3 = formState.changes) === null || _formState$changes3 === void 0 ? void 0 : _formState$changes3.header,
|
|
272
|
-
alt: "header image",
|
|
273
|
-
loading: "lazy"
|
|
274
|
-
}), /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIconContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIcon, null, /*#__PURE__*/_react.default.createElement(_BsCardImage.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('DRAG_AND_DROP', 'Drag and drop'))))))), /*#__PURE__*/_react.default.createElement(_styles2.LogoImage, {
|
|
275
|
-
onClick: function onClick() {
|
|
276
|
-
return handleClickImage('logo');
|
|
277
|
-
}
|
|
278
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.ExamineClick, {
|
|
279
|
-
onFiles: function onFiles(files) {
|
|
280
|
-
return handleFiles(files, 'logo');
|
|
281
|
-
},
|
|
282
|
-
childRef: function childRef(e) {
|
|
283
|
-
logoImageInputRef.current = e;
|
|
284
|
-
},
|
|
285
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
286
|
-
disabled: formState.loading
|
|
287
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.DragAndDrop, {
|
|
288
|
-
onDrop: function onDrop(dataTransfer) {
|
|
289
|
-
return handleFiles(dataTransfer.files, 'logo');
|
|
290
|
-
},
|
|
291
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
292
|
-
disabled: formState.loading
|
|
293
|
-
}, formState.loading ? /*#__PURE__*/_react.default.createElement(_styles2.SkeletonWrapper, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, null)) : !((_formState$changes4 = formState.changes) !== null && _formState$changes4 !== void 0 && _formState$changes4.logo) || formState.error ? ((_siteState$site4 = siteState.site) === null || _siteState$site4 === void 0 ? void 0 : _siteState$site4.logo) && /*#__PURE__*/_react.default.createElement("img", {
|
|
294
|
-
src: (_siteState$site5 = siteState.site) === null || _siteState$site5 === void 0 ? void 0 : _siteState$site5.logo,
|
|
295
|
-
alt: "logo image",
|
|
296
|
-
loading: "lazy"
|
|
297
|
-
}) : (formState === null || formState === void 0 ? void 0 : (_formState$changes5 = formState.changes) === null || _formState$changes5 === void 0 ? void 0 : _formState$changes5.logo) && /*#__PURE__*/_react.default.createElement("img", {
|
|
298
|
-
src: formState === null || formState === void 0 ? void 0 : (_formState$changes6 = formState.changes) === null || _formState$changes6 === void 0 ? void 0 : _formState$changes6.logo,
|
|
299
|
-
alt: "logo image",
|
|
300
|
-
loading: "lazy"
|
|
301
|
-
}), /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIconContainer, {
|
|
302
|
-
small: true
|
|
303
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIcon, {
|
|
304
|
-
small: true
|
|
305
|
-
}, /*#__PURE__*/_react.default.createElement(_BsCardImage.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('DRAG_AND_DROP', 'Drag and drop'))))))), /*#__PURE__*/_react.default.createElement(_styles2.FormGroup, {
|
|
306
|
-
className: "row"
|
|
307
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
308
|
-
className: "col-md-12"
|
|
309
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('NAME', 'Name')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
310
|
-
type: "text",
|
|
311
|
-
name: "name",
|
|
312
|
-
placeholder: t('NAME', 'Name'),
|
|
313
|
-
value: (_ref = (_formState$changes$na = formState === null || formState === void 0 ? void 0 : (_formState$changes7 = formState.changes) === null || _formState$changes7 === void 0 ? void 0 : _formState$changes7.name) !== null && _formState$changes$na !== void 0 ? _formState$changes$na : (_siteState$site6 = siteState.site) === null || _siteState$site6 === void 0 ? void 0 : _siteState$site6.name) !== null && _ref !== void 0 ? _ref : '',
|
|
314
|
-
onChange: function onChange(e) {
|
|
315
|
-
return handleChangeInput(e);
|
|
316
|
-
},
|
|
317
|
-
ref: register({
|
|
318
|
-
required: t('VALIDATION_ERROR_REQUIRED', 'The name field is required.').replace('_attribute_', t('NAME', 'Name'))
|
|
319
|
-
})
|
|
320
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
321
|
-
className: "col-md-12"
|
|
322
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('CODE', 'Code')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
323
|
-
type: "text",
|
|
324
|
-
name: "code",
|
|
325
|
-
placeholder: t('CODE', 'Code'),
|
|
326
|
-
value: (_ref2 = (_formState$changes$co = formState === null || formState === void 0 ? void 0 : (_formState$changes8 = formState.changes) === null || _formState$changes8 === void 0 ? void 0 : _formState$changes8.code) !== null && _formState$changes$co !== void 0 ? _formState$changes$co : (_siteState$site7 = siteState.site) === null || _siteState$site7 === void 0 ? void 0 : _siteState$site7.code) !== null && _ref2 !== void 0 ? _ref2 : '',
|
|
327
|
-
onChange: function onChange(e) {
|
|
328
|
-
return handleChangeInput(e);
|
|
329
|
-
},
|
|
330
|
-
ref: register({
|
|
331
|
-
required: t('VALIDATION_ERROR_REQUIRED', 'The name code is required.').replace('_attribute_', t('CODE', 'Code'))
|
|
332
|
-
})
|
|
333
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
334
|
-
className: "col-md-12"
|
|
335
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('URL', 'URL')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
336
|
-
type: "text",
|
|
337
|
-
name: "url",
|
|
338
|
-
placeholder: t('URL', 'Url'),
|
|
339
|
-
value: (_ref3 = (_formState$changes$ur = formState === null || formState === void 0 ? void 0 : (_formState$changes9 = formState.changes) === null || _formState$changes9 === void 0 ? void 0 : _formState$changes9.url) !== null && _formState$changes$ur !== void 0 ? _formState$changes$ur : (_siteState$site8 = siteState.site) === null || _siteState$site8 === void 0 ? void 0 : _siteState$site8.url) !== null && _ref3 !== void 0 ? _ref3 : '',
|
|
340
|
-
onChange: function onChange(e) {
|
|
341
|
-
return handleChangeInput(e);
|
|
342
|
-
},
|
|
343
|
-
ref: register({
|
|
344
|
-
pattern: {
|
|
345
|
-
value: /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
|
|
346
|
-
message: t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('URL', 'Url'))
|
|
104
|
+
}))), !isAddMode && /*#__PURE__*/_react.default.createElement(_styles2.Tabs, null, tabs.map(function (tab) {
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_styles2.Tab, {
|
|
106
|
+
key: tab.key,
|
|
107
|
+
active: selectedTab === tab.key,
|
|
108
|
+
onClick: function onClick() {
|
|
109
|
+
return setSelectedTab(tab.key);
|
|
347
110
|
}
|
|
348
|
-
})
|
|
349
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
350
|
-
|
|
351
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('SOCIAL_SHARE', 'Social share')), /*#__PURE__*/_react.default.createElement(_styles2.SocialShareImage, {
|
|
352
|
-
onClick: function onClick() {
|
|
353
|
-
return handleClickImage('social_share');
|
|
354
|
-
}
|
|
355
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.ExamineClick, {
|
|
356
|
-
onFiles: function onFiles(files) {
|
|
357
|
-
return handleFiles(files, 'social_share');
|
|
358
|
-
},
|
|
359
|
-
childRef: function childRef(e) {
|
|
360
|
-
socialShareInputRef.current = e;
|
|
361
|
-
},
|
|
362
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
363
|
-
disabled: formState.loading
|
|
364
|
-
}, /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.DragAndDrop, {
|
|
365
|
-
onDrop: function onDrop(dataTransfer) {
|
|
366
|
-
return handleFiles(dataTransfer.files, 'social_share');
|
|
367
|
-
},
|
|
368
|
-
accept: "image/png, image/jpeg, image/jpg",
|
|
369
|
-
disabled: formState.loading
|
|
370
|
-
}, formState.loading ? /*#__PURE__*/_react.default.createElement(_styles2.SkeletonWrapper, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, null)) : !((_formState$changes10 = formState.changes) !== null && _formState$changes10 !== void 0 && _formState$changes10.social_share) || formState.error ? ((_siteState$site9 = siteState.site) === null || _siteState$site9 === void 0 ? void 0 : _siteState$site9.social_share) && /*#__PURE__*/_react.default.createElement("img", {
|
|
371
|
-
src: (_siteState$site10 = siteState.site) === null || _siteState$site10 === void 0 ? void 0 : _siteState$site10.social_share,
|
|
372
|
-
alt: "social share image",
|
|
373
|
-
loading: "lazy"
|
|
374
|
-
}) : (formState === null || formState === void 0 ? void 0 : (_formState$changes11 = formState.changes) === null || _formState$changes11 === void 0 ? void 0 : _formState$changes11.social_share) && /*#__PURE__*/_react.default.createElement("img", {
|
|
375
|
-
src: formState === null || formState === void 0 ? void 0 : (_formState$changes12 = formState.changes) === null || _formState$changes12 === void 0 ? void 0 : _formState$changes12.social_share,
|
|
376
|
-
alt: "social share image",
|
|
377
|
-
loading: "lazy"
|
|
378
|
-
}), /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIconContainer, {
|
|
379
|
-
small: true
|
|
380
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.UploadImageIcon, {
|
|
381
|
-
small: true
|
|
382
|
-
}, /*#__PURE__*/_react.default.createElement(_BsCardImage.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('DRAG_AND_DROP', 'Drag and drop')))))))), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
383
|
-
className: "col-md-12"
|
|
384
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('RESET_PASSWORD_URL_TEMPLATE', 'Reset password url template')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
385
|
-
type: "text",
|
|
386
|
-
name: "reset_password_url_template",
|
|
387
|
-
placeholder: t('URL', 'Url'),
|
|
388
|
-
defaultValue: (_ref4 = (_formState$changes$re = formState === null || formState === void 0 ? void 0 : (_formState$changes13 = formState.changes) === null || _formState$changes13 === void 0 ? void 0 : _formState$changes13.reset_password_url_template) !== null && _formState$changes$re !== void 0 ? _formState$changes$re : (_siteState$site11 = siteState.site) === null || _siteState$site11 === void 0 ? void 0 : _siteState$site11.reset_password_url_template) !== null && _ref4 !== void 0 ? _ref4 : '',
|
|
389
|
-
onChange: function onChange(e) {
|
|
390
|
-
return handleChangeInput(e);
|
|
391
|
-
}
|
|
392
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
393
|
-
className: "col-md-12"
|
|
394
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('TRACK_ORDER_URL_TEMPLATE', 'Track order url template')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
395
|
-
type: "text",
|
|
396
|
-
placeholder: t('URL', 'Url'),
|
|
397
|
-
name: "track_order_url_template",
|
|
398
|
-
defaultValue: (_ref5 = (_formState$changes$tr = formState === null || formState === void 0 ? void 0 : (_formState$changes14 = formState.changes) === null || _formState$changes14 === void 0 ? void 0 : _formState$changes14.track_order_url_template) !== null && _formState$changes$tr !== void 0 ? _formState$changes$tr : (_siteState$site12 = siteState.site) === null || _siteState$site12 === void 0 ? void 0 : _siteState$site12.track_order_url_template) !== null && _ref5 !== void 0 ? _ref5 : '',
|
|
399
|
-
onChange: function onChange(e) {
|
|
400
|
-
return handleChangeInput(e);
|
|
401
|
-
}
|
|
402
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
403
|
-
className: "col-md-12"
|
|
404
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('DESCRIPTION', 'Description')), /*#__PURE__*/_react.default.createElement(_styles.TextArea, {
|
|
405
|
-
name: "description",
|
|
406
|
-
rows: 5,
|
|
407
|
-
placeholder: t('SHORT_PROMOTION_ABOUT', 'Write a little description'),
|
|
408
|
-
defaultValue: (_ref6 = (_formState$changes$de = formState === null || formState === void 0 ? void 0 : (_formState$changes15 = formState.changes) === null || _formState$changes15 === void 0 ? void 0 : _formState$changes15.description) !== null && _formState$changes$de !== void 0 ? _formState$changes$de : (_siteState$site13 = siteState.site) === null || _siteState$site13 === void 0 ? void 0 : _siteState$site13.description) !== null && _ref6 !== void 0 ? _ref6 : '',
|
|
409
|
-
onChange: function onChange(e) {
|
|
410
|
-
return handleChangeInput(e);
|
|
411
|
-
}
|
|
412
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
413
|
-
className: "col-md-12"
|
|
414
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('CHECKOUT_URL_TEMPLATE', 'Checkout url template')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
415
|
-
type: "text",
|
|
416
|
-
placeholder: t('URL', 'Url'),
|
|
417
|
-
name: "checkout_url_template",
|
|
418
|
-
defaultValue: (_ref7 = (_formState$changes$ch = formState === null || formState === void 0 ? void 0 : (_formState$changes16 = formState.changes) === null || _formState$changes16 === void 0 ? void 0 : _formState$changes16.checkout_url_template) !== null && _formState$changes$ch !== void 0 ? _formState$changes$ch : (_siteState$site14 = siteState.site) === null || _siteState$site14 === void 0 ? void 0 : _siteState$site14.checkout_url_template) !== null && _ref7 !== void 0 ? _ref7 : '',
|
|
419
|
-
onChange: function onChange(e) {
|
|
420
|
-
return handleChangeInput(e);
|
|
421
|
-
}
|
|
422
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
423
|
-
className: "col-md-12"
|
|
424
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('CART_URL_TEMPLATE', 'Cart url template')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
425
|
-
type: "text",
|
|
426
|
-
placeholder: t('URL', 'Url'),
|
|
427
|
-
name: "cart_url_template",
|
|
428
|
-
defaultValue: (_ref8 = (_formState$changes$ca = formState === null || formState === void 0 ? void 0 : (_formState$changes17 = formState.changes) === null || _formState$changes17 === void 0 ? void 0 : _formState$changes17.cart_url_template) !== null && _formState$changes$ca !== void 0 ? _formState$changes$ca : (_siteState$site15 = siteState.site) === null || _siteState$site15 === void 0 ? void 0 : _siteState$site15.cart_url_template) !== null && _ref8 !== void 0 ? _ref8 : '',
|
|
429
|
-
onChange: function onChange(e) {
|
|
430
|
-
return handleChangeInput(e);
|
|
431
|
-
}
|
|
432
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
433
|
-
className: "col-md-12"
|
|
434
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.LabelHeader, null, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('BUSINESS_URL_TEMPLATE', 'Business url template')), /*#__PURE__*/_react.default.createElement(_styles2.InfoWrapper, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.InfoCircle, null), /*#__PURE__*/_react.default.createElement(_styles2.InfoContent, null, /*#__PURE__*/_react.default.createElement(_styles2.InfoTitle, null, t('AVAILABLE_FORMATS', 'Available Formats')), availableBusinessUrls.map(function (url) {
|
|
435
|
-
return /*#__PURE__*/_react.default.createElement(_styles2.Info, {
|
|
436
|
-
key: url.key
|
|
437
|
-
}, url.value);
|
|
438
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
439
|
-
type: "text",
|
|
440
|
-
placeholder: t('URL', 'Url'),
|
|
441
|
-
name: "business_url_template",
|
|
442
|
-
defaultValue: (_ref9 = (_formState$changes$bu = formState === null || formState === void 0 ? void 0 : (_formState$changes18 = formState.changes) === null || _formState$changes18 === void 0 ? void 0 : _formState$changes18.business_url_template) !== null && _formState$changes$bu !== void 0 ? _formState$changes$bu : (_siteState$site16 = siteState.site) === null || _siteState$site16 === void 0 ? void 0 : _siteState$site16.business_url_template) !== null && _ref9 !== void 0 ? _ref9 : '',
|
|
443
|
-
onChange: function onChange(e) {
|
|
444
|
-
return handleChangeInput(e);
|
|
445
|
-
},
|
|
446
|
-
ref: register({
|
|
447
|
-
pattern: {
|
|
448
|
-
value: /(^\/)(store)?((\/?:business_slug$)|(\/?\?[a-zA-Z]+=:business_slug$))$/g,
|
|
449
|
-
message: t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('BUSINESS_URL_TEMPLATE', 'Business url template'))
|
|
450
|
-
}
|
|
451
|
-
})
|
|
452
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
453
|
-
className: "col-md-12"
|
|
454
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.LabelHeader, null, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('CATEGORY_URL_TEMPLATE', 'Category url template')), /*#__PURE__*/_react.default.createElement(_styles2.InfoWrapper, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.InfoCircle, null), /*#__PURE__*/_react.default.createElement(_styles2.InfoContent, null, /*#__PURE__*/_react.default.createElement(_styles2.InfoTitle, null, t('AVAILABLE_FORMATS', 'Available Formats')), /*#__PURE__*/_react.default.createElement(_styles2.Info, null, "store/:business_slug/:category_slug"), /*#__PURE__*/_react.default.createElement(_styles2.Info, null, "store/:category_slug?", '<any>', "=:business_slug"), /*#__PURE__*/_react.default.createElement(_styles2.Info, null, ":business_slug/:category_slug"), /*#__PURE__*/_react.default.createElement(_styles2.Info, null, ":category_slug?", '<any>', "=:business_slug")))), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
455
|
-
type: "text",
|
|
456
|
-
placeholder: t('URL', 'Url'),
|
|
457
|
-
name: "category_url_template",
|
|
458
|
-
defaultValue: (_ref10 = (_formState$changes$ca2 = formState === null || formState === void 0 ? void 0 : (_formState$changes19 = formState.changes) === null || _formState$changes19 === void 0 ? void 0 : _formState$changes19.category_url_template) !== null && _formState$changes$ca2 !== void 0 ? _formState$changes$ca2 : (_siteState$site17 = siteState.site) === null || _siteState$site17 === void 0 ? void 0 : _siteState$site17.category_url_template) !== null && _ref10 !== void 0 ? _ref10 : '',
|
|
459
|
-
onChange: function onChange(e) {
|
|
460
|
-
return handleChangeInput(e);
|
|
461
|
-
},
|
|
462
|
-
ref: register({
|
|
463
|
-
pattern: {
|
|
464
|
-
value: /(store\/)?((:business_slug\/:category_slug$)|(:category_slug\?[a-zA-Z]+=:business_slug$))$/g,
|
|
465
|
-
message: t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('CATEGORY_URL_TEMPLATE', 'Category url template'))
|
|
466
|
-
}
|
|
467
|
-
})
|
|
468
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
469
|
-
className: "col-md-12"
|
|
470
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.LabelHeader, null, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('PRODUCT_URL_TEMPLATE', 'Product url template')), /*#__PURE__*/_react.default.createElement(_styles2.InfoWrapper, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.InfoCircle, null), /*#__PURE__*/_react.default.createElement(_styles2.InfoContent, null, /*#__PURE__*/_react.default.createElement(_styles2.InfoTitle, null, t('AVAILABLE_FORMATS', 'Available Formats')), availableProductUrls.map(function (url) {
|
|
471
|
-
return /*#__PURE__*/_react.default.createElement(_styles2.Info, {
|
|
472
|
-
key: url.key
|
|
473
|
-
}, url.value);
|
|
474
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
475
|
-
type: "text",
|
|
476
|
-
placeholder: t('URL', 'Url'),
|
|
477
|
-
name: "product_url_template",
|
|
478
|
-
defaultValue: (_ref11 = (_formState$changes$pr = formState === null || formState === void 0 ? void 0 : (_formState$changes20 = formState.changes) === null || _formState$changes20 === void 0 ? void 0 : _formState$changes20.product_url_template) !== null && _formState$changes$pr !== void 0 ? _formState$changes$pr : (_siteState$site18 = siteState.site) === null || _siteState$site18 === void 0 ? void 0 : _siteState$site18.product_url_template) !== null && _ref11 !== void 0 ? _ref11 : '',
|
|
479
|
-
onChange: function onChange(e) {
|
|
480
|
-
return handleChangeInput(e);
|
|
481
|
-
},
|
|
482
|
-
ref: register({
|
|
483
|
-
pattern: {
|
|
484
|
-
value: /(^\/)(store\/)?((:business_slug\/:category_slug\/:product_slug$)|(:category_slug\/:product_slug\?[a-zA-Z]+=:business_slug$)|(:business_slug\?[a-zA-Z]+=:category_id&[a-zA-Z]+=:product_id$))$/g,
|
|
485
|
-
message: t('VALIDATION_ERROR_ACTIVE_URL', 'The _attribute_ is not a valid URL.').replace('_attribute_', t('PRODUCT_URL_TEMPLATE', 'Product url template'))
|
|
486
|
-
},
|
|
487
|
-
validate: handleValidateProductUrl
|
|
488
|
-
})
|
|
489
|
-
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, {
|
|
490
|
-
className: "col-md-12"
|
|
491
|
-
}, /*#__PURE__*/_react.default.createElement(_styles2.Label, null, t('PROFILE_URL_TEMPLATE', 'Profile url template')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
492
|
-
type: "text",
|
|
493
|
-
placeholder: t('URL', 'Url'),
|
|
494
|
-
name: "profile_url_template",
|
|
495
|
-
value: (_ref12 = (_formState$changes$pr2 = formState === null || formState === void 0 ? void 0 : (_formState$changes21 = formState.changes) === null || _formState$changes21 === void 0 ? void 0 : _formState$changes21.profile_url_template) !== null && _formState$changes$pr2 !== void 0 ? _formState$changes$pr2 : (_siteState$site19 = siteState.site) === null || _siteState$site19 === void 0 ? void 0 : _siteState$site19.profile_url_template) !== null && _ref12 !== void 0 ? _ref12 : '',
|
|
496
|
-
onChange: function onChange(e) {
|
|
497
|
-
return handleChangeInput(e);
|
|
498
|
-
}
|
|
499
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles2.SaveBtnWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
500
|
-
borderRadius: "7.6px",
|
|
501
|
-
color: "primary",
|
|
502
|
-
type: "submit",
|
|
503
|
-
disabled: formState.loading || Object.keys(formState.changes).length === 0
|
|
504
|
-
}, t('SAVE', 'Save')))), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
|
|
505
|
-
title: t('ORDERING_PRODUCTS', 'Ordering products'),
|
|
506
|
-
content: alertState.content,
|
|
507
|
-
acceptText: t('ACCEPT', 'Accept'),
|
|
508
|
-
open: alertState.open,
|
|
509
|
-
onClose: function onClose() {
|
|
510
|
-
return closeAlert();
|
|
511
|
-
},
|
|
512
|
-
onAccept: function onAccept() {
|
|
513
|
-
return closeAlert();
|
|
514
|
-
},
|
|
515
|
-
closeOnBackdrop: false
|
|
111
|
+
}, tab.content);
|
|
112
|
+
})), selectedTab === 'general' && /*#__PURE__*/_react.default.createElement(_OrderingProductGeneralDetails.OrderingProductGeneralDetails, props), selectedTab === 'theme' && /*#__PURE__*/_react.default.createElement(_SiteTheme.SiteTheme, {
|
|
113
|
+
siteId: (_siteState$site2 = siteState.site) === null || _siteState$site2 === void 0 ? void 0 : _siteState$site2.id
|
|
516
114
|
}), /*#__PURE__*/_react.default.createElement(_Shared.Confirm, {
|
|
517
115
|
width: "700px",
|
|
518
116
|
title: t('WEB_APPNAME', 'Ordering'),
|