@helpwave/hightide 0.6.12 → 0.6.14

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/index.js CHANGED
@@ -6272,6 +6272,7 @@ __export(index_exports, {
6272
6272
  DateTimePickerDialog: () => DateTimePickerDialog,
6273
6273
  DateTimePickerUncontrolled: () => DateTimePickerUncontrolled,
6274
6274
  DateUtils: () => DateUtils,
6275
+ DatetimeFilter: () => DatetimeFilter,
6275
6276
  DayPicker: () => DayPicker,
6276
6277
  DayPickerUncontrolled: () => DayPickerUncontrolled,
6277
6278
  Dialog: () => Dialog,
@@ -6407,6 +6408,7 @@ __export(index_exports, {
6407
6408
  TableWithSelectionProvider: () => TableWithSelectionProvider,
6408
6409
  TagIcon: () => TagIcon,
6409
6410
  TagsFilter: () => TagsFilter,
6411
+ TagsSingleFilter: () => TagsSingleFilter,
6410
6412
  TextFilter: () => TextFilter,
6411
6413
  TextImage: () => TextImage,
6412
6414
  TextProperty: () => TextProperty,
@@ -6436,6 +6438,14 @@ __export(index_exports, {
6436
6438
  createLoopingList: () => createLoopingList,
6437
6439
  createLoopingListWithIndex: () => createLoopingListWithIndex,
6438
6440
  equalSizeGroups: () => equalSizeGroups,
6441
+ filterBoolean: () => filterBoolean,
6442
+ filterDate: () => filterDate,
6443
+ filterDatetime: () => filterDatetime,
6444
+ filterGeneric: () => filterGeneric,
6445
+ filterNumber: () => filterNumber,
6446
+ filterTags: () => filterTags,
6447
+ filterTagsSingle: () => filterTagsSingle,
6448
+ filterText: () => filterText,
6439
6449
  formatDate: () => formatDate,
6440
6450
  formatDateTime: () => formatDateTime,
6441
6451
  getBetweenDuration: () => getBetweenDuration,
@@ -7351,17 +7361,17 @@ function useFormObserver({ formStore } = {}) {
7351
7361
  hasTriedSubmitting
7352
7362
  };
7353
7363
  }
7354
- function useFormObserverKey({ formStore, key }) {
7364
+ function useFormObserverKey({ formStore, formKey }) {
7355
7365
  const context = (0, import_react6.useContext)(FormContext);
7356
7366
  const store = formStore ?? context?.store;
7357
7367
  const subscribe = (0, import_react6.useCallback)((cb) => {
7358
7368
  if (!store) return () => {
7359
7369
  };
7360
- return store.subscribe(key, cb);
7361
- }, [store, key]);
7362
- const value = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getValue(key) : void 0);
7363
- const error = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getError(key) : void 0);
7364
- const touched = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getTouched(key) : void 0);
7370
+ return store.subscribe(formKey, cb);
7371
+ }, [store, formKey]);
7372
+ const value = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getValue(formKey) : void 0);
7373
+ const error = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getError(formKey) : void 0);
7374
+ const touched = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getTouched(formKey) : void 0);
7365
7375
  if (!store) return null;
7366
7376
  return {
7367
7377
  store,
@@ -7413,8 +7423,8 @@ var FormObserver = ({ children, formStore }) => {
7413
7423
  }
7414
7424
  return BagFunctionUtil.resolve(children, formObserver);
7415
7425
  };
