@uniformdev/design-system 19.139.0 → 19.141.1-alpha.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/esm/index.js +183 -30
- package/dist/index.d.mts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +183 -30
- package/package.json +4 -4
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
|
|
@@ -20385,37 +20503,37 @@ var USER_OPERATORS = [
|
|
|
20385
20503
|
var SYSTEM_DATE_OPERATORS = [
|
|
20386
20504
|
{
|
|
20387
20505
|
label: "is...",
|
|
20388
|
-
value: "eq",
|
|
20506
|
+
value: "sys-date-eq",
|
|
20389
20507
|
editorType: "date"
|
|
20390
20508
|
},
|
|
20391
20509
|
{
|
|
20392
20510
|
label: "is between...",
|
|
20393
|
-
value: "between",
|
|
20511
|
+
value: "sys-date-between",
|
|
20394
20512
|
editorType: "dateRange"
|
|
20395
20513
|
},
|
|
20396
20514
|
{
|
|
20397
20515
|
label: "is before...",
|
|
20398
|
-
value: "lt",
|
|
20516
|
+
value: "sys-date-lt",
|
|
20399
20517
|
editorType: "date"
|
|
20400
20518
|
},
|
|
20401
20519
|
{
|
|
20402
20520
|
label: "is after...",
|
|
20403
|
-
value: "gt",
|
|
20521
|
+
value: "sys-date-gt",
|
|
20404
20522
|
editorType: "date"
|
|
20405
20523
|
},
|
|
20406
20524
|
{
|
|
20407
20525
|
label: "is on or before...",
|
|
20408
|
-
value: "lte",
|
|
20526
|
+
value: "sys-date-lte",
|
|
20409
20527
|
editorType: "date"
|
|
20410
20528
|
},
|
|
20411
20529
|
{
|
|
20412
20530
|
label: "is on or after...",
|
|
20413
|
-
value: "gte",
|
|
20531
|
+
value: "sys-date-gte",
|
|
20414
20532
|
editorType: "date"
|
|
20415
20533
|
},
|
|
20416
20534
|
{
|
|
20417
20535
|
label: "is not...",
|
|
20418
|
-
value: "neq",
|
|
20536
|
+
value: "sys-date-neq",
|
|
20419
20537
|
editorType: "date"
|
|
20420
20538
|
}
|
|
20421
20539
|
];
|
|
@@ -21029,15 +21147,16 @@ var TextEditor = ({
|
|
|
21029
21147
|
readOnly,
|
|
21030
21148
|
valueTestId
|
|
21031
21149
|
}) => {
|
|
21032
|
-
|
|
21150
|
+
const [innerValue, setInnerValue] = useState16(value != null ? value : "");
|
|
21151
|
+
useDebounce2(() => onChange(innerValue), 500, [innerValue]);
|
|
21033
21152
|
return /* @__PURE__ */ jsx120(
|
|
21034
21153
|
Input,
|
|
21035
21154
|
{
|
|
21036
21155
|
showLabel: false,
|
|
21037
21156
|
label: ariaLabel,
|
|
21038
|
-
onChange: (e) =>
|
|
21157
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
21039
21158
|
placeholder: "Enter phrase to search\u2026",
|
|
21040
|
-
value,
|
|
21159
|
+
value: innerValue,
|
|
21041
21160
|
readOnly,
|
|
21042
21161
|
"data-testid": valueTestId
|
|
21043
21162
|
}
|
|
@@ -21054,6 +21173,17 @@ var NumberRangeEditor = ({
|
|
|
21054
21173
|
const [minValue, setMinValue] = useState16("");
|
|
21055
21174
|
const [maxValue, setMaxValue] = useState16("");
|
|
21056
21175
|
const [error, setError] = useState16("");
|
|
21176
|
+
useDebounce2(
|
|
21177
|
+
() => {
|
|
21178
|
+
if (minValue && maxValue && !error) {
|
|
21179
|
+
onChange([minValue, maxValue]);
|
|
21180
|
+
} else {
|
|
21181
|
+
onChange([]);
|
|
21182
|
+
}
|
|
21183
|
+
},
|
|
21184
|
+
500,
|
|
21185
|
+
[minValue, maxValue]
|
|
21186
|
+
);
|
|
21057
21187
|
useEffect17(() => {
|
|
21058
21188
|
if (!maxValue && !minValue) {
|
|
21059
21189
|
return;
|
|
@@ -21062,16 +21192,19 @@ var NumberRangeEditor = ({
|
|
|
21062
21192
|
const min = Number(minValue);
|
|
21063
21193
|
if (max < min || min > max) {
|
|
21064
21194
|
setError("Please enter a valid numeric range");
|
|
21065
|
-
onChange([]);
|
|
21066
21195
|
return;
|
|
21067
21196
|
}
|
|
21068
21197
|
if (maxValue && !minValue || minValue && !maxValue) {
|
|
21069
21198
|
setError("Please enter both a low and high number");
|
|
21070
|
-
onChange([]);
|
|
21071
21199
|
return;
|
|
21072
21200
|
}
|
|
21073
|
-
|
|
21074
|
-
|
|
21201
|
+
if (error) {
|
|
21202
|
+
setError("");
|
|
21203
|
+
}
|
|
21204
|
+
if (min && max) {
|
|
21205
|
+
setMinValue(minValue);
|
|
21206
|
+
setMaxValue(maxValue);
|
|
21207
|
+
}
|
|
21075
21208
|
}, [maxValue, minValue, setError]);
|
|
21076
21209
|
return /* @__PURE__ */ jsxs81(Fragment19, { children: [
|
|
21077
21210
|
/* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
@@ -21117,6 +21250,8 @@ var NumberEditor = ({
|
|
|
21117
21250
|
readOnly,
|
|
21118
21251
|
valueTestId
|
|
21119
21252
|
}) => {
|
|
21253
|
+
const [innerValue, setInnerValue] = useState16(value != null ? value : "");
|
|
21254
|
+
useDebounce2(() => onChange(innerValue), 500, [innerValue]);
|
|
21120
21255
|
return /* @__PURE__ */ jsx120(
|
|
21121
21256
|
Input,
|
|
21122
21257
|
{
|
|
@@ -21124,9 +21259,9 @@ var NumberEditor = ({
|
|
|
21124
21259
|
type: "number",
|
|
21125
21260
|
showLabel: false,
|
|
21126
21261
|
min: 0,
|
|
21127
|
-
onChange: (e) =>
|
|
21262
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
21128
21263
|
disabled: disabled2,
|
|
21129
|
-
value,
|
|
21264
|
+
value: innerValue,
|
|
21130
21265
|
readOnly,
|
|
21131
21266
|
"data-testid": valueTestId
|
|
21132
21267
|
}
|
|
@@ -21140,15 +21275,17 @@ var DateEditor = ({
|
|
|
21140
21275
|
readOnly,
|
|
21141
21276
|
valueTestId
|
|
21142
21277
|
}) => {
|
|
21278
|
+
const [innerValue, setInnerValue] = useState16(value != null ? value : "");
|
|
21279
|
+
useDebounce2(() => onChange(innerValue), 500, [innerValue]);
|
|
21143
21280
|
return /* @__PURE__ */ jsx120(
|
|
21144
21281
|
Input,
|
|
21145
21282
|
{
|
|
21146
21283
|
type: "date",
|
|
21147
21284
|
label: ariaLabel,
|
|
21148
21285
|
showLabel: false,
|
|
21149
|
-
onChange: (e) =>
|
|
21286
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
21150
21287
|
disabled: disabled2,
|
|
21151
|
-
value,
|
|
21288
|
+
value: innerValue,
|
|
21152
21289
|
readOnly,
|
|
21153
21290
|
"data-testid": valueTestId
|
|
21154
21291
|
}
|
|
@@ -21165,6 +21302,17 @@ var DateRangeEditor = ({
|
|
|
21165
21302
|
const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
|
|
21166
21303
|
const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
|
|
21167
21304
|
const [error, setError] = useState16("");
|
|
21305
|
+
useDebounce2(
|
|
21306
|
+
() => {
|
|
21307
|
+
if (minDateValue && maxDateValue && !error) {
|
|
21308
|
+
onChange([minDateValue, maxDateValue]);
|
|
21309
|
+
} else {
|
|
21310
|
+
onChange([]);
|
|
21311
|
+
}
|
|
21312
|
+
},
|
|
21313
|
+
500,
|
|
21314
|
+
[minDateValue, maxDateValue]
|
|
21315
|
+
);
|
|
21168
21316
|
useEffect17(() => {
|
|
21169
21317
|
if (!minDateValue || !maxDateValue) {
|
|
21170
21318
|
return;
|
|
@@ -21173,28 +21321,32 @@ var DateRangeEditor = ({
|
|
|
21173
21321
|
const maxDate = new Date(maxDateValue);
|
|
21174
21322
|
if (maxDate < minDate) {
|
|
21175
21323
|
setError("The max date cannot be lower than the min date");
|
|
21176
|
-
onChange([]);
|
|
21177
21324
|
return;
|
|
21178
21325
|
}
|
|
21179
21326
|
if (maxDate && !minDate) {
|
|
21180
21327
|
setError("Please enter both a low and high date");
|
|
21181
|
-
onChange([]);
|
|
21182
21328
|
return;
|
|
21183
21329
|
}
|
|
21184
21330
|
const minDateString = minDate.toDateString();
|
|
21185
21331
|
const maxDateString = maxDate.toDateString();
|
|
21186
21332
|
if (minDateString === maxDateString || maxDateString === minDateString) {
|
|
21187
21333
|
setError("The min and max date cannot be the same");
|
|
21188
|
-
onChange([]);
|
|
21189
21334
|
return;
|
|
21190
21335
|
}
|
|
21191
21336
|
if (minDate > maxDate) {
|
|
21192
21337
|
setError("The min date cannot be higher than the max date");
|
|
21193
|
-
onChange([]);
|
|
21194
21338
|
return;
|
|
21195
21339
|
}
|
|
21196
|
-
|
|
21197
|
-
|
|
21340
|
+
if (error) {
|
|
21341
|
+
setError("");
|
|
21342
|
+
}
|
|
21343
|
+
if (minDate && maxDate) {
|
|
21344
|
+
setMinDateValue(minDateValue);
|
|
21345
|
+
setMaxDateValue(maxDateValue);
|
|
21346
|
+
} else {
|
|
21347
|
+
setMinDateValue("");
|
|
21348
|
+
setMaxDateValue("");
|
|
21349
|
+
}
|
|
21198
21350
|
}, [minDateValue, maxDateValue, setError]);
|
|
21199
21351
|
return /* @__PURE__ */ jsxs81(Fragment19, { children: [
|
|
21200
21352
|
/* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
@@ -21296,6 +21448,7 @@ var SearchAndFilterProvider = ({
|
|
|
21296
21448
|
filters,
|
|
21297
21449
|
filterOptions,
|
|
21298
21450
|
filterVisible = false,
|
|
21451
|
+
defaultSearchTerm = "",
|
|
21299
21452
|
onSearchChange,
|
|
21300
21453
|
onChange,
|
|
21301
21454
|
resetFilterValues = [{ field: "", operator: "", value: "" }],
|
|
@@ -21303,7 +21456,7 @@ var SearchAndFilterProvider = ({
|
|
|
21303
21456
|
filterMapper: filterMapper2 = filterMapper,
|
|
21304
21457
|
children
|
|
21305
21458
|
}) => {
|
|
21306
|
-
const [searchTerm, setSearchTerm] = useState17(
|
|
21459
|
+
const [searchTerm, setSearchTerm] = useState17(defaultSearchTerm);
|
|
21307
21460
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
21308
21461
|
const [filterVisibility, setFilterVisibility] = useState17(filterVisible);
|
|
21309
21462
|
const handleSearchTerm = useCallback10(
|
|
@@ -21736,7 +21889,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
21736
21889
|
return;
|
|
21737
21890
|
}
|
|
21738
21891
|
};
|
|
21739
|
-
if (totalResults
|
|
21892
|
+
if (totalResults === void 0 || totalResults > 0) {
|
|
21740
21893
|
return null;
|
|
21741
21894
|
}
|
|
21742
21895
|
return /* @__PURE__ */ jsxs85(Fragment21, { children: [
|
|
@@ -21767,6 +21920,7 @@ var SearchAndFilter = ({
|
|
|
21767
21920
|
filterMapper: filterMapper2 = filterMapper,
|
|
21768
21921
|
additionalFiltersContainer,
|
|
21769
21922
|
onChange,
|
|
21923
|
+
defaultSearchTerm,
|
|
21770
21924
|
onSearchChange,
|
|
21771
21925
|
totalResults,
|
|
21772
21926
|
resetFilterValues = []
|
|
@@ -21778,6 +21932,7 @@ var SearchAndFilter = ({
|
|
|
21778
21932
|
filterOptions,
|
|
21779
21933
|
filterVisible,
|
|
21780
21934
|
onChange,
|
|
21935
|
+
defaultSearchTerm,
|
|
21781
21936
|
onSearchChange,
|
|
21782
21937
|
totalResults,
|
|
21783
21938
|
resetFilterValues,
|
|
@@ -21787,9 +21942,7 @@ var SearchAndFilter = ({
|
|
|
21787
21942
|
/* @__PURE__ */ jsx126(
|
|
21788
21943
|
"div",
|
|
21789
21944
|
{
|
|
21790
|
-
css: SearchAndFilterControlsWrapper(
|
|
21791
|
-
viewSwitchControls ? "auto 1fr 0.05fr" : "auto auto 1fr"
|
|
21792
|
-
),
|
|
21945
|
+
css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
|
|
21793
21946
|
children: !filterControls ? /* @__PURE__ */ jsx126(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
|
|
21794
21947
|
}
|
|
21795
21948
|
),
|
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' | 'starts';
|
|
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 */
|
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' | 'starts';
|
|
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 */
|
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
|
|
@@ -22230,37 +22348,37 @@ var USER_OPERATORS = [
|
|
|
22230
22348
|
var SYSTEM_DATE_OPERATORS = [
|
|
22231
22349
|
{
|
|
22232
22350
|
label: "is...",
|
|
22233
|
-
value: "eq",
|
|
22351
|
+
value: "sys-date-eq",
|
|
22234
22352
|
editorType: "date"
|
|
22235
22353
|
},
|
|
22236
22354
|
{
|
|
22237
22355
|
label: "is between...",
|
|
22238
|
-
value: "between",
|
|
22356
|
+
value: "sys-date-between",
|
|
22239
22357
|
editorType: "dateRange"
|
|
22240
22358
|
},
|
|
22241
22359
|
{
|
|
22242
22360
|
label: "is before...",
|
|
22243
|
-
value: "lt",
|
|
22361
|
+
value: "sys-date-lt",
|
|
22244
22362
|
editorType: "date"
|
|
22245
22363
|
},
|
|
22246
22364
|
{
|
|
22247
22365
|
label: "is after...",
|
|
22248
|
-
value: "gt",
|
|
22366
|
+
value: "sys-date-gt",
|
|
22249
22367
|
editorType: "date"
|
|
22250
22368
|
},
|
|
22251
22369
|
{
|
|
22252
22370
|
label: "is on or before...",
|
|
22253
|
-
value: "lte",
|
|
22371
|
+
value: "sys-date-lte",
|
|
22254
22372
|
editorType: "date"
|
|
22255
22373
|
},
|
|
22256
22374
|
{
|
|
22257
22375
|
label: "is on or after...",
|
|
22258
|
-
value: "gte",
|
|
22376
|
+
value: "sys-date-gte",
|
|
22259
22377
|
editorType: "date"
|
|
22260
22378
|
},
|
|
22261
22379
|
{
|
|
22262
22380
|
label: "is not...",
|
|
22263
|
-
value: "neq",
|
|
22381
|
+
value: "sys-date-neq",
|
|
22264
22382
|
editorType: "date"
|
|
22265
22383
|
}
|
|
22266
22384
|
];
|
|
@@ -22877,15 +22995,16 @@ var TextEditor = ({
|
|
|
22877
22995
|
readOnly,
|
|
22878
22996
|
valueTestId
|
|
22879
22997
|
}) => {
|
|
22880
|
-
(0,
|
|
22998
|
+
const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
|
|
22999
|
+
(0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
22881
23000
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
22882
23001
|
Input,
|
|
22883
23002
|
{
|
|
22884
23003
|
showLabel: false,
|
|
22885
23004
|
label: ariaLabel,
|
|
22886
|
-
onChange: (e) =>
|
|
23005
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
22887
23006
|
placeholder: "Enter phrase to search\u2026",
|
|
22888
|
-
value,
|
|
23007
|
+
value: innerValue,
|
|
22889
23008
|
readOnly,
|
|
22890
23009
|
"data-testid": valueTestId
|
|
22891
23010
|
}
|
|
@@ -22902,6 +23021,17 @@ var NumberRangeEditor = ({
|
|
|
22902
23021
|
const [minValue, setMinValue] = (0, import_react141.useState)("");
|
|
22903
23022
|
const [maxValue, setMaxValue] = (0, import_react141.useState)("");
|
|
22904
23023
|
const [error, setError] = (0, import_react141.useState)("");
|
|
23024
|
+
(0, import_react_use3.useDebounce)(
|
|
23025
|
+
() => {
|
|
23026
|
+
if (minValue && maxValue && !error) {
|
|
23027
|
+
onChange([minValue, maxValue]);
|
|
23028
|
+
} else {
|
|
23029
|
+
onChange([]);
|
|
23030
|
+
}
|
|
23031
|
+
},
|
|
23032
|
+
500,
|
|
23033
|
+
[minValue, maxValue]
|
|
23034
|
+
);
|
|
22905
23035
|
(0, import_react141.useEffect)(() => {
|
|
22906
23036
|
if (!maxValue && !minValue) {
|
|
22907
23037
|
return;
|
|
@@ -22910,16 +23040,19 @@ var NumberRangeEditor = ({
|
|
|
22910
23040
|
const min = Number(minValue);
|
|
22911
23041
|
if (max < min || min > max) {
|
|
22912
23042
|
setError("Please enter a valid numeric range");
|
|
22913
|
-
onChange([]);
|
|
22914
23043
|
return;
|
|
22915
23044
|
}
|
|
22916
23045
|
if (maxValue && !minValue || minValue && !maxValue) {
|
|
22917
23046
|
setError("Please enter both a low and high number");
|
|
22918
|
-
onChange([]);
|
|
22919
23047
|
return;
|
|
22920
23048
|
}
|
|
22921
|
-
|
|
22922
|
-
|
|
23049
|
+
if (error) {
|
|
23050
|
+
setError("");
|
|
23051
|
+
}
|
|
23052
|
+
if (min && max) {
|
|
23053
|
+
setMinValue(minValue);
|
|
23054
|
+
setMaxValue(maxValue);
|
|
23055
|
+
}
|
|
22923
23056
|
}, [maxValue, minValue, setError]);
|
|
22924
23057
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
22925
23058
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
@@ -22965,6 +23098,8 @@ var NumberEditor = ({
|
|
|
22965
23098
|
readOnly,
|
|
22966
23099
|
valueTestId
|
|
22967
23100
|
}) => {
|
|
23101
|
+
const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
|
|
23102
|
+
(0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
22968
23103
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
22969
23104
|
Input,
|
|
22970
23105
|
{
|
|
@@ -22972,9 +23107,9 @@ var NumberEditor = ({
|
|
|
22972
23107
|
type: "number",
|
|
22973
23108
|
showLabel: false,
|
|
22974
23109
|
min: 0,
|
|
22975
|
-
onChange: (e) =>
|
|
23110
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
22976
23111
|
disabled: disabled2,
|
|
22977
|
-
value,
|
|
23112
|
+
value: innerValue,
|
|
22978
23113
|
readOnly,
|
|
22979
23114
|
"data-testid": valueTestId
|
|
22980
23115
|
}
|
|
@@ -22988,15 +23123,17 @@ var DateEditor = ({
|
|
|
22988
23123
|
readOnly,
|
|
22989
23124
|
valueTestId
|
|
22990
23125
|
}) => {
|
|
23126
|
+
const [innerValue, setInnerValue] = (0, import_react141.useState)(value != null ? value : "");
|
|
23127
|
+
(0, import_react_use3.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
|
|
22991
23128
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
22992
23129
|
Input,
|
|
22993
23130
|
{
|
|
22994
23131
|
type: "date",
|
|
22995
23132
|
label: ariaLabel,
|
|
22996
23133
|
showLabel: false,
|
|
22997
|
-
onChange: (e) =>
|
|
23134
|
+
onChange: (e) => setInnerValue(e.currentTarget.value),
|
|
22998
23135
|
disabled: disabled2,
|
|
22999
|
-
value,
|
|
23136
|
+
value: innerValue,
|
|
23000
23137
|
readOnly,
|
|
23001
23138
|
"data-testid": valueTestId
|
|
23002
23139
|
}
|
|
@@ -23013,6 +23150,17 @@ var DateRangeEditor = ({
|
|
|
23013
23150
|
const [minDateValue, setMinDateValue] = (0, import_react141.useState)(value ? value[0] : "");
|
|
23014
23151
|
const [maxDateValue, setMaxDateValue] = (0, import_react141.useState)(value ? value[1] : "");
|
|
23015
23152
|
const [error, setError] = (0, import_react141.useState)("");
|
|
23153
|
+
(0, import_react_use3.useDebounce)(
|
|
23154
|
+
() => {
|
|
23155
|
+
if (minDateValue && maxDateValue && !error) {
|
|
23156
|
+
onChange([minDateValue, maxDateValue]);
|
|
23157
|
+
} else {
|
|
23158
|
+
onChange([]);
|
|
23159
|
+
}
|
|
23160
|
+
},
|
|
23161
|
+
500,
|
|
23162
|
+
[minDateValue, maxDateValue]
|
|
23163
|
+
);
|
|
23016
23164
|
(0, import_react141.useEffect)(() => {
|
|
23017
23165
|
if (!minDateValue || !maxDateValue) {
|
|
23018
23166
|
return;
|
|
@@ -23021,28 +23169,32 @@ var DateRangeEditor = ({
|
|
|
23021
23169
|
const maxDate = new Date(maxDateValue);
|
|
23022
23170
|
if (maxDate < minDate) {
|
|
23023
23171
|
setError("The max date cannot be lower than the min date");
|
|
23024
|
-
onChange([]);
|
|
23025
23172
|
return;
|
|
23026
23173
|
}
|
|
23027
23174
|
if (maxDate && !minDate) {
|
|
23028
23175
|
setError("Please enter both a low and high date");
|
|
23029
|
-
onChange([]);
|
|
23030
23176
|
return;
|
|
23031
23177
|
}
|
|
23032
23178
|
const minDateString = minDate.toDateString();
|
|
23033
23179
|
const maxDateString = maxDate.toDateString();
|
|
23034
23180
|
if (minDateString === maxDateString || maxDateString === minDateString) {
|
|
23035
23181
|
setError("The min and max date cannot be the same");
|
|
23036
|
-
onChange([]);
|
|
23037
23182
|
return;
|
|
23038
23183
|
}
|
|
23039
23184
|
if (minDate > maxDate) {
|
|
23040
23185
|
setError("The min date cannot be higher than the max date");
|
|
23041
|
-
onChange([]);
|
|
23042
23186
|
return;
|
|
23043
23187
|
}
|
|
23044
|
-
|
|
23045
|
-
|
|
23188
|
+
if (error) {
|
|
23189
|
+
setError("");
|
|
23190
|
+
}
|
|
23191
|
+
if (minDate && maxDate) {
|
|
23192
|
+
setMinDateValue(minDateValue);
|
|
23193
|
+
setMaxDateValue(maxDateValue);
|
|
23194
|
+
} else {
|
|
23195
|
+
setMinDateValue("");
|
|
23196
|
+
setMaxDateValue("");
|
|
23197
|
+
}
|
|
23046
23198
|
}, [minDateValue, maxDateValue, setError]);
|
|
23047
23199
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
23048
23200
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
@@ -23144,6 +23296,7 @@ var SearchAndFilterProvider = ({
|
|
|
23144
23296
|
filters,
|
|
23145
23297
|
filterOptions,
|
|
23146
23298
|
filterVisible = false,
|
|
23299
|
+
defaultSearchTerm = "",
|
|
23147
23300
|
onSearchChange,
|
|
23148
23301
|
onChange,
|
|
23149
23302
|
resetFilterValues = [{ field: "", operator: "", value: "" }],
|
|
@@ -23151,7 +23304,7 @@ var SearchAndFilterProvider = ({
|
|
|
23151
23304
|
filterMapper: filterMapper2 = filterMapper,
|
|
23152
23305
|
children
|
|
23153
23306
|
}) => {
|
|
23154
|
-
const [searchTerm, setSearchTerm] = (0, import_react142.useState)(
|
|
23307
|
+
const [searchTerm, setSearchTerm] = (0, import_react142.useState)(defaultSearchTerm);
|
|
23155
23308
|
const deferredSearchTerm = (0, import_react142.useDeferredValue)(searchTerm);
|
|
23156
23309
|
const [filterVisibility, setFilterVisibility] = (0, import_react142.useState)(filterVisible);
|
|
23157
23310
|
const handleSearchTerm = (0, import_react142.useCallback)(
|
|
@@ -23590,7 +23743,7 @@ var SearchAndFilterResultContainer = ({
|
|
|
23590
23743
|
return;
|
|
23591
23744
|
}
|
|
23592
23745
|
};
|
|
23593
|
-
if (totalResults
|
|
23746
|
+
if (totalResults === void 0 || totalResults > 0) {
|
|
23594
23747
|
return null;
|
|
23595
23748
|
}
|
|
23596
23749
|
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
|
|
@@ -23621,6 +23774,7 @@ var SearchAndFilter = ({
|
|
|
23621
23774
|
filterMapper: filterMapper2 = filterMapper,
|
|
23622
23775
|
additionalFiltersContainer,
|
|
23623
23776
|
onChange,
|
|
23777
|
+
defaultSearchTerm,
|
|
23624
23778
|
onSearchChange,
|
|
23625
23779
|
totalResults,
|
|
23626
23780
|
resetFilterValues = []
|
|
@@ -23632,6 +23786,7 @@ var SearchAndFilter = ({
|
|
|
23632
23786
|
filterOptions,
|
|
23633
23787
|
filterVisible,
|
|
23634
23788
|
onChange,
|
|
23789
|
+
defaultSearchTerm,
|
|
23635
23790
|
onSearchChange,
|
|
23636
23791
|
totalResults,
|
|
23637
23792
|
resetFilterValues,
|
|
@@ -23641,9 +23796,7 @@ var SearchAndFilter = ({
|
|
|
23641
23796
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23642
23797
|
"div",
|
|
23643
23798
|
{
|
|
23644
|
-
css: SearchAndFilterControlsWrapper(
|
|
23645
|
-
viewSwitchControls ? "auto 1fr 0.05fr" : "auto auto 1fr"
|
|
23646
|
-
),
|
|
23799
|
+
css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
|
|
23647
23800
|
children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
|
|
23648
23801
|
}
|
|
23649
23802
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.141.1-alpha.5+4c722bef9c",
|
|
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.
|
|
28
|
-
"@uniformdev/richtext": "^19.
|
|
27
|
+
"@uniformdev/canvas": "^19.141.1-alpha.5+4c722bef9c",
|
|
28
|
+
"@uniformdev/richtext": "^19.141.1-alpha.5+4c722bef9c",
|
|
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": "
|
|
75
|
+
"gitHead": "4c722bef9cfbf90b8981cec47fadec37b02a3c12"
|
|
76
76
|
}
|