@helpwave/hightide 0.9.3 → 0.9.5
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 +15 -11
- package/dist/index.d.ts +15 -11
- package/dist/index.js +630 -625
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +543 -538
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +54 -5
- package/dist/style/uncompiled/theme/components/property.css +39 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14396,40 +14396,40 @@ function isParameterValidForOperator(dataType, operator, parameter) {
|
|
|
14396
14396
|
}
|
|
14397
14397
|
switch (dataType) {
|
|
14398
14398
|
case "text": {
|
|
14399
|
-
return typeof parameter.
|
|
14399
|
+
return typeof parameter.stringValue === "string";
|
|
14400
14400
|
}
|
|
14401
14401
|
case "number": {
|
|
14402
14402
|
if (operator === "between" || operator === "notBetween") {
|
|
14403
|
-
const min = parameter.
|
|
14404
|
-
const max = parameter.
|
|
14403
|
+
const min = parameter.numberMin;
|
|
14404
|
+
const max = parameter.numberMax;
|
|
14405
14405
|
return typeof min === "number" && !Number.isNaN(min) && typeof max === "number" && !Number.isNaN(max) && min <= max;
|
|
14406
14406
|
}
|
|
14407
|
-
const v = parameter.
|
|
14407
|
+
const v = parameter.numberValue;
|
|
14408
14408
|
return typeof v === "number" && !Number.isNaN(v);
|
|
14409
14409
|
}
|
|
14410
14410
|
case "date":
|
|
14411
14411
|
case "dateTime": {
|
|
14412
14412
|
if (operator === "between" || operator === "notBetween") {
|
|
14413
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14414
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14413
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14414
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14415
14415
|
if (!minDate || !maxDate) return false;
|
|
14416
14416
|
const minNorm = dataType === "date" ? DateUtils.toOnlyDate(minDate).getTime() : DateUtils.toDateTimeOnly(minDate).getTime();
|
|
14417
14417
|
const maxNorm = dataType === "date" ? DateUtils.toOnlyDate(maxDate).getTime() : DateUtils.toDateTimeOnly(maxDate).getTime();
|
|
14418
14418
|
return minNorm <= maxNorm;
|
|
14419
14419
|
}
|
|
14420
|
-
return DateUtils.tryParseDate(parameter.
|
|
14420
|
+
return DateUtils.tryParseDate(parameter.dateValue) != null;
|
|
14421
14421
|
}
|
|
14422
14422
|
case "boolean":
|
|
14423
14423
|
return true;
|
|
14424
14424
|
case "multiTags": {
|
|
14425
|
-
return Array.isArray(parameter.
|
|
14425
|
+
return Array.isArray(parameter.uuidValues);
|
|
14426
14426
|
}
|
|
14427
14427
|
case "singleTag": {
|
|
14428
14428
|
if (operator === "contains" || operator === "notContains") {
|
|
14429
|
-
return Array.isArray(parameter.
|
|
14429
|
+
return Array.isArray(parameter.uuidValues);
|
|
14430
14430
|
}
|
|
14431
14431
|
if (operator === "equals" || operator === "notEquals") {
|
|
14432
|
-
return typeof parameter.
|
|
14432
|
+
return typeof parameter.uuidValue === "string";
|
|
14433
14433
|
}
|
|
14434
14434
|
return true;
|
|
14435
14435
|
}
|
|
@@ -14451,9 +14451,8 @@ var FilterValueUtils = {
|
|
|
14451
14451
|
isValid: isFilterValueValid
|
|
14452
14452
|
};
|
|
14453
14453
|
function filterText(value, operator, parameter) {
|
|
14454
|
-
const
|
|
14455
|
-
const
|
|
14456
|
-
const cellText = isCaseSensitive ? value?.toString() ?? "" : value?.toString().toLowerCase() ?? "";
|
|
14454
|
+
const searchText = parameter.stringValue ?? "";
|
|
14455
|
+
const cellText = value?.toString() ?? "";
|
|
14457
14456
|
switch (operator) {
|
|
14458
14457
|
case "equals":
|
|
14459
14458
|
return cellText === searchText;
|
|
@@ -14487,21 +14486,21 @@ function filterNumber(value, operator, parameter) {
|
|
|
14487
14486
|
}
|
|
14488
14487
|
switch (operator) {
|
|
14489
14488
|
case "equals":
|
|
14490
|
-
return value === parameter.
|
|
14489
|
+
return value === parameter.numberValue;
|
|
14491
14490
|
case "notEquals":
|
|
14492
|
-
return value !== parameter.
|
|
14491
|
+
return value !== parameter.numberValue;
|
|
14493
14492
|
case "greaterThan":
|
|
14494
|
-
return value > (parameter.
|
|
14493
|
+
return value > (parameter.numberValue ?? 0);
|
|
14495
14494
|
case "greaterThanOrEqual":
|
|
14496
|
-
return value >= (parameter.
|
|
14495
|
+
return value >= (parameter.numberValue ?? 0);
|
|
14497
14496
|
case "lessThan":
|
|
14498
|
-
return value < (parameter.
|
|
14497
|
+
return value < (parameter.numberValue ?? 0);
|
|
14499
14498
|
case "lessThanOrEqual":
|
|
14500
|
-
return value <= (parameter.
|
|
14499
|
+
return value <= (parameter.numberValue ?? 0);
|
|
14501
14500
|
case "between":
|
|
14502
|
-
return value >= (parameter.
|
|
14501
|
+
return value >= (parameter.numberMin ?? -Infinity) && value <= (parameter.numberMax ?? Infinity);
|
|
14503
14502
|
case "notBetween":
|
|
14504
|
-
return value < (parameter.
|
|
14503
|
+
return value < (parameter.numberMin ?? -Infinity) || value > (parameter.numberMax ?? Infinity);
|
|
14505
14504
|
case "isUndefined":
|
|
14506
14505
|
return value === void 0 || value === null;
|
|
14507
14506
|
case "isNotUndefined":
|
|
@@ -14524,44 +14523,44 @@ function filterDate(value, operator, parameter) {
|
|
|
14524
14523
|
const normalizedDate = DateUtils.toOnlyDate(date);
|
|
14525
14524
|
switch (operator) {
|
|
14526
14525
|
case "equals": {
|
|
14527
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14526
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14528
14527
|
if (!filterDate2) return false;
|
|
14529
14528
|
return normalizedDate.getTime() === DateUtils.toOnlyDate(filterDate2).getTime();
|
|
14530
14529
|
}
|
|
14531
14530
|
case "notEquals": {
|
|
14532
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14531
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14533
14532
|
if (!filterDate2) return false;
|
|
14534
14533
|
return normalizedDate.getTime() !== DateUtils.toOnlyDate(filterDate2).getTime();
|
|
14535
14534
|
}
|
|
14536
14535
|
case "greaterThan": {
|
|
14537
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14536
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14538
14537
|
if (!filterDate2) return false;
|
|
14539
14538
|
return normalizedDate > DateUtils.toOnlyDate(filterDate2);
|
|
14540
14539
|
}
|
|
14541
14540
|
case "greaterThanOrEqual": {
|
|
14542
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14541
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14543
14542
|
if (!filterDate2) return false;
|
|
14544
14543
|
return normalizedDate >= DateUtils.toOnlyDate(filterDate2);
|
|
14545
14544
|
}
|
|
14546
14545
|
case "lessThan": {
|
|
14547
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14546
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14548
14547
|
if (!filterDate2) return false;
|
|
14549
14548
|
return normalizedDate < DateUtils.toOnlyDate(filterDate2);
|
|
14550
14549
|
}
|
|
14551
14550
|
case "lessThanOrEqual": {
|
|
14552
|
-
const filterDate2 = DateUtils.tryParseDate(parameter.
|
|
14551
|
+
const filterDate2 = DateUtils.tryParseDate(parameter.dateValue);
|
|
14553
14552
|
if (!filterDate2) return false;
|
|
14554
14553
|
return normalizedDate <= DateUtils.toOnlyDate(filterDate2);
|
|
14555
14554
|
}
|
|
14556
14555
|
case "between": {
|
|
14557
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14558
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14556
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14557
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14559
14558
|
if (!minDate || !maxDate) return false;
|
|
14560
14559
|
return normalizedDate >= DateUtils.toOnlyDate(minDate) && normalizedDate <= DateUtils.toOnlyDate(maxDate);
|
|
14561
14560
|
}
|
|
14562
14561
|
case "notBetween": {
|
|
14563
|
-
const minDate = DateUtils.tryParseDate(parameter.
|
|
14564
|
-
const maxDate = DateUtils.tryParseDate(parameter.
|
|
14562
|
+
const minDate = DateUtils.tryParseDate(parameter.dateMin);
|
|
14563
|
+
const maxDate = DateUtils.tryParseDate(parameter.dateMax);
|
|
14565
14564
|
if (!minDate || !maxDate) return false;
|
|
14566
14565
|
return normalizedDate < DateUtils.toOnlyDate(minDate) || normalizedDate > DateUtils.toOnlyDate(maxDate);
|
|
14567
14566
|
}
|
|
@@ -14583,44 +14582,44 @@ function filterDateTime(value, operator, parameter) {
|
|
|
14583
14582
|
const normalizedDatetime = DateUtils.toDateTimeOnly(dateTime);
|
|
14584
14583
|
switch (operator) {
|
|
14585
14584
|
case "equals": {
|
|
14586
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14585
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14587
14586
|
if (!filterDatetime) return false;
|
|
14588
14587
|
return normalizedDatetime.getTime() === DateUtils.toDateTimeOnly(filterDatetime).getTime();
|
|
14589
14588
|
}
|
|
14590
14589
|
case "notEquals": {
|
|
14591
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14590
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14592
14591
|
if (!filterDatetime) return false;
|
|
14593
14592
|
return normalizedDatetime.getTime() !== DateUtils.toDateTimeOnly(filterDatetime).getTime();
|
|
14594
14593
|
}
|
|
14595
14594
|
case "greaterThan": {
|
|
14596
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14595
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14597
14596
|
if (!filterDatetime) return false;
|
|
14598
14597
|
return normalizedDatetime > DateUtils.toDateTimeOnly(filterDatetime);
|
|
14599
14598
|
}
|
|
14600
14599
|
case "greaterThanOrEqual": {
|
|
14601
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14600
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14602
14601
|
if (!filterDatetime) return false;
|
|
14603
14602
|
return normalizedDatetime >= DateUtils.toDateTimeOnly(filterDatetime);
|
|
14604
14603
|
}
|
|
14605
14604
|
case "lessThan": {
|
|
14606
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14605
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14607
14606
|
if (!filterDatetime) return false;
|
|
14608
14607
|
return normalizedDatetime < DateUtils.toDateTimeOnly(filterDatetime);
|
|
14609
14608
|
}
|
|
14610
14609
|
case "lessThanOrEqual": {
|
|
14611
|
-
const filterDatetime = DateUtils.tryParseDate(parameter.
|
|
14610
|
+
const filterDatetime = DateUtils.tryParseDate(parameter.dateValue);
|
|
14612
14611
|
if (!filterDatetime) return false;
|
|
14613
14612
|
return normalizedDatetime <= DateUtils.toDateTimeOnly(filterDatetime);
|
|
14614
14613
|
}
|
|
14615
14614
|
case "between": {
|
|
14616
|
-
const minDatetime = DateUtils.tryParseDate(parameter.
|
|
14617
|
-
const maxDatetime = DateUtils.tryParseDate(parameter.
|
|
14615
|
+
const minDatetime = DateUtils.tryParseDate(parameter.dateMin);
|
|
14616
|
+
const maxDatetime = DateUtils.tryParseDate(parameter.dateMax);
|
|
14618
14617
|
if (!minDatetime || !maxDatetime) return false;
|
|
14619
14618
|
return normalizedDatetime >= DateUtils.toDateTimeOnly(minDatetime) && normalizedDatetime <= DateUtils.toDateTimeOnly(maxDatetime);
|
|
14620
14619
|
}
|
|
14621
14620
|
case "notBetween": {
|
|
14622
|
-
const minDatetime = DateUtils.tryParseDate(parameter.
|
|
14623
|
-
const maxDatetime = DateUtils.tryParseDate(parameter.
|
|
14621
|
+
const minDatetime = DateUtils.tryParseDate(parameter.dateMin);
|
|
14622
|
+
const maxDatetime = DateUtils.tryParseDate(parameter.dateMax);
|
|
14624
14623
|
if (!minDatetime || !maxDatetime) return false;
|
|
14625
14624
|
return normalizedDatetime < DateUtils.toDateTimeOnly(minDatetime) || normalizedDatetime > DateUtils.toDateTimeOnly(maxDatetime);
|
|
14626
14625
|
}
|
|
@@ -14645,28 +14644,28 @@ function filterBoolean(value, operator) {
|
|
|
14645
14644
|
function filterMultiTags(value, operator, parameter) {
|
|
14646
14645
|
switch (operator) {
|
|
14647
14646
|
case "equals": {
|
|
14648
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14649
|
-
if (value.length !== parameter.
|
|
14647
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return false;
|
|
14648
|
+
if (value.length !== parameter.uuidValues.length) return false;
|
|
14650
14649
|
const valueSet = new Set(value);
|
|
14651
|
-
const searchTagsSet = new Set(parameter.
|
|
14650
|
+
const searchTagsSet = new Set(parameter.uuidValues);
|
|
14652
14651
|
if (valueSet.size !== searchTagsSet.size) return false;
|
|
14653
14652
|
return Array.from(valueSet).every((tag) => searchTagsSet.has(tag));
|
|
14654
14653
|
}
|
|
14655
14654
|
case "notEquals": {
|
|
14656
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14657
|
-
if (value.length !== parameter.
|
|
14655
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return true;
|
|
14656
|
+
if (value.length !== parameter.uuidValues.length) return true;
|
|
14658
14657
|
const valueSet = new Set(value);
|
|
14659
|
-
const searchTagsSet = new Set(parameter.
|
|
14658
|
+
const searchTagsSet = new Set(parameter.uuidValues);
|
|
14660
14659
|
if (valueSet.size !== searchTagsSet.size) return true;
|
|
14661
14660
|
return !Array.from(valueSet).every((tag) => searchTagsSet.has(tag));
|
|
14662
14661
|
}
|
|
14663
14662
|
case "contains": {
|
|
14664
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14665
|
-
return parameter.
|
|
14663
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return false;
|
|
14664
|
+
return parameter.uuidValues.every((tag) => value.includes(tag));
|
|
14666
14665
|
}
|
|
14667
14666
|
case "notContains": {
|
|
14668
|
-
if (!Array.isArray(value) || !Array.isArray(parameter.
|
|
14669
|
-
return !parameter.
|
|
14667
|
+
if (!Array.isArray(value) || !Array.isArray(parameter.uuidValues)) return true;
|
|
14668
|
+
return !parameter.uuidValues.every((tag) => value.includes(tag));
|
|
14670
14669
|
}
|
|
14671
14670
|
case "isUndefined":
|
|
14672
14671
|
return value === void 0 || value === null;
|
|
@@ -14679,13 +14678,13 @@ function filterMultiTags(value, operator, parameter) {
|
|
|
14679
14678
|
function filterSingleTag(value, operator, parameter) {
|
|
14680
14679
|
switch (operator) {
|
|
14681
14680
|
case "equals":
|
|
14682
|
-
return value === parameter.
|
|
14681
|
+
return value === parameter.uuidValue;
|
|
14683
14682
|
case "notEquals":
|
|
14684
|
-
return value !== parameter.
|
|
14683
|
+
return value !== parameter.uuidValue;
|
|
14685
14684
|
case "contains":
|
|
14686
|
-
return parameter.
|
|
14685
|
+
return parameter.uuidValues?.includes(value) ?? false;
|
|
14687
14686
|
case "notContains":
|
|
14688
|
-
return !(parameter.
|
|
14687
|
+
return !(parameter.uuidValues?.includes(value) ?? false);
|
|
14689
14688
|
case "isUndefined":
|
|
14690
14689
|
return value === void 0 || value === null;
|
|
14691
14690
|
case "isNotUndefined":
|
|
@@ -14733,81 +14732,81 @@ function useFilterValueTranslation() {
|
|
|
14733
14732
|
switch (value.operator) {
|
|
14734
14733
|
case "equals":
|
|
14735
14734
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14736
|
-
return translation("rEquals", { value: formatDateParam(p.
|
|
14735
|
+
return translation("rEquals", { value: formatDateParam(p.dateValue, locale, dateFormat) ?? "-" });
|
|
14737
14736
|
}
|
|
14738
14737
|
if (value.dataType === "singleTag") {
|
|
14739
|
-
return translation("rEquals", { value: tagToLabel(tags, p.
|
|
14738
|
+
return translation("rEquals", { value: tagToLabel(tags, p.uuidValue) });
|
|
14740
14739
|
}
|
|
14741
14740
|
if (value.dataType === "multiTags") {
|
|
14742
|
-
const valueStr = (p.
|
|
14741
|
+
const valueStr = (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14743
14742
|
return translation("rEquals", { value: valueStr });
|
|
14744
14743
|
}
|
|
14745
|
-
return translation("rEquals", { value: String(p.
|
|
14744
|
+
return translation("rEquals", { value: String(p.stringValue ?? p.numberValue ?? "") });
|
|
14746
14745
|
case "notEquals":
|
|
14747
14746
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14748
|
-
return translation("rNotEquals", { value: formatDateParam(p.
|
|
14747
|
+
return translation("rNotEquals", { value: formatDateParam(p.dateValue, locale, dateFormat) });
|
|
14749
14748
|
}
|
|
14750
14749
|
if (value.dataType === "singleTag") {
|
|
14751
|
-
return translation("rNotEquals", { value: tagToLabel(tags, p.
|
|
14750
|
+
return translation("rNotEquals", { value: tagToLabel(tags, p.uuidValue) });
|
|
14752
14751
|
}
|
|
14753
14752
|
if (value.dataType === "multiTags") {
|
|
14754
|
-
const valueStr = (p.
|
|
14753
|
+
const valueStr = (p.uuidValues ?? []).map((v) => tagToLabel(tags, v)).join(", ");
|
|
14755
14754
|
return translation("rNotEquals", { value: valueStr });
|
|
14756
14755
|
}
|
|
14757
|
-
return translation("rNotEquals", { value: String(p.
|
|
14756
|
+
return translation("rNotEquals", { value: String(p.stringValue ?? p.numberValue ?? "") });
|
|
14758
14757
|
case "contains":
|
|
14759
14758
|
if (value.dataType === "multiTags" || value.dataType === "singleTag") {
|
|
14760
|
-
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(", ");
|
|
14761
14760
|
return translation("rContains", { value: valueStr });
|
|
14762
14761
|
}
|
|
14763
|
-
return translation("rContains", { value: String(p.
|
|
14762
|
+
return translation("rContains", { value: String(p.stringValue ?? "") });
|
|
14764
14763
|
case "notContains":
|
|
14765
14764
|
if (value.dataType === "multiTags" || value.dataType === "singleTag") {
|
|
14766
|
-
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(", ");
|
|
14767
14766
|
return translation("rNotContains", { value: valueStr });
|
|
14768
14767
|
}
|
|
14769
|
-
return translation("rNotContains", { value: `"${String(p.
|
|
14768
|
+
return translation("rNotContains", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14770
14769
|
case "startsWith":
|
|
14771
|
-
return translation("rStartsWith", { value: `"${String(p.
|
|
14770
|
+
return translation("rStartsWith", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14772
14771
|
case "endsWith":
|
|
14773
|
-
return translation("rEndsWith", { value: `"${String(p.
|
|
14772
|
+
return translation("rEndsWith", { value: `"${String(p.stringValue ?? "")}"` });
|
|
14774
14773
|
case "greaterThan":
|
|
14775
14774
|
return translation("rGreaterThan", {
|
|
14776
|
-
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 ?? "-")
|
|
14777
14776
|
});
|
|
14778
14777
|
case "greaterThanOrEqual":
|
|
14779
14778
|
return translation("rGreaterThanOrEqual", {
|
|
14780
|
-
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 ?? "-")
|
|
14781
14780
|
});
|
|
14782
14781
|
case "lessThan":
|
|
14783
14782
|
return translation("rLessThan", {
|
|
14784
|
-
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 ?? "-")
|
|
14785
14784
|
});
|
|
14786
14785
|
case "lessThanOrEqual":
|
|
14787
14786
|
return translation("rLessThanOrEqual", {
|
|
14788
|
-
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 ?? "-")
|
|
14789
14788
|
});
|
|
14790
14789
|
case "between":
|
|
14791
14790
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14792
14791
|
return translation("rBetween", {
|
|
14793
|
-
value1: formatDateParam(p.
|
|
14794
|
-
value2: formatDateParam(p.
|
|
14792
|
+
value1: formatDateParam(p.dateMin, locale, dateFormat) ?? "-",
|
|
14793
|
+
value2: formatDateParam(p.dateMax, locale, dateFormat) ?? "-"
|
|
14795
14794
|
});
|
|
14796
14795
|
}
|
|
14797
14796
|
return translation("rBetween", {
|
|
14798
|
-
value1: String(p.
|
|
14799
|
-
value2: String(p.
|
|
14797
|
+
value1: String(p.numberMin ?? "-"),
|
|
14798
|
+
value2: String(p.numberMax ?? "-")
|
|
14800
14799
|
});
|
|
14801
14800
|
case "notBetween":
|
|
14802
14801
|
if (value.dataType === "date" || value.dataType === "dateTime") {
|
|
14803
14802
|
return translation("rNotBetween", {
|
|
14804
|
-
value1: formatDateParam(p.
|
|
14805
|
-
value2: formatDateParam(p.
|
|
14803
|
+
value1: formatDateParam(p.dateMin, locale, dateFormat) ?? "-",
|
|
14804
|
+
value2: formatDateParam(p.dateMax, locale, dateFormat) ?? "-"
|
|
14806
14805
|
});
|
|
14807
14806
|
}
|
|
14808
14807
|
return translation("rNotBetween", {
|
|
14809
|
-
value1: String(p.
|
|
14810
|
-
value2: String(p.
|
|
14808
|
+
value1: String(p.numberMin ?? "-"),
|
|
14809
|
+
value2: String(p.numberMax ?? "-")
|
|
14811
14810
|
});
|
|
14812
14811
|
case "isTrue":
|
|
14813
14812
|
return translation("isTrue");
|
|
@@ -15217,84 +15216,21 @@ var TableSortButton = ({
|
|
|
15217
15216
|
|
|
15218
15217
|
// src/components/layout/table/TableFilterButton.tsx
|
|
15219
15218
|
import { FilterIcon } from "lucide-react";
|
|
15220
|
-
import { useEffect as
|
|
15219
|
+
import { useEffect as useEffect42, useId as useId18, useMemo as useMemo34, useRef as useRef34, useState as useState33 } from "react";
|
|
15221
15220
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
15222
15221
|
|
|
15223
15222
|
// src/components/user-interaction/data/FilterPopUp.tsx
|
|
15224
|
-
import {
|
|
15225
|
-
import { forwardRef as forwardRef23, useId as useId17, useMemo as useMemo33, useState as useState32 } from "react";
|
|
15226
|
-
|
|
15227
|
-
// src/components/user-interaction/Checkbox.tsx
|
|
15228
|
-
import { Check as Check2, Minus as Minus2 } from "lucide-react";
|
|
15229
|
-
import { useCallback as useCallback28 } from "react";
|
|
15230
|
-
import { jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15231
|
-
var Checkbox = ({
|
|
15232
|
-
value: controlledValue,
|
|
15233
|
-
initialValue = false,
|
|
15234
|
-
indeterminate,
|
|
15235
|
-
required = false,
|
|
15236
|
-
invalid = false,
|
|
15237
|
-
disabled = false,
|
|
15238
|
-
readOnly = false,
|
|
15239
|
-
onValueChange,
|
|
15240
|
-
onEditComplete,
|
|
15241
|
-
size = "md",
|
|
15242
|
-
alwaysShowCheckIcon = false,
|
|
15243
|
-
...props
|
|
15244
|
-
}) => {
|
|
15245
|
-
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
15246
|
-
const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
|
|
15247
|
-
const onChangeWrapper = useCallback28((value2) => {
|
|
15248
|
-
onValueChangeStable(value2);
|
|
15249
|
-
onEditCompleteStable(value2);
|
|
15250
|
-
}, [onValueChangeStable, onEditCompleteStable]);
|
|
15251
|
-
const [value, setValue] = useControlledState({
|
|
15252
|
-
value: controlledValue,
|
|
15253
|
-
onValueChange: onChangeWrapper,
|
|
15254
|
-
defaultValue: initialValue
|
|
15255
|
-
});
|
|
15256
|
-
return /* @__PURE__ */ jsxs33(
|
|
15257
|
-
"div",
|
|
15258
|
-
{
|
|
15259
|
-
...props,
|
|
15260
|
-
onClick: (event) => {
|
|
15261
|
-
if (!disabled) {
|
|
15262
|
-
setValue((prev) => !prev);
|
|
15263
|
-
}
|
|
15264
|
-
props.onClick?.(event);
|
|
15265
|
-
},
|
|
15266
|
-
onKeyDown: (event) => {
|
|
15267
|
-
if (disabled) return;
|
|
15268
|
-
if (event.key === " " || event.key === "Enter") {
|
|
15269
|
-
event.preventDefault();
|
|
15270
|
-
setValue((prev) => !prev);
|
|
15271
|
-
}
|
|
15272
|
-
props.onKeyDown?.(event);
|
|
15273
|
-
},
|
|
15274
|
-
"data-checked": !indeterminate ? value : "indeterminate",
|
|
15275
|
-
"data-size": size ?? void 0,
|
|
15276
|
-
...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
|
|
15277
|
-
role: "checkbox",
|
|
15278
|
-
tabIndex: disabled ? -1 : 0,
|
|
15279
|
-
"aria-checked": indeterminate ? "mixed" : value,
|
|
15280
|
-
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
15281
|
-
"data-name": props["data-name"] ?? "checkbox",
|
|
15282
|
-
children: [
|
|
15283
|
-
/* @__PURE__ */ jsx62(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ jsx62(Minus2, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) }),
|
|
15284
|
-
/* @__PURE__ */ jsx62(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ jsx62(Check2, { "data-name": "checkbox-indicator", className: "checkbox-indicator", "aria-hidden": true }) })
|
|
15285
|
-
]
|
|
15286
|
-
}
|
|
15287
|
-
);
|
|
15288
|
-
};
|
|
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";
|
|
15289
15225
|
|
|
15290
15226
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
15291
|
-
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";
|
|
15292
15228
|
import { CalendarIcon } from "lucide-react";
|
|
15293
15229
|
import clsx24 from "clsx";
|
|
15294
15230
|
|
|
15295
15231
|
// src/components/user-interaction/date/TimePicker.tsx
|
|
15296
15232
|
import { useEffect as useEffect31, useMemo as useMemo26, useRef as useRef27 } from "react";
|
|
15297
|
-
import { jsx as
|
|
15233
|
+
import { jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15298
15234
|
var TimePicker = ({
|
|
15299
15235
|
value: controlledValue,
|
|
15300
15236
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15387,10 +15323,10 @@ var TimePicker = ({
|
|
|
15387
15323
|
setValue(newDate);
|
|
15388
15324
|
onEditComplete?.(newDate);
|
|
15389
15325
|
};
|
|
15390
|
-
return /* @__PURE__ */
|
|
15391
|
-
/* @__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) => {
|
|
15392
15328
|
const isSelected = hour2 === value.getHours() - (!is24HourFormat && isPM ? 12 : 0);
|
|
15393
|
-
return /* @__PURE__ */
|
|
15329
|
+
return /* @__PURE__ */ jsx62(
|
|
15394
15330
|
Button,
|
|
15395
15331
|
{
|
|
15396
15332
|
size: "sm",
|
|
@@ -15403,9 +15339,9 @@ var TimePicker = ({
|
|
|
15403
15339
|
hour2
|
|
15404
15340
|
);
|
|
15405
15341
|
}) }),
|
|
15406
|
-
/* @__PURE__ */
|
|
15342
|
+
/* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: minutes.map((minute) => {
|
|
15407
15343
|
const isSelected = minute === closestMinute;
|
|
15408
|
-
return /* @__PURE__ */
|
|
15344
|
+
return /* @__PURE__ */ jsx62(
|
|
15409
15345
|
Button,
|
|
15410
15346
|
{
|
|
15411
15347
|
size: "sm",
|
|
@@ -15418,9 +15354,9 @@ var TimePicker = ({
|
|
|
15418
15354
|
minute + minuteIncrement
|
|
15419
15355
|
);
|
|
15420
15356
|
}) }),
|
|
15421
|
-
/* @__PURE__ */
|
|
15357
|
+
/* @__PURE__ */ jsx62(Visibility, { isVisible: precision === "second" || precision === "millisecond", children: /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: seconds.map((second) => {
|
|
15422
15358
|
const isSelected = second === closestSecond;
|
|
15423
|
-
return /* @__PURE__ */
|
|
15359
|
+
return /* @__PURE__ */ jsx62(
|
|
15424
15360
|
Button,
|
|
15425
15361
|
{
|
|
15426
15362
|
size: "sm",
|
|
@@ -15433,9 +15369,9 @@ var TimePicker = ({
|
|
|
15433
15369
|
second + secondIncrement
|
|
15434
15370
|
);
|
|
15435
15371
|
}) }) }),
|
|
15436
|
-
/* @__PURE__ */
|
|
15372
|
+
/* @__PURE__ */ jsx62(Visibility, { isVisible: precision === "millisecond", children: /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: milliseconds.map((millisecond) => {
|
|
15437
15373
|
const isSelected = millisecond === closestMillisecond;
|
|
15438
|
-
return /* @__PURE__ */
|
|
15374
|
+
return /* @__PURE__ */ jsx62(
|
|
15439
15375
|
Button,
|
|
15440
15376
|
{
|
|
15441
15377
|
size: "sm",
|
|
@@ -15448,8 +15384,8 @@ var TimePicker = ({
|
|
|
15448
15384
|
millisecond + millisecondIncrement
|
|
15449
15385
|
);
|
|
15450
15386
|
}) }) }),
|
|
15451
|
-
!is24HourFormat && /* @__PURE__ */
|
|
15452
|
-
/* @__PURE__ */
|
|
15387
|
+
!is24HourFormat && /* @__PURE__ */ jsxs33("div", { "data-name": "time-picker-value-column", children: [
|
|
15388
|
+
/* @__PURE__ */ jsx62(
|
|
15453
15389
|
Button,
|
|
15454
15390
|
{
|
|
15455
15391
|
size: "sm",
|
|
@@ -15459,7 +15395,7 @@ var TimePicker = ({
|
|
|
15459
15395
|
children: "AM"
|
|
15460
15396
|
}
|
|
15461
15397
|
),
|
|
15462
|
-
/* @__PURE__ */
|
|
15398
|
+
/* @__PURE__ */ jsx62(
|
|
15463
15399
|
Button,
|
|
15464
15400
|
{
|
|
15465
15401
|
size: "sm",
|
|
@@ -15479,8 +15415,8 @@ import { ArrowDown, ArrowUp, Calendar, ChevronDown as ChevronDown4 } from "lucid
|
|
|
15479
15415
|
import clsx23 from "clsx";
|
|
15480
15416
|
|
|
15481
15417
|
// src/components/user-interaction/date/DayPicker.tsx
|
|
15482
|
-
import { useCallback as
|
|
15483
|
-
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";
|
|
15484
15420
|
var DayPicker = ({
|
|
15485
15421
|
displayedMonth: controlledDisplayedMonth,
|
|
15486
15422
|
initialDisplayedMonth,
|
|
@@ -15513,7 +15449,7 @@ var DayPicker = ({
|
|
|
15513
15449
|
() => !!value && weeks.some((week) => week.some((d) => DateUtils.equalDate(value, d))),
|
|
15514
15450
|
[value, weeks]
|
|
15515
15451
|
);
|
|
15516
|
-
const firstDayOfMonth =
|
|
15452
|
+
const firstDayOfMonth = useCallback28(
|
|
15517
15453
|
(date) => new Date(date.getFullYear(), date.getMonth(), 1),
|
|
15518
15454
|
[]
|
|
15519
15455
|
);
|
|
@@ -15529,12 +15465,12 @@ var DayPicker = ({
|
|
|
15529
15465
|
if (!providedStart) return;
|
|
15530
15466
|
return new Date(providedStart.getFullYear(), providedStart.getMonth(), providedStart.getDate());
|
|
15531
15467
|
}, [providedStart]);
|
|
15532
|
-
const clampToRange =
|
|
15468
|
+
const clampToRange = useCallback28((date) => {
|
|
15533
15469
|
if (start && date < start) return start;
|
|
15534
15470
|
if (end && date > end) return end;
|
|
15535
15471
|
return date;
|
|
15536
15472
|
}, [start, end]);
|
|
15537
|
-
const navigateTo =
|
|
15473
|
+
const navigateTo = useCallback28((candidate) => {
|
|
15538
15474
|
const clamped = clampToRange(candidate);
|
|
15539
15475
|
if (!DateUtils.between(clamped, start, end)) return;
|
|
15540
15476
|
setValue(clamped);
|
|
@@ -15543,7 +15479,7 @@ var DayPicker = ({
|
|
|
15543
15479
|
setDisplayedMonth(firstDayOfMonth(clamped));
|
|
15544
15480
|
}
|
|
15545
15481
|
}, [clampToRange, start, end, setValue, onEditComplete, displayedMonth, setDisplayedMonth, firstDayOfMonth]);
|
|
15546
|
-
const onKeyDown =
|
|
15482
|
+
const onKeyDown = useCallback28(
|
|
15547
15483
|
(event) => {
|
|
15548
15484
|
PropsUtil.aria.navigate({
|
|
15549
15485
|
left: () => focusTargetDate && navigateTo(DateUtils.subtractDuration(focusTargetDate, { days: 1 })),
|
|
@@ -15554,15 +15490,15 @@ var DayPicker = ({
|
|
|
15554
15490
|
},
|
|
15555
15491
|
[focusTargetDate, navigateTo]
|
|
15556
15492
|
);
|
|
15557
|
-
return /* @__PURE__ */
|
|
15558
|
-
/* @__PURE__ */
|
|
15559
|
-
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) => {
|
|
15560
15496
|
const isSelected = !!value && DateUtils.equalDate(value, date);
|
|
15561
15497
|
const isFocused = !!focusTargetDate && DateUtils.equalDate(focusTargetDate, date);
|
|
15562
15498
|
const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
|
|
15563
15499
|
const isSameMonth = date.getMonth() === month;
|
|
15564
15500
|
const isDayValid = DateUtils.between(date, start, end);
|
|
15565
|
-
return /* @__PURE__ */
|
|
15501
|
+
return /* @__PURE__ */ jsx63(
|
|
15566
15502
|
"div",
|
|
15567
15503
|
{
|
|
15568
15504
|
ref: isFocused ? selectedButtonRef : void 0,
|
|
@@ -15600,9 +15536,9 @@ var DayPicker = ({
|
|
|
15600
15536
|
};
|
|
15601
15537
|
|
|
15602
15538
|
// src/components/user-interaction/date/YearMonthPicker.tsx
|
|
15603
|
-
import { memo, useCallback as
|
|
15539
|
+
import { memo, useCallback as useCallback29, useEffect as useEffect33, useMemo as useMemo28, useRef as useRef29, useState as useState26 } from "react";
|
|
15604
15540
|
import clsx22 from "clsx";
|
|
15605
|
-
import { jsx as
|
|
15541
|
+
import { jsx as jsx64, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15606
15542
|
var YearRow = memo(function YearRow2({
|
|
15607
15543
|
year,
|
|
15608
15544
|
selectedMonthIndex,
|
|
@@ -15620,22 +15556,22 @@ var YearRow = memo(function YearRow2({
|
|
|
15620
15556
|
}
|
|
15621
15557
|
}, [isSelectedYear]);
|
|
15622
15558
|
const monthGrid = useMemo28(() => equalSizeGroups([...DateUtils.monthsList], 3), []);
|
|
15623
|
-
return /* @__PURE__ */
|
|
15559
|
+
return /* @__PURE__ */ jsxs35(
|
|
15624
15560
|
ExpandableRoot,
|
|
15625
15561
|
{
|
|
15626
15562
|
ref: isSelectedYear ? ref : void 0,
|
|
15627
15563
|
isExpanded,
|
|
15628
15564
|
onExpandedChange: setIsExpanded,
|
|
15629
15565
|
children: [
|
|
15630
|
-
/* @__PURE__ */
|
|
15631
|
-
/* @__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) => {
|
|
15632
15568
|
const monthIndex = DateUtils.monthsList.indexOf(month);
|
|
15633
15569
|
const currentTimestamp = new Date(year, monthIndex).getTime();
|
|
15634
15570
|
const isAfterStart = minTimestamp === void 0 || currentTimestamp >= minTimestamp;
|
|
15635
15571
|
const isBeforeEnd = maxTimestamp === void 0 || currentTimestamp <= maxTimestamp;
|
|
15636
15572
|
const isValid = isAfterStart && isBeforeEnd;
|
|
15637
15573
|
const isSelectedMonth = monthIndex === selectedMonthIndex;
|
|
15638
|
-
return /* @__PURE__ */
|
|
15574
|
+
return /* @__PURE__ */ jsx64(
|
|
15639
15575
|
Button,
|
|
15640
15576
|
{
|
|
15641
15577
|
disabled: !isValid,
|
|
@@ -15690,11 +15626,11 @@ var YearMonthPicker = ({
|
|
|
15690
15626
|
if (!end) return;
|
|
15691
15627
|
return new Date(end.getFullYear(), end.getMonth() + 1, 0).getTime();
|
|
15692
15628
|
}, [end]);
|
|
15693
|
-
const handleSelect =
|
|
15629
|
+
const handleSelect = useCallback29((newDate) => {
|
|
15694
15630
|
setValue(newDate);
|
|
15695
15631
|
onEditCompleteStable(newDate);
|
|
15696
15632
|
}, [onEditCompleteStable, setValue]);
|
|
15697
|
-
return /* @__PURE__ */
|
|
15633
|
+
return /* @__PURE__ */ jsx64(
|
|
15698
15634
|
InfiniteScroll,
|
|
15699
15635
|
{
|
|
15700
15636
|
itemCount: years.length,
|
|
@@ -15704,7 +15640,7 @@ var YearMonthPicker = ({
|
|
|
15704
15640
|
const year = years[index];
|
|
15705
15641
|
const isSelectedYear = value.getFullYear() === year;
|
|
15706
15642
|
const selectedMonthIndex = isSelectedYear ? value.getMonth() : void 0;
|
|
15707
|
-
return /* @__PURE__ */
|
|
15643
|
+
return /* @__PURE__ */ jsx64(
|
|
15708
15644
|
YearRow,
|
|
15709
15645
|
{
|
|
15710
15646
|
year,
|
|
@@ -15722,7 +15658,7 @@ var YearMonthPicker = ({
|
|
|
15722
15658
|
};
|
|
15723
15659
|
|
|
15724
15660
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
15725
|
-
import { jsx as
|
|
15661
|
+
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
15726
15662
|
var DatePicker = ({
|
|
15727
15663
|
value: controlledValue,
|
|
15728
15664
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15745,9 +15681,9 @@ var DatePicker = ({
|
|
|
15745
15681
|
});
|
|
15746
15682
|
const [displayedMonth, setDisplayedMonth] = useState27(new Date(value.getFullYear(), value.getMonth(), 1));
|
|
15747
15683
|
const [displayMode, setDisplayMode] = useState27(initialDisplay);
|
|
15748
|
-
return /* @__PURE__ */
|
|
15749
|
-
/* @__PURE__ */
|
|
15750
|
-
/* @__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(
|
|
15751
15687
|
Button,
|
|
15752
15688
|
{
|
|
15753
15689
|
size: "sm",
|
|
@@ -15758,12 +15694,12 @@ var DatePicker = ({
|
|
|
15758
15694
|
onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
|
|
15759
15695
|
children: [
|
|
15760
15696
|
`${new Intl.DateTimeFormat(LocalizationUtil.localToLanguage(locale), { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
|
|
15761
|
-
/* @__PURE__ */
|
|
15697
|
+
/* @__PURE__ */ jsx65(ChevronDown4, { size: 16 })
|
|
15762
15698
|
]
|
|
15763
15699
|
}
|
|
15764
15700
|
),
|
|
15765
|
-
displayMode === "day" && /* @__PURE__ */
|
|
15766
|
-
/* @__PURE__ */
|
|
15701
|
+
displayMode === "day" && /* @__PURE__ */ jsxs36("div", { className: "flex-row-2 justify-end", children: [
|
|
15702
|
+
/* @__PURE__ */ jsx65(
|
|
15767
15703
|
IconButton,
|
|
15768
15704
|
{
|
|
15769
15705
|
tooltip: translation("time.today"),
|
|
@@ -15775,10 +15711,10 @@ var DatePicker = ({
|
|
|
15775
15711
|
setValue(newDate);
|
|
15776
15712
|
setDisplayedMonth(newDate);
|
|
15777
15713
|
},
|
|
15778
|
-
children: /* @__PURE__ */
|
|
15714
|
+
children: /* @__PURE__ */ jsx65(Calendar, { className: "size-5" })
|
|
15779
15715
|
}
|
|
15780
15716
|
),
|
|
15781
|
-
/* @__PURE__ */
|
|
15717
|
+
/* @__PURE__ */ jsx65(
|
|
15782
15718
|
IconButton,
|
|
15783
15719
|
{
|
|
15784
15720
|
tooltip: translation("time.previousMonth"),
|
|
@@ -15787,10 +15723,10 @@ var DatePicker = ({
|
|
|
15787
15723
|
onClick: () => {
|
|
15788
15724
|
setDisplayedMonth(DateUtils.subtractDuration(displayedMonth, { months: 1 }));
|
|
15789
15725
|
},
|
|
15790
|
-
children: /* @__PURE__ */
|
|
15726
|
+
children: /* @__PURE__ */ jsx65(ArrowUp, { size: 20 })
|
|
15791
15727
|
}
|
|
15792
15728
|
),
|
|
15793
|
-
/* @__PURE__ */
|
|
15729
|
+
/* @__PURE__ */ jsx65(
|
|
15794
15730
|
IconButton,
|
|
15795
15731
|
{
|
|
15796
15732
|
tooltip: translation("time.nextMonth"),
|
|
@@ -15799,12 +15735,12 @@ var DatePicker = ({
|
|
|
15799
15735
|
onClick: () => {
|
|
15800
15736
|
setDisplayedMonth(DateUtils.addDuration(displayedMonth, { months: 1 }));
|
|
15801
15737
|
},
|
|
15802
|
-
children: /* @__PURE__ */
|
|
15738
|
+
children: /* @__PURE__ */ jsx65(ArrowDown, { size: 20 })
|
|
15803
15739
|
}
|
|
15804
15740
|
)
|
|
15805
15741
|
] })
|
|
15806
15742
|
] }),
|
|
15807
|
-
displayMode === "yearMonth" ? /* @__PURE__ */
|
|
15743
|
+
displayMode === "yearMonth" ? /* @__PURE__ */ jsx65(
|
|
15808
15744
|
YearMonthPicker,
|
|
15809
15745
|
{
|
|
15810
15746
|
...yearMonthPickerProps,
|
|
@@ -15821,7 +15757,7 @@ var DatePicker = ({
|
|
|
15821
15757
|
},
|
|
15822
15758
|
className: "h-60 max-h-60"
|
|
15823
15759
|
}
|
|
15824
|
-
) : /* @__PURE__ */
|
|
15760
|
+
) : /* @__PURE__ */ jsx65(
|
|
15825
15761
|
DayPicker,
|
|
15826
15762
|
{
|
|
15827
15763
|
...dayPickerProps,
|
|
@@ -15840,7 +15776,7 @@ var DatePicker = ({
|
|
|
15840
15776
|
};
|
|
15841
15777
|
|
|
15842
15778
|
// src/components/user-interaction/date/DateTimePicker.tsx
|
|
15843
|
-
import { jsx as
|
|
15779
|
+
import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
15844
15780
|
var DateTimePicker = ({
|
|
15845
15781
|
value: controlledValue,
|
|
15846
15782
|
initialValue = /* @__PURE__ */ new Date(),
|
|
@@ -15868,7 +15804,7 @@ var DateTimePicker = ({
|
|
|
15868
15804
|
let dateDisplay;
|
|
15869
15805
|
let timeDisplay;
|
|
15870
15806
|
if (useDate) {
|
|
15871
|
-
dateDisplay = /* @__PURE__ */
|
|
15807
|
+
dateDisplay = /* @__PURE__ */ jsx66(
|
|
15872
15808
|
DatePicker,
|
|
15873
15809
|
{
|
|
15874
15810
|
...datePickerProps,
|
|
@@ -15884,7 +15820,7 @@ var DateTimePicker = ({
|
|
|
15884
15820
|
);
|
|
15885
15821
|
}
|
|
15886
15822
|
if (useTime) {
|
|
15887
|
-
timeDisplay = /* @__PURE__ */
|
|
15823
|
+
timeDisplay = /* @__PURE__ */ jsx66(
|
|
15888
15824
|
TimePicker,
|
|
15889
15825
|
{
|
|
15890
15826
|
...timePickerProps,
|
|
@@ -15899,7 +15835,7 @@ var DateTimePicker = ({
|
|
|
15899
15835
|
}
|
|
15900
15836
|
);
|
|
15901
15837
|
}
|
|
15902
|
-
return /* @__PURE__ */
|
|
15838
|
+
return /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
|
|
15903
15839
|
dateDisplay,
|
|
15904
15840
|
timeDisplay
|
|
15905
15841
|
] });
|
|
@@ -15907,7 +15843,7 @@ var DateTimePicker = ({
|
|
|
15907
15843
|
|
|
15908
15844
|
// src/components/user-interaction/date/DateTimePickerDialog.tsx
|
|
15909
15845
|
import { useEffect as useEffect34, useState as useState28 } from "react";
|
|
15910
|
-
import { Fragment as Fragment6, jsx as
|
|
15846
|
+
import { Fragment as Fragment6, jsx as jsx67, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
15911
15847
|
var DateTimePickerDialog = ({
|
|
15912
15848
|
initialValue = null,
|
|
15913
15849
|
value,
|
|
@@ -15938,8 +15874,8 @@ var DateTimePickerDialog = ({
|
|
|
15938
15874
|
useEffect34(() => {
|
|
15939
15875
|
setPickerState(state ?? /* @__PURE__ */ new Date());
|
|
15940
15876
|
}, [state]);
|
|
15941
|
-
return /* @__PURE__ */
|
|
15942
|
-
/* @__PURE__ */
|
|
15877
|
+
return /* @__PURE__ */ jsxs38(Fragment6, { children: [
|
|
15878
|
+
/* @__PURE__ */ jsx67("div", { className: "flex-row-2 justify-center w-full py-1", children: /* @__PURE__ */ jsx67(
|
|
15943
15879
|
"span",
|
|
15944
15880
|
{
|
|
15945
15881
|
id: labelId,
|
|
@@ -15947,7 +15883,7 @@ var DateTimePickerDialog = ({
|
|
|
15947
15883
|
children: label ?? translation("sDateTimeSelect", { datetimeMode: mode })
|
|
15948
15884
|
}
|
|
15949
15885
|
) }),
|
|
15950
|
-
/* @__PURE__ */
|
|
15886
|
+
/* @__PURE__ */ jsx67(
|
|
15951
15887
|
DateTimePicker,
|
|
15952
15888
|
{
|
|
15953
15889
|
...pickerProps,
|
|
@@ -15966,8 +15902,8 @@ var DateTimePickerDialog = ({
|
|
|
15966
15902
|
precision
|
|
15967
15903
|
}
|
|
15968
15904
|
),
|
|
15969
|
-
/* @__PURE__ */
|
|
15970
|
-
/* @__PURE__ */
|
|
15905
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex-row-2 justify-end", children: [
|
|
15906
|
+
/* @__PURE__ */ jsx67(Visibility, { isVisible: allowRemove && !!state, children: /* @__PURE__ */ jsx67(
|
|
15971
15907
|
Button,
|
|
15972
15908
|
{
|
|
15973
15909
|
size: "md",
|
|
@@ -15980,7 +15916,7 @@ var DateTimePickerDialog = ({
|
|
|
15980
15916
|
children: translation("clear")
|
|
15981
15917
|
}
|
|
15982
15918
|
) }),
|
|
15983
|
-
/* @__PURE__ */
|
|
15919
|
+
/* @__PURE__ */ jsx67(Visibility, { isVisible: !state, children: /* @__PURE__ */ jsx67(
|
|
15984
15920
|
Button,
|
|
15985
15921
|
{
|
|
15986
15922
|
size: "md",
|
|
@@ -15993,7 +15929,7 @@ var DateTimePickerDialog = ({
|
|
|
15993
15929
|
children: translation("cancel")
|
|
15994
15930
|
}
|
|
15995
15931
|
) }),
|
|
15996
|
-
/* @__PURE__ */
|
|
15932
|
+
/* @__PURE__ */ jsx67(
|
|
15997
15933
|
Button,
|
|
15998
15934
|
{
|
|
15999
15935
|
size: "md",
|
|
@@ -16009,7 +15945,7 @@ var DateTimePickerDialog = ({
|
|
|
16009
15945
|
};
|
|
16010
15946
|
|
|
16011
15947
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
16012
|
-
import { Fragment as Fragment7, jsx as
|
|
15948
|
+
import { Fragment as Fragment7, jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
16013
15949
|
var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
16014
15950
|
id: inputId,
|
|
16015
15951
|
value,
|
|
@@ -16048,16 +15984,14 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16048
15984
|
const [dialogValue, setDialogValue] = useState29(state);
|
|
16049
15985
|
const [stringInputState, setStringInputState] = useState29({
|
|
16050
15986
|
state: state ? DateUtils.toInputString(state, mode, precision) : "",
|
|
16051
|
-
date: void 0
|
|
15987
|
+
date: void 0,
|
|
15988
|
+
mode
|
|
16052
15989
|
});
|
|
16053
|
-
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
});
|
|
16059
|
-
}, [mode, state]);
|
|
16060
|
-
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) => {
|
|
16061
15995
|
onDialogOpeningChange?.(isOpen2);
|
|
16062
15996
|
setIsOpen(isOpen2);
|
|
16063
15997
|
}, [onDialogOpeningChange]);
|
|
@@ -16078,21 +16012,26 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16078
16012
|
restartTimer,
|
|
16079
16013
|
clearTimer
|
|
16080
16014
|
} = useDelay({ delay: 2e3, disabled: disabled || readOnly });
|
|
16081
|
-
return /* @__PURE__ */
|
|
16082
|
-
/* @__PURE__ */
|
|
16083
|
-
/* @__PURE__ */
|
|
16015
|
+
return /* @__PURE__ */ jsxs39(Fragment7, { children: [
|
|
16016
|
+
/* @__PURE__ */ jsxs39("div", { ...containerProps, className: clsx24("relative w-full", containerProps?.className), children: [
|
|
16017
|
+
/* @__PURE__ */ jsx68(
|
|
16084
16018
|
"input",
|
|
16085
16019
|
{
|
|
16086
16020
|
...props,
|
|
16087
16021
|
ref: innerRef,
|
|
16088
16022
|
id: ids.input,
|
|
16089
|
-
value:
|
|
16023
|
+
value: safeInputString,
|
|
16090
16024
|
onClick: (event) => {
|
|
16091
16025
|
event.preventDefault();
|
|
16092
16026
|
},
|
|
16093
16027
|
onFocus: (event) => {
|
|
16094
16028
|
event.preventDefault();
|
|
16095
16029
|
},
|
|
16030
|
+
onKeyDown: (event) => {
|
|
16031
|
+
if (event.key === " ") {
|
|
16032
|
+
event.preventDefault();
|
|
16033
|
+
}
|
|
16034
|
+
},
|
|
16096
16035
|
onChange: (event) => {
|
|
16097
16036
|
const date = new Date(event.target.value ?? "");
|
|
16098
16037
|
const isValid = !isNaN(date.getTime());
|
|
@@ -16107,7 +16046,8 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16107
16046
|
}
|
|
16108
16047
|
setStringInputState({
|
|
16109
16048
|
state: event.target.value,
|
|
16110
|
-
date: isValid ? date : void 0
|
|
16049
|
+
date: isValid ? date : void 0,
|
|
16050
|
+
mode
|
|
16111
16051
|
});
|
|
16112
16052
|
},
|
|
16113
16053
|
onBlur: (event) => {
|
|
@@ -16122,7 +16062,8 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16122
16062
|
}
|
|
16123
16063
|
setStringInputState({
|
|
16124
16064
|
state: state ? DateUtils.toInputString(state, mode) : "",
|
|
16125
|
-
date: void 0
|
|
16065
|
+
date: void 0,
|
|
16066
|
+
mode
|
|
16126
16067
|
});
|
|
16127
16068
|
}
|
|
16128
16069
|
},
|
|
@@ -16133,9 +16074,9 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16133
16074
|
...PropsUtil.aria.interactionStates({ disabled, readOnly, invalid, required }, props)
|
|
16134
16075
|
}
|
|
16135
16076
|
),
|
|
16136
|
-
/* @__PURE__ */
|
|
16077
|
+
/* @__PURE__ */ jsxs39("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex-row-0", children: [
|
|
16137
16078
|
actions,
|
|
16138
|
-
/* @__PURE__ */
|
|
16079
|
+
/* @__PURE__ */ jsx68(Visibility, { isVisible: !readOnly, children: /* @__PURE__ */ jsx68(
|
|
16139
16080
|
IconButton,
|
|
16140
16081
|
{
|
|
16141
16082
|
tooltip: translation("sDateTimeSelect", { datetimeMode: mode }),
|
|
@@ -16149,12 +16090,12 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16149
16090
|
"aria-haspopup": "dialog",
|
|
16150
16091
|
"aria-expanded": isOpen,
|
|
16151
16092
|
"aria-controls": isOpen ? ids.popup : void 0,
|
|
16152
|
-
children: /* @__PURE__ */
|
|
16093
|
+
children: /* @__PURE__ */ jsx68(CalendarIcon, { className: "size-5" })
|
|
16153
16094
|
}
|
|
16154
16095
|
) })
|
|
16155
16096
|
] })
|
|
16156
16097
|
] }),
|
|
16157
|
-
/* @__PURE__ */
|
|
16098
|
+
/* @__PURE__ */ jsx68(
|
|
16158
16099
|
PopUp,
|
|
16159
16100
|
{
|
|
16160
16101
|
id: ids.popup,
|
|
@@ -16173,7 +16114,7 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16173
16114
|
role: "dialog",
|
|
16174
16115
|
"aria-labelledby": ids.label,
|
|
16175
16116
|
className: "flex-col-2 p-2",
|
|
16176
|
-
children: /* @__PURE__ */
|
|
16117
|
+
children: /* @__PURE__ */ jsx68(
|
|
16177
16118
|
DateTimePickerDialog,
|
|
16178
16119
|
{
|
|
16179
16120
|
value: dialogValue,
|
|
@@ -16206,7 +16147,7 @@ var DateTimeInput = forwardRef18(function DateTimeInput2({
|
|
|
16206
16147
|
import { forwardRef as forwardRef22 } from "react";
|
|
16207
16148
|
|
|
16208
16149
|
// src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx
|
|
16209
|
-
import { useCallback as
|
|
16150
|
+
import { useCallback as useCallback33, useEffect as useEffect37, useId as useId15, useMemo as useMemo32, useState as useState31 } from "react";
|
|
16210
16151
|
|
|
16211
16152
|
// src/components/user-interaction/MultiSelect/MultiSelectContext.tsx
|
|
16212
16153
|
import { createContext as createContext15, useContext as useContext17 } from "react";
|
|
@@ -16219,14 +16160,14 @@ function useMultiSelectContext() {
|
|
|
16219
16160
|
|
|
16220
16161
|
// src/components/user-interaction/MultiSelect/useMultiSelect.ts
|
|
16221
16162
|
import {
|
|
16222
|
-
useCallback as
|
|
16163
|
+
useCallback as useCallback32,
|
|
16223
16164
|
useEffect as useEffect36,
|
|
16224
16165
|
useMemo as useMemo31,
|
|
16225
16166
|
useState as useState30
|
|
16226
16167
|
} from "react";
|
|
16227
16168
|
|
|
16228
16169
|
// src/hooks/useMultiSelection.ts
|
|
16229
|
-
import { useCallback as
|
|
16170
|
+
import { useCallback as useCallback31, useMemo as useMemo30 } from "react";
|
|
16230
16171
|
function useMultiSelection({
|
|
16231
16172
|
options: optionsList,
|
|
16232
16173
|
value,
|
|
@@ -16240,8 +16181,8 @@ function useMultiSelection({
|
|
|
16240
16181
|
defaultValue: [...initialSelection],
|
|
16241
16182
|
isControlled
|
|
16242
16183
|
});
|
|
16243
|
-
const isSelected =
|
|
16244
|
-
const toggleSelection =
|
|
16184
|
+
const isSelected = useCallback31((id) => selection.includes(id), [selection]);
|
|
16185
|
+
const toggleSelection = useCallback31(
|
|
16245
16186
|
(id) => {
|
|
16246
16187
|
const option = optionsList.find((o) => o.id === id);
|
|
16247
16188
|
if (!option || option.disabled) return;
|
|
@@ -16249,7 +16190,7 @@ function useMultiSelection({
|
|
|
16249
16190
|
},
|
|
16250
16191
|
[optionsList, setSelection]
|
|
16251
16192
|
);
|
|
16252
|
-
const setSelectionValue =
|
|
16193
|
+
const setSelectionValue = useCallback31(
|
|
16253
16194
|
(next) => setSelection(Array.from(next)),
|
|
16254
16195
|
[setSelection]
|
|
16255
16196
|
);
|
|
@@ -16293,7 +16234,7 @@ function useMultiSelect({
|
|
|
16293
16234
|
const { searchResult: visibleOptions } = useSearch({
|
|
16294
16235
|
items: options,
|
|
16295
16236
|
searchQuery,
|
|
16296
|
-
toTags:
|
|
16237
|
+
toTags: useCallback32((o) => [o.label ?? ""], [])
|
|
16297
16238
|
});
|
|
16298
16239
|
const visibleOptionIds = useMemo31(
|
|
16299
16240
|
() => visibleOptions.map((o) => o.id),
|
|
@@ -16312,7 +16253,7 @@ function useMultiSelect({
|
|
|
16312
16253
|
options: enabledOptions,
|
|
16313
16254
|
resetTimer: typeAheadResetMs,
|
|
16314
16255
|
toString: (o) => o.label ?? "",
|
|
16315
|
-
onResultChange:
|
|
16256
|
+
onResultChange: useCallback32(
|
|
16316
16257
|
(option) => {
|
|
16317
16258
|
if (option) listNav.highlight(option.id);
|
|
16318
16259
|
},
|
|
@@ -16323,11 +16264,11 @@ function useMultiSelect({
|
|
|
16323
16264
|
useEffect36(() => {
|
|
16324
16265
|
if (!isOpen) typeAheadReset();
|
|
16325
16266
|
}, [isOpen, typeAheadReset]);
|
|
16326
|
-
const highlightItem =
|
|
16267
|
+
const highlightItem = useCallback32((id) => {
|
|
16327
16268
|
if (!enabledOptions.some((o) => o.id === id)) return;
|
|
16328
16269
|
listNavHighlight(id);
|
|
16329
16270
|
}, [enabledOptions, listNavHighlight]);
|
|
16330
|
-
const toggleSelectionValue =
|
|
16271
|
+
const toggleSelectionValue = useCallback32((id, newIsSelected) => {
|
|
16331
16272
|
const next = newIsSelected ?? !isSelected(id);
|
|
16332
16273
|
if (next) {
|
|
16333
16274
|
toggleSelection(id);
|
|
@@ -16336,7 +16277,7 @@ function useMultiSelect({
|
|
|
16336
16277
|
}
|
|
16337
16278
|
highlightItem(id);
|
|
16338
16279
|
}, [toggleSelection, setSelection, highlightItem, isSelected, selection]);
|
|
16339
|
-
const setIsOpenWrapper =
|
|
16280
|
+
const setIsOpenWrapper = useCallback32(
|
|
16340
16281
|
(open, behavior) => {
|
|
16341
16282
|
setIsOpen(open);
|
|
16342
16283
|
behavior = behavior ?? "first";
|
|
@@ -16367,7 +16308,7 @@ function useMultiSelect({
|
|
|
16367
16308
|
enabledOptions
|
|
16368
16309
|
]
|
|
16369
16310
|
);
|
|
16370
|
-
const toggleOpenWrapper =
|
|
16311
|
+
const toggleOpenWrapper = useCallback32(
|
|
16371
16312
|
(behavior) => {
|
|
16372
16313
|
setIsOpenWrapper(!isOpen, behavior);
|
|
16373
16314
|
},
|
|
@@ -16433,7 +16374,7 @@ function useMultiSelect({
|
|
|
16433
16374
|
}
|
|
16434
16375
|
|
|
16435
16376
|
// src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx
|
|
16436
|
-
import { jsx as
|
|
16377
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
16437
16378
|
function MultiSelectRoot({
|
|
16438
16379
|
children,
|
|
16439
16380
|
value,
|
|
@@ -16459,7 +16400,7 @@ function MultiSelectRoot({
|
|
|
16459
16400
|
listbox: "multi-select-listbox-" + generatedId,
|
|
16460
16401
|
searchInput: "multi-select-search-" + generatedId
|
|
16461
16402
|
});
|
|
16462
|
-
const registerOption =
|
|
16403
|
+
const registerOption = useCallback33((item) => {
|
|
16463
16404
|
setOptions((prev) => {
|
|
16464
16405
|
const next = prev.filter((o) => o.id !== item.id);
|
|
16465
16406
|
next.push(item);
|
|
@@ -16468,7 +16409,7 @@ function MultiSelectRoot({
|
|
|
16468
16409
|
});
|
|
16469
16410
|
return () => setOptions((prev) => prev.filter((o) => o.id !== item.id));
|
|
16470
16411
|
}, []);
|
|
16471
|
-
const registerTrigger =
|
|
16412
|
+
const registerTrigger = useCallback33((ref) => {
|
|
16472
16413
|
setTriggerRef(ref);
|
|
16473
16414
|
return () => setTriggerRef(null);
|
|
16474
16415
|
}, []);
|
|
@@ -16491,14 +16432,14 @@ function MultiSelectRoot({
|
|
|
16491
16432
|
if (initialValue == null) return [];
|
|
16492
16433
|
return initialValue.map((v) => options.find((o) => compare(o.value, v))?.id).filter((id) => id !== void 0);
|
|
16493
16434
|
}, [options, initialValue, compare]);
|
|
16494
|
-
const onValueChangeStable =
|
|
16435
|
+
const onValueChangeStable = useCallback33(
|
|
16495
16436
|
(ids2) => {
|
|
16496
16437
|
const values = ids2.map((id) => idToOptionMap[id]?.value).filter((v) => v != null);
|
|
16497
16438
|
onValueChange?.(values);
|
|
16498
16439
|
},
|
|
16499
16440
|
[idToOptionMap, onValueChange]
|
|
16500
16441
|
);
|
|
16501
|
-
const onEditCompleteStable =
|
|
16442
|
+
const onEditCompleteStable = useCallback33(
|
|
16502
16443
|
(ids2) => {
|
|
16503
16444
|
const values = ids2.map((id) => idToOptionMap[id]?.value).filter((v) => v != null);
|
|
16504
16445
|
onEditComplete?.(values);
|
|
@@ -16574,7 +16515,7 @@ function MultiSelectRoot({
|
|
|
16574
16515
|
registerTrigger,
|
|
16575
16516
|
showSearch
|
|
16576
16517
|
]);
|
|
16577
|
-
return /* @__PURE__ */
|
|
16518
|
+
return /* @__PURE__ */ jsx69(MultiSelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx69(
|
|
16578
16519
|
PopUpContext.Provider,
|
|
16579
16520
|
{
|
|
16580
16521
|
value: {
|
|
@@ -16597,7 +16538,7 @@ import { forwardRef as forwardRef20, useEffect as useEffect39, useImperativeHand
|
|
|
16597
16538
|
import clsx25 from "clsx";
|
|
16598
16539
|
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
16599
16540
|
import { createContext as createContext16, forwardRef as forwardRef19, useContext as useContext18, useEffect as useEffect38, useId as useId16, useRef as useRef31 } from "react";
|
|
16600
|
-
import { jsx as
|
|
16541
|
+
import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
16601
16542
|
var MultiSelectOptionDisplayContext = createContext16(null);
|
|
16602
16543
|
function useMultiSelectOptionDisplayLocation() {
|
|
16603
16544
|
const context = useContext18(MultiSelectOptionDisplayContext);
|
|
@@ -16636,7 +16577,7 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16636
16577
|
const isHighlighted = context.highlightedId === optionId;
|
|
16637
16578
|
const isSelected = context.selectedIds.includes(optionId);
|
|
16638
16579
|
const isVisible = context.visibleOptionIds.includes(optionId);
|
|
16639
|
-
return /* @__PURE__ */
|
|
16580
|
+
return /* @__PURE__ */ jsxs40(
|
|
16640
16581
|
"li",
|
|
16641
16582
|
{
|
|
16642
16583
|
...props,
|
|
@@ -16669,15 +16610,15 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16669
16610
|
}
|
|
16670
16611
|
},
|
|
16671
16612
|
children: [
|
|
16672
|
-
iconAppearanceResolved === "left" && /* @__PURE__ */
|
|
16613
|
+
iconAppearanceResolved === "left" && /* @__PURE__ */ jsx70(
|
|
16673
16614
|
CheckIcon2,
|
|
16674
16615
|
{
|
|
16675
16616
|
className: clsx25("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
16676
16617
|
"aria-hidden": true
|
|
16677
16618
|
}
|
|
16678
16619
|
),
|
|
16679
|
-
/* @__PURE__ */
|
|
16680
|
-
iconAppearanceResolved === "right" && /* @__PURE__ */
|
|
16620
|
+
/* @__PURE__ */ jsx70(MultiSelectOptionDisplayContext.Provider, { value: "list", children: display }),
|
|
16621
|
+
iconAppearanceResolved === "right" && /* @__PURE__ */ jsx70(
|
|
16681
16622
|
CheckIcon2,
|
|
16682
16623
|
{
|
|
16683
16624
|
className: clsx25("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
@@ -16690,7 +16631,7 @@ var MultiSelectOption = forwardRef19(function MultiSelectOption2({
|
|
|
16690
16631
|
});
|
|
16691
16632
|
|
|
16692
16633
|
// src/components/user-interaction/MultiSelect/MultiSelectButton.tsx
|
|
16693
|
-
import { jsx as
|
|
16634
|
+
import { jsx as jsx71, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
16694
16635
|
var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
16695
16636
|
id,
|
|
16696
16637
|
placeholder,
|
|
@@ -16717,7 +16658,7 @@ var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
|
16717
16658
|
const invalid = context.invalid;
|
|
16718
16659
|
const hasValue = context.value.length > 0;
|
|
16719
16660
|
const selectedOptions = context.selectedIds.map((id2) => context.idToOptionMap[id2]).filter(Boolean);
|
|
16720
|
-
return /* @__PURE__ */
|
|
16661
|
+
return /* @__PURE__ */ jsxs41(
|
|
16721
16662
|
"div",
|
|
16722
16663
|
{
|
|
16723
16664
|
...props,
|
|
@@ -16761,20 +16702,20 @@ var MultiSelectButton = forwardRef20(function MultiSelectButton2({
|
|
|
16761
16702
|
"aria-expanded": context.isOpen,
|
|
16762
16703
|
"aria-controls": context.isOpen ? context.config.ids.content : void 0,
|
|
16763
16704
|
children: [
|
|
16764
|
-
/* @__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: [
|
|
16765
16706
|
opt.display,
|
|
16766
|
-
index < selectedOptions.length - 1 && /* @__PURE__ */
|
|
16707
|
+
index < selectedOptions.length - 1 && /* @__PURE__ */ jsx71("span", { children: "," })
|
|
16767
16708
|
] }, opt.id)) }) : placeholder ?? translation("clickToSelect") }),
|
|
16768
|
-
!hideExpansionIcon && /* @__PURE__ */
|
|
16709
|
+
!hideExpansionIcon && /* @__PURE__ */ jsx71(ExpansionIcon, { isExpanded: context.isOpen })
|
|
16769
16710
|
]
|
|
16770
16711
|
}
|
|
16771
16712
|
);
|
|
16772
16713
|
});
|
|
16773
16714
|
|
|
16774
16715
|
// src/components/user-interaction/MultiSelect/MultiSelectContent.tsx
|
|
16775
|
-
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";
|
|
16776
16717
|
import clsx26 from "clsx";
|
|
16777
|
-
import { jsx as
|
|
16718
|
+
import { jsx as jsx72, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
16778
16719
|
var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options, showSearch: showSearchOverride, searchInputProps, ...props }, ref) {
|
|
16779
16720
|
const translation = useHightideTranslation();
|
|
16780
16721
|
const innerRef = useRef33(null);
|
|
@@ -16788,7 +16729,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16788
16729
|
}, [id, setIds]);
|
|
16789
16730
|
const showSearch = showSearchOverride ?? context.search.hasSearch;
|
|
16790
16731
|
const listboxAriaLabel = showSearch ? translation("searchResults") : void 0;
|
|
16791
|
-
const keyHandler =
|
|
16732
|
+
const keyHandler = useCallback34(
|
|
16792
16733
|
(event) => {
|
|
16793
16734
|
switch (event.key) {
|
|
16794
16735
|
case "ArrowDown":
|
|
@@ -16825,7 +16766,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16825
16766
|
},
|
|
16826
16767
|
[showSearch, handleTypeaheadKey, toggleSelection, highlightedId, highlightNext, highlightPrevious, highlightFirst, highlightLast]
|
|
16827
16768
|
);
|
|
16828
|
-
return /* @__PURE__ */
|
|
16769
|
+
return /* @__PURE__ */ jsxs42(
|
|
16829
16770
|
PopUp,
|
|
16830
16771
|
{
|
|
16831
16772
|
...props,
|
|
@@ -16841,7 +16782,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16841
16782
|
"aria-labelledby": context.config.ids.trigger,
|
|
16842
16783
|
className: clsx26("gap-y-1", props.className),
|
|
16843
16784
|
children: [
|
|
16844
|
-
showSearch && /* @__PURE__ */
|
|
16785
|
+
showSearch && /* @__PURE__ */ jsx72(
|
|
16845
16786
|
Input,
|
|
16846
16787
|
{
|
|
16847
16788
|
...searchInputProps,
|
|
@@ -16860,7 +16801,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16860
16801
|
className: clsx26("mx-2 mt-2 shrink-0", searchInputProps?.className)
|
|
16861
16802
|
}
|
|
16862
16803
|
),
|
|
16863
|
-
/* @__PURE__ */
|
|
16804
|
+
/* @__PURE__ */ jsxs42(
|
|
16864
16805
|
"ul",
|
|
16865
16806
|
{
|
|
16866
16807
|
ref: innerRef,
|
|
@@ -16875,7 +16816,7 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16875
16816
|
className: clsx26("flex-col-1 p-2 overflow-auto"),
|
|
16876
16817
|
children: [
|
|
16877
16818
|
props.children,
|
|
16878
|
-
/* @__PURE__ */
|
|
16819
|
+
/* @__PURE__ */ jsx72(Visibility, { isVisible: showSearch, children: /* @__PURE__ */ jsx72(
|
|
16879
16820
|
"li",
|
|
16880
16821
|
{
|
|
16881
16822
|
role: "option",
|
|
@@ -16901,12 +16842,12 @@ var MultiSelectContent = forwardRef21(function MultiSelectContent2({ id, options
|
|
|
16901
16842
|
});
|
|
16902
16843
|
|
|
16903
16844
|
// src/components/user-interaction/MultiSelect/MultiSelect.tsx
|
|
16904
|
-
import { jsx as
|
|
16845
|
+
import { jsx as jsx73, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
16905
16846
|
var MultiSelect = forwardRef22(
|
|
16906
16847
|
function MultiSelect2({ children, contentPanelProps, buttonProps, ...props }, ref) {
|
|
16907
|
-
return /* @__PURE__ */
|
|
16908
|
-
/* @__PURE__ */
|
|
16909
|
-
/* @__PURE__ */
|
|
16848
|
+
return /* @__PURE__ */ jsxs43(MultiSelectRoot, { ...props, children: [
|
|
16849
|
+
/* @__PURE__ */ jsx73(MultiSelectButton, { ref, ...buttonProps }),
|
|
16850
|
+
/* @__PURE__ */ jsx73(MultiSelectContent, { ...contentPanelProps, children })
|
|
16910
16851
|
] });
|
|
16911
16852
|
}
|
|
16912
16853
|
);
|
|
@@ -16915,19 +16856,19 @@ var MultiSelect = forwardRef22(
|
|
|
16915
16856
|
import clsx27 from "clsx";
|
|
16916
16857
|
|
|
16917
16858
|
// src/components/user-interaction/data/FilterOperatorLabel.tsx
|
|
16918
|
-
import { jsxs as
|
|
16859
|
+
import { jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16919
16860
|
var FilterOperatorLabel = ({ operator }) => {
|
|
16920
16861
|
const translation = useHightideTranslation();
|
|
16921
16862
|
const { icon, translationKey } = FilterOperatorUtils.getInfo(operator);
|
|
16922
16863
|
const label = typeof translationKey === "string" ? translation(translationKey) : translationKey;
|
|
16923
|
-
return /* @__PURE__ */
|
|
16864
|
+
return /* @__PURE__ */ jsxs44("div", { className: "flex-row-1 items-center gap-2", children: [
|
|
16924
16865
|
icon,
|
|
16925
16866
|
label
|
|
16926
16867
|
] });
|
|
16927
16868
|
};
|
|
16928
16869
|
|
|
16929
16870
|
// src/components/user-interaction/data/FilterPopUp.tsx
|
|
16930
|
-
import { jsx as
|
|
16871
|
+
import { jsx as jsx74, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
16931
16872
|
var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
16932
16873
|
children,
|
|
16933
16874
|
name,
|
|
@@ -16935,21 +16876,31 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16935
16876
|
onOperatorChange,
|
|
16936
16877
|
onRemove,
|
|
16937
16878
|
allowedOperators,
|
|
16879
|
+
operatorOverrides,
|
|
16938
16880
|
noParameterRequired = false,
|
|
16939
16881
|
...props
|
|
16940
16882
|
}, ref) {
|
|
16941
16883
|
const translation = useHightideTranslation();
|
|
16942
|
-
|
|
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(
|
|
16943
16894
|
PopUp,
|
|
16944
16895
|
{
|
|
16945
16896
|
ref,
|
|
16946
16897
|
...props,
|
|
16947
16898
|
className: clsx27("flex-col-3 p-3 relative min-w-64", props.className),
|
|
16948
16899
|
children: [
|
|
16949
|
-
/* @__PURE__ */
|
|
16950
|
-
/* @__PURE__ */
|
|
16951
|
-
/* @__PURE__ */
|
|
16952
|
-
/* @__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(
|
|
16953
16904
|
Select,
|
|
16954
16905
|
{
|
|
16955
16906
|
value: operator,
|
|
@@ -16960,12 +16911,12 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16960
16911
|
"selectedDisplay": (option) => option ? translation(FilterOperatorUtils.getInfo(option.value).translationKey) : ""
|
|
16961
16912
|
},
|
|
16962
16913
|
iconAppearance: "right",
|
|
16963
|
-
children:
|
|
16914
|
+
children: operators.map((op) => /* @__PURE__ */ jsx74(SelectOption, { value: op, label: translation(FilterOperatorUtils.getInfo(op).translationKey), children: /* @__PURE__ */ jsx74(FilterOperatorLabel, { operator: op }) }, op))
|
|
16964
16915
|
}
|
|
16965
16916
|
)
|
|
16966
16917
|
] }),
|
|
16967
|
-
/* @__PURE__ */
|
|
16968
|
-
/* @__PURE__ */
|
|
16918
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-row-0 items-center", children: [
|
|
16919
|
+
/* @__PURE__ */ jsx74(
|
|
16969
16920
|
IconButton,
|
|
16970
16921
|
{
|
|
16971
16922
|
tooltip: translation("removeFilter"),
|
|
@@ -16973,24 +16924,24 @@ var FilterBasePopUp = forwardRef23(function FilterBasePopUp2({
|
|
|
16973
16924
|
color: "negative",
|
|
16974
16925
|
coloringStyle: "text",
|
|
16975
16926
|
size: "sm",
|
|
16976
|
-
children: /* @__PURE__ */
|
|
16927
|
+
children: /* @__PURE__ */ jsx74(TrashIcon, { className: "size-4" })
|
|
16977
16928
|
}
|
|
16978
16929
|
),
|
|
16979
|
-
/* @__PURE__ */
|
|
16930
|
+
/* @__PURE__ */ jsx74(
|
|
16980
16931
|
IconButton,
|
|
16981
16932
|
{
|
|
16982
|
-
tooltip: translation("
|
|
16933
|
+
tooltip: translation("done"),
|
|
16983
16934
|
onClick: props.onClose,
|
|
16984
16935
|
color: "neutral",
|
|
16985
16936
|
coloringStyle: "text",
|
|
16986
16937
|
size: "sm",
|
|
16987
|
-
children: /* @__PURE__ */
|
|
16938
|
+
children: /* @__PURE__ */ jsx74(Check2, { className: "size-4" })
|
|
16988
16939
|
}
|
|
16989
16940
|
)
|
|
16990
16941
|
] })
|
|
16991
16942
|
] }),
|
|
16992
16943
|
children,
|
|
16993
|
-
/* @__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") }) })
|
|
16994
16945
|
]
|
|
16995
16946
|
}
|
|
16996
16947
|
);
|
|
@@ -17017,7 +16968,7 @@ var TextFilterPopUp = forwardRef23(function TextFilterPopUp2({
|
|
|
17017
16968
|
}, [value]);
|
|
17018
16969
|
const parameter = value?.parameter ?? {};
|
|
17019
16970
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17020
|
-
return /* @__PURE__ */
|
|
16971
|
+
return /* @__PURE__ */ jsx74(
|
|
17021
16972
|
FilterBasePopUp,
|
|
17022
16973
|
{
|
|
17023
16974
|
ref,
|
|
@@ -17028,44 +16979,25 @@ var TextFilterPopUp = forwardRef23(function TextFilterPopUp2({
|
|
|
17028
16979
|
onRemove,
|
|
17029
16980
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.text,
|
|
17030
16981
|
noParameterRequired: !needsParameterInput,
|
|
17031
|
-
children: /* @__PURE__ */
|
|
17032
|
-
/* @__PURE__ */
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
onValueChange
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
] }),
|
|
17051
|
-
/* @__PURE__ */ jsxs46("div", { className: "flex-row-2 items-center mt-1", children: [
|
|
17052
|
-
/* @__PURE__ */ jsx75(
|
|
17053
|
-
Checkbox,
|
|
17054
|
-
{
|
|
17055
|
-
id: ids.caseSensitive,
|
|
17056
|
-
value: parameter.isCaseSensitive ?? false,
|
|
17057
|
-
onValueChange: (isCaseSensitive) => {
|
|
17058
|
-
onValueChange({
|
|
17059
|
-
dataType: "text",
|
|
17060
|
-
operator,
|
|
17061
|
-
parameter: { ...parameter, isCaseSensitive }
|
|
17062
|
-
});
|
|
17063
|
-
}
|
|
17064
|
-
}
|
|
17065
|
-
),
|
|
17066
|
-
/* @__PURE__ */ jsx75("label", { htmlFor: ids.caseSensitive, children: translation("caseSensitive") })
|
|
17067
|
-
] })
|
|
17068
|
-
] })
|
|
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
|
+
] }) })
|
|
17069
17001
|
}
|
|
17070
17002
|
);
|
|
17071
17003
|
});
|
|
@@ -17093,7 +17025,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17093
17025
|
const parameter = value?.parameter ?? {};
|
|
17094
17026
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17095
17027
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17096
|
-
return /* @__PURE__ */
|
|
17028
|
+
return /* @__PURE__ */ jsxs45(
|
|
17097
17029
|
FilterBasePopUp,
|
|
17098
17030
|
{
|
|
17099
17031
|
ref,
|
|
@@ -17107,14 +17039,14 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17107
17039
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.number,
|
|
17108
17040
|
noParameterRequired: !needsParameterInput,
|
|
17109
17041
|
children: [
|
|
17110
|
-
/* @__PURE__ */
|
|
17111
|
-
/* @__PURE__ */
|
|
17112
|
-
/* @__PURE__ */
|
|
17113
|
-
/* @__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(
|
|
17114
17046
|
Input,
|
|
17115
17047
|
{
|
|
17116
17048
|
id: ids.min,
|
|
17117
|
-
value: parameter.
|
|
17049
|
+
value: parameter.numberMin?.toString() ?? "",
|
|
17118
17050
|
type: "number",
|
|
17119
17051
|
placeholder: "0",
|
|
17120
17052
|
onValueChange: (text) => {
|
|
@@ -17122,20 +17054,20 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17122
17054
|
onValueChange({
|
|
17123
17055
|
dataType: "number",
|
|
17124
17056
|
operator,
|
|
17125
|
-
parameter: { ...parameter,
|
|
17057
|
+
parameter: { ...parameter, numberMin: isNaN(num) ? void 0 : num }
|
|
17126
17058
|
});
|
|
17127
17059
|
},
|
|
17128
17060
|
className: "min-w-64"
|
|
17129
17061
|
}
|
|
17130
17062
|
)
|
|
17131
17063
|
] }),
|
|
17132
|
-
/* @__PURE__ */
|
|
17133
|
-
/* @__PURE__ */
|
|
17134
|
-
/* @__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(
|
|
17135
17067
|
Input,
|
|
17136
17068
|
{
|
|
17137
17069
|
id: ids.max,
|
|
17138
|
-
value: parameter.
|
|
17070
|
+
value: parameter.numberMax?.toString() ?? "",
|
|
17139
17071
|
type: "number",
|
|
17140
17072
|
placeholder: "1",
|
|
17141
17073
|
onValueChange: (text) => {
|
|
@@ -17143,7 +17075,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17143
17075
|
onValueChange({
|
|
17144
17076
|
dataType: "number",
|
|
17145
17077
|
operator,
|
|
17146
|
-
parameter: { ...parameter,
|
|
17078
|
+
parameter: { ...parameter, numberMax: isNaN(num) ? void 0 : num }
|
|
17147
17079
|
});
|
|
17148
17080
|
},
|
|
17149
17081
|
className: "min-w-64"
|
|
@@ -17151,10 +17083,10 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17151
17083
|
)
|
|
17152
17084
|
] })
|
|
17153
17085
|
] }),
|
|
17154
|
-
/* @__PURE__ */
|
|
17086
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsRangeInput && needsParameterInput, children: /* @__PURE__ */ jsx74(
|
|
17155
17087
|
Input,
|
|
17156
17088
|
{
|
|
17157
|
-
value: parameter.
|
|
17089
|
+
value: parameter.numberValue?.toString() ?? "",
|
|
17158
17090
|
type: "number",
|
|
17159
17091
|
placeholder: "0",
|
|
17160
17092
|
onValueChange: (text) => {
|
|
@@ -17162,7 +17094,7 @@ var NumberFilterPopUp = forwardRef23(function NumberFilterPopUp2({
|
|
|
17162
17094
|
onValueChange({
|
|
17163
17095
|
dataType: "number",
|
|
17164
17096
|
operator,
|
|
17165
|
-
parameter: { ...parameter,
|
|
17097
|
+
parameter: { ...parameter, numberValue: isNaN(num) ? void 0 : num }
|
|
17166
17098
|
});
|
|
17167
17099
|
},
|
|
17168
17100
|
className: "min-w-64"
|
|
@@ -17198,7 +17130,7 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17198
17130
|
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState32(null);
|
|
17199
17131
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17200
17132
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17201
|
-
return /* @__PURE__ */
|
|
17133
|
+
return /* @__PURE__ */ jsxs45(
|
|
17202
17134
|
FilterBasePopUp,
|
|
17203
17135
|
{
|
|
17204
17136
|
ref,
|
|
@@ -17210,36 +17142,36 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17210
17142
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.date,
|
|
17211
17143
|
noParameterRequired: !needsParameterInput,
|
|
17212
17144
|
children: [
|
|
17213
|
-
/* @__PURE__ */
|
|
17214
|
-
/* @__PURE__ */
|
|
17215
|
-
/* @__PURE__ */
|
|
17216
|
-
/* @__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(
|
|
17217
17149
|
DateTimeInput,
|
|
17218
17150
|
{
|
|
17219
17151
|
id: ids.startDate,
|
|
17220
|
-
value: temporaryMinDateValue ?? parameter.
|
|
17152
|
+
value: temporaryMinDateValue ?? parameter.dateMin ?? null,
|
|
17221
17153
|
onValueChange: setTemporaryMinDateValue,
|
|
17222
17154
|
onEditComplete: (dateValue) => {
|
|
17223
|
-
if (dateValue && parameter.
|
|
17224
|
-
if (!parameter.
|
|
17155
|
+
if (dateValue && parameter.dateMax && dateValue > parameter.dateMax) {
|
|
17156
|
+
if (!parameter.dateMin) {
|
|
17225
17157
|
onValueChange({
|
|
17226
17158
|
dataType: "date",
|
|
17227
17159
|
operator,
|
|
17228
|
-
parameter: { ...parameter,
|
|
17160
|
+
parameter: { ...parameter, dateMin: parameter.dateMax, dateMax: dateValue }
|
|
17229
17161
|
});
|
|
17230
17162
|
} else {
|
|
17231
|
-
const diff = parameter.
|
|
17163
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17232
17164
|
onValueChange({
|
|
17233
17165
|
dataType: "date",
|
|
17234
17166
|
operator,
|
|
17235
|
-
parameter: { ...parameter,
|
|
17167
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: new Date(dateValue.getTime() + diff) }
|
|
17236
17168
|
});
|
|
17237
17169
|
}
|
|
17238
17170
|
} else {
|
|
17239
17171
|
onValueChange({
|
|
17240
17172
|
dataType: "date",
|
|
17241
17173
|
operator,
|
|
17242
|
-
parameter: { ...parameter,
|
|
17174
|
+
parameter: { ...parameter, dateMin: dateValue }
|
|
17243
17175
|
});
|
|
17244
17176
|
}
|
|
17245
17177
|
setTemporaryMinDateValue(null);
|
|
@@ -17250,35 +17182,35 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17250
17182
|
}
|
|
17251
17183
|
)
|
|
17252
17184
|
] }),
|
|
17253
|
-
/* @__PURE__ */
|
|
17254
|
-
/* @__PURE__ */
|
|
17255
|
-
/* @__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(
|
|
17256
17188
|
DateTimeInput,
|
|
17257
17189
|
{
|
|
17258
17190
|
id: ids.endDate,
|
|
17259
|
-
value: temporaryMaxDateValue ?? parameter.
|
|
17191
|
+
value: temporaryMaxDateValue ?? parameter.dateMax ?? null,
|
|
17260
17192
|
onValueChange: setTemporaryMaxDateValue,
|
|
17261
17193
|
onEditComplete: (dateValue) => {
|
|
17262
|
-
if (dateValue && parameter.
|
|
17263
|
-
if (!parameter.
|
|
17194
|
+
if (dateValue && parameter.dateMin && dateValue < parameter.dateMin) {
|
|
17195
|
+
if (!parameter.dateMax) {
|
|
17264
17196
|
onValueChange({
|
|
17265
17197
|
dataType: "date",
|
|
17266
17198
|
operator,
|
|
17267
|
-
parameter: { ...parameter,
|
|
17199
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: parameter.dateMin }
|
|
17268
17200
|
});
|
|
17269
17201
|
} else {
|
|
17270
|
-
const diff = parameter.
|
|
17202
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17271
17203
|
onValueChange({
|
|
17272
17204
|
dataType: "date",
|
|
17273
17205
|
operator,
|
|
17274
|
-
parameter: { ...parameter,
|
|
17206
|
+
parameter: { ...parameter, dateMin: new Date(dateValue.getTime() - diff), dateMax: dateValue }
|
|
17275
17207
|
});
|
|
17276
17208
|
}
|
|
17277
17209
|
} else {
|
|
17278
17210
|
onValueChange({
|
|
17279
17211
|
dataType: "date",
|
|
17280
17212
|
operator,
|
|
17281
|
-
parameter: { ...parameter,
|
|
17213
|
+
parameter: { ...parameter, dateMax: dateValue }
|
|
17282
17214
|
});
|
|
17283
17215
|
}
|
|
17284
17216
|
setTemporaryMaxDateValue(null);
|
|
@@ -17290,17 +17222,17 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17290
17222
|
)
|
|
17291
17223
|
] })
|
|
17292
17224
|
] }),
|
|
17293
|
-
/* @__PURE__ */
|
|
17294
|
-
/* @__PURE__ */
|
|
17295
|
-
/* @__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(
|
|
17296
17228
|
DateTimeInput,
|
|
17297
17229
|
{
|
|
17298
17230
|
id: ids.compareDate,
|
|
17299
|
-
value: parameter.
|
|
17231
|
+
value: parameter.dateValue ?? null,
|
|
17300
17232
|
onValueChange: (compareDate) => {
|
|
17301
17233
|
onValueChange({
|
|
17302
17234
|
...value,
|
|
17303
|
-
parameter: { ...parameter, compareDate }
|
|
17235
|
+
parameter: { ...parameter, dateValue: compareDate }
|
|
17304
17236
|
});
|
|
17305
17237
|
},
|
|
17306
17238
|
allowRemove: true,
|
|
@@ -17309,7 +17241,7 @@ var DateFilterPopUp = forwardRef23(function DateFilterPopUp2({
|
|
|
17309
17241
|
}
|
|
17310
17242
|
)
|
|
17311
17243
|
] }),
|
|
17312
|
-
/* @__PURE__ */
|
|
17244
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17313
17245
|
]
|
|
17314
17246
|
}
|
|
17315
17247
|
);
|
|
@@ -17340,7 +17272,7 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17340
17272
|
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = useState32(null);
|
|
17341
17273
|
const needsRangeInput = operator === "between" || operator === "notBetween";
|
|
17342
17274
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17343
|
-
return /* @__PURE__ */
|
|
17275
|
+
return /* @__PURE__ */ jsxs45(
|
|
17344
17276
|
FilterBasePopUp,
|
|
17345
17277
|
{
|
|
17346
17278
|
ref,
|
|
@@ -17351,37 +17283,37 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17351
17283
|
onRemove,
|
|
17352
17284
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.dateTime,
|
|
17353
17285
|
children: [
|
|
17354
|
-
/* @__PURE__ */
|
|
17355
|
-
/* @__PURE__ */
|
|
17356
|
-
/* @__PURE__ */
|
|
17357
|
-
/* @__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(
|
|
17358
17290
|
DateTimeInput,
|
|
17359
17291
|
{
|
|
17360
17292
|
id: ids.startDate,
|
|
17361
17293
|
mode: "dateTime",
|
|
17362
|
-
value: temporaryMinDateValue ?? parameter.
|
|
17294
|
+
value: temporaryMinDateValue ?? parameter.dateMin ?? null,
|
|
17363
17295
|
onValueChange: setTemporaryMinDateValue,
|
|
17364
17296
|
onEditComplete: (dateValue) => {
|
|
17365
|
-
if (dateValue && parameter.
|
|
17366
|
-
if (!parameter.
|
|
17297
|
+
if (dateValue && parameter.dateMax && dateValue > parameter.dateMax) {
|
|
17298
|
+
if (!parameter.dateMin) {
|
|
17367
17299
|
onValueChange({
|
|
17368
17300
|
dataType: "dateTime",
|
|
17369
17301
|
operator,
|
|
17370
|
-
parameter: { ...parameter,
|
|
17302
|
+
parameter: { ...parameter, dateMin: parameter.dateMax, dateMax: dateValue }
|
|
17371
17303
|
});
|
|
17372
17304
|
} else {
|
|
17373
|
-
const diff = parameter.
|
|
17305
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17374
17306
|
onValueChange({
|
|
17375
17307
|
dataType: "dateTime",
|
|
17376
17308
|
operator,
|
|
17377
|
-
parameter: { ...parameter,
|
|
17309
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: new Date(dateValue.getTime() + diff) }
|
|
17378
17310
|
});
|
|
17379
17311
|
}
|
|
17380
17312
|
} else {
|
|
17381
17313
|
onValueChange({
|
|
17382
17314
|
dataType: "dateTime",
|
|
17383
17315
|
operator,
|
|
17384
|
-
parameter: { ...parameter,
|
|
17316
|
+
parameter: { ...parameter, dateMin: dateValue }
|
|
17385
17317
|
});
|
|
17386
17318
|
}
|
|
17387
17319
|
setTemporaryMinDateValue(null);
|
|
@@ -17391,35 +17323,35 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17391
17323
|
className: "min-w-64"
|
|
17392
17324
|
}
|
|
17393
17325
|
),
|
|
17394
|
-
/* @__PURE__ */
|
|
17395
|
-
/* @__PURE__ */
|
|
17326
|
+
/* @__PURE__ */ jsx74("label", { htmlFor: ids.endDate, className: "typography-label-md", children: translation("endDate") }),
|
|
17327
|
+
/* @__PURE__ */ jsx74(
|
|
17396
17328
|
DateTimeInput,
|
|
17397
17329
|
{
|
|
17398
17330
|
id: ids.endDate,
|
|
17399
17331
|
mode: "dateTime",
|
|
17400
|
-
value: temporaryMaxDateValue ?? parameter.
|
|
17332
|
+
value: temporaryMaxDateValue ?? parameter.dateMax ?? null,
|
|
17401
17333
|
onValueChange: setTemporaryMaxDateValue,
|
|
17402
17334
|
onEditComplete: (dateValue) => {
|
|
17403
|
-
if (dateValue && parameter.
|
|
17404
|
-
if (!parameter.
|
|
17335
|
+
if (dateValue && parameter.dateMin && dateValue < parameter.dateMin) {
|
|
17336
|
+
if (!parameter.dateMax) {
|
|
17405
17337
|
onValueChange({
|
|
17406
17338
|
dataType: "dateTime",
|
|
17407
17339
|
operator,
|
|
17408
|
-
parameter: { ...parameter,
|
|
17340
|
+
parameter: { ...parameter, dateMin: dateValue, dateMax: parameter.dateMin }
|
|
17409
17341
|
});
|
|
17410
17342
|
} else {
|
|
17411
|
-
const diff = parameter.
|
|
17343
|
+
const diff = parameter.dateMax.getTime() - parameter.dateMin.getTime();
|
|
17412
17344
|
onValueChange({
|
|
17413
17345
|
dataType: "dateTime",
|
|
17414
17346
|
operator,
|
|
17415
|
-
parameter: { ...parameter,
|
|
17347
|
+
parameter: { ...parameter, dateMin: new Date(dateValue.getTime() - diff), dateMax: dateValue }
|
|
17416
17348
|
});
|
|
17417
17349
|
}
|
|
17418
17350
|
} else {
|
|
17419
17351
|
onValueChange({
|
|
17420
17352
|
dataType: "dateTime",
|
|
17421
17353
|
operator,
|
|
17422
|
-
parameter: { ...parameter,
|
|
17354
|
+
parameter: { ...parameter, dateMax: dateValue }
|
|
17423
17355
|
});
|
|
17424
17356
|
}
|
|
17425
17357
|
setTemporaryMaxDateValue(null);
|
|
@@ -17430,19 +17362,19 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17430
17362
|
}
|
|
17431
17363
|
)
|
|
17432
17364
|
] }) }),
|
|
17433
|
-
/* @__PURE__ */
|
|
17434
|
-
/* @__PURE__ */
|
|
17435
|
-
/* @__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(
|
|
17436
17368
|
DateTimeInput,
|
|
17437
17369
|
{
|
|
17438
17370
|
id: ids.compareDate,
|
|
17439
17371
|
mode: "dateTime",
|
|
17440
|
-
value: parameter.
|
|
17372
|
+
value: parameter.dateValue ?? null,
|
|
17441
17373
|
onValueChange: (compareDate) => {
|
|
17442
17374
|
onValueChange({
|
|
17443
17375
|
dataType: "dateTime",
|
|
17444
17376
|
operator,
|
|
17445
|
-
parameter: { ...parameter, compareDate }
|
|
17377
|
+
parameter: { ...parameter, dateValue: compareDate }
|
|
17446
17378
|
});
|
|
17447
17379
|
},
|
|
17448
17380
|
allowRemove: true,
|
|
@@ -17451,7 +17383,7 @@ var DatetimeFilterPopUp = forwardRef23(function DatetimeFilterPopUp2({
|
|
|
17451
17383
|
}
|
|
17452
17384
|
)
|
|
17453
17385
|
] }),
|
|
17454
|
-
/* @__PURE__ */
|
|
17386
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17455
17387
|
]
|
|
17456
17388
|
}
|
|
17457
17389
|
);
|
|
@@ -17471,7 +17403,7 @@ var BooleanFilterPopUp = forwardRef23(function BooleanFilterPopUp2({
|
|
|
17471
17403
|
return suggestion;
|
|
17472
17404
|
}, [value]);
|
|
17473
17405
|
const parameter = value?.parameter ?? {};
|
|
17474
|
-
return /* @__PURE__ */
|
|
17406
|
+
return /* @__PURE__ */ jsx74(
|
|
17475
17407
|
FilterBasePopUp,
|
|
17476
17408
|
{
|
|
17477
17409
|
ref,
|
|
@@ -17501,12 +17433,12 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17501
17433
|
return suggestion;
|
|
17502
17434
|
}, [value]);
|
|
17503
17435
|
const parameter = value?.parameter ?? {};
|
|
17504
|
-
const selectedTags = Array.isArray(parameter.
|
|
17436
|
+
const selectedTags = Array.isArray(parameter.uuidValues) ? parameter.uuidValues : [];
|
|
17505
17437
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17506
17438
|
if (availableTags.length === 0) {
|
|
17507
17439
|
return null;
|
|
17508
17440
|
}
|
|
17509
|
-
return /* @__PURE__ */
|
|
17441
|
+
return /* @__PURE__ */ jsxs45(
|
|
17510
17442
|
FilterBasePopUp,
|
|
17511
17443
|
{
|
|
17512
17444
|
ref,
|
|
@@ -17517,8 +17449,8 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17517
17449
|
onRemove,
|
|
17518
17450
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.multiTags,
|
|
17519
17451
|
children: [
|
|
17520
|
-
/* @__PURE__ */
|
|
17521
|
-
/* @__PURE__ */
|
|
17452
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
17453
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput, children: /* @__PURE__ */ jsx74(
|
|
17522
17454
|
MultiSelect,
|
|
17523
17455
|
{
|
|
17524
17456
|
value: selectedTags,
|
|
@@ -17526,14 +17458,14 @@ var TagsFilterPopUp = forwardRef23(function TagsFilterPopUp2({
|
|
|
17526
17458
|
onValueChange({
|
|
17527
17459
|
dataType: "multiTags",
|
|
17528
17460
|
operator,
|
|
17529
|
-
parameter: { ...parameter,
|
|
17461
|
+
parameter: { ...parameter, uuidValues: selected.length > 0 ? selected : void 0 }
|
|
17530
17462
|
});
|
|
17531
17463
|
},
|
|
17532
17464
|
buttonProps: { className: "min-w-64" },
|
|
17533
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17465
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(MultiSelectOption, { value: tag, label, children: label }, tag))
|
|
17534
17466
|
}
|
|
17535
17467
|
) }),
|
|
17536
|
-
/* @__PURE__ */
|
|
17468
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17537
17469
|
]
|
|
17538
17470
|
}
|
|
17539
17471
|
);
|
|
@@ -17555,14 +17487,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17555
17487
|
return suggestion;
|
|
17556
17488
|
}, [value]);
|
|
17557
17489
|
const parameter = value?.parameter ?? {};
|
|
17558
|
-
const selectedTagsMulti = Array.isArray(parameter.
|
|
17559
|
-
const selectedTagSingle = parameter.
|
|
17490
|
+
const selectedTagsMulti = Array.isArray(parameter.uuidValues) ? parameter.uuidValues : [];
|
|
17491
|
+
const selectedTagSingle = parameter.uuidValue != null ? String(parameter.uuidValue) : void 0;
|
|
17560
17492
|
const needsParameterInput = operator !== "isUndefined" && operator !== "isNotUndefined";
|
|
17561
17493
|
const needsMultiSelect = operator === "contains" || operator === "notContains";
|
|
17562
17494
|
if (availableTags.length === 0) {
|
|
17563
17495
|
return null;
|
|
17564
17496
|
}
|
|
17565
|
-
return /* @__PURE__ */
|
|
17497
|
+
return /* @__PURE__ */ jsxs45(
|
|
17566
17498
|
FilterBasePopUp,
|
|
17567
17499
|
{
|
|
17568
17500
|
ref,
|
|
@@ -17573,8 +17505,8 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17573
17505
|
onRemove,
|
|
17574
17506
|
allowedOperators: FilterOperatorUtils.operatorsByCategory.singleTag,
|
|
17575
17507
|
children: [
|
|
17576
|
-
/* @__PURE__ */
|
|
17577
|
-
/* @__PURE__ */
|
|
17508
|
+
/* @__PURE__ */ jsx74("span", { className: "typography-label-lg font-semibold", children: translation("parameter") }),
|
|
17509
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput && needsMultiSelect, children: /* @__PURE__ */ jsx74(
|
|
17578
17510
|
MultiSelect,
|
|
17579
17511
|
{
|
|
17580
17512
|
value: selectedTagsMulti,
|
|
@@ -17582,14 +17514,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17582
17514
|
onValueChange({
|
|
17583
17515
|
dataType: "singleTag",
|
|
17584
17516
|
operator,
|
|
17585
|
-
parameter: { ...parameter,
|
|
17517
|
+
parameter: { ...parameter, uuidValues: selected.length > 0 ? selected : void 0 }
|
|
17586
17518
|
});
|
|
17587
17519
|
},
|
|
17588
17520
|
buttonProps: { className: "min-w-64" },
|
|
17589
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17521
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(MultiSelectOption, { value: tag, label }, tag))
|
|
17590
17522
|
}
|
|
17591
17523
|
) }),
|
|
17592
|
-
/* @__PURE__ */
|
|
17524
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: needsParameterInput && !needsMultiSelect, children: /* @__PURE__ */ jsx74(
|
|
17593
17525
|
Select,
|
|
17594
17526
|
{
|
|
17595
17527
|
value: selectedTagSingle,
|
|
@@ -17597,14 +17529,14 @@ var TagsSingleFilterPopUp = forwardRef23(function TagsSingleFilterPopUp2({
|
|
|
17597
17529
|
onValueChange({
|
|
17598
17530
|
dataType: "singleTag",
|
|
17599
17531
|
operator,
|
|
17600
|
-
parameter: { ...parameter,
|
|
17532
|
+
parameter: { ...parameter, uuidValue: selectedTag ?? void 0 }
|
|
17601
17533
|
});
|
|
17602
17534
|
},
|
|
17603
17535
|
buttonProps: { className: "min-w-64" },
|
|
17604
|
-
children: availableTags.map(({ tag, label }) => /* @__PURE__ */
|
|
17536
|
+
children: availableTags.map(({ tag, label }) => /* @__PURE__ */ jsx74(SelectOption, { value: tag, label }, tag))
|
|
17605
17537
|
}
|
|
17606
17538
|
) }),
|
|
17607
|
-
/* @__PURE__ */
|
|
17539
|
+
/* @__PURE__ */ jsx74(Visibility, { isVisible: !needsParameterInput, children: /* @__PURE__ */ jsx74("span", { className: "text-sm text-description h-10", children: translation("noParameterRequired") }) })
|
|
17608
17540
|
]
|
|
17609
17541
|
}
|
|
17610
17542
|
);
|
|
@@ -17617,7 +17549,7 @@ var GenericFilterPopUp = forwardRef23(function GenericFilterPopUp2({ name, value
|
|
|
17617
17549
|
}
|
|
17618
17550
|
return suggestion;
|
|
17619
17551
|
}, [value]);
|
|
17620
|
-
return /* @__PURE__ */
|
|
17552
|
+
return /* @__PURE__ */ jsx74(
|
|
17621
17553
|
FilterBasePopUp,
|
|
17622
17554
|
{
|
|
17623
17555
|
ref,
|
|
@@ -17640,26 +17572,26 @@ var FilterPopUp = forwardRef23(function FilterPopUp2({
|
|
|
17640
17572
|
}, ref) {
|
|
17641
17573
|
switch (dataType) {
|
|
17642
17574
|
case "text":
|
|
17643
|
-
return /* @__PURE__ */
|
|
17575
|
+
return /* @__PURE__ */ jsx74(TextFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17644
17576
|
case "number":
|
|
17645
|
-
return /* @__PURE__ */
|
|
17577
|
+
return /* @__PURE__ */ jsx74(NumberFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17646
17578
|
case "date":
|
|
17647
|
-
return /* @__PURE__ */
|
|
17579
|
+
return /* @__PURE__ */ jsx74(DateFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17648
17580
|
case "dateTime":
|
|
17649
|
-
return /* @__PURE__ */
|
|
17581
|
+
return /* @__PURE__ */ jsx74(DatetimeFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17650
17582
|
case "boolean":
|
|
17651
|
-
return /* @__PURE__ */
|
|
17583
|
+
return /* @__PURE__ */ jsx74(BooleanFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17652
17584
|
case "multiTags":
|
|
17653
|
-
return /* @__PURE__ */
|
|
17585
|
+
return /* @__PURE__ */ jsx74(TagsFilterPopUp, { ref, name, value, onValueChange, tags, ...props });
|
|
17654
17586
|
case "singleTag":
|
|
17655
|
-
return /* @__PURE__ */
|
|
17587
|
+
return /* @__PURE__ */ jsx74(TagsSingleFilterPopUp, { ref, name, value, onValueChange, tags, ...props });
|
|
17656
17588
|
case "unknownType":
|
|
17657
|
-
return /* @__PURE__ */
|
|
17589
|
+
return /* @__PURE__ */ jsx74(GenericFilterPopUp, { ref, name, value, onValueChange, ...props });
|
|
17658
17590
|
}
|
|
17659
17591
|
});
|
|
17660
17592
|
|
|
17661
17593
|
// src/components/layout/table/TableFilterButton.tsx
|
|
17662
|
-
import { Fragment as Fragment8, jsx as
|
|
17594
|
+
import { Fragment as Fragment8, jsx as jsx75, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
17663
17595
|
var TableFilterButton = ({
|
|
17664
17596
|
filterType,
|
|
17665
17597
|
header
|
|
@@ -17678,7 +17610,7 @@ var TableFilterButton = ({
|
|
|
17678
17610
|
popup: `table-filter-popup-${id}`,
|
|
17679
17611
|
label: `table-filter-label-${id}`
|
|
17680
17612
|
}), [id]);
|
|
17681
|
-
|
|
17613
|
+
useEffect42(() => {
|
|
17682
17614
|
setFilterValue(columnFilterValue);
|
|
17683
17615
|
}, [columnFilterValue]);
|
|
17684
17616
|
const isTagsFilter = filterType === "multiTags" || filterType === "singleTag";
|
|
@@ -17686,8 +17618,8 @@ var TableFilterButton = ({
|
|
|
17686
17618
|
if (isTagsFilter && !hasTagsMetaData) {
|
|
17687
17619
|
return null;
|
|
17688
17620
|
}
|
|
17689
|
-
return /* @__PURE__ */
|
|
17690
|
-
/* @__PURE__ */
|
|
17621
|
+
return /* @__PURE__ */ jsxs46(Fragment8, { children: [
|
|
17622
|
+
/* @__PURE__ */ jsxs46(
|
|
17691
17623
|
IconButton,
|
|
17692
17624
|
{
|
|
17693
17625
|
ref: anchorRef,
|
|
@@ -17703,12 +17635,12 @@ var TableFilterButton = ({
|
|
|
17703
17635
|
"aria-labelledby": ids.label,
|
|
17704
17636
|
className: "relative",
|
|
17705
17637
|
children: [
|
|
17706
|
-
/* @__PURE__ */
|
|
17707
|
-
/* @__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" }) })
|
|
17708
17640
|
]
|
|
17709
17641
|
}
|
|
17710
17642
|
),
|
|
17711
|
-
/* @__PURE__ */
|
|
17643
|
+
/* @__PURE__ */ jsx75(
|
|
17712
17644
|
FilterPopUp,
|
|
17713
17645
|
{
|
|
17714
17646
|
ref: containerRef,
|
|
@@ -17739,11 +17671,11 @@ var TableFilterButton = ({
|
|
|
17739
17671
|
};
|
|
17740
17672
|
|
|
17741
17673
|
// src/components/layout/table/TableHeader.tsx
|
|
17742
|
-
import { useCallback as
|
|
17674
|
+
import { useCallback as useCallback35, useEffect as useEffect43 } from "react";
|
|
17743
17675
|
|
|
17744
17676
|
// src/components/user-interaction/data/data-types.tsx
|
|
17745
17677
|
import { Binary, Calendar as Calendar2, CalendarClock, Check as Check3, Database, Tag, Tags, TextIcon } from "lucide-react";
|
|
17746
|
-
import { jsx as
|
|
17678
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
17747
17679
|
var dataTypes = [
|
|
17748
17680
|
"text",
|
|
17749
17681
|
"number",
|
|
@@ -17776,21 +17708,21 @@ var getDefaultValue = (type, selectOptions) => {
|
|
|
17776
17708
|
function toIcon(type) {
|
|
17777
17709
|
switch (type) {
|
|
17778
17710
|
case "text":
|
|
17779
|
-
return /* @__PURE__ */
|
|
17711
|
+
return /* @__PURE__ */ jsx76(TextIcon, { className: "size-4" });
|
|
17780
17712
|
case "number":
|
|
17781
|
-
return /* @__PURE__ */
|
|
17713
|
+
return /* @__PURE__ */ jsx76(Binary, { className: "size-4" });
|
|
17782
17714
|
case "boolean":
|
|
17783
|
-
return /* @__PURE__ */
|
|
17715
|
+
return /* @__PURE__ */ jsx76(Check3, { className: "size-4" });
|
|
17784
17716
|
case "date":
|
|
17785
|
-
return /* @__PURE__ */
|
|
17717
|
+
return /* @__PURE__ */ jsx76(Calendar2, { className: "size-4" });
|
|
17786
17718
|
case "dateTime":
|
|
17787
|
-
return /* @__PURE__ */
|
|
17719
|
+
return /* @__PURE__ */ jsx76(CalendarClock, { className: "size-4" });
|
|
17788
17720
|
case "singleTag":
|
|
17789
|
-
return /* @__PURE__ */
|
|
17721
|
+
return /* @__PURE__ */ jsx76(Tag, { className: "size-4" });
|
|
17790
17722
|
case "multiTags":
|
|
17791
|
-
return /* @__PURE__ */
|
|
17723
|
+
return /* @__PURE__ */ jsx76(Tags, { className: "size-4" });
|
|
17792
17724
|
case "unknownType":
|
|
17793
|
-
return /* @__PURE__ */
|
|
17725
|
+
return /* @__PURE__ */ jsx76(Database, { className: "size-4" });
|
|
17794
17726
|
}
|
|
17795
17727
|
}
|
|
17796
17728
|
var DataTypeUtils = {
|
|
@@ -17800,10 +17732,10 @@ var DataTypeUtils = {
|
|
|
17800
17732
|
};
|
|
17801
17733
|
|
|
17802
17734
|
// src/components/layout/table/TableHeader.tsx
|
|
17803
|
-
import { Fragment as Fragment9, jsx as
|
|
17735
|
+
import { Fragment as Fragment9, jsx as jsx77, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
17804
17736
|
var TableHeader = ({ isSticky = false }) => {
|
|
17805
17737
|
const { table } = useTableStateWithoutSizingContext();
|
|
17806
|
-
const handleResizeMove =
|
|
17738
|
+
const handleResizeMove = useCallback35((e) => {
|
|
17807
17739
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
17808
17740
|
const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
17809
17741
|
const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
|
|
@@ -17819,7 +17751,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17819
17751
|
deltaOffset
|
|
17820
17752
|
}));
|
|
17821
17753
|
}, [table]);
|
|
17822
|
-
const handleResizeEnd =
|
|
17754
|
+
const handleResizeEnd = useCallback35(() => {
|
|
17823
17755
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
17824
17756
|
const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
|
|
17825
17757
|
table.setColumnSizing((prev) => {
|
|
@@ -17837,7 +17769,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17837
17769
|
startSize: null
|
|
17838
17770
|
});
|
|
17839
17771
|
}, [table]);
|
|
17840
|
-
|
|
17772
|
+
useEffect43(() => {
|
|
17841
17773
|
window.addEventListener("pointermove", handleResizeMove);
|
|
17842
17774
|
window.addEventListener("pointerup", handleResizeEnd);
|
|
17843
17775
|
return () => {
|
|
@@ -17845,8 +17777,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17845
17777
|
window.removeEventListener("pointerup", handleResizeEnd);
|
|
17846
17778
|
};
|
|
17847
17779
|
}, [handleResizeEnd, handleResizeMove, table]);
|
|
17848
|
-
return /* @__PURE__ */
|
|
17849
|
-
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(
|
|
17850
17782
|
"col",
|
|
17851
17783
|
{
|
|
17852
17784
|
style: {
|
|
@@ -17857,8 +17789,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17857
17789
|
},
|
|
17858
17790
|
header.id
|
|
17859
17791
|
)) }) }, headerGroup.id)),
|
|
17860
|
-
/* @__PURE__ */
|
|
17861
|
-
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(
|
|
17862
17794
|
"th",
|
|
17863
17795
|
{
|
|
17864
17796
|
colSpan: header.colSpan,
|
|
@@ -17866,8 +17798,8 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17866
17798
|
"data-name": "table-header-cell",
|
|
17867
17799
|
className: clsx28("group/table-header-cell", header.column.columnDef.meta?.className),
|
|
17868
17800
|
children: [
|
|
17869
|
-
/* @__PURE__ */
|
|
17870
|
-
/* @__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(
|
|
17871
17803
|
TableSortButton,
|
|
17872
17804
|
{
|
|
17873
17805
|
sortDirection: header.column.getIsSorted(),
|
|
@@ -17893,7 +17825,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17893
17825
|
}
|
|
17894
17826
|
}
|
|
17895
17827
|
) }),
|
|
17896
|
-
/* @__PURE__ */
|
|
17828
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: header.column.getCanFilter() && DataTypeUtils.types.includes(header.column.columnDef.filterFn), children: /* @__PURE__ */ jsx77(
|
|
17897
17829
|
TableFilterButton,
|
|
17898
17830
|
{
|
|
17899
17831
|
header,
|
|
@@ -17905,7 +17837,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17905
17837
|
header.getContext()
|
|
17906
17838
|
)
|
|
17907
17839
|
] }) }),
|
|
17908
|
-
/* @__PURE__ */
|
|
17840
|
+
/* @__PURE__ */ jsx77(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ jsx77(
|
|
17909
17841
|
"div",
|
|
17910
17842
|
{
|
|
17911
17843
|
onPointerDown: (e) => {
|
|
@@ -17936,7 +17868,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
17936
17868
|
};
|
|
17937
17869
|
|
|
17938
17870
|
// src/components/layout/table/TableDisplay.tsx
|
|
17939
|
-
import { jsx as
|
|
17871
|
+
import { jsx as jsx78, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
17940
17872
|
var TableDisplay = ({
|
|
17941
17873
|
children,
|
|
17942
17874
|
containerProps,
|
|
@@ -17945,7 +17877,7 @@ var TableDisplay = ({
|
|
|
17945
17877
|
}) => {
|
|
17946
17878
|
const { table } = useTableStateContext();
|
|
17947
17879
|
const { containerRef } = useTableContainerContext();
|
|
17948
|
-
return /* @__PURE__ */
|
|
17880
|
+
return /* @__PURE__ */ jsx78("div", { ...containerProps, ref: containerRef, "data-name": containerProps?.["data-name"] ?? "table-container", children: /* @__PURE__ */ jsxs48(
|
|
17949
17881
|
"table",
|
|
17950
17882
|
{
|
|
17951
17883
|
...props,
|
|
@@ -17956,8 +17888,8 @@ var TableDisplay = ({
|
|
|
17956
17888
|
},
|
|
17957
17889
|
children: [
|
|
17958
17890
|
children,
|
|
17959
|
-
/* @__PURE__ */
|
|
17960
|
-
/* @__PURE__ */
|
|
17891
|
+
/* @__PURE__ */ jsx78(TableHeader, { ...tableHeaderProps }),
|
|
17892
|
+
/* @__PURE__ */ jsx78(TableBody, {})
|
|
17961
17893
|
]
|
|
17962
17894
|
}
|
|
17963
17895
|
) });
|
|
@@ -17965,10 +17897,10 @@ var TableDisplay = ({
|
|
|
17965
17897
|
|
|
17966
17898
|
// src/components/layout/table/TablePagination.tsx
|
|
17967
17899
|
import clsx29 from "clsx";
|
|
17968
|
-
import { jsx as
|
|
17900
|
+
import { jsx as jsx79, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
17969
17901
|
var TablePaginationMenu = ({ ...props }) => {
|
|
17970
17902
|
const { table } = useTableStateWithoutSizingContext();
|
|
17971
|
-
return /* @__PURE__ */
|
|
17903
|
+
return /* @__PURE__ */ jsx79(
|
|
17972
17904
|
Pagination,
|
|
17973
17905
|
{
|
|
17974
17906
|
...props,
|
|
@@ -17988,23 +17920,86 @@ var TablePageSizeSelect = ({
|
|
|
17988
17920
|
}) => {
|
|
17989
17921
|
const { table } = useTableStateWithoutSizingContext();
|
|
17990
17922
|
const currentPageSize = table.getState().pagination.pageSize;
|
|
17991
|
-
return /* @__PURE__ */
|
|
17923
|
+
return /* @__PURE__ */ jsx79(
|
|
17992
17924
|
Select,
|
|
17993
17925
|
{
|
|
17994
17926
|
...props,
|
|
17995
17927
|
value: currentPageSize.toString(),
|
|
17996
17928
|
onValueChange: (value) => table.setPageSize(Number(value)),
|
|
17997
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
17929
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx79(SelectOption, { value: size.toString(), label: size.toString() }, size))
|
|
17998
17930
|
}
|
|
17999
17931
|
);
|
|
18000
17932
|
};
|
|
18001
17933
|
var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
|
|
18002
|
-
return /* @__PURE__ */
|
|
18003
|
-
/* @__PURE__ */
|
|
18004
|
-
/* @__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" } }) })
|
|
18005
17937
|
] });
|
|
18006
17938
|
};
|
|
18007
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
|
+
|
|
18008
18003
|
// src/components/layout/table/TableWithSelectionProvider.tsx
|
|
18009
18004
|
import { useCallback as useCallback37, useMemo as useMemo35 } from "react";
|
|
18010
18005
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
@@ -18122,7 +18117,7 @@ var TableWithSelection = ({
|
|
|
18122
18117
|
};
|
|
18123
18118
|
|
|
18124
18119
|
// src/components/layout/table/TableColumn.tsx
|
|
18125
|
-
import { memo as memo2, useEffect as
|
|
18120
|
+
import { memo as memo2, useEffect as useEffect44, useMemo as useMemo36, useState as useState34 } from "react";
|
|
18126
18121
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
18127
18122
|
var TableColumnComponent = ({
|
|
18128
18123
|
filterType,
|
|
@@ -18138,7 +18133,7 @@ var TableColumnComponent = ({
|
|
|
18138
18133
|
...props,
|
|
18139
18134
|
filterFn
|
|
18140
18135
|
});
|
|
18141
|
-
|
|
18136
|
+
useEffect44(() => {
|
|
18142
18137
|
const unsubscribe = registerColumn(column);
|
|
18143
18138
|
return () => {
|
|
18144
18139
|
unsubscribe();
|
|
@@ -18682,7 +18677,7 @@ var ComboboxInput = forwardRef24(
|
|
|
18682
18677
|
);
|
|
18683
18678
|
|
|
18684
18679
|
// src/components/user-interaction/Combobox/ComboboxList.tsx
|
|
18685
|
-
import { forwardRef as forwardRef25, useEffect as
|
|
18680
|
+
import { forwardRef as forwardRef25, useEffect as useEffect45, useRef as useRef36 } from "react";
|
|
18686
18681
|
import clsx31 from "clsx";
|
|
18687
18682
|
import { jsx as jsx87, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
18688
18683
|
var ComboboxList = forwardRef25(
|
|
@@ -18692,7 +18687,7 @@ var ComboboxList = forwardRef25(
|
|
|
18692
18687
|
const { layout } = context;
|
|
18693
18688
|
const { registerList } = layout;
|
|
18694
18689
|
const innerRef = useRef36(null);
|
|
18695
|
-
|
|
18690
|
+
useEffect45(() => {
|
|
18696
18691
|
return registerList(innerRef);
|
|
18697
18692
|
}, [registerList]);
|
|
18698
18693
|
const setRefs = (node) => {
|
|
@@ -18759,7 +18754,7 @@ var Combobox = forwardRef26(function Combobox2({
|
|
|
18759
18754
|
});
|
|
18760
18755
|
|
|
18761
18756
|
// src/components/user-interaction/Combobox/ComboboxOption.tsx
|
|
18762
|
-
import { forwardRef as forwardRef27, useEffect as
|
|
18757
|
+
import { forwardRef as forwardRef27, useEffect as useEffect46, useId as useId21, useRef as useRef37 } from "react";
|
|
18763
18758
|
import clsx32 from "clsx";
|
|
18764
18759
|
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
18765
18760
|
var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
@@ -18777,7 +18772,7 @@ var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
|
18777
18772
|
const generatedId = useId21();
|
|
18778
18773
|
const optionId = idProp ?? `combobox-option-${generatedId}`;
|
|
18779
18774
|
const resolvedDisplay = children ?? label;
|
|
18780
|
-
|
|
18775
|
+
useEffect46(() => {
|
|
18781
18776
|
return registerOption({
|
|
18782
18777
|
id: optionId,
|
|
18783
18778
|
value,
|
|
@@ -18787,7 +18782,7 @@ var ComboboxOption = forwardRef27(function ComboboxOption2({
|
|
|
18787
18782
|
ref: itemRef
|
|
18788
18783
|
});
|
|
18789
18784
|
}, [optionId, value, label, resolvedDisplay, disabled, registerOption]);
|
|
18790
|
-
|
|
18785
|
+
useEffect46(() => {
|
|
18791
18786
|
if (context.highlightedId === optionId) {
|
|
18792
18787
|
itemRef.current?.scrollIntoView?.({ behavior: "smooth", block: "nearest" });
|
|
18793
18788
|
}
|
|
@@ -18962,8 +18957,8 @@ var Menu = ({
|
|
|
18962
18957
|
};
|
|
18963
18958
|
|
|
18964
18959
|
// src/components/user-interaction/MultiSelect/MultiSelectChipDisplay.tsx
|
|
18965
|
-
import { forwardRef as forwardRef28, useEffect as
|
|
18966
|
-
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";
|
|
18967
18962
|
import { jsx as jsx92, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
18968
18963
|
var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayButton2({ id, ...props }, ref) {
|
|
18969
18964
|
const translation = useHightideTranslation();
|
|
@@ -18971,12 +18966,12 @@ var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayB
|
|
|
18971
18966
|
const { config, layout } = context;
|
|
18972
18967
|
const { setIds } = config;
|
|
18973
18968
|
const { registerTrigger } = layout;
|
|
18974
|
-
|
|
18969
|
+
useEffect47(() => {
|
|
18975
18970
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
18976
18971
|
}, [id, setIds]);
|
|
18977
18972
|
const innerRef = useRef39(null);
|
|
18978
18973
|
useImperativeHandle15(ref, () => innerRef.current);
|
|
18979
|
-
|
|
18974
|
+
useEffect47(() => {
|
|
18980
18975
|
const unregister = registerTrigger(innerRef);
|
|
18981
18976
|
return () => unregister();
|
|
18982
18977
|
}, [registerTrigger]);
|
|
@@ -19014,7 +19009,7 @@ var MultiSelectChipDisplayButton = forwardRef28(function MultiSelectChipDisplayB
|
|
|
19014
19009
|
color: "negative",
|
|
19015
19010
|
coloringStyle: "text",
|
|
19016
19011
|
className: "flex-row-0 items-center size-7 p-1",
|
|
19017
|
-
children: /* @__PURE__ */ jsx92(
|
|
19012
|
+
children: /* @__PURE__ */ jsx92(XIcon2, { className: "size-5" })
|
|
19018
19013
|
}
|
|
19019
19014
|
)
|
|
19020
19015
|
] }, opt.id)),
|
|
@@ -19066,7 +19061,7 @@ var MultiSelectChipDisplay = forwardRef28(
|
|
|
19066
19061
|
);
|
|
19067
19062
|
|
|
19068
19063
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
19069
|
-
import { useCallback as useCallback42, useEffect as
|
|
19064
|
+
import { useCallback as useCallback42, useEffect as useEffect48, useState as useState38 } from "react";
|
|
19070
19065
|
import clsx35 from "clsx";
|
|
19071
19066
|
import { jsx as jsx93, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
19072
19067
|
var up = 1;
|
|
@@ -19186,7 +19181,7 @@ var ScrollPicker = ({
|
|
|
19186
19181
|
};
|
|
19187
19182
|
});
|
|
19188
19183
|
}, [disabled, getDirection, onChange]);
|
|
19189
|
-
|
|
19184
|
+
useEffect48(() => {
|
|
19190
19185
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
19191
19186
|
});
|
|
19192
19187
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -19496,11 +19491,12 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19496
19491
|
onValueChange(value.filter((prevItem) => prevItem.id !== columnFilter.id));
|
|
19497
19492
|
setEditState(void 0);
|
|
19498
19493
|
},
|
|
19494
|
+
operatorOverrides: item.operatorOverrides,
|
|
19499
19495
|
dataType: item.dataType,
|
|
19500
19496
|
tags: item.tags,
|
|
19501
19497
|
name: item.label,
|
|
19502
19498
|
isOpen,
|
|
19503
|
-
|
|
19499
|
+
onClose: () => setIsOpen(false)
|
|
19504
19500
|
}) : /* @__PURE__ */ jsx96(
|
|
19505
19501
|
FilterPopUp,
|
|
19506
19502
|
{
|
|
@@ -19508,6 +19504,7 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19508
19504
|
value: editState?.id === columnFilter.id ? editState.value : columnFilter.value,
|
|
19509
19505
|
dataType: item.dataType,
|
|
19510
19506
|
tags: item.tags,
|
|
19507
|
+
operatorOverrides: item.operatorOverrides,
|
|
19511
19508
|
onValueChange: (value2) => {
|
|
19512
19509
|
setEditState({ ...columnFilter, value: value2 });
|
|
19513
19510
|
},
|
|
@@ -19528,7 +19525,7 @@ var FilterList = ({ value, onValueChange, availableItems }) => {
|
|
|
19528
19525
|
|
|
19529
19526
|
// src/components/user-interaction/data/SortingList.tsx
|
|
19530
19527
|
import { useMemo as useMemo41 } from "react";
|
|
19531
|
-
import { ArrowDownWideNarrow, ArrowUpNarrowWide, PlusIcon as PlusIcon2, TrashIcon as TrashIcon2, XIcon as
|
|
19528
|
+
import { ArrowDownWideNarrow, ArrowUpNarrowWide, PlusIcon as PlusIcon2, TrashIcon as TrashIcon2, XIcon as XIcon3 } from "lucide-react";
|
|
19532
19529
|
import clsx37 from "clsx";
|
|
19533
19530
|
import { jsx as jsx97, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
19534
19531
|
var SortingList = ({ sorting, onSortingChange, availableItems }) => {
|
|
@@ -19615,7 +19612,7 @@ var SortingList = ({ sorting, onSortingChange, availableItems }) => {
|
|
|
19615
19612
|
color: "neutral",
|
|
19616
19613
|
coloringStyle: "text",
|
|
19617
19614
|
size: "sm",
|
|
19618
|
-
children: /* @__PURE__ */ jsx97(
|
|
19615
|
+
children: /* @__PURE__ */ jsx97(XIcon3, { className: "size-4" })
|
|
19619
19616
|
}
|
|
19620
19617
|
)
|
|
19621
19618
|
] })
|
|
@@ -19720,23 +19717,27 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19720
19717
|
onValueChange,
|
|
19721
19718
|
defaultValue: initialValue
|
|
19722
19719
|
});
|
|
19723
|
-
const fixedTime = useMemo42(() => fixedTimeOverride ?? new Date(23, 59, 59, 999), [fixedTimeOverride]);
|
|
19724
|
-
const [preferredMode, setPreferredMode] = useState40(
|
|
19725
|
-
|
|
19726
|
-
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;
|
|
19727
19723
|
if (DateUtils.sameTime(value, fixedTime, true, true)) {
|
|
19728
19724
|
return "date";
|
|
19729
19725
|
}
|
|
19730
19726
|
return "dateTime";
|
|
19731
|
-
}
|
|
19727
|
+
});
|
|
19732
19728
|
return /* @__PURE__ */ jsx99(
|
|
19733
19729
|
DateTimeInput,
|
|
19734
19730
|
{
|
|
19735
19731
|
...props,
|
|
19736
19732
|
ref: forwardedRef,
|
|
19737
|
-
mode,
|
|
19733
|
+
mode: preferredMode,
|
|
19738
19734
|
value,
|
|
19739
|
-
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
|
+
},
|
|
19740
19741
|
actions: [
|
|
19741
19742
|
...actions,
|
|
19742
19743
|
/* @__PURE__ */ jsx99(
|
|
@@ -19748,7 +19749,6 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19748
19749
|
tooltip: preferredMode === "date" ? translation("addTime") : translation("withoutTime"),
|
|
19749
19750
|
onClick: () => {
|
|
19750
19751
|
const newMode = preferredMode === "date" ? "dateTime" : "date";
|
|
19751
|
-
setPreferredMode((prev) => prev === "date" ? "dateTime" : "date");
|
|
19752
19752
|
if (value) {
|
|
19753
19753
|
if (newMode === "date") {
|
|
19754
19754
|
setValue(DateUtils.withTime(value, fixedTime));
|
|
@@ -19756,6 +19756,7 @@ var FlexibleDateTimeInput = forwardRef30(function FlexibleDateTimeInput2({
|
|
|
19756
19756
|
setValue(DateUtils.isLastMillisecondOfDay(value) ? new Date(value.getTime() - 1) : new Date(value.getTime() + 1));
|
|
19757
19757
|
}
|
|
19758
19758
|
}
|
|
19759
|
+
setPreferredMode(newMode);
|
|
19759
19760
|
},
|
|
19760
19761
|
children: preferredMode === "date" ? /* @__PURE__ */ jsx99(ClockPlus, { className: "size-5" }) : /* @__PURE__ */ jsx99(ClockFading, { className: "size-5" })
|
|
19761
19762
|
},
|
|
@@ -19874,7 +19875,7 @@ var SearchBar = ({
|
|
|
19874
19875
|
};
|
|
19875
19876
|
|
|
19876
19877
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
19877
|
-
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";
|
|
19878
19879
|
import { Pencil } from "lucide-react";
|
|
19879
19880
|
import clsx40 from "clsx";
|
|
19880
19881
|
import { jsx as jsx102, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
@@ -19894,7 +19895,7 @@ var ToggleableInput = forwardRef32(function ToggleableInput2({
|
|
|
19894
19895
|
const [isEditing, setIsEditing] = useState42(initialState !== "display");
|
|
19895
19896
|
const innerRef = useRef40(null);
|
|
19896
19897
|
useImperativeHandle16(forwardedRef, () => innerRef.current);
|
|
19897
|
-
|
|
19898
|
+
useEffect49(() => {
|
|
19898
19899
|
if (isEditing) {
|
|
19899
19900
|
innerRef.current?.focus();
|
|
19900
19901
|
}
|
|
@@ -19932,12 +19933,12 @@ var ToggleableInput = forwardRef32(function ToggleableInput2({
|
|
|
19932
19933
|
});
|
|
19933
19934
|
|
|
19934
19935
|
// src/components/user-interaction/properties/CheckboxProperty.tsx
|
|
19935
|
-
import { Check as
|
|
19936
|
+
import { Check as Check5 } from "lucide-react";
|
|
19936
19937
|
|
|
19937
19938
|
// src/components/user-interaction/properties/PropertyBase.tsx
|
|
19938
19939
|
import clsx41 from "clsx";
|
|
19939
19940
|
import { AlertTriangle, Trash, X as X3 } from "lucide-react";
|
|
19940
|
-
import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
19941
|
+
import { Fragment as Fragment13, jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
19941
19942
|
var PropertyBase = ({
|
|
19942
19943
|
name,
|
|
19943
19944
|
children,
|
|
@@ -19956,24 +19957,52 @@ var PropertyBase = ({
|
|
|
19956
19957
|
const isClearEnabled = allowClear && !readOnly;
|
|
19957
19958
|
const isRemoveEnabled = allowRemove && !readOnly;
|
|
19958
19959
|
const showActionsContainer = isClearEnabled || isRemoveEnabled;
|
|
19959
|
-
|
|
19960
|
+
const renderActionButtons = () => /* @__PURE__ */ jsxs65(Fragment13, { children: [
|
|
19961
|
+
isClearEnabled && /* @__PURE__ */ jsx103(
|
|
19962
|
+
IconButton,
|
|
19963
|
+
{
|
|
19964
|
+
tooltip: translation("clearValue"),
|
|
19965
|
+
onClick: onValueClear,
|
|
19966
|
+
disabled: !hasValue,
|
|
19967
|
+
color: "negative",
|
|
19968
|
+
coloringStyle: "text",
|
|
19969
|
+
size: "sm",
|
|
19970
|
+
children: /* @__PURE__ */ jsx103(X3, { className: "size-force-5" })
|
|
19971
|
+
}
|
|
19972
|
+
),
|
|
19973
|
+
isRemoveEnabled && /* @__PURE__ */ jsx103(
|
|
19974
|
+
IconButton,
|
|
19975
|
+
{
|
|
19976
|
+
tooltip: translation("removeProperty"),
|
|
19977
|
+
onClick: onRemove,
|
|
19978
|
+
color: "negative",
|
|
19979
|
+
coloringStyle: "text",
|
|
19980
|
+
size: "sm",
|
|
19981
|
+
children: /* @__PURE__ */ jsx103(Trash, { className: "size-force-5" })
|
|
19982
|
+
}
|
|
19983
|
+
)
|
|
19984
|
+
] });
|
|
19985
|
+
return /* @__PURE__ */ jsx103(
|
|
19960
19986
|
"div",
|
|
19961
19987
|
{
|
|
19962
|
-
className: clsx41("group/property", className),
|
|
19988
|
+
className: clsx41("group/property min-w-0 w-full", className),
|
|
19963
19989
|
"data-name": "property-root",
|
|
19964
19990
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19965
|
-
children: [
|
|
19991
|
+
children: /* @__PURE__ */ jsxs65("div", { "data-name": "property-inner", children: [
|
|
19966
19992
|
/* @__PURE__ */ jsxs65(
|
|
19967
19993
|
"div",
|
|
19968
19994
|
{
|
|
19969
19995
|
"data-name": "property-title",
|
|
19970
19996
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19971
19997
|
children: [
|
|
19972
|
-
/* @__PURE__ */
|
|
19973
|
-
/* @__PURE__ */ jsx103(
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19998
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex min-w-0 flex-1 flex-row items-center justify-between gap-2", children: [
|
|
19999
|
+
/* @__PURE__ */ jsx103(Tooltip, { tooltip: name, containerClassName: "min-w-0", children: /* @__PURE__ */ jsxs65("div", { className: "flex-row-1 items-center", children: [
|
|
20000
|
+
/* @__PURE__ */ jsx103("div", { "data-name": "property-title-icon", children: icon }),
|
|
20001
|
+
/* @__PURE__ */ jsx103("span", { "data-name": "property-title-text", children: name })
|
|
20002
|
+
] }) }),
|
|
20003
|
+
invalid && /* @__PURE__ */ jsx103(AlertTriangle, { className: "size-force-6 shrink-0" })
|
|
20004
|
+
] }),
|
|
20005
|
+
showActionsContainer && /* @__PURE__ */ jsx103("div", { "data-name": "property-title-actions", children: renderActionButtons() })
|
|
19977
20006
|
]
|
|
19978
20007
|
}
|
|
19979
20008
|
),
|
|
@@ -19984,35 +20013,11 @@ var PropertyBase = ({
|
|
|
19984
20013
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
19985
20014
|
children: [
|
|
19986
20015
|
children({ required, hasValue, invalid }),
|
|
19987
|
-
showActionsContainer && /* @__PURE__ */
|
|
19988
|
-
isClearEnabled && /* @__PURE__ */ jsx103(
|
|
19989
|
-
IconButton,
|
|
19990
|
-
{
|
|
19991
|
-
tooltip: translation("clearValue"),
|
|
19992
|
-
onClick: onValueClear,
|
|
19993
|
-
disabled: !hasValue,
|
|
19994
|
-
color: "negative",
|
|
19995
|
-
coloringStyle: "text",
|
|
19996
|
-
size: "sm",
|
|
19997
|
-
children: /* @__PURE__ */ jsx103(X3, { className: "size-force-5" })
|
|
19998
|
-
}
|
|
19999
|
-
),
|
|
20000
|
-
isRemoveEnabled && /* @__PURE__ */ jsx103(
|
|
20001
|
-
IconButton,
|
|
20002
|
-
{
|
|
20003
|
-
tooltip: translation("removeProperty"),
|
|
20004
|
-
onClick: onRemove,
|
|
20005
|
-
color: "negative",
|
|
20006
|
-
coloringStyle: "text",
|
|
20007
|
-
size: "sm",
|
|
20008
|
-
children: /* @__PURE__ */ jsx103(Trash, { className: "size-force-5" })
|
|
20009
|
-
}
|
|
20010
|
-
)
|
|
20011
|
-
] })
|
|
20016
|
+
showActionsContainer && /* @__PURE__ */ jsx103("div", { "data-name": "property-actions", children: renderActionButtons() })
|
|
20012
20017
|
]
|
|
20013
20018
|
}
|
|
20014
20019
|
)
|
|
20015
|
-
]
|
|
20020
|
+
] })
|
|
20016
20021
|
}
|
|
20017
20022
|
);
|
|
20018
20023
|
};
|
|
@@ -20033,7 +20038,7 @@ var CheckboxProperty = ({
|
|
|
20033
20038
|
...baseProps,
|
|
20034
20039
|
hasValue: value !== void 0,
|
|
20035
20040
|
readOnly,
|
|
20036
|
-
icon: /* @__PURE__ */ jsx104(
|
|
20041
|
+
icon: /* @__PURE__ */ jsx104(Check5, { size: 24 }),
|
|
20037
20042
|
children: () => /* @__PURE__ */ jsxs66("div", { className: "flex-row-2 items-center", children: [
|
|
20038
20043
|
/* @__PURE__ */ jsx104(
|
|
20039
20044
|
Button,
|
|
@@ -20318,7 +20323,7 @@ var PolymorphicSlot = forwardRef33(function PolymorphicSlot2({
|
|
|
20318
20323
|
});
|
|
20319
20324
|
|
|
20320
20325
|
// src/components/utils/Transition.tsx
|
|
20321
|
-
import { useEffect as
|
|
20326
|
+
import { useEffect as useEffect50, useState as useState43 } from "react";
|
|
20322
20327
|
function Transition({
|
|
20323
20328
|
children,
|
|
20324
20329
|
show,
|
|
@@ -20327,7 +20332,7 @@ function Transition({
|
|
|
20327
20332
|
const [isOpen, setIsOpen] = useState43(show);
|
|
20328
20333
|
const [isTransitioning, setIsTransitioning] = useState43(!isOpen);
|
|
20329
20334
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
20330
|
-
|
|
20335
|
+
useEffect50(() => {
|
|
20331
20336
|
setIsOpen(show);
|
|
20332
20337
|
setIsTransitioning(true);
|
|
20333
20338
|
}, [show]);
|
|
@@ -20363,7 +20368,7 @@ var HightideProvider = ({
|
|
|
20363
20368
|
};
|
|
20364
20369
|
|
|
20365
20370
|
// src/hooks/focus/useFocusGuards.ts
|
|
20366
|
-
import { useEffect as
|
|
20371
|
+
import { useEffect as useEffect51 } from "react";
|
|
20367
20372
|
var selectorName = "data-hw-focus-guard";
|
|
20368
20373
|
function FocusGuard() {
|
|
20369
20374
|
const element = document.createElement("div");
|
|
@@ -20401,7 +20406,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
20401
20406
|
}
|
|
20402
20407
|
};
|
|
20403
20408
|
var useFocusGuards = () => {
|
|
20404
|
-
|
|
20409
|
+
useEffect51(() => {
|
|
20405
20410
|
FocusGuardsService.getInstance().add();
|
|
20406
20411
|
return () => {
|
|
20407
20412
|
FocusGuardsService.getInstance().remove();
|
|
@@ -20410,10 +20415,10 @@ var useFocusGuards = () => {
|
|
|
20410
20415
|
};
|
|
20411
20416
|
|
|
20412
20417
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
20413
|
-
import React5, { useEffect as
|
|
20418
|
+
import React5, { useEffect as useEffect52 } from "react";
|
|
20414
20419
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
20415
20420
|
const [hasUsedFocus, setHasUsedFocus] = React5.useState(false);
|
|
20416
|
-
|
|
20421
|
+
useEffect52(() => {
|
|
20417
20422
|
if (disable || hasUsedFocus) {
|
|
20418
20423
|
return;
|
|
20419
20424
|
}
|
|
@@ -20433,9 +20438,9 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
20433
20438
|
};
|
|
20434
20439
|
|
|
20435
20440
|
// src/hooks/focus/useIsMounted.ts
|
|
20436
|
-
import { useEffect as
|
|
20441
|
+
import { useEffect as useEffect53, useLayoutEffect as useLayoutEffect7, useState as useState44 } from "react";
|
|
20437
20442
|
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
20438
|
-
var useIsomorphicEffect = isClient ? useLayoutEffect7 :
|
|
20443
|
+
var useIsomorphicEffect = isClient ? useLayoutEffect7 : useEffect53;
|
|
20439
20444
|
var useIsMounted = () => {
|
|
20440
20445
|
const [isMounted, setIsMounted] = useState44(false);
|
|
20441
20446
|
useIsomorphicEffect(() => {
|
|
@@ -20448,10 +20453,10 @@ var useIsMounted = () => {
|
|
|
20448
20453
|
};
|
|
20449
20454
|
|
|
20450
20455
|
// src/hooks/useHandleRefs.ts
|
|
20451
|
-
import { useEffect as
|
|
20456
|
+
import { useEffect as useEffect54, useRef as useRef41 } from "react";
|
|
20452
20457
|
function useHandleRefs(handleRef) {
|
|
20453
20458
|
const refs = useRef41([]);
|
|
20454
|
-
|
|
20459
|
+
useEffect54(() => {
|
|
20455
20460
|
refs.current = Object.keys(handleRef?.current ?? {}).map(
|
|
20456
20461
|
() => ({ current: null })
|
|
20457
20462
|
);
|
|
@@ -20489,10 +20494,10 @@ function useLogUnstableDependencies(name, value) {
|
|
|
20489
20494
|
}
|
|
20490
20495
|
|
|
20491
20496
|
// src/hooks/useOverwritableState.ts
|
|
20492
|
-
import { useEffect as
|
|
20497
|
+
import { useEffect as useEffect55, useState as useState45 } from "react";
|
|
20493
20498
|
var useOverwritableState = (overwriteValue, onChange) => {
|
|
20494
20499
|
const [state, setState] = useState45(overwriteValue);
|
|
20495
|
-
|
|
20500
|
+
useEffect55(() => {
|
|
20496
20501
|
setState(overwriteValue);
|
|
20497
20502
|
}, [overwriteValue]);
|
|
20498
20503
|
const onChangeWrapper = (action) => {
|
|
@@ -20510,7 +20515,7 @@ var useRerender = () => {
|
|
|
20510
20515
|
};
|
|
20511
20516
|
|
|
20512
20517
|
// src/hooks/useUpdatingDateString.ts
|
|
20513
|
-
import { useEffect as
|
|
20518
|
+
import { useEffect as useEffect56, useState as useState46 } from "react";
|
|
20514
20519
|
var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, date }) => {
|
|
20515
20520
|
const { locale: contextLocale } = useLocale();
|
|
20516
20521
|
const locale = localeOverride ?? contextLocale;
|
|
@@ -20519,14 +20524,14 @@ var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, date
|
|
|
20519
20524
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
20520
20525
|
relative: DateUtils.formatRelative(date, locale)
|
|
20521
20526
|
});
|
|
20522
|
-
|
|
20527
|
+
useEffect56(() => {
|
|
20523
20528
|
setDateAndTimeStrings({
|
|
20524
20529
|
compareDate: date,
|
|
20525
20530
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
20526
20531
|
relative: DateUtils.formatRelative(date, locale)
|
|
20527
20532
|
});
|
|
20528
20533
|
}, [date, absoluteFormat, locale]);
|
|
20529
|
-
|
|
20534
|
+
useEffect56(() => {
|
|
20530
20535
|
let timeoutId;
|
|
20531
20536
|
const startTimer = () => {
|
|
20532
20537
|
const now = /* @__PURE__ */ new Date();
|