@trackunit/filters-asset-filter-definitions 0.0.531 → 0.0.534

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 (43) hide show
  1. package/index.cjs.js +186 -26
  2. package/index.esm.js +186 -26
  3. package/package.json +1 -1
  4. package/src/defaultFilters/defaults/SiteDepotOwnershipIdsFilter.d.ts +13 -0
  5. package/src/generated/graphql-api/gql.d.ts +2 -2
  6. package/src/generated/graphql-api/graphql.d.ts +26 -0
  7. package/src/generated/graphql-api/mock.d.ts +3 -0
  8. package/src/hooks/useDefaultAssetFilterBarDefinition.d.ts +6 -1
  9. package/src/translation.d.ts +2 -2
  10. package/translation.cjs.js +2 -0
  11. package/translation.cjs10.js +2 -0
  12. package/translation.cjs11.js +2 -0
  13. package/translation.cjs12.js +2 -0
  14. package/translation.cjs13.js +2 -0
  15. package/translation.cjs14.js +2 -0
  16. package/translation.cjs15.js +2 -0
  17. package/translation.cjs16.js +2 -0
  18. package/translation.cjs17.js +2 -0
  19. package/translation.cjs2.js +2 -0
  20. package/translation.cjs3.js +2 -0
  21. package/translation.cjs4.js +2 -0
  22. package/translation.cjs5.js +2 -0
  23. package/translation.cjs6.js +2 -0
  24. package/translation.cjs7.js +2 -0
  25. package/translation.cjs8.js +2 -0
  26. package/translation.cjs9.js +2 -0
  27. package/translation.esm.js +2 -0
  28. package/translation.esm10.js +2 -0
  29. package/translation.esm11.js +2 -0
  30. package/translation.esm12.js +2 -0
  31. package/translation.esm13.js +2 -0
  32. package/translation.esm14.js +2 -0
  33. package/translation.esm15.js +2 -0
  34. package/translation.esm16.js +2 -0
  35. package/translation.esm17.js +2 -0
  36. package/translation.esm2.js +2 -0
  37. package/translation.esm3.js +2 -0
  38. package/translation.esm4.js +2 -0
  39. package/translation.esm5.js +2 -0
  40. package/translation.esm6.js +2 -0
  41. package/translation.esm7.js +2 -0
  42. package/translation.esm8.js +2 -0
  43. package/translation.esm9.js +2 -0
package/index.cjs.js CHANGED
@@ -179,6 +179,7 @@ var defaultTranslations = {
179
179
  "fleetlist.column.name": "Name",
180
180
  "fleetlist.column.owner": "Owner",
181
181
  "fleetlist.column.servicePlanStatus": "Service Plan Status",
182
+ "fleetlist.column.siteDepotOwnershipIds": "Owning depot",
182
183
  "fleetlist.column.siteIds": "Sites",
183
184
  "fleetlist.column.siteStatus": "Site status",
184
185
  "fleetlist.column.siteType": "Site Type",
@@ -250,7 +251,8 @@ var defaultTranslations = {
250
251
  "siteFilters.siteType.DEPOT": "Depot",
251
252
  "siteFilters.siteType.NOT_ON_SITE": "Not on site",
252
253
  "siteFilters.siteType.unknown": "Unknown",
253
- "siteFilters.siteType.WORK_PLACE": "Workplace"
254
+ "siteFilters.siteType.WORK_PLACE": "Workplace",
255
+ "siteOwningDepot.unknown": "Unknown"
254
256
  };
255
257
 
256
258
  /** The translation namespace for this library */
@@ -1291,6 +1293,98 @@ const GetSiteIdSummaryDocument = {
1291
1293
  },
1292
1294
  ],
1293
1295
  };
