ordering-ui-admin-external 1.21.1 → 1.22.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/{ordering-ui-admin.54438e43781a1b813286.js → ordering-ui-admin.825f0823f4b81b92e41b.js} +2 -2
- package/_modules/components/Delivery/DriversGroupLogs/index.js +3 -3
- package/_modules/components/Delivery/DriversLogs/index.js +13 -0
- package/_modules/components/Delivery/UserDetails/index.js +9 -4
- package/_modules/components/Delivery/UserDetailsMenu/index.js +3 -0
- package/_modules/components/MyProducts/AdvancedSettings/OrderType.js +2 -2
- package/_modules/components/MyProducts/AdvancedSettings/index.js +14 -18
- package/_modules/components/Orders/OrdersListing/index.js +4 -2
- package/_modules/components/Orders/OrdersTable/index.js +8 -4
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -2
- package/_modules/components/Stores/BusinessDetails/index.js +4 -0
- package/_modules/components/Stores/BusinessQRCodeOption/index.js +168 -0
- package/_modules/components/Stores/BusinessQRCodeOption/styles.js +39 -0
- package/_modules/components/Stores/BusinessQRCodeOptions/index.js +111 -0
- package/_modules/components/Stores/BusinessQRCodeOptions/styles.js +48 -0
- package/_modules/components/Stores/BusinessSummary/index.js +1 -1
- package/_modules/components/Stores/index.js +14 -0
- package/_modules/utils/index.js +24 -2
- package/package.json +3 -2
- package/src/components/Delivery/DriversGroupLogs/index.js +2 -4
- package/src/components/Delivery/DriversLogs/index.js +8 -0
- package/src/components/Delivery/UserDetails/index.js +8 -0
- package/src/components/Delivery/UserDetailsMenu/index.js +2 -1
- package/src/components/MyProducts/AdvancedSettings/OrderType.js +2 -2
- package/src/components/MyProducts/AdvancedSettings/index.js +14 -15
- package/src/components/Orders/OrdersListing/index.js +3 -1
- package/src/components/Orders/OrdersTable/index.js +8 -4
- package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +3 -2
- package/src/components/Stores/BusinessDetails/index.js +7 -0
- package/src/components/Stores/BusinessQRCodeOption/index.js +178 -0
- package/src/components/Stores/BusinessQRCodeOption/styles.js +113 -0
- package/src/components/Stores/BusinessQRCodeOptions/index.js +112 -0
- package/src/components/Stores/BusinessQRCodeOptions/styles.js +63 -0
- package/src/components/Stores/BusinessSummary/index.js +1 -1
- package/src/components/Stores/index.js +4 -0
- package/src/utils/index.js +16 -0
- /package/_bundles/{ordering-ui-admin.54438e43781a1b813286.js.LICENSE.txt → ordering-ui-admin.825f0823f4b81b92e41b.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.BusinessQRCodeOptions = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _styledComponents = require("styled-components");
|
|
10
|
+
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
11
|
+
var _BsChevronRight = _interopRequireDefault(require("@meronex/icons/bs/BsChevronRight"));
|
|
12
|
+
var _Shared = require("../../Shared");
|
|
13
|
+
var _useWindowSize2 = require("../../../hooks/useWindowSize");
|
|
14
|
+
var _BusinessQRCodeOption = require("../BusinessQRCodeOption");
|
|
15
|
+
var _styles = require("./styles");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
29
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
|
+
var BusinessQRCodeOptionsUI = function BusinessQRCodeOptionsUI(props) {
|
|
31
|
+
var setIsExtendExtraOpen = props.setIsExtendExtraOpen,
|
|
32
|
+
siteState = props.siteState;
|
|
33
|
+
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
34
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
35
|
+
t = _useLanguage2[1];
|
|
36
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
37
|
+
var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
|
|
38
|
+
width = _useWindowSize.width;
|
|
39
|
+
var _useState = (0, _react.useState)(false),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
isOpen = _useState2[0],
|
|
42
|
+
setIsOpen = _useState2[1];
|
|
43
|
+
var _useState3 = (0, _react.useState)(null),
|
|
44
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
+
itemSelected = _useState4[0],
|
|
46
|
+
setItemSelected = _useState4[1];
|
|
47
|
+
var publishingItems = [{
|
|
48
|
+
key: 'pick_up',
|
|
49
|
+
value: 2,
|
|
50
|
+
title: t('QR_CODE_FOR_PICKUP', 'QR Code for Pickup')
|
|
51
|
+
}, {
|
|
52
|
+
key: 'eat_in',
|
|
53
|
+
value: 3,
|
|
54
|
+
title: t('QR_CODE_FOR_EATIN', 'QR Code for Eat in')
|
|
55
|
+
}, {
|
|
56
|
+
key: 'curbside',
|
|
57
|
+
value: 4,
|
|
58
|
+
title: t('QR_CODE_FOR_CURBSIDE', 'QR Code for Curbside')
|
|
59
|
+
}, {
|
|
60
|
+
key: 'driver_thru',
|
|
61
|
+
value: 5,
|
|
62
|
+
title: t('QR_CODE_FOR_DRIVE_THRU', 'QR Code for Drive Thru')
|
|
63
|
+
}];
|
|
64
|
+
var handleAction = function handleAction(value) {
|
|
65
|
+
var item = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
66
|
+
setItemSelected(item);
|
|
67
|
+
setIsExtendExtraOpen(value);
|
|
68
|
+
setIsOpen(value);
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_styles.MainContainer, null, /*#__PURE__*/_react.default.createElement(_styles.PublishingContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('PUBLISHING', 'Publishing')), /*#__PURE__*/_react.default.createElement(_styles.PublishingListWrapper, null, publishingItems.map(function (item, i) {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_styles.PublishingOptionContainer, {
|
|
72
|
+
key: i,
|
|
73
|
+
onClick: function onClick() {
|
|
74
|
+
return handleAction(true, item);
|
|
75
|
+
},
|
|
76
|
+
active: item.key === (itemSelected === null || itemSelected === void 0 ? void 0 : itemSelected.key)
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.PublishingOption, null, /*#__PURE__*/_react.default.createElement(_styles.PublishingName, null, item === null || item === void 0 ? void 0 : item.title)), /*#__PURE__*/_react.default.createElement(_BsChevronRight.default, {
|
|
78
|
+
style: {
|
|
79
|
+
color: theme.colors.lightGray
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}))), width >= 1000 ? isOpen && /*#__PURE__*/_react.default.createElement(_BusinessQRCodeOption.BusinessQRCodeOption, {
|
|
83
|
+
business: props.business,
|
|
84
|
+
open: isOpen,
|
|
85
|
+
item: itemSelected,
|
|
86
|
+
onClose: function onClose() {
|
|
87
|
+
return handleAction(false);
|
|
88
|
+
}
|
|
89
|
+
}) : isOpen && /*#__PURE__*/_react.default.createElement(_Shared.Modal, {
|
|
90
|
+
width: "80%",
|
|
91
|
+
open: isOpen,
|
|
92
|
+
onClose: function onClose() {
|
|
93
|
+
return handleAction(false);
|
|
94
|
+
}
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_BusinessQRCodeOption.BusinessQRCodeOption, {
|
|
96
|
+
business: props.business,
|
|
97
|
+
siteState: siteState,
|
|
98
|
+
open: isOpen,
|
|
99
|
+
item: itemSelected,
|
|
100
|
+
onClose: function onClose() {
|
|
101
|
+
return handleAction(false);
|
|
102
|
+
}
|
|
103
|
+
})));
|
|
104
|
+
};
|
|
105
|
+
var BusinessQRCodeOptions = function BusinessQRCodeOptions(props) {
|
|
106
|
+
var businessQRcodeOptionsProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
107
|
+
UIComponent: BusinessQRCodeOptionsUI
|
|
108
|
+
});
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.BusinessQRCodeOptions, businessQRcodeOptionsProps);
|
|
110
|
+
};
|
|
111
|
+
exports.BusinessQRCodeOptions = BusinessQRCodeOptions;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PublishingOptionContainer = exports.PublishingOption = exports.PublishingName = exports.PublishingListWrapper = exports.PublishingContainer = exports.MainContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n height: 100%;\n"])));
|
|
14
|
+
exports.MainContainer = MainContainer;
|
|
15
|
+
var PublishingContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 100%;\n overflow-x: hidden;\n flex: 1;\n h1 {\n color: ", ";\n font-size: 20px;\n font-weight: 700;\n }\n @media (min-width: 576px) {\n padding: 20px;\n }\n"])), function (props) {
|
|
16
|
+
return props.theme.colors.headingColor;
|
|
17
|
+
});
|
|
18
|
+
exports.PublishingContainer = PublishingContainer;
|
|
19
|
+
var PublishingListWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-top: 1px solid ", ";\n margin: 20px 0;\n"])), function (props) {
|
|
20
|
+
return props.theme.colors.borderColor;
|
|
21
|
+
});
|
|
22
|
+
exports.PublishingListWrapper = PublishingListWrapper;
|
|
23
|
+
var PublishingOptionContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid ", ";\n padding: 12px 18px;\n ", "\n"])), function (props) {
|
|
24
|
+
return props.theme.colors.borderColor;
|
|
25
|
+
}, function (_ref) {
|
|
26
|
+
var active = _ref.active;
|
|
27
|
+
return active && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n background-color: ", ";\n "])), function (props) {
|
|
28
|
+
return props.theme.colors.primary;
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.theme.colors.primary;
|
|
31
|
+
}, function (props) {
|
|
32
|
+
return props.theme.colors.backgroundInfo;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
exports.PublishingOptionContainer = PublishingOptionContainer;
|
|
36
|
+
var PublishingOption = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n cursor: pointer;\n color: ", ";\n \n > svg {\n font-size: 20px;\n &.fill {\n color: ", ";\n }\n }\n"])), function (props) {
|
|
37
|
+
return props.theme.colors.headingColor;
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return props.theme.colors.primary;
|
|
40
|
+
});
|
|
41
|
+
exports.PublishingOption = PublishingOption;
|
|
42
|
+
var PublishingName = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 14px;\n ", "\n"])), function (props) {
|
|
43
|
+
return props.theme.colors.headingColor;
|
|
44
|
+
}, function (props) {
|
|
45
|
+
var _props$theme;
|
|
46
|
+
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "])));
|
|
47
|
+
});
|
|
48
|
+
exports.PublishingName = PublishingName;
|
|
@@ -91,7 +91,7 @@ var BusinessSummary = function BusinessSummary(props) {
|
|
|
91
91
|
var _businessState$busine2;
|
|
92
92
|
window.open("https://".concat(ordering.project, ".tryordering.com/store/").concat(businessState === null || businessState === void 0 ? void 0 : (_businessState$busine2 = businessState.business) === null || _businessState$busine2 === void 0 ? void 0 : _businessState$busine2.slug), '_blank');
|
|
93
93
|
};
|
|
94
|
-
var itemsExcluded = !!spoonityConfig ? ['publishing'] : ['publishing', 'spoonity_key'];
|
|
94
|
+
var itemsExcluded = !!spoonityConfig ? ['publishing', 'personalization'] : ['publishing', 'spoonity_key', 'personalization'];
|
|
95
95
|
var businessConfigs = [{
|
|
96
96
|
key: 'store_details',
|
|
97
97
|
value: t('STORE_DETAILS', 'Store details')
|
|
@@ -273,6 +273,18 @@ Object.defineProperty(exports, "BusinessPublishing", {
|
|
|
273
273
|
return _BusinessPublishing.BusinessPublishing;
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
+
Object.defineProperty(exports, "BusinessQRCodeOption", {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function get() {
|
|
279
|
+
return _BusinessQRCodeOption.BusinessQRCodeOption;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
Object.defineProperty(exports, "BusinessQRCodeOptions", {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: function get() {
|
|
285
|
+
return _BusinessQRCodeOptions.BusinessQRCodeOptions;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
276
288
|
Object.defineProperty(exports, "BusinessSalesChannel", {
|
|
277
289
|
enumerable: true,
|
|
278
290
|
get: function get() {
|
|
@@ -686,6 +698,8 @@ var _BusinessTypes = require("./BusinessTypes");
|
|
|
686
698
|
var _BusinessVideos = require("./BusinessVideos");
|
|
687
699
|
var _BusinessWebhooks = require("./BusinessWebhooks");
|
|
688
700
|
var _BusinessWidgets = require("./BusinessWidgets");
|
|
701
|
+
var _BusinessQRCodeOption = require("./BusinessQRCodeOption");
|
|
702
|
+
var _BusinessQRCodeOptions = require("./BusinessQRCodeOptions");
|
|
689
703
|
var _SeoOptions = require("./SeoOptions");
|
|
690
704
|
var _AddBusinessForm = require("./AddBusinessForm");
|
|
691
705
|
var _WizardBusiness = require("./WizardBusiness");
|
package/_modules/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.widgetURL = exports.verifyDecimals = exports.stringToSlug = exports.sortInputFields = exports.shape = exports.setStorageItem = exports.scrollTo = exports.ribbonValues = exports.reviewCommentList = exports.removeStorageItem = exports.orderRejectCommentList = exports.optimizeImage = exports.getUniqueId = exports.getStorageItem = exports.getStarWidth = exports.getSeconds = exports.getMinutes = exports.getIconCard = exports.getHours = exports.getCurrentDiffDays = exports.getAgoMinutes = exports.formatUrlVideo = exports.formatSeconds = exports.firstLetterCapital = exports.fieldsToSort = exports.convertHoursToMinutes = exports.convertHMS = exports.checkSiteUrl = exports.checkPreSiteUrl = exports.capitalize = exports.bytesConverter = exports.DriverTipsOptions = void 0;
|
|
6
|
+
exports.widgetURL = exports.verifyDecimals = exports.stringToSlug = exports.sortInputFields = exports.shape = exports.setStorageItem = exports.scrollTo = exports.ribbonValues = exports.reviewCommentList = exports.removeStorageItem = exports.orderRejectCommentList = exports.optimizeImage = exports.getUniqueId = exports.getStorageItem = exports.getStarWidth = exports.getSeconds = exports.getMinutes = exports.getIconCard = exports.getHours = exports.getCurrentDiffDays = exports.getAgoMinutes = exports.formatUrlVideo = exports.formatSeconds = exports.firstLetterCapital = exports.fieldsToSort = exports.convertHoursToMinutes = exports.convertHMS = exports.checkValidUrlFormat = exports.checkSiteUrl = exports.checkPreSiteUrl = exports.capitalize = exports.bytesConverter = exports.DriverTipsOptions = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _FaCcMastercard = _interopRequireDefault(require("@meronex/icons/fa/FaCcMastercard"));
|
|
9
9
|
var _FaCcVisa = _interopRequireDefault(require("@meronex/icons/fa/FaCcVisa"));
|
|
@@ -358,9 +358,31 @@ var checkPreSiteUrl = function checkPreSiteUrl(url, fallback) {
|
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
|
-
*
|
|
361
|
+
* Function to validate URL
|
|
362
|
+
* @param {string} url URL of page
|
|
362
363
|
*/
|
|
363
364
|
exports.checkPreSiteUrl = checkPreSiteUrl;
|
|
365
|
+
var checkValidUrlFormat = function checkValidUrlFormat(url) {
|
|
366
|
+
if (!url) return;
|
|
367
|
+
var pattern = new RegExp('^(https?:\\/\\/)?' +
|
|
368
|
+
// protocol
|
|
369
|
+
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' +
|
|
370
|
+
// domain name
|
|
371
|
+
'((\\d{1,3}\\.){3}\\d{1,3}))' +
|
|
372
|
+
// OR ip (v4) address
|
|
373
|
+
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' +
|
|
374
|
+
// port and path
|
|
375
|
+
'(\\?[;&a-z\\d%_.~+=-]*)?' +
|
|
376
|
+
// query string
|
|
377
|
+
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
|
|
378
|
+
|
|
379
|
+
return pattern.test(url);
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* default value for bitton
|
|
384
|
+
*/
|
|
385
|
+
exports.checkValidUrlFormat = checkValidUrlFormat;
|
|
364
386
|
var ribbonValues = {
|
|
365
387
|
color: '#0083FE',
|
|
366
388
|
text: 'ribbon',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Ordering UI Admin Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": "^4.17.20",
|
|
84
84
|
"moment": "^2.29.1",
|
|
85
85
|
"moment-range": "^4.0.2",
|
|
86
|
-
"ordering-components-admin-external": "1.
|
|
86
|
+
"ordering-components-admin-external": "1.22.0",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"react-otp-input": "^2.4.0",
|
|
101
101
|
"react-phone-number-input": "^3.1.23",
|
|
102
102
|
"react-popper": "^2.3.0",
|
|
103
|
+
"react-qr-code": "^2.0.11",
|
|
103
104
|
"react-summernote": "^2.0.2",
|
|
104
105
|
"react-to-print": "^2.14.6",
|
|
105
106
|
"react-toastify": "^6.1.0",
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
DataListTable
|
|
15
15
|
} from './styles'
|
|
16
16
|
|
|
17
|
-
const DriversGroupLogsUI = (props) => {
|
|
17
|
+
export const DriversGroupLogsUI = (props) => {
|
|
18
18
|
const {
|
|
19
19
|
logsList,
|
|
20
20
|
paginationProps,
|
|
@@ -71,8 +71,6 @@ const DriversGroupLogsUI = (props) => {
|
|
|
71
71
|
}
|
|
72
72
|
}, [logsList.logs, paginationProps])
|
|
73
73
|
|
|
74
|
-
console.log(logsList)
|
|
75
|
-
|
|
76
74
|
return (
|
|
77
75
|
<>
|
|
78
76
|
<DriversGroupLogsContainer
|
|
@@ -133,7 +131,7 @@ const DriversGroupLogsUI = (props) => {
|
|
|
133
131
|
</td>
|
|
134
132
|
<td>
|
|
135
133
|
<DataListTable>
|
|
136
|
-
{(typeof log?.data === 'object' ? Object.values(log?.data) : log?.data).map((item, i) => (
|
|
134
|
+
{log?.data && (typeof log?.data === 'object' ? Object.values(log?.data) : log?.data).map((item, i) => (
|
|
137
135
|
<tbody key={i}>
|
|
138
136
|
<tr>
|
|
139
137
|
<td>{getAttributeName(item?.attribute)}</td>
|
|
@@ -10,6 +10,8 @@ import { Personalization, Modal, Schedule } from '../../Shared'
|
|
|
10
10
|
import { UserDetailsMenu } from '../UserDetailsMenu'
|
|
11
11
|
import { UserProfileForm } from '../UserProfileForm'
|
|
12
12
|
import { UserMetaFields } from '../../Users'
|
|
13
|
+
import { DriversLogs } from '../DriversLogs'
|
|
14
|
+
import { DriversGroupLogsUI } from '../DriversGroupLogs'
|
|
13
15
|
import { DriverGroupSetting } from '../DriverGroupSetting'
|
|
14
16
|
import { ArrowsAngleContract, ArrowsAngleExpand, ThreeDots } from 'react-bootstrap-icons'
|
|
15
17
|
import { Switch, Button, IconButton } from '../../../styles'
|
|
@@ -195,6 +197,12 @@ export const UserDetailsUI = (props) => {
|
|
|
195
197
|
</ActionsForm>
|
|
196
198
|
</ScheduleSection>
|
|
197
199
|
)}
|
|
200
|
+
{currentMenuSelected === 'logs' && (
|
|
201
|
+
<DriversLogs
|
|
202
|
+
userId={userState.user?.id}
|
|
203
|
+
UIComponent={DriversGroupLogsUI}
|
|
204
|
+
/>
|
|
205
|
+
)}
|
|
198
206
|
{currentMenuSelected === 'orders' && (
|
|
199
207
|
<OrdersManager
|
|
200
208
|
isSelectedOrders
|
|
@@ -19,7 +19,8 @@ export const UserDetailsMenu = (props) => {
|
|
|
19
19
|
{ key: 'profile', content: t('PROFILE', 'Profile') },
|
|
20
20
|
{ key: 'driver_group', content: t('DRIVER_GROUP', 'Driver group') },
|
|
21
21
|
{ key: 'saved_places', content: t('SAVED_PLACES', 'Saved places') },
|
|
22
|
-
{ key: 'schedule', content: t('SCHEDULE', 'Schedule') }
|
|
22
|
+
{ key: 'schedule', content: t('SCHEDULE', 'Schedule') },
|
|
23
|
+
{ key: 'logs', content: t('LOGS', 'Logs') }
|
|
23
24
|
// { key: 'metafields', content: t('METAFIELDS', 'Metafields') },
|
|
24
25
|
// { key: 'personalization', content: t('PERSONALIZATION', 'Personalization') }
|
|
25
26
|
] : [
|
|
@@ -28,9 +28,9 @@ export const OrderType = (props) => {
|
|
|
28
28
|
/>
|
|
29
29
|
</FormControl>
|
|
30
30
|
<FormControl>
|
|
31
|
-
<label>{t('
|
|
31
|
+
<label>{t('EXPORT_CALL_TO_ACTION', 'Call to action')}</label>
|
|
32
32
|
<Input
|
|
33
|
-
placeholder={t('
|
|
33
|
+
placeholder={t('EXPORT_CALL_TO_ACTION', 'Call to action')}
|
|
34
34
|
defaultValue={typeValues?.call_to_action || ''}
|
|
35
35
|
onChange={(e) => handleUpdateThemeValue(e.target.value, [path, 'call_to_action'].join('.'))}
|
|
36
36
|
/>
|
|
@@ -47,7 +47,7 @@ export const AdvancedSettings = (props) => {
|
|
|
47
47
|
{ name: '', type: 'hidden', path: 'business_listing_view.hidden' },
|
|
48
48
|
{ name: t('BUSINESS_LISTING_IMAGE', 'Business listing image'), type: 'image', path: 'business_listing_view.components.business_hero.components.image' },
|
|
49
49
|
{ name: t('PREVIOUS_ORDERS_BLOCK', 'Previous orders block'), type: 'hidden', path: 'business_listing_view.components.previous_orders_block.hidden' },
|
|
50
|
-
{ name: t('
|
|
50
|
+
{ name: t('HIGHEST_RATED_BUSINESS_BLOCK', 'Highest rated business block'), type: 'hidden', path: 'business_listing_view.components.highest_rated_business_block.hidden' },
|
|
51
51
|
{ name: t('CATEGORIES_BLOCK', 'Categories block'), type: 'hidden', path: 'business_listing_view.components.categories.hidden' },
|
|
52
52
|
{ name: t('AMOUNT_OF_BUSINESSES_TO_DISPLAY_PER_ROW', 'Amount of businesses to display per row:'), type: 'position', path: 'business_listing_view.components.layout.rows' },
|
|
53
53
|
{ name: t('SEARCH_BOX', 'Search box'), type: 'hidden', path: 'business_listing_view.components.search.hidden' },
|
|
@@ -123,39 +123,38 @@ export const AdvancedSettings = (props) => {
|
|
|
123
123
|
|
|
124
124
|
const myAccountList = [
|
|
125
125
|
{ name: t('USER_IMAGE', 'User image'), type: 'hidden', path: 'profile.components.picture.hidden' },
|
|
126
|
-
{ name: t('
|
|
126
|
+
{ name: t('EXPORT_BIRTHDAY', 'Birthday'), type: 'hidden', path: 'profile.components.birthday.hidden' },
|
|
127
127
|
{ name: t('LANGUAGES', 'Languages'), type: 'hidden', path: 'profile.components.languages.hidden' },
|
|
128
128
|
{ name: t('ADDRESS_LIST', 'Address list'), type: 'hidden', path: 'profile.components.address_list.hidden' }
|
|
129
129
|
]
|
|
130
130
|
|
|
131
131
|
const activeOrderBlockList = [
|
|
132
|
-
{ name: t('MAP', 'Map'), type: 'hidden', path: 'orders.components.map.hidden' },
|
|
133
132
|
{ name: t('BUSINESS_LOGO', 'Business logo'), type: 'hidden', path: 'orders.components.business_logo.hidden' },
|
|
134
|
-
{ name: t('
|
|
133
|
+
{ name: t('EXPORT_BUSINESS_NAME', 'Business name'), type: 'hidden', path: 'orders.components.business_name.hidden' },
|
|
135
134
|
{ name: t('ORDER_NUMBER', 'Order number'), type: 'hidden', path: 'orders.components.order_number.hidden' },
|
|
136
135
|
{ name: t('ORDER_DATE', 'Order date'), type: 'hidden', path: 'orders.components.date.hidden' },
|
|
137
|
-
{ name: t('
|
|
138
|
-
{ name: t('
|
|
136
|
+
{ name: t('EXPORT_REVIEW_ORDER_BUTTON', 'Review order button'), type: 'hidden', path: 'orders.components.review_order_button.hidden' },
|
|
137
|
+
{ name: t('EXPORT_REORDER_BUTTON', 'Reorder button'), type: 'hidden', path: 'orders.components.reorder_button.hidden' },
|
|
139
138
|
{ name: t('FAVORITE_BUTTON', 'Favorite button'), type: 'hidden', path: 'orders.components.favorite.hidden' },
|
|
140
139
|
{ name: t('ORDER_STATUS', 'Order status'), type: 'hidden', path: 'orders.components.order_status.hidden' },
|
|
141
|
-
{ name: t('
|
|
142
|
-
{ name: t('
|
|
143
|
-
{ name: t('
|
|
140
|
+
{ name: t('EXPORT_PREVIOUS_ORDER_BLOCK', 'Previous order block'), type: 'hidden', path: 'orders.components.past_orders.hidden' },
|
|
141
|
+
{ name: t('EXPORT_BUSINESS_TAB', 'Business tab'), type: 'hidden', path: 'orders.components.business_tab.hidden' },
|
|
142
|
+
{ name: t('EXPORT_PRODUCTS_TAB', 'Products tab'), type: 'hidden', path: 'orders.components.products_tab.hidden' }
|
|
144
143
|
]
|
|
145
144
|
|
|
146
145
|
const menuOptionList = [
|
|
147
|
-
{ name: t('
|
|
148
|
-
{ name: t('
|
|
146
|
+
{ name: t('EXPORT_BROWSE_AND_SEARCH', 'Browse and search'), type: 'hidden', path: 'bar_menu.components.browse.hidden' },
|
|
147
|
+
{ name: t('WALLETS', 'Wallets'), type: 'hidden', path: 'bar_menu.components.wallet.hidden' },
|
|
149
148
|
{ name: t('PROMOTIONS', 'Promotions'), type: 'hidden', path: 'bar_menu.components.promotions.hidden' },
|
|
150
149
|
{ name: t('MESSAGES', 'Messages'), type: 'hidden', path: 'bar_menu.components.messages.hidden' },
|
|
151
150
|
{ name: t('HELP', 'Help'), type: 'hidden', path: 'bar_menu.components.help.hidden' },
|
|
152
|
-
{ name: t('
|
|
153
|
-
{ name: t('
|
|
151
|
+
{ name: t('EXPORT_SECURITY', 'Security'), type: 'hidden', path: 'bar_menu.components.sessions.hidden' },
|
|
152
|
+
{ name: t('EXPORT_MY_FAVORITES', 'My favorites'), type: 'hidden', path: 'bar_menu.components.favorites.hidden' }
|
|
154
153
|
]
|
|
155
154
|
|
|
156
155
|
const thirdPartyCodeList = [
|
|
157
|
-
{ name: t('
|
|
158
|
-
{ name: t('
|
|
156
|
+
{ name: t('EXPORT_HEAD', 'Head'), type: 'input', path: 'third_party_code.head' },
|
|
157
|
+
{ name: t('EXPORT_BODY', 'Body'), type: 'input', path: 'third_party_code.body' }
|
|
159
158
|
]
|
|
160
159
|
|
|
161
160
|
const buttonList = [
|
|
@@ -47,7 +47,8 @@ export const OrdersListing = (props) => {
|
|
|
47
47
|
allowColumns,
|
|
48
48
|
setAllowColumns,
|
|
49
49
|
handleDrop,
|
|
50
|
-
isDelivery
|
|
50
|
+
isDelivery,
|
|
51
|
+
saveUserSettings
|
|
51
52
|
} = props
|
|
52
53
|
|
|
53
54
|
const theme = useTheme()
|
|
@@ -130,6 +131,7 @@ export const OrdersListing = (props) => {
|
|
|
130
131
|
allowColumns={allowColumns}
|
|
131
132
|
setAllowColumns={setAllowColumns}
|
|
132
133
|
handleDrop={handleDrop}
|
|
134
|
+
saveUserSettings={saveUserSettings}
|
|
133
135
|
/>
|
|
134
136
|
) : (
|
|
135
137
|
<OrdersCards
|
|
@@ -53,7 +53,8 @@ export const OrdersTable = (props) => {
|
|
|
53
53
|
groupStatus,
|
|
54
54
|
allowColumns,
|
|
55
55
|
setAllowColumns,
|
|
56
|
-
handleDrop
|
|
56
|
+
handleDrop,
|
|
57
|
+
saveUserSettings
|
|
57
58
|
} = props
|
|
58
59
|
const [, t] = useLanguage()
|
|
59
60
|
const theme = useTheme()
|
|
@@ -232,12 +233,15 @@ export const OrdersTable = (props) => {
|
|
|
232
233
|
}
|
|
233
234
|
|
|
234
235
|
const handleChangeAllowColumns = (type) => {
|
|
235
|
-
console.log(type, 'type', allowColumns)
|
|
236
236
|
const _column = allowColumns[type]
|
|
237
|
-
|
|
237
|
+
const updatedAllowColumns = {
|
|
238
238
|
...allowColumns,
|
|
239
239
|
[type]: { ..._column, visable: !_column?.visable }
|
|
240
|
-
}
|
|
240
|
+
}
|
|
241
|
+
setAllowColumns(updatedAllowColumns)
|
|
242
|
+
if (type === 'externalId') {
|
|
243
|
+
saveUserSettings(JSON.parse(JSON.stringify(updatedAllowColumns)))
|
|
244
|
+
}
|
|
241
245
|
}
|
|
242
246
|
|
|
243
247
|
const handleClickOrder = (order, e) => {
|
|
@@ -214,10 +214,11 @@ export const BusinessDeliveryZoneInformation = (props) => {
|
|
|
214
214
|
disabled={!isMyZone}
|
|
215
215
|
placeholder={`1 - 99 ${configState?.configs?.distance_unit?.value}`}
|
|
216
216
|
name='distance'
|
|
217
|
-
maxLength={2}
|
|
218
217
|
value={formState.changes?.data?.distance ?? zone?.data?.distance ?? ''}
|
|
219
218
|
onInput={(e) => {
|
|
220
|
-
e.target.value = e.target.value
|
|
219
|
+
e.target.value = (Number(e.target.value) > 99 || e.target.value === '.' || (e.target.value.match(/\./g) || []).length > 1)
|
|
220
|
+
? e.target.value.slice(0, -1)
|
|
221
|
+
: e.target.value.match(`^[${e.target.value === '0' ? '1' : '0'}-9/.]{1,9}$`)
|
|
221
222
|
}}
|
|
222
223
|
onChange={e => handleChangeInput(e, configState?.configs?.distance_unit?.value)}
|
|
223
224
|
ref={register({
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
BarContainer
|
|
28
28
|
} from './styles'
|
|
29
29
|
import { BusinessSalesChannel } from '../BusinessSalesChannel'
|
|
30
|
+
import { BusinessQRCodeOptions } from '../BusinessQRCodeOptions'
|
|
30
31
|
|
|
31
32
|
export const BusinessDetailsUI = (props) => {
|
|
32
33
|
const {
|
|
@@ -305,6 +306,12 @@ export const BusinessDetailsUI = (props) => {
|
|
|
305
306
|
setIsExtendExtraOpen={setIsExtendExtraOpen}
|
|
306
307
|
/>
|
|
307
308
|
)} */}
|
|
309
|
+
{selectedItem === 'publishing' && isAdmin && (
|
|
310
|
+
<BusinessQRCodeOptions
|
|
311
|
+
business={businessState?.business}
|
|
312
|
+
setIsExtendExtraOpen={setIsExtendExtraOpen}
|
|
313
|
+
/>
|
|
314
|
+
)}
|
|
308
315
|
{selectedItem === 'sales_channels' && (
|
|
309
316
|
<BusinessSalesChannel
|
|
310
317
|
business={businessState?.business}
|