@commercetools-frontend-extensions/change-history 7.3.0 → 7.3.1

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.
@@ -169,7 +169,7 @@ var debounce__default$1 = /*#__PURE__*/_interopDefault(debounce$1);
169
169
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
170
170
 
171
171
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
172
- var version = "7.3.0";
172
+ var version = "7.3.1";
173
173
 
174
174
  const ChangeHistoryContext = /*#__PURE__*/React.createContext({});
175
175
  const ChangeHistoryContextProvider = ChangeHistoryContext.Provider;
@@ -729,20 +729,6 @@ const useStorePermissionsInDataFences = _ref => {
729
729
  return storePermissionsInDataFences;
730
730
  };
731
731
 
732
- const AUDIT_LOG_QUOTES_FLAG = 'auditLogQuotes';
733
- const UI_REDESIGN = 'uiRedesign';
734
-
735
- // eslint-disable-next-line import/prefer-default-export
736
- const FLAGS = {
737
- [AUDIT_LOG_QUOTES_FLAG]: false,
738
- [UI_REDESIGN]: true
739
- };
740
-
741
- const useIsAuditLogQuotesEnabled = () => {
742
- const enableAuditLogQuotes = applicationShell.useFeatureToggle(AUDIT_LOG_QUOTES_FLAG);
743
- return Boolean(enableAuditLogQuotes);
744
- };
745
-
746
732
  // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa#Unicode_strings
747
733
  //
748
734
  // Escape any extended characters so that the string we
