@uniformdev/design-system 19.138.1-alpha.4 → 19.140.2-alpha.7

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/esm/index.js CHANGED
@@ -2055,6 +2055,122 @@ var filterAdd = GenIcon({
2055
2055
  }
2056
2056
  ]
2057
2057
  });
2058
+ var clipboardCopy = GenIcon({
2059
+ tag: "svg",
2060
+ attr: { viewBox: "0 0 24 24", role: "img" },
2061
+ child: [
2062
+ {
2063
+ tag: "path",
2064
+ attr: {
2065
+ fillRule: "evenodd",
2066
+ clipRule: "evenodd",
2067
+ d: "M2 4C2 2.89543 2.89543 2 4 2H18C19.1046 2 20 2.89543 20 4V9H18V4H16V5C16 6.65685 14.6569 8 13 8H9C7.34315 8 6 6.65685 6 5V4H4L4 18H9V20H4C2.89543 20 2 19.1046 2 18V4ZM8 5V4H14V5C14 5.55228 13.5523 6 13 6H9C8.44772 6 8 5.55228 8 5Z"
2068
+ },
2069
+ child: []
2070
+ },
2071
+ {
2072
+ tag: "path",
2073
+ attr: {
2074
+ d: "M9 14.0665V16.0665H7.04053C6.48824 16.0665 6.04053 15.6188 6.04053 15.0665C6.04053 14.5142 6.48824 14.0665 7.04053 14.0665H9Z"
2075
+ },
2076
+ child: []
2077
+ },
2078
+ {
2079
+ tag: "path",
2080
+ attr: {
2081
+ d: "M9.26756 10C9.09739 10.2942 9 10.6357 9 11V12H7C6.44772 12 6 11.5523 6 11C6 10.4477 6.44772 10 7 10H9.26756Z"
2082
+ },
2083
+ child: []
2084
+ },
2085
+ {
2086
+ tag: "path",
2087
+ attr: {
2088
+ fillRule: "evenodd",
2089
+ clipRule: "evenodd",
2090
+ d: "M10 11.3333C10 10.597 10.597 10 11.3333 10H20.6667L22 11.3333V20.6667C22 21.403 21.403 22 20.6667 22H11.3333C10.597 22 10 21.403 10 20.6667V11.3333ZM11.3333 11.3333H12V12C12 13.1046 12.3333 14.6667 14 14.6667H16.6667C18.3333 14.6667 18.6667 13.1046 18.6667 12V11.3333H20.3333L20.6667 11.6667V20.6667H11.3333V11.3333ZM13.3333 12V11.3333H15.3333V11.973C15.3333 12.3412 15.6318 12.6396 16 12.6396C16.3682 12.6396 16.6667 12.3412 16.6667 11.973V11.3333H17.3333V12C17.3333 12.3682 17.3333 13.3333 16.6667 13.3333H14C13.3333 13.3333 13.3333 12.3682 13.3333 12Z"
2091
+ },
2092
+ child: []
2093
+ },
2094
+ {
2095
+ tag: "path",
2096
+ attr: {
2097
+ d: "M13 16C13 15.7239 13.2239 15.5 13.5 15.5H18.5C18.7761 15.5 19 15.7239 19 16C19 16.2761 18.7761 16.5 18.5 16.5H13.5C13.2239 16.5 13 16.2761 13 16Z"
2098
+ },
2099
+ child: []
2100
+ },
2101
+ {
2102
+ tag: "path",
2103
+ attr: {
2104
+ d: "M13 17.5C13 17.2239 13.2239 17 13.5 17H18.5C18.7761 17 19 17.2239 19 17.5C19 17.7761 18.7761 18 18.5 18H13.5C13.2239 18 13 17.7761 13 17.5Z"
2105
+ },
2106
+ child: []
2107
+ },
2108
+ {
2109
+ tag: "path",
2110
+ attr: {
2111
+ d: "M13 19C13 18.7239 13.2239 18.5 13.5 18.5H18.5C18.7761 18.5 19 18.7239 19 19C19 19.2761 18.7761 19.5 18.5 19.5H13.5C13.2239 19.5 13 19.2761 13 19Z"
2112
+ },
2113
+ child: []
2114
+ }
2115
+ ]
2116
+ });
2117
+ var clipboardPaste = GenIcon({
2118
+ tag: "svg",
2119
+ attr: { viewBox: "0 0 24 24", role: "img" },
2120
+ child: [
2121
+ {
2122
+ tag: "path",
2123
+ attr: {
2124
+ fillRule: "evenodd",
2125
+ clipRule: "evenodd",
2126
+ d: "M2 4C2 2.89543 2.89543 2 4 2H18C19.1046 2 20 2.89543 20 4V16.4593L18 14.9973V4H16V5C16 6.65685 14.6569 8 13 8H9C7.34315 8 6 6.65685 6 5V4H4L4 18H9V18.08C9 18.6748 9.0216 19.1889 9.06692 19.6126C9.08082 19.7426 9.09774 19.8726 9.11907 20H4C2.89543 20 2 19.1046 2 18V4ZM8 5V4H14V5C14 5.55228 13.5523 6 13 6H9C8.44772 6 8 5.55228 8 5Z"
2127
+ },
2128
+ child: []
2129
+ },
2130
+ {
2131
+ tag: "path",
2132
+ attr: {
2133
+ d: "M20 17.698V18C20 19.1046 19.1046 20 18 20H10.1368C10.0476 19.5861 10 18.9441 10 18.08V18H18V16.236L20 17.698Z"
2134
+ },
2135
+ child: []
2136
+ },
2137
+ {
2138
+ tag: "path",
2139
+ attr: {
2140
+ d: "M12.2024 16.0665H15C15.5523 16.0665 16 15.6188 16 15.0665C16 14.5142 15.5523 14.0665 15 14.0665H11.98V15C11.98 15.6484 12.0944 15.9269 12.1685 16.0282L12.1701 16.0304C12.1768 16.0396 12.1861 16.0525 12.2024 16.0665Z"
2141
+ },
2142
+ child: []
2143
+ },
2144
+ {
2145
+ tag: "path",
2146
+ attr: {
2147
+ d: "M9 14.0665H7.04053C6.48824 14.0665 6.04053 14.5142 6.04053 15.0665C6.04053 15.6188 6.48824 16.0665 7.04053 16.0665H9V14.0665Z"
2148
+ },
2149
+ child: []
2150
+ },
2151
+ {
2152
+ tag: "path",
2153
+ attr: {
2154
+ d: "M10 16.0665V15H10.98C10.98 15.1693 10.9866 15.3286 11 15.4778C11.0196 15.6953 11.0538 15.8915 11.1035 16.0665H10Z"
2155
+ },
2156
+ child: []
2157
+ },
2158
+ {
2159
+ tag: "path",
2160
+ attr: {
2161
+ d: "M7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12H14.9595C15.5118 12 15.9595 11.5523 15.9595 11C15.9595 10.4477 15.5118 10 14.9595 10H7Z"
2162
+ },
2163
+ child: []
2164
+ },
2165
+ {
2166
+ tag: "path",
2167
+ attr: {
2168
+ d: "M17.42 22.812V21.468H12.66C10.896 21.468 10.56 21.048 10.238 20.334C10.084 19.984 10 19.228 10 18.08V15H10.98C10.98 16.442 11.456 17.156 12.604 17.156H17.42V15.812L22.208 19.312L17.42 22.812Z"
2169
+ },
2170
+ child: []
2171
+ }
2172
+ ]
2173
+ });
2058
2174
  var customIcons = {
2059
2175
  "rectangle-rounded": rectangleRoundedIcon,
2060
2176
  card: cardIcon,
@@ -2082,7 +2198,9 @@ var customIcons = {
2082
2198
  "magic-wand": magicWand,
2083
2199
  "list-view-short": listViewShort,
2084
2200
  "list-view-long": listViewLong,
2085
- "filter-add": filterAdd
2201
+ "filter-add": filterAdd,
2202
+ "clipboard-copy": clipboardCopy,
2203
+ "clipboard-paste": clipboardPaste
2086
2204
  };
2087
2205
 
2088
2206
  // src/components/AddListButton/AddListButton.styles.ts
@@ -14562,22 +14680,42 @@ function DateTimePickerSummary({
14562
14680
  value,
14563
14681
  placeholder
14564
14682
  }) {
14565
- const dateFormat = new Intl.DateTimeFormat(void 0, {
14683
+ let dateFormat = new Intl.DateTimeFormat(void 0, {
14566
14684
  day: "numeric",
14567
14685
  month: "long",
14568
- year: "numeric",
14569
- timeZone: value == null ? void 0 : value.timeZone
14686
+ year: "numeric"
14570
14687
  });
14571
- const timeFormat = new Intl.DateTimeFormat(void 0, {
14572
- timeStyle: "short",
14573
- timeZone: value == null ? void 0 : value.timeZone
14688
+ let timeFormat = new Intl.DateTimeFormat(void 0, {
14689
+ timeStyle: "short"
14574
14690
  });
14691
+ let timeZoneWasValid = false;
14692
+ if (value == null ? void 0 : value.timeZone) {
14693
+ try {
14694
+ dateFormat = new Intl.DateTimeFormat(void 0, {
14695
+ day: "numeric",
14696
+ month: "long",
14697
+ year: "numeric",
14698
+ timeZone: value.timeZone
14699
+ });
14700
+ timeFormat = new Intl.DateTimeFormat(void 0, {
14701
+ timeStyle: "short",
14702
+ timeZone: value.timeZone
14703
+ });
14704
+ timeZoneWasValid = true;
14705
+ } catch (error) {
14706
+ if (error instanceof RangeError) {
14707
+ console.error("Tried to use an unsupported time zone", value == null ? void 0 : value.timeZone);
14708
+ } else {
14709
+ throw error;
14710
+ }
14711
+ }
14712
+ }
14575
14713
  const datePart = (value == null ? void 0 : value.datetime) ? dateFormat.format(new Date(value.datetime)) : null;
14576
14714
  const timePart = (value == null ? void 0 : value.datetime) ? timeFormat.format(new Date(value.datetime)) : null;
14577
14715
  return datePart ? /* @__PURE__ */ jsxs37("span", { children: [
14578
14716
  /* @__PURE__ */ jsx60("em", { css: inputLabelFocal, children: datePart }),
14579
14717
  !!timePart && `, ${timePart}`,
14580
- !!(value == null ? void 0 : value.timeZone) && ` in ${value == null ? void 0 : value.timeZone}`
14718
+ !!(value == null ? void 0 : value.timeZone) && timeZoneWasValid && ` in ${value == null ? void 0 : value.timeZone}`
14581
14719
  ] }) : /* @__PURE__ */ jsx60("span", { children: placeholder });
14582
14720
  }
14583
14721
 
@@ -20344,6 +20482,11 @@ var TEXTBOX_OPERATORS = [
20344
20482
  value: "match",
20345
20483
  editorType: "text"
20346
20484
  },
20485
+ {
20486
+ label: "starts with...",
20487
+ value: "starts",
20488
+ editorType: "text"
20489
+ },
20347
20490
  {
20348
20491
  label: "is not...",
20349
20492
  value: "neq",
@@ -20366,6 +20509,11 @@ var USER_OPERATORS = [
20366
20509
  value: "match",
20367
20510
  editorType: "text"
20368
20511
  },
20512
+ {
20513
+ label: "starts with...",
20514
+ value: "starts",
20515
+ editorType: "text"
20516
+ },
20369
20517
  {
20370
20518
  label: "is not...",
20371
20519
  value: "neq",
@@ -20375,37 +20523,37 @@ var USER_OPERATORS = [
20375
20523
  var SYSTEM_DATE_OPERATORS = [
20376
20524
  {
20377
20525
  label: "is...",
20378
- value: "eq",
20526
+ value: "sys-date-eq",
20379
20527
  editorType: "date"
20380
20528
  },
20381
20529
  {
20382
20530
  label: "is between...",
20383
- value: "between",
20531
+ value: "sys-date-between",
20384
20532
  editorType: "dateRange"
20385
20533
  },
20386
20534
  {
20387
20535
  label: "is before...",
20388
- value: "lt",
20536
+ value: "sys-date-lt",
20389
20537
  editorType: "date"
20390
20538
  },
20391
20539
  {
20392
20540
  label: "is after...",
20393
- value: "gt",
20541
+ value: "sys-date-gt",
20394
20542
  editorType: "date"
20395
20543
  },
20396
20544
  {
20397
20545
  label: "is on or before...",
20398
- value: "lte",
20546
+ value: "sys-date-lte",
20399
20547
  editorType: "date"
20400
20548
  },
20401
20549
  {
20402
20550
  label: "is on or after...",
20403
- value: "gte",
20551
+ value: "sys-date-gte",
20404
20552
  editorType: "date"
20405
20553
  },
20406
20554
  {
20407
20555
  label: "is not...",
20408
- value: "neq",
20556
+ value: "sys-date-neq",
20409
20557
  editorType: "date"
20410
20558
  }
20411
20559
  ];
@@ -20420,6 +20568,11 @@ var RICHTEXT_OPERATORS = [
20420
20568
  value: "match",
20421
20569
  editorType: "text"
20422
20570
  },
20571
+ {
20572
+ label: "starts with...",
20573
+ value: "starts",
20574
+ editorType: "text"
20575
+ },
20423
20576
  {
20424
20577
  label: "is not empty",
20425
20578
  value: "def",
@@ -21014,15 +21167,16 @@ var TextEditor = ({
21014
21167
  readOnly,
21015
21168
  valueTestId
21016
21169
  }) => {
21017
- useDebounce2(() => onChange, 500, [value]);
21170
+ const [innerValue, setInnerValue] = useState16(value != null ? value : "");
21171
+ useDebounce2(() => onChange(innerValue), 500, [innerValue]);
21018
21172
  return /* @__PURE__ */ jsx120(
21019
21173
  Input,
21020
21174
  {
21021
21175
  showLabel: false,
21022
21176
  label: ariaLabel,
21023
- onChange: (e) => onChange(e.currentTarget.value),
21177
+ onChange: (e) => setInnerValue(e.currentTarget.value),
21024
21178
  placeholder: "Enter phrase to search\u2026",
21025
- value,
21179
+ value: innerValue,
21026
21180
  readOnly,
21027
21181
  "data-testid": valueTestId
21028
21182
  }
@@ -21039,6 +21193,17 @@ var NumberRangeEditor = ({
21039
21193
  const [minValue, setMinValue] = useState16("");
21040
21194
  const [maxValue, setMaxValue] = useState16("");
21041
21195
  const [error, setError] = useState16("");
21196
+ useDebounce2(
21197
+ () => {
21198
+ if (minValue && maxValue && !error) {
21199
+ onChange([minValue, maxValue]);
21200
+ } else {
21201
+ onChange([]);
21202
+ }
21203
+ },
21204
+ 500,
21205
+ [minValue, maxValue]
21206
+ );
21042
21207
  useEffect17(() => {
21043
21208
  if (!maxValue && !minValue) {
21044
21209
  return;
@@ -21047,16 +21212,19 @@ var NumberRangeEditor = ({
21047
21212
  const min = Number(minValue);
21048
21213
  if (max < min || min > max) {
21049
21214
  setError("Please enter a valid numeric range");
21050
- onChange([]);
21051
21215
  return;
21052
21216
  }
21053
21217
  if (maxValue && !minValue || minValue && !maxValue) {
21054
21218
  setError("Please enter both a low and high number");
21055
- onChange([]);
21056
21219
  return;
21057
21220
  }
21058
- setError("");
21059
- onChange([minValue, maxValue]);
21221
+ if (error) {
21222
+ setError("");
21223
+ }
21224
+ if (min && max) {
21225
+ setMinValue(minValue);
21226
+ setMaxValue(maxValue);
21227
+ }
21060
21228
  }, [maxValue, minValue, setError]);
21061
21229
  return /* @__PURE__ */ jsxs81(Fragment19, { children: [
21062
21230
  /* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
@@ -21102,6 +21270,8 @@ var NumberEditor = ({
21102
21270
  readOnly,
21103
21271
  valueTestId
21104
21272
  }) => {
21273
+ const [innerValue, setInnerValue] = useState16(value != null ? value : "");
21274
+ useDebounce2(() => onChange(innerValue), 500, [innerValue]);
21105
21275
  return /* @__PURE__ */ jsx120(
21106
21276
  Input,
21107
21277
  {
@@ -21109,9 +21279,9 @@ var NumberEditor = ({
21109
21279
  type: "number",
21110
21280
  showLabel: false,
21111
21281
  min: 0,
21112
- onChange: (e) => onChange(e.currentTarget.value),
21282
+ onChange: (e) => setInnerValue(e.currentTarget.value),
21113
21283
  disabled: disabled2,
21114
- value,
21284
+ value: innerValue,
21115
21285
  readOnly,
21116
21286
  "data-testid": valueTestId
21117
21287
  }
@@ -21125,15 +21295,17 @@ var DateEditor = ({
21125
21295
  readOnly,
21126
21296
  valueTestId
21127
21297
  }) => {
21298
+ const [innerValue, setInnerValue] = useState16(value != null ? value : "");
21299
+ useDebounce2(() => onChange(innerValue), 500, [innerValue]);
21128
21300
  return /* @__PURE__ */ jsx120(
21129
21301
  Input,
21130
21302
  {
21131
21303
  type: "date",
21132
21304
  label: ariaLabel,
21133
21305
  showLabel: false,
21134
- onChange: (e) => onChange(e.currentTarget.value),
21306
+ onChange: (e) => setInnerValue(e.currentTarget.value),
21135
21307
  disabled: disabled2,
21136
- value,
21308
+ value: innerValue,
21137
21309
  readOnly,
21138
21310
  "data-testid": valueTestId
21139
21311
  }
@@ -21150,6 +21322,17 @@ var DateRangeEditor = ({
21150
21322
  const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
21151
21323
  const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
21152
21324
  const [error, setError] = useState16("");
21325
+ useDebounce2(
21326
+ () => {
21327
+ if (minDateValue && maxDateValue && !error) {
21328
+ onChange([minDateValue, maxDateValue]);
21329
+ } else {
21330
+ onChange([]);
21331
+ }
21332
+ },
21333
+ 500,
21334
+ [minDateValue, maxDateValue]
21335
+ );
21153
21336
  useEffect17(() => {
21154
21337
  if (!minDateValue || !maxDateValue) {
21155
21338
  return;
@@ -21158,28 +21341,32 @@ var DateRangeEditor = ({
21158
21341
  const maxDate = new Date(maxDateValue);
21159
21342
  if (maxDate < minDate) {
21160
21343
  setError("The max date cannot be lower than the min date");
21161
- onChange([]);
21162
21344
  return;
21163
21345
  }
21164
21346
  if (maxDate && !minDate) {
21165
21347
  setError("Please enter both a low and high date");
21166
- onChange([]);
21167
21348
  return;
21168
21349
  }
21169
21350
  const minDateString = minDate.toDateString();
21170
21351
  const maxDateString = maxDate.toDateString();
21171
21352
  if (minDateString === maxDateString || maxDateString === minDateString) {
21172
21353
  setError("The min and max date cannot be the same");
21173
- onChange([]);
21174
21354
  return;
21175
21355
  }
21176
21356
  if (minDate > maxDate) {
21177
21357
  setError("The min date cannot be higher than the max date");
21178
- onChange([]);
21179
21358
  return;
21180
21359
  }
21181
- setError("");
21182
- onChange([minDateValue, maxDateValue]);
21360
+ if (error) {
21361
+ setError("");
21362
+ }
21363
+ if (minDate && maxDate) {
21364
+ setMinDateValue(minDateValue);
21365
+ setMaxDateValue(maxDateValue);
21366
+ } else {
21367
+ setMinDateValue("");
21368
+ setMaxDateValue("");
21369
+ }
21183
21370
  }, [minDateValue, maxDateValue, setError]);
21184
21371
  return /* @__PURE__ */ jsxs81(Fragment19, { children: [
21185
21372
  /* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
@@ -21281,6 +21468,7 @@ var SearchAndFilterProvider = ({
21281
21468
  filters,
21282
21469
  filterOptions,
21283
21470
  filterVisible = false,
21471
+ defaultSearchTerm = "",
21284
21472
  onSearchChange,
21285
21473
  onChange,
21286
21474
  resetFilterValues = [{ field: "", operator: "", value: "" }],
@@ -21288,7 +21476,7 @@ var SearchAndFilterProvider = ({
21288
21476
  filterMapper: filterMapper2 = filterMapper,
21289
21477
  children
21290
21478
  }) => {
21291
- const [searchTerm, setSearchTerm] = useState17("");
21479
+ const [searchTerm, setSearchTerm] = useState17(defaultSearchTerm);
21292
21480
  const deferredSearchTerm = useDeferredValue2(searchTerm);
21293
21481
  const [filterVisibility, setFilterVisibility] = useState17(filterVisible);
21294
21482
  const handleSearchTerm = useCallback10(
@@ -21620,6 +21808,9 @@ var FilterItems = ({
21620
21808
  if (["eq", "neq", "lt", "gt"].includes(value) && Array.isArray(next[index].value)) {
21621
21809
  next[index].value = next[index].value[0];
21622
21810
  }
21811
+ if (filters[index].operator === "ndef" || filters[index].operator === "def") {
21812
+ next[index].value = "";
21813
+ }
21623
21814
  if (["between"].includes(value) && Array.isArray(next[index].value) === false) {
21624
21815
  next[index].value = [next[index].value, ""];
21625
21816
  }
@@ -21692,7 +21883,8 @@ var SearchAndFilterResultContainer = ({
21692
21883
  clearButtonLabel = "clear",
21693
21884
  calloutTitle: calloutTitle2,
21694
21885
  calloutText,
21695
- onHandleClear
21886
+ onHandleClear,
21887
+ hideClearButton
21696
21888
  }) => {
21697
21889
  const { searchTerm, setSearchTerm, totalResults, setFilters, filters } = useSearchAndFilter();
21698
21890
  const automateCalloutTitle = () => {
@@ -21727,11 +21919,11 @@ var SearchAndFilterResultContainer = ({
21727
21919
  " results ",
21728
21920
  searchTerm ? `for "${searchTerm}"` : null
21729
21921
  ] }),
21730
- !searchTerm ? null : /* @__PURE__ */ jsx125(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
21922
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx125(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
21731
21923
  ] }),
21732
21924
  totalResults === 0 ? /* @__PURE__ */ jsxs85(Callout, { title: calloutTitle2 != null ? calloutTitle2 : automateCalloutTitle(), type: "note", children: [
21733
21925
  calloutText ? /* @__PURE__ */ jsx125(Paragraph, { children: calloutText }) : null,
21734
- /* @__PURE__ */ jsx125(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
21926
+ hideClearButton ? null : /* @__PURE__ */ jsx125(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
21735
21927
  ] }) : null
21736
21928
  ] });
21737
21929
  };
@@ -21748,6 +21940,7 @@ var SearchAndFilter = ({
21748
21940
  filterMapper: filterMapper2 = filterMapper,
21749
21941
  additionalFiltersContainer,
21750
21942
  onChange,
21943
+ defaultSearchTerm,
21751
21944
  onSearchChange,
21752
21945
  totalResults,
21753
21946
  resetFilterValues = []
@@ -21759,6 +21952,7 @@ var SearchAndFilter = ({
21759
21952
  filterOptions,
21760
21953
  filterVisible,
21761
21954
  onChange,
21955
+ defaultSearchTerm,
21762
21956
  onSearchChange,
21763
21957
  totalResults,
21764
21958
  resetFilterValues,
@@ -21768,9 +21962,7 @@ var SearchAndFilter = ({
21768
21962
  /* @__PURE__ */ jsx126(
21769
21963
  "div",
21770
21964
  {
21771
- css: SearchAndFilterControlsWrapper(
21772
- viewSwitchControls ? "auto 1fr 0.05fr" : "auto auto 1fr"
21773
- ),
21965
+ css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
21774
21966
  children: !filterControls ? /* @__PURE__ */ jsx126(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
21775
21967
  }
21776
21968
  ),
package/dist/index.d.mts CHANGED
@@ -20356,6 +20356,8 @@ declare const allSupportedIcons: {
20356
20356
  'list-view-short': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20357
20357
  'list-view-long': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20358
20358
  'filter-add': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20359
+ 'clipboard-copy': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20360
+ 'clipboard-paste': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20359
20361
  'add-r': _react_icons_all_files_lib.IconType;
20360
20362
  add: _react_icons_all_files_lib.IconType;
20361
20363
  airplane: _react_icons_all_files_lib.IconType;
@@ -21067,6 +21069,8 @@ declare const customIcons: {
21067
21069
  'list-view-short': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21068
21070
  'list-view-long': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21069
21071
  'filter-add': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21072
+ 'clipboard-copy': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21073
+ 'clipboard-paste': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21070
21074
  };
21071
21075
 
21072
21076
  type IconsMap = Record<string, IconType$1>;
@@ -23066,7 +23070,7 @@ type Filter = {
23066
23070
  };
23067
23071
 
23068
23072
  /** @deprecated beta - a list of possible operator values that sync with uniform search api */
23069
- type OperatorValue = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'between' | 'ndef' | 'def' | 'match';
23073
+ type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'sys-date-neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts';
23070
23074
  type OperatorValueType = {
23071
23075
  value: OperatorValue;
23072
23076
  };
@@ -23229,6 +23233,8 @@ type SearchAndFilterProviderProps = {
23229
23233
  onSearchChange?: (term: string) => void;
23230
23234
  /** function to trigger filter change events */
23231
23235
  onChange: (filters: Filter[]) => void;
23236
+ /** Sets default value for full text search input, useful for bindable search */
23237
+ defaultSearchTerm?: string;
23232
23238
  /** sets the reset filter values
23233
23239
  * @default "[{ field: '', operator: '', value: '' }]"
23234
23240
  */
@@ -23275,7 +23281,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
23275
23281
  * @deprecated beta - Search and filter provider
23276
23282
  * @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
23277
23283
  * */
23278
- declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23284
+ declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23279
23285
  /** @deprecated beta - Search and filter hook
23280
23286
  * @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
23281
23287
  */
@@ -23336,7 +23342,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
23336
23342
  * @deprecated beta - Search and filter component
23337
23343
  * @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
23338
23344
  * */
23339
- declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23345
+ declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23340
23346
 
23341
23347
  type FilterRowProps = {
23342
23348
  /** the index of the filter row */
@@ -23412,9 +23418,11 @@ type SearchAndFilterResultContainerProps = {
23412
23418
  calloutText?: string;
23413
23419
  /** The function to handle the clear button */
23414
23420
  onHandleClear?: () => void;
23421
+ /** Sets whether to show or hide both clear search buttons */
23422
+ hideClearButton?: boolean;
23415
23423
  };
23416
23424
  /** @deprecated beta - Search and filter results container */
23417
- declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
23425
+ declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
23418
23426
 
23419
23427
  declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
23420
23428
  type SearchOnlyProviderProps = Pick<SearchAndFilterProviderProps, 'onSearchChange'> & {
package/dist/index.d.ts CHANGED
@@ -20356,6 +20356,8 @@ declare const allSupportedIcons: {
20356
20356
  'list-view-short': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20357
20357
  'list-view-long': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20358
20358
  'filter-add': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20359
+ 'clipboard-copy': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20360
+ 'clipboard-paste': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
20359
20361
  'add-r': _react_icons_all_files_lib.IconType;
20360
20362
  add: _react_icons_all_files_lib.IconType;
20361
20363
  airplane: _react_icons_all_files_lib.IconType;
@@ -21067,6 +21069,8 @@ declare const customIcons: {
21067
21069
  'list-view-short': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21068
21070
  'list-view-long': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21069
21071
  'filter-add': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21072
+ 'clipboard-copy': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21073
+ 'clipboard-paste': (props: _react_icons_all_files.IconBaseProps) => JSX.Element;
21070
21074
  };
21071
21075
 
21072
21076
  type IconsMap = Record<string, IconType$1>;
@@ -23066,7 +23070,7 @@ type Filter = {
23066
23070
  };
23067
23071
 
23068
23072
  /** @deprecated beta - a list of possible operator values that sync with uniform search api */
23069
- type OperatorValue = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'between' | 'ndef' | 'def' | 'match';
23073
+ type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'sys-date-neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts';
23070
23074
  type OperatorValueType = {
23071
23075
  value: OperatorValue;
23072
23076
  };
@@ -23229,6 +23233,8 @@ type SearchAndFilterProviderProps = {
23229
23233
  onSearchChange?: (term: string) => void;
23230
23234
  /** function to trigger filter change events */
23231
23235
  onChange: (filters: Filter[]) => void;
23236
+ /** Sets default value for full text search input, useful for bindable search */
23237
+ defaultSearchTerm?: string;
23232
23238
  /** sets the reset filter values
23233
23239
  * @default "[{ field: '', operator: '', value: '' }]"
23234
23240
  */
@@ -23275,7 +23281,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
23275
23281
  * @deprecated beta - Search and filter provider
23276
23282
  * @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
23277
23283
  * */
23278
- declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23284
+ declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, }: SearchAndFilterProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23279
23285
  /** @deprecated beta - Search and filter hook
23280
23286
  * @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
23281
23287
  */
@@ -23336,7 +23342,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
23336
23342
  * @deprecated beta - Search and filter component
23337
23343
  * @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
23338
23344
  * */
23339
- declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23345
+ declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
23340
23346
 
23341
23347
  type FilterRowProps = {
23342
23348
  /** the index of the filter row */
@@ -23412,9 +23418,11 @@ type SearchAndFilterResultContainerProps = {
23412
23418
  calloutText?: string;
23413
23419
  /** The function to handle the clear button */
23414
23420
  onHandleClear?: () => void;
23421
+ /** Sets whether to show or hide both clear search buttons */
23422
+ hideClearButton?: boolean;
23415
23423
  };
23416
23424
  /** @deprecated beta - Search and filter results container */
23417
- declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
23425
+ declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
23418
23426
 
23419
23427
  declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
23420
23428
  type SearchOnlyProviderProps = Pick<SearchAndFilterProviderProps, 'onSearchChange'> & {
package/dist/index.js CHANGED
@@ -3693,6 +3693,122 @@ var filterAdd = (0, import_all_files.GenIcon)({
3693
3693
  }
3694
3694
  ]
3695
3695
  });
3696
+ var clipboardCopy = (0, import_all_files.GenIcon)({
3697
+ tag: "svg",
3698
+ attr: { viewBox: "0 0 24 24", role: "img" },
3699
+ child: [
3700
+ {
3701
+ tag: "path",
3702
+ attr: {
3703
+ fillRule: "evenodd",
3704
+ clipRule: "evenodd",
3705
+ d: "M2 4C2 2.89543 2.89543 2 4 2H18C19.1046 2 20 2.89543 20 4V9H18V4H16V5C16 6.65685 14.6569 8 13 8H9C7.34315 8 6 6.65685 6 5V4H4L4 18H9V20H4C2.89543 20 2 19.1046 2 18V4ZM8 5V4H14V5C14 5.55228 13.5523 6 13 6H9C8.44772 6 8 5.55228 8 5Z"
3706
+ },
3707
+ child: []
3708
+ },
3709
+ {
3710
+ tag: "path",
3711
+ attr: {
3712
+ d: "M9 14.0665V16.0665H7.04053C6.48824 16.0665 6.04053 15.6188 6.04053 15.0665C6.04053 14.5142 6.48824 14.0665 7.04053 14.0665H9Z"
3713
+ },
3714
+ child: []
3715
+ },
3716
+ {
3717
+ tag: "path",
3718
+ attr: {
3719
+ d: "M9.26756 10C9.09739 10.2942 9 10.6357 9 11V12H7C6.44772 12 6 11.5523 6 11C6 10.4477 6.44772 10 7 10H9.26756Z"
3720
+ },
3721
+ child: []
3722
+ },
3723
+ {
3724
+ tag: "path",
3725
+ attr: {
3726
+ fillRule: "evenodd",
3727
+ clipRule: "evenodd",
3728
+ d: "M10 11.3333C10 10.597 10.597 10 11.3333 10H20.6667L22 11.3333V20.6667C22 21.403 21.403 22 20.6667 22H11.3333C10.597 22 10 21.403 10 20.6667V11.3333ZM11.3333 11.3333H12V12C12 13.1046 12.3333 14.6667 14 14.6667H16.6667C18.3333 14.6667 18.6667 13.1046 18.6667 12V11.3333H20.3333L20.6667 11.6667V20.6667H11.3333V11.3333ZM13.3333 12V11.3333H15.3333V11.973C15.3333 12.3412 15.6318 12.6396 16 12.6396C16.3682 12.6396 16.6667 12.3412 16.6667 11.973V11.3333H17.3333V12C17.3333 12.3682 17.3333 13.3333 16.6667 13.3333H14C13.3333 13.3333 13.3333 12.3682 13.3333 12Z"
3729
+ },
3730
+ child: []
3731
+ },
3732
+ {
3733
+ tag: "path",
3734
+ attr: {
3735
+ d: "M13 16C13 15.7239 13.2239 15.5 13.5 15.5H18.5C18.7761 15.5 19 15.7239 19 16C19 16.2761 18.7761 16.5 18.5 16.5H13.5C13.2239 16.5 13 16.2761 13 16Z"
3736
+ },
3737
+ child: []
3738
+ },
3739
+ {
3740
+ tag: "path",
3741
+ attr: {
3742
+ d: "M13 17.5C13 17.2239 13.2239 17 13.5 17H18.5C18.7761 17 19 17.2239 19 17.5C19 17.7761 18.7761 18 18.5 18H13.5C13.2239 18 13 17.7761 13 17.5Z"
3743
+ },
3744
+ child: []
3745
+ },
3746
+ {
3747
+ tag: "path",
3748
+ attr: {
3749
+ d: "M13 19C13 18.7239 13.2239 18.5 13.5 18.5H18.5C18.7761 18.5 19 18.7239 19 19C19 19.2761 18.7761 19.5 18.5 19.5H13.5C13.2239 19.5 13 19.2761 13 19Z"
3750
+ },
3751
+ child: []
3752
+ }
3753
+ ]
3754
+ });
3755
+ var clipboardPaste = (0, import_all_files.GenIcon)({
3756
+ tag: "svg",
3757
+ attr: { viewBox: "0 0 24 24", role: "img" },
3758
+ child: [
3759
+ {
3760
+ tag: "path",
3761
+ attr: {
3762
+ fillRule: "evenodd",
3763
+ clipRule: "evenodd",
3764
+ d: "M2 4C2 2.89543 2.89543 2 4 2H18C19.1046 2 20 2.89543 20 4V16.4593L18 14.9973V4H16V5C16 6.65685 14.6569 8 13 8H9C7.34315 8 6 6.65685 6 5V4H4L4 18H9V18.08C9 18.6748 9.0216 19.1889 9.06692 19.6126C9.08082 19.7426 9.09774 19.8726 9.11907 20H4C2.89543 20 2 19.1046 2 18V4ZM8 5V4H14V5C14 5.55228 13.5523 6 13 6H9C8.44772 6 8 5.55228 8 5Z"
3765
+ },
3766
+ child: []
3767
+ },
3768
+ {
3769
+ tag: "path",
3770
+ attr: {
3771
+ d: "M20 17.698V18C20 19.1046 19.1046 20 18 20H10.1368C10.0476 19.5861 10 18.9441 10 18.08V18H18V16.236L20 17.698Z"
3772
+ },
3773
+ child: []
3774
+ },
3775
+ {
3776
+ tag: "path",
3777
+ attr: {
3778
+ d: "M12.2024 16.0665H15C15.5523 16.0665 16 15.6188 16 15.0665C16 14.5142 15.5523 14.0665 15 14.0665H11.98V15C11.98 15.6484 12.0944 15.9269 12.1685 16.0282L12.1701 16.0304C12.1768 16.0396 12.1861 16.0525 12.2024 16.0665Z"
3779
+ },
3780
+ child: []
3781
+ },
3782
+ {
3783
+ tag: "path",
3784
+ attr: {
3785
+ d: "M9 14.0665H7.04053C6.48824 14.0665 6.04053 14.5142 6.04053 15.0665C6.04053 15.6188 6.48824 16.0665 7.04053 16.0665H9V14.0665Z"
3786
+ },
3787
+ child: []
3788
+ },
3789
+ {
3790
+ tag: "path",
3791
+ attr: {
3792
+ d: "M10 16.0665V15H10.98C10.98 15.1693 10.9866 15.3286 11 15.4778C11.0196 15.6953 11.0538 15.8915 11.1035 16.0665H10Z"
3793
+ },
3794
+ child: []
3795
+ },
3796
+ {
3797
+ tag: "path",
3798
+ attr: {
3799
+ d: "M7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12H14.9595C15.5118 12 15.9595 11.5523 15.9595 11C15.9595 10.4477 15.5118 10 14.9595 10H7Z"
3800
+ },
3801
+ child: []
3802
+ },
3803
+ {
3804
+ tag: "path",
3805
+ attr: {
3806
+ d: "M17.42 22.812V21.468H12.66C10.896 21.468 10.56 21.048 10.238 20.334C10.084 19.984 10 19.228 10 18.08V15H10.98C10.98 16.442 11.456 17.156 12.604 17.156H17.42V15.812L22.208 19.312L17.42 22.812Z"
3807
+ },
3808
+ child: []
3809
+ }
3810
+ ]
3811
+ });
3696
3812
  var customIcons = {
3697
3813
  "rectangle-rounded": rectangleRoundedIcon,
3698
3814
  card: cardIcon,
@@ -3720,7 +3836,9 @@ var customIcons = {
3720
3836
  "magic-wand": magicWand,
3721
3837
  "list-view-short": listViewShort,
3722
3838
  "list-view-long": listViewLong,
3723
- "filter-add": filterAdd
3839
+ "filter-add": filterAdd,
3840
+ "clipboard-copy": clipboardCopy,
3841
+ "clipboard-paste": clipboardPaste
3724
3842
  };
3725
3843
 
3726
3844
  // src/components/AddListButton/AddListButton.styles.ts
@@ -16322,22 +16440,42 @@ function DateTimePickerSummary({
16322
16440
  value,
16323
16441
  placeholder
16324
16442
  }) {
16325
- const dateFormat = new Intl.DateTimeFormat(void 0, {
16443
+ let dateFormat = new Intl.DateTimeFormat(void 0, {
16326
16444
  day: "numeric",
16327
16445
  month: "long",
16328
- year: "numeric",
16329
- timeZone: value == null ? void 0 : value.timeZone
16446
+ year: "numeric"
16330
16447
  });
16331
- const timeFormat = new Intl.DateTimeFormat(void 0, {
16332
- timeStyle: "short",
16333
- timeZone: value == null ? void 0 : value.timeZone
16448
+ let timeFormat = new Intl.DateTimeFormat(void 0, {
16449
+ timeStyle: "short"
16334
16450
  });
16451
+ let timeZoneWasValid = false;
16452
+ if (value == null ? void 0 : value.timeZone) {
16453
+ try {
16454
+ dateFormat = new Intl.DateTimeFormat(void 0, {
16455
+ day: "numeric",
16456
+ month: "long",
16457
+ year: "numeric",
16458
+ timeZone: value.timeZone
16459
+ });
16460
+ timeFormat = new Intl.DateTimeFormat(void 0, {
16461
+ timeStyle: "short",
16462
+ timeZone: value.timeZone
16463
+ });
16464
+ timeZoneWasValid = true;
16465
+ } catch (error) {
16466
+ if (error instanceof RangeError) {
16467
+ console.error("Tried to use an unsupported time zone", value == null ? void 0 : value.timeZone);
16468
+ } else {
16469
+ throw error;
16470
+ }
16471
+ }
16472
+ }
16335
16473
  const datePart = (value == null ? void 0 : value.datetime) ? dateFormat.format(new Date(value.datetime)) : null;
16336
16474
  const timePart = (value == null ? void 0 : value.datetime) ? timeFormat.format(new Date(value.datetime)) : null;
16337
16475
  return datePart ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { children: [
16338
16476
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("em", { css: inputLabelFocal, children: datePart }),
16339
16477
  !!timePart && `, ${timePart}`,
16340
- !!(value == null ? void 0 : value.timeZone) && ` in ${value == null ? void 0 : value.timeZone}`
16478
+ !!(value == null ? void 0 : value.timeZone) && timeZoneWasValid && ` in ${value == null ? void 0 : value.timeZone}`
16341
16479
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: placeholder });
16342
16480
  }
16343
16481
 
@@ -22189,6 +22327,11 @@ var TEXTBOX_OPERATORS = [
22189
22327
  value: "match",
22190
22328
  editorType: "text"
22191
22329
  },
22330
+ {
22331
+ label: "starts with...",
22332
+ value: "starts",
22333
+ editorType: "text"
22334
+ },
22192
22335
  {
22193
22336
  label: "is not...",
22194
22337
  value: "neq",
@@ -22211,6 +22354,11 @@ var USER_OPERATORS = [
22211
22354
  value: "match",
22212
22355
  editorType: "text"
22213
22356
  },
22357
+ {
22358
+ label: "starts with...",
22359
+ value: "starts",
22360
+ editorType: "text"
22361
+ },
22214
22362
  {
22215
22363
  label: "is not...",
22216
22364
  value: "neq",
@@ -22220,37 +22368,37 @@ var USER_OPERATORS = [
22220
22368
  var SYSTEM_DATE_OPERATORS = [
22221
22369
  {
22222
22370
  label: "is...",
22223
- value: "eq",
22371
+ value: "sys-date-eq",
22224
22372
  editorType: "date"
22225
22373
  },
22226
22374
  {
22227
22375
  label: "is between...",
22228
- value: "between",
22376
+ value: "sys-date-between",
22229
22377
  editorType: "dateRange"
22230
22378
  },
22231
22379
  {
22232
22380
  label: "is before...",
22233
- value: "lt",
22381
+ value: "sys-date-lt",
22234
22382
  editorType: "date"
22235
22383
  },
22236
22384
  {
22237
22385
  label: "is after...",
22238
- value: "gt",
22386
+ value: "sys-date-gt",
22239
22387
  editorType: "date"
22240
22388
  },
22241
22389
  {
22242
22390
  label: "is on or before...",
22243
- value: "lte",
22391
+ value: "sys-date-lte",
22244
22392
  editorType: "date"
22245
22393
  },
22246
22394
  {
22247
22395
  label: "is on or after...",
22248
- value: "gte",
22396
+ value: "sys-date-gte",
22249
22397
  editorType: "date"
22250
22398
  },
22251
22399
  {
22252
22400
  label: "is not...",
22253
- value: "neq",
22401
+ value: "sys-date-neq",
22254
22402
  editorType: "date"
22255
22403
  }
22256
22404
  ];
@@ -22265,6 +22413,11 @@ var RICHTEXT_OPERATORS = [
22265
22413
  value: "match",
22266
22414
  editorType: "text"
22267
22415
  },
22416
+ {
22417
+ label: "starts with...",
22418
+ value: "starts",
22419
+ editorType: "text"
22420
+ },
22268
22421
  {
22269
22422
  label: "is not empty",
22270
22423
  value: "def",
@@ -22862,15 +23015,16 @@ var TextEditor = ({
22862
23015
  readOnly,
22863
23016
  valueTestId
22864
23017
  }) => {
22865
- (0, import_react_use3.useDebounce)(() => onChange, 500, [value]);
23018
+ const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
23019
+ (0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
22866
23020
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
22867
23021
  Input,
22868
23022
  {
22869
23023
  showLabel: false,
22870
23024
  label: ariaLabel,
22871
- onChange: (e) => onChange(e.currentTarget.value),
23025
+ onChange: (e) => setInnerValue(e.currentTarget.value),
22872
23026
  placeholder: "Enter phrase to search\u2026",
22873
- value,
23027
+ value: innerValue,
22874
23028
  readOnly,
22875
23029
  "data-testid": valueTestId
22876
23030
  }
@@ -22887,6 +23041,17 @@ var NumberRangeEditor = ({
22887
23041
  const [minValue, setMinValue] = (0, import_react141.useState)("");
22888
23042
  const [maxValue, setMaxValue] = (0, import_react141.useState)("");
22889
23043
  const [error, setError] = (0, import_react141.useState)("");
23044
+ (0, import_react_use3.useDebounce)(
23045
+ () => {
23046
+ if (minValue && maxValue && !error) {
23047
+ onChange([minValue, maxValue]);
23048
+ } else {
23049
+ onChange([]);
23050
+ }
23051
+ },
23052
+ 500,
23053
+ [minValue, maxValue]
23054
+ );
22890
23055
  (0, import_react141.useEffect)(() => {
22891
23056
  if (!maxValue && !minValue) {
22892
23057
  return;
@@ -22895,16 +23060,19 @@ var NumberRangeEditor = ({
22895
23060
  const min = Number(minValue);
22896
23061
  if (max < min || min > max) {
22897
23062
  setError("Please enter a valid numeric range");
22898
- onChange([]);
22899
23063
  return;
22900
23064
  }
22901
23065
  if (maxValue && !minValue || minValue && !maxValue) {
22902
23066
  setError("Please enter both a low and high number");
22903
- onChange([]);
22904
23067
  return;
22905
23068
  }
22906
- setError("");
22907
- onChange([minValue, maxValue]);
23069
+ if (error) {
23070
+ setError("");
23071
+ }
23072
+ if (min && max) {
23073
+ setMinValue(minValue);
23074
+ setMaxValue(maxValue);
23075
+ }
22908
23076
  }, [maxValue, minValue, setError]);
22909
23077
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
22910
23078
  /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
@@ -22950,6 +23118,8 @@ var NumberEditor = ({
22950
23118
  readOnly,
22951
23119
  valueTestId
22952
23120
  }) => {
23121
+ const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
23122
+ (0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
22953
23123
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
22954
23124
  Input,
22955
23125
  {
@@ -22957,9 +23127,9 @@ var NumberEditor = ({
22957
23127
  type: "number",
22958
23128
  showLabel: false,
22959
23129
  min: 0,
22960
- onChange: (e) => onChange(e.currentTarget.value),
23130
+ onChange: (e) => setInnerValue(e.currentTarget.value),
22961
23131
  disabled: disabled2,
22962
- value,
23132
+ value: innerValue,
22963
23133
  readOnly,
22964
23134
  "data-testid": valueTestId
22965
23135
  }
@@ -22973,15 +23143,17 @@ var DateEditor = ({
22973
23143
  readOnly,
22974
23144
  valueTestId
22975
23145
  }) => {
23146
+ const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
23147
+ (0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
22976
23148
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
22977
23149
  Input,
22978
23150
  {
22979
23151
  type: "date",
22980
23152
  label: ariaLabel,
22981
23153
  showLabel: false,
22982
- onChange: (e) => onChange(e.currentTarget.value),
23154
+ onChange: (e) => setInnerValue(e.currentTarget.value),
22983
23155
  disabled: disabled2,
22984
- value,
23156
+ value: innerValue,
22985
23157
  readOnly,
22986
23158
  "data-testid": valueTestId
22987
23159
  }
@@ -22998,6 +23170,17 @@ var DateRangeEditor = ({
22998
23170
  const [minDateValue, setMinDateValue] = (0, import_react141.useState)(value ? value[0] : "");
22999
23171
  const [maxDateValue, setMaxDateValue] = (0, import_react141.useState)(value ? value[1] : "");
23000
23172
  const [error, setError] = (0, import_react141.useState)("");
23173
+ (0, import_react_use3.useDebounce)(
23174
+ () => {
23175
+ if (minDateValue && maxDateValue && !error) {
23176
+ onChange([minDateValue, maxDateValue]);
23177
+ } else {
23178
+ onChange([]);
23179
+ }
23180
+ },
23181
+ 500,
23182
+ [minDateValue, maxDateValue]
23183
+ );
23001
23184
  (0, import_react141.useEffect)(() => {
23002
23185
  if (!minDateValue || !maxDateValue) {
23003
23186
  return;
@@ -23006,28 +23189,32 @@ var DateRangeEditor = ({
23006
23189
  const maxDate = new Date(maxDateValue);
23007
23190
  if (maxDate < minDate) {
23008
23191
  setError("The max date cannot be lower than the min date");
23009
- onChange([]);
23010
23192
  return;
23011
23193
  }
23012
23194
  if (maxDate && !minDate) {
23013
23195
  setError("Please enter both a low and high date");
23014
- onChange([]);
23015
23196
  return;
23016
23197
  }
23017
23198
  const minDateString = minDate.toDateString();
23018
23199
  const maxDateString = maxDate.toDateString();
23019
23200
  if (minDateString === maxDateString || maxDateString === minDateString) {
23020
23201
  setError("The min and max date cannot be the same");
23021
- onChange([]);
23022
23202
  return;
23023
23203
  }
23024
23204
  if (minDate > maxDate) {
23025
23205
  setError("The min date cannot be higher than the max date");
23026
- onChange([]);
23027
23206
  return;
23028
23207
  }
23029
- setError("");
23030
- onChange([minDateValue, maxDateValue]);
23208
+ if (error) {
23209
+ setError("");
23210
+ }
23211
+ if (minDate && maxDate) {
23212
+ setMinDateValue(minDateValue);
23213
+ setMaxDateValue(maxDateValue);
23214
+ } else {
23215
+ setMinDateValue("");
23216
+ setMaxDateValue("");
23217
+ }
23031
23218
  }, [minDateValue, maxDateValue, setError]);
23032
23219
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
23033
23220
  /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
@@ -23129,6 +23316,7 @@ var SearchAndFilterProvider = ({
23129
23316
  filters,
23130
23317
  filterOptions,
23131
23318
  filterVisible = false,
23319
+ defaultSearchTerm = "",
23132
23320
  onSearchChange,
23133
23321
  onChange,
23134
23322
  resetFilterValues = [{ field: "", operator: "", value: "" }],
@@ -23136,7 +23324,7 @@ var SearchAndFilterProvider = ({
23136
23324
  filterMapper: filterMapper2 = filterMapper,
23137
23325
  children
23138
23326
  }) => {
23139
- const [searchTerm, setSearchTerm] = (0, import_react142.useState)("");
23327
+ const [searchTerm, setSearchTerm] = (0, import_react142.useState)(defaultSearchTerm);
23140
23328
  const deferredSearchTerm = (0, import_react142.useDeferredValue)(searchTerm);
23141
23329
  const [filterVisibility, setFilterVisibility] = (0, import_react142.useState)(filterVisible);
23142
23330
  const handleSearchTerm = (0, import_react142.useCallback)(
@@ -23470,6 +23658,9 @@ var FilterItems = ({
23470
23658
  if (["eq", "neq", "lt", "gt"].includes(value) && Array.isArray(next[index].value)) {
23471
23659
  next[index].value = next[index].value[0];
23472
23660
  }
23661
+ if (filters[index].operator === "ndef" || filters[index].operator === "def") {
23662
+ next[index].value = "";
23663
+ }
23473
23664
  if (["between"].includes(value) && Array.isArray(next[index].value) === false) {
23474
23665
  next[index].value = [next[index].value, ""];
23475
23666
  }
@@ -23546,7 +23737,8 @@ var SearchAndFilterResultContainer = ({
23546
23737
  clearButtonLabel = "clear",
23547
23738
  calloutTitle: calloutTitle2,
23548
23739
  calloutText,
23549
- onHandleClear
23740
+ onHandleClear,
23741
+ hideClearButton
23550
23742
  }) => {
23551
23743
  const { searchTerm, setSearchTerm, totalResults, setFilters, filters } = useSearchAndFilter();
23552
23744
  const automateCalloutTitle = () => {
@@ -23581,11 +23773,11 @@ var SearchAndFilterResultContainer = ({
23581
23773
  " results ",
23582
23774
  searchTerm ? `for "${searchTerm}"` : null
23583
23775
  ] }),
23584
- !searchTerm ? null : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
23776
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
23585
23777
  ] }),
23586
23778
  totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Callout, { title: calloutTitle2 != null ? calloutTitle2 : automateCalloutTitle(), type: "note", children: [
23587
23779
  calloutText ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Paragraph, { children: calloutText }) : null,
23588
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
23780
+ hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
23589
23781
  ] }) : null
23590
23782
  ] });
23591
23783
  };
@@ -23602,6 +23794,7 @@ var SearchAndFilter = ({
23602
23794
  filterMapper: filterMapper2 = filterMapper,
23603
23795
  additionalFiltersContainer,
23604
23796
  onChange,
23797
+ defaultSearchTerm,
23605
23798
  onSearchChange,
23606
23799
  totalResults,
23607
23800
  resetFilterValues = []
@@ -23613,6 +23806,7 @@ var SearchAndFilter = ({
23613
23806
  filterOptions,
23614
23807
  filterVisible,
23615
23808
  onChange,
23809
+ defaultSearchTerm,
23616
23810
  onSearchChange,
23617
23811
  totalResults,
23618
23812
  resetFilterValues,
@@ -23622,9 +23816,7 @@ var SearchAndFilter = ({
23622
23816
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23623
23817
  "div",
23624
23818
  {
23625
- css: SearchAndFilterControlsWrapper(
23626
- viewSwitchControls ? "auto 1fr 0.05fr" : "auto auto 1fr"
23627
- ),
23819
+ css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
23628
23820
  children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
23629
23821
  }
23630
23822
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.138.1-alpha.4+7b94dbe2d8",
3
+ "version": "19.140.2-alpha.7+b328af635c",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "@storybook/react": "6.5.16",
25
25
  "@types/react": "18.2.40",
26
26
  "@types/react-dom": "18.2.17",
27
- "@uniformdev/canvas": "^19.138.1-alpha.4+7b94dbe2d8",
28
- "@uniformdev/richtext": "^19.138.1-alpha.4+7b94dbe2d8",
27
+ "@uniformdev/canvas": "^19.140.2-alpha.7+b328af635c",
28
+ "@uniformdev/richtext": "^19.140.2-alpha.7+b328af635c",
29
29
  "autoprefixer": "10.4.16",
30
30
  "hygen": "6.2.11",
31
31
  "postcss": "8.4.38",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "7b94dbe2d80617b83ecd5f317666e75907a1e532"
75
+ "gitHead": "b328af635c3bf3547580cef498cb277a30912339"
76
76
  }