7416
- var FormObserverKey = ({ children, formStore, key }) => {
7417
- const formObserver = useFormObserverKey({ formStore, key });
7426
+ var FormObserverKey = ({ children, formStore, formKey }) => {
7427
+ const formObserver = useFormObserverKey({ formStore, formKey });
7418
7428
  if (!formObserver) {
7419
7429
  throw new Error("<FormObserverKey> can only be used inside a <FormProvider>");
7420
7430
  }
@@ -8198,6 +8208,7 @@ var hightideTranslation = {
8198
8208
  "between": `Zwischen`,
8199
8209
  "cancel": `Abbrechen`,
8200
8210
  "carousel": `Karussell`,
8211
+ "caseSensitive": `Gro\xDF-/Klein beachten`,
8201
8212
  "change": `\xC4ndern`,
8202
8213
  "changeColumnDisplay": `Spaltenanzeige \xE4ndern`,
8203
8214
  "chooseLanguage": `W\xE4hle deine bevorzugte Sprache`,
@@ -8343,6 +8354,14 @@ var hightideTranslation = {
8343
8354
  "slideOf": ({ index, length }) => {
8344
8355
  return `Slide ${index} von ${length} slides`;
8345
8356
  },
8357
+ "sorting": `Sortierung`,
8358
+ "sSortingState": ({ sortDirection }) => {
8359
+ return import_internationalization.TranslationGen.resolveSelect(sortDirection, {
8360
+ "asc": `Sortierung (Aktuell Aufsteigend)`,
8361
+ "desc": `Sortierung (Aktuell Absteigend)`,
8362
+ "other": `Sortierung (Aktuell Keine)`
8363
+ });
8364
+ },
8346
8365
  "startDate": `Start`,
8347
8366
  "startsWith": `Beginnt mit`,
8348
8367
  "sThemeMode": ({ theme }) => {
@@ -8495,6 +8514,7 @@ var hightideTranslation = {
8495
8514
  "between": `Between`,
8496
8515
  "cancel": `Cancel`,
8497
8516
  "carousel": `Carousel`,
8517
+ "caseSensitive": `Case Sensitive`,
8498
8518
  "change": `Change`,
8499
8519
  "changeColumnDisplay": `Change column display`,
8500
8520
  "chooseLanguage": `Choose your language`,
@@ -8640,6 +8660,14 @@ var hightideTranslation = {
8640
8660
  "slideOf": ({ index, length }) => {
8641
8661
  return `Slide ${index} of ${length} slides`;
8642
8662
  },
8663
+ "sorting": `Sorting`,
8664
+ "sSortingState": ({ sortDirection }) => {
8665
+ return import_internationalization.TranslationGen.resolveSelect(sortDirection, {
8666
+ "asc": `Sorting (Currently Ascending)`,
8667
+ "desc": `Sorting (Currently Descending)`,
8668
+ "other": `Sorting (Currently None)`
8669
+ });
8670
+ },
8643
8671
  "startDate": `Start`,
8644
8672
  "startsWith": `Starts with`,
8645
8673
  "sThemeMode": ({ theme }) => {
@@ -13178,27 +13206,16 @@ var useTableContainerContext = () => {
13178
13206
  return context;
13179
13207
  };
13180
13208
 
13181
- // src/components/layout/table/TableFilter.ts
13182
- var TableFilterOperator = {
13183
- text: ["textEquals", "textNotEquals", "textNotWhitespace", "textContains", "textNotContains", "textStartsWith", "textEndsWith"],
13184
- number: ["numberEquals", "numberNotEquals", "numberGreaterThan", "numberGreaterThanOrEqual", "numberLessThan", "numberLessThanOrEqual", "numberBetween", "numberNotBetween"],
13185
- date: ["dateEquals", "dateNotEquals", "dateGreaterThan", "dateGreaterThanOrEqual", "dateLessThan", "dateLessThanOrEqual", "dateBetween", "dateNotBetween"],
13186
- boolean: ["booleanIsTrue", "booleanIsFalse"],
13187
- tags: ["tagsEquals", "tagsNotEquals", "tagsContains", "tagsNotContains"],
13188
- generic: ["undefined", "notUndefined"]
13189
- };
13190
- function isTableFilterCategory(value) {
13191
- return typeof value === "string" && value in TableFilterOperator;
13192
- }
13193
- var textFilter = (row, columnId, filterValue) => {
13194
- const value = row.getValue(columnId);
13209
+ // src/utils/filter.ts
13210
+ function filterText(value, filterValue) {
13195
13211
  const parameter = filterValue.parameter;
13196
13212
  const operator = filterValue.operator;
13213
+ const isCaseSensitive = filterValue.parameter.isCaseSensitive ?? false;
13197
13214
  if (operator === "textNotWhitespace") {
13198
13215
  return value?.toString().trim().length > 0;
13199
13216
  }
13200
- const searchText = (parameter.searchText ?? "").toLowerCase();
13201
- const cellText = value?.toString().toLowerCase() ?? "";
13217
+ const searchText = isCaseSensitive ? parameter.searchText ?? "" : (parameter.searchText ?? "").toLowerCase();
13218
+ const cellText = isCaseSensitive ? value?.toString() ?? "" : value?.toString().toLowerCase() ?? "";
13202
13219
  switch (operator) {
13203
13220
  case "textEquals":
13204
13221
  return cellText === searchText;
@@ -13219,11 +13236,19 @@ var textFilter = (row, columnId, filterValue) => {
13219
13236
  default:
13220
13237
  return false;
13221
13238
  }
13222
- };
13223
- var numberFilter = (row, columnId, filterValue) => {
13224
- const value = row.getValue(columnId);
13239
+ }
13240
+ function filterNumber(value, filterValue) {
13225
13241
  const parameter = filterValue.parameter;
13226
13242
  const operator = filterValue.operator;
13243
+ if (typeof value !== "number") {
13244
+ if (operator === "undefined") {
13245
+ return value === void 0 || value === null;
13246
+ }
13247
+ if (operator === "notUndefined") {
13248
+ return value !== void 0 && value !== null;
13249
+ }
13250
+ return false;
13251
+ }
13227
13252
  switch (operator) {
13228
13253
  case "numberEquals":
13229
13254
  return value === parameter.compareValue;
@@ -13248,58 +13273,57 @@ var numberFilter = (row, columnId, filterValue) => {
13248
13273
  default:
13249
13274
  return false;
13250
13275
  }
13251
- };
13252
- var dateFilter = (row, columnId, filterValue) => {
13253
- const value = row.getValue(columnId);
13276
+ }
13277
+ function parseDate(dateValue) {
13278
+ if (!dateValue) return null;
13279
+ if (dateValue instanceof Date) return dateValue;
13280
+ if (typeof dateValue === "string" || typeof dateValue === "number") {
13281
+ const parsed = new Date(dateValue);
13282
+ return isNaN(parsed.getTime()) ? null : parsed;
13283
+ }
13284
+ return null;
13285
+ }
13286
+ function normalizeToDateOnly(date) {
13287
+ const normalized = new Date(date);
13288
+ normalized.setHours(0, 0, 0, 0);
13289
+ return normalized;
13290
+ }
13291
+ function filterDate(value, filterValue) {
13254
13292
  const parameter = filterValue.parameter;
13255
13293
  const operator = filterValue.operator;
13256
- const parseDate = (dateValue) => {
13257
- if (!dateValue) return null;
13258
- if (dateValue instanceof Date) return dateValue;
13259
- if (typeof dateValue === "string" || typeof dateValue === "number") {
13260
- const parsed = new Date(dateValue);
13261
- return isNaN(parsed.getTime()) ? null : parsed;
13262
- }
13263
- return null;
13264
- };
13265
- const normalizeToDateOnly = (date2) => {
13266
- const normalized = new Date(date2);
13267
- normalized.setHours(0, 0, 0, 0);
13268
- return normalized;
13269
- };
13270
13294
  const date = parseDate(value);
13271
13295
  if (!date && !TableFilterOperator.generic.some((o) => o === operator)) return false;
13272
13296
  const normalizedDate = date ? normalizeToDateOnly(date) : null;
13273
13297
  switch (operator) {
13274
13298
  case "dateEquals": {
13275
- const filterDate = parseDate(parameter.compareDate);
13276
- if (!filterDate || !normalizedDate) return false;
13277
- return normalizedDate.getTime() === normalizeToDateOnly(filterDate).getTime();
13299
+ const filterDate2 = parseDate(parameter.compareDate);
13300
+ if (!filterDate2 || !normalizedDate) return false;
13301
+ return normalizedDate.getTime() === normalizeToDateOnly(filterDate2).getTime();
13278
13302
  }
13279
13303
  case "dateNotEquals": {
13280
- const filterDate = parseDate(parameter.compareDate);
13281
- if (!filterDate || !normalizedDate) return false;
13282
- return normalizedDate.getTime() !== normalizeToDateOnly(filterDate).getTime();
13304
+ const filterDate2 = parseDate(parameter.compareDate);
13305
+ if (!filterDate2 || !normalizedDate) return false;
13306
+ return normalizedDate.getTime() !== normalizeToDateOnly(filterDate2).getTime();
13283
13307
  }
13284
13308
  case "dateGreaterThan": {
13285
- const filterDate = parseDate(parameter.compareDate);
13286
- if (!filterDate || !normalizedDate) return false;
13287
- return normalizedDate > normalizeToDateOnly(filterDate);
13309
+ const filterDate2 = parseDate(parameter.compareDate);
13310
+ if (!filterDate2 || !normalizedDate) return false;
13311
+ return normalizedDate > normalizeToDateOnly(filterDate2);
13288
13312
  }
13289
13313
  case "dateGreaterThanOrEqual": {
13290
- const filterDate = parseDate(parameter.compareDate);
13291
- if (!filterDate || !normalizedDate) return false;
13292
- return normalizedDate >= normalizeToDateOnly(filterDate);
13314
+ const filterDate2 = parseDate(parameter.compareDate);
13315
+ if (!filterDate2 || !normalizedDate) return false;
13316
+ return normalizedDate >= normalizeToDateOnly(filterDate2);
13293
13317
  }
13294
13318
  case "dateLessThan": {
13295
- const filterDate = parseDate(parameter.compareDate);
13296
- if (!filterDate || !normalizedDate) return false;
13297
- return normalizedDate < normalizeToDateOnly(filterDate);
13319
+ const filterDate2 = parseDate(parameter.compareDate);
13320
+ if (!filterDate2 || !normalizedDate) return false;
13321
+ return normalizedDate < normalizeToDateOnly(filterDate2);
13298
13322
  }
13299
13323
  case "dateLessThanOrEqual": {
13300
- const filterDate = parseDate(parameter.compareDate);
13301
- if (!filterDate || !normalizedDate) return false;
13302
- return normalizedDate <= normalizeToDateOnly(filterDate);
13324
+ const filterDate2 = parseDate(parameter.compareDate);
13325
+ if (!filterDate2 || !normalizedDate) return false;
13326
+ return normalizedDate <= normalizeToDateOnly(filterDate2);
13303
13327
  }
13304
13328
  case "dateBetween": {
13305
13329
  const minDate = parseDate(parameter.min);
@@ -13320,9 +13344,70 @@ var dateFilter = (row, columnId, filterValue) => {
13320
13344
  default:
13321
13345
  return false;
13322
13346
  }
13323
- };
13324
- var booleanFilter = (row, columnId, filterValue) => {
13325
- const value = row.getValue(columnId);
13347
+ }
13348
+ function normalizeDatetime(dateTime) {
13349
+ const normalized = new Date(dateTime);
13350
+ normalized.setSeconds(0, 0);
13351
+ return normalized;
13352
+ }
13353
+ function filterDatetime(value, filterValue) {
13354
+ const parameter = filterValue.parameter;
13355
+ const operator = filterValue.operator;
13356
+ const dateTime = parseDate(value);
13357
+ if (!dateTime && !TableFilterOperator.generic.some((o) => o === operator)) return false;
13358
+ const normalizedDatetime = dateTime ? normalizeDatetime(dateTime) : null;
13359
+ switch (operator) {
13360
+ case "dateTimeEquals": {
13361
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13362
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13363
+ return normalizedDatetime.getTime() === normalizeDatetime(filterDatetime2).getTime();
13364
+ }
13365
+ case "dateTimeNotEquals": {
13366
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13367
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13368
+ return normalizedDatetime.getTime() !== normalizeDatetime(filterDatetime2).getTime();
13369
+ }
13370
+ case "dateTimeGreaterThan": {
13371
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13372
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13373
+ return normalizedDatetime > normalizeDatetime(filterDatetime2);
13374
+ }
13375
+ case "dateTimeGreaterThanOrEqual": {
13376
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13377
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13378
+ return normalizedDatetime >= normalizeDatetime(filterDatetime2);
13379
+ }
13380
+ case "dateTimeLessThan": {
13381
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13382
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13383
+ return normalizedDatetime < normalizeDatetime(filterDatetime2);
13384
+ }
13385
+ case "dateTimeLessThanOrEqual": {
13386
+ const filterDatetime2 = parseDate(parameter.compareDatetime);
13387
+ if (!filterDatetime2 || !normalizedDatetime) return false;
13388
+ return normalizedDatetime <= normalizeDatetime(filterDatetime2);
13389
+ }
13390
+ case "dateTimeBetween": {
13391
+ const minDatetime = parseDate(parameter.min);
13392
+ const maxDatetime = parseDate(parameter.max);
13393
+ if (!minDatetime || !maxDatetime || !normalizedDatetime) return false;
13394
+ return normalizedDatetime >= normalizeDatetime(minDatetime) && normalizedDatetime <= normalizeDatetime(maxDatetime);
13395
+ }
13396
+ case "dateTimeNotBetween": {
13397
+ const minDatetime = parseDate(parameter.min);
13398
+ const maxDatetime = parseDate(parameter.max);
13399
+ if (!minDatetime || !maxDatetime || !normalizedDatetime) return false;
13400
+ return normalizedDatetime < normalizeDatetime(minDatetime) || normalizedDatetime > normalizeDatetime(maxDatetime);
13401
+ }
13402
+ case "undefined":
13403
+ return value === void 0 || value === null;
13404
+ case "notUndefined":
13405
+ return value !== void 0 && value !== null;
13406
+ default:
13407
+ return false;
13408
+ }
13409
+ }
13410
+ function filterBoolean(value, filterValue) {
13326
13411
  const operator = filterValue.operator;
13327
13412
  switch (operator) {
13328
13413
  case "booleanIsTrue":
@@ -13336,9 +13421,8 @@ var booleanFilter = (row, columnId, filterValue) => {
13336
13421
  default:
13337
13422
  return false;
13338
13423
  }
13339
- };
13340
- var tagsFilter = (row, columnId, filterValue) => {
13341
- const value = row.getValue(columnId);
13424
+ }
13425
+ function filterTags(value, filterValue) {
13342
13426
  const parameter = filterValue.parameter;
13343
13427
  const operator = filterValue.operator;
13344
13428
  switch (operator) {
@@ -13373,9 +13457,28 @@ var tagsFilter = (row, columnId, filterValue) => {
13373
13457
  default:
13374
13458
  return false;
13375
13459
  }
13376
- };
13377
- var genericFilter = (row, columnId, filterValue) => {
13378
- const value = row.getValue(columnId);
13460
+ }
13461
+ function filterTagsSingle(value, filterValue) {
13462
+ const parameter = filterValue.parameter;
13463
+ const operator = filterValue.operator;
13464
+ switch (operator) {
13465
+ case "tagsSingleEquals":
13466
+ return value === parameter.searchTag;
13467
+ case "tagsSingleNotEquals":
13468
+ return value !== parameter.searchTag;
13469
+ case "tagsSingleContains":
13470
+ return parameter.searchTagsContains?.includes(value) ?? false;
13471
+ case "tagsSingleNotContains":
13472
+ return !(parameter.searchTagsContains?.includes(value) ?? false);
13473
+ case "undefined":
13474
+ return value === void 0 || value === null;
13475
+ case "notUndefined":
13476
+ return value !== void 0 && value !== null;
13477
+ default:
13478
+ return false;
13479
+ }
13480
+ }
13481
+ function filterGeneric(value, filterValue) {
13379
13482
  const operator = filterValue.operator;
13380
13483
  switch (operator) {
13381
13484
  case "undefined":
@@ -13385,13 +13488,66 @@ var genericFilter = (row, columnId, filterValue) => {
13385
13488
  default:
13386
13489
  return false;
13387
13490
  }
13491
+ }
13492
+
13493
+ // src/components/layout/table/TableFilter.ts
13494
+ var TableFilterOperator = {
13495
+ text: ["textEquals", "textNotEquals", "textNotWhitespace", "textContains", "textNotContains", "textStartsWith", "textEndsWith"],
13496
+ number: ["numberEquals", "numberNotEquals", "numberGreaterThan", "numberGreaterThanOrEqual", "numberLessThan", "numberLessThanOrEqual", "numberBetween", "numberNotBetween"],
13497
+ date: ["dateEquals", "dateNotEquals", "dateGreaterThan", "dateGreaterThanOrEqual", "dateLessThan", "dateLessThanOrEqual", "dateBetween", "dateNotBetween"],
13498
+ dateTime: ["dateTimeEquals", "dateTimeNotEquals", "dateTimeGreaterThan", "dateTimeGreaterThanOrEqual", "dateTimeLessThan", "dateTimeLessThanOrEqual", "dateTimeBetween", "dateTimeNotBetween"],
13499
+ boolean: ["booleanIsTrue", "booleanIsFalse"],
13500
+ tags: ["tagsEquals", "tagsNotEquals", "tagsContains", "tagsNotContains"],
13501
+ tagsSingle: ["tagsSingleEquals", "tagsSingleNotEquals", "tagsSingleContains", "tagsSingleNotContains"],
13502
+ generic: ["undefined", "notUndefined"]
13503
+ };
13504
+ function isTableFilterCategory(value) {
13505
+ return typeof value === "string" && value in TableFilterOperator;
13506
+ }
13507
+ var textFilter = (row, columnId, filterValue) => {
13508
+ const value = row.getValue(columnId);
13509
+ return filterText(value, filterValue);
13510
+ return filterText(value, filterValue);
13511
+ };
13512
+ var numberFilter = (row, columnId, filterValue) => {
13513
+ const value = row.getValue(columnId);
13514
+ return filterNumber(value, filterValue);
13515
+ return filterNumber(value, filterValue);
13516
+ };
13517
+ var dateFilter = (row, columnId, filterValue) => {
13518
+ const value = row.getValue(columnId);
13519
+ return filterDate(value, filterValue);
13520
+ };
13521
+ var dateTimeFilter = (row, columnId, filterValue) => {
13522
+ const value = row.getValue(columnId);
13523
+ return filterDatetime(value, filterValue);
13524
+ };
13525
+ var booleanFilter = (row, columnId, filterValue) => {
13526
+ const value = row.getValue(columnId);
13527
+ return filterBoolean(value, filterValue);
13528
+ return filterBoolean(value, filterValue);
13529
+ };
13530
+ var tagsFilter = (row, columnId, filterValue) => {
13531
+ const value = row.getValue(columnId);
13532
+ return filterTags(value, filterValue);
13533
+ };
13534
+ var tagsSingleFilter = (row, columnId, filterValue) => {
13535
+ const value = row.getValue(columnId);
13536
+ return filterTagsSingle(value, filterValue);
13537
+ };
13538
+ var genericFilter = (row, columnId, filterValue) => {
13539
+ const value = row.getValue(columnId);
13540
+ return filterGeneric(value, filterValue);
13541
+ return filterGeneric(value, filterValue);
13388
13542
  };
13389
13543
  var TableFilter = {
13390
13544
  text: textFilter,
13391
13545
  number: numberFilter,
13392
13546
  date: dateFilter,
13547
+ dateTime: dateTimeFilter,
13393
13548
  boolean: booleanFilter,
13394
13549
  tags: tagsFilter,
13550
+ tagsSingle: tagsSingleFilter,
13395
13551
  generic: genericFilter
13396
13552
  };
13397
13553
 
@@ -13528,8 +13684,10 @@ var TableProvider = ({
13528
13684
  text: TableFilter.text,
13529
13685
  number: TableFilter.number,
13530
13686
  date: TableFilter.date,
13687
+ dateTime: TableFilter.dateTime,
13531
13688
  boolean: TableFilter.boolean,
13532
13689
  tags: TableFilter.tags,
13690
+ tagsSingle: TableFilter.tagsSingle,
13533
13691
  generic: TableFilter.generic
13534
13692
  },
13535
13693
  onColumnSizingChange: (updaterOrValue) => {
@@ -13649,7 +13807,7 @@ var TableBody = import_react58.default.memo(function TableBodyVisual() {
13649
13807
 
13650
13808
  // src/components/layout/table/TableHeader.tsx
13651
13809
  var import_react_table3 = require("@tanstack/react-table");
13652
- var import_clsx33 = __toESM(require("clsx"));
13810
+ var import_clsx34 = __toESM(require("clsx"));
13653
13811
 
13654
13812
  // src/components/layout/table/TableSortButton.tsx
13655
13813
  var import_lucide_react14 = require("lucide-react");
@@ -13675,31 +13833,41 @@ var TableSortButton = ({
13675
13833
  icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react14.ChevronUp, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react14.ChevronDown, { className: "size-4" });
13676
13834
  }
13677
13835
  const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
13678
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
13679
- Button,
13836
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13837
+ Tooltip,
13680
13838
  {
13681
- layout: hasSortingIndex ? "default" : "icon",
13682
- color,
13683
- size,
13684
- className: (0, import_clsx28.default)("relative", className),
13685
- ...props,
13686
- children: [
13687
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13688
- "div",
13689
- {
13690
- className: (0, import_clsx28.default)("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
13691
- children: `${index}.`
13692
- }
13693
- ) }),
13694
- icon
13695
- ]
13839
+ tooltip: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex-col-2", children: [
13840
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: translation("sSortingState", { sortDirection: sortDirection || "none" }) }),
13841
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: translation("rSortingOrderAfter", { otherSortings: index - 1 }) }) })
13842
+ ] }),
13843
+ position: "top",
13844
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
13845
+ Button,
13846
+ {
13847
+ layout: hasSortingIndex ? "default" : "icon",
13848
+ color,
13849
+ size,
13850
+ className: (0, import_clsx28.default)("relative", className),
13851
+ ...props,
13852
+ children: [
13853
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13854
+ "div",
13855
+ {
13856
+ className: (0, import_clsx28.default)("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
13857
+ children: `${index}.`
13858
+ }
13859
+ ) }),
13860
+ icon
13861
+ ]
13862
+ }
13863
+ )
13696
13864
  }
13697
- ) });
13865
+ );
13698
13866
  };
13699
13867
 
13700
13868
  // src/components/layout/table/TableFilterButton.tsx
13701
- var import_lucide_react18 = require("lucide-react");
13702
- var import_react67 = require("react");
13869
+ var import_lucide_react19 = require("lucide-react");
13870
+ var import_react68 = require("react");
13703
13871
 
13704
13872
  // src/components/user-interaction/input/DateTimeInput.tsx
13705
13873
  var import_react64 = require("react");
@@ -14629,7 +14797,7 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
14629
14797
  });
