ordering-ui-external 10.3.4 → 10.4.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 (28) hide show
  1. package/_bundles/{7.ordering-ui.e4b344da6e70bac839ce.js → 7.ordering-ui.487a31b3537d90f69a9d.js} +1 -1
  2. package/_bundles/{ordering-ui.e4b344da6e70bac839ce.js → ordering-ui.487a31b3537d90f69a9d.js} +2 -2
  3. package/_modules/themes/five/index.js +7 -0
  4. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +2 -2
  5. package/_modules/themes/five/src/components/Cart/index.js +2 -2
  6. package/_modules/themes/five/src/components/GiftCard/SendGiftCard/index.js +2 -2
  7. package/_modules/themes/five/src/components/WebsocketStatus/index.js +123 -0
  8. package/_modules/themes/five/src/components/WebsocketStatus/styles.js +69 -0
  9. package/_modules/themes/five/src/styles/Buttons/index.js +118 -89
  10. package/package.json +2 -2
  11. package/src/themes/five/index.js +2 -1
  12. package/src/themes/five/src/components/BusinessPreorder/styles.js +4 -4
  13. package/src/themes/five/src/components/Cart/index.js +2 -2
  14. package/src/themes/five/src/components/GiftCard/SendGiftCard/index.js +2 -2
  15. package/src/themes/five/src/components/WebsocketStatus/index.js +142 -0
  16. package/src/themes/five/src/components/WebsocketStatus/styles.js +184 -0
  17. package/src/themes/five/src/styles/Buttons/index.js +67 -0
  18. package/template/theme.json +2 -1
  19. /package/_bundles/{0.ordering-ui.e4b344da6e70bac839ce.js → 0.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  20. /package/_bundles/{1.ordering-ui.e4b344da6e70bac839ce.js → 1.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  21. /package/_bundles/{2.ordering-ui.e4b344da6e70bac839ce.js → 2.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  22. /package/_bundles/{4.ordering-ui.e4b344da6e70bac839ce.js → 4.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  23. /package/_bundles/{5.ordering-ui.e4b344da6e70bac839ce.js → 5.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  24. /package/_bundles/{6.ordering-ui.e4b344da6e70bac839ce.js → 6.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  25. /package/_bundles/{7.ordering-ui.e4b344da6e70bac839ce.js.LICENSE.txt → 7.ordering-ui.487a31b3537d90f69a9d.js.LICENSE.txt} +0 -0
  26. /package/_bundles/{8.ordering-ui.e4b344da6e70bac839ce.js → 8.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  27. /package/_bundles/{9.ordering-ui.e4b344da6e70bac839ce.js → 9.ordering-ui.487a31b3537d90f69a9d.js} +0 -0
  28. /package/_bundles/{ordering-ui.e4b344da6e70bac839ce.js.LICENSE.txt → ordering-ui.487a31b3537d90f69a9d.js.LICENSE.txt} +0 -0
@@ -777,6 +777,12 @@ Object.defineProperty(exports, "Wallets", {
777
777
  return _Wallets.Wallets;
778
778
  }
779
779
  });
780
+ Object.defineProperty(exports, "WebsocketStatus", {
781
+ enumerable: true,
782
+ get: function get() {
783
+ return _WebsocketStatus.WebsocketStatus;
784
+ }
785
+ });
780
786
  var _AccordionDropdown = require("./src/components/AccordionDropdown");
781
787
  var _AddressDetails = require("./src/components/AddressDetails");
782
788
  var _AddressForm = require("./src/components/AddressForm");
@@ -899,6 +905,7 @@ var _Confirm = require("./src/components/Confirm");
899
905
  var _TaxInformation = require("./src/components/TaxInformation");
900
906
  var _SendGiftCard = require("./src/components/GiftCard/SendGiftCard");
901
907
  var _DatePicker = require("./src/components/DatePicker");
908
+ var _WebsocketStatus = require("./src/components/WebsocketStatus");
902
909
  var _Buttons = require("./src/styles/Buttons");
903
910
  var _Inputs = require("./src/styles/Inputs");
904
911
  var _Select = require("./src/styles/Select");
@@ -59,7 +59,7 @@ var TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObje
59
59
  });
60
60
  }, function (_ref2) {
61
61
  var cateringPreorder = _ref2.cateringPreorder;
62
- return cateringPreorder ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n width: 100%;\n min-width: 100%;\n height: 50px;\n\n span {\n font-size: 18px;\n display: flex;\n align-items: center;\n margin: 10px 0;\n margin-left: 15px;\n p{\n position: relative;\n bottom: 2px;\n }\n }\n ", "\n "])), function (props) {
62
+ return cateringPreorder ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n width: 100%;\n min-width: 100%;\n height: 50px;\n \n span {\n font-size: 18px;\n display: flex;\n align-items: center;\n margin: 10px 0;\n margin-left: 15px;\n p{\n position: relative;\n bottom: 2px;\n }\n }\n ", "\n "])), function (props) {
63
63
  var _props$theme;
64
64
  return (_props$theme = props.theme) === null || _props$theme === void 0 || (_props$theme = _props$theme.colors) === null || _props$theme === void 0 ? void 0 : _props$theme.backgroundPage;
65
65
  }, function (_ref3) {
@@ -67,7 +67,7 @@ var TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObje
67
67
  return active && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n span {\n p{\n bottom: 0;\n margin-left: 2px;\n }\n }\n "])), function (props) {
68
68
  return props.theme.colors.primary;
69
69
  });
70
- }) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background: #E9ECEF;\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n\n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n\n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n\n @media (min-width: 769px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n ", "\n }\n "])), function (_ref4) {
70
+ }) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background: #E9ECEF;\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n \n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n \n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n \n @media (min-width: 769px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n ", "\n }\n "])), function (_ref4) {
71
71
  var isAppoint = _ref4.isAppoint;
