@bigbinary/neeto-filters-frontend 2.14.0 → 2.14.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 +16 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +18 -31
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -3373,8 +3373,8 @@ dayjs__default["default"].extend(timezone__default["default"]);
|
|
|
3373
3373
|
dayjs__default["default"].extend(weekday__default["default"]);
|
|
3374
3374
|
dayjs__default["default"].Ls.en.weekStart = 1;
|
|
3375
3375
|
|
|
3376
|
-
function ownKeys$
|
|
3377
|
-
function _objectSpread$
|
|
3376
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3377
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3378
3378
|
var groupByGroup = ramda.groupBy(function (_ref) {
|
|
3379
3379
|
var group = _ref.group;
|
|
3380
3380
|
return group || "individual";
|
|
@@ -3667,7 +3667,7 @@ var buildDatePayload = function buildDatePayload(value) {
|
|
|
3667
3667
|
var buildSingleDatePayload = function buildSingleDatePayload(filter) {
|
|
3668
3668
|
var value = filter.value;
|
|
3669
3669
|
var filterValue = Array.isArray(value) ? value.join(",") : value;
|
|
3670
|
-
return _objectSpread$
|
|
3670
|
+
return _objectSpread$5(_objectSpread$5({}, filter), {}, {
|
|
3671
3671
|
value: filterValue,
|
|
3672
3672
|
type: "date"
|
|
3673
3673
|
});
|
|
@@ -3675,7 +3675,7 @@ var buildSingleDatePayload = function buildSingleDatePayload(filter) {
|
|
|
3675
3675
|
var buildSingleTimePayload = function buildSingleTimePayload(filter) {
|
|
3676
3676
|
var value = filter.value;
|
|
3677
3677
|
var filterValue = Array.isArray(value) ? value.join(",") : value;
|
|
3678
|
-
return _objectSpread$
|
|
3678
|
+
return _objectSpread$5(_objectSpread$5({}, filter), {}, {
|
|
3679
3679
|
value: filterValue,
|
|
3680
3680
|
type: "time"
|
|
3681
3681
|
});
|
|
@@ -3957,7 +3957,7 @@ var buildFilterColumnsFromFields = function buildFilterColumnsFromFields(_ref21)
|
|
|
3957
3957
|
};
|
|
3958
3958
|
var getColumnsWithStandardizedType = function getColumnsWithStandardizedType(columns) {
|
|
3959
3959
|
return columns.map(function (column) {
|
|
3960
|
-
return _objectSpread$
|
|
3960
|
+
return _objectSpread$5(_objectSpread$5({}, column), {}, {
|
|
3961
3961
|
type: standardizeColumnType(column.type)
|
|
3962
3962
|
});
|
|
3963
3963
|
});
|
|
@@ -4178,6 +4178,8 @@ var QUERY_KEYS = {
|
|
|
4178
4178
|
};
|
|
4179
4179
|
var SEGMENTS_STALE_TIME = 900000; // 15 mins
|
|
4180
4180
|
|
|
4181
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4182
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4181
4183
|
var SEGMENTS_LIST = QUERY_KEYS.SEGMENTS_LIST;
|
|
4182
4184
|
var useFetchSegments = function useFetchSegments(_ref) {
|
|
4183
4185
|
var entity = _ref.entity,
|
|
@@ -4204,34 +4206,19 @@ var useShowSegment = function useShowSegment(id) {
|
|
|
4204
4206
|
}, options));
|
|
4205
4207
|
};
|
|
4206
4208
|
var useCreateSegment = function useCreateSegment(options) {
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
var _options$onSuccess;
|
|
4211
|
-
queryClient.invalidateQueries(SEGMENTS_LIST);
|
|
4212
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options);
|
|
4213
|
-
}
|
|
4214
|
-
});
|
|
4209
|
+
return reactUtils.useMutationWithInvalidation(segmentsApi.create, _objectSpread$4({
|
|
4210
|
+
keysToInvalidate: [SEGMENTS_LIST]
|
|
4211
|
+
}, options));
|
|
4215
4212
|
};
|
|
4216
4213
|
var useUpdateSegment = function useUpdateSegment(options) {
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
var _options$onSuccess2;
|
|
4221
|
-
queryClient.invalidateQueries(SEGMENTS_LIST);
|
|
4222
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options);
|
|
4223
|
-
}
|
|
4224
|
-
});
|
|
4214
|
+
return reactUtils.useMutationWithInvalidation(segmentsApi.update, _objectSpread$4({
|
|
4215
|
+
keysToInvalidate: [SEGMENTS_LIST]
|
|
4216
|
+
}, options));
|
|
4225
4217
|
};
|
|
4226
4218
|
var useDestroySegment = function useDestroySegment(options) {
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
var _options$onSuccess3;
|
|
4231
|
-
queryClient.invalidateQueries(SEGMENTS_LIST);
|
|
4232
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options);
|
|
4233
|
-
}
|
|
4234
|
-
});
|
|
4219
|
+
return reactUtils.useMutationWithInvalidation(segmentsApi.destroy, _objectSpread$4({
|
|
4220
|
+
keysToInvalidate: [SEGMENTS_LIST]
|
|
4221
|
+
}, options));
|
|
4235
4222
|
};
|
|
4236
4223
|
|
|
4237
4224
|
var Menu = neetoui.Dropdown.Menu,
|