@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.mjs CHANGED
@@ -2686,6 +2686,16 @@ var LookupSelect = ({
2686
2686
  }
2687
2687
  };
2688
2688
  }, [inputValue, fetchSuggestions, suggestionDebounce, upsertOptionLabels]);
2689
+ useEffect(() => {
2690
+ if (!fetchSuggestions) return;
2691
+ if (value.length === 0) return;
2692
+ const unresolvedValues = value.filter((v) => !optionLabels[v]);
2693
+ if (unresolvedValues.length === 0) return;
2694
+ fetchSuggestions("").then((options) => {
2695
+ upsertOptionLabels(options);
2696
+ }).catch(() => {
2697
+ });
2698
+ }, [value, fetchSuggestions, optionLabels, upsertOptionLabels]);
2689
2699
  useEffect(() => {
2690
2700
  const handleDocumentClick = (event) => {
2691
2701
  const target = event.target;
@@ -3093,6 +3103,9 @@ var normalizeBetween = (startValue, endValue) => {
3093
3103
  };
3094
3104
  var DatetimeBuilder = class {
3095
3105
  build(row) {
3106
+ if (Array.isArray(row.value)) {
3107
+ return {};
3108
+ }
3096
3109
  try {
3097
3110
  const baseDate = new Date(row.value);
3098
3111
  if (Number.isNaN(baseDate.getTime())) return {};
@@ -3151,6 +3164,9 @@ var parseMonth = (value) => {
3151
3164
  var toMonthToken = (date) => format(date, "yyyy-MM");
3152
3165
  var DateMonthBuilder = class {
3153
3166
  build(row) {
3167
+ if (Array.isArray(row.value)) {
3168
+ return {};
3169
+ }
3154
3170
  const month = parseMonth(row.value);
3155
3171
  const sharedOptions = { multiTableSearch: row.multiTableSearch };
3156
3172
  switch (row.operator) {
@@ -3321,7 +3337,7 @@ var TextBuilder = class {
3321
3337
  { equals: row.value },
3322
3338
  {
3323
3339
  multiTableSearch: row.multiTableSearch,
3324
- insensitive: true
3340
+ insensitive: false
3325
3341
  }
3326
3342
  )
3327
3343
  };
@@ -3351,7 +3367,7 @@ var TextBuilder = class {
3351
3367
  { not: row.value },
3352
3368
  {
3353
3369
  multiTableSearch: row.multiTableSearch,
3354
- insensitive: true
3370
+ insensitive: false
3355
3371
  }
3356
3372
  )
3357
3373
  };
@@ -3395,6 +3411,9 @@ var TextBuilder = class {
3395
3411
  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;
3396
3412
  var UUIDBuilder = class {
3397
3413
  build(row) {
3414
+ if (Array.isArray(row.value)) {
3415
+ return {};
3416
+ }
3398
3417
  if (!regex.test(row.value)) {
3399
3418
  return { [row.fieldName]: {} };
3400
3419
  }