14630
14798
 
14631
14799
  // src/components/layout/table/TableFilterPopups.tsx
14632
- var import_react66 = require("react");
14800
+ var import_react67 = require("react");
14633
14801
 
14634
14802
  // src/components/user-interaction/select/MultiSelect.tsx
14635
14803
  var import_react65 = require("react");
@@ -14663,120 +14831,241 @@ var MultiSelectUncontrolled = (0, import_react65.forwardRef)(function MultiSelec
14663
14831
  });
14664
14832
 
14665
14833
  // src/components/layout/table/TableFilterPopups.tsx
14834
+ var import_lucide_react18 = require("lucide-react");
14835
+
14836
+ // src/components/user-interaction/Checkbox.tsx
14666
14837
  var import_lucide_react17 = require("lucide-react");
14838
+ var import_react66 = require("react");
14839
+ var import_clsx33 = __toESM(require("clsx"));
14667
14840
  var import_jsx_runtime66 = require("react/jsx-runtime");
14841
+ var Checkbox = ({
14842
+ value = false,
14843
+ indeterminate = false,
14844
+ required = false,
14845
+ invalid = false,
14846
+ disabled = false,
14847
+ readOnly = false,
14848
+ onValueChange,
14849
+ onEditComplete,
14850
+ size = "md",
14851
+ alwaysShowCheckIcon = false,
14852
+ ...props
14853
+ }) => {
14854
+ const onChangeWrapper = (0, import_react66.useCallback)(() => {
14855
+ onValueChange?.(!value);
14856
+ onEditComplete?.(!value);
14857
+ }, [onEditComplete, onValueChange, value]);
14858
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
14859
+ "div",
14860
+ {
14861
+ ...props,
14862
+ onClick: (event) => {
14863
+ if (!disabled) {
14864
+ onChangeWrapper();
14865
+ props.onClick?.(event);
14866
+ }
14867
+ },
14868
+ onKeyDown: (event) => {
14869
+ if (disabled) return;
14870
+ if (event.key === " " || event.key === "Enter") {
14871
+ event.preventDefault();
14872
+ onChangeWrapper();
14873
+ props.onKeyDown?.(event);
14874
+ }
14875
+ },
14876
+ "data-checked": !indeterminate ? value : "indeterminate",
14877
+ "data-size": size ?? void 0,
14878
+ ...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
14879
+ role: "checkbox",
14880
+ tabIndex: disabled ? -1 : 0,
14881
+ "aria-checked": indeterminate ? "mixed" : value,
14882
+ ...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
14883
+ className: (0, import_clsx33.default)("checkbox", props.className),
14884
+ children: [
14885
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Minus, { className: "checkbox-indicator", "aria-hidden": true }) }),
14886
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Check, { className: "checkbox-indicator", "aria-hidden": true }) })
14887
+ ]
14888
+ }
14889
+ );
14890
+ };
14891
+ var CheckboxUncontrolled = ({
14892
+ value: initialValue,
14893
+ onValueChange,
14894
+ ...props
14895
+ }) => {
14896
+ const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14897
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
14898
+ Checkbox,
14899
+ {
14900
+ ...props,
14901
+ value,
14902
+ onValueChange: setValue
14903
+ }
14904
+ );
14905
+ };
14906
+
14907
+ // src/components/layout/table/TableFilterPopups.tsx
14908
+ var import_jsx_runtime67 = require("react/jsx-runtime");
14668
14909
  var getOperatorInfo = (operator) => {
14669
14910
  switch (operator) {
14670
14911
  case "textEquals":
14671
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14912
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14672
14913
  case "textNotEquals":
14673
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14914
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14674
14915
  case "textNotWhitespace":
14675
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.TextInitial, { className: "w-4 h-4" }), translationKey: "filterNonWhitespace" };
14916
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.TextInitial, { className: "w-4 h-4" }), translationKey: "filterNonWhitespace" };
14676
14917
  case "textContains":