1296
+ const GetSiteDepotOwnershipIdSummaryDocument = {
1297
+ kind: "Document",
1298
+ definitions: [
1299
+ {
1300
+ kind: "OperationDefinition",
1301
+ operation: "query",
1302
+ name: { kind: "Name", value: "GetSiteDepotOwnershipIdSummary" },
1303
+ variableDefinitions: [
1304
+ {
1305
+ kind: "VariableDefinition",
1306
+ variable: { kind: "Variable", name: { kind: "Name", value: "filters" } },
1307
+ type: { kind: "NamedType", name: { kind: "Name", value: "AssetFiltersInput" } },
1308
+ },
1309
+ {
1310
+ kind: "VariableDefinition",
1311
+ variable: { kind: "Variable", name: { kind: "Name", value: "search" } },
1312
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } },
1313
+ },
1314
+ {
1315
+ kind: "VariableDefinition",
1316
+ variable: { kind: "Variable", name: { kind: "Name", value: "limit" } },
1317
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Int" } } },
1318
+ },
1319
+ ],
1320
+ selectionSet: {
1321
+ kind: "SelectionSet",
1322
+ selections: [
1323
+ {
1324
+ kind: "Field",
1325
+ name: { kind: "Name", value: "assetSummary" },
1326
+ arguments: [
1327
+ {
1328
+ kind: "Argument",
1329
+ name: { kind: "Name", value: "filters" },
1330
+ value: { kind: "Variable", name: { kind: "Name", value: "filters" } },
1331
+ },
1332
+ ],
1333
+ selectionSet: {
1334
+ kind: "SelectionSet",
1335
+ selections: [
1336
+ {
1337
+ kind: "Field",
1338
+ name: { kind: "Name", value: "owningDepots" },
1339
+ arguments: [
1340
+ {
1341
+ kind: "Argument",
1342
+ name: { kind: "Name", value: "filter" },
1343
+ value: { kind: "Variable", name: { kind: "Name", value: "search" } },
1344
+ },
1345
+ {
1346
+ kind: "Argument",
1347
+ name: { kind: "Name", value: "limit" },
1348
+ value: { kind: "Variable", name: { kind: "Name", value: "limit" } },
1349
+ },
1350
+ ],
1351
+ selectionSet: {
1352
+ kind: "SelectionSet",
1353
+ selections: [
1354
+ { kind: "Field", name: { kind: "Name", value: "total" } },
1355
+ {
1356
+ kind: "Field",
1357
+ name: { kind: "Name", value: "summary" },
1358
+ selectionSet: {
1359
+ kind: "SelectionSet",
1360
+ selections: [
1361
+ {
1362
+ kind: "Field",
1363
+ name: { kind: "Name", value: "site" },
1364
+ selectionSet: {
1365
+ kind: "SelectionSet",
1366
+ selections: [
1367
+ { kind: "Field", name: { kind: "Name", value: "id" } },
1368
+ { kind: "Field", name: { kind: "Name", value: "siteId" } },
1369
+ { kind: "Field", name: { kind: "Name", value: "name" } },
1370
+ ],
1371
+ },
1372
+ },
1373
+ { kind: "Field", name: { kind: "Name", value: "count" } },
1374
+ ],
1375
+ },
1376
+ },
1377
+ ],
1378
+ },
1379
+ },
1380
+ ],
1381
+ },
1382
+ },
1383
+ ],
1384
+ },
1385
+ },
1386
+ ],
1387
+ };
1294
1388
  const GetCustomerIdSummaryDocument = {
1295
1389
  kind: "Document",
1296
1390
  definitions: [
@@ -1886,7 +1980,7 @@ const useAssetTypeFilter = ({ showTypes } = { showTypes: ALL_TYPES }) => {
1886
1980
  return result;
1887
1981
  };
1888
1982
 
1889
- const FETCH_LIMIT$7 = 1000;
1983
+ const FETCH_LIMIT$8 = 1000;
1890
1984
  const BrandFilterView = (props) => {
1891
1985
  var _a, _b;
1892
1986
  const { getMachineTypeTranslation } = translationsMachineType.useMachineTypeTranslations();
@@ -1897,7 +1991,7 @@ const BrandFilterView = (props) => {
1897
1991
  const { data, loading } = client.useQuery(GetFleetBrandsSummaryDocument, {
1898
1992
  fetchPolicy: "cache-first",
1899
1993
  variables: {
1900
- limit: FETCH_LIMIT$7,
1994
+ limit: FETCH_LIMIT$8,
1901
1995
  search: debouncedSearch.trim(),
1902
1996
  filters: {
1903
1997
  ...activeFilters,
@@ -1912,7 +2006,7 @@ const BrandFilterView = (props) => {
1912
2006
  count: brand.count,
1913
2007
  label: getMachineTypeTranslation(brand.key),
1914
2008
  }))) !== null && _c !== void 0 ? _c : [];
1915
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$7);
2009
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$8);
1916
2010
  return result;
1917
2011
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.brands) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
1918
2012
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -2015,7 +2109,7 @@ const useCriticalityFilter = () => {
2015
2109
  return result;
2016
2110
  };
2017
2111
 
2018
- const FETCH_LIMIT$6 = 1000;
2112
+ const FETCH_LIMIT$7 = 1000;
2019
2113
  const CustomerIdsFilterView = (props) => {
2020
2114
  var _a, _b;
2021
2115
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
@@ -2025,7 +2119,7 @@ const CustomerIdsFilterView = (props) => {
2025
2119
  const { data, loading } = client.useQuery(GetCustomerIdSummaryDocument, {
2026
2120
  fetchPolicy: "cache-first",
2027
2121
  variables: {
2028
- limit: FETCH_LIMIT$6,
2122
+ limit: FETCH_LIMIT$7,
2029
2123
  search: debouncedSearch,
2030
2124
  filters: {
2031
2125
  ...activeFilters,
@@ -2043,7 +2137,7 @@ const CustomerIdsFilterView = (props) => {
2043
2137
  label: ((_b = customerEdge.customer) === null || _b === void 0 ? void 0 : _b.name) || "Unknown",
2044
2138
  });
2045
2139
  })) !== null && _c !== void 0 ? _c : [];
2046
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$6);
2140
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$7);
2047
2141
  return result;
2048
2142
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.customers) === null || _b === void 0 ? void 0 : _b.summary]);
2049
2143
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -2111,7 +2205,7 @@ const useFollowedFilter = () => {
2111
2205
  return result;
2112
2206
  };
