@helpwave/hightide 0.9.2 → 0.9.4
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 +32 -13
- package/dist/index.d.ts +32 -13
- package/dist/index.js +879 -734
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +739 -595
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8336,6 +8336,7 @@ var hightideTranslation = {
|
|
|
8336
8336
|
"de-DE": {
|
|
8337
8337
|
"add": `Hinzuf\xFCgen`,
|
|
8338
8338
|
"addFilter": `Filter hinzuf\xFCgen`,
|
|
8339
|
+
"addSorting": `Sortierung hinzuf\xFCgen`,
|
|
8339
8340
|
"addTime": `Uhrzeit hinzuf\xFCgen`,
|
|
8340
8341
|
"after": `Nach`,
|
|
8341
8342
|
"age": `Alter`,
|
|
@@ -8547,6 +8548,8 @@ var hightideTranslation = {
|
|
|
8547
8548
|
"slideOf": ({ index, length }) => {
|
|
8548
8549
|
return `Slide ${index} von ${length} slides`;
|
|
8549
8550
|
},
|
|
8551
|
+
"sortAsc": `ASC`,
|
|
8552
|
+
"sortDesc": `DESC`,
|
|
8550
8553
|
"sorting": `Sortierung`,
|
|
8551
8554
|
"sSortingState": ({ sortDirection }) => {
|
|
8552
8555
|
return TranslationGen.resolveSelect(sortDirection, {
|
|
@@ -8703,6 +8706,7 @@ var hightideTranslation = {
|
|
|
8703
8706
|
"en-US": {
|
|
8704
8707
|
"add": `Add`,
|
|
8705
8708
|
"addFilter": `Add filter`,
|
|
8709
|
+
"addSorting": `Add sorting`,
|
|
8706
8710
|
"addTime": `Add Time`,
|
|
8707
8711
|
"after": `After`,
|
|
8708
8712
|
"age": `Age`,
|
|
@@ -8914,6 +8918,8 @@ var hightideTranslation = {
|
|
|
8914
8918
|
"slideOf": ({ index, length }) => {
|
|
8915
8919
|
return `Slide ${index} of ${length} slides`;
|
|
8916
8920
|
},
|
|
8921
|
+
"sortAsc": `ASC`,
|
|
8922
|
+
"sortDesc": `DESC`,
|
|
8917
8923
|
"sorting": `Sorting`,
|
|
8918
8924
|
"sSortingState": ({ sortDirection }) => {
|
|
8919
8925
|
return TranslationGen.resolveSelect(sortDirection, {
|
|
@@ -14390,40 +14396,40 @@ function isParameterValidForOperator(dataType, operator, parameter) {
|
|
|
14390
14396
|
}
|
|
14391
14397
|
switch (dataType) {
|
|
14392
14398
|
case "text": {
|
|
14393
|
-
return typeof parameter.
|
|
14399
|
+
return typeof parameter.stringValue === "string";
|
|
14394
14400
|
}
|
|
14395
14401
|
case "number": {
|
|
14396
14402
|
if (operator === "between" || operator === "notBetween") {
|
|
14397
|
-
const min = parameter.
|
|
14398
|
-
const max = parameter.
|
|
14403
|
+
const min = parameter.numberMin;
|
|
14404
|
+
const max = parameter.numberMax;
|
|
14399
14405
|
return typeof min === "number" && !Number.isNaN(min) && typeof max === "number" && !Number.isNaN(max) && min <= max;
|
|
14400
14406
|
}
|
|
14401
|
-
const v = parameter.
|
|
14407
|
+
const v = parameter.numberValue;
|
|
14402
14408
|
return typeof v === "number" && !Number.isNaN(v);
|
|
14403
14409
|
}
|
|
14404
14410
|
case "date":
|
|
14405
14411
|
case "dateTime": {
|
|
14406
14412
|
if (operator === "between" || operator === "notBetween") {
|
|
14407
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14408
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14413
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14414
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14409
14415
|
if (!minDate || !maxDate) return false;
|
|
14410
14416
|
const minNorm = dataType === "date" ? DateUtils.toOnlyDate(minDate).getTime() : DateUtils.toDateTimeOnly(minDate).getTime();
|
|
14411
14417
|
const maxNorm = dataType === "date" ? DateUtils.toOnlyDate(maxDate).getTime() : DateUtils.toDateTimeOnly(maxDate).getTime();
|
|
14412
14418
|
return minNorm <= maxNorm;
|
|
14413
14419
|
}
|
|
14414
|
-
return DateUtils.tryParseDate(parameter.
|
|
14420
|
+
return DateUtils.tryParseDate(parameter.dateValue) != null;
|
|
14415
14421
|
}
|
|
14416
14422
|
case "boolean":
|
|
14417
14423
|
return true;
|
|
14418
14424
|
case "multiTags": {
|
|
14419
|
-
return Array.isArray(parameter.
|
|
14425
|
+
return Array.isArray(parameter.uuidValues);
|
|
14420
14426
|
}
|
|
14421
14427
|
case "singleTag": {
|
|
14422
14428
|
if (operator === "contains" || operator === "notContains") {
|
|
14423
|
-
return Array.isArray(parameter.
|
|
14429
|
+
return Array.isArray(parameter.uuidValues);
|
|
14424
14430
|
}
|
|
14425
14431
|
if (operator === "equals" || operator === "notEquals") {
|
|
14426
|
-
return typeof parameter.
|
|
14432
|
+
return typeof parameter.uuidValue === "string";
|
|
14427
14433
|
}
|
|
14428
14434
|
return true;
|
|
14429
14435
|
}
|
|
@@ -14445,9 +14451,8 @@ var FilterValueUtils = {
|
|
|
14445
14451
|
isValid: isFilterValueValid
|
|
14446
14452
|
};
|
|
14447
14453
|
function filterText(value, operator, parameter) {
|
|
14448
|
-
const
|
|
14449
|
-
const
|
|
14450
|
-
const cellText = isCaseSensitive ? value?.toString() ?? "" : value?.toString().toLowerCase() ?? "";
|
|
14454
|
+
const searchText = parameter.stringValue ?? "";
|
|
14455
|
+
const cellText = value?.toString() ?? "";
|
|
14451
14456
|
switch (operator) {
|
|
14452
14457
|
case "equals":
|
|
14453
14458
|
return cellText === searchText;
|
|
@@ -14481,21 +14486,21 @@ function filterNumber(value, operator, parameter) {
|
|
|
14481
14486
|
}
|
|
14482
14487
|
switch (operator) {
|
|
14483
14488
|
case "equals":
|
|
14484
|
-
return value === parameter.
|
|
14489
|
+
return value === parameter.numberValue;
|
|
14485
14490
|
case "notEquals":
|
|
14486
|
-
return value !== parameter.
|
|
14491
|
+
return value !== parameter.numberValue;
|
|
14487
14492
|
case "greaterThan":
|
|
14488
|
-
return value > (parameter.
|
|
14493
|
+
return value > (parameter.numberValue ?? 0);
|
|
14489
14494
|
case "greaterThanOrEqual":
|
|
14490
|
-
return value >= (parameter.
|
|
14495
|
+
return value >= (parameter.numberValue ?? 0);
|
|
14491
14496
|
case "lessThan":
|
|
14492
|
-
return value < (parameter.
|
|
14497
|
+
return value < (parameter.numberValue ?? 0);
|
|
14493
14498
|
case "lessThanOrEqual":
|
|
14494
|
-
return value <= (parameter.
|
|
14499
|
+
return value <= (parameter.numberValue ?? 0);
|
|
14495
14500
|
case "between":
|
|
14496
|
-
return value >= (parameter.
|
|
14501
|
+
return value >= (parameter.numberMin ?? -Infinity) && value <= (parameter.numberMax ?? Infinity);
|
|
14497
14502
|
case "notBetween":
|
|
14498
|
-
return value < (parameter.
|
|
14503
|
+
return value < (parameter.numberMin ?? -Infinity) || value > (parameter.numberMax ?? Infinity);
|
|
14499
14504
|
case "isUndefined":
|
|
14500
14505
|
return value === void 0 || value === null;
|
|
14501
14506
|
case "isNotUndefined":
|
|
@@ -14518,44 +14523,44 @@ function filterDate(value, operator, parameter) {
|
|
|
14518
14523
|
const normalizedDate = DateUtils.toOnlyDate(date);
|
|
14519
14524
|
switch (operator) {
|
|
14520
14525
|
case "equals": {
|
|
14521
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14526
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14522
14527
|
if (!filterDate2) return false;
|
|
14523
14528
|
return normalizedDate.getTime() === DateUtils.toOnlyDate(filterDate2).getTime();
|
|
14524
14529
|
}
|
|
14525
14530
|
case "notEquals": {
|
|
14526
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14531
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14527
14532
|
if (!filterDate2) return false;
|
|
14528
14533
|
return normalizedDate.getTime() !== DateUtils.toOnlyDate(filterDate2).getTime();
|
|
14529
14534
|
}
|
|
14530
14535
|
case "greaterThan": {
|
|
14531
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14536
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14532
14537
|
if (!filterDate2) return false;
|
|
14533
14538
|
return normalizedDate > DateUtils.toOnlyDate(filterDate2);
|
|
14534
14539
|
}
|
|
14535
14540
|
case "greaterThanOrEqual": {
|
|
14536
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14541
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14537
14542
|
if (!filterDate2) return false;
|
|
14538
14543
|
return normalizedDate >= DateUtils.toOnlyDate(filterDate2);
|
|
14539
14544
|
}
|
|
14540
14545
|
case "lessThan": {
|
|
14541
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14546
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14542
14547
|
if (!filterDate2) return false;
|
|
14543
14548
|
return normalizedDate < DateUtils.toOnlyDate(filterDate2);
|
|
14544
14549
|
}
|
|
14545
14550
|
case "lessThanOrEqual": {
|
|
14546
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14551
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14547
14552
|
if (!filterDate2) return false;
|
|
14548
14553
|
return normalizedDate <= DateUtils.toOnlyDate(filterDate2);
|
|
14549
14554
|
}
|
|
14550
14555
|
case "between": {
|
|
14551
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14552
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14556
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14557
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14553
14558
|
if (!minDate || !maxDate) return false;
|
|
14554
14559
|
return normalizedDate >= DateUtils.toOnlyDate(minDate) && normalizedDate <= DateUtils.toOnlyDate(maxDate);
|
|
14555
14560
|
}
|
|
14556
14561
|
case "notBetween": {
|
|
14557
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14558
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14562
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14563
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14559
14564
|
if (!minDate || !maxDate) return false;
|
|
14560
14565
|
return normalizedDate < DateUtils.toOnlyDate(minDate) || normalizedDate > DateUtils.toOnlyDate(maxDate);
|
|
14561
14566
|
}
|
|
@@ -14577,44 +14582,44 @@ function filterDateTime(value, operator, parameter) {
|
|
|
14577
14582
|
const normalizedDatetime = DateUtils.toDateTimeOnly(dateTime);
|
|
14578
14583
|
switch (operator) {
|
|
14579
14584
|
case "equals": {
|
|
14580
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14585
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14581
14586
|
if (!filterDatetime) return false;
|
|
14582
14587
|
return normalizedDatetime.getTime() === DateUtils.toDateTimeOnly(filterDatetime).getTime();
|
|
14583
14588
|
}
|
|
14584
14589
|
case "notEquals": {
|
|
14585
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14590
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14586
14591
|
if (!filterDatetime) return false;
|
|
14587
14592
|
return normalizedDatetime.getTime() !== DateUtils.toDateTimeOnly(filterDatetime).getTime();
|
|
14588
14593
|
}
|
|
14589
14594
|
case "greaterThan": {
|
|
14590
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14595
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14591
14596
|
if (!filterDatetime) return false;
|
|
14592
14597
|
return normalizedDatetime > DateUtils.toDateTimeOnly(filterDatetime);
|
|
14593
14598
|
}
|
|
14594
14599
|
case "greaterThanOrEqual": {
|
|
14595
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14600
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14596
14601
|
if (!filterDatetime) return false;
|
|
14597
14602
|
return normalizedDatetime >= DateUtils.toDateTimeOnly(filterDatetime);
|
|
14598
14603
|
}
|
|
14599
14604
|
case "lessThan": {
|
|
14600
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14605
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14601
14606
|
if (!filterDatetime) return false;
|
|
14602
14607
|
return normalizedDatetime < DateUtils.toDateTimeOnly(filterDatetime);
|
|
14603
14608
|
}
|
|
14604
14609
|
case "lessThanOrEqual": {
|
|
14605
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14610
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14606
14611
|
if (!filterDatetime) return false;
|
|
14607
14612
|
return normalizedDatetime <= DateUtils.toDateTimeOnly(filterDatetime);
|
|
14608
14613
|
}
|
|
14609
14614
|
case "between": {
|
|
14610
|
-
const minDatetime = DateUtils.tryParseDate(parameter.
|
|
14611
|
-
const maxDatetime = DateUtils.tryParseDate(parameter.
|
|
14615
|
+
const minDatetime = DateUtils.tryParseDate(parameter.dateMin);
|
|
14616
|
+
const maxDatetime = DateUtils.tryParseDate(parameter.dateMax);
|
|
14612
14617
|
if (!minDatetime || !maxDatetime) return false;
|
|
14613
14618
|
return normalizedDatetime >= DateUtils.toDateTimeOnly(minDatetime) && normalizedDatetime <= DateUtils.toDateTimeOnly(maxDatetime);
|
|
14614
14619
|
}
|
|
14615
14620
|
case "notBetween": {
|
|
14616
|
-
const minDatetime = DateUtils.tryParseDate(parameter.
|
|
14617
|
-
const maxDatetime = DateUtils.tryParseDate(parameter.
|
|
14621
|
+
const minDatetime = DateUtils.tryParseDate(parameter.dateMin);
|
|
14622
|
+
const maxDatetime = DateUtils.tryParseDate(parameter.dateMax);
|
|
14618
14623
|
if (!minDatetime || !maxDatetime) return false;
|
|
14619
14624
|
return normalizedDatetime < DateUtils.toDateTimeOnly(minDatetime) || normalizedDatetime > DateUtils.toDateTimeOnly(maxDatetime);
|
|
14620
14625
|
}
|
|
@@ -14639,28 +14644,28 @@ function filterBoolean(value, operator) {
|
|
|
14639
14644
|
function filterMultiTags(value, operator, parameter) {
|
|
14640
14645
|
switch (operator) {
|
|
14641
14646
|
case "equals": {
|
|
14642
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14643
|
-
if (value.length !== parameter.
|
|
14647
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return false;
|
|
14648
|
+
if (value.length !== parameter.uuidValues.length) return false;
|
|
14644
14649
|
const valueSet = new Set(value);
|
|
14645
|
-
const searchTagsSet = new Set(parameter.
|
|
14650
|
+
const searchTagsSet = new Set(parameter.uuidValues);
|
|
14646
14651
|
if (valueSet.size !== searchTagsSet.size) return false;
|
|
14647
14652
|
return Array.from(valueSet).every((tag) => searchTagsSet.has(tag));
|
|
14648
14653
|
}
|
|
14649
14654
|
case "notEquals": {
|
|
14650
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14651
|
-
if (value.length !== parameter.
|
|
14655
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return true;
|
|
14656
|
+
if (value.length !== parameter.uuidValues.length) return true;
|
|
14652
14657
|
const valueSet = new Set(value);
|
|
14653
|
-
const searchTagsSet = new Set(parameter.
|
|
14658
|
+
const searchTagsSet = new Set(parameter.uuidValues);
|
|
14654
14659
|
if (valueSet.size !== searchTagsSet.size) return true;
|
|
14655
14660
|
return !Array.from(valueSet).every((tag) => searchTagsSet.has(tag));
|
|
14656
14661
|
}
|
|
14657
14662
|
case "contains": {
|
|
14658
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14659
|
-
return parameter.
|
|
14663
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return false;
|
|
14664
|
+
return parameter.uuidValues.every((tag) => value.includes(tag));
|
|
14660
14665
|
}
|
|
14661
14666
|
case "notContains": {
|
|
14662
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14663
|
-
return !parameter.
|
|
14667
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return true;
|
|
14668
|
+
return !parameter.uuidValues.every((tag) => value.includes(tag));
|
|
14664
14669
|
}
|
|
14665
14670
|
case "isUndefined":
|
|
14666
14671
|
return value === void 0 || value === null;
|
|
@@ -14673,13 +14678,13 @@ function filterMultiTags(value, operator, parameter) {
|
|
|
14673
14678
|
function filterSingleTag(value, operator, parameter) {
|
|
14674
14679
|
switch (operator) {
|
|
14675
14680
|
case "equals":
|
|
14676
|
-
return value === parameter.
|
|
14681
|
+
return value === parameter.uuidValue;
|
|
14677
14682
|
case "notEquals":
|
|
14678
|
-
return value !== parameter.
|
|
14683
|
+
return value !== parameter.uuidValue;
|
|
14679
14684
|
case "contains":
|
|
14680
|
-
return parameter.
|
|
14685
|
+
return parameter.uuidValues?.includes(value) ?? false;
|
|
14681
14686
|
case "notContains":
|
|
14682
|
-
return !(parameter.
|
|
14687
|
+
return !(parameter.uuidValues?.includes(value) ?? false);
|
|
14683
14688
|
case "isUndefined":
|
|
14684
14689
|
return value === void 0 || value === null;
|
|
14685
14690
|
case "isNotUndefined":
|
|
@@ -14727,81 +14732,81 @@ function useFilterValueTranslation() {
|
|
|
14727
14732
|
switch (value.operator) {
|
|
14728
14733
|
case "equals":
|
|
14729
14734
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14730
|
-
return translation("rEquals", { value: formatDateParam(p.
|
|
14735
|
+
return translation("rEquals", { value: formatDateParam(p.dateValue, locale, dateFormat) ?? "-" });
|
|
14731
14736
|
}
|
|
14732
14737
|
if (value.dataType === "singleTag") {
|
|
14733
|
-
return translation("rEquals", { value: tagToLabel(tags, p.
|
|
14738
|
+
return translation("rEquals", { value: tagToLabel(tags, p.uuidValue) });
|
|
14734
14739
|
}
|
|
14735
14740
|
if (value.dataType === "multiTags") {
|
|
14736
|
-
const valueStr = (p.
|
|
14741
|
+
const valueStr = (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14737
14742
|
return translation("rEquals", { value: valueStr });
|
|
14738
14743
|
}
|
|
14739
|
-
return translation("rEquals", { value: String(p.
|
|
14744
|
+
return translation("rEquals", { value: String(p.stringValue ?? p.numberValue ?? "") });
|
|
14740
14745
|
case "notEquals":
|
|
14741
14746
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14742
|
-
return translation("rNotEquals", { value: formatDateParam(p.
|
|
14747
|
+
return translation("rNotEquals", { value: formatDateParam(p.dateValue, locale, dateFormat) });
|
|
14743
14748
|
}
|
|
14744
14749
|
if (value.dataType === "singleTag") {
|
|
14745
|
-
return translation("rNotEquals", { value: tagToLabel(tags, p.
|
|
14750
|
+
return translation("rNotEquals", { value: tagToLabel(tags, p.uuidValue) });
|
|
14746
14751
|
}
|
|
14747
14752
|
if (value.dataType === "multiTags") {
|
|
14748
|
-
const valueStr = (p.
|
|
14753
|
+
const valueStr = (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14749
14754
|
return translation("rNotEquals", { value: valueStr });
|
|
14750
14755
|
}
|
|
14751
|
-
return translation("rNotEquals", { value: String(p.
|
|
14756
|
+
return translation("rNotEquals", { value: String(p.stringValue ?? p.numberValue ?? "") });
|
|
14752
14757
|
case "contains":
|
|
14753
14758
|
if (value.dataType === "multiTags" || value.dataType === "singleTag") {
|
|
14754
|
-
const valueStr = value.dataType === "singleTag" ? tagToLabel(tags, p.
|
|
14759
|
+
const valueStr = value.dataType === "singleTag" ? tagToLabel(tags, p.uuidValue) : (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14755
14760
|
return translation("rContains", { value: valueStr });
|
|
14756
14761
|
}
|
|
14757
|
-
return translation("rContains", { value: String(p.
|
|
14762
|
+
return translation("rContains", { value: String(p.stringValue ?? "") });
|
|
14758
14763
|
case "notContains":
|
|
14759
14764
|
if (value.dataType === "multiTags" || value.dataType === "singleTag") {
|
|
14760
|
-
const valueStr = value.dataType === "singleTag" ? tagToLabel(tags, p.
|
|
14765
|
+
const valueStr = value.dataType === "singleTag" ? tagToLabel(tags, p.uuidValue) : (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14761
14766
|
return translation("rNotContains", { value: valueStr });
|
|
14762
14767
|
}
|
|
14763
|
-
return translation("rNotContains", { value: `"${String(p.
|
|
14768
|
+
return translation("rNotContains", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14764
14769
|
case "startsWith":
|
|
14765
|
-
return translation("rStartsWith", { value: `"${String(p.
|
|
14770
|
+
return translation("rStartsWith", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14766
14771
|
case "endsWith":
|
|
14767
|
-
return translation("rEndsWith", { value: `"${String(p.
|
|
14772
|
+
return translation("rEndsWith", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14768
14773
|
case "greaterThan":
|
|
14769
14774
|
return translation("rGreaterThan", {
|
|
14770
|
-
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.
|
|
14775
|
+
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.dateValue, locale, dateFormat) ?? "-" : String(p.numberValue ?? "-")
|
|
14771
14776
|
});
|
|
14772
14777
|
case "greaterThanOrEqual":
|
|
14773
14778
|
return translation("rGreaterThanOrEqual", {
|
|
14774
|
-
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.
|
|
14779
|
+
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.dateValue, locale, dateFormat) ?? "-" : String(p.numberValue ?? "-")
|
|
14775
14780
|
});
|
|
14776
14781
|
case "lessThan":
|
|
14777
14782
|
return translation("rLessThan", {
|
|
14778
|
-
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.
|
|
14783
|
+
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.dateValue, locale, dateFormat) ?? "-" : String(p.numberValue ?? "-")
|
|
14779
14784
|
});
|
|
14780
14785
|
case "lessThanOrEqual":
|
|
14781
14786
|
return translation("rLessThanOrEqual", {
|
|
14782
|
-
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.
|
|
14787
|
+
value: value.dataType === "date" || value.dataType === "dateTime" ? formatDateParam(p.dateValue, locale, dateFormat) ?? "-" : String(p.numberValue ?? "-")
|
|
14783
14788
|
});
|
|
14784
14789
|
case "between":
|
|
14785
14790
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14786
14791
|
return translation("rBetween", {
|
|
14787
|
-
value1: formatDateParam(p.
|
|
14788
|
-
value2: formatDateParam(p.
|
|
14792
|
+
value1: formatDateParam(p.dateMin, locale, dateFormat) ?? "-",
|
|
14793
|
+
value2: formatDateParam(p.dateMax, locale, dateFormat) ?? "-"
|
|
14789
14794
|
});
|
|
14790
14795
|
}
|
|
14791
14796
|
return translation("rBetween", {
|
|
14792
|
-
value1: String(p.
|
|
14793
|
-
value2: String(p.
|
|
14797
|
+
value1: String(p.numberMin ?? "-"),
|
|
14798
|
+
value2: String(p.numberMax ?? "-")
|
|
14794
14799
|
});
|
|
14795
14800
|
case "notBetween":
|
|
14796
14801
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14797
14802
|
return translation("rNotBetween", {
|
|
14798
|
-
value1: formatDateParam(p.
|
|
14799
|
-
value2: formatDateParam(p.
|
|
14803
|
+
value1: formatDateParam(p.dateMin, locale, dateFormat) ?? "-",
|
|
14804
|
+
value2: formatDateParam(p.dateMax, locale, dateFormat) ?? "-"
|
|
14800
14805
|
});
|
|
14801
14806
|
}
|
|
14802
14807
|
return translation("rNotBetween", {
|
|
14803
|
-
value1: String(p.
|
|
14804
|
-
value2: String(p.
|
|
14808
|
+
value1: String(p.numberMin ?? "-"),
|
|
14809
|
+
value2: String(p.numberMax ?? "-")
|
|
14805
14810
|
});
|
|
14806
14811
|
case "isTrue":
|
|
14807
14812
|
return translation("isTrue");
|
|
@@ -15211,84 +15216,21 @@ var TableSortButton = ({
|
|
|
15211
15216
|
|
|
15212
15217
|
// src/components/layout/table/TableFilterButton.tsx
|
|
15213
15218
|
import { FilterIcon } from "lucide-react";
|
|
15214
|
-
import { useEffect as
|
|
15219
|
+
import { useEffect as useEffect42, useId as useId18, useMemo as useMemo34, useRef as useRef34, useState as useState33 } from "react";
|
|
15215
15220
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
15216
15221
|
|
|
15217
15222
|
// src/components/user-interaction/data/FilterPopUp.tsx
|
|
15218
|
-
import {
|
|
15219
|
-
import { forwardRef as forwardRef23, useId as useId17, useMemo as useMemo33, useState as useState32 } from "react";
|
|
15220
|
-
|
|
15221
|
-
// src/components/user-interaction/Checkbox.tsx
|
|
15222
|
-
import { Check as Check2, Minus as Minus2 } from "lucide-react";
|
|
15223
|
-
import { useCallback as useCallback28 } from "react";
|
|
15224
|
-
import { jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15225
|
-
var Checkbox = ({
|
|
15226
|
-
value: controlledValue,
|
|
15227
|
-
initialValue = false,
|
|
15228
|
-
indeterminate,
|
|
15229
|
-
required = false,
|
|
15230
|
-
invalid = false,
|
|
15231
|
-
disabled = false,
|
|
15232
|
-
readOnly = false,
|
|
15233
|
-
onValueChange,
|
|
15234
|
-
onEditComplete,
|
|
15235
|
-
size = "md",
|
|
15236
|
-
alwaysShowCheckIcon = false,
|
|
15237
|
-
...props
|
|
15238
|
-
}) => {
|
|
15239
|
-
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
15240
|
-
const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
|
|
15241
|
-
const onChangeWrapper = useCallback28((value2) => {
|
|
15242
|
-
onValueChangeStable(value2);
|
|
15243
|
-
onEditCompleteStable(value2);
|
|
15244
|
-
}, [onValueChangeStable, onEditCompleteStable]);
|
|
15245
|
-
const [value, setValue] = useControlledState({
|
|
15246
|
-
value: controlledValue,
|
|
15247
|
-
onValueChange: onChangeWrapper,
|
|
15248
|
-
defaultValue: initialValue
|
|
15249
|
-
});
|
|
15250
|
-
return /* @__PURE__ */ jsxs33(
|
|
15251
|
-
"div",
|
|
15252
|
-
{
|
|
15253
|
-
...props,
|
|
15254
|
-
onClick: (event) => {
|
|
15255
|
-
if (!disabled) {
|
|
15256
|
-
setValue((prev) => !prev);
|
|
15257
|
-
}
|
|
15258
|
-
props.onClick?.(event);
|
|
15259
|
-
},
|
|
15260
|
-
onKeyDown: (event) => {
|
|
15261
|
-
if (disabled) return;
|
|
15262
|
-
if (event.key === " " || event.key === "Enter") {
|
|
15263
|
-
event.preventDefault();
|
|
15264
|
-
setValue((prev) => !prev);
|
|
15265
|
-
}
|
|
15266
|
-
props.onKeyDown?.(event);
|
|
15267
|
-
},
|
|
15268
|
-
"data-checked": !indeterminate ? value : "indeterminate",
|
|
15269
|
-
"data-size": size ?? void 0,
|
|
15270
|
-
...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
|
|
15271
|
-
role: "checkbox",
|
|
15272
|
-
tabIndex: disabled ? -1 : 0,
|
|
15273
|
-
"aria-checked": indeterminate ? "mixed" : value,
|
|
15274
|
-
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
15275
|
-
"data-name": props["data-name"] ?? "checkbox",
|
|
15276
|
-
children: [
|
|
15277
|
-
/* @__PURE__ */ jsx62(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ jsx62(Minus2, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) }),
|
|
15278
|
-
/* @__PURE__ */ jsx62(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ jsx62(Check2, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) })
|
|
15279
|
-
]
|
|
15280
|
-
}
|
|
15281
|
-
);
|
|
15282
|
-
};
|
|
15223
|
+
import { Check as Check2, TrashIcon } from "lucide-react";
|
|
15224
|
+
import { forwardRef as forwardRef23, useEffect as useEffect41, useId as useId17, useMemo as useMemo33, useState as useState32 } from "react";
|
|
15283
15225
|
|
|
15284
15226
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
15285
|
-
import { forwardRef as forwardRef18, useCallback as
|
|
15227
|
+
import { forwardRef as forwardRef18, useCallback as useCallback30, useEffect as useEffect35, useId as useId14, useImperativeHandle as useImperativeHandle12, useMemo as useMemo29, useRef as useRef30, useState as useState29 } from "react";
|
|
15286
15228
|
import { CalendarIcon } from "lucide-react";
|
|
15287
15229
|
import clsx24 from "clsx";
|
|
15288
15230
|
|
|
15289
15231
|
// src/components/user-interaction/date/TimePicker.tsx
|
|
15290
15232
|
import { useEffect as useEffect31, useMemo as useMemo26, useRef as useRef27 } from "react";
|
|
15291
|
-
import { jsx as
|
|
15233
|
+
import { jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15292
15234
|
var TimePicker = ({
|
|
15293
15235
|
value: controlledValue,
|
|
15294
15236
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15381,10 +15323,10 @@ var TimePicker = ({
|
|
|
15381
15323
|
setValue(newDate);
|
|
15382
15324
|
onEditComplete?.(newDate);
|
|
15383
15325
|
};
|
|
15384
|
-
return /* @__PURE__ */
|
|
15385
|
-
/* @__PURE__ */
|
|
15326
|
+
return /* @__PURE__ */ jsxs33("div", { "data-name": "time-picker-container", className, children: [
|
|
15327
|
+
/* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: hours.map((hour2) => {
|
|
15386
15328
|
const isSelected = hour2 === value.getHours() - (!is24HourFormat && isPM ? 12 : 0);
|
|
15387
|
-
return /* @__PURE__ */
|
|
15329
|
+
return /* @__PURE__ */ jsx62(
|
|
15388
15330
|
Button,
|
|
15389
15331
|
{
|
|
15390
15332
|
size: "sm",
|
|
@@ -15397,9 +15339,9 @@ var TimePicker = ({
|
|
|
15397
15339
|
hour2
|
|
15398
15340
|
);
|
|
15399
15341
|
}) }),
|
|
15400
|
-
/* @__PURE__ */
|
|
15342
|
+
/* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: minutes.map((minute) => {
|
|
15401
15343
|
const isSelected = minute === closestMinute;
|
|
15402
|
-
return /* @__PURE__ */
|
|
15344
|
+
return /* @__PURE__ */ jsx62(
|
|
15403
15345
|
Button,
|
|
15404
15346
|
{
|
|
15405
15347
|
size: "sm",
|
|
@@ -15412,9 +15354,9 @@ var TimePicker = ({
|
|
|
15412
15354
|
minute + minuteIncrement
|
|
15413
15355
|
);
|
|
15414
15356
|
}) }),
|
|
15415
|
-
/* @__PURE__ */
|
|
15357
|
+
/* @__PURE__ */ jsx62(Visibility, { isVisible: precision === "second" || precision === "millisecond", children: /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: seconds.map((second) => {
|
|
15416
15358
|
const isSelected = second === closestSecond;
|
|
15417
|
-
return /* @__PURE__ */
|
|
15359
|
+
return /* @__PURE__ */ jsx62(
|
|
15418
15360
|
Button,
|
|
15419
15361
|
{
|
|
15420
15362
|
size: "sm",
|
|
@@ -15427,9 +15369,9 @@ var TimePicker = ({
|
|
|
15427
15369
|
second + secondIncrement
|
|
15428
15370
|
);
|
|
15429
15371
|
}) }) }),
|
|
15430
|
-
/* @__PURE__ */
|
|
15372
|
+
/* @__PURE__ */ jsx62(Visibility, { isVisible: precision === "millisecond", children: /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: milliseconds.map((millisecond) => {
|
|
15431
15373
|
const isSelected = millisecond === closestMillisecond;
|
|
15432
|
-
return /* @__PURE__ */
|
|
15374
|
+
return /* @__PURE__ */ jsx62(
|
|
15433
15375
|
Button,
|
|
15434
15376
|
{
|
|
15435
15377
|
size: "sm",
|
|
@@ -15442,8 +15384,8 @@ var TimePicker = ({
|
|
|
15442
15384
|
millisecond + millisecondIncrement
|
|
15443
15385
|
);
|
|
15444
15386
|
}) }) }),
|
|
15445
|
-
!is24HourFormat && /* @__PURE__ */
|
|
15446
|
-
/* @__PURE__ */
|
|
15387
|
+
!is24HourFormat && /* @__PURE__ */ jsxs33("div", { "data-name": "time-picker-value-column", children: [
|
|
15388
|
+
/* @__PURE__ */ jsx62(
|
|
15447
15389
|
Button,
|
|
15448
15390
|
{
|
|
15449
15391
|
size: "sm",
|
|
@@ -15453,7 +15395,7 @@ var TimePicker = ({
|
|
|
15453
15395
|
children: "AM"
|
|
15454
15396
|
}
|
|
15455
15397
|
),
|
|
15456
|
-
/* @__PURE__ */
|
|
15398
|
+
/* @__PURE__ */ jsx62(
|
|
15457
15399
|
Button,
|
|
15458
15400
|
{
|
|
15459
15401
|
size: "sm",
|
|
@@ -15473,8 +15415,8 @@ import { ArrowDown, ArrowUp, Calendar, ChevronDown as ChevronDown4 } from "lucid
|
|
|
15473
15415
|
import clsx23 from "clsx";
|
|
15474
15416
|
|
|
15475
15417
|
// src/components/user-interaction/date/DayPicker.tsx
|
|
15476
|
-
import { useCallback as
|
|
15477
|
-
import { jsx as
|
|
15418
|
+
import { useCallback as useCallback28, useEffect as useEffect32, useMemo as useMemo27, useRef as useRef28 } from "react";
|
|
15419
|
+
import { jsx as jsx63, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
15478
15420
|
var DayPicker = ({
|
|
15479
15421
|
displayedMonth: controlledDisplayedMonth,
|
|
15480
15422
|
initialDisplayedMonth,
|
|
@@ -15507,7 +15449,7 @@ var DayPicker = ({
|
|
|
15507
15449
|
() => !!value && weeks.some((week) => week.some((d) => DateUtils.equalDate(value, d))),
|
|
15508
15450
|
[value, weeks]
|
|
15509
15451
|
);
|
|
15510
|
-
const firstDayOfMonth =
|
|
15452
|
+
const firstDayOfMonth = useCallback28(
|
|
15511
15453
|
(date) => new Date(date.getFullYear(), date.getMonth(), 1),
|
|
15512
15454
|
[]
|
|
15513
15455
|
);
|
|
@@ -15523,12 +15465,12 @@ var DayPicker = ({
|
|
|
15523
15465
|
if (!providedStart) return;
|
|
15524
15466
|
return new Date(providedStart.getFullYear(), providedStart.getMonth(), providedStart.getDate());
|
|
15525
15467
|
}, [providedStart]);
|
|
15526
|
-
const clampToRange =
|
|
15468
|
+
const clampToRange = useCallback28((date) => {
|
|
15527
15469
|
if (start && date < start) return start;
|
|
15528
15470
|
if (end && date > end) return end;
|
|
15529
15471
|
return date;
|
|
15530
15472
|
}, [start, end]);
|
|
15531
|
-
const navigateTo =
|
|
15473
|
+
const navigateTo = useCallback28((candidate) => {
|
|
15532
15474
|
const clamped = clampToRange(candidate);
|
|
15533
15475
|
if (!DateUtils.between(clamped, start, end)) return;
|
|
15534
15476
|
setValue(clamped);
|
|
@@ -15537,7 +15479,7 @@ var DayPicker = ({
|
|
|
15537
15479
|
setDisplayedMonth(firstDayOfMonth(clamped));
|
|
15538
15480
|
}
|
|
15539
15481
|
}, [clampToRange, start, end, setValue, onEditComplete, displayedMonth, setDisplayedMonth, firstDayOfMonth]);
|
|
15540
|
-
const onKeyDown =
|
|
15482
|
+
const onKeyDown = useCallback28(
|
|
15541
15483
|
(event) => {
|
|
15542
15484
|
PropsUtil.aria.navigate({
|
|
15543
15485
|
left: () => focusTargetDate && navigateTo(DateUtils.subtractDuration(focusTargetDate, { days: 1 })),
|
|
@@ -15548,15 +15490,15 @@ var DayPicker = ({
|
|
|
15548
15490
|
},
|
|
15549
15491
|
[focusTargetDate, navigateTo]
|
|
15550
15492
|
);
|
|
15551
|
-
return /* @__PURE__ */
|
|
15552
|
-
/* @__PURE__ */
|
|
15553
|
-
weeks.map((week, index) => /* @__PURE__ */
|
|
15493
|
+
return /* @__PURE__ */ jsxs34("div", { "data-name": "day-picker-container", className, children: [
|
|
15494
|
+
/* @__PURE__ */ jsx63("div", { "data-name": "day-picker-header-row", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx63("div", { "data-name": "day-picker-header-item", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
|
|
15495
|
+
weeks.map((week, index) => /* @__PURE__ */ jsx63("div", { "data-name": "day-picker-body-row", children: week.map((date) => {
|
|
15554
15496
|
const isSelected = !!value && DateUtils.equalDate(value, date);
|
|
15555
15497
|
const isFocused = !!focusTargetDate && DateUtils.equalDate(focusTargetDate, date);
|
|
15556
15498
|
const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
|
|
15557
15499
|
const isSameMonth = date.getMonth() === month;
|
|
15558
15500
|
const isDayValid = DateUtils.between(date, start, end);
|
|
15559
|
-
return /* @__PURE__ */
|
|
15501
|
+
return /* @__PURE__ */ jsx63(
|
|
15560
15502
|
"div",
|
|
15561
15503
|
{
|
|
15562
15504
|
ref: isFocused ? selectedButtonRef : void 0,
|
|
@@ -15594,9 +15536,9 @@ var DayPicker = ({
|
|
|
15594
15536
|
};
|
|
15595
15537
|
|
|
15596
15538
|
// src/components/user-interaction/date/YearMonthPicker.tsx
|
|
15597
|
-
import { memo, useCallback as
|
|
15539
|
+
import { memo, useCallback as useCallback29, useEffect as useEffect33, useMemo as useMemo28, useRef as useRef29, useState as useState26 } from "react";
|
|
15598
15540
|
import clsx22 from "clsx";
|
|
15599
|
-
import { jsx as
|
|
15541
|
+
import { jsx as jsx64, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15600
15542
|
var YearRow = memo(function YearRow2({
|
|
15601
15543
|
year,
|
|
15602
15544
|
selectedMonthIndex,
|
|
@@ -15614,22 +15556,22 @@ var YearRow = memo(function YearRow2({
|
|
|
15614
15556
|
}
|
|
15615
15557
|
}, [isSelectedYear]);
|
|
15616
15558
|
const monthGrid = useMemo28(() => equalSizeGroups([...DateUtils.monthsList], 3), []);
|
|
15617
|
-
return /* @__PURE__ */
|
|
15559
|
+
return /* @__PURE__ */ jsxs35(
|
|
15618
15560
|
ExpandableRoot,
|
|
15619
15561
|
{
|
|
15620
15562
|
ref: isSelectedYear ? ref : void 0,
|
|
15621
15563
|
isExpanded,
|
|
15622
15564
|
onExpandedChange: setIsExpanded,
|
|
15623
15565
|
children: [
|
|
15624
|
-
/* @__PURE__ */
|
|
15625
|
-
/* @__PURE__ */
|
|
15566
|
+
/* @__PURE__ */ jsx64(ExpandableHeader, { className: clsx22("px-2", { "text-primary font-bold": isSelectedYear }), children: year }),
|
|
15567
|
+
/* @__PURE__ */ jsx64(ExpandableContent, { className: "gap-y-1 px-2 expandable-content-h-43", children: isExpanded && monthGrid.map((group, groupIdx) => /* @__PURE__ */ jsx64("div", { className: "flex-row-1", children: group.map((month) => {
|
|
15626
15568
|
const monthIndex = DateUtils.monthsList.indexOf(month);
|
|
15627
15569
|
const currentTimestamp = new Date(year, monthIndex).getTime();
|
|
15628
15570
|
const isAfterStart = minTimestamp === void 0 || currentTimestamp >= minTimestamp;
|
|
15629
15571
|
const isBeforeEnd = maxTimestamp === void 0 || currentTimestamp <= maxTimestamp;
|
|
15630
15572
|
const isValid = isAfterStart && isBeforeEnd;
|
|
15631
15573
|
const isSelectedMonth = monthIndex === selectedMonthIndex;
|
|
15632
|
-
return /* @__PURE__ */
|
|
15574
|
+
return /* @__PURE__ */ jsx64(
|
|
15633
15575
|
Button,
|
|
15634
15576
|
{
|
|
15635
15577
|
disabled: !isValid,
|
|
@@ -15684,11 +15626,11 @@ var YearMonthPicker = ({
|
|
|
15684
15626
|
if (!end) return;
|
|
15685
15627
|
return new Date(end.getFullYear(), end.getMonth() + 1, 0).getTime();
|
|
15686
15628
|
}, [end]);
|
|
15687
|
-
const handleSelect =
|
|
15629
|
+
const handleSelect = useCallback29((newDate) => {
|
|
15688
15630
|
setValue(newDate);
|
|
15689
15631
|
onEditCompleteStable(newDate);
|
|
15690
15632
|
}, [onEditCompleteStable, setValue]);
|
|
15691
|
-
return /* @__PURE__ */
|
|
15633
|
+
return /* @__PURE__ */ jsx64(
|
|
15692
15634
|
InfiniteScroll,
|
|
15693
15635
|
{
|
|
15694
15636
|
itemCount: years.length,
|
|
@@ -15698,7 +15640,7 @@ var YearMonthPicker = ({
|
|
|
15698
15640
|
const year = years[index];
|
|
15699
15641
|
const isSelectedYear = value.getFullYear() === year;
|
|
15700
15642
|
const selectedMonthIndex = isSelectedYear ? value.getMonth() : void 0;
|
|
15701
|
-
return /* @__PURE__ */
|
|
15643
|
+
return /* @__PURE__ */ jsx64(
|
|
15702
15644
|
YearRow,
|
|
15703
15645
|
{
|
|
15704
15646
|
year,
|
|
@@ -15716,7 +15658,7 @@ var YearMonthPicker = ({
|
|
|
15716
15658
|
};
|
|
15717
15659
|
|
|
15718
15660
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
15719
|
-
import { jsx as
|
|
15661
|
+
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
15720
15662
|
var DatePicker = ({
|
|
15721
15663
|
value: controlledValue,
|
|
15722
15664
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15739,9 +15681,9 @@ var DatePicker = ({
|
|
|
15739
15681
|
});
|
|
15740
15682
|
const [displayedMonth, setDisplayedMonth] = useState27(new Date(value.getFullYear(), value.getMonth(), 1));
|
|
15741
15683
|
const [displayMode, setDisplayMode] = useState27(initialDisplay);
|
|
15742
|
-
return /* @__PURE__ */
|
|
15743
|
-
/* @__PURE__ */
|
|
15744
|
-
/* @__PURE__ */
|
|
15684
|
+
return /* @__PURE__ */ jsxs36("div", { className: clsx23("flex-col-3", className), children: [
|
|
15685
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-row-2 items-center justify-between", children: [
|
|
15686
|
+
/* @__PURE__ */ jsxs36(
|
|
15745
15687
|
Button,
|
|
15746
15688
|
{
|
|
15747
15689
|
size: "sm",
|
|
@@ -15752,12 +15694,12 @@ var DatePicker = ({
|
|
|
15752
15694
|
onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
|
|
15753
15695
|
children: [
|
|
15754
15696
|
`${new Intl.DateTimeFormat(LocalizationUtil.localToLanguage(locale), { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
|
|
15755
|
-
/* @__PURE__ */
|
|
15697
|
+
/* @__PURE__ */ jsx65(ChevronDown4, { size: 16 })
|
|
15756
15698
|
]
|
|
15757
15699
|
}
|
|
15758
15700
|
),
|
|
15759
|
-
displayMode === "day" && /* @__PURE__ */
|
|
15760
|
-
/* @__PURE__ */
|
|
15701
|
+
displayMode === "day" && /* @__PURE__ */ jsxs36("div", { className: "flex-row-2 justify-end", children: [
|
|
15702
|
+
/* @__PURE__ */ jsx65(
|
|
15761
15703
|
IconButton,
|
|
15762
15704
|
{
|
|
15763
15705
|
tooltip: translation("time.today"),
|
|
@@ -15769,10 +15711,10 @@ var DatePicker = ({
|
|
|
15769
15711
|
setValue(newDate);
|
|
15770
15712
|
setDisplayedMonth(newDate);
|
|
15771
15713
|
},
|
|
15772
|
-
children: /* @__PURE__ */
|
|
15714
|
+
children: /* @__PURE__ */ jsx65(Calendar, { className: "size-5" })
|
|
15773
15715
|
}
|
|
15774
15716
|
),
|
|
15775
|
-
/* @__PURE__ */
|
|
15717
|
+
/* @__PURE__ */ jsx65(
|
|
15776
15718
|
IconButton,
|
|
15777
15719
|
{
|
|
15778
15720
|
tooltip: translation("time.previousMonth"),
|
|
@@ -15781,10 +15723,10 @@ var DatePicker = ({
|
|
|
15781
15723
|
onClick: () => {
|
|
15782
15724
|
setDisplayedMonth(DateUtils.subtractDuration(displayedMonth, { months: 1 }));
|
|
15783
15725
|
},
|
|
15784
|
-
children: /* @__PURE__ */
|
|
15726
|
+
children: /* @__PURE__ */ jsx65(ArrowUp, { size: 20 })
|
|
15785
15727
|
}
|
|
15786
15728
|
),
|
|
15787
|
-
/* @__PURE__ */
|
|
15729
|
+
/* @__PURE__ */ jsx65(
|
|
15788
15730
|
IconButton,
|
|
15789
15731
|
{
|
|
15790
15732
|
tooltip: translation("time.nextMonth"),
|
|
@@ -15793,12 +15735,12 @@ var DatePicker = ({
|
|
|
15793
15735
|
onClick: () => {
|
|
15794
15736
|
setDisplayedMonth(DateUtils.addDuration(displayedMonth, { months: 1 }));
|
|
15795
15737
|
},
|
|
15796
|
-
children: /* @__PURE__ */
|
|
15738
|
+
children: /* @__PURE__ */ jsx65(ArrowDown, { size: 20 })
|
|
15797
15739
|
}
|
|
15798
15740
|
)
|
|
15799
15741
|
] })
|
|
15800
15742
|
] }),
|
|
15801
|
-
displayMode === "yearMonth" ? /* @__PURE__ */
|
|
15743
|
+
displayMode === "yearMonth" ? /* @__PURE__ */ jsx65(
|
|
15802
15744
|
YearMonthPicker,
|
|
15803
15745
|
{
|
|
15804
15746
|
...yearMonthPickerProps,
|
|
@@ -15815,7 +15757,7 @@ var DatePicker = ({
|
|
|
15815
15757
|
},
|
|
15816
15758
|
className: "h-60 max-h-60"
|
|
15817
15759
|
}
|
|
15818
|
-
) : /* @__PURE__ */
|
|
15760
|
+
) : /* @__PURE__ */ jsx65(
|
|
15819
15761
|
DayPicker,
|
|
15820
15762
|
{
|
|
15821
15763
|
...dayPickerProps,
|
|
@@ -15834,7 +15776,7 @@ var DatePicker = ({
|
|
|
15834
15776
|
};
|
|
15835
15777
|
|
|
15836
15778
|
// src/components/user-interaction/date/DateTimePicker.tsx
|
|
15837
|
-
import { jsx as
|
|
15779
|
+
import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
15838
15780
|
var DateTimePicker = ({
|
|
15839
15781
|
value: controlledValue,
|
|
15840
15782
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15862,7 +15804,7 @@ var DateTimePicker = ({
|
|
|
15862
15804
|
let dateDisplay;
|
|
15863
15805
|
let timeDisplay;
|
|
15864
15806
|
if (useDate) {
|
|
15865
|
-
dateDisplay = /* @__PURE__ */
|
|
15807
|
+
dateDisplay = /* @__PURE__ */ jsx66(
|
|
15866
15808
|
DatePicker,
|
|
15867
15809
|
{
|
|
15868
15810
|
...datePickerProps,
|
|
@@ -15878,7 +15820,7 @@ var DateTimePicker = ({
|
|
|
15878
15820
|
);
|
|
15879
15821
|
}
|
|
15880
15822
|
if (useTime) {
|
|
15881
|
-
timeDisplay = /* @__PURE__ */
|
|
15823
|
+
timeDisplay = /* @__PURE__ */ jsx66(
|
|
15882
15824
|
TimePicker,
|
|
15883
15825
|
{
|
|
15884
15826
|
...timePickerProps,
|
|
@@ -15893,7 +15835,7 @@ var DateTimePicker = ({
|
|
|
15893
15835
|
}
|
|
15894
15836
|
);
|
|
15895
15837
|
}
|
|
15896
|
-
return /* @__PURE__ */
|
|
15838
|
+
return /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
|
|
15897
15839
|
dateDisplay,
|
|
15898
15840
|
timeDisplay
|
|
15899
15841
|
] });
|
|
@@ -15901,7 +15843,7 @@ var DateTimePicker = ({
|
|
|
15901
15843
|
|
|
15902
15844
|
// src/components/user-interaction/date/DateTimePickerDialog.tsx
|
|
15903
15845
|
import { useEffect as useEffect34, useState as useState28 } from "react";
|
|
15904
|
-
import { Fragment as Fragment6, jsx as
|
|
15846
|
+
import { Fragment as Fragment6, jsx as jsx67, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
15905
15847
|
var DateTimePickerDialog = ({
|
|
15906
15848
|
initialValue = null,
|
|
15907
15849
|
value,
|
|
@@ -15932,8 +15874,8 @@ var DateTimePickerDialog = ({
|
|
|
15932
15874
|
useEffect34(() => {
|
|
15933
15875
|
setPickerState(state ?? /* @__PURE__ */ new Date());
|
|
15934
15876
|
}, [state]);
|
|
15935
|
-
return /* @__PURE__ */
|
|
15936
|
-
/* @__PURE__ */
|
|
15877
|
+
return /* @__PURE__ */ jsxs38(Fragment6, { children: [
|
|
15878
|
+
/* @__PURE__ */ jsx67("div", { className: "flex-row-2 justify-center w-full py-1", children: /* @__PURE__ */ jsx67(
|
|
15937
15879
|
"span",
|
|
15938
15880
|
{
|
|
15939
15881
|
id: labelId,
|
|
@@ -15941,7 +15883,7 @@ var DateTimePickerDialog = ({
|
|
|
15941
15883
|
children: label ?? translation("sDateTimeSelect", { datetimeMode: mode })
|
|
15942
15884
|
}
|
|
15943
15885
|
) }),
|
|
15944
|
-
/* @__PURE__ */
|
|
15886
|
+
/* @__PURE__ */ jsx67(
|
|
15945
15887
|
DateTimePicker,
|
|
15946
15888
|
{
|
|
15947
15889
|
...pickerProps,
|
|
@@ -15960,8 +15902,8 @@ var DateTimePickerDialog = ({
|
|
|
15960
15902
|
precision
|
|
15961
15903
|
}
|
|
15962
15904
|
),
|
|
15963
|
-
/* @__PURE__ */
|
|
15964
|
-
/* @__PURE__ */
|
|
15905
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex-row-2 justify-end", children: [
|
|
15906
|
+
/* @__PURE__ */ jsx67(Visibility, { isVisible: allowRemove && !!state, children: /* @__PURE__ */ jsx67(
|
|
15965
15907
|
Button,
|
|
15966
15908
|
{
|
|
15967
15909
|
size: "md",
|
|
@@ -15974,7 +15916,7 @@ var DateTimePickerDialog = ({
|
|
|
15974
15916
|
children: translation("clear")
|
|
15975
15917
|
}
|
|
15976
15918
|
) }),
|
|
15977
|
-
/* @__PURE__ */
|
|
15919
|
+
/* @__PURE__ */ jsx67(Visibility, { isVisible: !state, children: /* @__PURE__ */ jsx67(
|
|
15978
15920
|
Button,
|
|
15979
15921
|
{
|
|
15980
15922
|
size: "md",
|
|
@@ -15987,7 +15929,7 @@ var DateTimePickerDialog = ({
|
|
|
15987
15929
|
children: translation("cancel")
|
|
15988
15930
|
}
|
|
15989
15931
|
) }),
|
|
15990
|
-
/* @__PURE__ */
|
|
15932
|
+
/* @__PURE__ */ jsx67(
|
|
15991
15933
|
Button,
|
|
15992
15934
|
{
|
|
15993
15935
|
size: "md",
|
|
@@ -16003,7 +15945,7 @@ var DateTimePickerDialog = ({
|
|
|
16003
15945
|
};
|
|
16004
15946
|
|
|
16005
15947
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
16006
|
-
import { Fragment as Fragment7, jsx as
|
|
15948
|
+
import { Fragment as Fragment7, jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
16007
15949
|
var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
16008
15950
|
id: inputId,
|
|
16009
15951
|
value,
|
|
@@ -16042,16 +15984,14 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16042
15984
|
const [dialogValue, setDialogValue] = useState29(state);
|
|
16043
15985
|
const [stringInputState, setStringInputState] = useState29({
|
|
16044
15986
|
state: state ? DateUtils.toInputString(state, mode, precision) : "",
|
|
16045
|
-
date: void 0
|
|
15987
|
+
date: void 0,
|
|
15988
|
+
mode
|
|
16046
15989
|
});
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
});
|
|
16053
|
-
}, [mode, state]);
|
|
16054
|
-
const changeOpenWrapper = useCallback31((isOpen2) => {
|
|
15990
|
+
const safeInputString = useMemo29(() => {
|
|
15991
|
+
if (!state) return "";
|
|
15992
|
+
return stringInputState.mode !== mode ? DateUtils.toInputString(state, mode, precision) : stringInputState.state;
|
|
15993
|
+
}, [stringInputState.mode, stringInputState.state, mode, state, precision]);
|
|
15994
|
+
const changeOpenWrapper = useCallback30((isOpen2) => {
|
|
16055
15995
|
onDialogOpeningChange?.(isOpen2);
|
|
16056
15996
|
setIsOpen(isOpen2);
|
|
16057
15997
|
}, [onDialogOpeningChange]);
|
|
@@ -16072,21 +16012,26 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16072
16012
|
restartTimer,
|
|
16073
16013
|
clearTimer
|
|
16074
16014
|
} = useDelay({ delay: 2e3, disabled: disabled || readOnly });
|
|
16075
|
-
return /* @__PURE__ */
|
|
16076
|
-
/* @__PURE__ */
|
|
16077
|
-
/* @__PURE__ */
|
|
16015
|
+
return /* @__PURE__ */ jsxs39(Fragment7, { children: [
|
|
16016
|
+
/* @__PURE__ */ jsxs39("div", { ...containerProps, className: clsx24("relative w-full", containerProps?.className), children: [
|
|
16017
|
+
/* @__PURE__ */ jsx68(
|
|
16078
16018
|
"input",
|
|
16079
16019
|
{
|
|
16080
16020
|
...props,
|
|
16081
16021
|
ref: innerRef,
|
|
16082
16022
|
id: ids.input,
|
|
16083
|
-
value:
|
|
16023
|
+
value: safeInputString,
|
|
16084
16024
|
onClick: (event) => {
|
|
16085
16025
|
event.preventDefault();
|
|
16086
16026
|
},
|
|
16087
16027
|
onFocus: (event) => {
|
|
16088
16028
|
event.preventDefault();
|
|
16089
16029
|
},
|
|
16030
|
+
onKeyDown: (event) => {
|
|
16031
|
+
if (event.key === " ") {
|
|
16032
|
+
event.preventDefault();
|
|
16033
|
+
}
|
|
16034
|
+
},
|
|
16090
16035
|
onChange: (event) => {
|
|
16091
16036
|
const date = new Date(event.target.value ?? "");
|
|
16092
16037
|
const isValid = !isNaN(date.getTime());
|
|
@@ -16101,7 +16046,8 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16101
16046
|
}
|
|
16102
16047
|
setStringInputState({
|
|
16103
16048
|
state: event.target.value,
|
|
16104
|
-
date: isValid ? date : void 0
|
|
16049
|
+
date: isValid ? date : void 0,
|
|
16050
|
+
mode
|
|
16105
16051
|
});
|
|
16106
16052
|
},
|
|
16107
16053
|
onBlur: (event) => {
|
|
@@ -16116,7 +16062,8 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16116
16062
|
}
|
|
16117
16063
|
setStringInputState({
|
|
16118
16064
|
state: state ? DateUtils.toInputString(state, mode) : "",
|
|
16119
|
-
date: void 0
|
|
16065
|
+
date: void 0,
|
|
16066
|
+
mode
|
|
16120
16067
|
});
|
|
16121
16068
|
}
|
|
16122
16069
|
},
|
|
@@ -16127,9 +16074,9 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16127
16074
|
...PropsUtil.aria.interactionStates({ disabled, readOnly, invalid, required }, props)
|
|
16128
16075
|
}
|
|
16129
16076
|
),
|
|
16130
|
-
/* @__PURE__ */
|
|
16077
|
+
/* @__PURE__ */ jsxs39("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex-row-0", children: [
|
|
16131
16078
|
actions,
|
|
16132
|
-
/* @__PURE__ */
|
|
16079
|
+
/* @__PURE__ */ jsx68(Visibility, { isVisible: !readOnly, children: /* @__PURE__ */ jsx68(
|
|
16133
16080
|
IconButton,
|
|
16134
16081
|
{
|
|
16135
16082
|
tooltip: translation("sDateTimeSelect", { datetimeMode: mode }),
|
|
@@ -16143,12 +16090,12 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16143
16090
|
"aria-haspopup": "dialog",
|
|
16144
16091
|
"aria-expanded": isOpen,
|
|
16145
16092
|
"aria-controls": isOpen ? ids.popup : void 0,
|
|
16146
|
-
children: /* @__PURE__ */
|
|
16093
|
+
children: /* @__PURE__ */ jsx68(CalendarIcon, { className: "size-5" })
|
|
16147
16094
|
}
|
|
16148
16095
|
) })
|
|
16149
16096
|
] })
|
|
16150
16097
|
] }),
|
|
16151
|
-
/* @__PURE__ */
|
|
16098
|
+
/* @__PURE__ */ jsx68(
|
|
16152
16099
|
PopUp,
|
|
16153
16100
|
{
|
|
16154
16101
|
id: ids.popup,
|
|
@@ -16167,7 +16114,7 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16167
16114
|
role: "dialog",
|
|
16168
16115
|
"aria-labelledby": ids.label,
|
|
16169
16116
|
className: "flex-col-2 p-2",
|
|
16170
|
-
children: /* @__PURE__ */
|
|
16117
|
+
children: /* @__PURE__ */ jsx68(
|
|
16171
16118
|
DateTimePickerDialog,
|
|
16172
16119
|
{
|
|
16173
16120
|
value: dialogValue,
|
|
@@ -16200,7 +16147,7 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16200
16147
|
import { forwardRef as forwardRef22 } from "react";
|
|
16201
16148
|
|
|
16202
16149
|
// src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx
|
|
16203
|
-
import { useCallback as
|
|
16150
|
+
import { useCallback as useCallback33, useEffect as useEffect37, useId as useId15, useMemo as useMemo32, useState as useState31 } from "react";
|
|
16204
16151
|
|
|
16205
16152
|
// src/components/user-interaction/MultiSelect/MultiSelectContext.tsx
|
|
16206
16153
|
import { createContext as createContext15, useContext as useContext17 } from "react";
|
|
@@ -16213,14 +16160,14 @@ function useMultiSelectContext() {
|
|
|
16213
16160
|
|
|
16214
16161
|
// src/components/user-interaction/MultiSelect/useMultiSelect.ts
|
|
16215
16162
|
import {
|
|
16216
|
-
useCallback as
|
|
16163
|
+
useCallback as useCallback32,
|
|
16217
16164
|
useEffect as useEffect36,
|
|
16218
16165
|
useMemo as useMemo31,
|
|
16219
16166
|
useState as useState30
|
|
16220
16167
|
} from "react";
|
|
16221
16168
|
|
|
16222
16169
|
// src/hooks/useMultiSelection.ts
|
|
16223
|
-
import { useCallback as
|
|
16170
|
+
import { useCallback as useCallback31, useMemo as useMemo30 } from "react";
|
|
16224
16171
|
function useMultiSelection({
|
|
16225
16172
|
options: optionsList,
|
|
16226
16173
|
value,
|
|
@@ -16234,8 +16181,8 @@ function useMultiSelection({
|
|
|
16234
16181
|
defaultValue: [...initialSelection],
|
|
16235
16182
|
isControlled
|
|
16236
16183
|
});
|
|
16237
|
-
const isSelected =
|
|
16238
|
-
const toggleSelection =
|
|
16184
|
+
const isSelected = useCallback31((id) => selection.includes(id), [selection]);
|
|
16185
|
+
const toggleSelection = useCallback31(
|
|
16239
16186
|
(id) => {
|
|
16240
16187
|
const option = optionsList.find((o) => o.id === id);
|
|
16241
16188
|
if (!option || option.disabled) return;
|
|
@@ -16243,7 +16190,7 @@ function useMultiSelection({
|
|
|
16243
16190
|
},
|
|
16244
16191
|
[optionsList, setSelection]
|
|
16245
16192
|
);
|
|
16246
|
-
const setSelectionValue =
|
|
16193
|
+
const setSelectionValue = useCallback31(
|
|
16247
16194
|
(next) => setSelection(Array.from(next)),
|
|
16248
16195
|
[setSelection]
|
|
16249
16196
|
);
|
|
@@ -16287,7 +16234,7 @@ function useMultiSelect({
|
|
|
16287
16234
|
const { searchResult: visibleOptions } = useSearch({
|
|
16288
16235
|
items: options,
|
|
16289
16236
|
searchQuery,
|
|
16290
|
-
toTags:
|
|
16237
|
+
toTags: useCallback32((o) => [o.label ?? ""], [])
|
|
16291
16238
|
});
|
|
16292
16239
|
const visibleOptionIds = useMemo31(
|
|
16293
16240
|
() => visibleOptions.map((o) => o.id),
|
|
@@ -16306,7 +16253,7 @@ function useMultiSelect({
|
|
|
16306
16253
|
options: enabledOptions,
|
|
16307
16254
|
resetTimer: typeAheadResetMs,
|
|
16308
16255
|
toString: (o) => o.label ?? "",
|
|
16309
|
-
onResultChange:
|
|
16256
|
+
onResultChange: useCallback32(
|
|
16310
16257
|
(option) => {
|
|
16311
16258
|
if (option) listNav.highlight(option.id);
|
|
16312
16259
|
},
|
|
@@ -16317,11 +16264,11 @@ function useMultiSelect({
|
|
|
16317
16264
|
useEffect36(() => {
|
|
16318
16265
|
if (!isOpen) typeAheadReset();
|
|
16319
16266
|
}, [isOpen, typeAheadReset]);
|
|
16320
|
-
const highlightItem =
|
|
16267
|
+
const highlightItem = useCallback32((id) => {
|
|
16321
16268
|
if (!enabledOptions.some((o) => o.id === id)) return;
|
|
16322
16269
|
listNavHighlight(id);
|
|
16323
16270
|
}, [enabledOptions, listNavHighlight]);
|
|
16324
|
-
const toggleSelectionValue =
|
|
16271
|
+
const toggleSelectionValue = useCallback32((id, newIsSelected) => {
|
|
16325
16272
|
const next = newIsSelected ?? !isSelected(id);
|
|
16326
16273
|
if (next) {
|
|
16327
16274
|
toggleSelection(id);
|
|
@@ -16330,7 +16277,7 @@ function useMultiSelect({
|
|
|
16330
16277
|
}
|
|
16331
16278
|
highlightItem(id);
|
|
16332
16279
|
}, [toggleSelection, setSelection, highlightItem, isSelected, selection]);
|
|
16333
|
-
const setIsOpenWrapper =
|
|
16280
|
+
const setIsOpenWrapper = useCallback32(
|
|
16334
16281
|
(open, behavior) => {
|
|
16335
16282
|
setIsOpen(open);
|
|
16336
16283
|
behavior = behavior ?? "first";
|
|
@@ -16361,7 +16308,7 @@ function useMultiSelect({
|
|
|
16361
16308
|
enabledOptions
|
|
16362
16309
|
]
|
|
16363
16310
|
);
|
|
16364
|
-
const toggleOpenWrapper =
|
|
16311
|
+
const toggleOpenWrapper = useCallback32(
|
|
16365
16312
|
(behavior) => {
|
|
16366
16313
|
setIsOpenWrapper(!isOpen, behavior);
|
|
16367
16314
|
},
|
|
@@ -16427,7 +16374,7 @@ function useMultiSelect({
|
|
|
16427
16374
|
}
|
|
16428
16375
|
|
|
16429
16376
|
// src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx
|
|
16430
|
-
import { jsx as
|
|
16377
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
16431
16378
|
function MultiSelectRoot({
|
|
16432
16379
|
children,
|
|
16433
16380
|
value,
|
|
@@ -16453,7 +16400,7 @@ function MultiSelectRoot({
|
|
|
16453
16400
|
listbox: "multi-select-listbox-" + generatedId,
|
|
16454
16401
|
searchInput: "multi-select-search-" + generatedId
|
|
16455
16402
|
});
|
|
16456
|
-
const registerOption =
|
|
16403
|
+
const registerOption = useCallback33((item) => {
|
|
16457
16404
|
setOptions((prev) => {
|
|
16458
16405
|
const next = prev.filter((o) => o.id !== item.id);
|
|
16459
16406
|
next.push(item);
|
|
@@ -16462,7 +16409,7 @@ function MultiSelectRoot({
|
|
|
16462
16409
|
});
|
|
16463
16410
|
return () => setOptions((prev) => prev.filter((o) => o.id !== item.id));
|
|
16464
16411
|
}, []);
|
|
16465
|
-
const registerTrigger =
|
|
16412
|
+
const registerTrigger = useCallback33((ref) => {
|
|
16466
16413
|
setTriggerRef(ref);
|
|
16467
16414
|
return () => setTriggerRef(null);
|
|
16468
16415
|
}, []);
|
|
@@ -16485,14 +16432,14 @@ function MultiSelectRoot({
|
|
|
16485
16432
|
if (initialValue == null) return [];
|
|
16486
16433
|
return initialValue.map((v) => options.find((o) => compare(o.value, v))?.id).filter((id) => id !== void 0);
|
|
16487
16434
|
}, [options, initialValue, compare]);
|
|
16488
|
-
const onValueChangeStable =
|
|
16435
|
+
const onValueChangeStable = useCallback33(
|
|
16489
16436
|
(ids2) => {
|
|
16490
16437
|
const values = ids2.map((id) => idToOptionMap[id]?.value).filter((v) => v != null);
|
|
16491
16438
|
onValueChange?.(values);
|
|
16492
16439
|
},
|
|
16493
16440
|
[idToOptionMap, onValueChange]
|
|
16494
16441
|
);
|
|
16495
|
-
const onEditCompleteStable =
|
|
16442
|
+
const onEditCompleteStable = useCallback33(
|
|
16496
16443
|
(ids2) => {
|
|
16497
16444
|
const values = ids2.map((id) => idToOptionMap[id]?.value).filter((v) => v != null);
|
|
16498
16445
|
onEditComplete?.(values);
|
|
@@ -16568,7 +16515,7 @@ function MultiSelectRoot({
|
|
|
16568
16515
|
registerTrigger,
|
|
16569
16516
|
showSearch
|
|
16570
16517
|
]);
|
|
16571
|
-
return /* @__PURE__ */
|
|
16518
|
+
return /* @__PURE__ */ jsx69(MultiSelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx69(
|
|
16572
16519
|
PopUpContext.Provider,
|
|
16573
16520
|
{
|
|
16574
16521
|
value: {
|
|
@@ -16591,7 +16538,7 @@ import { forwardRef as forwardRef20, useEffect as useEffect39, useImperativeHand
|
|
|
16591
16538
|
import clsx25 from "clsx";
|
|
16592
16539
|
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
16593
16540
|
import { createContext as createContext16, forwardRef as forwardRef19, useContext as useContext18, useEffect as useEffect38, useId as useId16, useRef as useRef31 } from "react";
|
|
16594
|
-
import { jsx as
|
|
16541
|
+
import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
16595
16542
|
var MultiSelectOptionDisplayContext = createContext16(null);
|
|
16596
16543
|
function useMultiSelectOptionDisplayLocation() {
|
|
16597
16544
|
const context = useContext18(MultiSelectOptionDisplayContext);
|
|
@@ -16630,7 +16577,7 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16630
16577
|
const isHighlighted = context.highlightedId === optionId;
|
|
16631
16578
|
const isSelected = context.selectedIds.includes(optionId);
|
|
16632
16579
|
const isVisible = context.visibleOptionIds.includes(optionId);
|
|
16633
|
-
return /* @__PURE__ */
|
|
16580
|
+
return /* @__PURE__ */ jsxs40(
|
|
16634
16581
|
"li",
|
|
16635
16582
|
{
|
|
16636
16583
|
...props,
|
|
@@ -16663,15 +16610,15 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16663
16610
|
}
|
|
16664
16611
|
},
|
|
16665
16612
|
children: [
|
|
16666
|
-
iconAppearanceResolved === "left" && /* @__PURE__ */
|
|
16613
|
+
iconAppearanceResolved === "left" && /* @__PURE__ */ jsx70(
|
|
16667
16614
|
CheckIcon2,
|
|
16668
16615
|
{
|
|
16669
16616
|
className: clsx25("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
16670
16617
|
"aria-hidden": true
|
|
16671
16618
|
}
|
|
16672
16619
|
),
|
|
16673
|
-
/* @__PURE__ */
|
|
16674
|
-
iconAppearanceResolved === "right" && /* @__PURE__ */
|
|
16620
|
+
/* @__PURE__ */ jsx70(MultiSelectOptionDisplayContext.Provider, { value: "list", children: display }),
|
|
16621
|
+
iconAppearanceResolved === "right" && /* @__PURE__ */ jsx70(
|
|
16675
16622
|
CheckIcon2,
|
|
16676
16623
|
{
|
|
16677
16624
|
className: clsx25("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
@@ -16684,7 +16631,7 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16684
16631
|
});
|
|
16685
16632
|
|
|
16686
16633
|
// src/components/user-interaction/MultiSelect/MultiSelectButton.tsx
|
|
16687
|
-
import { jsx as
|
|
16634
|
+
import { jsx as jsx71, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
16688
16635
|
var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
16689
16636
|
id,
|
|
16690
16637
|
placeholder,
|
|
@@ -16711,7 +16658,7 @@ var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
|
16711
16658
|
const invalid = context.invalid;
|
|
16712
16659
|
const hasValue = context.value.length > 0;
|
|
16713
16660
|
const selectedOptions = context.selectedIds.map((id2) => context.idToOptionMap[id2]).filter(Boolean);
|
|
16714
|
-
return /* @__PURE__ */
|
|
16661
|
+
return /* @__PURE__ */ jsxs41(
|
|
16715
16662
|
"div",
|
|
16716
16663
|
{
|
|
16717
16664
|
...props,
|
|
@@ -16755,20 +16702,20 @@ var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
|
16755
16702
|
"aria-expanded": context.isOpen,
|
|
16756
16703
|
"aria-controls": context.isOpen ? context.config.ids.content : void 0,
|
|
16757
16704
|
children: [
|
|
16758
|
-
/* @__PURE__ */
|
|
16705
|
+
/* @__PURE__ */ jsx71(MultiSelectOptionDisplayContext.Provider, { value: "trigger", children: hasValue ? selectedDisplay?.(context.value) ?? /* @__PURE__ */ jsx71("div", { className: "flex flex-wrap gap-x-1 gap-y-2", children: selectedOptions.map((opt, index) => /* @__PURE__ */ jsxs41("span", { children: [
|
|
16759
16706
|
opt.display,
|
|
16760
|
-
index < selectedOptions.length - 1 && /* @__PURE__ */
|
|
16707
|
+
index < selectedOptions.length - 1 && /* @__PURE__ */ jsx71("span", { children: "," })
|
|
16761
16708
|
] }, opt.id)) }) : placeholder ?? translation("clickToSelect") }),
|
|
16762
|
-
!hideExpansionIcon && /* @__PURE__ */
|
|
16709
|
+
!hideExpansionIcon && /* @__PURE__ */ jsx71(ExpansionIcon, { isExpanded: context.isOpen })
|
|
16763
16710
|
]
|
|
16764
16711
|
}
|
|
16765
16712
|
);
|
|
16766
16713
|
});
|
|
16767
16714
|
|
|
16768
16715
|
// src/components/user-interaction/MultiSelect/MultiSelectContent.tsx
|
|
16769
|
-
import { forwardRef as forwardRef21, useCallback as
|
|
16716
|
+
import { forwardRef as forwardRef21, useCallback as useCallback34, useEffect as useEffect40, useImperativeHandle as useImperativeHandle14, useRef as useRef33 } from "react";
|
|
16770
16717
|
import clsx26 from "clsx";
|
|
16771
|
-
import { jsx as
|
|
16718
|
+
import { jsx as jsx72, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
16772
16719
|
var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options, showSearch: showSearchOverride, searchInputProps, ...props }, ref) {
|
|
16773
16720
|
const translation = useHightideTranslation();
|
|
16774
16721
|
const innerRef = useRef33(null);
|
|
@@ -16782,7 +16729,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16782
16729
|
}, [id, setIds]);
|
|
16783
16730
|
const showSearch = showSearchOverride ?? context.search.hasSearch;
|
|
16784
16731
|
const listboxAriaLabel = showSearch ? translation("searchResults") : void 0;
|
|
16785
|
-
const keyHandler =
|
|
16732
|
+
const keyHandler = useCallback34(
|
|
16786
16733
|
(event) => {
|
|
16787
16734
|
switch (event.key) {
|
|
16788
16735
|
case "ArrowDown":
|
|
@@ -16819,7 +16766,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16819
16766
|
},
|
|
16820
16767
|
[showSearch, handleTypeaheadKey, toggleSelection, highlightedId, highlightNext, highlightPrevious, highlightFirst, highlightLast]
|
|
16821
16768
|
);
|
|
16822
|
-
return /* @__PURE__ */
|
|
16769
|
+
return /* @__PURE__ */ jsxs42(
|
|
16823
16770
|
PopUp,
|
|
16824
16771
|
{
|
|
16825
16772
|
...props,
|
|
@@ -16835,7 +16782,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16835
16782
|
"aria-labelledby": context.config.ids.trigger,
|
|
16836
16783
|
className: clsx26("gap-y-1", props.className),
|
|
16837
16784
|
children: [
|
|
16838
|
-
showSearch && /* @__PURE__ */
|
|
16785
|
+
showSearch && /* @__PURE__ */ jsx72(
|
|
16839
16786
|
Input,
|
|
16840
16787
|
{
|
|
16841
16788
|
...searchInputProps,
|
|
@@ -16854,7 +16801,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16854
16801
|
className: clsx26("mx-2 mt-2 shrink-0", searchInputProps?.className)
|
|
16855
16802
|
}
|
|
16856
16803
|
),
|
|
16857
|
-
/* @__PURE__ */
|
|
16804
|
+
/* @__PURE__ */ jsxs42(
|
|
16858
16805
|
"ul",
|
|
16859
16806
|
{
|
|
16860
16807
|
ref: innerRef,
|
|
@@ -16869,7 +16816,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16869
16816
|
className: clsx26("flex-col-1 p-2 overflow-auto"),
|
|
16870
16817
|
children: [
|
|
16871
16818
|
props.children,
|
|
16872
|
-
/* @__PURE__ */
|
|
16819
|
+
/* @__PURE__ */ jsx72(Visibility, { isVisible: showSearch, children: /* @__PURE__ */ jsx72(
|
|
16873
16820
|
"li",
|
|
16874
16821
|
{
|
|
16875
16822
|
role: "option",
|
|
@@ -16895,12 +16842,12 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16895
16842
|
});
|
|
16896
16843
|
|
|
16897
16844
|
// src/components/user-interaction/MultiSelect/MultiSelect.tsx
|
|
16898
|
-
import { jsx as
|
|
16845
|
+
import { jsx as jsx73, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
16899
16846
|
var MultiSelect = forwardRef22(
|
|
16900
16847
|
function MultiSelect2({ children, contentPanelProps, buttonProps, ...props }, ref) {
|
|
16901
|
-
return /* @__PURE__ */
|
|
16902
|
-
/* @__PURE__ */
|
|
16903
|
-
/* @__PURE__ */
|
|
16848
|
+
return /* @__PURE__ */ jsxs43(MultiSelectRoot, { ...props, children: [
|
|
16849
|
+
/* @__PURE__ */ jsx73(MultiSelectButton, { ref, ...buttonProps }),
|
|
16850
|
+
/* @__PURE__ */ jsx73(MultiSelectContent, { ...contentPanelProps, children })
|
|
16904
16851
|
] });
|
|
16905
16852
|
}
|
|
16906
16853
|
);
|
|
@@ -16909,19 +16856,19 @@ var MultiSelect = forwardRef22(
|
|
|
16909
16856
|
import clsx27 from "clsx";
|
|
16910
16857
|
|
|
16911
16858
|
// src/components/user-interaction/data/FilterOperatorLabel.tsx
|
|
16912
|
-
import { jsxs as
|
|
16859
|
+
import { jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16913
16860
|
var FilterOperatorLabel = ({ operator }) => {
|
|
16914
16861
|
const translation = useHightideTranslation();
|
|
16915
16862
|
const { icon, translationKey } = FilterOperatorUtils.getInfo(operator);
|
|
16916
16863
|
const label = typeof translationKey === "string" ? translation(translationKey) : translationKey;
|
|
16917
|
-
return /* @__PURE__ */
|
|
16864
|
+
return /* @__PURE__ */ jsxs44("div", { className: "flex-row-1 items-center gap-2", children: [
|
|
16918
16865
|
icon,
|
|
16919
16866
|
label
|
|
16920
16867
|
] });
|
|
16921
16868
|
};
|
|
16922
16869
|
|
|
16923
16870
|
// src/components/user-interaction/data/FilterPopUp.tsx
|
|
16924
|
-
import { jsx as
|
|
16871
|
+
import { jsx as jsx74, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
16925
16872
|
var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
16926
16873
|
children,
|
|
16927
16874
|
name,
|
|
@@ -16929,21 +16876,31 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16929
16876
|
onOperatorChange,
|
|
16930
16877
|
onRemove,
|
|
16931
16878
|
allowedOperators,
|
|
16879
|
+
operatorOverrides,
|
|
16932
16880
|
noParameterRequired = false,
|
|
16933
16881
|
...props
|
|
16934
16882
|
}, ref) {
|
|
16935
16883
|
const translation = useHightideTranslation();
|
|
16936
|
-
|
|
16884
|
+
const operators = useMemo33(() => {
|
|
16885
|
+
if (!operatorOverrides || operatorOverrides.length === 0) return allowedOperators;
|
|
16886
|
+
return allowedOperators.filter((op) => operatorOverrides.includes(op));
|
|
16887
|
+
}, [allowedOperators, operatorOverrides]);
|
|
16888
|
+
useEffect41(() => {
|
|
16889
|
+
if (operators.length === 0) {
|
|
16890
|
+
onRemove();
|
|
16891
|
+
}
|
|
16892
|
+
}, [operators, onRemove]);
|
|
16893
|
+
return /* @__PURE__ */ jsxs45(
|
|
16937
16894
|
PopUp,
|
|
16938
16895
|
{
|
|
16939
16896
|
ref,
|
|
16940
16897
|
...props,
|
|
16941
16898
|
className: clsx27("flex-col-3 p-3 relative min-w-64", props.className),
|
|
16942
16899
|
children: [
|
|
16943
|
-
/* @__PURE__ */
|
|
16944
|
-
/* @__PURE__ */
|
|
16945
|
-
/* @__PURE__ */
|
|
16946
|
-
/* @__PURE__ */
|
|
16900
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-row-4 justify-between w-full", children: [
|
|
16901
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-row-0.5 items-center", children: [
|
|
16902
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-sm text-description", children: name ?? translation("filter") }),
|
|
16903
|
+
/* @__PURE__ */ jsx74(
|
|
16947
16904
|
Select,
|
|
16948
16905
|
{
|
|
16949
16906
|
value: operator,
|
|
@@ -16954,12 +16911,12 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16954
16911
|
"selectedDisplay": (option) => option ? translation(FilterOperatorUtils.getInfo(option.value).translationKey) : ""
|
|
16955
16912
|
},
|
|
16956
16913
|
iconAppearance: "right",
|
|
16957
|
-
children:
|
|
16914
|
+
children: operators.map((op) => /* @__PURE__ */ jsx74(SelectOption, { value: op, label: translation(FilterOperatorUtils.getInfo(op).translationKey), children: /* @__PURE__ */ jsx74(FilterOperatorLabel, { operator: op }) }, op))
|
|
16958
16915
|
}
|
|
16959
16916
|
)
|
|
16960
16917
|
] }),
|
|
16961
|
-
/* @__PURE__ */
|
|
16962
|
-
/* @__PURE__ */
|
|
16918
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-row-0 items-center", children: [
|
|
16919
|
+
/* @__PURE__ */ jsx74(
|
|
16963
16920
|
IconButton,
|
|
16964
16921
|
{
|
|
16965
16922
|
tooltip: translation("removeFilter"),
|
|
@@ -16967,24 +16924,24 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16967
16924
|
color: "negative",
|
|
16968
16925
|
coloringStyle: "text",
|
|
16969
16926
|
size: "sm",
|
|
16970
|
-
children: /* @__PURE__ */
|
|
16927
|
+
children: /* @__PURE__ */ jsx74(TrashIcon, { className: "size-4" })
|
|
16971
16928
|
}
|
|
16972
16929
|
),
|
|
16973
|
-
/* @__PURE__ */
|
|
16930
|
+
/* @__PURE__ */ jsx74(
|
|
16974
16931
|
IconButton,
|
|
16975
16932
|
{
|
|
16976
|
-
tooltip: translation("
|
|
16933
|
+
tooltip: translation("done"),
|
|
16977
16934
|
onClick: props.onClose,
|
|
16978
16935
|
color: "neutral",
|
|
16979
16936
|
coloringStyle: "text",
|
|
16980
16937
|
size: "sm",
|
|
16981
|
-
children: /* @__PURE__ */
|
|
16938
|
+
children: /* @__PURE__ */ jsx74(Check2, { className: "size-4" })
|
|
16982
16939
|
}
|
|
16983
16940
|
)
|
|
16984
16941
|
] })
|
|
16985
16942
|
] }),
|
|
16986
16943
|
children,
|
|
16987
|
-
/* @__PURE__ */
|
|
16944
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: noParameterRequired, children: /* @__PURE__ */ jsx74("div", { className: "flex-row-0 items-center text-sm text-description h-element-sm", children: translation("noParameterRequired") }) })
|
|
16988
16945
|
]
|
|
16989
16946
|
}
|
|
16990
16947
|
);
|
|
@@ -17011,7 +16968,7 @@ var TextFilterPopUp = forwardRef23(function TextFilterPopUp2({
|
|
|
17011
16968
|
}, [value]);
|
|
17012
16969
|
const parameter = value?.parameter ?? {};
|
|
17013
16970
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17014
|
-
return /* @__PURE__ */
|
|
16971
|
+
return /* @__PURE__ */ jsx74(
|
|
17015
16972
|
FilterBasePopUp,
|
|
17016
16973
|
{
|
|
17017
16974
|
ref,
|
|
@@ -17022,44 +16979,25 @@ var TextFilterPopUp = forwardRef23(function TextFilterPopUp2({
|
|
|
17022
16979
|
onRemove,
|
|
17023
16980
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.text,
|
|
17024
16981
|
noParameterRequired: !needsParameterInput,
|
|
17025
|
-
children: /* @__PURE__ */
|
|
17026
|
-
/* @__PURE__ */
|
|
17027
|
-
|
|
17028
|
-
|
|
17029
|
-
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
onValueChange
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
] }),
|
|
17045
|
-
/* @__PURE__ */ jsxs46("div", { className: "flex-row-2 items-center mt-1", children: [
|
|
17046
|
-
/* @__PURE__ */ jsx75(
|
|
17047
|
-
Checkbox,
|
|
17048
|
-
{
|
|
17049
|
-
id: ids.caseSensitive,
|
|
17050
|
-
value: parameter.isCaseSensitive ?? false,
|
|
17051
|
-
onValueChange: (isCaseSensitive) => {
|
|
17052
|
-
onValueChange({
|
|
17053
|
-
dataType: "text",
|
|
17054
|
-
operator,
|
|
17055
|
-
parameter: { ...parameter, isCaseSensitive }
|
|
17056
|
-
});
|
|
17057
|
-
}
|
|
17058
|
-
}
|
|
17059
|
-
),
|
|
17060
|
-
/* @__PURE__ */ jsx75("label", { htmlFor: ids.caseSensitive, children: translation("caseSensitive") })
|
|
17061
|
-
] })
|
|
17062
|
-
] })
|
|
16982
|
+
children: /* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ jsxs45("div", { className: "flex-col-1", children: [
|
|
16983
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.search, className: "typography-label-md", children: translation("search") }),
|
|
16984
|
+
/* @__PURE__ */ jsx74(
|
|
16985
|
+
Input,
|
|
16986
|
+
{
|
|
16987
|
+
id: ids.search,
|
|
16988
|
+
value: parameter.stringValue ?? "",
|
|
16989
|
+
placeholder: translation("value"),
|
|
16990
|
+
onValueChange: (searchText) => {
|
|
16991
|
+
onValueChange({
|
|
16992
|
+
dataType: "text",
|
|
16993
|
+
operator,
|
|
16994
|
+
parameter: { ...parameter, stringValue: searchText }
|
|
16995
|
+
});
|
|
16996
|
+
},
|
|
16997
|
+
className: "min-w-64"
|
|
16998
|
+
}
|
|
16999
|
+
)
|
|
17000
|
+
] }) })
|
|
17063
17001
|
}
|
|
17064
17002
|
);
|
|
17065
17003
|
});
|
|
@@ -17087,7 +17025,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17087
17025
|
const parameter = value?.parameter ?? {};
|
|
17088
17026
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17089
17027
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17090
|
-
return /* @__PURE__ */
|
|
17028
|
+
return /* @__PURE__ */ jsxs45(
|
|
17091
17029
|
FilterBasePopUp,
|
|
17092
17030
|
{
|
|
17093
17031
|
ref,
|
|
@@ -17101,14 +17039,14 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17101
17039
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.number,
|
|
17102
17040
|
noParameterRequired: !needsParameterInput,
|
|
17103
17041
|
children: [
|
|
17104
|
-
/* @__PURE__ */
|
|
17105
|
-
/* @__PURE__ */
|
|
17106
|
-
/* @__PURE__ */
|
|
17107
|
-
/* @__PURE__ */
|
|
17042
|
+
/* @__PURE__ */ jsxs45(Visibility, { isVisible: needsRangeInput, children: [
|
|
17043
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-col-1", children: [
|
|
17044
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.min, className: "typography-label-md", children: translation("min") }),
|
|
17045
|
+
/* @__PURE__ */ jsx74(
|
|
17108
17046
|
Input,
|
|
17109
17047
|
{
|
|
17110
17048
|
id: ids.min,
|
|
17111
|
-
value: parameter.
|
|
17049
|
+
value: parameter.numberMin?.toString() ?? "",
|
|
17112
17050
|
type: "number",
|
|
17113
17051
|
placeholder: "0",
|
|
17114
17052
|
onValueChange: (text) => {
|
|
@@ -17116,20 +17054,20 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17116
17054
|
onValueChange({
|
|
17117
17055
|
dataType: "number",
|
|
17118
17056
|
operator,
|
|
17119
|
-
parameter: { ...parameter,
|
|
17057
|
+
parameter: { ...parameter, numberMin: isNaN(num) ? void 0 : num }
|
|
17120
17058
|
});
|
|
17121
17059
|
},
|
|
17122
17060
|
className: "min-w-64"
|
|
17123
17061
|
}
|
|
17124
17062
|
)
|
|
17125
17063
|
] }),
|
|
17126
|
-
/* @__PURE__ */
|
|
17127
|
-
/* @__PURE__ */
|
|
17128
|
-
/* @__PURE__ */
|
|
17064
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-col-1", children: [
|
|
17065
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.max, className: "typography-label-md", children: translation("max") }),
|
|
17066
|
+
/* @__PURE__ */ jsx74(
|
|
17129
17067
|
Input,
|
|
17130
17068
|
{
|
|
17131
17069
|
id: ids.max,
|
|
17132
|
-
value: parameter.
|
|
17070
|
+
value: parameter.numberMax?.toString() ?? "",
|
|
17133
17071
|
type: "number",
|
|
17134
17072
|
placeholder: "1",
|
|
17135
17073
|
onValueChange: (text) => {
|
|
@@ -17137,7 +17075,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17137
17075
|
onValueChange({
|
|
17138
17076
|
dataType: "number",
|
|
17139
17077
|
operator,
|
|
17140
|
-
parameter: { ...parameter,
|
|
17078
|
+
parameter: { ...parameter, numberMax: isNaN(num) ? void 0 : num }
|
|
17141
17079
|
});
|
|
17142
17080
|
},
|
|
17143
17081
|
className: "min-w-64"
|
|
@@ -17145,10 +17083,10 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17145
17083
|
)
|
|
17146
17084
|
] })
|
|
17147
17085
|
] }),
|
|
17148
|
-
/* @__PURE__ */
|
|
17086
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ jsx74(
|
|
17149
17087
|
Input,
|
|
17150
17088
|
{
|
|
17151
|
-
value: parameter.
|
|
17089
|
+
value: parameter.numberValue?.toString() ?? "",
|
|
17152
17090
|
type: "number",
|
|
17153
17091
|
placeholder: "0",
|
|
17154
17092
|
onValueChange: (text) => {
|
|
@@ -17156,7 +17094,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17156
17094
|
onValueChange({
|
|
17157
17095
|
dataType: "number",
|
|
17158
17096
|
operator,
|
|
17159
|
-
parameter: { ...parameter,
|
|
17097
|
+
parameter: { ...parameter, numberValue: isNaN(num) ? void 0 : num }
|
|
17160
17098
|
});
|
|
17161
17099
|
},
|
|
17162
17100
|
className: "min-w-64"
|
|
@@ -17192,7 +17130,7 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17192
17130
|
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState32(null);
|
|
17193
17131
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17194
17132
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17195
|
-
return /* @__PURE__ */
|
|
17133
|
+
return /* @__PURE__ */ jsxs45(
|
|
17196
17134
|
FilterBasePopUp,
|
|
17197
17135
|
{
|
|
17198
17136
|
ref,
|
|
@@ -17204,36 +17142,36 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17204
17142
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.date,
|
|
17205
17143
|
noParameterRequired: !needsParameterInput,
|
|
17206
17144
|
children: [
|
|
17207
|
-
/* @__PURE__ */
|
|
17208
|
-
/* @__PURE__ */
|
|
17209
|
-
/* @__PURE__ */
|
|
17210
|
-
/* @__PURE__ */
|
|
17145
|
+
/* @__PURE__ */ jsxs45(Visibility, { isVisible: needsRangeInput, children: [
|
|
17146
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-col-1", children: [
|
|
17147
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.startDate, className: "typography-label-md", children: translation("startDate") }),
|
|
17148
|
+
/* @__PURE__ */ jsx74(
|
|
17211
17149
|
DateTimeInput,
|
|
17212
17150
|
{
|
|
17213
17151
|
id: ids.startDate,
|
|
17214
|
-
value: temporaryMinDateValue ?? parameter.
|
|
17152
|
+
value: temporaryMinDateValue ?? parameter.dateMin ?? null,
|
|
17215
17153
|
onValueChange: setTemporaryMinDateValue,
|
|
17216
17154
|
onEditComplete: (dateValue) => {
|
|
17217
|
-
if (dateValue && parameter.
|
|
17218
|
-
if (!parameter.
|
|
17155
|
+
if (dateValue && parameter.dateMax && dateValue > parameter.dateMax) {
|
|
17156
|
+
if (!parameter.dateMin) {
|
|
17219
17157
|
onValueChange({
|
|
17220
17158
|
dataType: "date",
|
|
17221
17159
|
operator,
|
|
17222
|
-
parameter: { ...parameter,
|
|
17160
|
+
parameter: { ...parameter, dateMin: parameter.dateMax, dateMax: dateValue }
|
|
17223
17161
|
});
|
|
17224
17162
|
} else {
|
|
17225
|
-
const diff = parameter.
|
|
17163
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17226
17164
|
onValueChange({
|
|
17227
17165
|
dataType: "date",
|
|
17228
17166
|
operator,
|
|
17229
|
-
parameter: { ...parameter,
|
|
17167
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: new Date(dateValue.getTime() + diff) }
|
|
17230
17168
|
});
|
|
17231
17169
|
}
|
|
17232
17170
|
} else {
|
|
17233
17171
|
onValueChange({
|
|
17234
17172
|
dataType: "date",
|
|
17235
17173
|
operator,
|
|
17236
|
-
parameter: { ...parameter,
|
|
17174
|
+
parameter: { ...parameter, dateMin: dateValue }
|
|
17237
17175
|
});
|
|
17238
17176
|
}
|
|
17239
17177
|
setTemporaryMinDateValue(null);
|
|
@@ -17244,35 +17182,35 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17244
17182
|
}
|
|
17245
17183
|
)
|
|
17246
17184
|
] }),
|
|
17247
|
-
/* @__PURE__ */
|
|
17248
|
-
/* @__PURE__ */
|
|
17249
|
-
/* @__PURE__ */
|
|
17185
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-col-1", children: [
|
|
17186
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.endDate, className: "typography-label-md", children: translation("endDate") }),
|
|
17187
|
+
/* @__PURE__ */ jsx74(
|
|
17250
17188
|
DateTimeInput,
|
|
17251
17189
|
{
|
|
17252
17190
|
id: ids.endDate,
|
|
17253
|
-
value: temporaryMaxDateValue ?? parameter.
|
|
17191
|
+
value: temporaryMaxDateValue ?? parameter.dateMax ?? null,
|
|
17254
17192
|
onValueChange: setTemporaryMaxDateValue,
|
|
17255
17193
|
onEditComplete: (dateValue) => {
|
|
17256
|
-
if (dateValue && parameter.
|
|
17257
|
-
if (!parameter.
|
|
17194
|
+
if (dateValue && parameter.dateMin && dateValue < parameter.dateMin) {
|
|
17195
|
+
if (!parameter.dateMax) {
|
|
17258
17196
|
onValueChange({
|
|
17259
17197
|
dataType: "date",
|
|
17260
17198
|
operator,
|
|
17261
|
-
parameter: { ...parameter,
|
|
17199
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: parameter.dateMin }
|
|
17262
17200
|
});
|
|
17263
17201
|
} else {
|
|
17264
|
-
const diff = parameter.
|
|
17202
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17265
17203
|
onValueChange({
|
|
17266
17204
|
dataType: "date",
|
|
17267
17205
|
operator,
|
|
17268
|
-
parameter: { ...parameter,
|
|
17206
|
+
parameter: { ...parameter, dateMin: new Date(dateValue.getTime() - diff), dateMax: dateValue }
|
|
17269
17207
|
});
|
|
17270
17208
|
}
|
|
17271
17209
|
} else {
|
|
17272
17210
|
onValueChange({
|
|
17273
17211
|
dataType: "date",
|
|
17274
17212
|
operator,
|
|
17275
|
-
parameter: { ...parameter,
|
|
17213
|
+
parameter: { ...parameter, dateMax: dateValue }
|
|
17276
17214
|
});
|
|
17277
17215
|
}
|
|
17278
17216
|
setTemporaryMaxDateValue(null);
|
|
@@ -17284,17 +17222,17 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17284
17222
|
)
|
|
17285
17223
|
] })
|
|
17286
17224
|
] }),
|
|
17287
|
-
/* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17289
|
-
/* @__PURE__ */
|
|
17225
|
+
/* @__PURE__ */ jsxs45(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: [
|
|
17226
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.compareDate, className: "typography-label-md", children: translation("date") }),
|
|
17227
|
+
/* @__PURE__ */ jsx74(
|
|
17290
17228
|
DateTimeInput,
|
|
17291
17229
|
{
|
|
17292
17230
|
id: ids.compareDate,
|
|
17293
|
-
value: parameter.
|
|
17231
|
+
value: parameter.dateValue ?? null,
|
|
17294
17232
|
onValueChange: (compareDate) => {
|
|
17295
17233
|
onValueChange({
|
|
17296
17234
|
...value,
|
|
17297
|
-
parameter: { ...parameter, compareDate }
|
|
17235
|
+
parameter: { ...parameter, dateValue: compareDate }
|
|
17298
17236
|
});
|
|
17299
17237
|
},
|
|
17300
17238
|
allowRemove: true,
|
|
@@ -17303,7 +17241,7 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17303
17241
|
}
|
|
17304
17242
|
)
|
|
17305
17243
|
] }),
|
|
17306
|
-
/* @__PURE__ */
|
|
17244
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17307
17245
|
]
|
|
17308
17246
|
}
|
|
17309
17247
|
);
|
|
@@ -17334,7 +17272,7 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17334
17272
|
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState32(null);
|
|
17335
17273
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17336
17274
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17337
|
-
return /* @__PURE__ */
|
|
17275
|
+
return /* @__PURE__ */ jsxs45(
|
|
17338
17276
|
FilterBasePopUp,
|
|
17339
17277
|
{
|
|
17340
17278
|
ref,
|
|
@@ -17345,37 +17283,37 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17345
17283
|
onRemove,
|
|
17346
17284
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.dateTime,
|
|
17347
17285
|
children: [
|
|
17348
|
-
/* @__PURE__ */
|
|
17349
|
-
/* @__PURE__ */
|
|
17350
|
-
/* @__PURE__ */
|
|
17351
|
-
/* @__PURE__ */
|
|
17286
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
17287
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsRangeInput, children: /* @__PURE__ */ jsxs45("div", { className: "flex-col-2 gap-2", children: [
|
|
17288
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.startDate, className: "typography-label-md", children: translation("startDate") }),
|
|
17289
|
+
/* @__PURE__ */ jsx74(
|
|
17352
17290
|
DateTimeInput,
|
|
17353
17291
|
{
|
|
17354
17292
|
id: ids.startDate,
|
|
17355
17293
|
mode: "dateTime",
|
|
17356
|
-
value: temporaryMinDateValue ?? parameter.
|
|
17294
|
+
value: temporaryMinDateValue ?? parameter.dateMin ?? null,
|
|
17357
17295
|
onValueChange: setTemporaryMinDateValue,
|
|
17358
17296
|
onEditComplete: (dateValue) => {
|
|
17359
|
-
if (dateValue && parameter.
|
|
17360
|
-
if (!parameter.
|
|
17297
|
+
if (dateValue && parameter.dateMax && dateValue > parameter.dateMax) {
|
|
17298
|
+
if (!parameter.dateMin) {
|
|
17361
17299
|
onValueChange({
|
|
17362
17300
|
dataType: "dateTime",
|
|
17363
17301
|
operator,
|
|
17364
|
-
parameter: { ...parameter,
|
|
17302
|
+
parameter: { ...parameter, dateMin: parameter.dateMax, dateMax: dateValue }
|
|
17365
17303
|
});
|
|
17366
17304
|
} else {
|
|
17367
|
-
const diff = parameter.
|
|
17305
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17368
17306
|
onValueChange({
|
|
17369
17307
|
dataType: "dateTime",
|
|
17370
17308
|
operator,
|
|
17371
|
-
parameter: { ...parameter,
|
|
17309
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: new Date(dateValue.getTime() + diff) }
|
|
17372
17310
|
});
|
|
17373
17311
|
}
|
|
17374
17312
|
} else {
|
|
17375
17313
|
onValueChange({
|
|
17376
17314
|
dataType: "dateTime",
|
|
17377
17315
|
operator,
|
|
17378
|
-
parameter: { ...parameter,
|
|
17316
|
+
parameter: { ...parameter, dateMin: dateValue }
|
|
17379
17317
|
});
|
|
17380
17318
|
}
|
|
17381
17319
|
setTemporaryMinDateValue(null);
|
|
@@ -17385,35 +17323,35 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17385
17323
|
className: "min-w-64"
|
|
17386
17324
|
}
|
|
17387
17325
|
),
|
|
17388
|
-
/* @__PURE__ */
|
|
17389
|
-
/* @__PURE__ */
|
|
17326
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.endDate, className: "typography-label-md", children: translation("endDate") }),
|
|
17327
|
+
/* @__PURE__ */ jsx74(
|
|
17390
17328
|
DateTimeInput,
|
|
17391
17329
|
{
|
|
17392
17330
|
id: ids.endDate,
|
|
17393
17331
|
mode: "dateTime",
|
|
17394
|
-
value: temporaryMaxDateValue ?? parameter.
|
|
17332
|
+
value: temporaryMaxDateValue ?? parameter.dateMax ?? null,
|
|
17395
17333
|
onValueChange: setTemporaryMaxDateValue,
|
|
17396
17334
|
onEditComplete: (dateValue) => {
|
|
17397
|
-
if (dateValue && parameter.
|
|
17398
|
-
if (!parameter.
|
|
17335
|
+
if (dateValue && parameter.dateMin && dateValue < parameter.dateMin) {
|
|
17336
|
+
if (!parameter.dateMax) {
|
|
17399
17337
|
onValueChange({
|
|
17400
17338
|
dataType: "dateTime",
|
|
17401
17339
|
operator,
|
|
17402
|
-
parameter: { ...parameter,
|
|
17340
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: parameter.dateMin }
|
|
17403
17341
|
});
|
|
17404
17342
|
} else {
|
|
17405
|
-
const diff = parameter.
|
|
17343
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17406
17344
|
onValueChange({
|
|
17407
17345
|
dataType: "dateTime",
|
|
17408
17346
|
operator,
|
|
17409
|
-
parameter: { ...parameter,
|
|
17347
|
+
parameter: { ...parameter, dateMin: new Date(dateValue.getTime() - diff), dateMax: dateValue }
|
|
17410
17348
|
});
|
|
17411
17349
|
}
|
|
17412
17350
|
} else {
|
|
17413
17351
|
onValueChange({
|
|
17414
17352
|
dataType: "dateTime",
|
|
17415
17353
|
operator,
|
|
17416
|
-
parameter: { ...parameter,
|
|
17354
|
+
parameter: { ...parameter, dateMax: dateValue }
|
|
17417
17355
|
});
|
|
17418
17356
|
}
|
|
17419
17357
|
setTemporaryMaxDateValue(null);
|
|
@@ -17424,19 +17362,19 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17424
17362
|
}
|
|
17425
17363
|
)
|
|
17426
17364
|
] }) }),
|
|
17427
|
-
/* @__PURE__ */
|
|
17428
|
-
/* @__PURE__ */
|
|
17429
|
-
/* @__PURE__ */
|
|
17365
|
+
/* @__PURE__ */ jsxs45(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: [
|
|
17366
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.compareDate, className: "typography-label-md", children: translation("date") }),
|
|
17367
|
+
/* @__PURE__ */ jsx74(
|
|
17430
17368
|
DateTimeInput,
|
|
17431
17369
|
{
|
|
17432
17370
|
id: ids.compareDate,
|
|
17433
17371
|
mode: "dateTime",
|
|
17434
|
-
value: parameter.
|
|
17372
|
+
value: parameter.dateValue ?? null,
|
|
17435
17373
|
onValueChange: (compareDate) => {
|
|
17436
17374
|
onValueChange({
|
|
17437
17375
|
dataType: "dateTime",
|
|
17438
17376
|
operator,
|
|
17439
|
-
parameter: { ...parameter, compareDate }
|
|
17377
|
+
parameter: { ...parameter, dateValue: compareDate }
|
|
17440
17378
|
});
|
|
17441
17379
|
},
|
|
17442
17380
|
allowRemove: true,
|
|
@@ -17445,7 +17383,7 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17445
17383
|
}
|
|
17446
17384
|
)
|
|
17447
17385
|
] }),
|
|
17448
|
-
/* @__PURE__ */
|
|
17386
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17449
17387
|
]
|
|
17450
17388
|
}
|
|
17451
17389
|
);
|
|
@@ -17465,7 +17403,7 @@ var BooleanFilterPopUp = forwardRef23(function BooleanFilterPopUp2({
|
|
|
17465
17403
|
return suggestion;
|
|
17466
17404
|
}, [value]);
|
|
17467
17405
|
const parameter = value?.parameter ?? {};
|
|
17468
|
-
return /* @__PURE__ */
|
|
17406
|
+
return /* @__PURE__ */ jsx74(
|
|
17469
17407
|
FilterBasePopUp,
|
|
17470
17408
|
{
|
|
17471
17409
|
ref,
|
|
@@ -17495,12 +17433,12 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17495
17433
|
return suggestion;
|
|
17496
17434
|
}, [value]);
|
|
17497
17435
|
const parameter = value?.parameter ?? {};
|
|
17498
|
-
const selectedTags = Array.isArray(parameter.
|
|
17436
|
+
const selectedTags = Array.isArray(parameter.uuidValues) ? parameter.uuidValues : [];
|
|
17499
17437
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17500
17438
|
if (availableTags.length === 0) {
|
|
17501
17439
|
return null;
|
|
17502
17440
|
}
|
|
17503
|
-
return /* @__PURE__ */
|
|
17441
|
+
return /* @__PURE__ */ jsxs45(
|
|
17504
17442
|
FilterBasePopUp,
|
|
17505
17443
|
{
|
|
17506
17444
|
ref,
|
|
@@ -17511,8 +17449,8 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17511
17449
|
onRemove,
|
|
17512
17450
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.multiTags,
|
|
17513
17451
|
children: [
|
|
17514
|
-
/* @__PURE__ */
|
|
17515
|
-
/* @__PURE__ */
|
|
17452
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
17453
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ jsx74(
|
|
17516
17454
|
MultiSelect,
|
|
17517
17455
|
{
|
|
17518
17456
|
value: selectedTags,
|
|
@@ -17520,14 +17458,14 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17520
17458
|
onValueChange({
|
|
17521
17459
|
dataType: "multiTags",
|
|
17522
17460
|
operator,
|
|
17523
|
-
parameter: { ...parameter,
|
|
17461
|
+
parameter: { ...parameter, uuidValues: selected.length > 0 ? selected : void 0 }
|
|
17524
17462
|
});
|
|
17525
17463
|
},
|
|
17526
17464
|
buttonProps: { className: "min-w-64" },
|
|
17527
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17465
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(MultiSelectOption, { value: tag, label, children: label }, tag))
|
|
17528
17466
|
}
|
|
17529
17467
|
) }),
|
|
17530
|
-
/* @__PURE__ */
|
|
17468
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17531
17469
|
]
|
|
17532
17470
|
}
|
|
17533
17471
|
);
|
|
@@ -17549,14 +17487,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17549
17487
|
return suggestion;
|
|
17550
17488
|
}, [value]);
|
|
17551
17489
|
const parameter = value?.parameter ?? {};
|
|
17552
|
-
const selectedTagsMulti = Array.isArray(parameter.
|
|
17553
|
-
const selectedTagSingle = parameter.
|
|
17490
|
+
const selectedTagsMulti = Array.isArray(parameter.uuidValues) ? parameter.uuidValues : [];
|
|
17491
|
+
const selectedTagSingle = parameter.uuidValue != null ? String(parameter.uuidValue) : void 0;
|
|
17554
17492
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17555
17493
|
const needsMultiSelect = operator === "contains" || operator === "notContains";
|
|
17556
17494
|
if (availableTags.length === 0) {
|
|
17557
17495
|
return null;
|
|
17558
17496
|
}
|
|
17559
|
-
return /* @__PURE__ */
|
|
17497
|
+
return /* @__PURE__ */ jsxs45(
|
|
17560
17498
|
FilterBasePopUp,
|
|
17561
17499
|
{
|
|
17562
17500
|
ref,
|
|
@@ -17567,8 +17505,8 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17567
17505
|
onRemove,
|
|
17568
17506
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.singleTag,
|
|
17569
17507
|
children: [
|
|
17570
|
-
/* @__PURE__ */
|
|
17571
|
-
/* @__PURE__ */
|
|
17508
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
17509
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput && needsMultiSelect, children: /* @__PURE__ */ jsx74(
|
|
17572
17510
|
MultiSelect,
|
|
17573
17511
|
{
|
|
17574
17512
|
value: selectedTagsMulti,
|
|
@@ -17576,14 +17514,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17576
17514
|
onValueChange({
|
|
17577
17515
|
dataType: "singleTag",
|
|
17578
17516
|
operator,
|
|
17579
|
-
parameter: { ...parameter,
|
|
17517
|
+
parameter: { ...parameter, uuidValues: selected.length > 0 ? selected : void 0 }
|
|
17580
17518
|
});
|
|
17581
17519
|
},
|
|
17582
17520
|
buttonProps: { className: "min-w-64" },
|
|
17583
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17521
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(MultiSelectOption, { value: tag, label }, tag))
|
|
17584
17522
|
}
|
|
17585
17523
|
) }),
|
|
17586
|
-
/* @__PURE__ */
|
|
17524
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput && !needsMultiSelect, children: /* @__PURE__ */ jsx74(
|
|
17587
17525
|
Select,
|
|
17588
17526
|
{
|
|
17589
17527
|
value: selectedTagSingle,
|
|
@@ -17591,14 +17529,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17591
17529
|
onValueChange({
|
|
17592
17530
|
dataType: "singleTag",
|
|
17593
17531
|
operator,
|
|
17594
|
-
parameter: { ...parameter,
|
|
17532
|
+
parameter: { ...parameter, uuidValue: selectedTag ?? void 0 }
|
|
17595
17533
|
});
|
|
17596
17534
|
},
|
|
17597
17535
|
buttonProps: { className: "min-w-64" },
|
|
17598
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17536
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(SelectOption, { value: tag, label }, tag))
|
|
17599
17537
|
}
|
|
17600
17538
|
) }),
|
|
17601
|
-
/* @__PURE__ */
|
|
17539
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17602
17540
|
]
|
|
17603
17541
|
}
|
|
17604
17542
|
);
|
|
@@ -17611,7 +17549,7 @@ var GenericFilterPopUp = forwardRef23(function GenericFilterPopUp2({ name, value
|
|
|
17611
17549
|
}
|
|
17612
17550
|
return suggestion;
|
|
17613
17551
|
}, [value]);
|
|
17614
|
-
return /* @__PURE__ */
|
|
17552
|
+
return /* @__PURE__ */ jsx74(
|
|
17615
17553
|
FilterBasePopUp,
|
|
17616
17554
|
{
|
|
17617
17555
|
ref,
|
|
@@ -17634,26 +17572,26 @@ var FilterPopUp = forwardRef23(function FilterPopUp2({
|
|
|
17634
17572
|
}, ref) {
|
|
17635
17573
|
switch (dataType) {
|
|
17636
17574
|
case "text":
|
|
17637
|
-
return /* @__PURE__ */
|
|
17575
|
+
return /* @__PURE__ */ jsx74(TextFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17638
17576
|
case "number":
|
|
17639
|
-
return /* @__PURE__ */
|
|
17577
|
+
return /* @__PURE__ */ jsx74(NumberFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17640
17578
|
case "date":
|
|
17641
|
-
return /* @__PURE__ */
|
|
17579
|
+
return /* @__PURE__ */ jsx74(DateFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17642
17580
|
case "dateTime":
|
|
17643
|
-
return /* @__PURE__ */
|
|
17581
|
+
return /* @__PURE__ */ jsx74(DatetimeFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17644
17582
|
case "boolean":
|
|
17645
|
-
return /* @__PURE__ */
|
|
17583
|
+
return /* @__PURE__ */ jsx74(BooleanFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17646
17584
|
case "multiTags":
|
|
17647
|
-
return /* @__PURE__ */
|
|
17585
|
+
return /* @__PURE__ */ jsx74(TagsFilterPopUp, { ref, name, value, onValueChange, tags, ...props });
|
|
17648
17586
|
case "singleTag":
|
|
17649
|
-
return /* @__PURE__ */
|
|
17587
|
+
return /* @__PURE__ */ jsx74(TagsSingleFilterPopUp, { ref, name, value, onValueChange, tags, ...props });
|
|
17650
17588
|
case "unknownType":
|
|
17651
|
-
return /* @__PURE__ */
|
|
17589
|
+
return /* @__PURE__ */ jsx74(GenericFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17652
17590
|
}
|
|
17653
17591
|
});
|
|
17654
17592
|
|
|
17655
17593
|
// src/components/layout/table/TableFilterButton.tsx
|
|
17656
|
-
import { Fragment as Fragment8, jsx as
|
|
17594
|
+
import { Fragment as Fragment8, jsx as jsx75, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
17657
17595
|
var TableFilterButton = ({
|
|
17658
17596
|
filterType,
|
|
17659
17597
|
header
|
|
@@ -17672,7 +17610,7 @@ var TableFilterButton = ({
|
|
|
17672
17610
|
popup: `table-filter-popup-${id}`,
|
|
17673
17611
|
label: `table-filter-label-${id}`
|
|
17674
17612
|
}), [id]);
|
|
17675
|
-
|
|
17613
|
+
useEffect42(() => {
|
|
17676
17614
|
setFilterValue(columnFilterValue);
|
|
17677
17615
|
}, [columnFilterValue]);
|
|
17678
17616
|
const isTagsFilter = filterType === "multiTags" || filterType === "singleTag";
|
|
@@ -17680,8 +17618,8 @@ var TableFilterButton = ({
|
|
|
17680
17618
|
if (isTagsFilter && !hasTagsMetaData) {
|
|
17681
17619
|
return null;
|
|
17682
17620
|
}
|
|
17683
|
-
return /* @__PURE__ */
|
|
17684
|
-
/* @__PURE__ */
|
|
17621
|
+
return /* @__PURE__ */ jsxs46(Fragment8, { children: [
|
|
17622
|
+
/* @__PURE__ */ jsxs46(
|
|
17685
17623
|
IconButton,
|
|
17686
17624
|
{
|
|
17687
17625
|
ref: anchorRef,
|
|
@@ -17697,12 +17635,12 @@ var TableFilterButton = ({
|
|
|
17697
17635
|
"aria-labelledby": ids.label,
|
|
17698
17636
|
className: "relative",
|
|
17699
17637
|
children: [
|
|
17700
|
-
/* @__PURE__ */
|
|
17701
|
-
/* @__PURE__ */
|
|
17638
|
+
/* @__PURE__ */ jsx75(FilterIcon, { className: "size-4" }),
|
|
17639
|
+
/* @__PURE__ */ jsx75(Visibility, { isVisible: hasFilter, children: /* @__PURE__ */ jsx75("div", { className: "absolute -top-1 -right-1 w-2 h-2 rounded-full bg-primary" }) })
|
|
17702
17640
|
]
|
|
17703
17641
|
}
|
|
17704
17642
|
),
|
|
17705
|
-
/* @__PURE__ */
|
|
17643
|
+
/* @__PURE__ */ jsx75(
|
|
17706
17644
|
FilterPopUp,
|
|
17707
17645
|
{
|
|
17708
17646
|
ref: containerRef,
|
|
@@ -17733,11 +17671,11 @@ var TableFilterButton = ({
|
|
|
17733
17671
|
};
|
|
17734
17672
|
|
|
17735
17673
|
// src/components/layout/table/TableHeader.tsx
|
|
17736
|
-
import { useCallback as
|
|
17674
|
+
import { useCallback as useCallback35, useEffect as useEffect43 } from "react";
|
|
17737
17675
|
|
|
17738
17676
|
// src/components/user-interaction/data/data-types.tsx
|
|
17739
17677
|
import { Binary, Calendar as Calendar2, CalendarClock, Check as Check3, Database, Tag, Tags, TextIcon } from "lucide-react";
|
|
17740
|
-
import { jsx as
|
|
17678
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
17741
17679
|
var dataTypes = [
|
|
17742
17680
|
"text",
|
|
17743
17681
|
"number",
|
|
@@ -17770,21 +17708,21 @@ var getDefaultValue = (type, selectOptions) => {
|
|
|
17770
17708
|
function toIcon(type) {
|
|
17771
17709
|
switch (type) {
|
|
17772
17710
|
case "text":
|
|
17773
|
-
return /* @__PURE__ */
|
|
17711
|
+
return /* @__PURE__ */ jsx76(TextIcon, { className: "size-4" });
|
|
17774
17712
|
case "number":
|
|
17775
|
-
return /* @__PURE__ */
|
|
17713
|
+
return /* @__PURE__ */ jsx76(Binary, { className: "size-4" });
|
|
17776
17714
|
case "boolean":
|
|
17777
|
-
return /* @__PURE__ */
|
|
17715
|
+
return /* @__PURE__ */ jsx76(Check3, { className: "size-4" });
|
|
17778
17716
|
case "date":
|
|
17779
|
-
return /* @__PURE__ */
|
|
17717
|
+
return /* @__PURE__ */ jsx76(Calendar2, { className: "size-4" });
|
|
17780
17718
|
case "dateTime":
|
|
17781
|
-
return /* @__PURE__ */
|
|
17719
|
+
return /* @__PURE__ */ jsx76(CalendarClock, { className: "size-4" });
|
|
17782
17720
|
case "singleTag":
|
|
17783
|
-
return /* @__PURE__ */
|
|
17721
|
+
return /* @__PURE__ */ jsx76(Tag, { className: "size-4" });
|
|
17784
17722
|
case "multiTags":
|
|
17785
|
-
return /* @__PURE__ */
|
|
17723
|
+
return /* @__PURE__ */ jsx76(Tags, { className: "size-4" });
|
|
17786
17724
|
case "unknownType":
|
|
17787
|
-
return /* @__PURE__ */
|
|
17725
|
+
return /* @__PURE__ */ jsx76(Database, { className: "size-4" });
|
|
17788
17726
|
}
|
|
17789
17727
|
}
|
|
17790
17728
|
var DataTypeUtils = {
|
|
@@ -17794,10 +17732,10 @@ var DataTypeUtils = {
|
|
|
17794
17732
|
};
|
|
17795
17733
|
|
|
17796
17734
|
// src/components/layout/table/TableHeader.tsx
|
|
17797
|
-
import { Fragment as Fragment9, jsx as
|
|
17735
|
+
import { Fragment as Fragment9, jsx as jsx77, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
17798
17736
|
var TableHeader = ({ isSticky = false }) => {
|
|
17799
17737
|
const { table } = useTableStateWithoutSizingContext();
|
|
17800
|
-
const handleResizeMove =
|
|
17738
|
+
const handleResizeMove = useCallback35((e) => {
|
|
17801
17739
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
17802
17740
|
const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
17803
17741
|
const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
|
|
@@ -17813,7 +17751,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17813
17751
|
deltaOffset
|
|
17814
17752
|
}));
|
|
17815
17753
|
}, [table]);
|
|
17816
|
-
const handleResizeEnd =
|
|
17754
|
+
const handleResizeEnd = useCallback35(() => {
|
|
17817
17755
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
17818
17756
|
const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
|
|
17819
17757
|
table.setColumnSizing((prev) => {
|
|
@@ -17831,7 +17769,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17831
17769
|
startSize: null
|
|
17832
17770
|
});
|
|
17833
17771
|
}, [table]);
|
|
17834
|
-
|
|
17772
|
+
useEffect43(() => {
|
|
17835
17773
|
window.addEventListener("pointermove", handleResizeMove);
|
|
17836
17774
|
window.addEventListener("pointerup", handleResizeEnd);
|
|
17837
17775
|
return () => {
|
|
@@ -17839,8 +17777,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17839
17777
|
window.removeEventListener("pointerup", handleResizeEnd);
|
|
17840
17778
|
};
|
|
17841
17779
|
}, [handleResizeEnd, handleResizeMove, table]);
|
|
17842
|
-
return /* @__PURE__ */
|
|
17843
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
17780
|
+
return /* @__PURE__ */ jsxs47(Fragment9, { children: [
|
|
17781
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx77(TableStateContext.Consumer, { children: ({ sizeVars }) => /* @__PURE__ */ jsx77("colgroup", { style: sizeVars, children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx77(
|
|
17844
17782
|
"col",
|
|
17845
17783
|
{
|
|
17846
17784
|
style: {
|
|
@@ -17851,8 +17789,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17851
17789
|
},
|
|
17852
17790
|
header.id
|
|
17853
17791
|
)) }) }, headerGroup.id)),
|
|
17854
|
-
/* @__PURE__ */
|
|
17855
|
-
return /* @__PURE__ */
|
|
17792
|
+
/* @__PURE__ */ jsx77("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx77("tr", { "data-name": "table-header-row", className: clsx28(table.options.meta?.headerRowClassName), children: headerGroup.headers.map((header) => {
|
|
17793
|
+
return /* @__PURE__ */ jsxs47(
|
|
17856
17794
|
"th",
|
|
17857
17795
|
{
|
|
17858
17796
|
colSpan: header.colSpan,
|
|
@@ -17860,8 +17798,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17860
17798
|
"data-name": "table-header-cell",
|
|
17861
17799
|
className: clsx28("group/table-header-cell", header.column.columnDef.meta?.className),
|
|
17862
17800
|
children: [
|
|
17863
|
-
/* @__PURE__ */
|
|
17864
|
-
/* @__PURE__ */
|
|
17801
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ jsxs47("div", { className: "flex-row-1 items-center truncate", children: [
|
|
17802
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ jsx77(
|
|
17865
17803
|
TableSortButton,
|
|
17866
17804
|
{
|
|
17867
17805
|
sortDirection: header.column.getIsSorted(),
|
|
@@ -17887,7 +17825,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17887
17825
|
}
|
|
17888
17826
|
}
|
|
17889
17827
|
) }),
|
|
17890
|
-
/* @__PURE__ */
|
|
17828
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: header.column.getCanFilter() && DataTypeUtils.types.includes(header.column.columnDef.filterFn), children: /* @__PURE__ */ jsx77(
|
|
17891
17829
|
TableFilterButton,
|
|
17892
17830
|
{
|
|
17893
17831
|
header,
|
|
@@ -17899,7 +17837,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17899
17837
|
header.getContext()
|
|
17900
17838
|
)
|
|
17901
17839
|
] }) }),
|
|
17902
|
-
/* @__PURE__ */
|
|
17840
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ jsx77(
|
|
17903
17841
|
"div",
|
|
17904
17842
|
{
|
|
17905
17843
|
onPointerDown: (e) => {
|
|
@@ -17930,7 +17868,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17930
17868
|
};
|
|
17931
17869
|
|
|
17932
17870
|
// src/components/layout/table/TableDisplay.tsx
|
|
17933
|
-
import { jsx as
|
|
17871
|
+
import { jsx as jsx78, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
17934
17872
|
var TableDisplay = ({
|
|
17935
17873
|
children,
|
|
17936
17874
|
containerProps,
|
|
@@ -17939,7 +17877,7 @@ var TableDisplay = ({
|
|
|
17939
17877
|
}) => {
|
|
17940
17878
|
const { table } = useTableStateContext();
|
|
17941
17879
|
const { containerRef } = useTableContainerContext();
|
|
17942
|
-
return /* @__PURE__ */
|
|
17880
|
+
return /* @__PURE__ */ jsx78("div", { ...containerProps, ref: containerRef, "data-name": containerProps?.["data-name"] ?? "table-container", children: /* @__PURE__ */ jsxs48(
|
|
17943
17881
|
"table",
|
|
17944
17882
|
{
|
|
17945
17883
|
...props,
|
|
@@ -17950,8 +17888,8 @@ var TableDisplay = ({
|
|
|
17950
17888
|
},
|
|
17951
17889
|
children: [
|
|
17952
17890
|
children,
|
|
17953
|
-
/* @__PURE__ */
|
|
17954
|
-
/* @__PURE__ */
|
|
17891
|
+
/* @__PURE__ */ jsx78(TableHeader, { ...tableHeaderProps }),
|
|
17892
|
+
/* @__PURE__ */ jsx78(TableBody, {})
|
|
17955
17893
|
]
|
|
17956
17894
|
}
|
|
17957
17895
|
) });
|
|
@@ -17959,10 +17897,10 @@ var TableDisplay = ({
|
|
|
17959
17897
|
|
|
17960
17898
|
// src/components/layout/table/TablePagination.tsx
|
|
17961
17899
|
import clsx29 from "clsx";
|
|
17962
|
-
import { jsx as
|
|
17900
|
+
import { jsx as jsx79, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
17963
17901
|
var TablePaginationMenu = ({ ...props }) => {
|
|
17964
17902
|
const { table } = useTableStateWithoutSizingContext();
|
|
17965
|
-
return /* @__PURE__ */
|
|
17903
|
+
return /* @__PURE__ */ jsx79(
|
|
17966
17904
|
Pagination,
|
|
17967
17905
|
{
|
|
17968
17906
|
...props,
|
|
@@ -17982,23 +17920,86 @@ var TablePageSizeSelect = ({
|
|
|
17982
17920
|
}) => {
|
|
17983
17921
|
const { table } = useTableStateWithoutSizingContext();
|
|
17984
17922
|
const currentPageSize = table.getState().pagination.pageSize;
|
|
17985
|
-
return /* @__PURE__ */
|
|
17923
|
+
return /* @__PURE__ */ jsx79(
|
|
17986
17924
|
Select,
|
|
17987
17925
|
{
|
|
17988
17926
|
...props,
|
|
17989
17927
|
value: currentPageSize.toString(),
|
|
17990
17928
|
onValueChange: (value) => table.setPageSize(Number(value)),
|
|
17991
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
17929
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx79(SelectOption, { value: size.toString(), label: size.toString() }, size))
|
|
17992
17930
|
}
|
|
17993
17931
|
);
|
|
17994
17932
|
};
|
|
17995
17933
|
var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
|
|
17996
|
-
return /* @__PURE__ */
|
|
17997
|
-
/* @__PURE__ */
|
|
17998
|
-
/* @__PURE__ */
|
|
17934
|
+
return /* @__PURE__ */ jsxs49("div", { ...props, className: clsx29("container flex-col-2 sm:flex-row-8 items-center justify-center", props.className), children: [
|
|
17935
|
+
/* @__PURE__ */ jsx79(TablePaginationMenu, {}),
|
|
17936
|
+
/* @__PURE__ */ jsx79(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ jsx79(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "h-10 min-w-24 max-w-24" } }) })
|
|
17999
17937
|
] });
|
|
18000
17938
|
};
|
|
18001
17939
|
|
|
17940
|
+
// src/components/user-interaction/Checkbox.tsx
|
|
17941
|
+
import { Check as Check4, Minus as Minus2 } from "lucide-react";
|
|
17942
|
+
import { useCallback as useCallback36 } from "react";
|
|
17943
|
+
import { jsx as jsx80, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
17944
|
+
var Checkbox = ({
|
|
17945
|
+
value: controlledValue,
|
|
17946
|
+
initialValue = false,
|
|
17947
|
+
indeterminate,
|
|
17948
|
+
required = false,
|
|
17949
|
+
invalid = false,
|
|
17950
|
+
disabled = false,
|
|
17951
|
+
readOnly = false,
|
|
17952
|
+
onValueChange,
|
|
17953
|
+
onEditComplete,
|
|
17954
|
+
size = "md",
|
|
17955
|
+
alwaysShowCheckIcon = false,
|
|
17956
|
+
...props
|
|
17957
|
+
}) => {
|
|
17958
|
+
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
17959
|
+
const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
|
|
17960
|
+
const onChangeWrapper = useCallback36((value2) => {
|
|
17961
|
+
onValueChangeStable(value2);
|
|
17962
|
+
onEditCompleteStable(value2);
|
|
17963
|
+
}, [onValueChangeStable, onEditCompleteStable]);
|
|
17964
|
+
const [value, setValue] = useControlledState({
|
|
17965
|
+
value: controlledValue,
|
|
17966
|
+
onValueChange: onChangeWrapper,
|
|
17967
|
+
defaultValue: initialValue
|
|
17968
|
+
});
|
|
17969
|
+
return /* @__PURE__ */ jsxs50(
|
|
17970
|
+
"div",
|
|
17971
|
+
{
|
|
17972
|
+
...props,
|
|
17973
|
+
onClick: (event) => {
|
|
17974
|
+
if (!disabled) {
|
|
17975
|
+
setValue((prev) => !prev);
|
|
17976
|
+
}
|
|
17977
|
+
props.onClick?.(event);
|
|
17978
|
+
},
|
|
17979
|
+
onKeyDown: (event) => {
|
|
17980
|
+
if (disabled) return;
|
|
17981
|
+
if (event.key === " " || event.key === "Enter") {
|
|
17982
|
+
event.preventDefault();
|
|
17983
|
+
setValue((prev) => !prev);
|
|
17984
|
+
}
|
|
17985
|
+
props.onKeyDown?.(event);
|
|
17986
|
+
},
|
|
17987
|
+
"data-checked": !indeterminate ? value : "indeterminate",
|
|
17988
|
+
"data-size": size ?? void 0,
|
|
17989
|
+
...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
|
|
17990
|
+
role: "checkbox",
|
|
17991
|
+
tabIndex: disabled ? -1 : 0,
|
|
17992
|
+
"aria-checked": indeterminate ? "mixed" : value,
|
|
17993
|
+
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
17994
|
+
"data-name": props["data-name"] ?? "checkbox",
|
|
17995
|
+
children: [
|
|
17996
|
+
/* @__PURE__ */ jsx80(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ jsx80(Minus2, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) }),
|
|
17997
|
+
/* @__PURE__ */ jsx80(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ jsx80(Check4, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) })
|
|
17998
|
+
]
|
|
17999
|
+
}
|
|
18000
|
+
);
|
|
18001
|
+
};
|
|
18002
|
+
|
|
18002
18003
|
// src/components/layout/table/TableWithSelectionProvider.tsx
|
|
18003
18004
|
import { useCallback as useCallback37, useMemo as useMemo35 } from "react";
|
|
18004
18005
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
@@ -18116,7 +18117,7 @@ var TableWithSelection = ({
|
|
|
18116
18117
|
};
|
|
18117
18118
|
|
|
18118
18119
|
// src/components/layout/table/TableColumn.tsx
|
|
18119
|
-
import { memo as memo2, useEffect as
|
|
18120
|
+
import { memo as memo2, useEffect as useEffect44, useMemo as useMemo36, useState as useState34 } from "react";
|
|
18120
18121
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
18121
18122
|
var TableColumnComponent = ({
|
|
18122
18123
|
filterType,
|
|
@@ -18132,7 +18133,7 @@ var TableColumnComponent = ({
|
|
|
18132
18133
|
...props,
|
|
18133
18134
|
filterFn
|
|
18134
18135
|
});
|
|
18135
|
-
|
|
18136
|
+
useEffect44(() => {
|
|
18136
18137
|
const unsubscribe = registerColumn(column);
|
|
18137
18138
|
return () => {
|
|
18138
18139
|
unsubscribe();
|
|
@@ -18153,7 +18154,7 @@ var TableColumn = (props) => {
|
|
|
18153
18154
|
|
|
18154
18155
|
// src/components/layout/table/TableColumnSwitcher.tsx
|
|
18155
18156
|
import { useMemo as useMemo37, useRef as useRef35, useId as useId19 } from "react";
|
|
18156
|
-
import { ChevronUp as ChevronUp3, ChevronDown as ChevronDown5, ChevronLeft as ChevronLeft5, ChevronRight as ChevronRight5, Eye, EyeOff, Pin, PinOff,
|
|
18157
|
+
import { ChevronUp as ChevronUp3, ChevronDown as ChevronDown5, ChevronLeft as ChevronLeft5, ChevronRight as ChevronRight5, Eye, EyeOff, Pin, PinOff, Columns3Cog } from "lucide-react";
|
|
18157
18158
|
import { Fragment as Fragment10, jsx as jsx84, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
18158
18159
|
var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
18159
18160
|
const { table } = useTableStateWithoutSizingContext();
|
|
@@ -18164,6 +18165,8 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
|
18164
18165
|
popup: props.id ?? `table-column-picker-popup-${generatedId}`,
|
|
18165
18166
|
label: `table-column-picker-label-${generatedId}`
|
|
18166
18167
|
}), [generatedId, props.id]);
|
|
18168
|
+
const enableHiding = table.options.enableHiding !== false;
|
|
18169
|
+
const enableColumnPinning = table.options.enableColumnPinning !== false;
|
|
18167
18170
|
const tableState = table.getState();
|
|
18168
18171
|
const columnOrder = tableState.columnOrder;
|
|
18169
18172
|
const columnPinning = tableState.columnPinning;
|
|
@@ -18368,7 +18371,7 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
|
18368
18371
|
] }) }),
|
|
18369
18372
|
/* @__PURE__ */ jsx84("div", { className: "flex-1 typography-label-lg", children: getColumnHeader(columnId) }),
|
|
18370
18373
|
/* @__PURE__ */ jsxs52(Fragment10, { children: [
|
|
18371
|
-
/* @__PURE__ */ jsx84(
|
|
18374
|
+
/* @__PURE__ */ jsx84(Visibility, { isVisible: enableHiding, children: /* @__PURE__ */ jsx84(
|
|
18372
18375
|
IconButton,
|
|
18373
18376
|
{
|
|
18374
18377
|
tooltip: translation("changeVisibility"),
|
|
@@ -18380,8 +18383,8 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
|
18380
18383
|
"aria-label": isVisible ? translation("hideColumn") : translation("showColumn"),
|
|
18381
18384
|
children: isVisible ? /* @__PURE__ */ jsx84(Eye, { className: "size-4" }) : /* @__PURE__ */ jsx84(EyeOff, { className: "size-4" })
|
|
18382
18385
|
}
|
|
18383
|
-
),
|
|
18384
|
-
/* @__PURE__ */ jsx84(
|
|
18386
|
+
) }),
|
|
18387
|
+
/* @__PURE__ */ jsx84(Visibility, { isVisible: enableColumnPinning, children: /* @__PURE__ */ jsx84(
|
|
18385
18388
|
IconButton,
|
|
18386
18389
|
{
|
|
18387
18390
|
tooltip: translation("changePinning"),
|
|
@@ -18399,7 +18402,7 @@ var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
|
18399
18402
|
"aria-label": isPinned ? translation("unpin") : translation("pinLeft"),
|
|
18400
18403
|
children: !isPinned ? /* @__PURE__ */ jsx84(PinOff, { className: "size-4" }) : /* @__PURE__ */ jsx84(Pin, { className: "size-4" })
|
|
18401
18404
|
}
|
|
18402
|
-
)
|
|
18405
|
+
) })
|
|
18403
18406
|
] })
|
|
18404
18407
|
] }, columnId);
|
|
18405
18408
|
}) })
|
|
@@ -18417,7 +18420,7 @@ var TableColumnSwitcher = ({ buttonProps, ...props }) => {
|
|
|
18417
18420
|
color: "neutral",
|
|
18418
18421
|
tooltip: translation("changeColumnDisplay"),
|
|
18419
18422
|
...buttonProps,
|
|
18420
|
-
children: /* @__PURE__ */ jsx84(
|
|
18423
|
+
children: /* @__PURE__ */ jsx84(Columns3Cog, { className: "size-5" })
|
|
18421
18424
|
}
|
|
18422
18425
|
) }),
|
|
18423
18426
|
/* @__PURE__ */ jsx84(TableColumnSwitcherPopUp, { ...props })
|
|
@@ -18674,7 +18677,7 @@ var ComboboxInput = forwardRef24(
|
|
|
18674
18677
|
);
|
|
18675
18678
|
|
|
18676
18679
|
// src/components/user-interaction/Combobox/ComboboxList.tsx
|
|
18677
|
-
import { forwardRef as forwardRef25, useEffect as
|
|
18680
|
+
import { forwardRef as forwardRef25, useEffect as useEffect45, useRef as useRef36 } from "react";
|
|
18678
18681
|
import clsx31 from "clsx";
|
|
18679
18682
|
import { jsx as jsx87, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
18680
18683
|
var ComboboxList = forwardRef25(
|
|
@@ -18684,7 +18687,7 @@ var ComboboxList = forwardRef25(
|
|
|
18684
18687
|
const { layout } = context;
|
|
18685
18688
|
const { registerList } = layout;
|
|
18686
18689
|
const innerRef = useRef36(null);
|
|
18687
|
-
|
|
18690
|
+
useEffect45(() => {
|
|
18688
18691
|
return registerList(innerRef);
|
|
18689
18692
|
}, [registerList]);
|
|
18690
18693
|
const setRefs = (node) => {
|
|
@@ -18751,7 +18754,7 @@ var Combobox = forwardRef26(function Combobox2({
|
|
|
18751
18754
|
});
|
|
18752
18755
|
|
|
18753
18756
|
// src/components/user-interaction/Combobox/ComboboxOption.tsx
|
|
18754
|
-
import { forwardRef as forwardRef27, useEffect as
|
|
18757
|
+
import { forwardRef as forwardRef27, useEffect as useEffect46, useId as useId21, useRef as useRef37 } from "react";
|
|
18755
18758
|
import clsx32 from "clsx";
|
|
18756
18759
|
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
18757
18760
|
var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
@@ -18769,7 +18772,7 @@ var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
|
18769
18772
|
const generatedId = useId21();
|
|
18770
18773
|
const optionId = idProp ?? `combobox-option-${generatedId}`;
|
|
18771
18774
|
const resolvedDisplay = children ?? label;
|
|
18772
|
-
|
|
18775
|
+
useEffect46(() => {
|
|
18773
18776
|
return registerOption({
|
|
18774
18777
|
id: optionId,
|
|
18775
18778
|
value,
|
|
@@ -18779,7 +18782,7 @@ var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
|
18779
18782
|
ref: itemRef
|
|
18780
18783
|
});
|
|
18781
18784
|
}, [optionId, value, label, resolvedDisplay, disabled, registerOption]);
|
|
18782
|
-
|
|
18785
|
+
useEffect46(() => {
|
|
18783
18786
|
if (context.highlightedId === optionId) {
|
|
18784
18787
|
itemRef.current?.scrollIntoView?.({ behavior: "smooth", block: "nearest" });
|
|
18785
18788
|
}
|
|
@@ -18954,8 +18957,8 @@ var Menu = ({
|
|
|
18954
18957
|
};
|
|
18955
18958
|
|
|
18956
18959
|
// src/components/user-interaction/MultiSelect/MultiSelectChipDisplay.tsx
|
|
18957
|
-
import { forwardRef as forwardRef28, useEffect as
|
|
18958
|
-
import { XIcon as
|
|
18960
|
+
import { forwardRef as forwardRef28, useEffect as useEffect47, useImperativeHandle as useImperativeHandle15, useRef as useRef39 } from "react";
|
|
18961
|
+
import { XIcon as XIcon2, Plus } from "lucide-react";
|
|
18959
18962
|
import { jsx as jsx92, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
18960
18963
|
var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayButton2({ id, ...props }, ref) {
|
|
18961
18964
|
const translation = useHightideTranslation();
|
|
@@ -18963,12 +18966,12 @@ var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayB
|
|
|
18963
18966
|
const { config, layout } = context;
|
|
18964
18967
|
const { setIds } = config;
|
|
18965
18968
|
const { registerTrigger } = layout;
|
|
18966
|
-
|
|
18969
|
+
useEffect47(() => {
|
|
18967
18970
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
18968
18971
|
}, [id, setIds]);
|
|
18969
18972
|
const innerRef = useRef39(null);
|
|
18970
18973
|
useImperativeHandle15(ref, () => innerRef.current);
|
|
18971
|
-
|
|
18974
|
+
useEffect47(() => {
|
|
18972
18975
|
const unregister = registerTrigger(innerRef);
|
|
18973
18976
|
return () => unregister();
|
|
18974
18977
|
}, [registerTrigger]);
|
|
@@ -19006,7 +19009,7 @@ var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayB
|
|
|
19006
19009
|
color: "negative",
|
|
19007
19010
|
coloringStyle: "text",
|
|
19008
19011
|
className: "flex-row-0 items-center size-7 p-1",
|
|
19009
|
-
children: /* @__PURE__ */ jsx92(
|
|
19012
|
+
children: /* @__PURE__ */ jsx92(XIcon2, { className: "size-5" })
|
|
19010
19013
|
}
|
|
19011
19014
|
)
|
|
19012
19015
|
] }, opt.id)),
|
|
@@ -19058,7 +19061,7 @@ var MultiSelectChipDisplay = forwardRef28(
|
|
|
19058
19061
|
);
|
|
19059
19062
|
|
|
19060
19063
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
19061
|
-
import { useCallback as useCallback42, useEffect as
|
|
19064
|
+
import { useCallback as useCallback42, useEffect as useEffect48, useState as useState38 } from "react";
|
|
19062
19065
|
import clsx35 from "clsx";
|
|
19063
19066
|
import { jsx as jsx93, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
19064
19067
|
var up = 1;
|
|
@@ -19178,7 +19181,7 @@ var ScrollPicker = ({
|
|
|
19178
19181
|
};
|
|
19179
19182
|
});
|
|
19180
19183
|
}, [disabled, getDirection, onChange]);
|
|
19181
|
-
|
|
19184
|
+
useEffect48(() => {
|
|
19182
19185
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
19183
19186
|
});
|
|
19184
19187
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -19402,7 +19405,7 @@ var TextareaWithHeadline = ({
|
|
|
19402
19405
|
// src/components/user-interaction/data/FilterList.tsx
|
|
19403
19406
|
import { useMemo as useMemo40, useState as useState39 } from "react";
|
|
19404
19407
|
import { PlusIcon } from "lucide-react";
|
|
19405
|
-
import { jsx as jsx96, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
19408
|
+
import { Fragment as Fragment12, jsx as jsx96, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
19406
19409
|
var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
19407
19410
|
const translation = useHightideTranslation();
|
|
19408
19411
|
const filterValueToLabel = useFilterValueTranslation();
|
|
@@ -19426,9 +19429,9 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19426
19429
|
}
|
|
19427
19430
|
return value;
|
|
19428
19431
|
}, [value, editState]);
|
|
19429
|
-
return /* @__PURE__ */ jsxs60("div", { className: "flex-row-
|
|
19432
|
+
return /* @__PURE__ */ jsxs60("div", { className: "flex-row-2 flex-wrap gap-y-2", children: [
|
|
19430
19433
|
/* @__PURE__ */ jsxs60(PopUpRoot, { children: [
|
|
19431
|
-
/* @__PURE__ */ jsx96(PopUpOpener, { children: ({ toggleOpen, props }) => /* @__PURE__ */ jsxs60(Button, { ...props, onClick: toggleOpen, color: "neutral", size: "
|
|
19434
|
+
/* @__PURE__ */ jsx96(PopUpOpener, { children: ({ toggleOpen, props }) => /* @__PURE__ */ jsxs60(Button, { ...props, onClick: toggleOpen, color: "neutral", size: "sm", className: "min-w-36", children: [
|
|
19432
19435
|
translation("addFilter"),
|
|
19433
19436
|
/* @__PURE__ */ jsx96(PlusIcon, { className: "size-4" })
|
|
19434
19437
|
] }) }),
|
|
@@ -19477,10 +19480,10 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19477
19480
|
}
|
|
19478
19481
|
},
|
|
19479
19482
|
children: [
|
|
19480
|
-
/* @__PURE__ */ jsx96(PopUpOpener, { children: ({ toggleOpen, props
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
] }) }),
|
|
19483
|
+
/* @__PURE__ */ jsx96(PopUpOpener, { children: ({ toggleOpen, props }) => /* @__PURE__ */ jsx96(Button, { ...props, onClick: toggleOpen, color: "primary", coloringStyle: "tonal-outline", size: "sm", children: item.activeLabelBuilder ? item.activeLabelBuilder(columnFilter.value) : /* @__PURE__ */ jsxs60(Fragment12, { children: [
|
|
19484
|
+
/* @__PURE__ */ jsx96("span", { className: "font-bold", children: item.label }),
|
|
19485
|
+
filterValueToLabel(columnFilter.value, { tags: item.tags })
|
|
19486
|
+
] }) }) }),
|
|
19484
19487
|
/* @__PURE__ */ jsx96(PopUpContext.Consumer, { children: ({ isOpen, setIsOpen }) => item.popUpBuilder ? item.popUpBuilder({
|
|
19485
19488
|
value: editState?.id === columnFilter.id ? editState.value : columnFilter.value,
|
|
19486
19489
|
onValueChange: (value2) => setEditState({ ...columnFilter, value: value2 }),
|
|
@@ -19488,11 +19491,12 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19488
19491
|
onValueChange(value.filter((prevItem) => prevItem.id !== columnFilter.id));
|
|
19489
19492
|
setEditState(void 0);
|
|
19490
19493
|
},
|
|
19494
|
+
operatorOverrides: item.operatorOverrides,
|
|
19491
19495
|
dataType: item.dataType,
|
|
19492
19496
|
tags: item.tags,
|
|
19493
19497
|
name: item.label,
|
|
19494
19498
|
isOpen,
|
|
19495
|
-
|
|
19499
|
+
onClose: () => setIsOpen(false)
|
|
19496
19500
|
}) : /* @__PURE__ */ jsx96(
|
|
19497
19501
|
FilterPopUp,
|
|
19498
19502
|
{
|
|
@@ -19500,6 +19504,7 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19500
19504
|
value: editState?.id === columnFilter.id ? editState.value : columnFilter.value,
|
|
19501
19505
|
dataType: item.dataType,
|
|
19502
19506
|
tags: item.tags,
|
|
19507
|
+
operatorOverrides: item.operatorOverrides,
|
|
19503
19508
|
onValueChange: (value2) => {
|
|
19504
19509
|
setEditState({ ...columnFilter, value: value2 });
|
|
19505
19510
|
},
|
|
@@ -19518,8 +19523,142 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19518
19523
|
] });
|
|
19519
19524
|
};
|
|
19520
19525
|
|
|
19526
|
+
// src/components/user-interaction/data/SortingList.tsx
|
|
19527
|
+
import { useMemo as useMemo41 } from "react";
|
|
19528
|
+
import { ArrowDownWideNarrow, ArrowUpNarrowWide, PlusIcon as PlusIcon2, TrashIcon as TrashIcon2, XIcon as XIcon3 } from "lucide-react";
|
|
19529
|
+
import clsx37 from "clsx";
|
|
19530
|
+
import { jsx as jsx97, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
19531
|
+
var SortingList = ({ sorting, onSortingChange, availableItems }) => {
|
|
19532
|
+
const translation = useHightideTranslation();
|
|
19533
|
+
const activeIds = useMemo41(() => sorting.map((item) => item.id), [sorting]);
|
|
19534
|
+
const inactiveItems = useMemo41(
|
|
19535
|
+
() => availableItems.filter((item) => !activeIds.includes(item.id)).sort((a, b) => a.label.localeCompare(b.label)),
|
|
19536
|
+
[availableItems, activeIds]
|
|
19537
|
+
);
|
|
19538
|
+
const itemRecord = useMemo41(
|
|
19539
|
+
() => availableItems.reduce(
|
|
19540
|
+
(acc, item) => {
|
|
19541
|
+
acc[item.id] = item;
|
|
19542
|
+
return acc;
|
|
19543
|
+
},
|
|
19544
|
+
{}
|
|
19545
|
+
),
|
|
19546
|
+
[availableItems]
|
|
19547
|
+
);
|
|
19548
|
+
const setSortDirection = (columnId, desc) => {
|
|
19549
|
+
onSortingChange(sorting.map((s) => s.id === columnId ? { ...s, desc } : s));
|
|
19550
|
+
};
|
|
19551
|
+
const removeSort = (columnId) => {
|
|
19552
|
+
onSortingChange(sorting.filter((s) => s.id !== columnId));
|
|
19553
|
+
};
|
|
19554
|
+
return /* @__PURE__ */ jsxs61("div", { className: "flex-row-2 flex-wrap gap-y-2", children: [
|
|
19555
|
+
/* @__PURE__ */ jsxs61(PopUpRoot, { children: [
|
|
19556
|
+
/* @__PURE__ */ jsx97(PopUpOpener, { children: ({ toggleOpen, props }) => /* @__PURE__ */ jsxs61(Button, { ...props, onClick: toggleOpen, color: "neutral", size: "sm", className: "min-w-36", children: [
|
|
19557
|
+
translation("addSorting"),
|
|
19558
|
+
/* @__PURE__ */ jsx97(PlusIcon2, { className: "size-4" })
|
|
19559
|
+
] }) }),
|
|
19560
|
+
/* @__PURE__ */ jsx97(PopUp, { className: "flex-col-2 p-2", children: /* @__PURE__ */ jsx97(PopUpContext.Consumer, { children: ({ setIsOpen }) => /* @__PURE__ */ jsx97(
|
|
19561
|
+
Combobox,
|
|
19562
|
+
{
|
|
19563
|
+
onItemClick: (id) => {
|
|
19564
|
+
const item = itemRecord[id];
|
|
19565
|
+
if (!item) return;
|
|
19566
|
+
onSortingChange([...sorting, { id: item.id, desc: false }]);
|
|
19567
|
+
setIsOpen(false);
|
|
19568
|
+
},
|
|
19569
|
+
children: inactiveItems.map((item) => /* @__PURE__ */ jsxs61(ComboboxOption, { value: item.id, label: item.label, children: [
|
|
19570
|
+
DataTypeUtils.toIcon(item.dataType),
|
|
19571
|
+
item.label
|
|
19572
|
+
] }, item.id))
|
|
19573
|
+
}
|
|
19574
|
+
) }) })
|
|
19575
|
+
] }),
|
|
19576
|
+
sorting.map((columnSort) => {
|
|
19577
|
+
const item = itemRecord[columnSort.id];
|
|
19578
|
+
if (!item) return null;
|
|
19579
|
+
return /* @__PURE__ */ jsxs61(PopUpRoot, { children: [
|
|
19580
|
+
/* @__PURE__ */ jsx97(PopUpOpener, { children: ({ toggleOpen, props }) => /* @__PURE__ */ jsxs61(Button, { ...props, onClick: toggleOpen, color: "secondary", coloringStyle: "tonal-outline", size: "sm", children: [
|
|
19581
|
+
/* @__PURE__ */ jsx97("span", { className: "font-bold", children: item.label }),
|
|
19582
|
+
columnSort.desc ? /* @__PURE__ */ jsx97(ArrowDownWideNarrow, { className: "size-5" }) : /* @__PURE__ */ jsx97(ArrowUpNarrowWide, { className: "size-5" })
|
|
19583
|
+
] }) }),
|
|
19584
|
+
/* @__PURE__ */ jsx97(PopUpContext.Consumer, { children: ({ setIsOpen }) => /* @__PURE__ */ jsxs61(
|
|
19585
|
+
PopUp,
|
|
19586
|
+
{
|
|
19587
|
+
className: clsx37("flex-col-3 p-3 min-w-64"),
|
|
19588
|
+
onClose: () => setIsOpen(false),
|
|
19589
|
+
children: [
|
|
19590
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex-row-4 justify-between w-full items-center gap-2", children: [
|
|
19591
|
+
/* @__PURE__ */ jsx97("span", { className: "typography-title-sm font-semibold", children: item.label }),
|
|
19592
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex-row-0 shrink-0 items-center", children: [
|
|
19593
|
+
/* @__PURE__ */ jsx97(
|
|
19594
|
+
IconButton,
|
|
19595
|
+
{
|
|
19596
|
+
tooltip: translation("removeFilter"),
|
|
19597
|
+
onClick: () => {
|
|
19598
|
+
removeSort(columnSort.id);
|
|
19599
|
+
setIsOpen(false);
|
|
19600
|
+
},
|
|
19601
|
+
color: "negative",
|
|
19602
|
+
coloringStyle: "text",
|
|
19603
|
+
size: "sm",
|
|
19604
|
+
children: /* @__PURE__ */ jsx97(TrashIcon2, { className: "size-4" })
|
|
19605
|
+
}
|
|
19606
|
+
),
|
|
19607
|
+
/* @__PURE__ */ jsx97(
|
|
19608
|
+
IconButton,
|
|
19609
|
+
{
|
|
19610
|
+
tooltip: translation("close"),
|
|
19611
|
+
onClick: () => setIsOpen(false),
|
|
19612
|
+
color: "neutral",
|
|
19613
|
+
coloringStyle: "text",
|
|
19614
|
+
size: "sm",
|
|
19615
|
+
children: /* @__PURE__ */ jsx97(XIcon3, { className: "size-4" })
|
|
19616
|
+
}
|
|
19617
|
+
)
|
|
19618
|
+
] })
|
|
19619
|
+
] }),
|
|
19620
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex-row-1 w-full gap-2", children: [
|
|
19621
|
+
/* @__PURE__ */ jsxs61(
|
|
19622
|
+
Button,
|
|
19623
|
+
{
|
|
19624
|
+
type: "button",
|
|
19625
|
+
className: "flex-1 flex-row-1 items-center justify-center gap-2",
|
|
19626
|
+
color: columnSort.desc ? "neutral" : "primary",
|
|
19627
|
+
coloringStyle: "solid",
|
|
19628
|
+
size: "md",
|
|
19629
|
+
onClick: () => setSortDirection(columnSort.id, false),
|
|
19630
|
+
children: [
|
|
19631
|
+
/* @__PURE__ */ jsx97(ArrowUpNarrowWide, { className: "size-4" }),
|
|
19632
|
+
translation("sortAsc")
|
|
19633
|
+
]
|
|
19634
|
+
}
|
|
19635
|
+
),
|
|
19636
|
+
/* @__PURE__ */ jsxs61(
|
|
19637
|
+
Button,
|
|
19638
|
+
{
|
|
19639
|
+
type: "button",
|
|
19640
|
+
className: "flex-1 flex-row-1 items-center justify-center gap-2",
|
|
19641
|
+
color: columnSort.desc ? "primary" : "neutral",
|
|
19642
|
+
coloringStyle: "solid",
|
|
19643
|
+
size: "md",
|
|
19644
|
+
onClick: () => setSortDirection(columnSort.id, true),
|
|
19645
|
+
children: [
|
|
19646
|
+
/* @__PURE__ */ jsx97(ArrowDownWideNarrow, { className: "size-4" }),
|
|
19647
|
+
translation("sortDesc")
|
|
19648
|
+
]
|
|
19649
|
+
}
|
|
19650
|
+
)
|
|
19651
|
+
] })
|
|
19652
|
+
]
|
|
19653
|
+
}
|
|
19654
|
+
) })
|
|
19655
|
+
] }, columnSort.id);
|
|
19656
|
+
})
|
|
19657
|
+
] });
|
|
19658
|
+
};
|
|
19659
|
+
|
|
19521
19660
|
// src/components/user-interaction/date/TimeDisplay.tsx
|
|
19522
|
-
import { jsx as
|
|
19661
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
19523
19662
|
var TimeDisplay = ({
|
|
19524
19663
|
date,
|
|
19525
19664
|
mode = "daysFromToday"
|
|
@@ -19556,13 +19695,13 @@ var TimeDisplay = ({
|
|
|
19556
19695
|
} else {
|
|
19557
19696
|
fullString = `${date.getDate()}. ${monthToTranslation[date.getMonth()]} ${date.getFullYear()}`;
|
|
19558
19697
|
}
|
|
19559
|
-
return /* @__PURE__ */
|
|
19698
|
+
return /* @__PURE__ */ jsx98("span", { children: fullString });
|
|
19560
19699
|
};
|
|
19561
19700
|
|
|
19562
19701
|
// src/components/user-interaction/input/FlexibleDateTimeInput.tsx
|
|
19563
|
-
import { forwardRef as forwardRef30, useMemo as
|
|
19702
|
+
import { forwardRef as forwardRef30, useMemo as useMemo42, useState as useState40 } from "react";
|
|
19564
19703
|
import { ClockFading, ClockPlus } from "lucide-react";
|
|
19565
|
-
import { jsx as
|
|
19704
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
19566
19705
|
var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
19567
19706
|
defaultMode = "date",
|
|
19568
19707
|
value: controlledValue,
|
|
@@ -19578,26 +19717,30 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19578
19717
|
onValueChange,
|
|
19579
19718
|
defaultValue: initialValue
|
|
19580
19719
|
});
|
|
19581
|
-
const fixedTime =
|
|
19582
|
-
const [preferredMode, setPreferredMode] = useState40(
|
|
19583
|
-
|
|
19584
|
-
if (!value) return preferredMode;
|
|
19720
|
+
const fixedTime = useMemo42(() => fixedTimeOverride ?? new Date(1970, 0, 1, 23, 59, 59, 999), [fixedTimeOverride]);
|
|
19721
|
+
const [preferredMode, setPreferredMode] = useState40(() => {
|
|
19722
|
+
if (!value) return defaultMode;
|
|
19585
19723
|
if (DateUtils.sameTime(value, fixedTime, true, true)) {
|
|
19586
19724
|
return "date";
|
|
19587
19725
|
}
|
|
19588
19726
|
return "dateTime";
|
|
19589
|
-
}
|
|
19590
|
-
return /* @__PURE__ */
|
|
19727
|
+
});
|
|
19728
|
+
return /* @__PURE__ */ jsx99(
|
|
19591
19729
|
DateTimeInput,
|
|
19592
19730
|
{
|
|
19593
19731
|
...props,
|
|
19594
19732
|
ref: forwardedRef,
|
|
19595
|
-
mode,
|
|
19733
|
+
mode: preferredMode,
|
|
19596
19734
|
value,
|
|
19597
|
-
onValueChange:
|
|
19735
|
+
onValueChange: (value2) => {
|
|
19736
|
+
if (preferredMode === "date")
|
|
19737
|
+
setValue(DateUtils.withTime(value2, fixedTime));
|
|
19738
|
+
else
|
|
19739
|
+
setValue(DateUtils.isLastMillisecondOfDay(value2) ? new Date(value2.getTime() - 1) : new Date(value2.getTime() + 1));
|
|
19740
|
+
},
|
|
19598
19741
|
actions: [
|
|
19599
19742
|
...actions,
|
|
19600
|
-
/* @__PURE__ */
|
|
19743
|
+
/* @__PURE__ */ jsx99(
|
|
19601
19744
|
IconButton,
|
|
19602
19745
|
{
|
|
19603
19746
|
size: "sm",
|
|
@@ -19606,7 +19749,6 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19606
19749
|
tooltip: preferredMode === "date" ? translation("addTime") : translation("withoutTime"),
|
|
19607
19750
|
onClick: () => {
|
|
19608
19751
|
const newMode = preferredMode === "date" ? "dateTime" : "date";
|
|
19609
|
-
setPreferredMode((prev) => prev === "date" ? "dateTime" : "date");
|
|
19610
19752
|
if (value) {
|
|
19611
19753
|
if (newMode === "date") {
|
|
19612
19754
|
setValue(DateUtils.withTime(value, fixedTime));
|
|
@@ -19614,8 +19756,9 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19614
19756
|
setValue(DateUtils.isLastMillisecondOfDay(value) ? new Date(value.getTime() - 1) : new Date(value.getTime() + 1));
|
|
19615
19757
|
}
|
|
19616
19758
|
}
|
|
19759
|
+
setPreferredMode(newMode);
|
|
19617
19760
|
},
|
|
19618
|
-
children: preferredMode === "date" ? /* @__PURE__ */
|
|
19761
|
+
children: preferredMode === "date" ? /* @__PURE__ */ jsx99(ClockPlus, { className: "size-5" }) : /* @__PURE__ */ jsx99(ClockFading, { className: "size-5" })
|
|
19619
19762
|
},
|
|
19620
19763
|
"date-mode"
|
|
19621
19764
|
)
|
|
@@ -19627,8 +19770,8 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19627
19770
|
// src/components/user-interaction/input/InsideLabelInput.tsx
|
|
19628
19771
|
import { useId as useId23 } from "react";
|
|
19629
19772
|
import { forwardRef as forwardRef31, useState as useState41 } from "react";
|
|
19630
|
-
import
|
|
19631
|
-
import { jsx as
|
|
19773
|
+
import clsx38 from "clsx";
|
|
19774
|
+
import { jsx as jsx100, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
19632
19775
|
var InsideLabelInput = forwardRef31(function InsideLabelInput2({
|
|
19633
19776
|
id: customId,
|
|
19634
19777
|
value: controlledValue,
|
|
@@ -19645,8 +19788,8 @@ var InsideLabelInput = forwardRef31(function InsideLabelInput2({
|
|
|
19645
19788
|
const [isFocused, setIsFocused] = useState41(false);
|
|
19646
19789
|
const generatedId = useId23();
|
|
19647
19790
|
const id = customId ?? generatedId;
|
|
19648
|
-
return /* @__PURE__ */
|
|
19649
|
-
/* @__PURE__ */
|
|
19791
|
+
return /* @__PURE__ */ jsxs62("div", { className: clsx38("relative"), children: [
|
|
19792
|
+
/* @__PURE__ */ jsx100(
|
|
19650
19793
|
Input,
|
|
19651
19794
|
{
|
|
19652
19795
|
...props,
|
|
@@ -19663,16 +19806,16 @@ var InsideLabelInput = forwardRef31(function InsideLabelInput2({
|
|
|
19663
19806
|
setIsFocused(false);
|
|
19664
19807
|
},
|
|
19665
19808
|
"aria-labelledby": id + "-label",
|
|
19666
|
-
className:
|
|
19809
|
+
className: clsx38("h-14 px-4 pb-2 py-6.5", props.className)
|
|
19667
19810
|
}
|
|
19668
19811
|
),
|
|
19669
|
-
/* @__PURE__ */
|
|
19812
|
+
/* @__PURE__ */ jsx100(
|
|
19670
19813
|
"label",
|
|
19671
19814
|
{
|
|
19672
19815
|
id: id + "-label",
|
|
19673
19816
|
"aria-hidden": true,
|
|
19674
19817
|
"data-display": isFocused || !!value ? "small" : "full",
|
|
19675
|
-
className:
|
|
19818
|
+
className: clsx38(
|
|
19676
19819
|
// margin left to account for the border which is ignored for absolute positions
|
|
19677
19820
|
"absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
|
|
19678
19821
|
"data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
|
|
@@ -19686,8 +19829,8 @@ var InsideLabelInput = forwardRef31(function InsideLabelInput2({
|
|
|
19686
19829
|
|
|
19687
19830
|
// src/components/user-interaction/input/SearchBar.tsx
|
|
19688
19831
|
import { Search } from "lucide-react";
|
|
19689
|
-
import { clsx as
|
|
19690
|
-
import { jsx as
|
|
19832
|
+
import { clsx as clsx39 } from "clsx";
|
|
19833
|
+
import { jsx as jsx101, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
19691
19834
|
var SearchBar = ({
|
|
19692
19835
|
value: controlledValue,
|
|
19693
19836
|
initialValue,
|
|
@@ -19703,8 +19846,8 @@ var SearchBar = ({
|
|
|
19703
19846
|
onValueChange,
|
|
19704
19847
|
defaultValue: initialValue
|
|
19705
19848
|
});
|
|
19706
|
-
return /* @__PURE__ */
|
|
19707
|
-
/* @__PURE__ */
|
|
19849
|
+
return /* @__PURE__ */ jsxs63("div", { ...containerProps, className: clsx39("relative", containerProps?.className), children: [
|
|
19850
|
+
/* @__PURE__ */ jsx101(
|
|
19708
19851
|
Input,
|
|
19709
19852
|
{
|
|
19710
19853
|
...inputProps,
|
|
@@ -19712,10 +19855,10 @@ var SearchBar = ({
|
|
|
19712
19855
|
onValueChange: setValue,
|
|
19713
19856
|
onEditComplete: onSearch,
|
|
19714
19857
|
placeholder: inputProps.placeholder ?? translation("search"),
|
|
19715
|
-
className:
|
|
19858
|
+
className: clsx39("pr-10 w-full", inputProps.className)
|
|
19716
19859
|
}
|
|
19717
19860
|
),
|
|
19718
|
-
/* @__PURE__ */
|
|
19861
|
+
/* @__PURE__ */ jsx101(
|
|
19719
19862
|
IconButton,
|
|
19720
19863
|
{
|
|
19721
19864
|
...searchButtonProps,
|
|
@@ -19724,18 +19867,18 @@ var SearchBar = ({
|
|
|
19724
19867
|
color: "neutral",
|
|
19725
19868
|
coloringStyle: "text",
|
|
19726
19869
|
onClick: () => onSearch(value),
|
|
19727
|
-
className:
|
|
19728
|
-
children: /* @__PURE__ */
|
|
19870
|
+
className: clsx39("absolute right-1.5 top-1/2 -translate-y-1/2", searchButtonProps?.className),
|
|
19871
|
+
children: /* @__PURE__ */ jsx101(Search, { className: "w-full h-full" })
|
|
19729
19872
|
}
|
|
19730
19873
|
)
|
|
19731
19874
|
] });
|
|
19732
19875
|
};
|
|
19733
19876
|
|
|
19734
19877
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
19735
|
-
import { forwardRef as forwardRef32, useEffect as
|
|
19878
|
+
import { forwardRef as forwardRef32, useEffect as useEffect49, useImperativeHandle as useImperativeHandle16, useRef as useRef40, useState as useState42 } from "react";
|
|
19736
19879
|
import { Pencil } from "lucide-react";
|
|
19737
|
-
import
|
|
19738
|
-
import { jsx as
|
|
19880
|
+
import clsx40 from "clsx";
|
|
19881
|
+
import { jsx as jsx102, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
19739
19882
|
var ToggleableInput = forwardRef32(function ToggleableInput2({
|
|
19740
19883
|
value: controlledValue,
|
|
19741
19884
|
initialValue,
|
|
@@ -19752,13 +19895,13 @@ var ToggleableInput = forwardRef32(function ToggleableInput2({
|
|
|
19752
19895
|
const [isEditing, setIsEditing] = useState42(initialState !== "display");
|
|
19753
19896
|
const innerRef = useRef40(null);
|
|
19754
19897
|
useImperativeHandle16(forwardedRef, () => innerRef.current);
|
|
19755
|
-
|
|
19898
|
+
useEffect49(() => {
|
|
19756
19899
|
if (isEditing) {
|
|
19757
19900
|
innerRef.current?.focus();
|
|
19758
19901
|
}
|
|
19759
19902
|
}, [isEditing]);
|
|
19760
|
-
return /* @__PURE__ */
|
|
19761
|
-
/* @__PURE__ */
|
|
19903
|
+
return /* @__PURE__ */ jsxs64("div", { className: clsx40("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
19904
|
+
/* @__PURE__ */ jsx102(
|
|
19762
19905
|
Input,
|
|
19763
19906
|
{
|
|
19764
19907
|
...props,
|
|
@@ -19782,20 +19925,20 @@ var ToggleableInput = forwardRef32(function ToggleableInput2({
|
|
|
19782
19925
|
"data-name": props["data-name"] ?? "togglable-input"
|
|
19783
19926
|
}
|
|
19784
19927
|
),
|
|
19785
|
-
!isEditing && /* @__PURE__ */
|
|
19786
|
-
/* @__PURE__ */
|
|
19787
|
-
/* @__PURE__ */
|
|
19928
|
+
!isEditing && /* @__PURE__ */ jsxs64("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
19929
|
+
/* @__PURE__ */ jsx102("span", { className: clsx40(" truncate"), children: value }),
|
|
19930
|
+
/* @__PURE__ */ jsx102(Pencil, { className: clsx40(`size-force-4`, { "text-transparent": isEditing }) })
|
|
19788
19931
|
] })
|
|
19789
19932
|
] });
|
|
19790
19933
|
});
|
|
19791
19934
|
|
|
19792
19935
|
// src/components/user-interaction/properties/CheckboxProperty.tsx
|
|
19793
|
-
import { Check as
|
|
19936
|
+
import { Check as Check5 } from "lucide-react";
|
|
19794
19937
|
|
|
19795
19938
|
// src/components/user-interaction/properties/PropertyBase.tsx
|
|
19796
|
-
import
|
|
19939
|
+
import clsx41 from "clsx";
|
|
19797
19940
|
import { AlertTriangle, Trash, X as X3 } from "lucide-react";
|
|
19798
|
-
import { jsx as
|
|
19941
|
+
import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
19799
19942
|
var PropertyBase = ({
|
|
19800
19943
|
name,
|
|
19801
19944
|
children,
|
|
@@ -19814,36 +19957,36 @@ var PropertyBase = ({
|
|
|
19814
19957
|
const isClearEnabled = allowClear && !readOnly;
|
|
19815
19958
|
const isRemoveEnabled = allowRemove && !readOnly;
|
|
19816
19959
|
const showActionsContainer = isClearEnabled || isRemoveEnabled;
|
|
19817
|
-
return /* @__PURE__ */
|
|
19960
|
+
return /* @__PURE__ */ jsxs65(
|
|
19818
19961
|
"div",
|
|
19819
19962
|
{
|
|
19820
|
-
className:
|
|
19963
|
+
className: clsx41("group/property", className),
|
|
19821
19964
|
"data-name": "property-root",
|
|
19822
19965
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19823
19966
|
children: [
|
|
19824
|
-
/* @__PURE__ */
|
|
19967
|
+
/* @__PURE__ */ jsxs65(
|
|
19825
19968
|
"div",
|
|
19826
19969
|
{
|
|
19827
19970
|
"data-name": "property-title",
|
|
19828
19971
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19829
19972
|
children: [
|
|
19830
|
-
/* @__PURE__ */
|
|
19831
|
-
/* @__PURE__ */
|
|
19832
|
-
/* @__PURE__ */
|
|
19973
|
+
/* @__PURE__ */ jsx103(Tooltip, { tooltip: name, containerClassName: "min-w-0", children: /* @__PURE__ */ jsxs65("div", { className: "flex-row-1 items-center", children: [
|
|
19974
|
+
/* @__PURE__ */ jsx103("div", { "data-name": "property-title-icon", children: icon }),
|
|
19975
|
+
/* @__PURE__ */ jsx103("span", { "data-name": "property-title-text", children: name })
|
|
19833
19976
|
] }) }),
|
|
19834
|
-
invalid && /* @__PURE__ */
|
|
19977
|
+
invalid && /* @__PURE__ */ jsx103(AlertTriangle, { className: "size-force-6" })
|
|
19835
19978
|
]
|
|
19836
19979
|
}
|
|
19837
19980
|
),
|
|
19838
|
-
/* @__PURE__ */
|
|
19981
|
+
/* @__PURE__ */ jsxs65(
|
|
19839
19982
|
"div",
|
|
19840
19983
|
{
|
|
19841
19984
|
"data-name": "property-content",
|
|
19842
19985
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19843
19986
|
children: [
|
|
19844
19987
|
children({ required, hasValue, invalid }),
|
|
19845
|
-
showActionsContainer && /* @__PURE__ */
|
|
19846
|
-
isClearEnabled && /* @__PURE__ */
|
|
19988
|
+
showActionsContainer && /* @__PURE__ */ jsxs65("div", { "data-name": "property-actions", children: [
|
|
19989
|
+
isClearEnabled && /* @__PURE__ */ jsx103(
|
|
19847
19990
|
IconButton,
|
|
19848
19991
|
{
|
|
19849
19992
|
tooltip: translation("clearValue"),
|
|
@@ -19852,10 +19995,10 @@ var PropertyBase = ({
|
|
|
19852
19995
|
color: "negative",
|
|
19853
19996
|
coloringStyle: "text",
|
|
19854
19997
|
size: "sm",
|
|
19855
|
-
children: /* @__PURE__ */
|
|
19998
|
+
children: /* @__PURE__ */ jsx103(X3, { className: "size-force-5" })
|
|
19856
19999
|
}
|
|
19857
20000
|
),
|
|
19858
|
-
isRemoveEnabled && /* @__PURE__ */
|
|
20001
|
+
isRemoveEnabled && /* @__PURE__ */ jsx103(
|
|
19859
20002
|
IconButton,
|
|
19860
20003
|
{
|
|
19861
20004
|
tooltip: translation("removeProperty"),
|
|
@@ -19863,7 +20006,7 @@ var PropertyBase = ({
|
|
|
19863
20006
|
color: "negative",
|
|
19864
20007
|
coloringStyle: "text",
|
|
19865
20008
|
size: "sm",
|
|
19866
|
-
children: /* @__PURE__ */
|
|
20009
|
+
children: /* @__PURE__ */ jsx103(Trash, { className: "size-force-5" })
|
|
19867
20010
|
}
|
|
19868
20011
|
)
|
|
19869
20012
|
] })
|
|
@@ -19876,7 +20019,7 @@ var PropertyBase = ({
|
|
|
19876
20019
|
};
|
|
19877
20020
|
|
|
19878
20021
|
// src/components/user-interaction/properties/CheckboxProperty.tsx
|
|
19879
|
-
import { jsx as
|
|
20022
|
+
import { jsx as jsx104, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
19880
20023
|
var CheckboxProperty = ({
|
|
19881
20024
|
value,
|
|
19882
20025
|
onValueChange,
|
|
@@ -19885,15 +20028,15 @@ var CheckboxProperty = ({
|
|
|
19885
20028
|
...baseProps
|
|
19886
20029
|
}) => {
|
|
19887
20030
|
const translation = useHightideTranslation();
|
|
19888
|
-
return /* @__PURE__ */
|
|
20031
|
+
return /* @__PURE__ */ jsx104(
|
|
19889
20032
|
PropertyBase,
|
|
19890
20033
|
{
|
|
19891
20034
|
...baseProps,
|
|
19892
20035
|
hasValue: value !== void 0,
|
|
19893
20036
|
readOnly,
|
|
19894
|
-
icon: /* @__PURE__ */
|
|
19895
|
-
children: () => /* @__PURE__ */
|
|
19896
|
-
/* @__PURE__ */
|
|
20037
|
+
icon: /* @__PURE__ */ jsx104(Check5, { size: 24 }),
|
|
20038
|
+
children: () => /* @__PURE__ */ jsxs66("div", { className: "flex-row-2 items-center", children: [
|
|
20039
|
+
/* @__PURE__ */ jsx104(
|
|
19897
20040
|
Button,
|
|
19898
20041
|
{
|
|
19899
20042
|
color: value ? "positive" : "neutral",
|
|
@@ -19906,7 +20049,7 @@ var CheckboxProperty = ({
|
|
|
19906
20049
|
children: translation("yes")
|
|
19907
20050
|
}
|
|
19908
20051
|
),
|
|
19909
|
-
/* @__PURE__ */
|
|
20052
|
+
/* @__PURE__ */ jsx104(
|
|
19910
20053
|
Button,
|
|
19911
20054
|
{
|
|
19912
20055
|
color: !value && value !== void 0 ? "negative" : "neutral",
|
|
@@ -19926,7 +20069,7 @@ var CheckboxProperty = ({
|
|
|
19926
20069
|
|
|
19927
20070
|
// src/components/user-interaction/properties/DateProperty.tsx
|
|
19928
20071
|
import { CalendarDays } from "lucide-react";
|
|
19929
|
-
import { jsx as
|
|
20072
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
19930
20073
|
var DateProperty = ({
|
|
19931
20074
|
value,
|
|
19932
20075
|
onValueChange,
|
|
@@ -19936,13 +20079,13 @@ var DateProperty = ({
|
|
|
19936
20079
|
...baseProps
|
|
19937
20080
|
}) => {
|
|
19938
20081
|
const hasValue = !!value;
|
|
19939
|
-
return /* @__PURE__ */
|
|
20082
|
+
return /* @__PURE__ */ jsx105(
|
|
19940
20083
|
PropertyBase,
|
|
19941
20084
|
{
|
|
19942
20085
|
...baseProps,
|
|
19943
20086
|
hasValue,
|
|
19944
|
-
icon: /* @__PURE__ */
|
|
19945
|
-
children: ({ invalid }) => /* @__PURE__ */
|
|
20087
|
+
icon: /* @__PURE__ */ jsx105(CalendarDays, { size: 24 }),
|
|
20088
|
+
children: ({ invalid }) => /* @__PURE__ */ jsx105(
|
|
19946
20089
|
DateTimeInput,
|
|
19947
20090
|
{
|
|
19948
20091
|
value,
|
|
@@ -19960,7 +20103,7 @@ var DateProperty = ({
|
|
|
19960
20103
|
|
|
19961
20104
|
// src/components/user-interaction/properties/MultiSelectProperty.tsx
|
|
19962
20105
|
import { List } from "lucide-react";
|
|
19963
|
-
import { jsx as
|
|
20106
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
19964
20107
|
var MultiSelectProperty = ({
|
|
19965
20108
|
children,
|
|
19966
20109
|
value,
|
|
@@ -19969,18 +20112,18 @@ var MultiSelectProperty = ({
|
|
|
19969
20112
|
...props
|
|
19970
20113
|
}) => {
|
|
19971
20114
|
const hasValue = value.length > 0;
|
|
19972
|
-
return /* @__PURE__ */
|
|
20115
|
+
return /* @__PURE__ */ jsx106(
|
|
19973
20116
|
PropertyBase,
|
|
19974
20117
|
{
|
|
19975
20118
|
...props,
|
|
19976
20119
|
hasValue,
|
|
19977
|
-
icon: /* @__PURE__ */
|
|
19978
|
-
children: ({ invalid }) => /* @__PURE__ */
|
|
20120
|
+
icon: /* @__PURE__ */ jsx106(List, { size: 24 }),
|
|
20121
|
+
children: ({ invalid }) => /* @__PURE__ */ jsx106(
|
|
19979
20122
|
"div",
|
|
19980
20123
|
{
|
|
19981
20124
|
"data-name": "property-input-wrapper",
|
|
19982
20125
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19983
|
-
children: /* @__PURE__ */
|
|
20126
|
+
children: /* @__PURE__ */ jsx106(
|
|
19984
20127
|
MultiSelectChipDisplay,
|
|
19985
20128
|
{
|
|
19986
20129
|
value,
|
|
@@ -20007,7 +20150,7 @@ var MultiSelectProperty = ({
|
|
|
20007
20150
|
|
|
20008
20151
|
// src/components/user-interaction/properties/NumberProperty.tsx
|
|
20009
20152
|
import { Binary as Binary2 } from "lucide-react";
|
|
20010
|
-
import { jsx as
|
|
20153
|
+
import { jsx as jsx107, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
20011
20154
|
var NumberProperty = ({
|
|
20012
20155
|
value,
|
|
20013
20156
|
onValueChange,
|
|
@@ -20019,20 +20162,20 @@ var NumberProperty = ({
|
|
|
20019
20162
|
}) => {
|
|
20020
20163
|
const translation = useHightideTranslation();
|
|
20021
20164
|
const hasValue = value !== void 0;
|
|
20022
|
-
return /* @__PURE__ */
|
|
20165
|
+
return /* @__PURE__ */ jsx107(
|
|
20023
20166
|
PropertyBase,
|
|
20024
20167
|
{
|
|
20025
20168
|
...baseProps,
|
|
20026
20169
|
onValueClear,
|
|
20027
20170
|
hasValue,
|
|
20028
|
-
icon: /* @__PURE__ */
|
|
20029
|
-
children: ({ invalid }) => /* @__PURE__ */
|
|
20171
|
+
icon: /* @__PURE__ */ jsx107(Binary2, { size: 24 }),
|
|
20172
|
+
children: ({ invalid }) => /* @__PURE__ */ jsxs67(
|
|
20030
20173
|
"div",
|
|
20031
20174
|
{
|
|
20032
20175
|
"data-name": "property-input-wrapper",
|
|
20033
20176
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
20034
20177
|
children: [
|
|
20035
|
-
/* @__PURE__ */
|
|
20178
|
+
/* @__PURE__ */ jsx107(
|
|
20036
20179
|
Input,
|
|
20037
20180
|
{
|
|
20038
20181
|
"data-name": "property-input",
|
|
@@ -20060,7 +20203,7 @@ var NumberProperty = ({
|
|
|
20060
20203
|
}
|
|
20061
20204
|
}
|
|
20062
20205
|
),
|
|
20063
|
-
suffix && /* @__PURE__ */
|
|
20206
|
+
suffix && /* @__PURE__ */ jsx107(
|
|
20064
20207
|
"span",
|
|
20065
20208
|
{
|
|
20066
20209
|
"data-name": "property-suffix",
|
|
@@ -20077,7 +20220,7 @@ var NumberProperty = ({
|
|
|
20077
20220
|
|
|
20078
20221
|
// src/components/user-interaction/properties/SelectProperty.tsx
|
|
20079
20222
|
import { List as List2 } from "lucide-react";
|
|
20080
|
-
import { jsx as
|
|
20223
|
+
import { jsx as jsx108, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
20081
20224
|
var SingleSelectProperty = ({
|
|
20082
20225
|
children,
|
|
20083
20226
|
value,
|
|
@@ -20086,18 +20229,18 @@ var SingleSelectProperty = ({
|
|
|
20086
20229
|
...props
|
|
20087
20230
|
}) => {
|
|
20088
20231
|
const hasValue = value !== void 0;
|
|
20089
|
-
return /* @__PURE__ */
|
|
20232
|
+
return /* @__PURE__ */ jsx108(
|
|
20090
20233
|
PropertyBase,
|
|
20091
20234
|
{
|
|
20092
20235
|
...props,
|
|
20093
20236
|
hasValue,
|
|
20094
|
-
icon: /* @__PURE__ */
|
|
20095
|
-
children: ({ invalid }) => /* @__PURE__ */
|
|
20237
|
+
icon: /* @__PURE__ */ jsx108(List2, { size: 24 }),
|
|
20238
|
+
children: ({ invalid }) => /* @__PURE__ */ jsx108(
|
|
20096
20239
|
"div",
|
|
20097
20240
|
{
|
|
20098
20241
|
"data-name": "property-input-wrapper",
|
|
20099
20242
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
20100
|
-
children: /* @__PURE__ */
|
|
20243
|
+
children: /* @__PURE__ */ jsxs68(
|
|
20101
20244
|
SelectRoot,
|
|
20102
20245
|
{
|
|
20103
20246
|
value,
|
|
@@ -20107,7 +20250,7 @@ var SingleSelectProperty = ({
|
|
|
20107
20250
|
},
|
|
20108
20251
|
disabled: props.readOnly,
|
|
20109
20252
|
children: [
|
|
20110
|
-
/* @__PURE__ */
|
|
20253
|
+
/* @__PURE__ */ jsx108(
|
|
20111
20254
|
SelectButton,
|
|
20112
20255
|
{
|
|
20113
20256
|
className: "flex-row-2 w-full items-center justify-between",
|
|
@@ -20115,7 +20258,7 @@ var SingleSelectProperty = ({
|
|
|
20115
20258
|
"data-name": "property-input"
|
|
20116
20259
|
}
|
|
20117
20260
|
),
|
|
20118
|
-
/* @__PURE__ */
|
|
20261
|
+
/* @__PURE__ */ jsx108(SelectContent, { children })
|
|
20119
20262
|
]
|
|
20120
20263
|
}
|
|
20121
20264
|
)
|
|
@@ -20127,7 +20270,7 @@ var SingleSelectProperty = ({
|
|
|
20127
20270
|
|
|
20128
20271
|
// src/components/user-interaction/properties/TextProperty.tsx
|
|
20129
20272
|
import { Text } from "lucide-react";
|
|
20130
|
-
import { jsx as
|
|
20273
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
20131
20274
|
var TextProperty = ({
|
|
20132
20275
|
value,
|
|
20133
20276
|
readOnly,
|
|
@@ -20137,13 +20280,13 @@ var TextProperty = ({
|
|
|
20137
20280
|
}) => {
|
|
20138
20281
|
const translation = useHightideTranslation();
|
|
20139
20282
|
const hasValue = value !== void 0;
|
|
20140
|
-
return /* @__PURE__ */
|
|
20283
|
+
return /* @__PURE__ */ jsx109(
|
|
20141
20284
|
PropertyBase,
|
|
20142
20285
|
{
|
|
20143
20286
|
...baseProps,
|
|
20144
20287
|
hasValue,
|
|
20145
|
-
icon: /* @__PURE__ */
|
|
20146
|
-
children: ({ invalid }) => /* @__PURE__ */
|
|
20288
|
+
icon: /* @__PURE__ */ jsx109(Text, { size: 24 }),
|
|
20289
|
+
children: ({ invalid }) => /* @__PURE__ */ jsx109(
|
|
20147
20290
|
Textarea,
|
|
20148
20291
|
{
|
|
20149
20292
|
"data-name": "property-input",
|
|
@@ -20164,7 +20307,7 @@ var TextProperty = ({
|
|
|
20164
20307
|
// src/components/utils/Polymorphic.tsx
|
|
20165
20308
|
import { Slot } from "@radix-ui/react-slot";
|
|
20166
20309
|
import { forwardRef as forwardRef33 } from "react";
|
|
20167
|
-
import { jsx as
|
|
20310
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
20168
20311
|
var PolymorphicSlot = forwardRef33(function PolymorphicSlot2({
|
|
20169
20312
|
children,
|
|
20170
20313
|
asChild,
|
|
@@ -20172,11 +20315,11 @@ var PolymorphicSlot = forwardRef33(function PolymorphicSlot2({
|
|
|
20172
20315
|
...props
|
|
20173
20316
|
}, ref) {
|
|
20174
20317
|
const Component = asChild ? Slot : defaultComponent;
|
|
20175
|
-
return /* @__PURE__ */
|
|
20318
|
+
return /* @__PURE__ */ jsx110(Component, { ...props, ref, children });
|
|
20176
20319
|
});
|
|
20177
20320
|
|
|
20178
20321
|
// src/components/utils/Transition.tsx
|
|
20179
|
-
import { useEffect as
|
|
20322
|
+
import { useEffect as useEffect50, useState as useState43 } from "react";
|
|
20180
20323
|
function Transition({
|
|
20181
20324
|
children,
|
|
20182
20325
|
show,
|
|
@@ -20185,7 +20328,7 @@ function Transition({
|
|
|
20185
20328
|
const [isOpen, setIsOpen] = useState43(show);
|
|
20186
20329
|
const [isTransitioning, setIsTransitioning] = useState43(!isOpen);
|
|
20187
20330
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
20188
|
-
|
|
20331
|
+
useEffect50(() => {
|
|
20189
20332
|
setIsOpen(show);
|
|
20190
20333
|
setIsTransitioning(true);
|
|
20191
20334
|
}, [show]);
|
|
@@ -20210,18 +20353,18 @@ function Transition({
|
|
|
20210
20353
|
}
|
|
20211
20354
|
|
|
20212
20355
|
// src/global-contexts/HightideProvider.tsx
|
|
20213
|
-
import { jsx as
|
|
20356
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
20214
20357
|
var HightideProvider = ({
|
|
20215
20358
|
children,
|
|
20216
20359
|
theme,
|
|
20217
20360
|
locale,
|
|
20218
20361
|
config
|
|
20219
20362
|
}) => {
|
|
20220
|
-
return /* @__PURE__ */
|
|
20363
|
+
return /* @__PURE__ */ jsx111(LocaleProvider, { ...locale, children: /* @__PURE__ */ jsx111(ThemeProvider, { ...theme, children: /* @__PURE__ */ jsx111(HightideConfigProvider, { ...config, children }) }) });
|
|
20221
20364
|
};
|
|
20222
20365
|
|
|
20223
20366
|
// src/hooks/focus/useFocusGuards.ts
|
|
20224
|
-
import { useEffect as
|
|
20367
|
+
import { useEffect as useEffect51 } from "react";
|
|
20225
20368
|
var selectorName = "data-hw-focus-guard";
|
|
20226
20369
|
function FocusGuard() {
|
|
20227
20370
|
const element = document.createElement("div");
|
|
@@ -20259,7 +20402,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
20259
20402
|
}
|
|
20260
20403
|
};
|
|
20261
20404
|
var useFocusGuards = () => {
|
|
20262
|
-
|
|
20405
|
+
useEffect51(() => {
|
|
20263
20406
|
FocusGuardsService.getInstance().add();
|
|
20264
20407
|
return () => {
|
|
20265
20408
|
FocusGuardsService.getInstance().remove();
|
|
@@ -20268,10 +20411,10 @@ var useFocusGuards = () => {
|
|
|
20268
20411
|
};
|
|
20269
20412
|
|
|
20270
20413
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
20271
|
-
import React5, { useEffect as
|
|
20414
|
+
import React5, { useEffect as useEffect52 } from "react";
|
|
20272
20415
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
20273
20416
|
const [hasUsedFocus, setHasUsedFocus] = React5.useState(false);
|
|
20274
|
-
|
|
20417
|
+
useEffect52(() => {
|
|
20275
20418
|
if (disable || hasUsedFocus) {
|
|
20276
20419
|
return;
|
|
20277
20420
|
}
|
|
@@ -20291,9 +20434,9 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
20291
20434
|
};
|
|
20292
20435
|
|
|
20293
20436
|
// src/hooks/focus/useIsMounted.ts
|
|
20294
|
-
import { useEffect as
|
|
20437
|
+
import { useEffect as useEffect53, useLayoutEffect as useLayoutEffect7, useState as useState44 } from "react";
|
|
20295
20438
|
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
20296
|
-
var useIsomorphicEffect = isClient ? useLayoutEffect7 :
|
|
20439
|
+
var useIsomorphicEffect = isClient ? useLayoutEffect7 : useEffect53;
|
|
20297
20440
|
var useIsMounted = () => {
|
|
20298
20441
|
const [isMounted, setIsMounted] = useState44(false);
|
|
20299
20442
|
useIsomorphicEffect(() => {
|
|
@@ -20306,10 +20449,10 @@ var useIsMounted = () => {
|
|
|
20306
20449
|
};
|
|
20307
20450
|
|
|
20308
20451
|
// src/hooks/useHandleRefs.ts
|
|
20309
|
-
import { useEffect as
|
|
20452
|
+
import { useEffect as useEffect54, useRef as useRef41 } from "react";
|
|
20310
20453
|
function useHandleRefs(handleRef) {
|
|
20311
20454
|
const refs = useRef41([]);
|
|
20312
|
-
|
|
20455
|
+
useEffect54(() => {
|
|
20313
20456
|
refs.current = Object.keys(handleRef?.current ?? {}).map(
|
|
20314
20457
|
() => ({ current: null })
|
|
20315
20458
|
);
|
|
@@ -20347,10 +20490,10 @@ function useLogUnstableDependencies(name, value) {
|
|
|
20347
20490
|
}
|
|
20348
20491
|
|
|
20349
20492
|
// src/hooks/useOverwritableState.ts
|
|
20350
|
-
import { useEffect as
|
|
20493
|
+
import { useEffect as useEffect55, useState as useState45 } from "react";
|
|
20351
20494
|
var useOverwritableState = (overwriteValue, onChange) => {
|
|
20352
20495
|
const [state, setState] = useState45(overwriteValue);
|
|
20353
|
-
|
|
20496
|
+
useEffect55(() => {
|
|
20354
20497
|
setState(overwriteValue);
|
|
20355
20498
|
}, [overwriteValue]);
|
|
20356
20499
|
const onChangeWrapper = (action) => {
|
|
@@ -20368,7 +20511,7 @@ var useRerender = () => {
|
|
|
20368
20511
|
};
|
|
20369
20512
|
|
|
20370
20513
|
// src/hooks/useUpdatingDateString.ts
|
|
20371
|
-
import { useEffect as
|
|
20514
|
+
import { useEffect as useEffect56, useState as useState46 } from "react";
|
|
20372
20515
|
var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, date }) => {
|
|
20373
20516
|
const { locale: contextLocale } = useLocale();
|
|
20374
20517
|
const locale = localeOverride ?? contextLocale;
|
|
@@ -20377,14 +20520,14 @@ var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, date
|
|
|
20377
20520
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
20378
20521
|
relative: DateUtils.formatRelative(date, locale)
|
|
20379
20522
|
});
|
|
20380
|
-
|
|
20523
|
+
useEffect56(() => {
|
|
20381
20524
|
setDateAndTimeStrings({
|
|
20382
20525
|
compareDate: date,
|
|
20383
20526
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
20384
20527
|
relative: DateUtils.formatRelative(date, locale)
|
|
20385
20528
|
});
|
|
20386
20529
|
}, [date, absoluteFormat, locale]);
|
|
20387
|
-
|
|
20530
|
+
useEffect56(() => {
|
|
20388
20531
|
let timeoutId;
|
|
20389
20532
|
const startTimer = () => {
|
|
20390
20533
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -20420,7 +20563,7 @@ var validateEmail = (email) => {
|
|
|
20420
20563
|
};
|
|
20421
20564
|
|
|
20422
20565
|
// src/hooks/useValidators.ts
|
|
20423
|
-
import { useMemo as
|
|
20566
|
+
import { useMemo as useMemo43 } from "react";
|
|
20424
20567
|
var notEmpty = (value) => {
|
|
20425
20568
|
if (!value) {
|
|
20426
20569
|
return "notEmpty";
|
|
@@ -20470,7 +20613,7 @@ var UseValidators = {
|
|
|
20470
20613
|
};
|
|
20471
20614
|
var useTranslatedValidators = () => {
|
|
20472
20615
|
const translation = useHightideTranslation();
|
|
20473
|
-
return
|
|
20616
|
+
return useMemo43(() => ({
|
|
20474
20617
|
notEmpty: (value) => {
|
|
20475
20618
|
const result = notEmpty(value);
|
|
20476
20619
|
if (result) {
|
|
@@ -20871,6 +21014,7 @@ export {
|
|
|
20871
21014
|
SimpleSearch,
|
|
20872
21015
|
SimpleSearchWithMapping,
|
|
20873
21016
|
SingleSelectProperty,
|
|
21017
|
+
SortingList,
|
|
20874
21018
|
StepperBar,
|
|
20875
21019
|
StorageListener,
|
|
20876
21020
|
Switch,
|