14677
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
14918
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
14678
14919
  case "textNotContains":
14679
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
14920
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
14680
14921
  case "textStartsWith":
14681
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ArrowRight, { className: "w-4 h-4" }), translationKey: "startsWith" };
14922
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ArrowRight, { className: "w-4 h-4" }), translationKey: "startsWith" };
14682
14923
  case "textEndsWith":
14683
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ArrowLeft, { className: "w-4 h-4" }), translationKey: "endsWith" };
14924
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ArrowLeft, { className: "w-4 h-4" }), translationKey: "endsWith" };
14684
14925
  case "numberEquals":
14685
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14926
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14686
14927
  case "numberNotEquals":
14687
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14928
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14688
14929
  case "numberGreaterThan":
14689
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }), translationKey: "greaterThan" };
14930
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "greaterThan" };
14690
14931
  case "numberGreaterThanOrEqual":
14691
14932
  return {
14692
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14693
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }),
14694
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "-ml-1 w-4 h-4" })
14933
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14934
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
14935
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
14695
14936
  ] }),
14696
14937
  translationKey: "greaterThanOrEqual"
14697
14938
  };
14698
14939
  case "numberLessThan":
14699
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }), translationKey: "lessThan" };
14940
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "lessThan" };
14700
14941
  case "numberLessThanOrEqual":
14701
14942
  return {
14702
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14703
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }),
14704
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "-ml-1 w-4 h-4" })
14943
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14944
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
14945
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
14705
14946
  ] }),
14706
14947
  translationKey: "lessThanOrEqual"
14707
14948
  };
14708
14949
  case "numberBetween":
14709
14950
  return {
14710
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14711
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }),
14712
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "-ml-1 w-4 h-4" })
14951
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14952
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
14953
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
14713
14954
  ] }),
14714
14955
  translationKey: "between"
14715
14956
  };
14716
14957
  case "numberNotBetween":
14717
14958
  return {
14718
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14719
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }),
14720
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "-ml-1 w-4 h-4" })
14959
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14960
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
14961
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
14721
14962
  ] }),
14722
14963
  translationKey: "notBetween"
14723
14964
  };
14724
14965
  case "dateEquals":
14725
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14966
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14726
14967
  case "dateNotEquals":
14727
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14968
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14728
14969
  case "dateGreaterThan":
14729
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }), translationKey: "after" };
14970
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "after" };
14730
14971
  case "dateGreaterThanOrEqual":
14731
14972
  return {
14732
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14733
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }),
14734
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "-ml-1 w-4 h-4" })
14973
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14974
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
14975
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
14735
14976
  ] }),
14736
14977
  translationKey: "onOrAfter"
14737
14978
  };
14738
14979
  case "dateLessThan":
14739
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }), translationKey: "before" };
14980
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "before" };
14740
14981
  case "dateLessThanOrEqual":
14741
14982
  return {
14742
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14743
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }),
14744
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "-ml-1 w-4 h-4" })
14983
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14984
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
14985
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
14745
14986
  ] }),
14746
14987
  translationKey: "onOrBefore"
14747
14988
  };
14748
14989
  case "dateBetween":
14749
14990
  return {
14750
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14751
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "w-4 h-4" }),
14752
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "-ml-1 w-4 h-4" })
14991
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
14992
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
14993
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
14753
14994
  ] }),
14754
14995
  translationKey: "between"
14755
14996
  };
14756
14997
  case "dateNotBetween":
14757
14998
  return {
14758
- icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-0 items-center", children: [
14759
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronLeft, { className: "w-4 h-4" }),
14760
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.ChevronRight, { className: "-ml-1 w-4 h-4" })
14999
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
15000
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
15001
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
14761
15002
  ] }),
14762
15003
  translationKey: "notBetween"
14763
15004
  };
14764
15005
  case "booleanIsTrue":
14765
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.CheckCircle2, { className: "w-4 h-4" }), translationKey: "isTrue" };
15006
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CheckCircle2, { className: "w-4 h-4" }), translationKey: "isTrue" };
14766
15007
  case "booleanIsFalse":
14767
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.XCircle, { className: "w-4 h-4" }), translationKey: "isFalse" };
15008
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.XCircle, { className: "w-4 h-4" }), translationKey: "isFalse" };
14768
15009
  case "tagsEquals":
14769
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
15010
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
14770
15011
  case "tagsNotEquals":
14771
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
15012
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
14772
15013
  case "tagsContains":
14773
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
15014
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
14774
15015
  case "tagsNotContains":
14775
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
15016
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
15017
+ case "dateTimeEquals":
15018
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
15019
+ case "dateTimeNotEquals":
15020
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
15021
+ case "dateTimeGreaterThan":
15022
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "after" };
15023
+ case "dateTimeGreaterThanOrEqual":
15024
+ return {
15025
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
15026
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
15027
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
15028
+ ] }),
15029
+ translationKey: "onOrAfter"
15030
+ };
15031
+ case "dateTimeLessThan":
15032
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "before" };
15033
+ case "dateTimeLessThanOrEqual":
15034
+ return {
15035
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
15036
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
15037
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
15038
+ ] }),
15039
+ translationKey: "onOrBefore"
15040
+ };
15041
+ case "dateTimeBetween":
15042
+ return {
15043
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
15044
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
15045
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
15046
+ ] }),
15047
+ translationKey: "between"
15048
+ };
15049
+ case "dateTimeNotBetween":
15050
+ return {
15051
+ icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
15052
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
15053
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
15054
+ ] }),
15055
+ translationKey: "notBetween"
15056
+ };
15057
+ case "tagsSingleEquals":
15058
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
15059
+ case "tagsSingleNotEquals":
15060
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
15061
+ case "tagsSingleContains":
15062
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
15063
+ case "tagsSingleNotContains":
15064
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
14776
15065
  case "undefined":
14777
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.CircleDashed, { className: "w-4 h-4" }), translationKey: "filterUndefined" };
15066
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CircleDashed, { className: "w-4 h-4" }), translationKey: "filterUndefined" };
14778
15067
  case "notUndefined":
14779
- return { icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react17.CircleDot, { className: "w-4 h-4" }), translationKey: "filterNotUndefined" };
15068
+ return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CircleDot, { className: "w-4 h-4" }), translationKey: "filterNotUndefined" };
14780
15069
  default:
14781
15070
  return { icon: null, translationKey: "undefined translation" };
14782
15071
  }
@@ -14785,22 +15074,23 @@ var OperatorLabel = ({ operator }) => {
14785
15074
  const translation = useHightideTranslation();
14786
15075
  const { icon, translationKey } = getOperatorInfo(operator);
14787
15076
  const label = typeof translationKey === "string" ? translation(translationKey) : translationKey;
14788
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-row-1 items-center gap-2", children: [
15077
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-1 items-center gap-2", children: [
14789
15078
  icon,
14790
15079
  label
14791
15080
  ] });
