@leav/ui 1.5.0-98bf7b08 → 1.5.0-d52b4754

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 (41) hide show
  1. package/dist/__mocks__/common/library.d.ts +9 -0
  2. package/dist/_gqlTypes/index.d.ts +108 -12
  3. package/dist/_gqlTypes/index.js +62 -12
  4. package/dist/_gqlTypes/index.js.map +1 -1
  5. package/dist/_queries/libraries/libraryDetailsFragment.js +7 -0
  6. package/dist/_queries/libraries/libraryDetailsFragment.js.map +1 -1
  7. package/dist/components/Explorer/Explorer.js +1 -0
  8. package/dist/components/Explorer/Explorer.js.map +1 -1
  9. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
  10. package/dist/components/Explorer/useLoadView.js +0 -2
  11. package/dist/components/Explorer/useLoadView.js.map +1 -1
  12. package/dist/components/Filters/_types.d.ts +4 -0
  13. package/dist/components/Filters/_types.js.map +1 -1
  14. package/dist/components/Filters/context/filtersReducer.js +20 -10
  15. package/dist/components/Filters/context/filtersReducer.js.map +1 -1
  16. package/dist/components/Filters/context/useFiltersReducer.d.ts +2 -1
  17. package/dist/components/Filters/context/useFiltersReducer.js +9 -5
  18. package/dist/components/Filters/context/useFiltersReducer.js.map +1 -1
  19. package/dist/components/Filters/context/useGetTreeFilters.d.ts +15 -0
  20. package/dist/components/Filters/context/useGetTreeFilters.js +63 -0
  21. package/dist/components/Filters/context/useGetTreeFilters.js.map +1 -0
  22. package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js +6 -6
  23. package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -1
  24. package/dist/components/Filters/index.js.map +1 -1
  25. package/dist/components/Filters/prepareFiltersForRequest.js +14 -5
  26. package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
  27. package/dist/components/Filters/useFilters.d.ts +4 -0
  28. package/dist/components/Filters/useTransformFilters.d.ts +5 -1
  29. package/dist/components/Filters/useTransformFilters.js +26 -3
  30. package/dist/components/Filters/useTransformFilters.js.map +1 -1
  31. package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js +1 -1
  32. package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js.map +1 -1
  33. package/dist/components/SearchModal/SearchModal.js +1 -1
  34. package/dist/components/SearchModal/SearchModal.js.map +1 -1
  35. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +1 -1
  36. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
  37. package/dist/components/TreePicker/TreesList/TreesList.js +1 -1
  38. package/dist/components/TreePicker/TreesList/TreesList.js.map +1 -1
  39. package/dist/hooks/useIFrameMessenger/types.d.ts +3 -0
  40. package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
  41. package/package.json +2 -3
@@ -63,6 +63,15 @@ export declare const mockLibraryWithPreviewsSettings: {
63
63
  system: boolean;
64
64
  type: AttributeType;
65
65
  format?: AttributeFormat | null;
66
+ } | {
67
+ id: string;
68
+ label?: any | null;
69
+ system: boolean;
70
+ type: AttributeType;
71
+ format?: AttributeFormat | null;
72
+ linked_tree?: {
73
+ id: string;
74
+ } | null;
66
75
  }> | null;