2113
2207
 
2114
- const FETCH_LIMIT$5 = 1000;
2208
+ const FETCH_LIMIT$6 = 1000;
2115
2209
  const GroupIdsFilterView = (props) => {
2116
2210
  var _a;
2117
2211
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
@@ -2121,7 +2215,7 @@ const GroupIdsFilterView = (props) => {
2121
2215
  const { data, loading } = client.useQuery(GetFleetGroupSummaryDocument, {
2122
2216
  fetchPolicy: "cache-first",
2123
2217
  variables: {
2124
- limit: FETCH_LIMIT$5,
2218
+ limit: FETCH_LIMIT$6,
2125
2219
  search: debouncedSearch,
2126
2220
  filters: {
2127
2221
  ...activeFilters,
@@ -2139,7 +2233,7 @@ const GroupIdsFilterView = (props) => {
2139
2233
  label: ((_b = edge.group) === null || _b === void 0 ? void 0 : _b.name) || "Unknown",
2140
2234
  });
2141
2235
  })) !== null && _c !== void 0 ? _c : [];
2142
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
2236
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$6);
2143
2237
  if (((_e = (_d = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _d === void 0 ? void 0 : _d.groups) === null || _e === void 0 ? void 0 : _e.missing) && data.assetSummary.groups.missing > 0) {
2144
2238
  result.push({
2145
2239
  key: "UNDEFINED",
@@ -2342,7 +2436,7 @@ const useMetadataCompletenessFilter = ({ isDefault } = {}) => {
2342
2436
  return result;
2343
2437
  };
2344
2438
 
2345
- const FETCH_LIMIT$4 = 1000;
2439
+ const FETCH_LIMIT$5 = 1000;
2346
2440
  const ModelsFilterView = (props) => {
2347
2441
  var _a, _b;
2348
2442
  const { getMachineTypeTranslation } = translationsMachineType.useMachineTypeTranslations();
@@ -2353,7 +2447,7 @@ const ModelsFilterView = (props) => {
2353
2447
  const { data, loading } = client.useQuery(GetFleetModelsSummaryDocument, {
2354
2448
  fetchPolicy: "cache-first",
2355
2449
  variables: {
2356
- limit: FETCH_LIMIT$4,
2450
+ limit: FETCH_LIMIT$5,
2357
2451
  search: debouncedSearch,
2358
2452
  filters: {
2359
2453
  ...activeFilters,
@@ -2368,7 +2462,7 @@ const ModelsFilterView = (props) => {
2368
2462
  count: model.count,
2369
2463
  label: getMachineTypeTranslation(model.key),
2370
2464
  }))) !== null && _c !== void 0 ? _c : [];
2371
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$4);
2465
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
2372
2466
  return result;
2373
2467
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.models) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
2374
2468
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -2395,7 +2489,7 @@ const useModelsFilter = () => {
2395
2489
  return result;
2396
2490
  };
2397
2491
 
2398
- const FETCH_LIMIT$3 = 1000;
2492
+ const FETCH_LIMIT$4 = 1000;
2399
2493
  const OwnerAccountIdsFilterView = (props) => {
2400
2494
  var _a, _b;
2401
2495
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
@@ -2405,7 +2499,7 @@ const OwnerAccountIdsFilterView = (props) => {
2405
2499
  const { data, loading } = client.useQuery(GetFleetOwnerAccountSummaryDocument, {
2406
2500
  fetchPolicy: "cache-first",
2407
2501
  variables: {
2408
- limit: FETCH_LIMIT$3,
2502
+ limit: FETCH_LIMIT$4,
2409
2503
  search: debouncedSearch,
2410
2504
  filters: {
2411
2505
  ...activeFilters,
@@ -2423,7 +2517,7 @@ const OwnerAccountIdsFilterView = (props) => {
2423
2517
  label: ((_b = edge.ownerAccount) === null || _b === void 0 ? void 0 : _b.accountName) || "Unknown",
2424
2518
  });
2425
2519
  })) !== null && _c !== void 0 ? _c : [];
2426
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$3);
2520
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$4);
2427
2521
  return result;
2428
2522
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.ownerAccounts) === null || _b === void 0 ? void 0 : _b.summary]);
2429
2523
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -2496,7 +2590,7 @@ const usePeriodFilter = () => {
2496
2590
  return result;
2497
2591
  };
2498
2592
 
2499
- const FETCH_LIMIT$2 = 1000;
2593
+ const FETCH_LIMIT$3 = 1000;
2500
2594
  const ProductionYearFilterView = ({ filterDefinition, filterState, filterBarActions, ...props }) => {
2501
2595
  var _a, _b;
2502
2596
  const [t] = useTranslation();
@@ -2506,7 +2600,7 @@ const ProductionYearFilterView = ({ filterDefinition, filterState, filterBarActi
2506
2600
  const debouncedSearch = reactComponents.useDebounce(searchText, 500);
2507
2601
  const { data, loading } = client.useQuery(GetFleetProductionYearsSummaryDocument, {
2508
2602
  variables: {
2509
- limit: FETCH_LIMIT$2,
2603
+ limit: FETCH_LIMIT$3,
2510
2604
  search: debouncedSearch,
2511
2605
  filters: {
2512
2606
  ...activeFilters,
@@ -2521,7 +2615,7 @@ const ProductionYearFilterView = ({ filterDefinition, filterState, filterBarActi
2521
2615
  ...productionYear,
2522
2616
  label: productionYear.key.toUpperCase() === "UNDEFINED" ? t(`machine.types.Unknown`) : productionYear.key,
2523
2617
  }))) !== null && _c !== void 0 ? _c : [];
2524
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$2);
2618
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$3);
2525
2619
  return result;
2526
2620
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.productionYears) === null || _b === void 0 ? void 0 : _b.summary, t]);
2527
2621
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -2732,7 +2826,7 @@ const useServicePlanStatusFilter = ({ showInStarredMenu, showInFilterBar, servic
2732
2826
  return result;
2733
2827
  };
2734
2828
 
2735
- const FETCH_LIMIT$1 = 1000;
2829
+ const FETCH_LIMIT$2 = 1000;
2736
2830
  const SiteIdsFilterView = (props) => {
2737
2831
  var _a, _b;
2738
2832
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
@@ -2742,7 +2836,7 @@ const SiteIdsFilterView = (props) => {
2742
2836
  const { data, loading } = client.useQuery(GetSiteIdSummaryDocument, {
2743
2837
  fetchPolicy: "cache-first",
2744
2838
  variables: {
2745
- limit: FETCH_LIMIT$1,
2839
+ limit: FETCH_LIMIT$2,
2746
2840
  search: debouncedSearch,
2747
2841
  filters: {
2748
2842
  ...activeFilters,
@@ -2760,7 +2854,7 @@ const SiteIdsFilterView = (props) => {
2760
2854
  label: ((_b = siteEdge.site) === null || _b === void 0 ? void 0 : _b.name) || "Unknown",
2761
2855
  });
2762
2856
  })) !== null && _c !== void 0 ? _c : [];
2763
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$1);
2857
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$2);
2764
2858
  return result;
2765
2859
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.sites) === null || _b === void 0 ? void 0 : _b.summary]);
2766
2860
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -3013,7 +3107,7 @@ const useTelematicsConnectedFilter = () => {
3013
3107
  return result;
3014
3108
  };
3015
3109
 
3016
- const FETCH_LIMIT = 1000;
3110
+ const FETCH_LIMIT$1 = 1000;
3017
3111
  const TypesFilterView = (props) => {
3018
3112
  var _a, _b;
3019
3113
  const { getMachineTypeTranslation } = translationsMachineType.useMachineTypeTranslations();
@@ -3024,7 +3118,7 @@ const TypesFilterView = (props) => {
3024
3118
  const { data, loading } = client.useQuery(GetFleetTypesSummaryDocument, {
3025
3119
  fetchPolicy: "cache-first",
3026
3120
  variables: {
3027
- limit: FETCH_LIMIT,
3121
+ limit: FETCH_LIMIT$1,
3028
3122
  search: debouncedSearch,
3029
3123
  filters: {
3030
3124
  ...activeFilters,
@@ -3039,7 +3133,7 @@ const TypesFilterView = (props) => {
3039
3133
  count: type.count,
3040
3134
  label: getMachineTypeTranslation(type.key),
3041
3135
  }))) !== null && _c !== void 0 ? _c : [];
3042
- setShowRequestMoreUseSearch(result.length === FETCH_LIMIT);
3136
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$1);
3043
3137
  return result;
3044
3138
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
3045
3139
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
@@ -3089,12 +3183,72 @@ const usePartnerFilter = () => {
3089
3183
  return result;
3090
3184
  };
3091
3185
 
3186
+ const FETCH_LIMIT = 1000;
3187
+ const SiteDepotOwnershipIdsFilterView = (props) => {
3188
+ var _a, _b;
3189
+ const [t] = useTranslation();
3190
+ const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
3191
+ const [showRequestMoreUseSearch, setShowRequestMoreUseSearch] = react.useState(false);
3192
+ const [searchText, setSearchText] = react.useState("");
3193
+ const debouncedSearch = reactComponents.useDebounce(searchText, 500);
3194
+ const { data, loading } = client.useQuery(GetSiteDepotOwnershipIdSummaryDocument, {
3195
+ fetchPolicy: "cache-first",
3196
+ variables: {
3197
+ limit: FETCH_LIMIT,
3198
+ search: debouncedSearch,
3199
+ filters: {
3200
+ ...activeFilters,
3201
+ owningDepotSiteIds: null, // Omit the filters own values so list shows options correctly
3202
+ },
3203
+ },
3204
+ });
3205
+ const options = react.useMemo(() => {
3206
+ var _a, _b, _c;
3207
+ const result = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.owningDepots) === null || _b === void 0 ? void 0 : _b.summary.map(owningDepotEdge => {
3208
+ var _a, _b;
3209
+ return ({
3210
+ key: ((_a = owningDepotEdge.site) === null || _a === void 0 ? void 0 : _a.siteId) || "unknown",
3211
+ count: owningDepotEdge.count || 0,
3212
+ label: ((_b = owningDepotEdge.site) === null || _b === void 0 ? void 0 : _b.name) || t("siteOwningDepot.unknown"),
3213
+ });
3214
+ })) !== null && _c !== void 0 ? _c : [];
3215
+ setShowRequestMoreUseSearch(result.length === FETCH_LIMIT);
3216
+ return result;
3217
+ }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.owningDepots) === null || _b === void 0 ? void 0 : _b.summary, t]);
3218
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
3219
+ };
3220
+ /**
3221
+ * Site depot ownership filter definition
3222
+ *
3223
+ * @returns {ValueNameFilterDefinition} Site depot ownership filter definition
3224
+ */
3225
+ const useSiteDepotOwnershipIdsFilter = ({ showInStarredMenu, showInFilterBar, defaultValue } = {
3226
+ showInStarredMenu: () => true,
3227
+ showInFilterBar: () => true,
3228
+ }) => {
3229
+ const [t] = useTranslation();
3230
+ const result = react.useMemo(() => {
3231
+ return {
3232
+ filterKey: "siteDepotOwnershipIds",
3233
+ type: "valueName",
3234
+ default: true,
3235
+ defaultValue,
3236
+ group: "SITES",
3237
+ title: t("fleetlist.column.siteDepotOwnershipIds"),
3238
+ showInStarredMenu,
3239
+ showInFilterBar,
3240
+ component: props => jsxRuntime.jsx(SiteDepotOwnershipIdsFilterView, { ...props }),
3241
+ };
3242
+ }, [showInFilterBar, showInStarredMenu, defaultValue, t]);
3243
+ return result;
3244
+ };
3245
+
3092
3246
  /**
3093
3247
  * Default asset filter bar definition, used to define the default filters for the asset related filters.
3094
3248
  *
3095
3249
  * @returns {FilterBarDefinition} Default asset filter bar definition
3096
3250
  */