14792
15081
  };
14793
15082
  var TextFilter = ({ filterValue, onFilterValueChange }) => {
14794
15083
  const translation = useHightideTranslation();
14795
- const operator = filterValue?.operator ?? "textEquals";
15084
+ const operator = filterValue?.operator ?? "textContains";
14796
15085
  const parameter = filterValue?.parameter ?? {};
14797
- const availableOperators = (0, import_react66.useMemo)(() => [
15086
+ const id = (0, import_react67.useId)();
15087
+ const availableOperators = (0, import_react67.useMemo)(() => [
14798
15088
  ...TableFilterOperator.text,
14799
15089
  ...TableFilterOperator.generic
14800
15090
  ], []);
14801
15091
  const needsParameterInput = !["textNotWhitespace", "undefined", "notUndefined"].includes(operator);
14802
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
14803
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15092
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15093
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14804
15094
  Select,
14805
15095
  {
14806
15096
  value: operator,
@@ -14811,39 +15101,73 @@ var TextFilter = ({ filterValue, onFilterValueChange }) => {
14811
15101
  });
14812
15102
  },
14813
15103
  buttonProps: { className: "min-w-64" },
14814
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15104
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
14815
15105
  }
14816
15106
  ),
14817
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
14818
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
14819
- Input,
14820
- {
14821
- value: parameter.searchText ?? "",
14822
- placeholder: translation("search") + "...",
14823
- onValueChange: (searchText) => {
14824
- onFilterValueChange({
14825
- operator,
14826
- parameter: { searchText }
14827
- });
14828
- },
14829
- className: "min-w-64"
14830
- }
14831
- ) }),
14832
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
15107
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15108
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Visibility, { isVisible: needsParameterInput, children: [
15109
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15110
+ Input,
15111
+ {
15112
+ value: parameter.searchText ?? "",
15113
+ placeholder: translation("search") + "...",
15114
+ onValueChange: (searchText) => {
15115
+ onFilterValueChange({
15116
+ operator,
15117
+ parameter: { ...parameter, searchText }
15118
+ });
15119
+ },
15120
+ className: "min-w-64"
15121
+ }
15122
+ ),
15123
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-2 items-center gap-2", children: [
15124
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15125
+ Checkbox,
15126
+ {
15127
+ id,
15128
+ value: parameter.isCaseSensitive ?? false,
15129
+ onValueChange: (isCaseSensitive) => {
15130
+ onFilterValueChange({
15131
+ operator,
15132
+ parameter: { ...parameter, isCaseSensitive }
15133
+ });
15134
+ }
15135
+ }
15136
+ ),
15137
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { htmlFor: id, children: translation("caseSensitive") })
15138
+ ] }),
15139
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-2 items-center gap-2", children: [
15140
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15141
+ Checkbox,
15142
+ {
15143
+ id,
15144
+ value: parameter.isCaseSensitive ?? false,
15145
+ onValueChange: (isCaseSensitive) => {
15146
+ onFilterValueChange({
15147
+ operator,
15148
+ parameter: { ...parameter, isCaseSensitive }
15149
+ });
15150
+ }
15151
+ }
15152
+ ),
15153
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { htmlFor: id, children: translation("caseSensitive") })
15154
+ ] })
15155
+ ] }),
15156
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
14833
15157
  ] });
14834
15158
  };
14835
15159
  var NumberFilter = ({ filterValue, onFilterValueChange }) => {
14836
15160
  const translation = useHightideTranslation();
14837
- const operator = filterValue?.operator ?? "numberEquals";
15161
+ const operator = filterValue?.operator ?? "numberBetween";
14838
15162
  const parameter = filterValue?.parameter ?? {};
14839
- const availableOperators = (0, import_react66.useMemo)(() => [
15163
+ const availableOperators = (0, import_react67.useMemo)(() => [
14840
15164
  ...TableFilterOperator.number,
14841
15165
  ...TableFilterOperator.generic
14842
15166
  ], []);
14843
15167
  const needsRangeInput = operator === "numberBetween" || operator === "numberNotBetween";
14844
15168
  const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
14845
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
14846
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15169
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15170
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14847
15171
  Select,
14848
15172
  {
14849
15173
  value: operator,
@@ -14854,12 +15178,12 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
14854
15178
  });
14855
15179
  },
14856
15180
  buttonProps: { className: "min-w-64" },
14857
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15181
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
14858
15182
  }
14859
15183
  ),
14860
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
14861
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
14862
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FormFieldLayout, { label: translation("min"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15184
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15185
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15186
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FormFieldLayout, { label: translation("min"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14863
15187
  Input,
14864
15188
  {
14865
15189
  ...ariaAttributes,
@@ -14878,7 +15202,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
14878
15202
  className: "input-indicator-hidden min-w-64"
14879
15203
  }
14880
15204
  ) }),
14881
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FormFieldLayout, { label: translation("max"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15205
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FormFieldLayout, { label: translation("max"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14882
15206
  Input,
14883
15207
  {
14884
15208
  ...ariaAttributes,
@@ -14898,7 +15222,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
14898
15222
  }
14899
15223
  ) })
14900
15224
  ] }) }),
14901
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15225
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14902
15226
  Input,
14903
15227
  {
14904
15228
  value: parameter.compareValue?.toString() ?? "",
@@ -14914,23 +15238,23 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
14914
15238
  className: "min-w-64"
14915
15239
  }
14916
15240
  ) }),
14917
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15241
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
14918
15242
  ] });
14919
15243
  };
14920
15244
  var DateFilter = ({ filterValue, onFilterValueChange }) => {
14921
15245
  const translation = useHightideTranslation();
14922
- const operator = filterValue?.operator ?? "dateEquals";
15246
+ const operator = filterValue?.operator ?? "dateBetween";
14923
15247
  const parameter = filterValue?.parameter ?? {};
14924
- const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react66.useState)(null);
14925
- const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react66.useState)(null);
14926
- const availableOperators = (0, import_react66.useMemo)(() => [
15248
+ const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react67.useState)(null);
15249
+ const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react67.useState)(null);
15250
+ const availableOperators = (0, import_react67.useMemo)(() => [
14927
15251
  ...TableFilterOperator.date,
14928
15252
  ...TableFilterOperator.generic
14929
15253
  ], []);
14930
15254
  const needsRangeInput = operator === "dateBetween" || operator === "dateNotBetween";
14931
15255
  const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
14932
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
14933
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15256
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15257
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14934
15258
  Select,
14935
15259
  {
14936
15260
  value: operator,
@@ -14941,12 +15265,12 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
14941
15265
  });
14942
15266
  },
14943
15267
  buttonProps: { className: "min-w-64" },
14944
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15268
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
14945
15269
  }
14946
15270
  ),
14947
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
14948
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
14949
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15271
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15272
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15273
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14950
15274
  DateTimeInput,
14951
15275
  {
14952
15276
  value: temporaryMinDateValue ?? parameter.min ?? null,
@@ -14979,7 +15303,7 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
14979
15303
  className: "min-w-64"
14980
15304
  }
14981
15305
  ),
14982
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15306
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14983
15307
  DateTimeInput,
14984
15308
  {
14985
15309
  value: temporaryMaxDateValue ?? parameter.max ?? null,
@@ -15012,7 +15336,7 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
15012
15336
  }
15013
15337
  )
15014
15338
  ] }) }),
15015
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15339
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15016
15340
  DateTimeInput,
15017
15341
  {
15018
15342
  value: parameter.compareDate ?? null,
@@ -15028,16 +15352,132 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
15028
15352
  className: "min-w-64"
15029
15353
  }
15030
15354
  ) }),
