@commercetools-frontend-extensions/change-history 8.39.0 → 8.40.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.
@@ -5,6 +5,9 @@ import type { TAppliedFilterValue } from '@commercetools-uikit/filters/dist/decl
5
5
  import type { ReactElement, ReactNode } from 'react';
6
6
  import type { TFilterKey, TFilterOperator, TResourceType } from "../../../../constants/index.js";
7
7
  import type { TSearchQuery } from "../../../../hooks/use-search-query-state/types.js";
8
+ import { TOption } from '@commercetools-frontend/ui-kit';
9
+ import { TierLevels } from "../../../../../types/src/generated/change-history.js";
10
+ import { TAvailableFilters } from "../../../../types/filters-types.js";
8
11
  export type TOperatorOption = {
9
12
  value: TFilterOperator;
10
13
  label: ReactNode;
@@ -24,7 +27,22 @@ type TCommonFilterConfigProps = {
24
27
  type TCreateFilterConfigurationsProps = {
25
28
  intl: IntlShape;
26
29
  allowedResourceTypes: TResourceType[];
30
+ canViewBusinessUnits: boolean;
31
+ canViewStores: boolean;
32
+ isPremiumFiltersDisabled: boolean;
27
33
  commonFilterProps: TCommonFilterConfigProps;
34
+ tier: TierLevels;
35
+ totalBusinessUnits: number;
36
+ isBusinessUnitsLoading: boolean;
37
+ totalStores: number;
38
+ isStoresLoading: boolean;
39
+ membersOptions: TOption[];
40
+ apiClientsOptions: TOption[];
41
+ sourceOptions: TOption[];
42
+ inContextFilterKeys?: TAvailableFilters;
43
+ canViewDeveloperSettings: boolean;
44
+ projectKey: string | undefined;
45
+ allAccessibleStoreKeysThroughDataFencePermissions: string[];
28
46
  };
29
47
  export type TBaseCreateFilterConfigProps = TCommonFilterConfigProps & {
30
48
  key: TFilterKey;
@@ -32,5 +50,5 @@ export type TBaseCreateFilterConfigProps = TCommonFilterConfigProps & {
32
50
  tooltip?: ReactElement;
33
51
  groupKey?: string;
34
52
  };
35
- export declare const createFilterConfigurations: ({ allowedResourceTypes, intl, commonFilterProps, }: TCreateFilterConfigurationsProps) => TFilterConfiguration[];
53
+ export declare const createFilterConfigurations: ({ allowedResourceTypes, isPremiumFiltersDisabled, intl, canViewBusinessUnits, canViewStores, membersOptions, apiClientsOptions, sourceOptions, inContextFilterKeys, canViewDeveloperSettings, commonFilterProps, totalBusinessUnits, isBusinessUnitsLoading, totalStores, isStoresLoading, projectKey, allAccessibleStoreKeysThroughDataFencePermissions, }: TCreateFilterConfigurationsProps) => TFilterConfiguration[];
36
54
  export {};
@@ -13,10 +13,9 @@ export declare const FILTER_KEY: {
13
13
  readonly CREATED_AT: "date";
14
14
  readonly CREATED_BY: "userId";
15
15
  readonly CUSTOMER_ID: "customerId";
16
- readonly EXCLUDE_PLATFORM_CHANGES: "excludePlatformInitiatedChanges";
17
- readonly IS_PLATFORM_CLIENT: "isPlatformClient";
18
16
  readonly RESOURCE_ID: "resourceId";
19
- readonly RESOURCE_TYPE: "resourceType";
17
+ readonly RESOURCE_TYPES: "resourceTypes";
18
+ readonly SOURCES: "sources";
20
19
  readonly STORES: "stores";
21
20
  };
22
21
  export type TFilterKey = ValueOf<typeof FILTER_KEY>;
@@ -1,5 +1,6 @@
1
1
  import { type JSX } from 'react';
2
2
  import { OptionProps } from 'react-select';
3
+ import type { TFilterKey } from "../constants/index.js";
3
4
  import type { TDateRangeFilterValue } from "../hooks/use-search-query-state/types.js";
4
5
  import { TUser } from "../../types/src/generated/change-history.js";
5
6
  import { TChangeType, TResourceTypes } from "../components/_types/change-history.js";
@@ -10,7 +11,7 @@ import { TTextFilterValue } from "../components/search/standard-filters/text-fil
10
11
  import { FILTER_OPTION_KEYS, TFilterOptionKey, TFilterType, TFilterTypeKeys, TResourceType, TToolOptions } from "../constants/index.js";
11
12
  import { TIntl, ValueOf } from "./common-types.js";
12
13
  export type TAvailableFilter = {
13
- key: TFilterOptionKey;
14
+ key: TFilterOptionKey | TFilterKey;
14
15
  resources?: Array<TResourceType>;
15
16
  };
16
17
  export type TAvailableFilters = Array<TAvailableFilter>;
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": "8.39.0",
4
+ "version": "8.40.0",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -86,12 +86,14 @@
86
86
  "@commercetools-frontend/sentry": "22.x || 23.x || 24.x || fec-156-react19",
87
87
  "@commercetools-frontend/ui-kit": "^19.22.6 || 20.x || fec-155-react-19",
88
88
  "@commercetools-uikit/design-system": "^19.22.6 || 20.x || fec-155-react-19",
89
+ "@commercetools-uikit/filters": "^19.22.6 || 20.x || fec-155-react-19",
89
90
  "@commercetools-uikit/radio-input": "^19.22.6 || 20.x || fec-155-react-19",
90
91
  "msw": "1.3.3",
91
92
  "react": "17.x || 18.x || 19.x",
92
93
  "react-dom": "17.x || 18.x || 19.x",
93
94
  "react-intl": "6.x || 7.x",
94
- "react-router-dom": "5.x"
95
+ "react-router-dom": "5.x",
96
+ "react-select": "5.8.0"
95
97
  },
96
98
  "engines": {
97
99
  "node": "^20",