3097
- const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, serviceManagementEnabled, areaShowWithSearch, }) => {
3251
+ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, owningDepotEnabled, serviceManagementEnabled, areaShowWithSearch, }) => {
3098
3252
  const assetType = useAssetTypeFilter();
3099
3253
  const metadataCompleteness = useMetadataCompletenessFilter();
3100
3254
  const groups = useGroupIdsFilter();
@@ -3102,6 +3256,10 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, serviceManagementEna
3102
3256
  showInStarredMenu: () => sitesEnabled || false,
3103
3257
  showInFilterBar: () => sitesEnabled || false,
3104
3258
  });
3259
+ const siteDepotOwnershipIds = useSiteDepotOwnershipIdsFilter({
3260
+ showInStarredMenu: () => owningDepotEnabled || false,
3261
+ showInFilterBar: () => owningDepotEnabled || false,
3262
+ });
3105
3263
  const brands = useBrandFilter();
3106
3264
  const models = useModelsFilter();
3107
3265
  const types = useTypesFilter();
@@ -3148,6 +3306,7 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, serviceManagementEna
3148
3306
  serviceStatus,
3149
3307
  telematicsConnected,
3150
3308
  activeFilter,
3309
+ siteDepotOwnershipIds,
3151
3310
  };
3152
3311
  }, [
3153
3312
  siteIds,
@@ -3170,6 +3329,7 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, serviceManagementEna
3170
3329
  serviceStatus,
3171
3330
  telematicsConnected,
3172
3331
  activeFilter,
3332
+ siteDepotOwnershipIds,
3173
3333
  ]);
3174
3334
  };
3175
3335