@bigbinary/neeto-filters-frontend 2.12.17 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +20 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3198,6 +3198,13 @@ var groupByGroup = groupBy(function (_ref) {
|
|
|
3198
3198
|
var group = _ref.group;
|
|
3199
3199
|
return group || "individual";
|
|
3200
3200
|
});
|
|
3201
|
+
var standardizeColumnType = function standardizeColumnType(kind) {
|
|
3202
|
+
// neeto-fields-nano supports `monetary` and `number` as type of fields, which will be acting as `decimal` in action.
|
|
3203
|
+
if (["custom.monetary", "custom.number"].includes(kind)) {
|
|
3204
|
+
return "custom.decimal";
|
|
3205
|
+
}
|
|
3206
|
+
return kind;
|
|
3207
|
+
};
|
|
3201
3208
|
var isBoolean = function isBoolean(type) {
|
|
3202
3209
|
return type === "boolean" || type === "custom.boolean";
|
|
3203
3210
|
};
|
|
@@ -3223,7 +3230,7 @@ var isText = function isText(type) {
|
|
|
3223
3230
|
return type === "text" || type === "custom.text";
|
|
3224
3231
|
};
|
|
3225
3232
|
var isDigit = function isDigit(type) {
|
|
3226
|
-
return
|
|
3233
|
+
return ["number", "decimal", "custom.decimal", "custom.number"].includes(type);
|
|
3227
3234
|
};
|
|
3228
3235
|
var isCustomDateRange = function isCustomDateRange(value) {
|
|
3229
3236
|
return !pluck("value", DATE_OPTIONS).includes(value);
|
|
@@ -3762,6 +3769,13 @@ var buildFilterColumnsFromFields = function buildFilterColumnsFromFields(fields)
|
|
|
3762
3769
|
return columns;
|
|
3763
3770
|
}, []);
|
|
3764
3771
|
};
|
|
3772
|
+
var getColumnsWithStandardizedType = function getColumnsWithStandardizedType(columns) {
|
|
3773
|
+
return columns.map(function (column) {
|
|
3774
|
+
return _objectSpread$3(_objectSpread$3({}, column), {}, {
|
|
3775
|
+
type: standardizeColumnType(column.type)
|
|
3776
|
+
});
|
|
3777
|
+
});
|
|
3778
|
+
};
|
|
3765
3779
|
|
|
3766
3780
|
var buildCustomDateValue = function buildCustomDateValue(value) {
|
|
3767
3781
|
var isBeforeOrAfter = Math.abs(dayjs(value[1]).diff(dayjs(value[0]), "year")) >= 90;
|
|
@@ -7555,6 +7569,9 @@ var Pane = function Pane(_ref) {
|
|
|
7555
7569
|
var history = useHistory();
|
|
7556
7570
|
var _useTranslation = useTranslation(),
|
|
7557
7571
|
t = _useTranslation.t;
|
|
7572
|
+
columns = useMemo(function () {
|
|
7573
|
+
return getColumnsWithStandardizedType(columns);
|
|
7574
|
+
}, [columns]);
|
|
7558
7575
|
var _buildFilteredColumns = buildFilteredColumns({
|
|
7559
7576
|
searchTerm: searchTerm,
|
|
7560
7577
|
columns: columns
|
|
@@ -7639,9 +7656,9 @@ var Pane = function Pane(_ref) {
|
|
|
7639
7656
|
autoFocus: column.key === isOpen,
|
|
7640
7657
|
column: column,
|
|
7641
7658
|
filters: filters,
|
|
7659
|
+
onClose: onClose,
|
|
7642
7660
|
key: column.key,
|
|
7643
|
-
onChange: handleChange
|
|
7644
|
-
onClose: onClose
|
|
7661
|
+
onChange: handleChange
|
|
7645
7662
|
});
|
|
7646
7663
|
}), isPresent(groupedColumns) && /*#__PURE__*/React.createElement(Accordion, {
|
|
7647
7664
|
defaultActiveKey: groupedColumns.findIndex(function (_ref4) {
|