72
72
  return isAppoint && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n span {\n font-size: 12px;\n }\n "])));
73
73
  });
@@ -207,7 +207,7 @@ var CartUI = function CartUI(props) {
207
207
  var cartsAvailable = (_Object$values = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts)) === null || _Object$values === void 0 ? void 0 : _Object$values.filter(function (cart) {
208
208
  return (cart === null || cart === void 0 ? void 0 : cart.valid) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2;
209
209
  });
210
- if (cartsAvailable.length === 1 || !isMultiCheckout) {
210
+ if (cartsAvailable.length === 1 || !isMultiCheckout || !(cart !== null && cart !== void 0 && cart.business_id)) {
211
211
  events.emit('go_to_page', {
212
212
  page: 'checkout',
213
213
  params: {
@@ -564,7 +564,7 @@ var CartUI = function CartUI(props) {
564
564
  cateringPreorder: true,
565
565
  isCart: true,
566
566
  business: cart === null || cart === void 0 ? void 0 : cart.business
567
- }, cateringValues))), (onClickCheckout || isForceOpenCart) && !isCheckout && (cart === null || cart === void 0 ? void 0 : cart.valid) && (!isMultiCheckout || isStore) && /*#__PURE__*/_react.default.createElement(_styles.CheckoutAction, null, /*#__PURE__*/_react.default.createElement("p", null, (cart === null || cart === void 0 ? void 0 : cart.total) >= 1 && parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
567
+ }, cateringValues))), (onClickCheckout || isForceOpenCart) && !isCheckout && (cart === null || cart === void 0 ? void 0 : cart.valid) && (!isMultiCheckout || isStore || !(cart !== null && cart !== void 0 && cart.business_id)) && /*#__PURE__*/_react.default.createElement(_styles.CheckoutAction, null, /*#__PURE__*/_react.default.createElement("p", null, (cart === null || cart === void 0 ? void 0 : cart.total) >= 1 && parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
568
568
  color: !(cart !== null && cart !== void 0 && cart.valid_maximum) || subtotalWithTaxes < (cart === null || cart === void 0 ? void 0 : cart.minimum) || !(cart !== null && cart !== void 0 && cart.valid_address) ? 'secundary' : 'primary',
569
569
  onClick: function onClick() {
570
570
  return checkOutBtnClick(cart === null || cart === void 0 ? void 0 : cart.uuid);
@@ -64,10 +64,10 @@ var SendGiftCardUI = function SendGiftCardUI(props) {
64
64
  required: t('VALIDATION_ERROR_REQUIRED', 'To email is required').replace('_attribute_', t('EMAIL', 'EMail'))
65
65
  }),
66
66
  autoComplete: "off"
67
- })), /*#__PURE__*/_react.default.createElement(_styles.FormController, null, /*#__PURE__*/_react.default.createElement("label", null, t('FROM', 'From')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
67
+ })), /*#__PURE__*/_react.default.createElement(_styles.FormController, null, /*#__PURE__*/_react.default.createElement("label", null, t('NAME', 'Name')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
68
68
  name: "user_name",
69
69
  ref: register(),
70
- placeholder: t('WRITE_YOUR_NAME', 'Write your name'),
70
+ placeholder: t('WRITE_A_NAME', 'Write a name'),
71
71
  autoComplete: "off"
72
72
  })), /*#__PURE__*/_react.default.createElement(_styles.FormController, null, /*#__PURE__*/_react.default.createElement("label", null, t('TITLE', 'Title')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
73
73
  name: "title",
@@ -0,0 +1,123 @@
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.WebsocketStatus = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _orderingComponentsExternal = require("ordering-components-external");
10
+ var _reactBootstrapIcons = require("react-bootstrap-icons");
11
+ var _Confirm = require("../../../src/components/Confirm");
12
+ var _Modal = require("../Modal");
13
+ var _Buttons = require("../../styles/Buttons");
14
+ var _styles = require("./styles");
15
+ var _useWindowSize = require("../../../../../hooks/useWindowSize");
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
+ 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; }
18
+ 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; }
19
+ 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; }
20
+ 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; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
+ 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); }
23
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
24
+ 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."); }
25
+ 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); }
26
+ 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; }
27
+ 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; } }
28
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
+ var SocketStatusUI = function SocketStatusUI(props) {
30
+ var socketStatus = props.socketStatus,
31
+ reconnectAttemptCount = props.reconnectAttemptCount,
32
+ connectedDate = props.connectedDate;
33
+ var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
34
+ _useLanguage2 = _slicedToArray(_useLanguage, 2),
35
+ t = _useLanguage2[1];
36
+ var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
37
+ _useUtils2 = _slicedToArray(_useUtils, 1),
38
+ parseDate = _useUtils2[0].parseDate;
39
+ var _useState = (0, _react.useState)({
40
+ open: false,
41
+ content: []
42
+ }),
43
+ _useState2 = _slicedToArray(_useState, 2),
44
+ alertState = _useState2[0],
45
+ setAlertState = _useState2[1];
46
+ var _useState3 = (0, _react.useState)(false),
47
+ _useState4 = _slicedToArray(_useState3, 2),
48
+ openModal = _useState4[0],
49
+ setOpenModal = _useState4[1];
50
+ var windowSize = (0, _useWindowSize.useWindowSize)();
51
+ var closeAlert = function closeAlert() {
52
+ setAlertState({
53
+ open: false,
54
+ content: []
55
+ });
56
+ window.location.reload();
57
+ };
58
+ (0, _react.useEffect)(function () {
59
+ if (reconnectAttemptCount > 3) {
60
+ setAlertState({
61
+ open: true,
62
+ content: t('WEBSOCKET_CONNECT_ERROR', 'There appears to be an error in establishing the WebSocket connection. Please try reloading the page to resolve the issue.')
63
+ });
64
+ }
65
+ }, [reconnectAttemptCount]);
66
+ return /*#__PURE__*/_react.default.createElement(_styles.Contatiner, null, /*#__PURE__*/_react.default.createElement(_styles.InfoWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.IconButton, {
67
+ color: "primary"
68
+ }, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.InfoCircle, null)), /*#__PURE__*/_react.default.createElement(_styles.InfoContent, null, t('WEBSOCKET_STATUS_APP_INFO', 'Verify the server connection by date and time using the Connection status button. Press update to refresh your app and update the status as well. Need help? Contact our Customer support team here:'), /*#__PURE__*/_react.default.createElement("a", {
69
+ href: "https://www.ordering.co/contact-ordering",
70
+ target: "_blank",
71
+ rel: "noopener noreferrer"
72
+ }, t('CUSTOMER_SUPPORT', 'Customer support')))), /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
73
+ borderRadius: "8px",
74
+ color: "secundary",
75
+ onClick: function onClick() {
76
+ return setOpenModal(true);
77
+ }
78
+ }, /*#__PURE__*/_react.default.createElement(_styles.StatusContainer, null, /*#__PURE__*/_react.default.createElement("span", null, t('CONNECTION_STATUS', 'Connection status')), /*#__PURE__*/_react.default.createElement(_styles.WebsocketStatusDot, {
79
+ status: socketStatus
80
+ })))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
81
+ open: openModal,
82
+ onClose: function onClose() {
83
+ return setOpenModal(false);
84
+ },
85
+ width: "500px",
86
+ title: t('CONNECTION_STATUS', 'Connection status')
87
+ }, /*#__PURE__*/_react.default.createElement(_styles.DetailContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t('LAST_UPDATE', 'Last update'), ": ", parseDate(connectedDate)), /*#__PURE__*/_react.default.createElement(_styles.StatusItemWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.WebsocketStatusDot, {
88
+ status: 1
89
+ }), /*#__PURE__*/_react.default.createElement("span", null, t('OK', 'Ok'))), /*#__PURE__*/_react.default.createElement("p", null, t('WEBSOCKET_OK', 'The websocket works normally.'))), /*#__PURE__*/_react.default.createElement(_styles.StatusItemWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.WebsocketStatusDot, {
90
+ status: 0
91
+ }), /*#__PURE__*/_react.default.createElement("span", null, t('CONNECTING', 'Connecting'))), /*#__PURE__*/_react.default.createElement("p", null, t('WEBSOCKET_CONNECTING', 'The websocket is connecting.'))), /*#__PURE__*/_react.default.createElement(_styles.StatusItemWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.WebsocketStatusDot, {
92
+ status: 2
93
+ }), /*#__PURE__*/_react.default.createElement("span", null, t('DISCONNECTED', 'Disconnected'))), /*#__PURE__*/_react.default.createElement("p", null, t('WEBSOCKET_DISCONNECTED', 'The server is slow, please reload.'))), /*#__PURE__*/_react.default.createElement(_styles.ButtonsContainer, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
94
+ color: "secundary",
95
+ onClick: function onClick() {
96
+ return setOpenModal(false);
97
+ }
98
+ }, t('CLOSE', 'Close')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
99
+ color: "primary",
100
+ onClick: function onClick() {
101
+ return window.location.reload();
102
+ }
103
+ }, t('UPDATE', 'Update'))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
104
+ title: t('ERROR', 'Error'),
105
+ content: alertState.content,
106
+ acceptText: t('ACCEPT', 'Accept'),
107
+ open: alertState.open,
108
+ onClose: function onClose() {
109
+ return closeAlert();
110
+ },
111
+ onAccept: function onAccept() {
112
+ return closeAlert();
113
+ },
114
+ closeOnBackdrop: false
115
+ }));
116
+ };
117
+ var WebsocketStatus = function WebsocketStatus(props) {
118
+ var socketProps = _objectSpread(_objectSpread({}, props), {}, {
119
+ UIComponent: SocketStatusUI
120
+ });
121
+ return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.WebsocketStatus, socketProps);
122
+ };
123
+ exports.WebsocketStatus = WebsocketStatus;
@@ -0,0 +1,69 @@
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.WebsocketStatusDot = exports.StatusItemWrapper = exports.StatusContainer = exports.InfoWrapper = exports.InfoContent = exports.DetailContainer = exports.DateWrapper = exports.Contatiner = exports.ButtonsContainer = exports.ButtonWrapper = void 0;
8
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
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 Contatiner = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-size: 14px;\n > button {\n height: 41px;\n }\n justify-content: flex-end;\n margin-right: 10px;\n margin-bottom: 10px;\n"])));
14
+ exports.Contatiner = Contatiner;
15
+ var StatusContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n > span:first-child {\n ", "\n }\n"])), function (props) {
16
+ var _props$theme;
17
+ return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 6px;\n "]))) : (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: 6px;\n "])));
18
+ });
19
+ exports.StatusContainer = StatusContainer;
20
+ var WebsocketStatusDot = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n\n ", "\n ", "\n ", "\n"])), function (_ref) {
21
+ var status = _ref.status;
22
+ return status === 0 && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: #FF9922;\n "])));
23
+ }, function (_ref2) {
24
+ var status = _ref2.status;
25
+ return status === 1 && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-color: #00D27A;\n "])));
26
+ }, function (_ref3) {
27
+ var status = _ref3.status;
28
+ return status === 2 && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: #E63757;\n "])));
29
+ });
30
+ exports.WebsocketStatusDot = WebsocketStatusDot;
31
+ var DateWrapper = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-size: 12px;\n text-align: center;\n"])));
32
+ exports.DateWrapper = DateWrapper;
33
+ var InfoWrapper = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: relative;\n ", "\n\n > button {\n height: 25px;\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &:hover > div {\n visibility: visible;\n opacity: 1;\n }\n"])), function (props) {
34
+ var _props$theme2;
35
+ return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 4px;\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-right: 4px;\n "])));
36
+ });
37
+ exports.InfoWrapper = InfoWrapper;
38
+ var InfoContent = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 100%;\n z-index: 999;\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n padding: 8px 12px;\n font-size: 12px;\n line-height: 18px;\n min-width: 150px;\n transition: all 0.3s linear;\n visibility: hidden;\n opacity: 0;\n /* display: none; */\n color: ", ";\n left: -100px;\n ", "\n\n a {\n color: ", ";\n transition: all 0.3s linear;\n cursor: pointer;\n margin-left: 5px;\n ", "\n &:hover {\n text-decoration: underline;\n }\n }\n\n @media (min-width: 576px) {\n min-width: 350px;\n padding: 12px 15px;\n left: -200px;\n ", "\n }\n\n @media (min-width: 993px) {\n min-width: 535px;\n left: -330px;\n ", "\n }\n\n"])), function (props) {
39
+ return props.theme.colors.backgroundInfo;
40
+ }, function (props) {
41
+ return props.theme.colors.primary;
42
+ }, function (props) {
43
+ var _props$theme3;
44
+ return (_props$theme3 = props.theme) === null || _props$theme3 === void 0 || (_props$theme3 = _props$theme3.colors) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.darkTextColor;
45
+ }, function (props) {
46
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n right: -100px;\n left: initial;\n "])));
47
+ }, function (props) {
48
+ return props.theme.colors.primary;
49
+ }, function (props) {
50
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 5px;\n "])));
51
+ }, function (props) {
52
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n right: -200px;\n left: initial;\n "])));
53
+ }, function (props) {
54
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n right: -330px;\n left: initial;\n "])));
55
+ });
56
+ exports.InfoContent = InfoContent;
57
+ var DetailContainer = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-top: 10px;\n h2 {\n font-weight: 700;\n font-size: 20px;\n line-height: 30px;\n }\n\n > p {\n font-size: 14px;\n }\n"])));
58
+ exports.DetailContainer = DetailContainer;
59
+ var StatusItemWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n > div {\n display: flex;\n align-items: center;\n\n > span:first-child {\n margin: 0 16px;\n }\n }\n p {\n font-weight: 400;\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n\n ", "\n }\n"])), function (props) {
60
+ return props.theme.colors.lightGray;
61
+ }, function (props) {
62
+ var _props$theme4;
63
+ return (_props$theme4 = props.theme) !== null && _props$theme4 !== void 0 && _props$theme4.rtl ? (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-right: 40px;\n "]))) : (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n margin-left: 40px;\n "])));
64
+ });
65
+ exports.StatusItemWrapper = StatusItemWrapper;
66
+ var ButtonsContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 40px;\n\n > button {\n border-radius: 8px;\n height: 40px;\n &:last-child {\n margin: 0 10px;\n }\n }\n"])));
67
+ exports.ButtonsContainer = ButtonsContainer;
68
+ var ButtonWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n button{\n height: 41px;\n width: 175px;\n width: 175px;\n width: 175px;\n }\n\n"])));
69
+ exports.ButtonWrapper = ButtonWrapper;