@sustaina/shared-ui 1.29.1 → 1.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2726,6 +2726,16 @@ var LookupSelect = ({
2726
2726
  }
2727
2727
  };
2728
2728
  }, [inputValue, fetchSuggestions, suggestionDebounce, upsertOptionLabels]);
2729
+ React4.useEffect(() => {
2730
+ if (!fetchSuggestions) return;
2731
+ if (value.length === 0) return;
2732
+ const unresolvedValues = value.filter((v) => !optionLabels[v]);
2733
+ if (unresolvedValues.length === 0) return;
2734
+ fetchSuggestions("").then((options) => {
2735
+ upsertOptionLabels(options);
2736
+ }).catch(() => {
2737
+ });
2738
+ }, [value, fetchSuggestions, optionLabels, upsertOptionLabels]);
2729
2739
  React4.useEffect(() => {
2730
2740
  const handleDocumentClick = (event) => {
2731
2741
  const target = event.target;
@@ -3133,6 +3143,9 @@ var normalizeBetween = (startValue, endValue) => {
3133
3143
  };
3134
3144
  var DatetimeBuilder = class {
3135
3145
  build(row) {
3146
+ if (Array.isArray(row.value)) {
3147
+ return {};
3148
+ }
3136
3149
  try {
3137
3150
  const baseDate = new Date(row.value);
3138
3151
  if (Number.isNaN(baseDate.getTime())) return {};
@@ -3191,6 +3204,9 @@ var parseMonth = (value) => {
3191
3204
  var toMonthToken = (date) => dateFns.format(date, "yyyy-MM");
3192
3205
  var DateMonthBuilder = class {
3193
3206
  build(row) {
3207
+ if (Array.isArray(row.value)) {
3208
+ return {};
3209
+ }
3194
3210
  const month = parseMonth(row.value);
3195
3211
  const sharedOptions = { multiTableSearch: row.multiTableSearch };
3196
3212
  switch (row.operator) {
@@ -3361,7 +3377,7 @@ var TextBuilder = class {
3361
3377
  { equals: row.value },
3362
3378
  {
3363
3379
  multiTableSearch: row.multiTableSearch,
3364
- insensitive: true
3380
+ insensitive: false
3365
3381
  }
3366
3382
  )
3367
3383
  };
@@ -3391,7 +3407,7 @@ var TextBuilder = class {
3391
3407
  { not: row.value },
3392
3408
  {
3393
3409
  multiTableSearch: row.multiTableSearch,
3394
- insensitive: true
3410
+ insensitive: false
3395
3411
  }
3396
3412
  )
3397
3413
  };
@@ -3435,6 +3451,9 @@ var TextBuilder = class {
3435
3451
  var regex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
3436
3452
  var UUIDBuilder = class {
3437
3453
  build(row) {
3454
+ if (Array.isArray(row.value)) {
3455
+ return {};
3456
+ }
3438
3457
  if (!regex.test(row.value)) {
3439
3458
  return { [row.fieldName]: {} };
3440
3459
  }