@uniformdev/design-system 19.116.0 → 19.116.2-alpha.0
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 +178 -90
- package/dist/index.d.mts +84 -5
- package/dist/index.d.ts +84 -5
- package/dist/index.js +146 -60
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -22128,6 +22128,12 @@ var SearchAndFilterControlsWrapper = import_react138.css`
|
|
|
22128
22128
|
grid-template-columns: auto 1fr 1fr;
|
|
22129
22129
|
gap: var(--spacing-base);
|
|
22130
22130
|
`;
|
|
22131
|
+
var SearchAndFilterOutterControlWrapper = import_react138.css`
|
|
22132
|
+
align-items: stretch;
|
|
22133
|
+
display: grid;
|
|
22134
|
+
grid-template-columns: 1fr auto;
|
|
22135
|
+
gap: var(--spacing-sm);
|
|
22136
|
+
`;
|
|
22131
22137
|
var ConditionalFilterRow = import_react138.css`
|
|
22132
22138
|
display: grid;
|
|
22133
22139
|
grid-template-columns: 35px 1fr;
|
|
@@ -22305,6 +22311,7 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
22305
22311
|
type: "button",
|
|
22306
22312
|
css: [FilterButton, filterCount ? FilterButtonWithOptions : void 0],
|
|
22307
22313
|
...props,
|
|
22314
|
+
"data-testid": "filters-button",
|
|
22308
22315
|
children: [
|
|
22309
22316
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon, { icon: "filter-add", iconColor: "currentColor", size: "1rem" }),
|
|
22310
22317
|
text,
|
|
@@ -22343,13 +22350,20 @@ var SearchAndFilterContext = (0, import_react139.createContext)({
|
|
|
22343
22350
|
var SearchAndFilterProvider = ({
|
|
22344
22351
|
filters,
|
|
22345
22352
|
filterOptions,
|
|
22353
|
+
onSearchChange,
|
|
22346
22354
|
onChange,
|
|
22347
22355
|
children
|
|
22348
22356
|
}) => {
|
|
22349
22357
|
const [searchTerm, setSearchTerm] = (0, import_react139.useState)("");
|
|
22350
22358
|
const deferredSearchTerm = (0, import_react139.useDeferredValue)(searchTerm);
|
|
22351
22359
|
const [filterVisibility, setFilterVisibility] = (0, import_react139.useState)(false);
|
|
22352
|
-
const handleSearchTerm = (0, import_react139.useCallback)(
|
|
22360
|
+
const handleSearchTerm = (0, import_react139.useCallback)(
|
|
22361
|
+
(term) => {
|
|
22362
|
+
setSearchTerm(term);
|
|
22363
|
+
onSearchChange(term);
|
|
22364
|
+
},
|
|
22365
|
+
[setSearchTerm, onSearchChange]
|
|
22366
|
+
);
|
|
22353
22367
|
const handleToggleFilterVisibilty = (0, import_react139.useCallback)(
|
|
22354
22368
|
(visible) => setFilterVisibility(visible),
|
|
22355
22369
|
[setFilterVisibility]
|
|
@@ -22414,7 +22428,7 @@ var useSearchAndFilter = () => {
|
|
|
22414
22428
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
22415
22429
|
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
22416
22430
|
var FilterControls = ({ children }) => {
|
|
22417
|
-
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery } = useSearchAndFilter();
|
|
22431
|
+
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery, searchTerm } = useSearchAndFilter();
|
|
22418
22432
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
|
|
22419
22433
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22420
22434
|
FilterButton2,
|
|
@@ -22428,11 +22442,11 @@ var FilterControls = ({ children }) => {
|
|
|
22428
22442
|
}
|
|
22429
22443
|
),
|
|
22430
22444
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22431
|
-
|
|
22445
|
+
DebouncedInputKeywordSearch,
|
|
22432
22446
|
{
|
|
22433
|
-
type: "search",
|
|
22434
22447
|
placeholder: "Search...",
|
|
22435
22448
|
onSearchTextChanged: (e) => setSearchTerm(e),
|
|
22449
|
+
defaultValue: searchTerm,
|
|
22436
22450
|
compact: true,
|
|
22437
22451
|
rounded: true
|
|
22438
22452
|
}
|
|
@@ -22443,11 +22457,12 @@ var FilterControls = ({ children }) => {
|
|
|
22443
22457
|
|
|
22444
22458
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
22445
22459
|
init_emotion_jsx_shim();
|
|
22460
|
+
var import_react142 = require("react");
|
|
22446
22461
|
|
|
22447
22462
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
22448
22463
|
init_emotion_jsx_shim();
|
|
22449
|
-
var import_react141 = require("
|
|
22450
|
-
var
|
|
22464
|
+
var import_react141 = require("react");
|
|
22465
|
+
var import_react_use3 = require("react-use");
|
|
22451
22466
|
|
|
22452
22467
|
// src/components/Validation/StatusBullet.tsx
|
|
22453
22468
|
init_emotion_jsx_shim();
|
|
@@ -22564,6 +22579,7 @@ var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
|
22564
22579
|
var FilterMultiChoiceEditor = ({
|
|
22565
22580
|
value,
|
|
22566
22581
|
options,
|
|
22582
|
+
isDisabled,
|
|
22567
22583
|
...props
|
|
22568
22584
|
}) => {
|
|
22569
22585
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
@@ -22573,28 +22589,32 @@ var FilterMultiChoiceEditor = ({
|
|
|
22573
22589
|
options,
|
|
22574
22590
|
isMulti: true,
|
|
22575
22591
|
isClearable: true,
|
|
22592
|
+
isDisabled,
|
|
22576
22593
|
onChange: (e) => {
|
|
22577
22594
|
var _a;
|
|
22578
22595
|
return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
22579
|
-
}
|
|
22596
|
+
},
|
|
22597
|
+
value
|
|
22580
22598
|
}
|
|
22581
22599
|
);
|
|
22582
22600
|
};
|
|
22583
22601
|
var FilterSingleChoiceEditor = ({
|
|
22584
22602
|
options,
|
|
22585
22603
|
value,
|
|
22586
|
-
|
|
22604
|
+
isDisabled,
|
|
22605
|
+
onChange
|
|
22587
22606
|
}) => {
|
|
22588
22607
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22589
22608
|
InputComboBox,
|
|
22590
22609
|
{
|
|
22591
22610
|
options,
|
|
22592
22611
|
isClearable: true,
|
|
22593
|
-
...props,
|
|
22594
22612
|
onChange: (e) => {
|
|
22595
22613
|
var _a;
|
|
22596
|
-
return
|
|
22597
|
-
}
|
|
22614
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
22615
|
+
},
|
|
22616
|
+
isDisabled,
|
|
22617
|
+
value
|
|
22598
22618
|
}
|
|
22599
22619
|
);
|
|
22600
22620
|
};
|
|
@@ -22604,56 +22624,62 @@ var CustomOptions = ({ label, value }) => {
|
|
|
22604
22624
|
var StatusMultiEditor = ({
|
|
22605
22625
|
options,
|
|
22606
22626
|
value,
|
|
22607
|
-
|
|
22627
|
+
isDisabled,
|
|
22628
|
+
onChange
|
|
22608
22629
|
}) => {
|
|
22609
22630
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22610
22631
|
InputComboBox,
|
|
22611
22632
|
{
|
|
22612
22633
|
options,
|
|
22613
22634
|
isMulti: true,
|
|
22614
|
-
...props,
|
|
22615
22635
|
onChange: (e) => {
|
|
22616
22636
|
var _a;
|
|
22617
|
-
return
|
|
22637
|
+
return onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
22618
22638
|
},
|
|
22619
|
-
formatOptionLabel: CustomOptions
|
|
22639
|
+
formatOptionLabel: CustomOptions,
|
|
22640
|
+
value,
|
|
22641
|
+
isDisabled
|
|
22620
22642
|
}
|
|
22621
22643
|
);
|
|
22622
22644
|
};
|
|
22623
22645
|
var StatusSingleEditor = ({
|
|
22624
22646
|
options,
|
|
22625
22647
|
value,
|
|
22626
|
-
|
|
22648
|
+
isDisabled,
|
|
22649
|
+
onChange
|
|
22627
22650
|
}) => {
|
|
22628
22651
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22629
22652
|
InputComboBox,
|
|
22630
22653
|
{
|
|
22631
22654
|
options,
|
|
22632
|
-
...props,
|
|
22633
22655
|
onChange: (e) => {
|
|
22634
22656
|
var _a;
|
|
22635
|
-
return
|
|
22657
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
22636
22658
|
},
|
|
22637
|
-
formatOptionLabel: CustomOptions
|
|
22659
|
+
formatOptionLabel: CustomOptions,
|
|
22660
|
+
value,
|
|
22661
|
+
isDisabled
|
|
22638
22662
|
}
|
|
22639
22663
|
);
|
|
22640
22664
|
};
|
|
22641
|
-
var TextEditor = ({ onChange, ariaLabel }) => {
|
|
22665
|
+
var TextEditor = ({ onChange, ariaLabel, value }) => {
|
|
22666
|
+
(0, import_react_use3.useDebounce)(() => onChange, 500, [value]);
|
|
22642
22667
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22643
22668
|
Input,
|
|
22644
22669
|
{
|
|
22645
22670
|
showLabel: false,
|
|
22646
|
-
|
|
22671
|
+
label: ariaLabel,
|
|
22647
22672
|
onChange: (e) => onChange(e.currentTarget.value),
|
|
22648
|
-
placeholder: "Enter phrase to search\u2026"
|
|
22673
|
+
placeholder: "Enter phrase to search\u2026",
|
|
22674
|
+
value
|
|
22649
22675
|
}
|
|
22650
22676
|
);
|
|
22651
22677
|
};
|
|
22652
|
-
var NumberRangeEditor = ({ onChange,
|
|
22653
|
-
const [minValue, setMinValue] = (0,
|
|
22654
|
-
const [maxValue, setMaxValue] = (0,
|
|
22655
|
-
const [error, setError] = (0,
|
|
22656
|
-
(0,
|
|
22678
|
+
var NumberRangeEditor = ({ onChange, disabled: disabled2, ariaLabel, value }) => {
|
|
22679
|
+
const [minValue, setMinValue] = (0, import_react141.useState)("");
|
|
22680
|
+
const [maxValue, setMaxValue] = (0, import_react141.useState)("");
|
|
22681
|
+
const [error, setError] = (0, import_react141.useState)("");
|
|
22682
|
+
(0, import_react141.useEffect)(() => {
|
|
22657
22683
|
if (!maxValue && !minValue) {
|
|
22658
22684
|
return;
|
|
22659
22685
|
}
|
|
@@ -22676,50 +22702,66 @@ var NumberRangeEditor = ({ onChange, ...props }) => {
|
|
|
22676
22702
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22677
22703
|
Input,
|
|
22678
22704
|
{
|
|
22679
|
-
|
|
22705
|
+
label: `${ariaLabel}-min`,
|
|
22680
22706
|
type: "number",
|
|
22681
22707
|
showLabel: false,
|
|
22682
22708
|
min: 0,
|
|
22683
22709
|
placeholder: "Low",
|
|
22684
22710
|
onChange: (e) => setMinValue(e.currentTarget.value),
|
|
22685
|
-
"aria-invalid": !error ? false : true
|
|
22711
|
+
"aria-invalid": !error ? false : true,
|
|
22712
|
+
disabled: disabled2,
|
|
22713
|
+
value: value ? value[0] : ""
|
|
22686
22714
|
}
|
|
22687
22715
|
),
|
|
22688
22716
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22689
22717
|
Input,
|
|
22690
22718
|
{
|
|
22691
|
-
...props,
|
|
22692
22719
|
type: "number",
|
|
22720
|
+
label: `${ariaLabel}-max`,
|
|
22693
22721
|
showLabel: false,
|
|
22694
22722
|
min: 0,
|
|
22695
22723
|
placeholder: "High",
|
|
22696
22724
|
onChange: (e) => setMaxValue(e.currentTarget.value),
|
|
22697
|
-
"aria-invalid": !error ? false : true
|
|
22725
|
+
"aria-invalid": !error ? false : true,
|
|
22726
|
+
disabled: disabled2,
|
|
22727
|
+
value: value ? value[1] : ""
|
|
22698
22728
|
}
|
|
22699
22729
|
),
|
|
22700
22730
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ErrorContainer, { errorMessage: error })
|
|
22701
22731
|
] });
|
|
22702
22732
|
};
|
|
22703
|
-
var NumberEditor = ({ ariaLabel, onChange }) => {
|
|
22733
|
+
var NumberEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
22704
22734
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22705
22735
|
Input,
|
|
22706
22736
|
{
|
|
22707
|
-
|
|
22737
|
+
label: ariaLabel,
|
|
22708
22738
|
type: "number",
|
|
22709
22739
|
showLabel: false,
|
|
22710
22740
|
min: 0,
|
|
22711
|
-
onChange: (e) => onChange(e.currentTarget.value)
|
|
22741
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
22742
|
+
disabled: disabled2,
|
|
22743
|
+
value
|
|
22712
22744
|
}
|
|
22713
22745
|
);
|
|
22714
22746
|
};
|
|
22715
|
-
var DateEditor = ({ onChange,
|
|
22716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22747
|
+
var DateEditor = ({ onChange, ariaLabel, disabled: disabled2, value }) => {
|
|
22748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22749
|
+
Input,
|
|
22750
|
+
{
|
|
22751
|
+
type: "date",
|
|
22752
|
+
label: ariaLabel,
|
|
22753
|
+
showLabel: false,
|
|
22754
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
22755
|
+
disabled: disabled2,
|
|
22756
|
+
value
|
|
22757
|
+
}
|
|
22758
|
+
);
|
|
22717
22759
|
};
|
|
22718
|
-
var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
22719
|
-
const [minDateValue, setMinDateValue] = (0,
|
|
22720
|
-
const [maxDateValue, setMaxDateValue] = (0,
|
|
22721
|
-
const [error, setError] = (0,
|
|
22722
|
-
(0,
|
|
22760
|
+
var DateRangeEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
22761
|
+
const [minDateValue, setMinDateValue] = (0, import_react141.useState)(value ? value[0] : "");
|
|
22762
|
+
const [maxDateValue, setMaxDateValue] = (0, import_react141.useState)(value ? value[1] : "");
|
|
22763
|
+
const [error, setError] = (0, import_react141.useState)("");
|
|
22764
|
+
(0, import_react141.useEffect)(() => {
|
|
22723
22765
|
if (!minDateValue || !maxDateValue) {
|
|
22724
22766
|
return;
|
|
22725
22767
|
}
|
|
@@ -22754,23 +22796,25 @@ var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
|
22754
22796
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22755
22797
|
Input,
|
|
22756
22798
|
{
|
|
22757
|
-
|
|
22799
|
+
label: `${ariaLabel}-min-date`,
|
|
22758
22800
|
type: "date",
|
|
22759
22801
|
showLabel: false,
|
|
22760
22802
|
value: minDateValue,
|
|
22761
22803
|
onChange: (e) => setMinDateValue(e.currentTarget.value),
|
|
22762
|
-
"aria-invalid": !error ? false : true
|
|
22804
|
+
"aria-invalid": !error ? false : true,
|
|
22805
|
+
disabled: disabled2
|
|
22763
22806
|
}
|
|
22764
22807
|
),
|
|
22765
22808
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22766
22809
|
Input,
|
|
22767
22810
|
{
|
|
22768
|
-
|
|
22811
|
+
label: `${ariaLabel}-max-date`,
|
|
22769
22812
|
type: "date",
|
|
22770
22813
|
showLabel: false,
|
|
22771
22814
|
value: maxDateValue,
|
|
22772
22815
|
onChange: (e) => setMaxDateValue(e.currentTarget.value),
|
|
22773
|
-
"aria-invalid": !error ? false : true
|
|
22816
|
+
"aria-invalid": !error ? false : true,
|
|
22817
|
+
disabled: disabled2
|
|
22774
22818
|
}
|
|
22775
22819
|
),
|
|
22776
22820
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ErrorContainer, { errorMessage: error })
|
|
@@ -22784,7 +22828,7 @@ var FilterEditorRenderer = ({ editorType, ...props }) => {
|
|
|
22784
22828
|
if (editorType === "empty") {
|
|
22785
22829
|
return null;
|
|
22786
22830
|
}
|
|
22787
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Editor, { ...props });
|
|
22831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Editor, { ...props, disabled: props.isDisabled });
|
|
22788
22832
|
};
|
|
22789
22833
|
var filterMapper = {
|
|
22790
22834
|
multiChoice: FilterMultiChoiceEditor,
|
|
@@ -22802,10 +22846,10 @@ var ErrorContainer = ({ errorMessage }) => {
|
|
|
22802
22846
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22803
22847
|
"div",
|
|
22804
22848
|
{
|
|
22805
|
-
css:
|
|
22806
|
-
|
|
22807
|
-
order: 6
|
|
22808
|
-
|
|
22849
|
+
css: {
|
|
22850
|
+
gridColumn: "span 6",
|
|
22851
|
+
order: 6
|
|
22852
|
+
},
|
|
22809
22853
|
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(FieldMessage, { errorMessage })
|
|
22810
22854
|
}
|
|
22811
22855
|
);
|
|
@@ -22818,7 +22862,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
22818
22862
|
buttonRow,
|
|
22819
22863
|
children
|
|
22820
22864
|
}) => {
|
|
22821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
|
|
22865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: SearchAndFilterOptionsContainer, "data-testid": "search-and-filter-options", children: [
|
|
22822
22866
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
22823
22867
|
buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22824
22868
|
HorizontalRhythm,
|
|
@@ -22901,11 +22945,35 @@ var FilterItem = ({
|
|
|
22901
22945
|
onValueChange
|
|
22902
22946
|
}) => {
|
|
22903
22947
|
var _a, _b;
|
|
22904
|
-
const { filters, handleDeleteFilter } = useSearchAndFilter();
|
|
22948
|
+
const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
|
|
22905
22949
|
const label = filters[index].field !== "" ? filters[index].field : "unknown filter field";
|
|
22906
22950
|
const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
|
|
22907
22951
|
const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
|
|
22908
22952
|
const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
|
|
22953
|
+
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue } = (0, import_react142.useMemo)(() => {
|
|
22954
|
+
var _a2, _b2;
|
|
22955
|
+
const currentSelectedFilter = filterOptions.find((item) => {
|
|
22956
|
+
var _a3;
|
|
22957
|
+
return (_a3 = item.options) == null ? void 0 : _a3.find((op) => op.value === filters[index].field);
|
|
22958
|
+
});
|
|
22959
|
+
const selectedFieldValue2 = (_b2 = (_a2 = currentSelectedFilter == null ? void 0 : currentSelectedFilter.options) == null ? void 0 : _a2.find((item) => {
|
|
22960
|
+
return filters[index].field === item.value;
|
|
22961
|
+
})) != null ? _b2 : [];
|
|
22962
|
+
const selectedOperatorValue2 = operatorOptions == null ? void 0 : operatorOptions.find((item) => {
|
|
22963
|
+
return filters[index].operator === item.value;
|
|
22964
|
+
});
|
|
22965
|
+
const selectedMetaValue2 = valueOptions.filter((item) => {
|
|
22966
|
+
if (Array.isArray(filters[index].value) && item.value) {
|
|
22967
|
+
return filters[index].value.includes(item.value);
|
|
22968
|
+
}
|
|
22969
|
+
return filters[index].value === item.value;
|
|
22970
|
+
});
|
|
22971
|
+
return {
|
|
22972
|
+
selectedFieldValue: selectedFieldValue2,
|
|
22973
|
+
selectedOperatorValue: selectedOperatorValue2 != null ? selectedOperatorValue2 : void 0,
|
|
22974
|
+
selectedMetaValue: selectedMetaValue2.length > 0 ? selectedMetaValue2 : filters[index].value
|
|
22975
|
+
};
|
|
22976
|
+
}, [filters, filterOptions, index, operatorOptions, valueOptions]);
|
|
22909
22977
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: ConditionalFilterRow, children: [
|
|
22910
22978
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { children: index === 0 ? "where" : "and" }),
|
|
22911
22979
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: ConditionalInputRow, children: [
|
|
@@ -22917,7 +22985,8 @@ var FilterItem = ({
|
|
|
22917
22985
|
onChange: (e) => {
|
|
22918
22986
|
var _a2;
|
|
22919
22987
|
onParamChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
22920
|
-
}
|
|
22988
|
+
},
|
|
22989
|
+
value: selectedFieldValue
|
|
22921
22990
|
}
|
|
22922
22991
|
),
|
|
22923
22992
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -22929,7 +22998,8 @@ var FilterItem = ({
|
|
|
22929
22998
|
var _a2;
|
|
22930
22999
|
return onOperatorChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
22931
23000
|
},
|
|
22932
|
-
isDisabled: !filters[index].field
|
|
23001
|
+
isDisabled: !filters[index].field,
|
|
23002
|
+
value: selectedOperatorValue
|
|
22933
23003
|
}
|
|
22934
23004
|
),
|
|
22935
23005
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -22938,7 +23008,9 @@ var FilterItem = ({
|
|
|
22938
23008
|
"aria-label": metaDataLabel,
|
|
22939
23009
|
editorType: metaDataPossibleOptions,
|
|
22940
23010
|
options: valueOptions,
|
|
22941
|
-
onChange: (e) => onValueChange(e != null ? e : "")
|
|
23011
|
+
onChange: (e) => onValueChange(e != null ? e : ""),
|
|
23012
|
+
isDisabled: !filters[index].operator,
|
|
23013
|
+
value: selectedMetaValue
|
|
22942
23014
|
}
|
|
22943
23015
|
),
|
|
22944
23016
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -23005,13 +23077,27 @@ var SearchAndFilter = ({
|
|
|
23005
23077
|
filters,
|
|
23006
23078
|
filterOptions,
|
|
23007
23079
|
filterControls = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(FilterControls, {}),
|
|
23080
|
+
viewSwitchControls,
|
|
23008
23081
|
children = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(FilterItems, {}),
|
|
23009
|
-
onChange
|
|
23082
|
+
onChange,
|
|
23083
|
+
onSearchChange
|
|
23010
23084
|
}) => {
|
|
23011
|
-
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
23012
|
-
|
|
23013
|
-
|
|
23014
|
-
|
|
23085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
23086
|
+
SearchAndFilterProvider,
|
|
23087
|
+
{
|
|
23088
|
+
filters,
|
|
23089
|
+
filterOptions,
|
|
23090
|
+
onChange,
|
|
23091
|
+
onSearchChange,
|
|
23092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
|
|
23093
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: SearchAndFilterOutterControlWrapper, children: [
|
|
23094
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: SearchAndFilterControlsWrapper, children: filterControls }),
|
|
23095
|
+
viewSwitchControls
|
|
23096
|
+
] }),
|
|
23097
|
+
children
|
|
23098
|
+
] })
|
|
23099
|
+
}
|
|
23100
|
+
);
|
|
23015
23101
|
};
|
|
23016
23102
|
|
|
23017
23103
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.116.0",
|
|
3
|
+
"version": "19.116.2-alpha.0+48367f95e7",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@storybook/react": "6.5.16",
|
|
24
24
|
"@types/react": "18.2.40",
|
|
25
25
|
"@types/react-dom": "18.2.17",
|
|
26
|
-
"@uniformdev/canvas": "^19.116.0",
|
|
27
|
-
"@uniformdev/richtext": "^19.116.0",
|
|
26
|
+
"@uniformdev/canvas": "^19.116.2-alpha.0+48367f95e7",
|
|
27
|
+
"@uniformdev/richtext": "^19.116.2-alpha.0+48367f95e7",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"hygen": "6.2.11",
|
|
30
30
|
"postcss": "8.4.32",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "48367f95e7d44220c5e8c479c023e90c20f0b6c9"
|
|
75
75
|
}
|