15031
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15355
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15356
+ ] });
15357
+ };
15358
+ var DatetimeFilter = ({ filterValue, onFilterValueChange }) => {
15359
+ const translation = useHightideTranslation();
15360
+ const operator = filterValue?.operator ?? "dateTimeBetween";
15361
+ const parameter = filterValue?.parameter ?? {};
15362
+ const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react67.useState)(null);
15363
+ const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react67.useState)(null);
15364
+ const availableOperators = (0, import_react67.useMemo)(() => [
15365
+ ...TableFilterOperator.dateTime,
15366
+ ...TableFilterOperator.generic
15367
+ ], []);
15368
+ const needsRangeInput = operator === "dateTimeBetween" || operator === "dateTimeNotBetween";
15369
+ const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
15370
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15371
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15372
+ Select,
15373
+ {
15374
+ value: operator,
15375
+ onValueChange: (newOperator) => {
15376
+ onFilterValueChange({
15377
+ operator: newOperator,
15378
+ parameter: needsParameterInput ? parameter : {}
15379
+ });
15380
+ },
15381
+ buttonProps: { className: "min-w-64" },
15382
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
15383
+ }
15384
+ ),
15385
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15386
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15387
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15388
+ DateTimeInput,
15389
+ {
15390
+ mode: "dateTime",
15391
+ value: temporaryMinDateValue ?? parameter.min ?? null,
15392
+ placeholder: translation("startDate"),
15393
+ onValueChange: (value) => setTemporaryMinDateValue(value),
15394
+ onEditComplete: (value) => {
15395
+ if (value && parameter.max && value > parameter.max) {
15396
+ if (!parameter.min) {
15397
+ onFilterValueChange({
15398
+ operator,
15399
+ parameter: { min: parameter.max, max: value }
15400
+ });
15401
+ } else {
15402
+ const diff = parameter.max.getTime() - parameter.min.getTime();
15403
+ onFilterValueChange({
15404
+ operator,
15405
+ parameter: { min: value, max: new Date(value.getTime() + diff) }
15406
+ });
15407
+ }
15408
+ } else {
15409
+ onFilterValueChange({
15410
+ operator,
15411
+ parameter: { ...parameter, min: value }
15412
+ });
15413
+ }
15414
+ setTemporaryMinDateValue(null);
15415
+ },
15416
+ allowRemove: true,
15417
+ outsideClickCloses: false,
15418
+ className: "min-w-64"
15419
+ }
15420
+ ),
15421
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15422
+ DateTimeInput,
15423
+ {
15424
+ mode: "dateTime",
15425
+ value: temporaryMaxDateValue ?? parameter.max ?? null,
15426
+ placeholder: translation("endDate"),
15427
+ onValueChange: (value) => setTemporaryMaxDateValue(value),
15428
+ onEditComplete: (value) => {
15429
+ if (value && parameter.min && value < parameter.min) {
15430
+ if (!parameter.max) {
15431
+ onFilterValueChange({
15432
+ operator,
15433
+ parameter: { min: value, max: parameter.min }
15434
+ });
15435
+ } else {
15436
+ const diff = parameter.max.getTime() - parameter.min.getTime();
15437
+ onFilterValueChange({
15438
+ operator,
15439
+ parameter: { min: new Date(value.getTime() - diff), max: value }
15440
+ });
15441
+ }
15442
+ } else {
15443
+ onFilterValueChange({
15444
+ operator,
15445
+ parameter: { ...parameter, max: value }
15446
+ });
15447
+ }
15448
+ },
15449
+ allowRemove: true,
15450
+ outsideClickCloses: false,
15451
+ className: "min-w-64"
15452
+ }
15453
+ )
15454
+ ] }) }),
15455
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15456
+ DateTimeInput,
15457
+ {
15458
+ value: parameter.compareDatetime ?? null,
15459
+ placeholder: translation("date"),
15460
+ onValueChange: (compareDatetime) => {
15461
+ onFilterValueChange({
15462
+ operator,
15463
+ parameter: { compareDatetime }
15464
+ });
15465
+ },
15466
+ allowRemove: true,
15467
+ outsideClickCloses: false,
15468
+ className: "min-w-64"
15469
+ }
15470
+ ) }),
15471
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15032
15472
  ] });
15033
15473
  };
15034
15474
  var BooleanFilter = ({ filterValue, onFilterValueChange }) => {
15035
15475
  const operator = filterValue?.operator ?? "booleanIsTrue";
15036
- const availableOperators = (0, import_react66.useMemo)(() => [
15476
+ const availableOperators = (0, import_react67.useMemo)(() => [
15037
15477
  ...TableFilterOperator.boolean,
15038
15478
  ...TableFilterOperator.generic
15039
15479
  ], []);
15040
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15480
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15041
15481
  Select,
15042
15482
  {
15043
15483
  value: operator,
@@ -15048,7 +15488,7 @@ var BooleanFilter = ({ filterValue, onFilterValueChange }) => {
15048
15488
  });
15049
15489
  },
15050
15490
  buttonProps: { className: "min-w-64" },
15051
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15491
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
15052
15492
  }
15053
15493
  ) });
15054
15494
  };
@@ -15057,11 +15497,11 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
15057
15497
  const { table } = useTableDataContext();
15058
15498
  const operator = filterValue?.operator ?? "tagsContains";
15059
15499
  const parameter = filterValue?.parameter ?? {};
15060
- const availableOperators = (0, import_react66.useMemo)(() => [
15500
+ const availableOperators = (0, import_react67.useMemo)(() => [
15061
15501
  ...TableFilterOperator.tags,
15062
15502
  ...TableFilterOperator.generic
15063
15503
  ], []);
15064
- const availableTags = (0, import_react66.useMemo)(() => {
15504
+ const availableTags = (0, import_react67.useMemo)(() => {
15065
15505
  const column = table.getColumn(columnId);
15066
15506
  if (!column) return [];
15067
15507
  return column.columnDef.meta?.filterData?.tags ?? [];
@@ -15070,8 +15510,8 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
15070
15510
  return null;
15071
15511
  }
15072
15512
  const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
15073
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15074
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15513
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15514
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15075
15515
  Select,
15076
15516
  {
15077
15517
  value: operator,
@@ -15082,12 +15522,12 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
15082
15522
  });
15083
15523
  },
15084
15524
  buttonProps: { className: "min-w-64" },
15085
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15525
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
15086
15526
  }
15087
15527
  ),
15088
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15089
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15090
- MultiSelectUncontrolled,
15528
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15529
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15530
+ MultiSelect,
15091
15531
  {
15092
15532
  value: Array.isArray(parameter.searchTags) ? parameter.searchTags.map((tag) => String(tag)) : [],
15093
15533
  onValueChange: (selectedTags) => {
@@ -15097,18 +15537,84 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
15097
15537
  });
15098
15538
  },
15099
15539
  buttonProps: { className: "min-w-64" },
15100
- children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(MultiSelectOption, { value: tag, children: label }, tag))
15540
+ children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MultiSelectOption, { value: tag, children: label }, tag))
15541
+ }
15542
+ ) }),
15543
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15544
+ ] });
15545
+ };
15546
+ var TagsSingleFilter = ({ columnId, filterValue, onFilterValueChange }) => {
15547
+ const translation = useHightideTranslation();
15548
+ const { table } = useTableDataContext();
15549
+ const operator = filterValue?.operator ?? "tagsSingleContains";
15550
+ const parameter = filterValue?.parameter ?? {};
15551
+ const availableOperators = (0, import_react67.useMemo)(() => [
15552
+ ...TableFilterOperator.tagsSingle,
15553
+ ...TableFilterOperator.generic
15554
+ ], []);
15555
+ const availableTags = (0, import_react67.useMemo)(() => {
15556
+ const column = table.getColumn(columnId);
15557
+ if (!column) return [];
15558
+ return column.columnDef.meta?.filterData?.tags ?? [];
15559
+ }, [columnId, table]);
15560
+ if (availableTags.length === 0) {
15561
+ return null;
15562
+ }
15563
+ const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
15564
+ const needsMultiSelect = operator === "tagsSingleContains" || operator === "tagsSingleNotContains";
15565
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
15566
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15567
+ Select,
15568
+ {
15569
+ value: operator,
15570
+ onValueChange: (newOperator) => {
15571
+ onFilterValueChange({
15572
+ operator: newOperator,
15573
+ parameter: needsParameterInput ? parameter : {}
15574
+ });
15575
+ },
15576
+ buttonProps: { className: "min-w-64" },
15577
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
15578
+ }
15579
+ ),
15580
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
15581
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput && needsMultiSelect, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15582
+ MultiSelect,
15583
+ {
15584
+ value: Array.isArray(parameter.searchTagsContains) ? parameter.searchTagsContains.map((tag) => String(tag)) : [],
15585
+ onValueChange: (selectedTags) => {
15586
+ onFilterValueChange({
15587
+ operator,
15588
+ parameter: { searchTagsContains: selectedTags.length > 0 ? selectedTags : void 0 }
15589
+ });
15590
+ },
15591
+ buttonProps: { className: "min-w-64" },
15592
+ children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MultiSelectOption, { value: tag, children: label }, tag))
15101
15593
  }
15102
15594
  ) }),
15103
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15595
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput && !needsMultiSelect, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15596
+ Select,
15597
+ {
15598
+ value: parameter.searchTag ? String(parameter.searchTag) : void 0,
15599
+ onValueChange: (selectedTag) => {
15600
+ onFilterValueChange({
15601
+ operator,
15602
+ parameter: { searchTag: selectedTag ? String(selectedTag) : void 0 }
15603
+ });
15604
+ },
15605
+ buttonProps: { className: "min-w-64" },
15606
+ children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: tag, children: label }, tag))
15607
+ }
15608
+ ) }),
15609
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-description", children: translation("noParameterRequired") }) })
15104
15610
  ] });
15105
15611
  };
15106
15612
  var GenericFilter = ({ filterValue, onFilterValueChange }) => {
15107
15613
  const operator = filterValue?.operator ?? "notUndefined";
15108
- const availableOperators = (0, import_react66.useMemo)(() => [
15614
+ const availableOperators = (0, import_react67.useMemo)(() => [
15109
15615
  ...TableFilterOperator.generic
15110
15616
  ], []);
15111
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
15617
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15112
15618
  Select,
15113
15619
  {
15114
15620
  value: operator,
@@ -15119,56 +15625,60 @@ var GenericFilter = ({ filterValue, onFilterValueChange }) => {
15119
15625
  });
15120
15626
  },
15121
15627
  buttonProps: { className: "min-w-64" },
15122
- children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OperatorLabel, { operator: op }) }, op))
15628
+ children: availableOperators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: op, iconAppearance: "right", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(OperatorLabel, { operator: op }) }, op))
15123
15629
  }
15124
15630
  ) });
15125
15631
  };