@@ -15657,7 +15643,6 @@ const ChangeHistoryPermissionsFence = props => {
15657
15643
  // API request does not allow for specifying specific stores for a resourceType,
15658
15644
  // but the request does return results filtered by store-based data-fences.
15659
15645
 
15660
- const hasAuditLogQuotesEnabled = useIsAuditLogQuotesEnabled();
15661
15646
  const canViewCustomersForStore = useStorePermissionsInDataFences({
15662
15647
  resourceName: DATA_FENCE_RESOURCE_TYPES.CUSTOMERS
15663
15648
  });
@@ -15700,13 +15685,13 @@ const ChangeHistoryPermissionsFence = props => {
15700
15685
  const canViewProjectSettings = permissions.useIsAuthorized({
15701
15686
  demandedPermissions: [PERMISSIONS.ViewProjectSettings]
15702
15687
  });
15703
- permissions.useIsAuthorized({
15688
+ const canViewQuotes = permissions.useIsAuthorized({
15704
15689
  demandedPermissions: [PERMISSIONS.ViewQuotes]
15705
15690
  });
15706
- permissions.useIsAuthorized({
15691
+ const canViewQuoteRequests = permissions.useIsAuthorized({
15707
15692
  demandedPermissions: [PERMISSIONS.ViewQuoteRequests]
15708
15693
  });
15709
- permissions.useIsAuthorized({
15694
+ const canViewStagedQuotes = permissions.useIsAuthorized({
15710
15695
  demandedPermissions: [PERMISSIONS.ViewStagedQuotes]
15711
15696
  });
15712
15697
  const canViewStates = permissions.useIsAuthorized({
@@ -15731,15 +15716,9 @@ const ChangeHistoryPermissionsFence = props => {
15731
15716
  canViewShoppingLists: Boolean(canViewOrders || canViewOrdersForStore),
15732
15717
  canViewOrders: Boolean(canViewOrders || canViewOrdersForStore),
15733
15718
  canViewPayments: canViewOrders,
15734
- // After talking with Nico, it looks like for right now we should
15735
- // use `canViewOrders` as the permission to evaluate for all quotes entities.
15736
- // The checkout team is currently implementing the quotes-related
15737
- // permissions in the MC, and we will need to using the quotes-specific
15738
- // permissions fencing once the MC perms are implemented.
15739
- // - Byron 8/1/22
15740
- canViewQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15741
- canViewQuoteRequests: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15742
- canViewStagedQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15719
+ canViewQuotes,
15720
+ canViewQuoteRequests,
15721
+ canViewStagedQuotes,
15743
15722
  canViewStates,
15744
15723
  canViewTypes
15745
15724
  });
@@ -21920,7 +21899,13 @@ ChangeHistoryLink.propTypes = process.env.NODE_ENV !== "production" ? {
21920
21899
  resource: PropTypes__default["default"].oneOf(_Object$values__default["default"](ENTITY_MODAL_TYPES)).isRequired
21921
21900
  } : {};
21922
21901
 
21923
- exports.AUDIT_LOG_QUOTES_FLAG = AUDIT_LOG_QUOTES_FLAG;
21902
+ const UI_REDESIGN = 'uiRedesign';
21903
+
21904
+ // eslint-disable-next-line import/prefer-default-export
21905
+ const FLAGS = {
21906
+ [UI_REDESIGN]: true
21907
+ };
21908
+
21924
21909
  exports.ChangeHistory = ChangeHistoryRoutes;
21925
21910
  exports.ChangeHistoryCartDiscountsTab = CartDiscountTab;
21926
21911
  exports.ChangeHistoryCategoriesTab = CategoryTab;
@@ -169,7 +169,7 @@ var debounce__default$1 = /*#__PURE__*/_interopDefault(debounce$1);
169
169
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
170
170
 
171
171
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
172
- var version = "7.3.0";
172
+ var version = "7.3.1";
173
173
 
174
174
  const ChangeHistoryContext = /*#__PURE__*/React.createContext({});
175
175
  const ChangeHistoryContextProvider = ChangeHistoryContext.Provider;
@@ -729,20 +729,6 @@ const useStorePermissionsInDataFences = _ref => {
729
729
  return storePermissionsInDataFences;
730
730
  };
731
731
 
732
- const AUDIT_LOG_QUOTES_FLAG = 'auditLogQuotes';
733
- const UI_REDESIGN = 'uiRedesign';
734
-
735
- // eslint-disable-next-line import/prefer-default-export
736
- const FLAGS = {
737
- [AUDIT_LOG_QUOTES_FLAG]: false,
738
- [UI_REDESIGN]: true
739
- };
740
-
741
- const useIsAuditLogQuotesEnabled = () => {
742
- const enableAuditLogQuotes = applicationShell.useFeatureToggle(AUDIT_LOG_QUOTES_FLAG);
743
- return Boolean(enableAuditLogQuotes);
744
- };
745
-
746
732
  // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa#Unicode_strings
747
733
  //
748
734
  // Escape any extended characters so that the string we
@@ -14705,7 +14691,6 @@ const ChangeHistoryPermissionsFence = props => {
14705
14691
  // API request does not allow for specifying specific stores for a resourceType,
14706
14692
  // but the request does return results filtered by store-based data-fences.
14707
14693
 
14708
- const hasAuditLogQuotesEnabled = useIsAuditLogQuotesEnabled();
14709
14694
  const canViewCustomersForStore = useStorePermissionsInDataFences({
14710
14695
  resourceName: DATA_FENCE_RESOURCE_TYPES.CUSTOMERS
14711
14696
  });
@@ -14748,13 +14733,13 @@ const ChangeHistoryPermissionsFence = props => {
14748
14733
  const canViewProjectSettings = permissions.useIsAuthorized({
14749
14734
  demandedPermissions: [PERMISSIONS.ViewProjectSettings]
14750
14735
  });
14751
- permissions.useIsAuthorized({
14736
+ const canViewQuotes = permissions.useIsAuthorized({
14752
14737
  demandedPermissions: [PERMISSIONS.ViewQuotes]
14753
14738
  });
14754
- permissions.useIsAuthorized({
14739
+ const canViewQuoteRequests = permissions.useIsAuthorized({
14755
14740
  demandedPermissions: [PERMISSIONS.ViewQuoteRequests]
14756
14741
  });
14757
- permissions.useIsAuthorized({
14742
+ const canViewStagedQuotes = permissions.useIsAuthorized({
14758
14743
  demandedPermissions: [PERMISSIONS.ViewStagedQuotes]
14759
14744
  });
14760
14745
  const canViewStates = permissions.useIsAuthorized({
@@ -14779,15 +14764,9 @@ const ChangeHistoryPermissionsFence = props => {
14779
14764
  canViewShoppingLists: Boolean(canViewOrders || canViewOrdersForStore),
14780
14765
  canViewOrders: Boolean(canViewOrders || canViewOrdersForStore),
14781
14766
  canViewPayments: canViewOrders,
14782
- // After talking with Nico, it looks like for right now we should
14783
- // use `canViewOrders` as the permission to evaluate for all quotes entities.
14784
- // The checkout team is currently implementing the quotes-related
14785
- // permissions in the MC, and we will need to using the quotes-specific
14786
- // permissions fencing once the MC perms are implemented.
14787
- // - Byron 8/1/22
14788
- canViewQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
14789
- canViewQuoteRequests: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
14790
- canViewStagedQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
14767
+ canViewQuotes,
14768
+ canViewQuoteRequests,
14769
+ canViewStagedQuotes,
14791
14770
  canViewStates,
14792
14771
  canViewTypes
14793
14772
  });
@@ -20397,7 +20376,13 @@ const ChangeHistoryLink = props => {
20397
20376
  ChangeHistoryLink.displayName = 'ChangeHistoryLink';
20398
20377
  ChangeHistoryLink.propTypes = {};
20399
20378
 
20400
- exports.AUDIT_LOG_QUOTES_FLAG = AUDIT_LOG_QUOTES_FLAG;
20379
+ const UI_REDESIGN = 'uiRedesign';
20380
+
20381
+ // eslint-disable-next-line import/prefer-default-export
20382
+ const FLAGS = {
20383
+ [UI_REDESIGN]: true
20384
+ };
20385
+
20401
20386
  exports.ChangeHistory = ChangeHistoryRoutes;
20402
20387
  exports.ChangeHistoryCartDiscountsTab = CartDiscountTab;
20403
20388
  exports.ChangeHistoryCategoriesTab = CategoryTab;
@@ -14,7 +14,7 @@ import { useApplicationContext, ApplicationContext, useProjectExtensionImageRege
14
14
  import { InfoModalPage, useModalState, InfoMainPage, MaintenancePageLayout, InfoDialog, PageUnauthorized, PageContentNarrow, PageContentWide, CustomFormModalPage, ConfirmationDialog } from '@commercetools-frontend/application-components';
15
15
  import * as React from 'react';
16
16
  import { createContext, useContext, useCallback, useState, useEffect, useRef, useMemo, PureComponent, Children, cloneElement, forwardRef, Fragment, Component } from 'react';
17
- import { useMcQuery, useFeatureToggle } from '@commercetools-frontend/application-shell';
17
+ import { useMcQuery } from '@commercetools-frontend/application-shell';
18
18
  import { GRAPHQL_TARGETS, NO_VALUE_FALLBACK } from '@commercetools-frontend/constants';
19
19
  import get from 'lodash/get';
20
20
  import camelCase from 'lodash/camelCase';
@@ -91,7 +91,7 @@ import 'msw';
91
91
  import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
92
92
 
93
93
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
94
- var version = "7.3.0";
94
+ var version = "7.3.1";
95
95
 
96
96
  const ChangeHistoryContext = /*#__PURE__*/createContext({});
97
97
  const ChangeHistoryContextProvider = ChangeHistoryContext.Provider;
@@ -651,20 +651,6 @@ const useStorePermissionsInDataFences = _ref => {
651
651
  return storePermissionsInDataFences;
652
652
  };
653
653
 
654
- const AUDIT_LOG_QUOTES_FLAG = 'auditLogQuotes';
655
- const UI_REDESIGN = 'uiRedesign';
656
-
657
- // eslint-disable-next-line import/prefer-default-export
658
- const FLAGS = {
659
- [AUDIT_LOG_QUOTES_FLAG]: false,
660
- [UI_REDESIGN]: true
661
- };
662
-
663
- const useIsAuditLogQuotesEnabled = () => {
664
- const enableAuditLogQuotes = useFeatureToggle(AUDIT_LOG_QUOTES_FLAG);
665
- return Boolean(enableAuditLogQuotes);
666
- };
667
-
668
654
  // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa#Unicode_strings
669
655
  //
670
656
  // Escape any extended characters so that the string we
@@ -15579,7 +15565,6 @@ const ChangeHistoryPermissionsFence = props => {
15579
15565
  // API request does not allow for specifying specific stores for a resourceType,
15580
15566
  // but the request does return results filtered by store-based data-fences.
15581
15567
 
15582
- const hasAuditLogQuotesEnabled = useIsAuditLogQuotesEnabled();
15583
15568
  const canViewCustomersForStore = useStorePermissionsInDataFences({
15584
15569
  resourceName: DATA_FENCE_RESOURCE_TYPES.CUSTOMERS
15585
15570
  });
@@ -15622,13 +15607,13 @@ const ChangeHistoryPermissionsFence = props => {
15622
15607
  const canViewProjectSettings = useIsAuthorized({
15623
15608
  demandedPermissions: [PERMISSIONS.ViewProjectSettings]
15624
15609
  });
15625
- useIsAuthorized({
15610
+ const canViewQuotes = useIsAuthorized({
15626
15611
  demandedPermissions: [PERMISSIONS.ViewQuotes]
15627
15612
  });
15628
- useIsAuthorized({
15613
+ const canViewQuoteRequests = useIsAuthorized({
15629
15614
  demandedPermissions: [PERMISSIONS.ViewQuoteRequests]
15630
15615
  });
15631
- useIsAuthorized({
15616
+ const canViewStagedQuotes = useIsAuthorized({
15632
15617
  demandedPermissions: [PERMISSIONS.ViewStagedQuotes]
15633
15618
  });
15634
15619
  const canViewStates = useIsAuthorized({
@@ -15653,15 +15638,9 @@ const ChangeHistoryPermissionsFence = props => {
15653
15638
  canViewShoppingLists: Boolean(canViewOrders || canViewOrdersForStore),
15654
15639
  canViewOrders: Boolean(canViewOrders || canViewOrdersForStore),
15655
15640
  canViewPayments: canViewOrders,
15656
- // After talking with Nico, it looks like for right now we should
15657
- // use `canViewOrders` as the permission to evaluate for all quotes entities.
15658
- // The checkout team is currently implementing the quotes-related
15659
- // permissions in the MC, and we will need to using the quotes-specific
15660
- // permissions fencing once the MC perms are implemented.
15661
- // - Byron 8/1/22
15662
- canViewQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15663
- canViewQuoteRequests: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15664
- canViewStagedQuotes: Boolean(canViewOrders && hasAuditLogQuotesEnabled),
15641
+ canViewQuotes,
15642
+ canViewQuoteRequests,
15643
+ canViewStagedQuotes,
15665
15644
  canViewStates,
15666
15645
  canViewTypes
15667
15646
  });
@@ -21842,4 +21821,11 @@ ChangeHistoryLink.propTypes = process.env.NODE_ENV !== "production" ? {
21842
21821
  resource: PropTypes.oneOf(_Object$values(ENTITY_MODAL_TYPES)).isRequired
21843
21822
  } : {};
21844
21823
 
21845
- export { AUDIT_LOG_QUOTES_FLAG, ChangeHistoryRoutes as ChangeHistory, CartDiscountTab as ChangeHistoryCartDiscountsTab, CategoryTab as ChangeHistoryCategoriesTab, ChannelTab as ChangeHistoryChannelsTab, CustomerGroupTab as ChangeHistoryCustomerGroupsTab, CustomerTab as ChangeHistoryCustomersTab, DiscountCodeTab as ChangeHistoryDiscountCodesTab, ChangeHistoryLink, OrderTab as ChangeHistoryOrdersTab, ProductDiscountTab as ChangeHistoryProductDiscountsTab, ProductSelectionTab as ChangeHistoryProductSelectionsTab, ProductTypeTab as ChangeHistoryProductTypesTab, ProductTab as ChangeHistoryProductsTab, QuoteRequestTab as ChangeHistoryQuoteRequestsTab, QuoteTab as ChangeHistoryQuotesTab, StagedQuoteTab as ChangeHistoryStagedQuotesTab, StoreTab as ChangeHistoryStoresTab, TaxCategoryTab as ChangeHistoryTaxCategoriesTab, ZoneTab as ChangeHistoryZonesTab, FLAGS, ENTITY_MODAL_TYPES as RESOURCE, UI_REDESIGN, loadI18n, version };
21824
+ const UI_REDESIGN = 'uiRedesign';
21825
+
21826
+ // eslint-disable-next-line import/prefer-default-export
21827
+ const FLAGS = {
21828
+ [UI_REDESIGN]: true
21829
+ };
21830
+
21831
+ export { ChangeHistoryRoutes as ChangeHistory, CartDiscountTab as ChangeHistoryCartDiscountsTab, CategoryTab as ChangeHistoryCategoriesTab, ChannelTab as ChangeHistoryChannelsTab, CustomerGroupTab as ChangeHistoryCustomerGroupsTab, CustomerTab as ChangeHistoryCustomersTab, DiscountCodeTab as ChangeHistoryDiscountCodesTab, ChangeHistoryLink, OrderTab as ChangeHistoryOrdersTab, ProductDiscountTab as ChangeHistoryProductDiscountsTab, ProductSelectionTab as ChangeHistoryProductSelectionsTab, ProductTypeTab as ChangeHistoryProductTypesTab, ProductTab as ChangeHistoryProductsTab, QuoteRequestTab as ChangeHistoryQuoteRequestsTab, QuoteTab as ChangeHistoryQuotesTab, StagedQuoteTab as ChangeHistoryStagedQuotesTab, StoreTab as ChangeHistoryStoresTab, TaxCategoryTab as ChangeHistoryTaxCategoriesTab, ZoneTab as ChangeHistoryZonesTab, FLAGS, ENTITY_MODAL_TYPES as RESOURCE, UI_REDESIGN, loadI18n, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-frontend-extensions/change-history",
3
3
  "description": "Change history shared components and utilities",
4
- "version": "7.3.0",
4
+ "version": "7.3.1",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {
7
7
  "access": "public"