@leav/ui 1.8.0-26bc59b6 → 1.8.0-c4bc6f9a
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/dist/_gqlTypes/index.d.ts +91 -0
- package/dist/_gqlTypes/index.js +55 -0
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +3 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +17 -8
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
- package/dist/components/Filters/_types.d.ts +12 -1
- package/dist/components/Filters/_types.js +2 -1
- package/dist/components/Filters/_types.js.map +1 -1
- package/dist/components/Filters/context/filtersReducer.js +3 -2
- package/dist/components/Filters/context/filtersReducer.js.map +1 -1
- package/dist/components/Filters/filter-items/CommonFilterItem.js +2 -2
- package/dist/components/Filters/filter-items/CommonFilterItem.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js +5 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js +3 -3
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/_types.d.ts +6 -1
- package/dist/components/Filters/filter-items/filter-type/_types.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/smart-filter/SmartFilterAttributeDropdown.d.ts +2 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/SmartFilterAttributeDropdown.js +106 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/SmartFilterAttributeDropdown.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useGetSmartFilterData.d.ts +25 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useGetSmartFilterData.js +59 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useGetSmartFilterData.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useSmartFilerSearch.d.ts +5 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useSmartFilerSearch.js +25 -0
- package/dist/components/Filters/filter-items/filter-type/smart-filter/useSmartFilerSearch.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js +5 -4
- package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/{EmptyValueCheckbox.d.ts → shared/EmptyValueCheckbox.d.ts} +2 -1
- package/dist/components/Filters/filter-items/shared/EmptyValueCheckbox.js +20 -0
- package/dist/components/Filters/filter-items/shared/EmptyValueCheckbox.js.map +1 -0
- package/dist/components/Filters/filter-items/shared/FilterTreeNodeTitle.d.ts +5 -0
- package/dist/components/Filters/filter-items/shared/FilterTreeNodeTitle.js +18 -0
- package/dist/components/Filters/filter-items/shared/FilterTreeNodeTitle.js.map +1 -0
- package/dist/components/Filters/filter-items/{SelectAllCheckbox.js → shared/SelectAllCheckbox.js} +1 -1
- package/dist/components/Filters/filter-items/shared/SelectAllCheckbox.js.map +1 -0
- package/dist/components/Filters/prepareFiltersForRequest.js +10 -5
- package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/Filters/useFilters.d.ts +542 -0
- package/dist/components/Filters/useTransformFilters.js +3 -0
- package/dist/components/Filters/useTransformFilters.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Filters/filter-items/EmptyValueCheckbox.js +0 -16
- package/dist/components/Filters/filter-items/EmptyValueCheckbox.js.map +0 -1
- package/dist/components/Filters/filter-items/SelectAllCheckbox.js.map +0 -1
- /package/dist/components/Filters/filter-items/{SelectAllCheckbox.d.ts → shared/SelectAllCheckbox.d.ts} +0 -0
|
@@ -986,6 +986,9 @@ export type AttributeDetailsLinkAttributeFragment = {
|
|
|
986
986
|
id: string;
|
|
987
987
|
label?: any | null;
|
|
988
988
|
} | null;
|
|
989
|
+
smart_filter?: {
|
|
990
|
+
enable: boolean;
|
|
991
|
+
} | null;
|
|
989
992
|
metadata_fields?: Array<{
|
|
990
993
|
id: string;
|
|
991
994
|
label?: any | null;
|
|
@@ -3321,6 +3324,9 @@ export type AttributesByLibAttributeWithPermissionsLinkAttributeFragment = {
|
|
|
3321
3324
|
linked_library?: {
|
|
3322
3325
|
id: string;
|
|
3323
3326
|
} | null;
|
|
3327
|
+
smart_filter?: {
|
|
3328
|
+
enable: boolean;
|
|
3329
|
+
} | null;
|
|
3324
3330
|
};
|
|
3325
3331
|
export type AttributesByLibAttributeWithPermissionsStandardAttributeFragment = {
|
|
3326
3332
|
id: string;
|
|
@@ -3407,6 +3413,9 @@ export type AttributesByLibLinkAttributeWithPermissionsFragment = {
|
|
|
3407
3413
|
linked_library?: {
|
|
3408
3414
|
id: string;
|
|
3409
3415
|
} | null;
|
|
3416
|
+
smart_filter?: {
|
|
3417
|
+
enable: boolean;
|
|
3418
|
+
} | null;
|
|
3410
3419
|
};
|
|
3411
3420
|
export type StandardAttributeDetailsFragment = {
|
|
3412
3421
|
id: string;
|
|
@@ -3444,6 +3453,9 @@ export type LinkAttributeDetailsFragment = {
|
|
|
3444
3453
|
};
|
|
3445
3454
|
}> | null;
|
|
3446
3455
|
} | null;
|
|
3456
|
+
smart_filter?: {
|
|
3457
|
+
enable: boolean;
|
|
3458
|
+
} | null;
|
|
3447
3459
|
};
|
|
3448
3460
|
export type TreeAttributeDetailsFragment = {
|
|
3449
3461
|
id: string;
|
|
@@ -3808,6 +3820,9 @@ export type GetAttributeByIdQuery = {
|
|
|
3808
3820
|
id: string;
|
|
3809
3821
|
label?: any | null;
|
|
3810
3822
|
} | null;
|
|
3823
|
+
smart_filter?: {
|
|
3824
|
+
enable: boolean;
|
|
3825
|
+
} | null;
|
|
3811
3826
|
metadata_fields?: Array<{
|
|
3812
3827
|
id: string;
|
|
3813
3828
|
label?: any | null;
|
|
@@ -4031,6 +4046,9 @@ export type SaveAttributeMutation = {
|
|
|
4031
4046
|
id: string;
|
|
4032
4047
|
label?: any | null;
|
|
4033
4048
|
} | null;
|
|
4049
|
+
smart_filter?: {
|
|
4050
|
+
enable: boolean;
|
|
4051
|
+
} | null;
|
|
4034
4052
|
metadata_fields?: Array<{
|
|
4035
4053
|
id: string;
|
|
4036
4054
|
label?: any | null;
|
|
@@ -7488,6 +7506,9 @@ export type GetAttributesByLibWithPermissionsQuery = {
|
|
|
7488
7506
|
linked_library?: {
|
|
7489
7507
|
id: string;
|
|
7490
7508
|
} | null;
|
|
7509
|
+
smart_filter?: {
|
|
7510
|
+
enable: boolean;
|
|
7511
|
+
} | null;
|
|
7491
7512
|
permissions: {
|
|
7492
7513
|
access_attribute: boolean;
|
|
7493
7514
|
};
|
|
@@ -7582,6 +7603,9 @@ export type ExplorerAttributesQuery = {
|
|
|
7582
7603
|
};
|
|
7583
7604
|
}> | null;
|
|
7584
7605
|
} | null;
|
|
7606
|
+
smart_filter?: {
|
|
7607
|
+
enable: boolean;
|
|
7608
|
+
} | null;
|
|
7585
7609
|
permissions: {
|
|
7586
7610
|
access_attribute: boolean;
|
|
7587
7611
|
};
|
|
@@ -7647,6 +7671,9 @@ export type ExplorerLinkAttributeQuery = {
|
|
|
7647
7671
|
};
|
|
7648
7672
|
}> | null;
|
|
7649
7673
|
} | null;
|
|
7674
|
+
smart_filter?: {
|
|
7675
|
+
enable: boolean;
|
|
7676
|
+
} | null;
|
|
7650
7677
|
permissions: {
|
|
7651
7678
|
access_attribute: boolean;
|
|
7652
7679
|
edit_value: boolean;
|
|
@@ -8025,6 +8052,30 @@ export type UpdateViewMutation = {
|
|
|
8025
8052
|
}> | null;
|
|
8026
8053
|
};
|
|
8027
8054
|
};
|
|
8055
|
+
export type SmartFilterListValuesQueryVariables = Exact<{
|
|
8056
|
+
library: Scalars['ID']['input'];
|
|
8057
|
+
attribute: Scalars['ID']['input'];
|
|
8058
|
+
recordFilters?: InputMaybe<Array<InputMaybe<RecordFilterInput>> | InputMaybe<RecordFilterInput>>;
|
|
8059
|
+
}>;
|
|
8060
|
+
export type SmartFilterListValuesQuery = {
|
|
8061
|
+
listDistinctValues?: Array<{
|
|
8062
|
+
count: number;
|
|
8063
|
+
value?: {
|
|
8064
|
+
id: string;
|
|
8065
|
+
whoAmI: {
|
|
8066
|
+
id: string;
|
|
8067
|
+
label?: string | null;
|
|
8068
|
+
subLabel?: string | null;
|
|
8069
|
+
color?: string | null;
|
|
8070
|
+
preview?: IPreviewScalar | null;
|
|
8071
|
+
library: {
|
|
8072
|
+
id: string;
|
|
8073
|
+
label?: any | null;
|
|
8074
|
+
};
|
|
8075
|
+
};
|
|
8076
|
+
} | null;
|
|
8077
|
+
}> | null;
|
|
8078
|
+
};
|
|
8028
8079
|
export type NotificationSubscriptionVariables = Exact<{
|
|
8029
8080
|
[key: string]: never;
|
|
8030
8081
|
}>;
|
|
@@ -10369,6 +10420,46 @@ export declare function useUpdateViewMutation(baseOptions?: Apollo.MutationHookO
|
|
|
10369
10420
|
export type UpdateViewMutationHookResult = ReturnType<typeof useUpdateViewMutation>;
|
|
10370
10421
|
export type UpdateViewMutationResult = Apollo.MutationResult<UpdateViewMutation>;
|
|
10371
10422
|
export type UpdateViewMutationOptions = Apollo.BaseMutationOptions<UpdateViewMutation, UpdateViewMutationVariables>;
|
|
10423
|
+
export declare const SmartFilterListValuesDocument: Apollo.DocumentNode;
|
|
10424
|
+
/**
|
|
10425
|
+
* __useSmartFilterListValuesQuery__
|
|
10426
|
+
*
|
|
10427
|
+
* To run a query within a React component, call `useSmartFilterListValuesQuery` and pass it any options that fit your needs.
|
|
10428
|
+
* When your component renders, `useSmartFilterListValuesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
10429
|
+
* you can use to render your UI.
|
|
10430
|
+
*
|
|
10431
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
10432
|
+
*
|
|
10433
|
+
* @example
|
|
10434
|
+
* const { data, loading, error } = useSmartFilterListValuesQuery({
|
|
10435
|
+
* variables: {
|
|
10436
|
+
* library: // value for 'library'
|
|
10437
|
+
* attribute: // value for 'attribute'
|
|
10438
|
+
* recordFilters: // value for 'recordFilters'
|
|
10439
|
+
* },
|
|
10440
|
+
* });
|
|
10441
|
+
*/
|
|
10442
|
+
export declare function useSmartFilterListValuesQuery(baseOptions: Apollo.QueryHookOptions<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables> & ({
|
|
10443
|
+
variables: SmartFilterListValuesQueryVariables;
|
|
10444
|
+
skip?: boolean;
|
|
10445
|
+
} | {
|
|
10446
|
+
skip: boolean;
|
|
10447
|
+
})): Apollo.QueryResult<SmartFilterListValuesQuery, Exact<{
|
|
10448
|
+
library: Scalars["ID"]["input"];
|
|
10449
|
+
attribute: Scalars["ID"]["input"];
|
|
10450
|
+
recordFilters?: InputMaybe<Array<InputMaybe<RecordFilterInput>> | InputMaybe<RecordFilterInput>>;
|
|
10451
|
+
}>>;
|
|
10452
|
+
export declare function useSmartFilterListValuesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables>): Apollo.LazyQueryResultTuple<SmartFilterListValuesQuery, Exact<{
|
|
10453
|
+
library: Scalars["ID"]["input"];
|
|
10454
|
+
attribute: Scalars["ID"]["input"];
|
|
10455
|
+
recordFilters?: InputMaybe<Array<InputMaybe<RecordFilterInput>> | InputMaybe<RecordFilterInput>>;
|
|
10456
|
+
}>>;
|
|
10457
|
+
export declare function useSmartFilterListValuesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables>): Apollo.UseSuspenseQueryResult<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables>;
|
|
10458
|
+
export declare function useSmartFilterListValuesSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables>): Apollo.UseSuspenseQueryResult<SmartFilterListValuesQuery | undefined, SmartFilterListValuesQueryVariables>;
|
|
10459
|
+
export type SmartFilterListValuesQueryHookResult = ReturnType<typeof useSmartFilterListValuesQuery>;
|
|
10460
|
+
export type SmartFilterListValuesLazyQueryHookResult = ReturnType<typeof useSmartFilterListValuesLazyQuery>;
|
|
10461
|
+
export type SmartFilterListValuesSuspenseQueryHookResult = ReturnType<typeof useSmartFilterListValuesSuspenseQuery>;
|
|
10462
|
+
export type SmartFilterListValuesQueryResult = Apollo.QueryResult<SmartFilterListValuesQuery, SmartFilterListValuesQueryVariables>;
|
|
10372
10463
|
export declare const NotificationDocument: Apollo.DocumentNode;
|
|
10373
10464
|
/**
|
|
10374
10465
|
* __useNotificationSubscription__
|
package/dist/_gqlTypes/index.js
CHANGED
|
@@ -435,6 +435,9 @@ export const AttributeDetailsFragmentDoc = gql `
|
|
|
435
435
|
label
|
|
436
436
|
}
|
|
437
437
|
reverse_link
|
|
438
|
+
smart_filter {
|
|
439
|
+
enable
|
|
440
|
+
}
|
|
438
441
|
}
|
|
439
442
|
... on TreeAttribute {
|
|
440
443
|
linked_tree {
|
|
@@ -973,6 +976,9 @@ export const AttributesByLibLinkAttributeWithPermissionsFragmentDoc = gql `
|
|
|
973
976
|
linked_library {
|
|
974
977
|
id
|
|
975
978
|
}
|
|
979
|
+
smart_filter {
|
|
980
|
+
enable
|
|
981
|
+
}
|
|
976
982
|
}
|
|
977
983
|
${RecordIdentityFragmentDoc}`;
|
|
978
984
|
export const AttributesByLibAttributeWithPermissionsFragmentDoc = gql `
|
|
@@ -1055,6 +1061,9 @@ export const LinkAttributeDetailsFragmentDoc = gql `
|
|
|
1055
1061
|
}
|
|
1056
1062
|
}
|
|
1057
1063
|
}
|
|
1064
|
+
smart_filter {
|
|
1065
|
+
enable
|
|
1066
|
+
}
|
|
1058
1067
|
}
|
|
1059
1068
|
`;
|
|
1060
1069
|
export const TreeAttributeDetailsFragmentDoc = gql `
|
|
@@ -3972,6 +3981,52 @@ export function useUpdateViewMutation(baseOptions) {
|
|
|
3972
3981
|
const options = { ...defaultOptions, ...baseOptions };
|
|
3973
3982
|
return Apollo.useMutation(UpdateViewDocument, options);
|
|
3974
3983
|
}
|
|
3984
|
+
export const SmartFilterListValuesDocument = gql `
|
|
3985
|
+
query SmartFilterListValues($library: ID!, $attribute: ID!, $recordFilters: [RecordFilterInput]) {
|
|
3986
|
+
listDistinctValues(
|
|
3987
|
+
library: $library
|
|
3988
|
+
attribute: $attribute
|
|
3989
|
+
recordFilters: $recordFilters
|
|
3990
|
+
) {
|
|
3991
|
+
... on LinkDistinctValues {
|
|
3992
|
+
count
|
|
3993
|
+
value {
|
|
3994
|
+
...RecordIdentity
|
|
3995
|
+
}
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
}
|
|
3999
|
+
${RecordIdentityFragmentDoc}`;
|
|
4000
|
+
/**
|
|
4001
|
+
* __useSmartFilterListValuesQuery__
|
|
4002
|
+
*
|
|
4003
|
+
* To run a query within a React component, call `useSmartFilterListValuesQuery` and pass it any options that fit your needs.
|
|
4004
|
+
* When your component renders, `useSmartFilterListValuesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
4005
|
+
* you can use to render your UI.
|
|
4006
|
+
*
|
|
4007
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
4008
|
+
*
|
|
4009
|
+
* @example
|
|
4010
|
+
* const { data, loading, error } = useSmartFilterListValuesQuery({
|
|
4011
|
+
* variables: {
|
|
4012
|
+
* library: // value for 'library'
|
|
4013
|
+
* attribute: // value for 'attribute'
|
|
4014
|
+
* recordFilters: // value for 'recordFilters'
|
|
4015
|
+
* },
|
|
4016
|
+
* });
|
|
4017
|
+
*/
|
|
4018
|
+
export function useSmartFilterListValuesQuery(baseOptions) {
|
|
4019
|
+
const options = { ...defaultOptions, ...baseOptions };
|
|
4020
|
+
return Apollo.useQuery(SmartFilterListValuesDocument, options);
|
|
4021
|
+
}
|
|
4022
|
+
export function useSmartFilterListValuesLazyQuery(baseOptions) {
|
|
4023
|
+
const options = { ...defaultOptions, ...baseOptions };
|
|
4024
|
+
return Apollo.useLazyQuery(SmartFilterListValuesDocument, options);
|
|
4025
|
+
}
|
|
4026
|
+
export function useSmartFilterListValuesSuspenseQuery(baseOptions) {
|
|
4027
|
+
const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
|
|
4028
|
+
return Apollo.useSuspenseQuery(SmartFilterListValuesDocument, options);
|
|
4029
|
+
}
|
|
3975
4030
|
export const NotificationDocument = gql `
|
|
3976
4031
|
subscription Notification {
|
|
3977
4032
|
notification {
|