ordering-ui-admin-external 1.45.47 → 1.45.49

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.
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.BusinessDeviceDetail = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
10
- var _utils = require("../../../utils");
11
10
  var _reactBootstrapIcons = require("react-bootstrap-icons");
12
11
  var _styles = require("../../../styles");
13
12
  var _FirstSelect = require("../../../styles/Select/FirstSelect");
@@ -44,12 +43,12 @@ var BusinessDeviceDetailUI = function BusinessDeviceDetailUI(props) {
44
43
  handleChangeFormState = props.handleChangeFormState,
45
44
  businessList = props.businessList,
46
45
  updateDevice = props.updateDevice,
47
- addDevice = props.addDevice;
46
+ addDevice = props.addDevice,
47
+ isEnabledDeleteAllSessions = props.isEnabledDeleteAllSessions;
48
48
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
49
49
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
50
50
  t = _useLanguage2[1];
51
51
  var theme = (0, _styledComponents.useTheme)();
52
- var isEnabledDeleteAllSessions = (0, _utils.getFeatureFlags)('dominos_enable_delete_all_sessions_by_user');
53
52
  var _useState = (0, _react.useState)(false),
54
53
  _useState2 = _slicedToArray(_useState, 2),
55
54
  isExpand = _useState2[0],
@@ -38,7 +38,8 @@ var BusinessDeviceListingUI = function BusinessDeviceListingUI(props) {
38
38
  var searchValue = props.searchValue,
39
39
  _onSearch = props.onSearch,
40
40
  deviceListState = props.deviceListState,
41
- handleUpdateDeviceList = props.handleUpdateDeviceList;
41
+ handleUpdateDeviceList = props.handleUpdateDeviceList,
42
+ isEnabledDeleteAllSessions = props.isEnabledDeleteAllSessions;
42
43
  var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
43
44
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
44
45
  t = _useLanguage2[1];
@@ -212,7 +213,8 @@ var BusinessDeviceListingUI = function BusinessDeviceListingUI(props) {
212
213
  handleUpdateDeviceList: handleUpdateDeviceList,
213
214
  onClose: function onClose() {
214
215
  return setIsOpen(false);
215
- }
216
+ },
217
+ isEnabledDeleteAllSessions: isEnabledDeleteAllSessions
216
218
  }))), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
217
219
  title: t('TRANSLATIONS', 'Translations'),
218
220
  content: alertState.content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.45.47",
3
+ "version": "1.45.49",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -1,6 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import { useLanguage, BusinessDeviceDetail as BusinessDeviceDetailController } from 'ordering-components-admin-external'
3
- import { getFeatureFlags } from '../../../utils'
4
3
  import { ThreeDots, ArrowsAngleContract, ArrowsAngleExpand, PersonFill } from 'react-bootstrap-icons'
5
4
  import { Button, IconButton, DefaultSelect, Input } from '../../../styles'
6
5
  import { Select } from '../../../styles/Select/FirstSelect'
@@ -30,12 +29,12 @@ const BusinessDeviceDetailUI = (props) => {
30
29
  handleChangeFormState,
31
30
  businessList,
32
31
  updateDevice,
33
- addDevice
32
+ addDevice,
33
+ isEnabledDeleteAllSessions
34
34
  } = props
35
35
 
36
36
  const [, t] = useLanguage()
37
37
  const theme = useTheme()
38
- const isEnabledDeleteAllSessions = getFeatureFlags('dominos_enable_delete_all_sessions_by_user')
39
38
 
40
39
  const [isExpand, setIsExpand] = useState(false)
41
40
  const [businessOptions, setBusinessOptions] = useState(null)
@@ -33,7 +33,8 @@ const BusinessDeviceListingUI = (props) => {
33
33
  searchValue,
34
34
  onSearch,
35
35
  deviceListState,
36
- handleUpdateDeviceList
36
+ handleUpdateDeviceList,
37
+ isEnabledDeleteAllSessions
37
38
  } = props
38
39
 
39
40
  const [, t] = useLanguage()
@@ -246,6 +247,7 @@ const BusinessDeviceListingUI = (props) => {
246
247
  devices={deviceListState?.devices}
247
248
  handleUpdateDeviceList={handleUpdateDeviceList}
248
249
  onClose={() => setIsOpen(false)}
250
+ isEnabledDeleteAllSessions={isEnabledDeleteAllSessions}
249
251
  />
250
252
  </SideBar>
251
253
  )}
@@ -1,12 +1,20 @@
1
1
  import React from 'react'
2
2
  import { HelmetTags } from '../../components/HelmetTags'
3
3
  import { BusinessDeviceListing as BusinessDeviceListingController } from '../../../src/components/Stores'
4
+ import { getFeatureFlags } from '../../../src/utils'
4
5
 
5
6
  export const BusinessDevicesList = (props) => {
7
+ const isEnabledDeleteAllSessions = getFeatureFlags('dominos_enable_delete_all_sessions_by_user')
8
+
9
+ const businessDevicesListProps = {
10
+ ...props,
11
+ isEnabledDeleteAllSessions
12
+ }
13
+
6
14
  return (
7
15
  <>
8
16
  <HelmetTags page='devices' />
9
- <BusinessDeviceListingController {...props} />
17
+ <BusinessDeviceListingController {...businessDevicesListProps} />
10
18
  </>
11
19
  )
12
20
  }