@mailstep/design-system 0.6.14 → 0.6.15
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/package.json
CHANGED
|
@@ -32,11 +32,16 @@ var ControlButtons = function (_a) {
|
|
|
32
32
|
var quickFilterValues = (_b = filter === null || filter === void 0 ? void 0 : filter[quickFilter]) === null || _b === void 0 ? void 0 : _b.value;
|
|
33
33
|
var searchedColumnsDefinitions = (displayColumnsDefinitions === null || displayColumnsDefinitions === void 0 ? void 0 : displayColumnsDefinitions.find(function (item) { return item.name === quickFilter; })) || null;
|
|
34
34
|
var filterType = createFilterType(searchedColumnsDefinitions || {});
|
|
35
|
-
var filtersDefaultComparator = (_c = filters === null || filters === void 0 ? void 0 : filters[filterType].defaultExtraProps) === null || _c === void 0 ? void 0 : _c.defaultComparator;
|
|
35
|
+
var filtersDefaultComparator = ((_c = filters === null || filters === void 0 ? void 0 : filters[filterType].defaultExtraProps) === null || _c === void 0 ? void 0 : _c.defaultComparator) || 'eq';
|
|
36
36
|
var searchComparator = (quickFilterValues && quickFilterValues.comparator) || filtersDefaultComparator;
|
|
37
37
|
var filtersOn = !!filter && Object.values(filter).some(function (item) { var _a; return ((_a = item.value) === null || _a === void 0 ? void 0 : _a.value) !== '' && item.value !== ''; });
|
|
38
38
|
useEffect(function () {
|
|
39
|
-
|
|
39
|
+
if (quickFilterValues) {
|
|
40
|
+
setSearchedValue(quickFilterValues.value);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
setSearchedValue('');
|
|
44
|
+
}
|
|
40
45
|
}, [quickFilterValues, quickFilter]);
|
|
41
46
|
var onChangeInputValue = useCallback(function (e) {
|
|
42
47
|
setSearchedValue(e.target.value);
|
package/ui/index.es.js
CHANGED
|
@@ -50541,12 +50541,12 @@ const ACe = ({
|
|
|
50541
50541
|
addFilter: c = xCe
|
|
50542
50542
|
} = r, {
|
|
50543
50543
|
filter: f
|
|
50544
|
-
} = n, [p, h] = Ze(""), v = KF(c), m = (L = f == null ? void 0 : f[i]) == null ? void 0 : L.value, w = (o == null ? void 0 : o.find((V) => V.name === i)) || null, E = QC(w || {}), S = (B = l == null ? void 0 : l[E].defaultExtraProps) == null ? void 0 : B.defaultComparator, C = m && m.comparator || S, I = !!f && Object.values(f).some((V) => {
|
|
50544
|
+
} = n, [p, h] = Ze(""), v = KF(c), m = (L = f == null ? void 0 : f[i]) == null ? void 0 : L.value, w = (o == null ? void 0 : o.find((V) => V.name === i)) || null, E = QC(w || {}), S = ((B = l == null ? void 0 : l[E].defaultExtraProps) == null ? void 0 : B.defaultComparator) || "eq", C = m && m.comparator || S, I = !!f && Object.values(f).some((V) => {
|
|
50545
50545
|
var F;
|
|
50546
50546
|
return ((F = V.value) == null ? void 0 : F.value) !== "" && V.value !== "";
|
|
50547
50547
|
});
|
|
50548
50548
|
xt(() => {
|
|
50549
|
-
m
|
|
50549
|
+
h(m ? m.value : "");
|
|
50550
50550
|
}, [m, i]);
|
|
50551
50551
|
const T = ke((V) => {
|
|
50552
50552
|
h(V.target.value);
|
package/ui/index.umd.js
CHANGED
|
@@ -3692,7 +3692,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3692
3692
|
display: flex;
|
|
3693
3693
|
position: sticky;
|
|
3694
3694
|
left: 20px;
|
|
3695
|
-
`,yxe=(...e)=>null,wxe=({extraControlButtons:e,eshopSelect:t,gridActions:r,gridSelectors:n,quickFilter:i="",displayColumnsDefinitions:o,filters:l})=>{var B,F,W,G,Z,R;const{resetFilters:u,addFilter:c=yxe}=r,{filter:f}=n,[h,p]=k.useState(""),v=X8(c),m=(B=f==null?void 0:f[i])==null?void 0:B.value,w=(o==null?void 0:o.find(j=>j.name===i))||null,E=Z8(w||{}),S=(F=l==null?void 0:l[E].defaultExtraProps)==null?void 0:F.defaultComparator,C=m&&m.comparator||S,I=!!f&&Object.values(f).some(j=>{var V;return((V=j.value)==null?void 0:V.value)!==""&&j.value!==""});k.useEffect(()=>{
|
|
3695
|
+
`,yxe=(...e)=>null,wxe=({extraControlButtons:e,eshopSelect:t,gridActions:r,gridSelectors:n,quickFilter:i="",displayColumnsDefinitions:o,filters:l})=>{var B,F,W,G,Z,R;const{resetFilters:u,addFilter:c=yxe}=r,{filter:f}=n,[h,p]=k.useState(""),v=X8(c),m=(B=f==null?void 0:f[i])==null?void 0:B.value,w=(o==null?void 0:o.find(j=>j.name===i))||null,E=Z8(w||{}),S=((F=l==null?void 0:l[E].defaultExtraProps)==null?void 0:F.defaultComparator)||"eq",C=m&&m.comparator||S,I=!!f&&Object.values(f).some(j=>{var V;return((V=j.value)==null?void 0:V.value)!==""&&j.value!==""});k.useEffect(()=>{p(m?m.value:"")},[m,i]);const P=k.useCallback(j=>{p(j.target.value);const V={comparator:C,value:j.target.value};w&&v(V,w)},[p,C,v,w]),T=k.useCallback(()=>{u==null||u(),p==null||p("")},[]),D=w&&Lj.isObject(w==null?void 0:w.title)&&"props"in(w==null?void 0:w.title)&&((W=w.title)==null?void 0:W.props)&&ht._({id:(Z=(G=w.title)==null?void 0:G.props)==null?void 0:Z.id,message:(R=w.title)==null?void 0:R.props.message});return b.jsxs(bxe,{children:[i&&b.jsx(mxe,{searchedValue:h,placeholderText:ht._({id:"controlButtons.searchPlaceholder",message:`Search ${D} ...`,values:{translatedValue:D}}),onChange:P}),t&&b.jsx(ut.div,{children:b.jsx(_j,{extraControlButtons:t,targetPosition:kg.TopRight})}),b.jsx(_j,{extraControlButtons:e,targetPosition:kg.TopLeft}),b.jsx(ut.div,{children:I&&b.jsx(zn,{type:"button",onClick:T,variant:"default",appearance:"secondary","data-cy":"resetFiltersBtn",children:b.jsx(rn,{id:"dataGrid.buttonClearSettings",message:"Reset filters"})})})]})},Axe=oe.div`
|
|
3696
3696
|
position: relative;
|
|
3697
3697
|
width: fit-content;
|
|
3698
3698
|
`,Cxe=oe(f9)`
|