15126
15632
  var TableFilterContent = ({ filterType, ...props }) => {
15127
15633
  switch (filterType) {
15128
15634
  case "text":
15129
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextFilter, { ...props });
15635
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TextFilter, { ...props });
15130
15636
  case "number":
15131
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(NumberFilter, { ...props });
15637
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NumberFilter, { ...props });
15132
15638
  case "date":
15133
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DateFilter, { ...props });
15639
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DateFilter, { ...props });
15640
+ case "dateTime":
15641
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DatetimeFilter, { ...props });
15134
15642
  case "boolean":
15135
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(BooleanFilter, { ...props });
15643
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BooleanFilter, { ...props });
15136
15644
  case "tags":
15137
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TagsFilter, { ...props });
15645
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TagsFilter, { ...props });
15646
+ case "tagsSingle":
15647
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TagsSingleFilter, { ...props });
15138
15648
  case "generic":
15139
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GenericFilter, { ...props });
15649
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(GenericFilter, { ...props });
15140
15650
  default:
15141
15651
  return null;
15142
15652
  }
15143
15653
  };
15144
15654
 
15145
15655
  // src/components/layout/table/TableFilterButton.tsx
15146
- var import_jsx_runtime67 = require("react/jsx-runtime");
15656
+ var import_jsx_runtime68 = require("react/jsx-runtime");
15147
15657
  var TableFilterButton = ({
15148
15658
  filterType,
15149
15659
  column
15150
15660
  }) => {
15151
15661
  const translation = useHightideTranslation();
15152
15662
  const columnFilterValue = column.getFilterValue();
15153
- const [filterValue, setFilterValue] = (0, import_react67.useState)(columnFilterValue);
15663
+ const [filterValue, setFilterValue] = (0, import_react68.useState)(columnFilterValue);
15154
15664
  const hasFilter = !!filterValue;
15155
- const anchorRef = (0, import_react67.useRef)(null);
15156
- const containerRef = (0, import_react67.useRef)(null);
15157
- const [isOpen, setIsOpen] = (0, import_react67.useState)(false);
15158
- const id = (0, import_react67.useId)();
15159
- const ids = (0, import_react67.useMemo)(() => ({
15665
+ const anchorRef = (0, import_react68.useRef)(null);
15666
+ const containerRef = (0, import_react68.useRef)(null);
15667
+ const [isOpen, setIsOpen] = (0, import_react68.useState)(false);
15668
+ const id = (0, import_react68.useId)();
15669
+ const ids = (0, import_react68.useMemo)(() => ({
15160
15670
  button: `table-filter-button-${id}`,
15161
15671
  popup: `table-filter-popup-${id}`,
15162
15672
  label: `table-filter-label-${id}`
15163
15673
  }), [id]);
15164
- (0, import_react67.useEffect)(() => {
15674
+ (0, import_react68.useEffect)(() => {
15165
15675
  setFilterValue(columnFilterValue);
15166
15676
  }, [columnFilterValue]);
15167
15677
  if (filterType === "tags" && (!column.columnDef.meta?.filterData?.tags?.length || column.columnDef.meta.filterData.tags.length === 0)) {
15168
15678
  return null;
15169
15679
  }
15170
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
15171
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
15680
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
15681
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Tooltip, { tooltip: translation("filter"), position: "top", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
15172
15682
  Button,
15173
15683
  {
15174
15684
  ref: anchorRef,
@@ -15184,12 +15694,12 @@ var TableFilterButton = ({
15184
15694
  "aria-labelledby": ids.label,
15185
15695
  className: "relative",
15186
15696
  children: [
15187
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.FilterIcon, { className: "size-4" }),
15188
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: hasFilter, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute -top-1 -right-1 w-2 h-2 rounded-full bg-primary" }) })
15697
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react19.FilterIcon, { className: "size-4" }),
15698
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: hasFilter, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute -top-1 -right-1 w-2 h-2 rounded-full bg-primary" }) })
15189
15699
  ]
15190
15700
  }
15191
- ),
15192
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
15701
+ ) }),
15702
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
15193
15703
  PopUp,
15194
15704
  {
15195
15705
  ref: containerRef,
@@ -15205,8 +15715,8 @@ var TableFilterButton = ({
15205
15715
  "aria-labelledby": ids.label,
15206
15716
  className: "flex-col-2 p-2 items-start",
15207
15717
  children: [
15208
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { id: ids.label, className: "typography-label-lg font-semibold", children: translation("filter") }),
15209
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
15718
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { id: ids.label, className: "typography-label-lg font-semibold", children: translation("filter") }),
15719
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
15210
15720
  TableFilterContent,
15211
15721
  {
15212
15722
  columnId: column.id,
@@ -15215,12 +15725,12 @@ var TableFilterButton = ({
15215
15725
  onFilterValueChange: setFilterValue
15216
15726
  }
15217
15727
  ),
15218
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
15219
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { color: "negative", size: "sm", onClick: () => {
15728
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
15729
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { color: "negative", size: "sm", onClick: () => {
15220
15730
  column.setFilterValue(void 0);
15221
15731
  setIsOpen(false);
15222
15732
  }, children: translation("remove") }),
15223
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { size: "sm", onClick: () => {
15733
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { size: "sm", onClick: () => {
15224
15734
  if (filterValue) {
15225
15735
  column.setFilterValue(filterValue);
15226
15736
  }
@@ -15234,12 +15744,12 @@ var TableFilterButton = ({
15234
15744
  };
15235
15745
 
15236
15746
  // src/components/layout/table/TableHeader.tsx
15237
- var import_react68 = require("react");
15238
- var import_jsx_runtime68 = require("react/jsx-runtime");
15747
+ var import_react69 = require("react");
15748
+ var import_jsx_runtime69 = require("react/jsx-runtime");
15239
15749
  var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15240
15750
  const { table: tableState } = useTableHeaderContext();
15241
15751
  const table = tableOverride ?? tableState;
15242
- const handleResizeMove = (0, import_react68.useCallback)((e) => {
15752
+ const handleResizeMove = (0, import_react69.useCallback)((e) => {
15243
15753
  if (!table.getState().columnSizingInfo.isResizingColumn) return;
15244
15754
  const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
15245
15755
  const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
@@ -15255,7 +15765,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15255
15765
  deltaOffset
15256
15766
  }));
15257
15767
  }, [table]);
15258
- const handleResizeEnd = (0, import_react68.useCallback)(() => {
15768
+ const handleResizeEnd = (0, import_react69.useCallback)(() => {
15259
15769
  if (!table.getState().columnSizingInfo.isResizingColumn) return;
15260
15770
  const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
15261
15771
  table.setColumnSizing((prev) => {
@@ -15273,7 +15783,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15273
15783
  startSize: null
15274
15784
  });
15275
15785
  }, [table]);
15276
- (0, import_react68.useEffect)(() => {
15786
+ (0, import_react69.useEffect)(() => {
15277
15787
  window.addEventListener("pointermove", handleResizeMove);
15278
15788
  window.addEventListener("pointerup", handleResizeEnd);
15279
15789
  return () => {
@@ -15281,8 +15791,8 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15281
15791
  window.removeEventListener("pointerup", handleResizeEnd);
15282
15792
  };
15283
15793
  }, [handleResizeEnd, handleResizeMove, table]);
15284
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
15285
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
15794
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
15795
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
15286
15796
  "col",
15287
15797
  {
15288
15798
  style: {
@@ -15293,16 +15803,16 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15293
15803
  },
15294
15804
  header.id
15295
15805
  )) }, headerGroup.id)),
15296
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("tr", { className: (0, import_clsx33.default)("table-header-row", table.options.meta?.headerRowClassName), children: headerGroup.headers.map((header) => {
15297
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
15806
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("tr", { className: (0, import_clsx34.default)("table-header-row", table.options.meta?.headerRowClassName), children: headerGroup.headers.map((header) => {
15807
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
15298
15808
  "th",
15299
15809
  {
15300
15810
  colSpan: header.colSpan,
15301
15811
  "data-sticky": isSticky ? "" : void 0,
15302
- className: (0, import_clsx33.default)("table-header-cell group/table-header-cell", header.column.columnDef.meta?.className),
15812
+ className: (0, import_clsx34.default)("table-header-cell group/table-header-cell", header.column.columnDef.meta?.className),
15303
15813
  children: [
15304
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-row-1 items-center", children: [
15305
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
15814
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex-row-1 items-center", children: [
15815
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
15306
15816
  TableSortButton,
15307
15817
  {
15308
15818
  sortDirection: header.column.getIsSorted(),
@@ -15328,7 +15838,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15328
15838
  }
15329
15839
  }
15330
15840
  ) }),
15331
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: header.column.getCanFilter() && isTableFilterCategory(header.column.columnDef.filterFn), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
15841
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanFilter() && isTableFilterCategory(header.column.columnDef.filterFn), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
15332
15842
  TableFilterButton,
15333
15843
  {
15334
15844
  column: header.column,
@@ -15340,7 +15850,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15340
15850
  header.getContext()
15341
15851
  )
15342
15852
  ] }) }),
15343
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
15853
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
15344
15854
  "div",
15345
15855
  {
15346
15856
  onPointerDown: (e) => {
@@ -15371,8 +15881,8 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
15371
15881
  };
15372
15882
 
15373
15883
  // src/components/layout/table/TableDisplay.tsx
15374
- var import_clsx34 = __toESM(require("clsx"));
15375
- var import_jsx_runtime69 = require("react/jsx-runtime");
15884
+ var import_clsx35 = __toESM(require("clsx"));
15885
+ var import_jsx_runtime70 = require("react/jsx-runtime");
15376
15886
  var TableDisplay = ({
15377
15887
  children,
15378
15888
  containerProps,
@@ -15382,38 +15892,38 @@ var TableDisplay = ({
15382
15892
  const { table } = useTableDataContext();
15383
15893
  const { containerRef } = useTableContainerContext();
15384
15894
  const { sizeVars } = useTableHeaderContext();
15385
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { ...containerProps, ref: containerRef, className: (0, import_clsx34.default)("table-container", containerProps?.className), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
15895
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ...containerProps, ref: containerRef, className: (0, import_clsx35.default)("table-container", containerProps?.className), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
15386
15896
  "table",
15387
15897
  {
15388
15898
  ...props,
15389
- className: (0, import_clsx34.default)("table", props.className),
15899
+ className: (0, import_clsx35.default)("table", props.className),
15390
15900
  style: {
15391
15901
  ...sizeVars,
15392
15902
  width: Math.floor(Math.max(table.getTotalSize(), containerRef.current?.offsetWidth ?? table.getTotalSize()))
15393
15903
  },
15394
15904
  children: [
15395
15905
  children,
15396
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TableHeader, { ...tableHeaderProps }),
15397
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TableBody, {})
15906
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TableHeader, { ...tableHeaderProps }),
15907
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TableBody, {})
15398
15908
  ]
15399
15909
  }
15400
15910
  ) });
15401
15911
  };
15402
15912
 
15403
15913
  // src/components/layout/table/TablePagination.tsx
15404
- var import_react69 = require("react");
15405
- var import_clsx35 = __toESM(require("clsx"));
15406
- var import_jsx_runtime70 = require("react/jsx-runtime");
15914
+ var import_react70 = require("react");
15915
+ var import_clsx36 = __toESM(require("clsx"));
15916
+ var import_jsx_runtime71 = require("react/jsx-runtime");
15407
15917
  var TablePaginationMenu = ({ ...props }) => {
15408
15918
  const { table } = useTableDataContext();
15409
- (0, import_react69.useEffect)(() => {
15919
+ (0, import_react70.useEffect)(() => {
15410
15920
  const { pageIndex } = table.getState().pagination;
15411
15921
  const pageCount = table.getPageCount();
15412
15922
  if (pageIndex >= pageCount || pageIndex < 0) {
15413
15923
  table.setPageIndex(MathUtil.clamp(pageIndex, [0, pageCount - 1]));
15414
15924
  }
15415
15925
  }, [table]);
15416
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
15926
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15417
15927
  Pagination,
15418
15928
  {
15419
15929
  ...props,
@@ -15433,94 +15943,23 @@ var TablePageSizeSelect = ({
15433
15943
  }) => {
15434
15944
  const { table } = useTableDataContext();
15435
15945
  const currentPageSize = table.getState().pagination.pageSize;
15436
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
15946
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15437
15947
  Select,
15438
15948
  {
15439
15949
  ...props,
15440
15950
  value: currentPageSize.toString(),
15441
15951
  onValueChange: (value) => table.setPageSize(Number(value)),
15442
- children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectOption, { value: size.toString(), children: size }, size))
15952
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectOption, { value: size.toString(), children: size }, size))
15443
15953
  }
15444
15954
  );
15445
15955
  };
15446
15956
  var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
15447
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { ...props, className: (0, import_clsx35.default)("container flex-col-2 sm:flex-row-8 items-center justify-center", props.className), children: [
15448
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TablePaginationMenu, {}),
15449
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "h-10 min-w-24 max-w-24" } }) })
15957
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { ...props, className: (0, import_clsx36.default)("container flex-col-2 sm:flex-row-8 items-center justify-center", props.className), children: [
15958
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TablePaginationMenu, {}),
15959
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "h-10 min-w-24 max-w-24" } }) })
15450
15960
  ] });
