@helpwave/hightide 0.6.12 → 0.6.13
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.d.mts +74 -6
- package/dist/index.d.ts +74 -6
- package/dist/index.js +765 -330
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +742 -317
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,
|
|
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(
|
|
7361
|
-
}, [store,
|
|
7362
|
-
const value = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getValue(
|
|
7363
|
-
const error = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getError(
|
|
7364
|
-
const touched = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getTouched(
|
|
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,
|
|
7417
|
-
const formObserver = useFormObserverKey({ formStore,
|
|
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/
|
|
13182
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13253
|
-
|
|
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
|
|
13276
|
-
if (!
|
|
13277
|
-
return normalizedDate.getTime() === normalizeToDateOnly(
|
|
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
|
|
13281
|
-
if (!
|
|
13282
|
-
return normalizedDate.getTime() !== normalizeToDateOnly(
|
|
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
|
|
13286
|
-
if (!
|
|
13287
|
-
return normalizedDate > normalizeToDateOnly(
|
|
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
|
|
13291
|
-
if (!
|
|
13292
|
-
return normalizedDate >= normalizeToDateOnly(
|
|
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
|
|
13296
|
-
if (!
|
|
13297
|
-
return normalizedDate < normalizeToDateOnly(
|
|
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
|
|
13301
|
-
if (!
|
|
13302
|
-
return normalizedDate <= normalizeToDateOnly(
|
|
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
|
-
|
|
13325
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
13378
|
-
const
|
|
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,62 @@ 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
|
+
};
|
|
13511
|
+
var numberFilter = (row, columnId, filterValue) => {
|
|
13512
|
+
const value = row.getValue(columnId);
|
|
13513
|
+
return filterNumber(value, filterValue);
|
|
13514
|
+
};
|
|
13515
|
+
var dateFilter = (row, columnId, filterValue) => {
|
|
13516
|
+
const value = row.getValue(columnId);
|
|
13517
|
+
return filterDate(value, filterValue);
|
|
13518
|
+
};
|
|
13519
|
+
var datetimeFilter = (row, columnId, filterValue) => {
|
|
13520
|
+
const value = row.getValue(columnId);
|
|
13521
|
+
return filterDatetime(value, filterValue);
|
|
13522
|
+
};
|
|
13523
|
+
var booleanFilter = (row, columnId, filterValue) => {
|
|
13524
|
+
const value = row.getValue(columnId);
|
|
13525
|
+
return filterBoolean(value, filterValue);
|
|
13526
|
+
};
|
|
13527
|
+
var tagsFilter = (row, columnId, filterValue) => {
|
|
13528
|
+
const value = row.getValue(columnId);
|
|
13529
|
+
return filterTags(value, filterValue);
|
|
13530
|
+
};
|
|
13531
|
+
var tagsSingleFilter = (row, columnId, filterValue) => {
|
|
13532
|
+
const value = row.getValue(columnId);
|
|
13533
|
+
return filterTagsSingle(value, filterValue);
|
|
13534
|
+
};
|
|
13535
|
+
var genericFilter = (row, columnId, filterValue) => {
|
|
13536
|
+
const value = row.getValue(columnId);
|
|
13537
|
+
return filterGeneric(value, filterValue);
|
|
13388
13538
|
};
|
|
13389
13539
|
var TableFilter = {
|
|
13390
13540
|
text: textFilter,
|
|
13391
13541
|
number: numberFilter,
|
|
13392
13542
|
date: dateFilter,
|
|
13543
|
+
datetime: datetimeFilter,
|
|
13393
13544
|
boolean: booleanFilter,
|
|
13394
13545
|
tags: tagsFilter,
|
|
13546
|
+
tagsSingle: tagsSingleFilter,
|
|
13395
13547
|
generic: genericFilter
|
|
13396
13548
|
};
|
|
13397
13549
|
|
|
@@ -13649,7 +13801,7 @@ var TableBody = import_react58.default.memo(function TableBodyVisual() {
|
|
|
13649
13801
|
|
|
13650
13802
|
// src/components/layout/table/TableHeader.tsx
|
|
13651
13803
|
var import_react_table3 = require("@tanstack/react-table");
|
|
13652
|
-
var
|
|
13804
|
+
var import_clsx34 = __toESM(require("clsx"));
|
|
13653
13805
|
|
|
13654
13806
|
// src/components/layout/table/TableSortButton.tsx
|
|
13655
13807
|
var import_lucide_react14 = require("lucide-react");
|
|
@@ -13675,31 +13827,41 @@ var TableSortButton = ({
|
|
|
13675
13827
|
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
13828
|
}
|
|
13677
13829
|
const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
|
|
13678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13679
|
-
|
|
13830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13831
|
+
Tooltip,
|
|
13680
13832
|
{
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
children:
|
|
13687
|
-
|
|
13688
|
-
|
|
13689
|
-
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
|
|
13693
|
-
|
|
13694
|
-
|
|
13695
|
-
|
|
13833
|
+
tooltip: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex-col-2", children: [
|
|
13834
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: translation("sSortingState", { sortDirection: sortDirection || "none" }) }),
|
|
13835
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: translation("rSortingOrderAfter", { otherSortings: index - 1 }) }) })
|
|
13836
|
+
] }),
|
|
13837
|
+
position: "top",
|
|
13838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13839
|
+
Button,
|
|
13840
|
+
{
|
|
13841
|
+
layout: hasSortingIndex ? "default" : "icon",
|
|
13842
|
+
color,
|
|
13843
|
+
size,
|
|
13844
|
+
className: (0, import_clsx28.default)("relative", className),
|
|
13845
|
+
...props,
|
|
13846
|
+
children: [
|
|
13847
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13848
|
+
"div",
|
|
13849
|
+
{
|
|
13850
|
+
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"),
|
|
13851
|
+
children: `${index}.`
|
|
13852
|
+
}
|
|
13853
|
+
) }),
|
|
13854
|
+
icon
|
|
13855
|
+
]
|
|
13856
|
+
}
|
|
13857
|
+
)
|
|
13696
13858
|
}
|
|
13697
|
-
)
|
|
13859
|
+
);
|
|
13698
13860
|
};
|
|
13699
13861
|
|
|
13700
13862
|
// src/components/layout/table/TableFilterButton.tsx
|
|
13701
|
-
var
|
|
13702
|
-
var
|
|
13863
|
+
var import_lucide_react19 = require("lucide-react");
|
|
13864
|
+
var import_react68 = require("react");
|
|
13703
13865
|
|
|
13704
13866
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
13705
13867
|
var import_react64 = require("react");
|
|
@@ -14629,7 +14791,7 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
|
|
|
14629
14791
|
});
|
|
14630
14792
|
|
|
14631
14793
|
// src/components/layout/table/TableFilterPopups.tsx
|
|
14632
|
-
var
|
|
14794
|
+
var import_react67 = require("react");
|
|
14633
14795
|
|
|
14634
14796
|
// src/components/user-interaction/select/MultiSelect.tsx
|
|
14635
14797
|
var import_react65 = require("react");
|
|
@@ -14663,120 +14825,241 @@ var MultiSelectUncontrolled = (0, import_react65.forwardRef)(function MultiSelec
|
|
|
14663
14825
|
});
|
|
14664
14826
|
|
|
14665
14827
|
// src/components/layout/table/TableFilterPopups.tsx
|
|
14828
|
+
var import_lucide_react18 = require("lucide-react");
|
|
14829
|
+
|
|
14830
|
+
// src/components/user-interaction/Checkbox.tsx
|
|
14666
14831
|
var import_lucide_react17 = require("lucide-react");
|
|
14832
|
+
var import_react66 = require("react");
|
|
14833
|
+
var import_clsx33 = __toESM(require("clsx"));
|
|
14667
14834
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
14835
|
+
var Checkbox = ({
|
|
14836
|
+
value = false,
|
|
14837
|
+
indeterminate = false,
|
|
14838
|
+
required = false,
|
|
14839
|
+
invalid = false,
|
|
14840
|
+
disabled = false,
|
|
14841
|
+
readOnly = false,
|
|
14842
|
+
onValueChange,
|
|
14843
|
+
onEditComplete,
|
|
14844
|
+
size = "md",
|
|
14845
|
+
alwaysShowCheckIcon = false,
|
|
14846
|
+
...props
|
|
14847
|
+
}) => {
|
|
14848
|
+
const onChangeWrapper = (0, import_react66.useCallback)(() => {
|
|
14849
|
+
onValueChange?.(!value);
|
|
14850
|
+
onEditComplete?.(!value);
|
|
14851
|
+
}, [onEditComplete, onValueChange, value]);
|
|
14852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
14853
|
+
"div",
|
|
14854
|
+
{
|
|
14855
|
+
...props,
|
|
14856
|
+
onClick: (event) => {
|
|
14857
|
+
if (!disabled) {
|
|
14858
|
+
onChangeWrapper();
|
|
14859
|
+
props.onClick?.(event);
|
|
14860
|
+
}
|
|
14861
|
+
},
|
|
14862
|
+
onKeyDown: (event) => {
|
|
14863
|
+
if (disabled) return;
|
|
14864
|
+
if (event.key === " " || event.key === "Enter") {
|
|
14865
|
+
event.preventDefault();
|
|
14866
|
+
onChangeWrapper();
|
|
14867
|
+
props.onKeyDown?.(event);
|
|
14868
|
+
}
|
|
14869
|
+
},
|
|
14870
|
+
"data-checked": !indeterminate ? value : "indeterminate",
|
|
14871
|
+
"data-size": size ?? void 0,
|
|
14872
|
+
...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
|
|
14873
|
+
role: "checkbox",
|
|
14874
|
+
tabIndex: disabled ? -1 : 0,
|
|
14875
|
+
"aria-checked": indeterminate ? "mixed" : value,
|
|
14876
|
+
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
14877
|
+
className: (0, import_clsx33.default)("checkbox", props.className),
|
|
14878
|
+
children: [
|
|
14879
|
+
/* @__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 }) }),
|
|
14880
|
+
/* @__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 }) })
|
|
14881
|
+
]
|
|
14882
|
+
}
|
|
14883
|
+
);
|
|
14884
|
+
};
|
|
14885
|
+
var CheckboxUncontrolled = ({
|
|
14886
|
+
value: initialValue,
|
|
14887
|
+
onValueChange,
|
|
14888
|
+
...props
|
|
14889
|
+
}) => {
|
|
14890
|
+
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14892
|
+
Checkbox,
|
|
14893
|
+
{
|
|
14894
|
+
...props,
|
|
14895
|
+
value,
|
|
14896
|
+
onValueChange: setValue
|
|
14897
|
+
}
|
|
14898
|
+
);
|
|
14899
|
+
};
|
|
14900
|
+
|
|
14901
|
+
// src/components/layout/table/TableFilterPopups.tsx
|
|
14902
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
14668
14903
|
var getOperatorInfo = (operator) => {
|
|
14669
14904
|
switch (operator) {
|
|
14670
14905
|
case "textEquals":
|
|
14671
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14906
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
14672
14907
|
case "textNotEquals":
|
|
14673
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14908
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
14674
14909
|
case "textNotWhitespace":
|
|
14675
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14910
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.TextInitial, { className: "w-4 h-4" }), translationKey: "filterNonWhitespace" };
|
|
14676
14911
|
case "textContains":
|
|
14677
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14912
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
|
|
14678
14913
|
case "textNotContains":
|
|
14679
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14914
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
|
|
14680
14915
|
case "textStartsWith":
|
|
14681
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14916
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ArrowRight, { className: "w-4 h-4" }), translationKey: "startsWith" };
|
|
14682
14917
|
case "textEndsWith":
|
|
14683
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14918
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ArrowLeft, { className: "w-4 h-4" }), translationKey: "endsWith" };
|
|
14684
14919
|
case "numberEquals":
|
|
14685
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14920
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
14686
14921
|
case "numberNotEquals":
|
|
14687
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14922
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
14688
14923
|
case "numberGreaterThan":
|
|
14689
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14924
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "greaterThan" };
|
|
14690
14925
|
case "numberGreaterThanOrEqual":
|
|
14691
14926
|
return {
|
|
14692
|
-
icon: /* @__PURE__ */ (0,
|
|
14693
|
-
/* @__PURE__ */ (0,
|
|
14694
|
-
/* @__PURE__ */ (0,
|
|
14927
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14928
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
14929
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
14695
14930
|
] }),
|
|
14696
14931
|
translationKey: "greaterThanOrEqual"
|
|
14697
14932
|
};
|
|
14698
14933
|
case "numberLessThan":
|
|
14699
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14934
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "lessThan" };
|
|
14700
14935
|
case "numberLessThanOrEqual":
|
|
14701
14936
|
return {
|
|
14702
|
-
icon: /* @__PURE__ */ (0,
|
|
14703
|
-
/* @__PURE__ */ (0,
|
|
14704
|
-
/* @__PURE__ */ (0,
|
|
14937
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14938
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
14939
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
14705
14940
|
] }),
|
|
14706
14941
|
translationKey: "lessThanOrEqual"
|
|
14707
14942
|
};
|
|
14708
14943
|
case "numberBetween":
|
|
14709
14944
|
return {
|
|
14710
|
-
icon: /* @__PURE__ */ (0,
|
|
14711
|
-
/* @__PURE__ */ (0,
|
|
14712
|
-
/* @__PURE__ */ (0,
|
|
14945
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14946
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
14947
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
|
|
14713
14948
|
] }),
|
|
14714
14949
|
translationKey: "between"
|
|
14715
14950
|
};
|
|
14716
14951
|
case "numberNotBetween":
|
|
14717
14952
|
return {
|
|
14718
|
-
icon: /* @__PURE__ */ (0,
|
|
14719
|
-
/* @__PURE__ */ (0,
|
|
14720
|
-
/* @__PURE__ */ (0,
|
|
14953
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14954
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
14955
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
|
|
14721
14956
|
] }),
|
|
14722
14957
|
translationKey: "notBetween"
|
|
14723
14958
|
};
|
|
14724
14959
|
case "dateEquals":
|
|
14725
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14960
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
14726
14961
|
case "dateNotEquals":
|
|
14727
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14962
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
14728
14963
|
case "dateGreaterThan":
|
|
14729
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14964
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "after" };
|
|
14730
14965
|
case "dateGreaterThanOrEqual":
|
|
14731
14966
|
return {
|
|
14732
|
-
icon: /* @__PURE__ */ (0,
|
|
14733
|
-
/* @__PURE__ */ (0,
|
|
14734
|
-
/* @__PURE__ */ (0,
|
|
14967
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14968
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
14969
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
14735
14970
|
] }),
|
|
14736
14971
|
translationKey: "onOrAfter"
|
|
14737
14972
|
};
|
|
14738
14973
|
case "dateLessThan":
|
|
14739
|
-
return { icon: /* @__PURE__ */ (0,
|
|
14974
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "before" };
|
|
14740
14975
|
case "dateLessThanOrEqual":
|
|
14741
14976
|
return {
|
|
14742
|
-
icon: /* @__PURE__ */ (0,
|
|
14743
|
-
/* @__PURE__ */ (0,
|
|
14744
|
-
/* @__PURE__ */ (0,
|
|
14977
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14978
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
14979
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
14745
14980
|
] }),
|
|
14746
14981
|
translationKey: "onOrBefore"
|
|
14747
14982
|
};
|
|
14748
14983
|
case "dateBetween":
|
|
14749
14984
|
return {
|
|
14750
|
-
icon: /* @__PURE__ */ (0,
|
|
14751
|
-
/* @__PURE__ */ (0,
|
|
14752
|
-
/* @__PURE__ */ (0,
|
|
14985
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14986
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
14987
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
|
|
14753
14988
|
] }),
|
|
14754
14989
|
translationKey: "between"
|
|
14755
14990
|
};
|
|
14756
14991
|
case "dateNotBetween":
|
|
14757
14992
|
return {
|
|
14758
|
-
icon: /* @__PURE__ */ (0,
|
|
14759
|
-
/* @__PURE__ */ (0,
|
|
14760
|
-
/* @__PURE__ */ (0,
|
|
14993
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
14994
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
14995
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
|
|
14761
14996
|
] }),
|
|
14762
14997
|
translationKey: "notBetween"
|
|
14763
14998
|
};
|
|
14764
14999
|
case "booleanIsTrue":
|
|
14765
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15000
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CheckCircle2, { className: "w-4 h-4" }), translationKey: "isTrue" };
|
|
14766
15001
|
case "booleanIsFalse":
|
|
14767
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15002
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.XCircle, { className: "w-4 h-4" }), translationKey: "isFalse" };
|
|
14768
15003
|
case "tagsEquals":
|
|
14769
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15004
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
14770
15005
|
case "tagsNotEquals":
|
|
14771
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15006
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
14772
15007
|
case "tagsContains":
|
|
14773
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15008
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
|
|
14774
15009
|
case "tagsNotContains":
|
|
14775
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15010
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
|
|
15011
|
+
case "datetimeEquals":
|
|
15012
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
15013
|
+
case "datetimeNotEquals":
|
|
15014
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
15015
|
+
case "datetimeGreaterThan":
|
|
15016
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }), translationKey: "after" };
|
|
15017
|
+
case "datetimeGreaterThanOrEqual":
|
|
15018
|
+
return {
|
|
15019
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
15020
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
15021
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
15022
|
+
] }),
|
|
15023
|
+
translationKey: "onOrAfter"
|
|
15024
|
+
};
|
|
15025
|
+
case "datetimeLessThan":
|
|
15026
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }), translationKey: "before" };
|
|
15027
|
+
case "datetimeLessThanOrEqual":
|
|
15028
|
+
return {
|
|
15029
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
15030
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
15031
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "-ml-1 w-4 h-4" })
|
|
15032
|
+
] }),
|
|
15033
|
+
translationKey: "onOrBefore"
|
|
15034
|
+
};
|
|
15035
|
+
case "datetimeBetween":
|
|
15036
|
+
return {
|
|
15037
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
15038
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "w-4 h-4" }),
|
|
15039
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "-ml-1 w-4 h-4" })
|
|
15040
|
+
] }),
|
|
15041
|
+
translationKey: "between"
|
|
15042
|
+
};
|
|
15043
|
+
case "datetimeNotBetween":
|
|
15044
|
+
return {
|
|
15045
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-0 items-center", children: [
|
|
15046
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronLeft, { className: "w-4 h-4" }),
|
|
15047
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.ChevronRight, { className: "-ml-1 w-4 h-4" })
|
|
15048
|
+
] }),
|
|
15049
|
+
translationKey: "notBetween"
|
|
15050
|
+
};
|
|
15051
|
+
case "tagsSingleEquals":
|
|
15052
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Equal, { className: "w-4 h-4" }), translationKey: "equals" };
|
|
15053
|
+
case "tagsSingleNotEquals":
|
|
15054
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.EqualNot, { className: "w-4 h-4" }), translationKey: "notEquals" };
|
|
15055
|
+
case "tagsSingleContains":
|
|
15056
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchCheck, { className: "w-4 h-4" }), translationKey: "contains" };
|
|
15057
|
+
case "tagsSingleNotContains":
|
|
15058
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.SearchX, { className: "w-4 h-4" }), translationKey: "notContains" };
|
|
14776
15059
|
case "undefined":
|
|
14777
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15060
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CircleDashed, { className: "w-4 h-4" }), translationKey: "filterUndefined" };
|
|
14778
15061
|
case "notUndefined":
|
|
14779
|
-
return { icon: /* @__PURE__ */ (0,
|
|
15062
|
+
return { icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.CircleDot, { className: "w-4 h-4" }), translationKey: "filterNotUndefined" };
|
|
14780
15063
|
default:
|
|
14781
15064
|
return { icon: null, translationKey: "undefined translation" };
|
|
14782
15065
|
}
|
|
@@ -14785,22 +15068,23 @@ var OperatorLabel = ({ operator }) => {
|
|
|
14785
15068
|
const translation = useHightideTranslation();
|
|
14786
15069
|
const { icon, translationKey } = getOperatorInfo(operator);
|
|
14787
15070
|
const label = typeof translationKey === "string" ? translation(translationKey) : translationKey;
|
|
14788
|
-
return /* @__PURE__ */ (0,
|
|
15071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-1 items-center gap-2", children: [
|
|
14789
15072
|
icon,
|
|
14790
15073
|
label
|
|
14791
15074
|
] });
|
|
14792
15075
|
};
|
|
14793
15076
|
var TextFilter = ({ filterValue, onFilterValueChange }) => {
|
|
14794
15077
|
const translation = useHightideTranslation();
|
|
14795
|
-
const operator = filterValue?.operator ?? "
|
|
15078
|
+
const operator = filterValue?.operator ?? "textContains";
|
|
14796
15079
|
const parameter = filterValue?.parameter ?? {};
|
|
14797
|
-
const
|
|
15080
|
+
const id = (0, import_react67.useId)();
|
|
15081
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
14798
15082
|
...TableFilterOperator.text,
|
|
14799
15083
|
...TableFilterOperator.generic
|
|
14800
15084
|
], []);
|
|
14801
15085
|
const needsParameterInput = !["textNotWhitespace", "undefined", "notUndefined"].includes(operator);
|
|
14802
|
-
return /* @__PURE__ */ (0,
|
|
14803
|
-
/* @__PURE__ */ (0,
|
|
15086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15087
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14804
15088
|
Select,
|
|
14805
15089
|
{
|
|
14806
15090
|
value: operator,
|
|
@@ -14811,39 +15095,57 @@ var TextFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14811
15095
|
});
|
|
14812
15096
|
},
|
|
14813
15097
|
buttonProps: { className: "min-w-64" },
|
|
14814
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15098
|
+
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
15099
|
}
|
|
14816
15100
|
),
|
|
14817
|
-
/* @__PURE__ */ (0,
|
|
14818
|
-
/* @__PURE__ */ (0,
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
15101
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15102
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Visibility, { isVisible: needsParameterInput, children: [
|
|
15103
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15104
|
+
Input,
|
|
15105
|
+
{
|
|
15106
|
+
value: parameter.searchText ?? "",
|
|
15107
|
+
placeholder: translation("search") + "...",
|
|
15108
|
+
onValueChange: (searchText) => {
|
|
15109
|
+
onFilterValueChange({
|
|
15110
|
+
operator,
|
|
15111
|
+
parameter: { ...parameter, searchText }
|
|
15112
|
+
});
|
|
15113
|
+
},
|
|
15114
|
+
className: "min-w-64"
|
|
15115
|
+
}
|
|
15116
|
+
),
|
|
15117
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-row-2 items-center gap-2", children: [
|
|
15118
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15119
|
+
Checkbox,
|
|
15120
|
+
{
|
|
15121
|
+
id,
|
|
15122
|
+
value: parameter.isCaseSensitive ?? false,
|
|
15123
|
+
onValueChange: (isCaseSensitive) => {
|
|
15124
|
+
onFilterValueChange({
|
|
15125
|
+
operator,
|
|
15126
|
+
parameter: { ...parameter, isCaseSensitive }
|
|
15127
|
+
});
|
|
15128
|
+
}
|
|
15129
|
+
}
|
|
15130
|
+
),
|
|
15131
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { htmlFor: id, children: translation("caseSensitive") })
|
|
15132
|
+
] })
|
|
15133
|
+
] }),
|
|
15134
|
+
/* @__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
15135
|
] });
|
|
14834
15136
|
};
|
|
14835
15137
|
var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
14836
15138
|
const translation = useHightideTranslation();
|
|
14837
|
-
const operator = filterValue?.operator ?? "
|
|
15139
|
+
const operator = filterValue?.operator ?? "numberBetween";
|
|
14838
15140
|
const parameter = filterValue?.parameter ?? {};
|
|
14839
|
-
const availableOperators = (0,
|
|
15141
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
14840
15142
|
...TableFilterOperator.number,
|
|
14841
15143
|
...TableFilterOperator.generic
|
|
14842
15144
|
], []);
|
|
14843
15145
|
const needsRangeInput = operator === "numberBetween" || operator === "numberNotBetween";
|
|
14844
15146
|
const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
|
|
14845
|
-
return /* @__PURE__ */ (0,
|
|
14846
|
-
/* @__PURE__ */ (0,
|
|
15147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15148
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14847
15149
|
Select,
|
|
14848
15150
|
{
|
|
14849
15151
|
value: operator,
|
|
@@ -14854,12 +15156,12 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14854
15156
|
});
|
|
14855
15157
|
},
|
|
14856
15158
|
buttonProps: { className: "min-w-64" },
|
|
14857
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15159
|
+
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
15160
|
}
|
|
14859
15161
|
),
|
|
14860
|
-
/* @__PURE__ */ (0,
|
|
14861
|
-
/* @__PURE__ */ (0,
|
|
14862
|
-
/* @__PURE__ */ (0,
|
|
15162
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15163
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15164
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FormFieldLayout, { label: translation("min"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14863
15165
|
Input,
|
|
14864
15166
|
{
|
|
14865
15167
|
...ariaAttributes,
|
|
@@ -14878,7 +15180,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14878
15180
|
className: "input-indicator-hidden min-w-64"
|
|
14879
15181
|
}
|
|
14880
15182
|
) }),
|
|
14881
|
-
/* @__PURE__ */ (0,
|
|
15183
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FormFieldLayout, { label: translation("max"), children: ({ ariaAttributes, interactionStates, id }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14882
15184
|
Input,
|
|
14883
15185
|
{
|
|
14884
15186
|
...ariaAttributes,
|
|
@@ -14898,7 +15200,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14898
15200
|
}
|
|
14899
15201
|
) })
|
|
14900
15202
|
] }) }),
|
|
14901
|
-
/* @__PURE__ */ (0,
|
|
15203
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14902
15204
|
Input,
|
|
14903
15205
|
{
|
|
14904
15206
|
value: parameter.compareValue?.toString() ?? "",
|
|
@@ -14914,23 +15216,23 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14914
15216
|
className: "min-w-64"
|
|
14915
15217
|
}
|
|
14916
15218
|
) }),
|
|
14917
|
-
/* @__PURE__ */ (0,
|
|
15219
|
+
/* @__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
15220
|
] });
|
|
14919
15221
|
};
|
|
14920
15222
|
var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
14921
15223
|
const translation = useHightideTranslation();
|
|
14922
|
-
const operator = filterValue?.operator ?? "
|
|
15224
|
+
const operator = filterValue?.operator ?? "dateBetween";
|
|
14923
15225
|
const parameter = filterValue?.parameter ?? {};
|
|
14924
|
-
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0,
|
|
14925
|
-
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0,
|
|
14926
|
-
const availableOperators = (0,
|
|
15226
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react67.useState)(null);
|
|
15227
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react67.useState)(null);
|
|
15228
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
14927
15229
|
...TableFilterOperator.date,
|
|
14928
15230
|
...TableFilterOperator.generic
|
|
14929
15231
|
], []);
|
|
14930
15232
|
const needsRangeInput = operator === "dateBetween" || operator === "dateNotBetween";
|
|
14931
15233
|
const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
|
|
14932
|
-
return /* @__PURE__ */ (0,
|
|
14933
|
-
/* @__PURE__ */ (0,
|
|
15234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15235
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14934
15236
|
Select,
|
|
14935
15237
|
{
|
|
14936
15238
|
value: operator,
|
|
@@ -14941,12 +15243,12 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14941
15243
|
});
|
|
14942
15244
|
},
|
|
14943
15245
|
buttonProps: { className: "min-w-64" },
|
|
14944
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15246
|
+
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
15247
|
}
|
|
14946
15248
|
),
|
|
14947
|
-
/* @__PURE__ */ (0,
|
|
14948
|
-
/* @__PURE__ */ (0,
|
|
14949
|
-
/* @__PURE__ */ (0,
|
|
15249
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15250
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15251
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14950
15252
|
DateTimeInput,
|
|
14951
15253
|
{
|
|
14952
15254
|
value: temporaryMinDateValue ?? parameter.min ?? null,
|
|
@@ -14979,7 +15281,7 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
14979
15281
|
className: "min-w-64"
|
|
14980
15282
|
}
|
|
14981
15283
|
),
|
|
14982
|
-
/* @__PURE__ */ (0,
|
|
15284
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14983
15285
|
DateTimeInput,
|
|
14984
15286
|
{
|
|
14985
15287
|
value: temporaryMaxDateValue ?? parameter.max ?? null,
|
|
@@ -15012,7 +15314,7 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
15012
15314
|
}
|
|
15013
15315
|
)
|
|
15014
15316
|
] }) }),
|
|
15015
|
-
/* @__PURE__ */ (0,
|
|
15317
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15016
15318
|
DateTimeInput,
|
|
15017
15319
|
{
|
|
15018
15320
|
value: parameter.compareDate ?? null,
|
|
@@ -15028,16 +15330,132 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
15028
15330
|
className: "min-w-64"
|
|
15029
15331
|
}
|
|
15030
15332
|
) }),
|
|
15031
|
-
/* @__PURE__ */ (0,
|
|
15333
|
+
/* @__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") }) })
|
|
15334
|
+
] });
|
|
15335
|
+
};
|
|
15336
|
+
var DatetimeFilter = ({ filterValue, onFilterValueChange }) => {
|
|
15337
|
+
const translation = useHightideTranslation();
|
|
15338
|
+
const operator = filterValue?.operator ?? "datetimeBetween";
|
|
15339
|
+
const parameter = filterValue?.parameter ?? {};
|
|
15340
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react67.useState)(null);
|
|
15341
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react67.useState)(null);
|
|
15342
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
15343
|
+
...TableFilterOperator.datetime,
|
|
15344
|
+
...TableFilterOperator.generic
|
|
15345
|
+
], []);
|
|
15346
|
+
const needsRangeInput = operator === "datetimeBetween" || operator === "datetimeNotBetween";
|
|
15347
|
+
const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
|
|
15348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15349
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15350
|
+
Select,
|
|
15351
|
+
{
|
|
15352
|
+
value: operator,
|
|
15353
|
+
onValueChange: (newOperator) => {
|
|
15354
|
+
onFilterValueChange({
|
|
15355
|
+
operator: newOperator,
|
|
15356
|
+
parameter: needsParameterInput ? parameter : {}
|
|
15357
|
+
});
|
|
15358
|
+
},
|
|
15359
|
+
buttonProps: { className: "min-w-64" },
|
|
15360
|
+
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))
|
|
15361
|
+
}
|
|
15362
|
+
),
|
|
15363
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15364
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15365
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15366
|
+
DateTimeInput,
|
|
15367
|
+
{
|
|
15368
|
+
mode: "dateTime",
|
|
15369
|
+
value: temporaryMinDateValue ?? parameter.min ?? null,
|
|
15370
|
+
placeholder: translation("startDate"),
|
|
15371
|
+
onValueChange: (value) => setTemporaryMinDateValue(value),
|
|
15372
|
+
onEditComplete: (value) => {
|
|
15373
|
+
if (value && parameter.max && value > parameter.max) {
|
|
15374
|
+
if (!parameter.min) {
|
|
15375
|
+
onFilterValueChange({
|
|
15376
|
+
operator,
|
|
15377
|
+
parameter: { min: parameter.max, max: value }
|
|
15378
|
+
});
|
|
15379
|
+
} else {
|
|
15380
|
+
const diff = parameter.max.getTime() - parameter.min.getTime();
|
|
15381
|
+
onFilterValueChange({
|
|
15382
|
+
operator,
|
|
15383
|
+
parameter: { min: value, max: new Date(value.getTime() + diff) }
|
|
15384
|
+
});
|
|
15385
|
+
}
|
|
15386
|
+
} else {
|
|
15387
|
+
onFilterValueChange({
|
|
15388
|
+
operator,
|
|
15389
|
+
parameter: { ...parameter, min: value }
|
|
15390
|
+
});
|
|
15391
|
+
}
|
|
15392
|
+
setTemporaryMinDateValue(null);
|
|
15393
|
+
},
|
|
15394
|
+
allowRemove: true,
|
|
15395
|
+
outsideClickCloses: false,
|
|
15396
|
+
className: "min-w-64"
|
|
15397
|
+
}
|
|
15398
|
+
),
|
|
15399
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15400
|
+
DateTimeInput,
|
|
15401
|
+
{
|
|
15402
|
+
mode: "dateTime",
|
|
15403
|
+
value: temporaryMaxDateValue ?? parameter.max ?? null,
|
|
15404
|
+
placeholder: translation("endDate"),
|
|
15405
|
+
onValueChange: (value) => setTemporaryMaxDateValue(value),
|
|
15406
|
+
onEditComplete: (value) => {
|
|
15407
|
+
if (value && parameter.min && value < parameter.min) {
|
|
15408
|
+
if (!parameter.max) {
|
|
15409
|
+
onFilterValueChange({
|
|
15410
|
+
operator,
|
|
15411
|
+
parameter: { min: value, max: parameter.min }
|
|
15412
|
+
});
|
|
15413
|
+
} else {
|
|
15414
|
+
const diff = parameter.max.getTime() - parameter.min.getTime();
|
|
15415
|
+
onFilterValueChange({
|
|
15416
|
+
operator,
|
|
15417
|
+
parameter: { min: new Date(value.getTime() - diff), max: value }
|
|
15418
|
+
});
|
|
15419
|
+
}
|
|
15420
|
+
} else {
|
|
15421
|
+
onFilterValueChange({
|
|
15422
|
+
operator,
|
|
15423
|
+
parameter: { ...parameter, max: value }
|
|
15424
|
+
});
|
|
15425
|
+
}
|
|
15426
|
+
},
|
|
15427
|
+
allowRemove: true,
|
|
15428
|
+
outsideClickCloses: false,
|
|
15429
|
+
className: "min-w-64"
|
|
15430
|
+
}
|
|
15431
|
+
)
|
|
15432
|
+
] }) }),
|
|
15433
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15434
|
+
DateTimeInput,
|
|
15435
|
+
{
|
|
15436
|
+
value: parameter.compareDatetime ?? null,
|
|
15437
|
+
placeholder: translation("date"),
|
|
15438
|
+
onValueChange: (compareDatetime) => {
|
|
15439
|
+
onFilterValueChange({
|
|
15440
|
+
operator,
|
|
15441
|
+
parameter: { compareDatetime }
|
|
15442
|
+
});
|
|
15443
|
+
},
|
|
15444
|
+
allowRemove: true,
|
|
15445
|
+
outsideClickCloses: false,
|
|
15446
|
+
className: "min-w-64"
|
|
15447
|
+
}
|
|
15448
|
+
) }),
|
|
15449
|
+
/* @__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
15450
|
] });
|
|
15033
15451
|
};
|
|
15034
15452
|
var BooleanFilter = ({ filterValue, onFilterValueChange }) => {
|
|
15035
15453
|
const operator = filterValue?.operator ?? "booleanIsTrue";
|
|
15036
|
-
const availableOperators = (0,
|
|
15454
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
15037
15455
|
...TableFilterOperator.boolean,
|
|
15038
15456
|
...TableFilterOperator.generic
|
|
15039
15457
|
], []);
|
|
15040
|
-
return /* @__PURE__ */ (0,
|
|
15458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15041
15459
|
Select,
|
|
15042
15460
|
{
|
|
15043
15461
|
value: operator,
|
|
@@ -15048,7 +15466,7 @@ var BooleanFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
15048
15466
|
});
|
|
15049
15467
|
},
|
|
15050
15468
|
buttonProps: { className: "min-w-64" },
|
|
15051
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15469
|
+
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
15470
|
}
|
|
15053
15471
|
) });
|
|
15054
15472
|
};
|
|
@@ -15057,11 +15475,11 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
15057
15475
|
const { table } = useTableDataContext();
|
|
15058
15476
|
const operator = filterValue?.operator ?? "tagsContains";
|
|
15059
15477
|
const parameter = filterValue?.parameter ?? {};
|
|
15060
|
-
const availableOperators = (0,
|
|
15478
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
15061
15479
|
...TableFilterOperator.tags,
|
|
15062
15480
|
...TableFilterOperator.generic
|
|
15063
15481
|
], []);
|
|
15064
|
-
const availableTags = (0,
|
|
15482
|
+
const availableTags = (0, import_react67.useMemo)(() => {
|
|
15065
15483
|
const column = table.getColumn(columnId);
|
|
15066
15484
|
if (!column) return [];
|
|
15067
15485
|
return column.columnDef.meta?.filterData?.tags ?? [];
|
|
@@ -15070,8 +15488,8 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
15070
15488
|
return null;
|
|
15071
15489
|
}
|
|
15072
15490
|
const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
|
|
15073
|
-
return /* @__PURE__ */ (0,
|
|
15074
|
-
/* @__PURE__ */ (0,
|
|
15491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15492
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15075
15493
|
Select,
|
|
15076
15494
|
{
|
|
15077
15495
|
value: operator,
|
|
@@ -15082,12 +15500,12 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
15082
15500
|
});
|
|
15083
15501
|
},
|
|
15084
15502
|
buttonProps: { className: "min-w-64" },
|
|
15085
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15503
|
+
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
15504
|
}
|
|
15087
15505
|
),
|
|
15088
|
-
/* @__PURE__ */ (0,
|
|
15089
|
-
/* @__PURE__ */ (0,
|
|
15090
|
-
|
|
15506
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15507
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15508
|
+
MultiSelect,
|
|
15091
15509
|
{
|
|
15092
15510
|
value: Array.isArray(parameter.searchTags) ? parameter.searchTags.map((tag) => String(tag)) : [],
|
|
15093
15511
|
onValueChange: (selectedTags) => {
|
|
@@ -15097,18 +15515,84 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
15097
15515
|
});
|
|
15098
15516
|
},
|
|
15099
15517
|
buttonProps: { className: "min-w-64" },
|
|
15100
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0,
|
|
15518
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MultiSelectOption, { value: tag, children: label }, tag))
|
|
15101
15519
|
}
|
|
15102
15520
|
) }),
|
|
15103
|
-
/* @__PURE__ */ (0,
|
|
15521
|
+
/* @__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") }) })
|
|
15522
|
+
] });
|
|
15523
|
+
};
|
|
15524
|
+
var TagsSingleFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
15525
|
+
const translation = useHightideTranslation();
|
|
15526
|
+
const { table } = useTableDataContext();
|
|
15527
|
+
const operator = filterValue?.operator ?? "tagsSingleContains";
|
|
15528
|
+
const parameter = filterValue?.parameter ?? {};
|
|
15529
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
15530
|
+
...TableFilterOperator.tagsSingle,
|
|
15531
|
+
...TableFilterOperator.generic
|
|
15532
|
+
], []);
|
|
15533
|
+
const availableTags = (0, import_react67.useMemo)(() => {
|
|
15534
|
+
const column = table.getColumn(columnId);
|
|
15535
|
+
if (!column) return [];
|
|
15536
|
+
return column.columnDef.meta?.filterData?.tags ?? [];
|
|
15537
|
+
}, [columnId, table]);
|
|
15538
|
+
if (availableTags.length === 0) {
|
|
15539
|
+
return null;
|
|
15540
|
+
}
|
|
15541
|
+
const needsParameterInput = operator !== "undefined" && operator !== "notUndefined";
|
|
15542
|
+
const needsMultiSelect = operator === "tagsSingleContains" || operator === "tagsSingleNotContains";
|
|
15543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-col-2 gap-2", children: [
|
|
15544
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15545
|
+
Select,
|
|
15546
|
+
{
|
|
15547
|
+
value: operator,
|
|
15548
|
+
onValueChange: (newOperator) => {
|
|
15549
|
+
onFilterValueChange({
|
|
15550
|
+
operator: newOperator,
|
|
15551
|
+
parameter: needsParameterInput ? parameter : {}
|
|
15552
|
+
});
|
|
15553
|
+
},
|
|
15554
|
+
buttonProps: { className: "min-w-64" },
|
|
15555
|
+
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))
|
|
15556
|
+
}
|
|
15557
|
+
),
|
|
15558
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
15559
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput && needsMultiSelect, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15560
|
+
MultiSelect,
|
|
15561
|
+
{
|
|
15562
|
+
value: Array.isArray(parameter.searchTagsContains) ? parameter.searchTagsContains.map((tag) => String(tag)) : [],
|
|
15563
|
+
onValueChange: (selectedTags) => {
|
|
15564
|
+
onFilterValueChange({
|
|
15565
|
+
operator,
|
|
15566
|
+
parameter: { searchTagsContains: selectedTags.length > 0 ? selectedTags : void 0 }
|
|
15567
|
+
});
|
|
15568
|
+
},
|
|
15569
|
+
buttonProps: { className: "min-w-64" },
|
|
15570
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MultiSelectOption, { value: tag, children: label }, tag))
|
|
15571
|
+
}
|
|
15572
|
+
) }),
|
|
15573
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Visibility, { isVisible: needsParameterInput && !needsMultiSelect, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15574
|
+
Select,
|
|
15575
|
+
{
|
|
15576
|
+
value: parameter.searchTag ? String(parameter.searchTag) : void 0,
|
|
15577
|
+
onValueChange: (selectedTag) => {
|
|
15578
|
+
onFilterValueChange({
|
|
15579
|
+
operator,
|
|
15580
|
+
parameter: { searchTag: selectedTag ? String(selectedTag) : void 0 }
|
|
15581
|
+
});
|
|
15582
|
+
},
|
|
15583
|
+
buttonProps: { className: "min-w-64" },
|
|
15584
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SelectOption, { value: tag, children: label }, tag))
|
|
15585
|
+
}
|
|
15586
|
+
) }),
|
|
15587
|
+
/* @__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
15588
|
] });
|
|
15105
15589
|
};
|
|
15106
15590
|
var GenericFilter = ({ filterValue, onFilterValueChange }) => {
|
|
15107
15591
|
const operator = filterValue?.operator ?? "notUndefined";
|
|
15108
|
-
const availableOperators = (0,
|
|
15592
|
+
const availableOperators = (0, import_react67.useMemo)(() => [
|
|
15109
15593
|
...TableFilterOperator.generic
|
|
15110
15594
|
], []);
|
|
15111
|
-
return /* @__PURE__ */ (0,
|
|
15595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15112
15596
|
Select,
|
|
15113
15597
|
{
|
|
15114
15598
|
value: operator,
|
|
@@ -15119,56 +15603,60 @@ var GenericFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
15119
15603
|
});
|
|
15120
15604
|
},
|
|
15121
15605
|
buttonProps: { className: "min-w-64" },
|
|
15122
|
-
children: availableOperators.map((op) => /* @__PURE__ */ (0,
|
|
15606
|
+
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
15607
|
}
|
|
15124
15608
|
) });
|
|
15125
15609
|
};
|
|
15126
15610
|
var TableFilterContent = ({ filterType, ...props }) => {
|
|
15127
15611
|
switch (filterType) {
|
|
15128
15612
|
case "text":
|
|
15129
|
-
return /* @__PURE__ */ (0,
|
|
15613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TextFilter, { ...props });
|
|
15130
15614
|
case "number":
|
|
15131
|
-
return /* @__PURE__ */ (0,
|
|
15615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NumberFilter, { ...props });
|
|
15132
15616
|
case "date":
|
|
15133
|
-
return /* @__PURE__ */ (0,
|
|
15617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DateFilter, { ...props });
|
|
15618
|
+
case "datetime":
|
|
15619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DatetimeFilter, { ...props });
|
|
15134
15620
|
case "boolean":
|
|
15135
|
-
return /* @__PURE__ */ (0,
|
|
15621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BooleanFilter, { ...props });
|
|
15136
15622
|
case "tags":
|
|
15137
|
-
return /* @__PURE__ */ (0,
|
|
15623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TagsFilter, { ...props });
|
|
15624
|
+
case "tagsSingle":
|
|
15625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TagsSingleFilter, { ...props });
|
|
15138
15626
|
case "generic":
|
|
15139
|
-
return /* @__PURE__ */ (0,
|
|
15627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(GenericFilter, { ...props });
|
|
15140
15628
|
default:
|
|
15141
15629
|
return null;
|
|
15142
15630
|
}
|
|
15143
15631
|
};
|
|
15144
15632
|
|
|
15145
15633
|
// src/components/layout/table/TableFilterButton.tsx
|
|
15146
|
-
var
|
|
15634
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15147
15635
|
var TableFilterButton = ({
|
|
15148
15636
|
filterType,
|
|
15149
15637
|
column
|
|
15150
15638
|
}) => {
|
|
15151
15639
|
const translation = useHightideTranslation();
|
|
15152
15640
|
const columnFilterValue = column.getFilterValue();
|
|
15153
|
-
const [filterValue, setFilterValue] = (0,
|
|
15641
|
+
const [filterValue, setFilterValue] = (0, import_react68.useState)(columnFilterValue);
|
|
15154
15642
|
const hasFilter = !!filterValue;
|
|
15155
|
-
const anchorRef = (0,
|
|
15156
|
-
const containerRef = (0,
|
|
15157
|
-
const [isOpen, setIsOpen] = (0,
|
|
15158
|
-
const id = (0,
|
|
15159
|
-
const ids = (0,
|
|
15643
|
+
const anchorRef = (0, import_react68.useRef)(null);
|
|
15644
|
+
const containerRef = (0, import_react68.useRef)(null);
|
|
15645
|
+
const [isOpen, setIsOpen] = (0, import_react68.useState)(false);
|
|
15646
|
+
const id = (0, import_react68.useId)();
|
|
15647
|
+
const ids = (0, import_react68.useMemo)(() => ({
|
|
15160
15648
|
button: `table-filter-button-${id}`,
|
|
15161
15649
|
popup: `table-filter-popup-${id}`,
|
|
15162
15650
|
label: `table-filter-label-${id}`
|
|
15163
15651
|
}), [id]);
|
|
15164
|
-
(0,
|
|
15652
|
+
(0, import_react68.useEffect)(() => {
|
|
15165
15653
|
setFilterValue(columnFilterValue);
|
|
15166
15654
|
}, [columnFilterValue]);
|
|
15167
15655
|
if (filterType === "tags" && (!column.columnDef.meta?.filterData?.tags?.length || column.columnDef.meta.filterData.tags.length === 0)) {
|
|
15168
15656
|
return null;
|
|
15169
15657
|
}
|
|
15170
|
-
return /* @__PURE__ */ (0,
|
|
15171
|
-
/* @__PURE__ */ (0,
|
|
15658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
15659
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Tooltip, { tooltip: translation("filter"), position: "top", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15172
15660
|
Button,
|
|
15173
15661
|
{
|
|
15174
15662
|
ref: anchorRef,
|
|
@@ -15184,12 +15672,12 @@ var TableFilterButton = ({
|
|
|
15184
15672
|
"aria-labelledby": ids.label,
|
|
15185
15673
|
className: "relative",
|
|
15186
15674
|
children: [
|
|
15187
|
-
/* @__PURE__ */ (0,
|
|
15188
|
-
/* @__PURE__ */ (0,
|
|
15675
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react19.FilterIcon, { className: "size-4" }),
|
|
15676
|
+
/* @__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
15677
|
]
|
|
15190
15678
|
}
|
|
15191
|
-
),
|
|
15192
|
-
/* @__PURE__ */ (0,
|
|
15679
|
+
) }),
|
|
15680
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15193
15681
|
PopUp,
|
|
15194
15682
|
{
|
|
15195
15683
|
ref: containerRef,
|
|
@@ -15205,8 +15693,8 @@ var TableFilterButton = ({
|
|
|
15205
15693
|
"aria-labelledby": ids.label,
|
|
15206
15694
|
className: "flex-col-2 p-2 items-start",
|
|
15207
15695
|
children: [
|
|
15208
|
-
/* @__PURE__ */ (0,
|
|
15209
|
-
/* @__PURE__ */ (0,
|
|
15696
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { id: ids.label, className: "typography-label-lg font-semibold", children: translation("filter") }),
|
|
15697
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15210
15698
|
TableFilterContent,
|
|
15211
15699
|
{
|
|
15212
15700
|
columnId: column.id,
|
|
@@ -15215,12 +15703,12 @@ var TableFilterButton = ({
|
|
|
15215
15703
|
onFilterValueChange: setFilterValue
|
|
15216
15704
|
}
|
|
15217
15705
|
),
|
|
15218
|
-
/* @__PURE__ */ (0,
|
|
15219
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
15706
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
15707
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { color: "negative", size: "sm", onClick: () => {
|
|
15220
15708
|
column.setFilterValue(void 0);
|
|
15221
15709
|
setIsOpen(false);
|
|
15222
15710
|
}, children: translation("remove") }),
|
|
15223
|
-
/* @__PURE__ */ (0,
|
|
15711
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { size: "sm", onClick: () => {
|
|
15224
15712
|
if (filterValue) {
|
|
15225
15713
|
column.setFilterValue(filterValue);
|
|
15226
15714
|
}
|
|
@@ -15234,12 +15722,12 @@ var TableFilterButton = ({
|
|
|
15234
15722
|
};
|
|
15235
15723
|
|
|
15236
15724
|
// src/components/layout/table/TableHeader.tsx
|
|
15237
|
-
var
|
|
15238
|
-
var
|
|
15725
|
+
var import_react69 = require("react");
|
|
15726
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15239
15727
|
var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
15240
15728
|
const { table: tableState } = useTableHeaderContext();
|
|
15241
15729
|
const table = tableOverride ?? tableState;
|
|
15242
|
-
const handleResizeMove = (0,
|
|
15730
|
+
const handleResizeMove = (0, import_react69.useCallback)((e) => {
|
|
15243
15731
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
15244
15732
|
const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
15245
15733
|
const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
|
|
@@ -15255,7 +15743,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15255
15743
|
deltaOffset
|
|
15256
15744
|
}));
|
|
15257
15745
|
}, [table]);
|
|
15258
|
-
const handleResizeEnd = (0,
|
|
15746
|
+
const handleResizeEnd = (0, import_react69.useCallback)(() => {
|
|
15259
15747
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
15260
15748
|
const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
|
|
15261
15749
|
table.setColumnSizing((prev) => {
|
|
@@ -15273,7 +15761,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15273
15761
|
startSize: null
|
|
15274
15762
|
});
|
|
15275
15763
|
}, [table]);
|
|
15276
|
-
(0,
|
|
15764
|
+
(0, import_react69.useEffect)(() => {
|
|
15277
15765
|
window.addEventListener("pointermove", handleResizeMove);
|
|
15278
15766
|
window.addEventListener("pointerup", handleResizeEnd);
|
|
15279
15767
|
return () => {
|
|
@@ -15281,8 +15769,8 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15281
15769
|
window.removeEventListener("pointerup", handleResizeEnd);
|
|
15282
15770
|
};
|
|
15283
15771
|
}, [handleResizeEnd, handleResizeMove, table]);
|
|
15284
|
-
return /* @__PURE__ */ (0,
|
|
15285
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0,
|
|
15772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
15773
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15286
15774
|
"col",
|
|
15287
15775
|
{
|
|
15288
15776
|
style: {
|
|
@@ -15293,16 +15781,16 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15293
15781
|
},
|
|
15294
15782
|
header.id
|
|
15295
15783
|
)) }, headerGroup.id)),
|
|
15296
|
-
/* @__PURE__ */ (0,
|
|
15297
|
-
return /* @__PURE__ */ (0,
|
|
15784
|
+
/* @__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) => {
|
|
15785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15298
15786
|
"th",
|
|
15299
15787
|
{
|
|
15300
15788
|
colSpan: header.colSpan,
|
|
15301
15789
|
"data-sticky": isSticky ? "" : void 0,
|
|
15302
|
-
className: (0,
|
|
15790
|
+
className: (0, import_clsx34.default)("table-header-cell group/table-header-cell", header.column.columnDef.meta?.className),
|
|
15303
15791
|
children: [
|
|
15304
|
-
/* @__PURE__ */ (0,
|
|
15305
|
-
/* @__PURE__ */ (0,
|
|
15792
|
+
/* @__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: [
|
|
15793
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15306
15794
|
TableSortButton,
|
|
15307
15795
|
{
|
|
15308
15796
|
sortDirection: header.column.getIsSorted(),
|
|
@@ -15328,7 +15816,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15328
15816
|
}
|
|
15329
15817
|
}
|
|
15330
15818
|
) }),
|
|
15331
|
-
/* @__PURE__ */ (0,
|
|
15819
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanFilter() && isTableFilterCategory(header.column.columnDef.filterFn), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15332
15820
|
TableFilterButton,
|
|
15333
15821
|
{
|
|
15334
15822
|
column: header.column,
|
|
@@ -15340,7 +15828,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15340
15828
|
header.getContext()
|
|
15341
15829
|
)
|
|
15342
15830
|
] }) }),
|
|
15343
|
-
/* @__PURE__ */ (0,
|
|
15831
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15344
15832
|
"div",
|
|
15345
15833
|
{
|
|
15346
15834
|
onPointerDown: (e) => {
|
|
@@ -15371,8 +15859,8 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15371
15859
|
};
|
|
15372
15860
|
|
|
15373
15861
|
// src/components/layout/table/TableDisplay.tsx
|
|
15374
|
-
var
|
|
15375
|
-
var
|
|
15862
|
+
var import_clsx35 = __toESM(require("clsx"));
|
|
15863
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15376
15864
|
var TableDisplay = ({
|
|
15377
15865
|
children,
|
|
15378
15866
|
containerProps,
|
|
@@ -15382,38 +15870,38 @@ var TableDisplay = ({
|
|
|
15382
15870
|
const { table } = useTableDataContext();
|
|
15383
15871
|
const { containerRef } = useTableContainerContext();
|
|
15384
15872
|
const { sizeVars } = useTableHeaderContext();
|
|
15385
|
-
return /* @__PURE__ */ (0,
|
|
15873
|
+
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
15874
|
"table",
|
|
15387
15875
|
{
|
|
15388
15876
|
...props,
|
|
15389
|
-
className: (0,
|
|
15877
|
+
className: (0, import_clsx35.default)("table", props.className),
|
|
15390
15878
|
style: {
|
|
15391
15879
|
...sizeVars,
|
|
15392
15880
|
width: Math.floor(Math.max(table.getTotalSize(), containerRef.current?.offsetWidth ?? table.getTotalSize()))
|
|
15393
15881
|
},
|
|
15394
15882
|
children: [
|
|
15395
15883
|
children,
|
|
15396
|
-
/* @__PURE__ */ (0,
|
|
15397
|
-
/* @__PURE__ */ (0,
|
|
15884
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TableHeader, { ...tableHeaderProps }),
|
|
15885
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TableBody, {})
|
|
15398
15886
|
]
|
|
15399
15887
|
}
|
|
15400
15888
|
) });
|
|
15401
15889
|
};
|
|
15402
15890
|
|
|
15403
15891
|
// src/components/layout/table/TablePagination.tsx
|
|
15404
|
-
var
|
|
15405
|
-
var
|
|
15406
|
-
var
|
|
15892
|
+
var import_react70 = require("react");
|
|
15893
|
+
var import_clsx36 = __toESM(require("clsx"));
|
|
15894
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
15407
15895
|
var TablePaginationMenu = ({ ...props }) => {
|
|
15408
15896
|
const { table } = useTableDataContext();
|
|
15409
|
-
(0,
|
|
15897
|
+
(0, import_react70.useEffect)(() => {
|
|
15410
15898
|
const { pageIndex } = table.getState().pagination;
|
|
15411
15899
|
const pageCount = table.getPageCount();
|
|
15412
15900
|
if (pageIndex >= pageCount || pageIndex < 0) {
|
|
15413
15901
|
table.setPageIndex(MathUtil.clamp(pageIndex, [0, pageCount - 1]));
|
|
15414
15902
|
}
|
|
15415
15903
|
}, [table]);
|
|
15416
|
-
return /* @__PURE__ */ (0,
|
|
15904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15417
15905
|
Pagination,
|
|
15418
15906
|
{
|
|
15419
15907
|
...props,
|
|
@@ -15433,94 +15921,23 @@ var TablePageSizeSelect = ({
|
|
|
15433
15921
|
}) => {
|
|
15434
15922
|
const { table } = useTableDataContext();
|
|
15435
15923
|
const currentPageSize = table.getState().pagination.pageSize;
|
|
15436
|
-
return /* @__PURE__ */ (0,
|
|
15924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15437
15925
|
Select,
|
|
15438
15926
|
{
|
|
15439
15927
|
...props,
|
|
15440
15928
|
value: currentPageSize.toString(),
|
|
15441
15929
|
onValueChange: (value) => table.setPageSize(Number(value)),
|
|
15442
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0,
|
|
15930
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectOption, { value: size.toString(), children: size }, size))
|
|
15443
15931
|
}
|
|
15444
15932
|
);
|
|
15445
15933
|
};
|
|
15446
15934
|
var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
|
|
15447
|
-
return /* @__PURE__ */ (0,
|
|
15448
|
-
/* @__PURE__ */ (0,
|
|
15449
|
-
/* @__PURE__ */ (0,
|
|
15935
|
+
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: [
|
|
15936
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TablePaginationMenu, {}),
|
|
15937
|
+
/* @__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
15938
|
] });
|
|
15451
15939
|
};
|
|
15452
15940
|
|
|
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
15941
|
// src/components/layout/table/TableWithSelectionProvider.tsx
|
|
15525
15942
|
var import_react71 = require("react");
|
|
15526
15943
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
@@ -15534,6 +15951,7 @@ var TableWithSelectionProvider = ({
|
|
|
15534
15951
|
onRowClick,
|
|
15535
15952
|
...props
|
|
15536
15953
|
}) => {
|
|
15954
|
+
const translation = useHightideTranslation();
|
|
15537
15955
|
const columnDef = (0, import_react71.useMemo)(() => [
|
|
15538
15956
|
{
|
|
15539
15957
|
id: selectionRowId,
|
|
@@ -15566,10 +15984,13 @@ var TableWithSelectionProvider = ({
|
|
|
15566
15984
|
enableResizing: false,
|
|
15567
15985
|
enableSorting: false,
|
|
15568
15986
|
enableHiding: false,
|
|
15569
|
-
enableColumnFilter: false
|
|
15987
|
+
enableColumnFilter: false,
|
|
15988
|
+
meta: {
|
|
15989
|
+
columnLabel: translation("selection")
|
|
15990
|
+
}
|
|
15570
15991
|
},
|
|
15571
15992
|
...props.columns ?? []
|
|
15572
|
-
], [selectionRowId, props.columns]);
|
|
15993
|
+
], [selectionRowId, props.columns, translation]);
|
|
15573
15994
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15574
15995
|
TableProvider,
|
|
15575
15996
|
{
|
|
@@ -15788,6 +16209,10 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
|
15788
16209
|
};
|
|
15789
16210
|
const getColumnHeader = (columnId) => {
|
|
15790
16211
|
const column = table.getColumn(columnId);
|
|
16212
|
+
const columnLabel = column?.columnDef.meta?.columnLabel;
|
|
16213
|
+
if (columnLabel) {
|
|
16214
|
+
return columnLabel;
|
|
16215
|
+
}
|
|
15791
16216
|
const header = column?.columnDef.header;
|
|
15792
16217
|
if (typeof header === "string") {
|
|
15793
16218
|
return header;
|
|
@@ -17734,6 +18159,7 @@ var PromiseUtils = {
|
|
|
17734
18159
|
DateTimePickerDialog,
|
|
17735
18160
|
DateTimePickerUncontrolled,
|
|
17736
18161
|
DateUtils,
|
|
18162
|
+
DatetimeFilter,
|
|
17737
18163
|
DayPicker,
|
|
17738
18164
|
DayPickerUncontrolled,
|
|
17739
18165
|
Dialog,
|
|
@@ -17869,6 +18295,7 @@ var PromiseUtils = {
|
|
|
17869
18295
|
TableWithSelectionProvider,
|
|
17870
18296
|
TagIcon,
|
|
17871
18297
|
TagsFilter,
|
|
18298
|
+
TagsSingleFilter,
|
|
17872
18299
|
TextFilter,
|
|
17873
18300
|
TextImage,
|
|
17874
18301
|
TextProperty,
|
|
@@ -17898,6 +18325,14 @@ var PromiseUtils = {
|
|
|
17898
18325
|
createLoopingList,
|
|
17899
18326
|
createLoopingListWithIndex,
|
|
17900
18327
|
equalSizeGroups,
|
|
18328
|
+
filterBoolean,
|
|
18329
|
+
filterDate,
|
|
18330
|
+
filterDatetime,
|
|
18331
|
+
filterGeneric,
|
|
18332
|
+
filterNumber,
|
|
18333
|
+
filterTags,
|
|
18334
|
+
filterTagsSingle,
|
|
18335
|
+
filterText,
|
|
17901
18336
|
formatDate,
|
|
17902
18337
|
formatDateTime,
|
|
17903
18338
|
getBetweenDuration,
|