67
76
  permissions_conf?: {
68
77
  relation: import("../../_gqlTypes").PermissionsRelation;
@@ -31,6 +31,10 @@ export type Scalars = {
31
31
  TaskPriority: any;
32
32
  Upload: any;
33
33
  };
34
+ export type AccessRecordByDefaultPermissionInput = {
35
+ attributeId: Scalars['ID'];
36
+ libraryId: Scalars['ID'];
37
+ };
34
38
  export type ActionConfigurationInput = {
35
39
  error_message?: InputMaybe<Scalars['SystemTranslationOptional']>;
36
40
  id: Scalars['ID'];
@@ -186,9 +190,12 @@ export declare enum AvailableLanguage {
186
190
  }
187
191
  export type CampaignToRenew = {
188
192
  category?: InputMaybe<Scalars['String']>;
193
+ circuitTypes?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
189
194
  endDate: Scalars['String'];
190
195
  id: Scalars['String'];
191
196
  label: Scalars['String'];
197
+ mixed: Scalars['Boolean'];
198
+ opTrade?: InputMaybe<Scalars['String']>;
192
199
  startDate: Scalars['String'];
193
200
  thematics?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
194
201
  type?: InputMaybe<Scalars['String']>;
@@ -279,16 +286,6 @@ export declare enum FormsSortableFields {
279
286
  library = "library",
280
287
  system = "system"
281
288
  }
282
- export declare enum GenerationStatus {
283
- DONE = "DONE",
284
- GENERATION_FAILED = "GENERATION_FAILED",
285
- GENERATION_IN_PROGRESS = "GENERATION_IN_PROGRESS",
286
- GENERATION_IN_PROGRESS_WITH_FAILURE = "GENERATION_IN_PROGRESS_WITH_FAILURE",
287
- PREPARATION_FAILED = "PREPARATION_FAILED",
288
- PREPARATION_IN_PROGRESS = "PREPARATION_IN_PROGRESS",
289
- TRANSMISSION_FAILED = "TRANSMISSION_FAILED",
290
- TRANSMISSION_IN_PROGRESS = "TRANSMISSION_IN_PROGRESS"
291
- }
292
289
  export type GlobalSettingsFileInput = {
293
290
  library: Scalars['String'];
294
291
  recordId: Scalars['String'];
@@ -1079,6 +1076,15 @@ export type LibraryDetailsFragment = {
1079
1076
  system: boolean;
1080
1077
  type: AttributeType;
1081
1078
  format?: AttributeFormat | null;
1079
+ } | {
1080
+ id: string;
1081
+ label?: any | null;
1082
+ system: boolean;
1083
+ type: AttributeType;
1084
+ format?: AttributeFormat | null;
1085
+ linked_tree?: {
1086
+ id: string;
1087
+ } | null;
1082
1088
  }> | null;
1083
1089
  permissions_conf?: {
1084
1090
  relation: PermissionsRelation;
@@ -1147,20 +1153,35 @@ export type LibraryAttributesLinkAttributeFragment = {
1147
1153
  behavior: LibraryBehavior;
1148
1154
  } | null;
1149
1155
  };
1150
- export type LibraryAttributesStandardAttributeTreeAttributeFragment = {
1156
+ export type LibraryAttributesStandardAttributeFragment = {
1151
1157
  id: string;
1152
1158
  label?: any | null;
1153
1159
  system: boolean;
1154
1160
  type: AttributeType;
1155
1161
  format?: AttributeFormat | null;
1156
1162
  };
1157
- export type LibraryAttributesFragment = LibraryAttributesLinkAttributeFragment | LibraryAttributesStandardAttributeTreeAttributeFragment;
1163
+ export type LibraryAttributesTreeAttributeFragment = {
1164
+ id: string;
1165
+ label?: any | null;
1166
+ system: boolean;
1167
+ type: AttributeType;
1168
+ format?: AttributeFormat | null;
1169
+ linked_tree?: {
1170
+ id: string;
1171
+ } | null;
1172
+ };
1173
+ export type LibraryAttributesFragment = LibraryAttributesLinkAttributeFragment | LibraryAttributesStandardAttributeFragment | LibraryAttributesTreeAttributeFragment;
1158
1174
  export type LibraryLinkAttributeDetailsFragment = {
1159
1175
  linked_library?: {
1160
1176
  id: string;
1161
1177
  behavior: LibraryBehavior;
1162
1178
  } | null;
1163
1179
  };
1180
+ export type LibraryTreeAttributeDetailsFragment = {
1181
+ linked_tree?: {
1182
+ id: string;
1183
+ } | null;
1184
+ };
1164
1185
  export type LibraryPreviewsSettingsFragment = {
1165
1186
  label: any;
1166
1187
  description?: any | null;
@@ -4166,6 +4187,15 @@ export type GetLibraryByIdQuery = {
4166
4187
  system: boolean;
4167
4188
  type: AttributeType;
4168
4189
  format?: AttributeFormat | null;
4190
+ } | {
4191
+ id: string;
4192
+ label?: any | null;
4193
+ system: boolean;
4194
+ type: AttributeType;
4195
+ format?: AttributeFormat | null;
4196
+ linked_tree?: {
4197
+ id: string;
4198
+ } | null;
4169
4199
  }> | null;
4170
4200
  permissions_conf?: {
4171
4201
  relation: PermissionsRelation;
@@ -4295,6 +4325,15 @@ export type SaveLibraryMutation = {
4295
4325
  system: boolean;
4296
4326
  type: AttributeType;
4297
4327
  format?: AttributeFormat | null;
4328
+ } | {
4329
+ id: string;
4330
+ label?: any | null;
4331
+ system: boolean;
4332
+ type: AttributeType;
4333
+ format?: AttributeFormat | null;
4334
+ linked_tree?: {
4335
+ id: string;
4336
+ } | null;
4298
4337
  }> | null;
4299
4338
  permissions_conf?: {
4300
4339
  relation: PermissionsRelation;
@@ -7138,6 +7177,28 @@ export type SaveViewMutation = {
7138
7177
  }> | null;
7139
7178
  };
7140
7179
  };
7180
+ export type TreeFilterByDefaultValuesQueryVariables = Exact<{
7181
+ treeId: Scalars['ID'];
7182
+ accessRecordByDefaultPermission?: InputMaybe<AccessRecordByDefaultPermissionInput>;
7183
+ }>;
7184
+ export type TreeFilterByDefaultValuesQuery = {
7185
+ treeNodeChildren: {
7186
+ list: Array<{
7187
+ accessRecordByDefaultPermission?: boolean | null;
7188
+ id: string;
7189
+ record: {
7190
+ id: string;
7191
+ whoAmI: {
7192
+ label?: string | null;
7193
+ id: string;
7194
+ library: {
7195
+ id: string;
7196
+ };
7197
+ };
7198
+ };
7199
+ }>;
7200
+ };
7201
+ };
7141
7202
  export type GetAttributesByLibWithPermissionsQueryVariables = Exact<{
7142
7203
  library: Scalars['String'];
7143
7204
  }>;
@@ -7745,6 +7806,7 @@ export declare const AttributesByLibLinkAttributeFragmentDoc: Apollo.DocumentNod
7745
7806
  export declare const AttributesByLibAttributeFragmentDoc: Apollo.DocumentNode;
7746
7807
  export declare const LibraryLightFragmentDoc: Apollo.DocumentNode;
7747
7808
  export declare const LibraryLinkAttributeDetailsFragmentDoc: Apollo.DocumentNode;
7809
+ export declare const LibraryTreeAttributeDetailsFragmentDoc: Apollo.DocumentNode;
7748
7810
  export declare const LibraryAttributesFragmentDoc: Apollo.DocumentNode;
7749
7811
  export declare const LibraryPreviewsSettingsFragmentDoc: Apollo.DocumentNode;
7750
7812
  export declare const LibraryDetailsFragmentDoc: Apollo.DocumentNode;
@@ -9434,6 +9496,40 @@ export declare function useSaveViewMutation(baseOptions?: Apollo.MutationHookOpt
9434
9496
  export type SaveViewMutationHookResult = ReturnType<typeof useSaveViewMutation>;
9435
9497
  export type SaveViewMutationResult = Apollo.MutationResult<SaveViewMutation>;
9436
9498
  export type SaveViewMutationOptions = Apollo.BaseMutationOptions<SaveViewMutation, SaveViewMutationVariables>;
9499
+ export declare const TreeFilterByDefaultValuesDocument: Apollo.DocumentNode;
9500
+ /**
9501
+ * __useTreeFilterByDefaultValuesQuery__
9502
+ *
9503
+ * To run a query within a React component, call `useTreeFilterByDefaultValuesQuery` and pass it any options that fit your needs.
9504
+ * When your component renders, `useTreeFilterByDefaultValuesQuery` returns an object from Apollo Client that contains loading, error, and data properties
9505
+ * you can use to render your UI.
9506
+ *
9507
+ * @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;
9508
+ *
9509
+ * @example
9510
+ * const { data, loading, error } = useTreeFilterByDefaultValuesQuery({
9511
+ * variables: {
9512
+ * treeId: // value for 'treeId'
9513
+ * accessRecordByDefaultPermission: // value for 'accessRecordByDefaultPermission'
9514
+ * },
9515
+ * });
9516
+ */
9517
+ export declare function useTreeFilterByDefaultValuesQuery(baseOptions: Apollo.QueryHookOptions<TreeFilterByDefaultValuesQuery, TreeFilterByDefaultValuesQueryVariables>): Apollo.QueryResult<TreeFilterByDefaultValuesQuery, Exact<{
9518
+ treeId: Scalars["ID"];
9519
+ accessRecordByDefaultPermission?: InputMaybe<AccessRecordByDefaultPermissionInput>;
9520
+ }>>;
9521
+ export declare function useTreeFilterByDefaultValuesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<TreeFilterByDefaultValuesQuery, TreeFilterByDefaultValuesQueryVariables>): Apollo.LazyQueryResultTuple<TreeFilterByDefaultValuesQuery, Exact<{
9522
+ treeId: Scalars["ID"];
9523
+ accessRecordByDefaultPermission?: InputMaybe<AccessRecordByDefaultPermissionInput>;
9524
+ }>>;
9525
+ export declare function useTreeFilterByDefaultValuesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<TreeFilterByDefaultValuesQuery, TreeFilterByDefaultValuesQueryVariables>): Apollo.UseSuspenseQueryResult<TreeFilterByDefaultValuesQuery, Exact<{
9526
+ treeId: Scalars["ID"];
9527
+ accessRecordByDefaultPermission?: InputMaybe<AccessRecordByDefaultPermissionInput>;
9528
+ }>>;
9529
+ export type TreeFilterByDefaultValuesQueryHookResult = ReturnType<typeof useTreeFilterByDefaultValuesQuery>;
9530
+ export type TreeFilterByDefaultValuesLazyQueryHookResult = ReturnType<typeof useTreeFilterByDefaultValuesLazyQuery>;
9531
+ export type TreeFilterByDefaultValuesSuspenseQueryHookResult = ReturnType<typeof useTreeFilterByDefaultValuesSuspenseQuery>;
9532
+ export type TreeFilterByDefaultValuesQueryResult = Apollo.QueryResult<TreeFilterByDefaultValuesQuery, TreeFilterByDefaultValuesQueryVariables>;
9437
9533
  export declare const GetAttributesByLibWithPermissionsDocument: Apollo.DocumentNode;
9438
9534
  /**
9439
9535
  * __useGetAttributesByLibWithPermissionsQuery__
@@ -88,17 +88,6 @@ export var FormsSortableFields;
88
88
  FormsSortableFields["library"] = "library";
89
89
  FormsSortableFields["system"] = "system";
90
90
  })(FormsSortableFields || (FormsSortableFields = {}));
91
- export var GenerationStatus;
92
- (function (GenerationStatus) {
93
- GenerationStatus["DONE"] = "DONE";
94
- GenerationStatus["GENERATION_FAILED"] = "GENERATION_FAILED";
95
- GenerationStatus["GENERATION_IN_PROGRESS"] = "GENERATION_IN_PROGRESS";
96
- GenerationStatus["GENERATION_IN_PROGRESS_WITH_FAILURE"] = "GENERATION_IN_PROGRESS_WITH_FAILURE";
97
- GenerationStatus["PREPARATION_FAILED"] = "PREPARATION_FAILED";
98
- GenerationStatus["PREPARATION_IN_PROGRESS"] = "PREPARATION_IN_PROGRESS";
99
- GenerationStatus["TRANSMISSION_FAILED"] = "TRANSMISSION_FAILED";
100
- GenerationStatus["TRANSMISSION_IN_PROGRESS"] = "TRANSMISSION_IN_PROGRESS";
101
- })(GenerationStatus || (GenerationStatus = {}));
102
91
  export var IoTypes;
103
92
  (function (IoTypes) {
104
93
  IoTypes["boolean"] = "boolean";
@@ -509,6 +498,13 @@ export const LibraryLinkAttributeDetailsFragmentDoc = gql `
509
498
  }
510
499
  }
511
500
  `;
501
+ export const LibraryTreeAttributeDetailsFragmentDoc = gql `
502
+ fragment LibraryTreeAttributeDetails on TreeAttribute {
503
+ linked_tree {
504
+ id
505
+ }
506
+ }
507
+ `;
512
508
  export const LibraryAttributesFragmentDoc = gql `
513
509
  fragment LibraryAttributes on Attribute {
514
510
  id
@@ -517,8 +513,10 @@ export const LibraryAttributesFragmentDoc = gql `
517
513
  type
518
514
  format
519
515
  ...LibraryLinkAttributeDetails
516
+ ...LibraryTreeAttributeDetails
520
517
  }
521
- ${LibraryLinkAttributeDetailsFragmentDoc}`;
518
+ ${LibraryLinkAttributeDetailsFragmentDoc}
519
+ ${LibraryTreeAttributeDetailsFragmentDoc}`;
522
520
  export const LibraryPreviewsSettingsFragmentDoc = gql `
523
521
  fragment LibraryPreviewsSettings on LibraryPreviewsSettings {
524
522
  label
@@ -3241,6 +3239,58 @@ export function useSaveViewMutation(baseOptions) {
3241
3239
  const options = { ...defaultOptions, ...baseOptions };
3242
3240
  return Apollo.useMutation(SaveViewDocument, options);
3243
3241
  }
3242
+ export const TreeFilterByDefaultValuesDocument = gql `
3243
+ query TreeFilterByDefaultValues($treeId: ID!, $accessRecordByDefaultPermission: AccessRecordByDefaultPermissionInput) {
3244
+ treeNodeChildren(
3245
+ treeId: $treeId
3246
+ accessRecordByDefaultPermission: $accessRecordByDefaultPermission
3247
+ ) {
3248
+ list {
3249
+ accessRecordByDefaultPermission
3250
+ id
3251
+ record {
3252
+ id
3253
+ whoAmI {
3254
+ label
3255
+ id
3256
+ library {
3257
+ id
3258
+ }
3259
+ }
3260
+ }
3261
+ }
3262
+ }
3263
+ }
3264
+ `;
3265
+ /**
3266
+ * __useTreeFilterByDefaultValuesQuery__
3267
+ *
3268
+ * To run a query within a React component, call `useTreeFilterByDefaultValuesQuery` and pass it any options that fit your needs.
3269
+ * When your component renders, `useTreeFilterByDefaultValuesQuery` returns an object from Apollo Client that contains loading, error, and data properties
3270
+ * you can use to render your UI.
3271
+ *
3272
+ * @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;
3273
+ *
3274
+ * @example
3275
+ * const { data, loading, error } = useTreeFilterByDefaultValuesQuery({
3276
+ * variables: {
3277
+ * treeId: // value for 'treeId'
3278
+ * accessRecordByDefaultPermission: // value for 'accessRecordByDefaultPermission'
3279
+ * },
3280
+ * });
3281
+ */
3282
+ export function useTreeFilterByDefaultValuesQuery(baseOptions) {
3283
+ const options = { ...defaultOptions, ...baseOptions };
3284
+ return Apollo.useQuery(TreeFilterByDefaultValuesDocument, options);
3285
+ }
3286
+ export function useTreeFilterByDefaultValuesLazyQuery(baseOptions) {
3287
+ const options = { ...defaultOptions, ...baseOptions };
3288
+ return Apollo.useLazyQuery(TreeFilterByDefaultValuesDocument, options);
3289
+ }
3290
+ export function useTreeFilterByDefaultValuesSuspenseQuery(baseOptions) {
3291
+ const options = { ...defaultOptions, ...baseOptions };
3292
+ return Apollo.useSuspenseQuery(TreeFilterByDefaultValuesDocument, options);
3293
+ }
3244
3294
  export const GetAttributesByLibWithPermissionsDocument = gql `
3245
3295
  query getAttributesByLibWithPermissions($library: String!) {
3246
3296
  attributes(filters: {libraries: [$library]}) {