15451
15961
  };
15452
15962
 
15453
- // src/components/user-interaction/Checkbox.tsx
15454
- var import_lucide_react19 = require("lucide-react");
15455
- var import_react70 = require("react");
15456
- var import_clsx36 = __toESM(require("clsx"));
15457
- var import_jsx_runtime71 = require("react/jsx-runtime");
15458
- var Checkbox = ({
15459
- value = false,
15460
- indeterminate = false,
15461
- required = false,
15462
- invalid = false,
15463
- disabled = false,
15464
- readOnly = false,
15465
- onValueChange,
15466
- onEditComplete,
15467
- size = "md",
15468
- alwaysShowCheckIcon = false,
15469
- ...props
15470
- }) => {
15471
- const onChangeWrapper = (0, import_react70.useCallback)(() => {
15472
- onValueChange?.(!value);
15473
- onEditComplete?.(!value);
15474
- }, [onEditComplete, onValueChange, value]);
15475
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
15476
- "div",
15477
- {
15478
- ...props,
15479
- onClick: (event) => {
15480
- if (!disabled) {
15481
- onChangeWrapper();
15482
- props.onClick?.(event);
15483
- }
15484
- },
15485
- onKeyDown: (event) => {
15486
- if (disabled) return;
15487
- if (event.key === " " || event.key === "Enter") {
15488
- event.preventDefault();
15489
- onChangeWrapper();
15490
- props.onKeyDown?.(event);
15491
- }
15492
- },
15493
- "data-checked": !indeterminate ? value : "indeterminate",
15494
- "data-size": size ?? void 0,
15495
- ...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
15496
- role: "checkbox",
15497
- tabIndex: disabled ? -1 : 0,
15498
- "aria-checked": indeterminate ? "mixed" : value,
15499
- ...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
15500
- className: (0, import_clsx36.default)("checkbox", props.className),
15501
- children: [
15502
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Minus, { className: "checkbox-indicator", "aria-hidden": true }) }),
15503
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Check, { className: "checkbox-indicator", "aria-hidden": true }) })
15504
- ]
15505
- }
15506
- );
15507
- };
15508
- var CheckboxUncontrolled = ({
15509
- value: initialValue,
15510
- onValueChange,
15511
- ...props
15512
- }) => {
15513
- const [value, setValue] = useOverwritableState(initialValue, onValueChange);
15514
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15515
- Checkbox,
15516
- {
15517
- ...props,
15518
- value,
15519
- onValueChange: setValue
15520
- }
15521
- );
15522
- };
15523
-
15524
15963
  // src/components/layout/table/TableWithSelectionProvider.tsx
15525
15964
  var import_react71 = require("react");
15526
15965
  var import_jsx_runtime72 = require("react/jsx-runtime");
@@ -15534,6 +15973,7 @@ var TableWithSelectionProvider = ({
15534
15973
  onRowClick,
15535
15974
  ...props
15536
15975
  }) => {
15976
+ const translation = useHightideTranslation();
15537
15977
  const columnDef = (0, import_react71.useMemo)(() => [
15538
15978
  {
15539
15979
  id: selectionRowId,
@@ -15566,10 +16006,13 @@ var TableWithSelectionProvider = ({
15566
16006
  enableResizing: false,
15567
16007
  enableSorting: false,
15568
16008
  enableHiding: false,
15569
- enableColumnFilter: false
16009
+ enableColumnFilter: false,
16010
+ meta: {
16011
+ columnLabel: translation("selection")
16012
+ }
15570
16013
  },
15571
16014
  ...props.columns ?? []
15572
- ], [selectionRowId, props.columns]);
16015
+ ], [selectionRowId, props.columns, translation]);
15573
16016
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
15574
16017
  TableProvider,
15575
16018
  {
@@ -15788,6 +16231,10 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
15788
16231
  };
15789
16232
  const getColumnHeader = (columnId) => {
15790
16233
  const column = table.getColumn(columnId);
16234
+ const columnLabel = column?.columnDef.meta?.columnLabel;
16235
+ if (columnLabel) {
16236
+ return columnLabel;
16237
+ }
15791
16238
  const header = column?.columnDef.header;
15792
16239
  if (typeof header === "string") {
15793
16240
  return header;
@@ -17734,6 +18181,7 @@ var PromiseUtils = {
17734
18181
  DateTimePickerDialog,
17735
18182
  DateTimePickerUncontrolled,
17736
18183
  DateUtils,
18184
+ DatetimeFilter,
17737
18185
  DayPicker,
17738
18186
  DayPickerUncontrolled,
17739
18187
  Dialog,
@@ -17869,6 +18317,7 @@ var PromiseUtils = {
17869
18317
  TableWithSelectionProvider,
17870
18318
  TagIcon,
17871
18319
  TagsFilter,
18320
+ TagsSingleFilter,
17872
18321
  TextFilter,
17873
18322
  TextImage,
17874
18323
  TextProperty,
@@ -17898,6 +18347,14 @@ var PromiseUtils = {
17898
18347
  createLoopingList,
17899
18348
  createLoopingListWithIndex,
17900
18349
  equalSizeGroups,
18350
+ filterBoolean,
18351
+ filterDate,
18352
+ filterDatetime,
18353
+ filterGeneric,
18354
+ filterNumber,
18355
+ filterTags,
18356
+ filterTagsSingle,
18357
+ filterText,
17901
18358
  formatDate,
17902
18359
  formatDateTime,
17903
18360
  getBetweenDuration,