@bigbinary/neeto-filters-frontend 2.14.3 → 2.14.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/index.js CHANGED
@@ -2,7 +2,7 @@ import React, { useState, useRef, useEffect, useTransition, useMemo } from 'reac
2
2
  import classnames from 'classnames';
3
3
  import { curryN, isNil, complement, curry, isEmpty, either, groupBy, anyPass, any, toLower, mergeLeft, identity, omit, mergeRight, toPairs, concat, pluck, has as has$1, equals, pick, modify, prop, isNotNil, append, last, not } from 'ramda';
4
4
  import { Tooltip, Typography, Dropdown as Dropdown$2, Button, Pane as Pane$1, Alert, Select, DatePicker, TimePicker, Input as Input$1, Accordion, Spinner } from '@bigbinary/neetoui';
5
- import { useTranslation, Trans, initReactI18next } from 'react-i18next';
5
+ import { useTranslation, Trans } from 'react-i18next';
6
6
  import { useHistory, useLocation } from 'react-router-dom';
7
7
  import { useHotKeys, useMutationWithInvalidation, useDebounce, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
8
8
  import { Close, Search, Check, MenuHorizontal, Down, Settings } from '@bigbinary/neeto-icons';
@@ -1240,13 +1240,13 @@ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) {
1240
1240
  var SEGMENTS_LIST = QUERY_KEYS.SEGMENTS_LIST;
1241
1241
  var useFetchSegments = function useFetchSegments(_ref) {
1242
1242
  var entity = _ref.entity,
1243
- _ref$search = _ref.search,
1244
- search = _ref$search === void 0 ? "" : _ref$search;
1243
+ _ref$searchTerm = _ref.searchTerm,
1244
+ searchTerm = _ref$searchTerm === void 0 ? "" : _ref$searchTerm;
1245
1245
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1246
- return useQuery([SEGMENTS_LIST, entity, search], function () {
1246
+ return useQuery([SEGMENTS_LIST, entity, searchTerm], function () {
1247
1247
  return segmentsApi.fetch({
1248
1248
  entity: entity,
1249
- search: search
1249
+ searchTerm: searchTerm
1250
1250
  });
1251
1251
  }, mergeRight({
1252
1252
  staleTime: SEGMENTS_STALE_TIME,
@@ -4870,7 +4870,8 @@ var Pane = function Pane(_ref) {
4870
4870
  size: size,
4871
4871
  onClose: handleClose
4872
4872
  }, otherProps), /*#__PURE__*/React.createElement(Slider.Header, {
4873
- className: "neeto-filters-pane-filter__header"
4873
+ className: "neeto-filters-pane-filter__header",
4874
+ "data-cy": "neeto-filters-pane-header"
4874
4875
  }, /*#__PURE__*/React.createElement(Typography, {
4875
4876
  style: "h2",
4876
4877
  weight: "semibold"
@@ -5146,7 +5147,7 @@ var ManagePane = function ManagePane(_ref) {
5146
5147
  var debouncedSearchTerm = useDebounce(searchTerm);
5147
5148
  var _useFetchSegments = useFetchSegments({
5148
5149
  entity: entity,
5149
- search: debouncedSearchTerm
5150
+ searchTerm: debouncedSearchTerm
5150
5151
  }),
5151
5152
  _useFetchSegments$dat = _useFetchSegments.data,
5152
5153
  segments = _useFetchSegments$dat === void 0 ? [] : _useFetchSegments$dat,
@@ -5202,7 +5203,7 @@ var MenuBlocks = function MenuBlocks(_ref) {
5202
5203
  segmentId = _Object$fromEntries.segmentId;
5203
5204
  var _useFetchSegments = useFetchSegments({
5204
5205
  entity: entity,
5205
- search: searchTerm
5206
+ searchTerm: searchTerm
5206
5207
  }),
5207
5208
  _useFetchSegments$dat = _useFetchSegments.data,
5208
5209
  segments = _useFetchSegments$dat === void 0 ? [] : _useFetchSegments$dat,
@@ -5339,87 +5340,5 @@ var Segments = function Segments(_ref) {
5339
5340
  };
5340
5341
  var index = /*#__PURE__*/React.memo(Segments);
5341
5342
 
5342
- var neetoFilters = {
5343
- common: {
5344
- clearFilters: "Clear filters",
5345
- columns: "Columns",
5346
- "delete": "Delete",
5347
- done: "Done",
5348
- filter: "Filter",
5349
- filters: "Filters",
5350
- no: "No",
5351
- proceed: "Proceed",
5352
- rename: "Rename",
5353
- segments: "Segments",
5354
- userCount: "{{count}} Users",
5355
- yes: "Yes",
5356
- update: "Update"
5357
- },
5358
- messages: {
5359
- enterResource: "Enter {{resource}}",
5360
- noResourcesFound: "No {{resources}} found",
5361
- searchResources: "Search {{resources}}",
5362
- selectResource: "Select {{resource}}",
5363
- selectOption: "Select an option"
5364
- },
5365
- rules: {
5366
- contains: "Contains",
5367
- doesNotContain: "Does not contain",
5368
- exactly: "Exactly",
5369
- notExactly: "Not exactly",
5370
- startsWith: "Starts with",
5371
- doesNotStartWith: "Does not start with",
5372
- endsWith: "Ends with",
5373
- doesNotEndWith: "Does not end with",
5374
- greaterThan: "Greater than",
5375
- lessThan: "Less than"
5376
- },
5377
- errors: {
5378
- cannotPassMultipleModels: "Cannot pass multiple Models except for keyword searching"
5379
- },
5380
- shortcuts: {
5381
- deleteBlock: "Delete block",
5382
- openFilterPane: "Open filter pane",
5383
- closePane: "Close pane"
5384
- },
5385
- segments: {
5386
- addNewSegment: "Add new segment",
5387
- deleteAlertMessage: "You are permanently deleting the segment <strong>{{entity}}</strong>. This can't be undone.",
5388
- deleteAlertTitle: "Delete segment?",
5389
- manageSegments: "Manage segments",
5390
- name: "Segment name",
5391
- noSegmentsFound: "No segments found",
5392
- saveSegment: "Save segment",
5393
- saveAsSegment: "Save as segment",
5394
- saveAsNewSegment: "Save as new segment",
5395
- searchSegments: "Search segments",
5396
- segmentName: "Segment name",
5397
- showLess: "See less",
5398
- showMoreNumbers: "See {{entity}} more",
5399
- updateSegment: "Update segment?",
5400
- updateSegmentMessage: "You are trying to update the current segment."
5401
- },
5402
- labels: {
5403
- keyword: "Keyword"
5404
- }
5405
- };
5406
- var en = {
5407
- neetoFilters: neetoFilters
5408
- };
5409
-
5410
- i18next.use(initReactI18next).init({
5411
- resources: {
5412
- en: {
5413
- translation: en
5414
- }
5415
- },
5416
- lng: "en",
5417
- fallbackLng: "en",
5418
- interpolation: {
5419
- escapeValue: false,
5420
- skipOnVariables: false
5421
- }
5422
- });
5423
-
5424
5343
  export { Bar, Filters, index as Segments, buildFilterColumnsFromFields, buildFiltersFromURL, buildSelectorsFromURL };
5425
5344
  //# sourceMappingURL=index.js.map