@bigbinary/neeto-filters-frontend 3.0.3 → 3.0.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/README.md +216 -43
- package/dist/index.cjs.js +213 -1866
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +146 -1795
- package/dist/index.js.map +1 -1
- package/package.json +132 -96
- /package/{src → app/javascript/src}/translations/en.json +0 -0
- /package/{src → app/javascript/src}/translations/index.js +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -4,24 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var classnames = require('classnames');
|
|
7
|
-
var
|
|
7
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
8
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
9
9
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
10
10
|
var neetoui = require('@bigbinary/neetoui');
|
|
11
|
+
var ramda = require('ramda');
|
|
11
12
|
var reactI18next = require('react-i18next');
|
|
12
13
|
var reactRouterDom = require('react-router-dom');
|
|
13
14
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
14
15
|
var i18next = require('i18next');
|
|
15
|
-
var dayjs = require('dayjs');
|
|
16
16
|
var yup = require('yup');
|
|
17
|
-
var timezone = require('dayjs/plugin/timezone');
|
|
18
|
-
var utc = require('dayjs/plugin/utc');
|
|
19
|
-
var weekday = require('dayjs/plugin/weekday');
|
|
20
17
|
var formik = require('@bigbinary/neetoui/formik');
|
|
21
18
|
var reactQuery = require('react-query');
|
|
22
19
|
var axios = require('axios');
|
|
23
20
|
var ReactDOM = require('react-dom');
|
|
24
21
|
var MenuBar = require('@bigbinary/neeto-molecules/MenuBar');
|
|
22
|
+
var InlineInput = require('@bigbinary/neeto-molecules/InlineInput');
|
|
25
23
|
|
|
26
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
25
|
|
|
@@ -46,36 +44,32 @@ function _interopNamespace(e) {
|
|
|
46
44
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
47
45
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
48
46
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
49
|
-
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
50
47
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
51
|
-
var timezone__default = /*#__PURE__*/_interopDefaultLegacy(timezone);
|
|
52
|
-
var utc__default = /*#__PURE__*/_interopDefaultLegacy(utc);
|
|
53
|
-
var weekday__default = /*#__PURE__*/_interopDefaultLegacy(weekday);
|
|
54
48
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
55
49
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
56
50
|
var MenuBar__default = /*#__PURE__*/_interopDefaultLegacy(MenuBar);
|
|
57
51
|
|
|
58
|
-
function _arrayLikeToArray
|
|
52
|
+
function _arrayLikeToArray(arr, len) {
|
|
59
53
|
if (len == null || len > arr.length) len = arr.length;
|
|
60
54
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
61
55
|
return arr2;
|
|
62
56
|
}
|
|
63
57
|
|
|
64
58
|
function _arrayWithoutHoles(arr) {
|
|
65
|
-
if (Array.isArray(arr)) return _arrayLikeToArray
|
|
59
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
function _iterableToArray(iter) {
|
|
69
63
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
70
64
|
}
|
|
71
65
|
|
|
72
|
-
function _unsupportedIterableToArray
|
|
66
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
73
67
|
if (!o) return;
|
|
74
|
-
if (typeof o === "string") return _arrayLikeToArray
|
|
68
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
75
69
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
76
70
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
77
71
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
78
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray
|
|
72
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
79
73
|
}
|
|
80
74
|
|
|
81
75
|
function _nonIterableSpread() {
|
|
@@ -83,25 +77,25 @@ function _nonIterableSpread() {
|
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
function _toConsumableArray(arr) {
|
|
86
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray
|
|
80
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
87
81
|
}
|
|
88
82
|
|
|
89
|
-
function _typeof
|
|
83
|
+
function _typeof(obj) {
|
|
90
84
|
"@babel/helpers - typeof";
|
|
91
85
|
|
|
92
|
-
return _typeof
|
|
86
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
93
87
|
return typeof obj;
|
|
94
88
|
} : function (obj) {
|
|
95
89
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
96
|
-
}, _typeof
|
|
90
|
+
}, _typeof(obj);
|
|
97
91
|
}
|
|
98
92
|
|
|
99
93
|
function _toPrimitive(input, hint) {
|
|
100
|
-
if (_typeof
|
|
94
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
101
95
|
var prim = input[Symbol.toPrimitive];
|
|
102
96
|
if (prim !== undefined) {
|
|
103
97
|
var res = prim.call(input, hint || "default");
|
|
104
|
-
if (_typeof
|
|
98
|
+
if (_typeof(res) !== "object") return res;
|
|
105
99
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
106
100
|
}
|
|
107
101
|
return (hint === "string" ? String : Number)(input);
|
|
@@ -109,7 +103,7 @@ function _toPrimitive(input, hint) {
|
|
|
109
103
|
|
|
110
104
|
function _toPropertyKey(arg) {
|
|
111
105
|
var key = _toPrimitive(arg, "string");
|
|
112
|
-
return _typeof
|
|
106
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
113
107
|
}
|
|
114
108
|
|
|
115
109
|
function _defineProperty(obj, key, value) {
|
|
@@ -127,153 +121,6 @@ function _defineProperty(obj, key, value) {
|
|
|
127
121
|
return obj;
|
|
128
122
|
}
|
|
129
123
|
|
|
130
|
-
function _arrayWithHoles$1(arr) {
|
|
131
|
-
if (Array.isArray(arr)) return arr;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _iterableToArrayLimit$1(arr, i) {
|
|
135
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
136
|
-
if (null != _i) {
|
|
137
|
-
var _s,
|
|
138
|
-
_e,
|
|
139
|
-
_x,
|
|
140
|
-
_r,
|
|
141
|
-
_arr = [],
|
|
142
|
-
_n = !0,
|
|
143
|
-
_d = !1;
|
|
144
|
-
try {
|
|
145
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
146
|
-
if (Object(_i) !== _i) return;
|
|
147
|
-
_n = !1;
|
|
148
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
149
|
-
} catch (err) {
|
|
150
|
-
_d = !0, _e = err;
|
|
151
|
-
} finally {
|
|
152
|
-
try {
|
|
153
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
154
|
-
} finally {
|
|
155
|
-
if (_d) throw _e;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return _arr;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function _arrayLikeToArray(arr, len) {
|
|
163
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
164
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
165
|
-
return arr2;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
169
|
-
if (!o) return;
|
|
170
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
171
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
172
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
173
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
174
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function _nonIterableRest$1() {
|
|
178
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function _slicedToArray$1(arr, i) {
|
|
182
|
-
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest$1();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function _typeof(obj) {
|
|
186
|
-
"@babel/helpers - typeof";
|
|
187
|
-
|
|
188
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
189
|
-
return typeof obj;
|
|
190
|
-
} : function (obj) {
|
|
191
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
192
|
-
}, _typeof(obj);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @template {Function} T
|
|
197
|
-
* @param {T} func
|
|
198
|
-
* @returns {T}
|
|
199
|
-
*/
|
|
200
|
-
var nullSafe = function nullSafe(func) {
|
|
201
|
-
return (
|
|
202
|
-
// @ts-ignore
|
|
203
|
-
ramda.curryN(func.length, function () {
|
|
204
|
-
var _ref;
|
|
205
|
-
var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
206
|
-
return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
|
|
207
|
-
})
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
var noop$1 = function noop() {};
|
|
211
|
-
var toLabelAndValue = function toLabelAndValue(string) {
|
|
212
|
-
return {
|
|
213
|
-
label: string,
|
|
214
|
-
value: string
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
var isNotEmpty = /*#__PURE__*/ramda.complement(ramda.isEmpty);
|
|
218
|
-
var isNotPresent = /*#__PURE__*/ramda.either(ramda.isNil, ramda.isEmpty);
|
|
219
|
-
var isPresent = /*#__PURE__*/ramda.complement(isNotPresent);
|
|
220
|
-
|
|
221
|
-
var humanize = function humanize(string) {
|
|
222
|
-
string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
|
|
223
|
-
string = string.charAt(0).toUpperCase() + string.slice(1);
|
|
224
|
-
return string;
|
|
225
|
-
};
|
|
226
|
-
var capitalize = function capitalize(string) {
|
|
227
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
var matchesImpl = function matchesImpl(pattern, object) {
|
|
231
|
-
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
232
|
-
if (object === pattern) return true;
|
|
233
|
-
if (typeof pattern === "function" && pattern(object, __parent)) return true;
|
|
234
|
-
if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
|
|
235
|
-
if (_typeof(pattern) !== "object") return false;
|
|
236
|
-
return Object.entries(pattern).every(function (_ref) {
|
|
237
|
-
var _ref2 = _slicedToArray$1(_ref, 2),
|
|
238
|
-
key = _ref2[0],
|
|
239
|
-
value = _ref2[1];
|
|
240
|
-
return matchesImpl(value, object[key], __parent);
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
var matches = /*#__PURE__*/ramda.curry(function (pattern, object) {
|
|
244
|
-
return matchesImpl(pattern, object);
|
|
245
|
-
});
|
|
246
|
-
var filterNonNull = function filterNonNull(object) {
|
|
247
|
-
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
248
|
-
var _ref6 = _slicedToArray$1(_ref5, 2),
|
|
249
|
-
v = _ref6[1];
|
|
250
|
-
return !ramda.isNil(v);
|
|
251
|
-
}).map(function (_ref7) {
|
|
252
|
-
var _ref8 = _slicedToArray$1(_ref7, 2),
|
|
253
|
-
k = _ref8[0],
|
|
254
|
-
v = _ref8[1];
|
|
255
|
-
return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
256
|
-
}));
|
|
257
|
-
};
|
|
258
|
-
nullSafe(filterNonNull);
|
|
259
|
-
var findBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
260
|
-
return array.find(matches(pattern));
|
|
261
|
-
});
|
|
262
|
-
var removeBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
263
|
-
return array.filter(ramda.complement(matches(pattern)));
|
|
264
|
-
});
|
|
265
|
-
var replaceBy = /*#__PURE__*/ramda.curry(function (pattern, newItem, array) {
|
|
266
|
-
return array.map(function (item) {
|
|
267
|
-
return matches(pattern, item) ? newItem : item;
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
var existsBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
271
|
-
return array.some(matches(pattern));
|
|
272
|
-
});
|
|
273
|
-
var filterBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
274
|
-
return array.filter(matches(pattern));
|
|
275
|
-
});
|
|
276
|
-
|
|
277
124
|
var SHORTCUTS = {
|
|
278
125
|
closePane: {
|
|
279
126
|
sequence: "escape",
|
|
@@ -372,6 +219,23 @@ var DATE_RULES = {
|
|
|
372
219
|
"all-time": "before"
|
|
373
220
|
};
|
|
374
221
|
|
|
222
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
223
|
+
|
|
224
|
+
function getDefaultExportFromCjs (x) {
|
|
225
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
var dayjs_min = {exports: {}};
|
|
229
|
+
|
|
230
|
+
dayjs_min.exports;
|
|
231
|
+
|
|
232
|
+
(function (module, exports) {
|
|
233
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof b},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,f=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=O.p(f),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return O.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return a+1;case"MM":return O.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return O.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return O.s(u,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return O.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:O.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),_=b.prototype;return w.prototype=_,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,b,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
|
|
234
|
+
} (dayjs_min, dayjs_min.exports));
|
|
235
|
+
|
|
236
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
237
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
238
|
+
|
|
375
239
|
var NUMBER_RULES = [{
|
|
376
240
|
label: i18next.t("neetoFilters.rules.is"),
|
|
377
241
|
value: "is"
|
|
@@ -455,13 +319,46 @@ function _nonIterableRest() {
|
|
|
455
319
|
}
|
|
456
320
|
|
|
457
321
|
function _slicedToArray(arr, i) {
|
|
458
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray
|
|
322
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
459
323
|
}
|
|
460
324
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
325
|
+
var timezone$1 = {exports: {}};
|
|
326
|
+
|
|
327
|
+
timezone$1.exports;
|
|
328
|
+
|
|
329
|
+
(function (module, exports) {
|
|
330
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10));}var d=r[3],l=24===d?0:d,v=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",h=+e;return (o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute");}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return "timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return [i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t;};}}));
|
|
331
|
+
} (timezone$1, timezone$1.exports));
|
|
332
|
+
|
|
333
|
+
var timezoneExports = timezone$1.exports;
|
|
334
|
+
var timezone = /*@__PURE__*/getDefaultExportFromCjs(timezoneExports);
|
|
335
|
+
|
|
336
|
+
var utc$1 = {exports: {}};
|
|
337
|
+
|
|
338
|
+
utc$1.exports;
|
|
339
|
+
|
|
340
|
+
(function (module, exports) {
|
|
341
|
+
!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
342
|
+
} (utc$1, utc$1.exports));
|
|
343
|
+
|
|
344
|
+
var utcExports = utc$1.exports;
|
|
345
|
+
var utc = /*@__PURE__*/getDefaultExportFromCjs(utcExports);
|
|
346
|
+
|
|
347
|
+
var weekday$1 = {exports: {}};
|
|
348
|
+
|
|
349
|
+
weekday$1.exports;
|
|
350
|
+
|
|
351
|
+
(function (module, exports) {
|
|
352
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i<t?i+7:i)-t;return this.$utils().u(e)?n:this.subtract(n,"day").add(e,"day")};}}));
|
|
353
|
+
} (weekday$1, weekday$1.exports));
|
|
354
|
+
|
|
355
|
+
var weekdayExports = weekday$1.exports;
|
|
356
|
+
var weekday = /*@__PURE__*/getDefaultExportFromCjs(weekdayExports);
|
|
357
|
+
|
|
358
|
+
dayjs.extend(utc);
|
|
359
|
+
dayjs.extend(timezone);
|
|
360
|
+
dayjs.extend(weekday);
|
|
361
|
+
dayjs.Ls.en.weekStart = 1;
|
|
465
362
|
|
|
466
363
|
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; }
|
|
467
364
|
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; }
|
|
@@ -515,19 +412,19 @@ var isMultiModelFilter = function isMultiModelFilter(_ref2) {
|
|
|
515
412
|
return model.split(",").length > 1;
|
|
516
413
|
};
|
|
517
414
|
var getTimezone = function getTimezone() {
|
|
518
|
-
return
|
|
415
|
+
return dayjs.tz.guess();
|
|
519
416
|
};
|
|
520
417
|
var getLabelFromBool = function getLabelFromBool(_ref3) {
|
|
521
418
|
var value = _ref3.value,
|
|
522
419
|
values = _ref3.values;
|
|
523
|
-
return findBy({
|
|
420
|
+
return neetoCist.findBy({
|
|
524
421
|
value: value
|
|
525
422
|
}, ramda.either(ramda.isEmpty, ramda.isNil)(values) ? DEFAULT_BOOLEAN_OPTIONS : values).label;
|
|
526
423
|
};
|
|
527
424
|
var getBoolFromLabel = function getBoolFromLabel(_ref4) {
|
|
528
425
|
var label = _ref4.label,
|
|
529
426
|
values = _ref4.values;
|
|
530
|
-
return findBy({
|
|
427
|
+
return neetoCist.findBy({
|
|
531
428
|
label: label
|
|
532
429
|
}, ramda.either(ramda.isEmpty, ramda.isNil)(values) ? DEFAULT_BOOLEAN_OPTIONS : values).value;
|
|
533
430
|
};
|
|
@@ -537,10 +434,10 @@ var buildRuleOptions = function buildRuleOptions(_ref5) {
|
|
|
537
434
|
return [];
|
|
538
435
|
};
|
|
539
436
|
var getDefaultRuleValue = function getDefaultRuleValue(defaultType) {
|
|
540
|
-
var _buildRuleOptions
|
|
437
|
+
var _buildRuleOptions;
|
|
541
438
|
return ((_buildRuleOptions = buildRuleOptions({
|
|
542
439
|
defaultType: defaultType
|
|
543
|
-
})) === null || _buildRuleOptions === void 0
|
|
440
|
+
})) === null || _buildRuleOptions === void 0 || (_buildRuleOptions = _buildRuleOptions[0]) === null || _buildRuleOptions === void 0 ? void 0 : _buildRuleOptions.value) || "";
|
|
544
441
|
};
|
|
545
442
|
var isUndefinedOrEmpty = ramda.anyPass([ramda.isNil, ramda.isEmpty, ramda.any(ramda.isNil)]);
|
|
546
443
|
|
|
@@ -603,7 +500,7 @@ var buildUpdatedFilter = function buildUpdatedFilter(_ref8) {
|
|
|
603
500
|
var _column$preprocessor;
|
|
604
501
|
return ramda.mergeLeft(filter, {
|
|
605
502
|
rule: rule,
|
|
606
|
-
value: (column === null || column === void 0
|
|
503
|
+
value: (column === null || column === void 0 || (_column$preprocessor = column.preprocessor) === null || _column$preprocessor === void 0 ? void 0 : _column$preprocessor.call(column, value)) || value
|
|
607
504
|
});
|
|
608
505
|
} else if (isSingleTime(defaultType)) {
|
|
609
506
|
return ramda.mergeLeft(filter, {
|
|
@@ -631,6 +528,7 @@ var buildFiltersFromSearchParams = function buildFiltersFromSearchParams(columns
|
|
|
631
528
|
} else if (ramda.isNil(value) || value === "" || column.key === "keyword") {
|
|
632
529
|
return null;
|
|
633
530
|
} else if (column.key === "search_term") {
|
|
531
|
+
if (ramda.isNil(column.node)) return null;
|
|
634
532
|
return ramda.mergeLeft({
|
|
635
533
|
value: value,
|
|
636
534
|
type: "text",
|
|
@@ -693,9 +591,9 @@ var buildFiltersFromSearchParams = function buildFiltersFromSearchParams(columns
|
|
|
693
591
|
};
|
|
694
592
|
var buildTimePayload = function buildTimePayload(value) {
|
|
695
593
|
var timeValue = {
|
|
696
|
-
"this-hour": [
|
|
697
|
-
"last-hour": [
|
|
698
|
-
"next-hour": [
|
|
594
|
+
"this-hour": [dayjs().startOf("hour"), dayjs().endOf("hour")],
|
|
595
|
+
"last-hour": [dayjs().add(-1, "hour").startOf("hour"), dayjs().add(-1, "hour").endOf("hour")],
|
|
596
|
+
"next-hour": [dayjs().add(1, "hour").startOf("hour"), dayjs().add(1, "hour").endOf("hour")]
|
|
699
597
|
};
|
|
700
598
|
if (isCustomTimeRange(value)) {
|
|
701
599
|
return {
|
|
@@ -712,28 +610,28 @@ var buildTimePayload = function buildTimePayload(value) {
|
|
|
712
610
|
};
|
|
713
611
|
var buildDatePayload = function buildDatePayload(value) {
|
|
714
612
|
var dateValue = {
|
|
715
|
-
"this-week": [
|
|
716
|
-
"last-week": [
|
|
717
|
-
"this-month": [
|
|
718
|
-
"last-month": [
|
|
719
|
-
"this-year": [
|
|
720
|
-
"last-year": [
|
|
613
|
+
"this-week": [dayjs().startOf("week"), dayjs().endOf("week")],
|
|
614
|
+
"last-week": [dayjs().add(-1, "week").startOf("week"), dayjs().add(-1, "week").endOf("week")],
|
|
615
|
+
"this-month": [dayjs().startOf("month"), dayjs().endOf("month")],
|
|
616
|
+
"last-month": [dayjs().add(-1, "month").startOf("month"), dayjs().add(-1, "month").endOf("month")],
|
|
617
|
+
"this-year": [dayjs().startOf("year"), dayjs().endOf("year")],
|
|
618
|
+
"last-year": [dayjs().add(-1, "year").startOf("year"), dayjs().add(-1, "year").endOf("year")]
|
|
721
619
|
};
|
|
722
620
|
if (value === "today") {
|
|
723
621
|
return {
|
|
724
|
-
value:
|
|
622
|
+
value: dayjs().toISOString(),
|
|
725
623
|
rule: "on",
|
|
726
624
|
timezone: getTimezone()
|
|
727
625
|
};
|
|
728
626
|
} else if (value === "yesterday") {
|
|
729
627
|
return {
|
|
730
|
-
value:
|
|
628
|
+
value: dayjs().add(-1, "day").toISOString(),
|
|
731
629
|
rule: "on",
|
|
732
630
|
timezone: getTimezone()
|
|
733
631
|
};
|
|
734
632
|
} else if (value === "all-time") {
|
|
735
633
|
return {
|
|
736
|
-
value:
|
|
634
|
+
value: dayjs().toISOString(),
|
|
737
635
|
rule: "before",
|
|
738
636
|
timezone: getTimezone(),
|
|
739
637
|
type: "datetime"
|
|
@@ -783,7 +681,7 @@ var buildMultiOptionPayload = function buildMultiOptionPayload(values) {
|
|
|
783
681
|
}).join("|");
|
|
784
682
|
};
|
|
785
683
|
var buildFiltersPayload = function buildFiltersPayload(filters) {
|
|
786
|
-
var payload = removeBy({
|
|
684
|
+
var payload = neetoCist.removeBy({
|
|
787
685
|
value: ""
|
|
788
686
|
}, filters).map(function (filter) {
|
|
789
687
|
if (filter.key === "search_term" && isMultiModelFilter(filter)) {
|
|
@@ -817,7 +715,7 @@ var buildFiltersPayload = function buildFiltersPayload(filters) {
|
|
|
817
715
|
};
|
|
818
716
|
var buildSegmentsPayload = function buildSegmentsPayload(filters) {
|
|
819
717
|
var childrenKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
820
|
-
var payload = removeBy({
|
|
718
|
+
var payload = neetoCist.removeBy({
|
|
821
719
|
value: ""
|
|
822
720
|
}, filters).map(function (filter) {
|
|
823
721
|
if (filter.key === "search_term") {
|
|
@@ -877,7 +775,7 @@ var buildSelectorsFromURL = function buildSelectorsFromURL(columns) {
|
|
|
877
775
|
};
|
|
878
776
|
var compareFilters = function compareFilters(oldFilters, newFilters) {
|
|
879
777
|
var formatFilters = function formatFilters(filters) {
|
|
880
|
-
return removeBy({
|
|
778
|
+
return neetoCist.removeBy({
|
|
881
779
|
value: ""
|
|
882
780
|
}, filters).map(ramda.pick(["key", "rule", "value"]));
|
|
883
781
|
};
|
|
@@ -907,7 +805,7 @@ var buildFilteredColumns = function buildFilteredColumns(_ref11) {
|
|
|
907
805
|
};
|
|
908
806
|
var buildDefaultFilters = function buildDefaultFilters(columns, filters) {
|
|
909
807
|
return columns.filter(function (column) {
|
|
910
|
-
return !isUndefinedOrEmpty(column.defaultValue) && !findBy({
|
|
808
|
+
return !isUndefinedOrEmpty(column.defaultValue) && !neetoCist.findBy({
|
|
911
809
|
key: column.key
|
|
912
810
|
}, filters);
|
|
913
811
|
}).map(function (column) {
|
|
@@ -940,7 +838,7 @@ var createUrlParamString = function createUrlParamString(_ref15) {
|
|
|
940
838
|
} else if (isBoolean(defaultType)) {
|
|
941
839
|
return getLabelFromBool({
|
|
942
840
|
value: value,
|
|
943
|
-
values: findBy({
|
|
841
|
+
values: neetoCist.findBy({
|
|
944
842
|
key: key
|
|
945
843
|
}, columns).values
|
|
946
844
|
});
|
|
@@ -955,6 +853,9 @@ var buildUrlFromFilters = function buildUrlFromFilters(_ref16) {
|
|
|
955
853
|
_ref16$childrenKeys = _ref16.childrenKeys,
|
|
956
854
|
childrenKeys = _ref16$childrenKeys === void 0 ? [] : _ref16$childrenKeys;
|
|
957
855
|
var searchParams = utils.getQueryParams();
|
|
856
|
+
var isKeywordFilterPresent = neetoCist.findBy({
|
|
857
|
+
key: "search_term"
|
|
858
|
+
}, filters);
|
|
958
859
|
columns.forEach(function (_ref17) {
|
|
959
860
|
var key = _ref17.key,
|
|
960
861
|
defaultValue = _ref17.defaultValue;
|
|
@@ -967,7 +868,7 @@ var buildUrlFromFilters = function buildUrlFromFilters(_ref16) {
|
|
|
967
868
|
delete searchParams["segmentId"];
|
|
968
869
|
}
|
|
969
870
|
var defaultFilters = buildDefaultFilters(columns, filters);
|
|
970
|
-
delete searchParams["search_term"];
|
|
871
|
+
isKeywordFilterPresent && delete searchParams["search_term"];
|
|
971
872
|
ramda.concat(filters, defaultFilters).forEach(function (filter) {
|
|
972
873
|
searchParams[filter.key] = createUrlParamString({
|
|
973
874
|
filter: filter,
|
|
@@ -1006,7 +907,7 @@ var buildUrlFromSegment = function buildUrlFromSegment(_ref19) {
|
|
|
1006
907
|
var defaultFilters = buildDefaultFilters(columns, filters);
|
|
1007
908
|
delete searchParams["searchTerm"];
|
|
1008
909
|
ramda.concat(filters, defaultFilters).forEach(function (filter) {
|
|
1009
|
-
isNotEmpty(id) && (searchParams["segmentId"] = id);
|
|
910
|
+
neetoCist.isNotEmpty(id) && (searchParams["segmentId"] = id);
|
|
1010
911
|
searchParams[filter.key] = createUrlParamStringForSegments({
|
|
1011
912
|
filter: filter,
|
|
1012
913
|
columns: columns
|
|
@@ -1032,7 +933,7 @@ var buildFilterColumnsFromFields = function buildFilterColumnsFromFields(_ref21)
|
|
|
1032
933
|
var column = _objectSpread$4({
|
|
1033
934
|
key: ramda.toLower(name),
|
|
1034
935
|
node: "".concat(name, ":").concat(id),
|
|
1035
|
-
label: capitalize(name),
|
|
936
|
+
label: neetoCist.capitalize(name),
|
|
1036
937
|
type: "custom.".concat(kind),
|
|
1037
938
|
showRuleSelector: showRuleSelector
|
|
1038
939
|
}, groupName && {
|
|
@@ -1041,7 +942,7 @@ var buildFilterColumnsFromFields = function buildFilterColumnsFromFields(_ref21)
|
|
|
1041
942
|
if (kind === "single_option" || kind === "multi_option") {
|
|
1042
943
|
column.values = field.data.map(function (item) {
|
|
1043
944
|
return {
|
|
1044
|
-
label: capitalize(item.label),
|
|
945
|
+
label: neetoCist.capitalize(item.label),
|
|
1045
946
|
value: item.id
|
|
1046
947
|
};
|
|
1047
948
|
});
|
|
@@ -1058,14 +959,17 @@ var getColumnsWithStandardizedType = function getColumnsWithStandardizedType(col
|
|
|
1058
959
|
});
|
|
1059
960
|
});
|
|
1060
961
|
};
|
|
962
|
+
var isKeywordFilterPresent = function isKeywordFilterPresent(keyworFilter) {
|
|
963
|
+
return ramda.not(ramda.isEmpty(keyworFilter.node));
|
|
964
|
+
};
|
|
1061
965
|
|
|
1062
966
|
var buildCustomDateValue = function buildCustomDateValue(value) {
|
|
1063
|
-
var isBeforeOrAfter = Math.abs(
|
|
967
|
+
var isBeforeOrAfter = Math.abs(dayjs(value[1]).diff(dayjs(value[0]), "year")) >= 90;
|
|
1064
968
|
if (isBeforeOrAfter) {
|
|
1065
|
-
var currentMoment =
|
|
1066
|
-
var diffWithStart = Math.abs(currentMoment.diff(
|
|
1067
|
-
var diffWithEnd = Math.abs(currentMoment.diff(
|
|
1068
|
-
return diffWithStart < diffWithEnd ? "after-".concat(utils.dateFormat.date(
|
|
969
|
+
var currentMoment = dayjs();
|
|
970
|
+
var diffWithStart = Math.abs(currentMoment.diff(dayjs(value[0]), "year"));
|
|
971
|
+
var diffWithEnd = Math.abs(currentMoment.diff(dayjs(value[1]), "year"));
|
|
972
|
+
return diffWithStart < diffWithEnd ? "after-".concat(utils.dateFormat.date(dayjs(value[0]).subtract(1, "day"))) : "before-".concat(utils.dateFormat.date(dayjs(value[1]).add(1, "day")));
|
|
1069
973
|
}
|
|
1070
974
|
return value.map(utils.dateFormat.date).join(" - ");
|
|
1071
975
|
};
|
|
@@ -1085,11 +989,11 @@ var buildFilterValue = function buildFilterValue(filter) {
|
|
|
1085
989
|
} else if (isTime(defaultType) && isCustomTimeRange(value)) {
|
|
1086
990
|
return value.map(utils.dateFormat.time).join(" - ");
|
|
1087
991
|
} else if (isDate(defaultType) || isTime(defaultType)) {
|
|
1088
|
-
return humanize(value);
|
|
992
|
+
return neetoCist.humanize(value);
|
|
1089
993
|
} else if (isMulti(defaultType)) {
|
|
1090
994
|
return value.map(function (value) {
|
|
1091
995
|
var _findBy;
|
|
1092
|
-
return ((_findBy = findBy({
|
|
996
|
+
return ((_findBy = neetoCist.findBy({
|
|
1093
997
|
value: value
|
|
1094
998
|
}, values)) === null || _findBy === void 0 ? void 0 : _findBy.label) || value;
|
|
1095
999
|
}).join(", ");
|
|
@@ -1103,7 +1007,7 @@ var buildFilterValue = function buildFilterValue(filter) {
|
|
|
1103
1007
|
values: values
|
|
1104
1008
|
});
|
|
1105
1009
|
}
|
|
1106
|
-
return ((_findBy2 = findBy({
|
|
1010
|
+
return ((_findBy2 = neetoCist.findBy({
|
|
1107
1011
|
value: value
|
|
1108
1012
|
}, values)) === null || _findBy2 === void 0 ? void 0 : _findBy2.label) || value;
|
|
1109
1013
|
};
|
|
@@ -1111,19 +1015,19 @@ var buildRuleValue = function buildRuleValue(_ref) {
|
|
|
1111
1015
|
var rule = _ref.rule,
|
|
1112
1016
|
defaultType = _ref.defaultType;
|
|
1113
1017
|
if (isText(defaultType)) {
|
|
1114
|
-
return findBy({
|
|
1018
|
+
return neetoCist.findBy({
|
|
1115
1019
|
value: rule
|
|
1116
1020
|
}, TEXT_RULES).label;
|
|
1117
1021
|
} else if (isDigit(defaultType)) {
|
|
1118
|
-
return findBy({
|
|
1022
|
+
return neetoCist.findBy({
|
|
1119
1023
|
value: rule
|
|
1120
1024
|
}, NUMBER_RULES).label;
|
|
1121
1025
|
} else if (isSingleDate(defaultType)) {
|
|
1122
|
-
return findBy({
|
|
1026
|
+
return neetoCist.findBy({
|
|
1123
1027
|
value: rule
|
|
1124
1028
|
}, SINGLE_DATE_OPTIONS).label;
|
|
1125
1029
|
} else if (isSingleTime(defaultType)) {
|
|
1126
|
-
return findBy({
|
|
1030
|
+
return neetoCist.findBy({
|
|
1127
1031
|
value: rule
|
|
1128
1032
|
}, SINGLE_TIME_OPTIONS).label;
|
|
1129
1033
|
}
|
|
@@ -1473,7 +1377,7 @@ var Bar = function Bar(_ref) {
|
|
|
1473
1377
|
keyword = _ref$keyword === void 0 ? {
|
|
1474
1378
|
node: "",
|
|
1475
1379
|
value: "",
|
|
1476
|
-
setValue: noop
|
|
1380
|
+
setValue: neetoCist.noop
|
|
1477
1381
|
} : _ref$keyword,
|
|
1478
1382
|
_ref$setIsPaneOpen = _ref.setIsPaneOpen,
|
|
1479
1383
|
setIsPaneOpen = _ref$setIsPaneOpen === void 0 ? ramda.identity : _ref$setIsPaneOpen,
|
|
@@ -1492,27 +1396,15 @@ var Bar = function Bar(_ref) {
|
|
|
1492
1396
|
key: "search_term",
|
|
1493
1397
|
value: keywordValue
|
|
1494
1398
|
});
|
|
1495
|
-
var filters = buildFiltersFromSearchParams(isNotEmpty(keywordValue) ? [keywordFilter].concat(_toConsumableArray(columns)) : columns);
|
|
1496
|
-
var nonHiddenFilters = removeBy({
|
|
1399
|
+
var filters = buildFiltersFromSearchParams(isKeywordFilterPresent(keywordFilter) && neetoCist.isNotEmpty(keywordValue) ? [keywordFilter].concat(_toConsumableArray(columns)) : columns);
|
|
1400
|
+
var nonHiddenFilters = neetoCist.removeBy({
|
|
1497
1401
|
hidden: true
|
|
1498
1402
|
}, filters);
|
|
1499
1403
|
var history = reactRouterDom.useHistory();
|
|
1500
|
-
React.useEffect(function () {
|
|
1501
|
-
if (initialRenderRef.current) {
|
|
1502
|
-
initialRenderRef.current = false;
|
|
1503
|
-
return noop$1;
|
|
1504
|
-
}
|
|
1505
|
-
var handler = setTimeout(function () {
|
|
1506
|
-
handleSubmit(filters);
|
|
1507
|
-
}, 500);
|
|
1508
|
-
return function () {
|
|
1509
|
-
return clearTimeout(handler);
|
|
1510
|
-
};
|
|
1511
|
-
}, [keywordValue]);
|
|
1512
1404
|
var handleSubmit = function handleSubmit(newFilters, isClearAll) {
|
|
1513
1405
|
var params = buildUrlFromFilters(_objectSpread$2({
|
|
1514
1406
|
columns: columns,
|
|
1515
|
-
filters: isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(newFilters), [keywordFilter]) : newFilters
|
|
1407
|
+
filters: isKeywordFilterPresent(keywordFilter) && neetoCist.isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(newFilters), [keywordFilter]) : newFilters
|
|
1516
1408
|
}, isClearAll && {
|
|
1517
1409
|
isClearAll: true,
|
|
1518
1410
|
childrenKeys: childrenKeys
|
|
@@ -1533,13 +1425,13 @@ var Bar = function Bar(_ref) {
|
|
|
1533
1425
|
var _pathname = window.location.pathname;
|
|
1534
1426
|
history.push(utils.buildUrl(_pathname, _params));
|
|
1535
1427
|
}
|
|
1536
|
-
var newFilters = removeBy({
|
|
1428
|
+
var newFilters = neetoCist.removeBy({
|
|
1537
1429
|
key: key
|
|
1538
1430
|
}, filters);
|
|
1539
1431
|
handleSubmit(newFilters);
|
|
1540
1432
|
};
|
|
1541
1433
|
var handleClearAll = function handleClearAll() {
|
|
1542
|
-
var params = ramda.omit(["search_term"], utils.getQueryParams());
|
|
1434
|
+
var params = isKeywordFilterPresent(keywordFilter) ? ramda.omit(["search_term"], utils.getQueryParams()) : utils.getQueryParams();
|
|
1543
1435
|
var pathname = window.location.pathname;
|
|
1544
1436
|
history.push(utils.buildUrl(pathname, params));
|
|
1545
1437
|
handleSubmit([], true);
|
|
@@ -1552,6 +1444,18 @@ var Bar = function Bar(_ref) {
|
|
|
1552
1444
|
isClearable = _ref2.isClearable;
|
|
1553
1445
|
return defaultValue && !isClearable;
|
|
1554
1446
|
}) && !childrenFiltersApplied;
|
|
1447
|
+
React.useEffect(function () {
|
|
1448
|
+
if (initialRenderRef.current) {
|
|
1449
|
+
initialRenderRef.current = false;
|
|
1450
|
+
return neetoCist.noop;
|
|
1451
|
+
}
|
|
1452
|
+
var handler = setTimeout(function () {
|
|
1453
|
+
handleSubmit(filters);
|
|
1454
|
+
}, 500);
|
|
1455
|
+
return function () {
|
|
1456
|
+
return clearTimeout(handler);
|
|
1457
|
+
};
|
|
1458
|
+
}, [keywordValue]);
|
|
1555
1459
|
if (ramda.isEmpty(nonHiddenFilters) && !childrenFiltersApplied) return null;
|
|
1556
1460
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1557
1461
|
className: classnames__default["default"]("neeto-filters-bar", _defineProperty({}, className, className))
|
|
@@ -1592,8 +1496,8 @@ var Bar = function Bar(_ref) {
|
|
|
1592
1496
|
}));
|
|
1593
1497
|
};
|
|
1594
1498
|
|
|
1595
|
-
function _extends
|
|
1596
|
-
_extends
|
|
1499
|
+
function _extends() {
|
|
1500
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1597
1501
|
for (var i = 1; i < arguments.length; i++) {
|
|
1598
1502
|
var source = arguments[i];
|
|
1599
1503
|
for (var key in source) {
|
|
@@ -1604,10 +1508,10 @@ function _extends$1() {
|
|
|
1604
1508
|
}
|
|
1605
1509
|
return target;
|
|
1606
1510
|
};
|
|
1607
|
-
return _extends
|
|
1511
|
+
return _extends.apply(this, arguments);
|
|
1608
1512
|
}
|
|
1609
1513
|
|
|
1610
|
-
function _objectWithoutPropertiesLoose
|
|
1514
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1611
1515
|
if (source == null) return {};
|
|
1612
1516
|
var target = {};
|
|
1613
1517
|
var sourceKeys = Object.keys(source);
|
|
@@ -1622,7 +1526,7 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
1622
1526
|
|
|
1623
1527
|
function _objectWithoutProperties(source, excluded) {
|
|
1624
1528
|
if (source == null) return {};
|
|
1625
|
-
var target = _objectWithoutPropertiesLoose
|
|
1529
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1626
1530
|
var key, i;
|
|
1627
1531
|
if (Object.getOwnPropertySymbols) {
|
|
1628
1532
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -1664,34 +1568,6 @@ var Portal = function Portal(_ref) {
|
|
|
1664
1568
|
return /*#__PURE__*/ReactDOM.createPortal(children, target.current);
|
|
1665
1569
|
};
|
|
1666
1570
|
|
|
1667
|
-
function _extends() {
|
|
1668
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1669
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1670
|
-
var source = arguments[i];
|
|
1671
|
-
for (var key in source) {
|
|
1672
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1673
|
-
target[key] = source[key];
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
return target;
|
|
1678
|
-
};
|
|
1679
|
-
return _extends.apply(this, arguments);
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1683
|
-
if (source == null) return {};
|
|
1684
|
-
var target = {};
|
|
1685
|
-
var sourceKeys = Object.keys(source);
|
|
1686
|
-
var key, i;
|
|
1687
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1688
|
-
key = sourceKeys[i];
|
|
1689
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1690
|
-
target[key] = source[key];
|
|
1691
|
-
}
|
|
1692
|
-
return target;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
1571
|
function _setPrototypeOf(o, p) {
|
|
1696
1572
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1697
1573
|
o.__proto__ = p;
|
|
@@ -1706,1188 +1582,6 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
1706
1582
|
_setPrototypeOf(subClass, superClass);
|
|
1707
1583
|
}
|
|
1708
1584
|
|
|
1709
|
-
var propTypes = {exports: {}};
|
|
1710
|
-
|
|
1711
|
-
var reactIs = {exports: {}};
|
|
1712
|
-
|
|
1713
|
-
var reactIs_production_min = {};
|
|
1714
|
-
|
|
1715
|
-
/** @license React v16.13.1
|
|
1716
|
-
* react-is.production.min.js
|
|
1717
|
-
*
|
|
1718
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1719
|
-
*
|
|
1720
|
-
* This source code is licensed under the MIT license found in the
|
|
1721
|
-
* LICENSE file in the root directory of this source tree.
|
|
1722
|
-
*/
|
|
1723
|
-
|
|
1724
|
-
var hasRequiredReactIs_production_min;
|
|
1725
|
-
|
|
1726
|
-
function requireReactIs_production_min () {
|
|
1727
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1728
|
-
hasRequiredReactIs_production_min = 1;
|
|
1729
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
1730
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
1731
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
1732
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
1733
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
1734
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
1735
|
-
return reactIs_production_min;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
var reactIs_development = {};
|
|
1739
|
-
|
|
1740
|
-
/** @license React v16.13.1
|
|
1741
|
-
* react-is.development.js
|
|
1742
|
-
*
|
|
1743
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1744
|
-
*
|
|
1745
|
-
* This source code is licensed under the MIT license found in the
|
|
1746
|
-
* LICENSE file in the root directory of this source tree.
|
|
1747
|
-
*/
|
|
1748
|
-
|
|
1749
|
-
var hasRequiredReactIs_development;
|
|
1750
|
-
|
|
1751
|
-
function requireReactIs_development () {
|
|
1752
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
1753
|
-
hasRequiredReactIs_development = 1;
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1758
|
-
(function() {
|
|
1759
|
-
|
|
1760
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
1761
|
-
// nor polyfill, then a plain number is used for performance.
|
|
1762
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
1763
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
1764
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1765
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1766
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1767
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1768
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1769
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1770
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1771
|
-
|
|
1772
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1773
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1774
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1775
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1776
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1777
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1778
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1779
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1780
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1781
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1782
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1783
|
-
|
|
1784
|
-
function isValidElementType(type) {
|
|
1785
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1786
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
function typeOf(object) {
|
|
1790
|
-
if (typeof object === 'object' && object !== null) {
|
|
1791
|
-
var $$typeof = object.$$typeof;
|
|
1792
|
-
|
|
1793
|
-
switch ($$typeof) {
|
|
1794
|
-
case REACT_ELEMENT_TYPE:
|
|
1795
|
-
var type = object.type;
|
|
1796
|
-
|
|
1797
|
-
switch (type) {
|
|
1798
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1799
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1800
|
-
case REACT_FRAGMENT_TYPE:
|
|
1801
|
-
case REACT_PROFILER_TYPE:
|
|
1802
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1803
|
-
case REACT_SUSPENSE_TYPE:
|
|
1804
|
-
return type;
|
|
1805
|
-
|
|
1806
|
-
default:
|
|
1807
|
-
var $$typeofType = type && type.$$typeof;
|
|
1808
|
-
|
|
1809
|
-
switch ($$typeofType) {
|
|
1810
|
-
case REACT_CONTEXT_TYPE:
|
|
1811
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1812
|
-
case REACT_LAZY_TYPE:
|
|
1813
|
-
case REACT_MEMO_TYPE:
|
|
1814
|
-
case REACT_PROVIDER_TYPE:
|
|
1815
|
-
return $$typeofType;
|
|
1816
|
-
|
|
1817
|
-
default:
|
|
1818
|
-
return $$typeof;
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
case REACT_PORTAL_TYPE:
|
|
1824
|
-
return $$typeof;
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
return undefined;
|
|
1829
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1830
|
-
|
|
1831
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1832
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1833
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1834
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1835
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1836
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1837
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1838
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1839
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1840
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1841
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1842
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1843
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1844
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1845
|
-
|
|
1846
|
-
function isAsyncMode(object) {
|
|
1847
|
-
{
|
|
1848
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1849
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1850
|
-
|
|
1851
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1856
|
-
}
|
|
1857
|
-
function isConcurrentMode(object) {
|
|
1858
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1859
|
-
}
|
|
1860
|
-
function isContextConsumer(object) {
|
|
1861
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1862
|
-
}
|
|
1863
|
-
function isContextProvider(object) {
|
|
1864
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1865
|
-
}
|
|
1866
|
-
function isElement(object) {
|
|
1867
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1868
|
-
}
|
|
1869
|
-
function isForwardRef(object) {
|
|
1870
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1871
|
-
}
|
|
1872
|
-
function isFragment(object) {
|
|
1873
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1874
|
-
}
|
|
1875
|
-
function isLazy(object) {
|
|
1876
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1877
|
-
}
|
|
1878
|
-
function isMemo(object) {
|
|
1879
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1880
|
-
}
|
|
1881
|
-
function isPortal(object) {
|
|
1882
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1883
|
-
}
|
|
1884
|
-
function isProfiler(object) {
|
|
1885
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1886
|
-
}
|
|
1887
|
-
function isStrictMode(object) {
|
|
1888
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1889
|
-
}
|
|
1890
|
-
function isSuspense(object) {
|
|
1891
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
1895
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
1896
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
1897
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
1898
|
-
reactIs_development.Element = Element;
|
|
1899
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
1900
|
-
reactIs_development.Fragment = Fragment;
|
|
1901
|
-
reactIs_development.Lazy = Lazy;
|
|
1902
|
-
reactIs_development.Memo = Memo;
|
|
1903
|
-
reactIs_development.Portal = Portal;
|
|
1904
|
-
reactIs_development.Profiler = Profiler;
|
|
1905
|
-
reactIs_development.StrictMode = StrictMode;
|
|
1906
|
-
reactIs_development.Suspense = Suspense;
|
|
1907
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
1908
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
1909
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
1910
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
1911
|
-
reactIs_development.isElement = isElement;
|
|
1912
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
1913
|
-
reactIs_development.isFragment = isFragment;
|
|
1914
|
-
reactIs_development.isLazy = isLazy;
|
|
1915
|
-
reactIs_development.isMemo = isMemo;
|
|
1916
|
-
reactIs_development.isPortal = isPortal;
|
|
1917
|
-
reactIs_development.isProfiler = isProfiler;
|
|
1918
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
1919
|
-
reactIs_development.isSuspense = isSuspense;
|
|
1920
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
1921
|
-
reactIs_development.typeOf = typeOf;
|
|
1922
|
-
})();
|
|
1923
|
-
}
|
|
1924
|
-
return reactIs_development;
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
var hasRequiredReactIs;
|
|
1928
|
-
|
|
1929
|
-
function requireReactIs () {
|
|
1930
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
1931
|
-
hasRequiredReactIs = 1;
|
|
1932
|
-
(function (module) {
|
|
1933
|
-
|
|
1934
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1935
|
-
module.exports = requireReactIs_production_min();
|
|
1936
|
-
} else {
|
|
1937
|
-
module.exports = requireReactIs_development();
|
|
1938
|
-
}
|
|
1939
|
-
} (reactIs));
|
|
1940
|
-
return reactIs.exports;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
/*
|
|
1944
|
-
object-assign
|
|
1945
|
-
(c) Sindre Sorhus
|
|
1946
|
-
@license MIT
|
|
1947
|
-
*/
|
|
1948
|
-
|
|
1949
|
-
var objectAssign;
|
|
1950
|
-
var hasRequiredObjectAssign;
|
|
1951
|
-
|
|
1952
|
-
function requireObjectAssign () {
|
|
1953
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
1954
|
-
hasRequiredObjectAssign = 1;
|
|
1955
|
-
/* eslint-disable no-unused-vars */
|
|
1956
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
1957
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1958
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1959
|
-
|
|
1960
|
-
function toObject(val) {
|
|
1961
|
-
if (val === null || val === undefined) {
|
|
1962
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
return Object(val);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
function shouldUseNative() {
|
|
1969
|
-
try {
|
|
1970
|
-
if (!Object.assign) {
|
|
1971
|
-
return false;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
1975
|
-
|
|
1976
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
1977
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
1978
|
-
test1[5] = 'de';
|
|
1979
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
1980
|
-
return false;
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1984
|
-
var test2 = {};
|
|
1985
|
-
for (var i = 0; i < 10; i++) {
|
|
1986
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
1987
|
-
}
|
|
1988
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
1989
|
-
return test2[n];
|
|
1990
|
-
});
|
|
1991
|
-
if (order2.join('') !== '0123456789') {
|
|
1992
|
-
return false;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1996
|
-
var test3 = {};
|
|
1997
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
1998
|
-
test3[letter] = letter;
|
|
1999
|
-
});
|
|
2000
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
2001
|
-
'abcdefghijklmnopqrst') {
|
|
2002
|
-
return false;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
return true;
|
|
2006
|
-
} catch (err) {
|
|
2007
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
2008
|
-
return false;
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2013
|
-
var from;
|
|
2014
|
-
var to = toObject(target);
|
|
2015
|
-
var symbols;
|
|
2016
|
-
|
|
2017
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
2018
|
-
from = Object(arguments[s]);
|
|
2019
|
-
|
|
2020
|
-
for (var key in from) {
|
|
2021
|
-
if (hasOwnProperty.call(from, key)) {
|
|
2022
|
-
to[key] = from[key];
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
if (getOwnPropertySymbols) {
|
|
2027
|
-
symbols = getOwnPropertySymbols(from);
|
|
2028
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
2029
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
2030
|
-
to[symbols[i]] = from[symbols[i]];
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
return to;
|
|
2037
|
-
};
|
|
2038
|
-
return objectAssign;
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
/**
|
|
2042
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2043
|
-
*
|
|
2044
|
-
* This source code is licensed under the MIT license found in the
|
|
2045
|
-
* LICENSE file in the root directory of this source tree.
|
|
2046
|
-
*/
|
|
2047
|
-
|
|
2048
|
-
var ReactPropTypesSecret_1;
|
|
2049
|
-
var hasRequiredReactPropTypesSecret;
|
|
2050
|
-
|
|
2051
|
-
function requireReactPropTypesSecret () {
|
|
2052
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
2053
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
2054
|
-
|
|
2055
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
2056
|
-
|
|
2057
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
2058
|
-
return ReactPropTypesSecret_1;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
var has;
|
|
2062
|
-
var hasRequiredHas;
|
|
2063
|
-
|
|
2064
|
-
function requireHas () {
|
|
2065
|
-
if (hasRequiredHas) return has;
|
|
2066
|
-
hasRequiredHas = 1;
|
|
2067
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2068
|
-
return has;
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2073
|
-
*
|
|
2074
|
-
* This source code is licensed under the MIT license found in the
|
|
2075
|
-
* LICENSE file in the root directory of this source tree.
|
|
2076
|
-
*/
|
|
2077
|
-
|
|
2078
|
-
var checkPropTypes_1;
|
|
2079
|
-
var hasRequiredCheckPropTypes;
|
|
2080
|
-
|
|
2081
|
-
function requireCheckPropTypes () {
|
|
2082
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
2083
|
-
hasRequiredCheckPropTypes = 1;
|
|
2084
|
-
|
|
2085
|
-
var printWarning = function() {};
|
|
2086
|
-
|
|
2087
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2088
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
2089
|
-
var loggedTypeFailures = {};
|
|
2090
|
-
var has = requireHas();
|
|
2091
|
-
|
|
2092
|
-
printWarning = function(text) {
|
|
2093
|
-
var message = 'Warning: ' + text;
|
|
2094
|
-
if (typeof console !== 'undefined') {
|
|
2095
|
-
console.error(message);
|
|
2096
|
-
}
|
|
2097
|
-
try {
|
|
2098
|
-
// --- Welcome to debugging React ---
|
|
2099
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
2100
|
-
// to find the callsite that caused this warning to fire.
|
|
2101
|
-
throw new Error(message);
|
|
2102
|
-
} catch (x) { /**/ }
|
|
2103
|
-
};
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
/**
|
|
2107
|
-
* Assert that the values match with the type specs.
|
|
2108
|
-
* Error messages are memorized and will only be shown once.
|
|
2109
|
-
*
|
|
2110
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
2111
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
2112
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
2113
|
-
* @param {string} componentName Name of the component for error messages.
|
|
2114
|
-
* @param {?Function} getStack Returns the component stack.
|
|
2115
|
-
* @private
|
|
2116
|
-
*/
|
|
2117
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
2118
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2119
|
-
for (var typeSpecName in typeSpecs) {
|
|
2120
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
2121
|
-
var error;
|
|
2122
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
2123
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
2124
|
-
// After these have been cleaned up, we'll let them throw.
|
|
2125
|
-
try {
|
|
2126
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
2127
|
-
// behavior as without this statement except with a better message.
|
|
2128
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
2129
|
-
var err = Error(
|
|
2130
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
2131
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
2132
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
2133
|
-
);
|
|
2134
|
-
err.name = 'Invariant Violation';
|
|
2135
|
-
throw err;
|
|
2136
|
-
}
|
|
2137
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
2138
|
-
} catch (ex) {
|
|
2139
|
-
error = ex;
|
|
2140
|
-
}
|
|
2141
|
-
if (error && !(error instanceof Error)) {
|
|
2142
|
-
printWarning(
|
|
2143
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
2144
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
2145
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
2146
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
2147
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
2148
|
-
'shape all require an argument).'
|
|
2149
|
-
);
|
|
2150
|
-
}
|
|
2151
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
2152
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
2153
|
-
// same error.
|
|
2154
|
-
loggedTypeFailures[error.message] = true;
|
|
2155
|
-
|
|
2156
|
-
var stack = getStack ? getStack() : '';
|
|
2157
|
-
|
|
2158
|
-
printWarning(
|
|
2159
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
/**
|
|
2168
|
-
* Resets warning cache when testing.
|
|
2169
|
-
*
|
|
2170
|
-
* @private
|
|
2171
|
-
*/
|
|
2172
|
-
checkPropTypes.resetWarningCache = function() {
|
|
2173
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2174
|
-
loggedTypeFailures = {};
|
|
2175
|
-
}
|
|
2176
|
-
};
|
|
2177
|
-
|
|
2178
|
-
checkPropTypes_1 = checkPropTypes;
|
|
2179
|
-
return checkPropTypes_1;
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
/**
|
|
2183
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2184
|
-
*
|
|
2185
|
-
* This source code is licensed under the MIT license found in the
|
|
2186
|
-
* LICENSE file in the root directory of this source tree.
|
|
2187
|
-
*/
|
|
2188
|
-
|
|
2189
|
-
var factoryWithTypeCheckers;
|
|
2190
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
2191
|
-
|
|
2192
|
-
function requireFactoryWithTypeCheckers () {
|
|
2193
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
2194
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
2195
|
-
|
|
2196
|
-
var ReactIs = requireReactIs();
|
|
2197
|
-
var assign = requireObjectAssign();
|
|
2198
|
-
|
|
2199
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
2200
|
-
var has = requireHas();
|
|
2201
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
2202
|
-
|
|
2203
|
-
var printWarning = function() {};
|
|
2204
|
-
|
|
2205
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2206
|
-
printWarning = function(text) {
|
|
2207
|
-
var message = 'Warning: ' + text;
|
|
2208
|
-
if (typeof console !== 'undefined') {
|
|
2209
|
-
console.error(message);
|
|
2210
|
-
}
|
|
2211
|
-
try {
|
|
2212
|
-
// --- Welcome to debugging React ---
|
|
2213
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
2214
|
-
// to find the callsite that caused this warning to fire.
|
|
2215
|
-
throw new Error(message);
|
|
2216
|
-
} catch (x) {}
|
|
2217
|
-
};
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
function emptyFunctionThatReturnsNull() {
|
|
2221
|
-
return null;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
2225
|
-
/* global Symbol */
|
|
2226
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
2227
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
2228
|
-
|
|
2229
|
-
/**
|
|
2230
|
-
* Returns the iterator method function contained on the iterable object.
|
|
2231
|
-
*
|
|
2232
|
-
* Be sure to invoke the function with the iterable as context:
|
|
2233
|
-
*
|
|
2234
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
2235
|
-
* if (iteratorFn) {
|
|
2236
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
2237
|
-
* ...
|
|
2238
|
-
* }
|
|
2239
|
-
*
|
|
2240
|
-
* @param {?object} maybeIterable
|
|
2241
|
-
* @return {?function}
|
|
2242
|
-
*/
|
|
2243
|
-
function getIteratorFn(maybeIterable) {
|
|
2244
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
2245
|
-
if (typeof iteratorFn === 'function') {
|
|
2246
|
-
return iteratorFn;
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
/**
|
|
2251
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
2252
|
-
* supplied to React components. Example usage:
|
|
2253
|
-
*
|
|
2254
|
-
* var Props = require('ReactPropTypes');
|
|
2255
|
-
* var MyArticle = React.createClass({
|
|
2256
|
-
* propTypes: {
|
|
2257
|
-
* // An optional string prop named "description".
|
|
2258
|
-
* description: Props.string,
|
|
2259
|
-
*
|
|
2260
|
-
* // A required enum prop named "category".
|
|
2261
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
2262
|
-
*
|
|
2263
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
2264
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
2265
|
-
* },
|
|
2266
|
-
* render: function() { ... }
|
|
2267
|
-
* });
|
|
2268
|
-
*
|
|
2269
|
-
* A more formal specification of how these methods are used:
|
|
2270
|
-
*
|
|
2271
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
2272
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
2273
|
-
*
|
|
2274
|
-
* Each and every declaration produces a function with the same signature. This
|
|
2275
|
-
* allows the creation of custom validation functions. For example:
|
|
2276
|
-
*
|
|
2277
|
-
* var MyLink = React.createClass({
|
|
2278
|
-
* propTypes: {
|
|
2279
|
-
* // An optional string or URI prop named "href".
|
|
2280
|
-
* href: function(props, propName, componentName) {
|
|
2281
|
-
* var propValue = props[propName];
|
|
2282
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
2283
|
-
* !(propValue instanceof URI)) {
|
|
2284
|
-
* return new Error(
|
|
2285
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
2286
|
-
* componentName
|
|
2287
|
-
* );
|
|
2288
|
-
* }
|
|
2289
|
-
* }
|
|
2290
|
-
* },
|
|
2291
|
-
* render: function() {...}
|
|
2292
|
-
* });
|
|
2293
|
-
*
|
|
2294
|
-
* @internal
|
|
2295
|
-
*/
|
|
2296
|
-
|
|
2297
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
2298
|
-
|
|
2299
|
-
// Important!
|
|
2300
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
2301
|
-
var ReactPropTypes = {
|
|
2302
|
-
array: createPrimitiveTypeChecker('array'),
|
|
2303
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
2304
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
2305
|
-
func: createPrimitiveTypeChecker('function'),
|
|
2306
|
-
number: createPrimitiveTypeChecker('number'),
|
|
2307
|
-
object: createPrimitiveTypeChecker('object'),
|
|
2308
|
-
string: createPrimitiveTypeChecker('string'),
|
|
2309
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
2310
|
-
|
|
2311
|
-
any: createAnyTypeChecker(),
|
|
2312
|
-
arrayOf: createArrayOfTypeChecker,
|
|
2313
|
-
element: createElementTypeChecker(),
|
|
2314
|
-
elementType: createElementTypeTypeChecker(),
|
|
2315
|
-
instanceOf: createInstanceTypeChecker,
|
|
2316
|
-
node: createNodeChecker(),
|
|
2317
|
-
objectOf: createObjectOfTypeChecker,
|
|
2318
|
-
oneOf: createEnumTypeChecker,
|
|
2319
|
-
oneOfType: createUnionTypeChecker,
|
|
2320
|
-
shape: createShapeTypeChecker,
|
|
2321
|
-
exact: createStrictShapeTypeChecker,
|
|
2322
|
-
};
|
|
2323
|
-
|
|
2324
|
-
/**
|
|
2325
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
2326
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
2327
|
-
*/
|
|
2328
|
-
/*eslint-disable no-self-compare*/
|
|
2329
|
-
function is(x, y) {
|
|
2330
|
-
// SameValue algorithm
|
|
2331
|
-
if (x === y) {
|
|
2332
|
-
// Steps 1-5, 7-10
|
|
2333
|
-
// Steps 6.b-6.e: +0 != -0
|
|
2334
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
2335
|
-
} else {
|
|
2336
|
-
// Step 6.a: NaN == NaN
|
|
2337
|
-
return x !== x && y !== y;
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
/*eslint-enable no-self-compare*/
|
|
2341
|
-
|
|
2342
|
-
/**
|
|
2343
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
2344
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
2345
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
2346
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
2347
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
2348
|
-
*/
|
|
2349
|
-
function PropTypeError(message, data) {
|
|
2350
|
-
this.message = message;
|
|
2351
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
2352
|
-
this.stack = '';
|
|
2353
|
-
}
|
|
2354
|
-
// Make `instanceof Error` still work for returned errors.
|
|
2355
|
-
PropTypeError.prototype = Error.prototype;
|
|
2356
|
-
|
|
2357
|
-
function createChainableTypeChecker(validate) {
|
|
2358
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2359
|
-
var manualPropTypeCallCache = {};
|
|
2360
|
-
var manualPropTypeWarningCount = 0;
|
|
2361
|
-
}
|
|
2362
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
2363
|
-
componentName = componentName || ANONYMOUS;
|
|
2364
|
-
propFullName = propFullName || propName;
|
|
2365
|
-
|
|
2366
|
-
if (secret !== ReactPropTypesSecret) {
|
|
2367
|
-
if (throwOnDirectAccess) {
|
|
2368
|
-
// New behavior only for users of `prop-types` package
|
|
2369
|
-
var err = new Error(
|
|
2370
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
2371
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
2372
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
2373
|
-
);
|
|
2374
|
-
err.name = 'Invariant Violation';
|
|
2375
|
-
throw err;
|
|
2376
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
2377
|
-
// Old behavior for people using React.PropTypes
|
|
2378
|
-
var cacheKey = componentName + ':' + propName;
|
|
2379
|
-
if (
|
|
2380
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
2381
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
2382
|
-
manualPropTypeWarningCount < 3
|
|
2383
|
-
) {
|
|
2384
|
-
printWarning(
|
|
2385
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
2386
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
2387
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
2388
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
2389
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
2390
|
-
);
|
|
2391
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
2392
|
-
manualPropTypeWarningCount++;
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
if (props[propName] == null) {
|
|
2397
|
-
if (isRequired) {
|
|
2398
|
-
if (props[propName] === null) {
|
|
2399
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
2400
|
-
}
|
|
2401
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
2402
|
-
}
|
|
2403
|
-
return null;
|
|
2404
|
-
} else {
|
|
2405
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
2410
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
2411
|
-
|
|
2412
|
-
return chainedCheckType;
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
2416
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
2417
|
-
var propValue = props[propName];
|
|
2418
|
-
var propType = getPropType(propValue);
|
|
2419
|
-
if (propType !== expectedType) {
|
|
2420
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
2421
|
-
// check, but we can offer a more precise error message here rather than
|
|
2422
|
-
// 'of type `object`'.
|
|
2423
|
-
var preciseType = getPreciseType(propValue);
|
|
2424
|
-
|
|
2425
|
-
return new PropTypeError(
|
|
2426
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
2427
|
-
{expectedType: expectedType}
|
|
2428
|
-
);
|
|
2429
|
-
}
|
|
2430
|
-
return null;
|
|
2431
|
-
}
|
|
2432
|
-
return createChainableTypeChecker(validate);
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
function createAnyTypeChecker() {
|
|
2436
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
2440
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2441
|
-
if (typeof typeChecker !== 'function') {
|
|
2442
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
2443
|
-
}
|
|
2444
|
-
var propValue = props[propName];
|
|
2445
|
-
if (!Array.isArray(propValue)) {
|
|
2446
|
-
var propType = getPropType(propValue);
|
|
2447
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
2448
|
-
}
|
|
2449
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
2450
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
2451
|
-
if (error instanceof Error) {
|
|
2452
|
-
return error;
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
return null;
|
|
2456
|
-
}
|
|
2457
|
-
return createChainableTypeChecker(validate);
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
function createElementTypeChecker() {
|
|
2461
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2462
|
-
var propValue = props[propName];
|
|
2463
|
-
if (!isValidElement(propValue)) {
|
|
2464
|
-
var propType = getPropType(propValue);
|
|
2465
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
2466
|
-
}
|
|
2467
|
-
return null;
|
|
2468
|
-
}
|
|
2469
|
-
return createChainableTypeChecker(validate);
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
function createElementTypeTypeChecker() {
|
|
2473
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2474
|
-
var propValue = props[propName];
|
|
2475
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
2476
|
-
var propType = getPropType(propValue);
|
|
2477
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
2478
|
-
}
|
|
2479
|
-
return null;
|
|
2480
|
-
}
|
|
2481
|
-
return createChainableTypeChecker(validate);
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
2485
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2486
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
2487
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
2488
|
-
var actualClassName = getClassName(props[propName]);
|
|
2489
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
2490
|
-
}
|
|
2491
|
-
return null;
|
|
2492
|
-
}
|
|
2493
|
-
return createChainableTypeChecker(validate);
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
|
-
function createEnumTypeChecker(expectedValues) {
|
|
2497
|
-
if (!Array.isArray(expectedValues)) {
|
|
2498
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2499
|
-
if (arguments.length > 1) {
|
|
2500
|
-
printWarning(
|
|
2501
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
2502
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
2503
|
-
);
|
|
2504
|
-
} else {
|
|
2505
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
2506
|
-
}
|
|
2507
|
-
}
|
|
2508
|
-
return emptyFunctionThatReturnsNull;
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2512
|
-
var propValue = props[propName];
|
|
2513
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
2514
|
-
if (is(propValue, expectedValues[i])) {
|
|
2515
|
-
return null;
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
2520
|
-
var type = getPreciseType(value);
|
|
2521
|
-
if (type === 'symbol') {
|
|
2522
|
-
return String(value);
|
|
2523
|
-
}
|
|
2524
|
-
return value;
|
|
2525
|
-
});
|
|
2526
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
2527
|
-
}
|
|
2528
|
-
return createChainableTypeChecker(validate);
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
2532
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2533
|
-
if (typeof typeChecker !== 'function') {
|
|
2534
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
2535
|
-
}
|
|
2536
|
-
var propValue = props[propName];
|
|
2537
|
-
var propType = getPropType(propValue);
|
|
2538
|
-
if (propType !== 'object') {
|
|
2539
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
2540
|
-
}
|
|
2541
|
-
for (var key in propValue) {
|
|
2542
|
-
if (has(propValue, key)) {
|
|
2543
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
2544
|
-
if (error instanceof Error) {
|
|
2545
|
-
return error;
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
return null;
|
|
2550
|
-
}
|
|
2551
|
-
return createChainableTypeChecker(validate);
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
2555
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
2556
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
2557
|
-
return emptyFunctionThatReturnsNull;
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
2561
|
-
var checker = arrayOfTypeCheckers[i];
|
|
2562
|
-
if (typeof checker !== 'function') {
|
|
2563
|
-
printWarning(
|
|
2564
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
2565
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
2566
|
-
);
|
|
2567
|
-
return emptyFunctionThatReturnsNull;
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2572
|
-
var expectedTypes = [];
|
|
2573
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
2574
|
-
var checker = arrayOfTypeCheckers[i];
|
|
2575
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
2576
|
-
if (checkerResult == null) {
|
|
2577
|
-
return null;
|
|
2578
|
-
}
|
|
2579
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
2580
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
2584
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
2585
|
-
}
|
|
2586
|
-
return createChainableTypeChecker(validate);
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
function createNodeChecker() {
|
|
2590
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2591
|
-
if (!isNode(props[propName])) {
|
|
2592
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
2593
|
-
}
|
|
2594
|
-
return null;
|
|
2595
|
-
}
|
|
2596
|
-
return createChainableTypeChecker(validate);
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
2600
|
-
return new PropTypeError(
|
|
2601
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
2602
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
2603
|
-
);
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
2607
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2608
|
-
var propValue = props[propName];
|
|
2609
|
-
var propType = getPropType(propValue);
|
|
2610
|
-
if (propType !== 'object') {
|
|
2611
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
2612
|
-
}
|
|
2613
|
-
for (var key in shapeTypes) {
|
|
2614
|
-
var checker = shapeTypes[key];
|
|
2615
|
-
if (typeof checker !== 'function') {
|
|
2616
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
2617
|
-
}
|
|
2618
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
2619
|
-
if (error) {
|
|
2620
|
-
return error;
|
|
2621
|
-
}
|
|
2622
|
-
}
|
|
2623
|
-
return null;
|
|
2624
|
-
}
|
|
2625
|
-
return createChainableTypeChecker(validate);
|
|
2626
|
-
}
|
|
2627
|
-
|
|
2628
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
2629
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2630
|
-
var propValue = props[propName];
|
|
2631
|
-
var propType = getPropType(propValue);
|
|
2632
|
-
if (propType !== 'object') {
|
|
2633
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
2634
|
-
}
|
|
2635
|
-
// We need to check all keys in case some are required but missing from props.
|
|
2636
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
2637
|
-
for (var key in allKeys) {
|
|
2638
|
-
var checker = shapeTypes[key];
|
|
2639
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
2640
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
2641
|
-
}
|
|
2642
|
-
if (!checker) {
|
|
2643
|
-
return new PropTypeError(
|
|
2644
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
2645
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
2646
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
2647
|
-
);
|
|
2648
|
-
}
|
|
2649
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
2650
|
-
if (error) {
|
|
2651
|
-
return error;
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
return null;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
return createChainableTypeChecker(validate);
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
function isNode(propValue) {
|
|
2661
|
-
switch (typeof propValue) {
|
|
2662
|
-
case 'number':
|
|
2663
|
-
case 'string':
|
|
2664
|
-
case 'undefined':
|
|
2665
|
-
return true;
|
|
2666
|
-
case 'boolean':
|
|
2667
|
-
return !propValue;
|
|
2668
|
-
case 'object':
|
|
2669
|
-
if (Array.isArray(propValue)) {
|
|
2670
|
-
return propValue.every(isNode);
|
|
2671
|
-
}
|
|
2672
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
2673
|
-
return true;
|
|
2674
|
-
}
|
|
2675
|
-
|
|
2676
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
2677
|
-
if (iteratorFn) {
|
|
2678
|
-
var iterator = iteratorFn.call(propValue);
|
|
2679
|
-
var step;
|
|
2680
|
-
if (iteratorFn !== propValue.entries) {
|
|
2681
|
-
while (!(step = iterator.next()).done) {
|
|
2682
|
-
if (!isNode(step.value)) {
|
|
2683
|
-
return false;
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
} else {
|
|
2687
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
2688
|
-
while (!(step = iterator.next()).done) {
|
|
2689
|
-
var entry = step.value;
|
|
2690
|
-
if (entry) {
|
|
2691
|
-
if (!isNode(entry[1])) {
|
|
2692
|
-
return false;
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
} else {
|
|
2698
|
-
return false;
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
return true;
|
|
2702
|
-
default:
|
|
2703
|
-
return false;
|
|
2704
|
-
}
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
function isSymbol(propType, propValue) {
|
|
2708
|
-
// Native Symbol.
|
|
2709
|
-
if (propType === 'symbol') {
|
|
2710
|
-
return true;
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
// falsy value can't be a Symbol
|
|
2714
|
-
if (!propValue) {
|
|
2715
|
-
return false;
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2718
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
2719
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
2720
|
-
return true;
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
2724
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
2725
|
-
return true;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
return false;
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
2732
|
-
function getPropType(propValue) {
|
|
2733
|
-
var propType = typeof propValue;
|
|
2734
|
-
if (Array.isArray(propValue)) {
|
|
2735
|
-
return 'array';
|
|
2736
|
-
}
|
|
2737
|
-
if (propValue instanceof RegExp) {
|
|
2738
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
2739
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
2740
|
-
// passes PropTypes.object.
|
|
2741
|
-
return 'object';
|
|
2742
|
-
}
|
|
2743
|
-
if (isSymbol(propType, propValue)) {
|
|
2744
|
-
return 'symbol';
|
|
2745
|
-
}
|
|
2746
|
-
return propType;
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
2750
|
-
// See `createPrimitiveTypeChecker`.
|
|
2751
|
-
function getPreciseType(propValue) {
|
|
2752
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
2753
|
-
return '' + propValue;
|
|
2754
|
-
}
|
|
2755
|
-
var propType = getPropType(propValue);
|
|
2756
|
-
if (propType === 'object') {
|
|
2757
|
-
if (propValue instanceof Date) {
|
|
2758
|
-
return 'date';
|
|
2759
|
-
} else if (propValue instanceof RegExp) {
|
|
2760
|
-
return 'regexp';
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
return propType;
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
2767
|
-
// For example, "undefined" or "of type array"
|
|
2768
|
-
function getPostfixForTypeWarning(value) {
|
|
2769
|
-
var type = getPreciseType(value);
|
|
2770
|
-
switch (type) {
|
|
2771
|
-
case 'array':
|
|
2772
|
-
case 'object':
|
|
2773
|
-
return 'an ' + type;
|
|
2774
|
-
case 'boolean':
|
|
2775
|
-
case 'date':
|
|
2776
|
-
case 'regexp':
|
|
2777
|
-
return 'a ' + type;
|
|
2778
|
-
default:
|
|
2779
|
-
return type;
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
// Returns class name of the object, if any.
|
|
2784
|
-
function getClassName(propValue) {
|
|
2785
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
2786
|
-
return ANONYMOUS;
|
|
2787
|
-
}
|
|
2788
|
-
return propValue.constructor.name;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
2792
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
2793
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2794
|
-
|
|
2795
|
-
return ReactPropTypes;
|
|
2796
|
-
};
|
|
2797
|
-
return factoryWithTypeCheckers;
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
|
-
/**
|
|
2801
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2802
|
-
*
|
|
2803
|
-
* This source code is licensed under the MIT license found in the
|
|
2804
|
-
* LICENSE file in the root directory of this source tree.
|
|
2805
|
-
*/
|
|
2806
|
-
|
|
2807
|
-
var factoryWithThrowingShims;
|
|
2808
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
2809
|
-
|
|
2810
|
-
function requireFactoryWithThrowingShims () {
|
|
2811
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
2812
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
2813
|
-
|
|
2814
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
2815
|
-
|
|
2816
|
-
function emptyFunction() {}
|
|
2817
|
-
function emptyFunctionWithReset() {}
|
|
2818
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
2819
|
-
|
|
2820
|
-
factoryWithThrowingShims = function() {
|
|
2821
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
2822
|
-
if (secret === ReactPropTypesSecret) {
|
|
2823
|
-
// It is still safe when called from React.
|
|
2824
|
-
return;
|
|
2825
|
-
}
|
|
2826
|
-
var err = new Error(
|
|
2827
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
2828
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
2829
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
2830
|
-
);
|
|
2831
|
-
err.name = 'Invariant Violation';
|
|
2832
|
-
throw err;
|
|
2833
|
-
} shim.isRequired = shim;
|
|
2834
|
-
function getShim() {
|
|
2835
|
-
return shim;
|
|
2836
|
-
} // Important!
|
|
2837
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
2838
|
-
var ReactPropTypes = {
|
|
2839
|
-
array: shim,
|
|
2840
|
-
bigint: shim,
|
|
2841
|
-
bool: shim,
|
|
2842
|
-
func: shim,
|
|
2843
|
-
number: shim,
|
|
2844
|
-
object: shim,
|
|
2845
|
-
string: shim,
|
|
2846
|
-
symbol: shim,
|
|
2847
|
-
|
|
2848
|
-
any: shim,
|
|
2849
|
-
arrayOf: getShim,
|
|
2850
|
-
element: shim,
|
|
2851
|
-
elementType: shim,
|
|
2852
|
-
instanceOf: getShim,
|
|
2853
|
-
node: shim,
|
|
2854
|
-
objectOf: getShim,
|
|
2855
|
-
oneOf: getShim,
|
|
2856
|
-
oneOfType: getShim,
|
|
2857
|
-
shape: getShim,
|
|
2858
|
-
exact: getShim,
|
|
2859
|
-
|
|
2860
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
2861
|
-
resetWarningCache: emptyFunction
|
|
2862
|
-
};
|
|
2863
|
-
|
|
2864
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2865
|
-
|
|
2866
|
-
return ReactPropTypes;
|
|
2867
|
-
};
|
|
2868
|
-
return factoryWithThrowingShims;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
/**
|
|
2872
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2873
|
-
*
|
|
2874
|
-
* This source code is licensed under the MIT license found in the
|
|
2875
|
-
* LICENSE file in the root directory of this source tree.
|
|
2876
|
-
*/
|
|
2877
|
-
|
|
2878
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2879
|
-
var ReactIs = requireReactIs();
|
|
2880
|
-
|
|
2881
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
2882
|
-
// http://fb.me/prop-types-in-prod
|
|
2883
|
-
var throwOnDirectAccess = true;
|
|
2884
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
2885
|
-
} else {
|
|
2886
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
2887
|
-
// http://fb.me/prop-types-in-prod
|
|
2888
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
1585
|
/**
|
|
2892
1586
|
* Checks if a given element has a CSS class.
|
|
2893
1587
|
*
|
|
@@ -2935,24 +1629,6 @@ var config = {
|
|
|
2935
1629
|
disabled: false
|
|
2936
1630
|
};
|
|
2937
1631
|
|
|
2938
|
-
var timeoutsShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.number, propTypes.exports.shape({
|
|
2939
|
-
enter: propTypes.exports.number,
|
|
2940
|
-
exit: propTypes.exports.number,
|
|
2941
|
-
appear: propTypes.exports.number
|
|
2942
|
-
}).isRequired]) : null;
|
|
2943
|
-
var classNamesShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.string, propTypes.exports.shape({
|
|
2944
|
-
enter: propTypes.exports.string,
|
|
2945
|
-
exit: propTypes.exports.string,
|
|
2946
|
-
active: propTypes.exports.string
|
|
2947
|
-
}), propTypes.exports.shape({
|
|
2948
|
-
enter: propTypes.exports.string,
|
|
2949
|
-
enterDone: propTypes.exports.string,
|
|
2950
|
-
enterActive: propTypes.exports.string,
|
|
2951
|
-
exit: propTypes.exports.string,
|
|
2952
|
-
exitDone: propTypes.exports.string,
|
|
2953
|
-
exitActive: propTypes.exports.string
|
|
2954
|
-
})]) : null;
|
|
2955
|
-
|
|
2956
1632
|
var TransitionGroupContext = React__default["default"].createContext(null);
|
|
2957
1633
|
|
|
2958
1634
|
var forceReflow = function forceReflow(node) {
|
|
@@ -3365,193 +2041,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
3365
2041
|
}(React__default["default"].Component);
|
|
3366
2042
|
|
|
3367
2043
|
Transition.contextType = TransitionGroupContext;
|
|
3368
|
-
Transition.propTypes =
|
|
3369
|
-
/**
|
|
3370
|
-
* A React reference to DOM element that need to transition:
|
|
3371
|
-
* https://stackoverflow.com/a/51127130/4671932
|
|
3372
|
-
*
|
|
3373
|
-
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
|
3374
|
-
* (e.g. `onEnter`) because user already has direct access to the node.
|
|
3375
|
-
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
|
3376
|
-
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
|
3377
|
-
* (see
|
|
3378
|
-
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
3379
|
-
*/
|
|
3380
|
-
nodeRef: propTypes.exports.shape({
|
|
3381
|
-
current: typeof Element === 'undefined' ? propTypes.exports.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
3382
|
-
var value = propValue[key];
|
|
3383
|
-
return propTypes.exports.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
3384
|
-
}
|
|
3385
|
-
}),
|
|
3386
|
-
|
|
3387
|
-
/**
|
|
3388
|
-
* A `function` child can be used instead of a React element. This function is
|
|
3389
|
-
* called with the current transition status (`'entering'`, `'entered'`,
|
|
3390
|
-
* `'exiting'`, `'exited'`), which can be used to apply context
|
|
3391
|
-
* specific props to a component.
|
|
3392
|
-
*
|
|
3393
|
-
* ```jsx
|
|
3394
|
-
* <Transition in={this.state.in} timeout={150}>
|
|
3395
|
-
* {state => (
|
|
3396
|
-
* <MyComponent className={`fade fade-${state}`} />
|
|
3397
|
-
* )}
|
|
3398
|
-
* </Transition>
|
|
3399
|
-
* ```
|
|
3400
|
-
*/
|
|
3401
|
-
children: propTypes.exports.oneOfType([propTypes.exports.func.isRequired, propTypes.exports.element.isRequired]).isRequired,
|
|
3402
|
-
|
|
3403
|
-
/**
|
|
3404
|
-
* Show the component; triggers the enter or exit states
|
|
3405
|
-
*/
|
|
3406
|
-
in: propTypes.exports.bool,
|
|
3407
|
-
|
|
3408
|
-
/**
|
|
3409
|
-
* By default the child component is mounted immediately along with
|
|
3410
|
-
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
3411
|
-
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
3412
|
-
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
3413
|
-
*/
|
|
3414
|
-
mountOnEnter: propTypes.exports.bool,
|
|
3415
|
-
|
|
3416
|
-
/**
|
|
3417
|
-
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
3418
|
-
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
3419
|
-
*/
|
|
3420
|
-
unmountOnExit: propTypes.exports.bool,
|
|
3421
|
-
|
|
3422
|
-
/**
|
|
3423
|
-
* By default the child component does not perform the enter transition when
|
|
3424
|
-
* it first mounts, regardless of the value of `in`. If you want this
|
|
3425
|
-
* behavior, set both `appear` and `in` to `true`.
|
|
3426
|
-
*
|
|
3427
|
-
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
|
3428
|
-
* > only adds an additional enter transition. However, in the
|
|
3429
|
-
* > `<CSSTransition>` component that first enter transition does result in
|
|
3430
|
-
* > additional `.appear-*` classes, that way you can choose to style it
|
|
3431
|
-
* > differently.
|
|
3432
|
-
*/
|
|
3433
|
-
appear: propTypes.exports.bool,
|
|
3434
|
-
|
|
3435
|
-
/**
|
|
3436
|
-
* Enable or disable enter transitions.
|
|
3437
|
-
*/
|
|
3438
|
-
enter: propTypes.exports.bool,
|
|
3439
|
-
|
|
3440
|
-
/**
|
|
3441
|
-
* Enable or disable exit transitions.
|
|
3442
|
-
*/
|
|
3443
|
-
exit: propTypes.exports.bool,
|
|
3444
|
-
|
|
3445
|
-
/**
|
|
3446
|
-
* The duration of the transition, in milliseconds.
|
|
3447
|
-
* Required unless `addEndListener` is provided.
|
|
3448
|
-
*
|
|
3449
|
-
* You may specify a single timeout for all transitions:
|
|
3450
|
-
*
|
|
3451
|
-
* ```jsx
|
|
3452
|
-
* timeout={500}
|
|
3453
|
-
* ```
|
|
3454
|
-
*
|
|
3455
|
-
* or individually:
|
|
3456
|
-
*
|
|
3457
|
-
* ```jsx
|
|
3458
|
-
* timeout={{
|
|
3459
|
-
* appear: 500,
|
|
3460
|
-
* enter: 300,
|
|
3461
|
-
* exit: 500,
|
|
3462
|
-
* }}
|
|
3463
|
-
* ```
|
|
3464
|
-
*
|
|
3465
|
-
* - `appear` defaults to the value of `enter`
|
|
3466
|
-
* - `enter` defaults to `0`
|
|
3467
|
-
* - `exit` defaults to `0`
|
|
3468
|
-
*
|
|
3469
|
-
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
3470
|
-
*/
|
|
3471
|
-
timeout: function timeout(props) {
|
|
3472
|
-
var pt = timeoutsShape;
|
|
3473
|
-
if (!props.addEndListener) pt = pt.isRequired;
|
|
3474
|
-
|
|
3475
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3476
|
-
args[_key - 1] = arguments[_key];
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
return pt.apply(void 0, [props].concat(args));
|
|
3480
|
-
},
|
|
3481
|
-
|
|
3482
|
-
/**
|
|
3483
|
-
* Add a custom transition end trigger. Called with the transitioning
|
|
3484
|
-
* DOM node and a `done` callback. Allows for more fine grained transition end
|
|
3485
|
-
* logic. Timeouts are still used as a fallback if provided.
|
|
3486
|
-
*
|
|
3487
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3488
|
-
*
|
|
3489
|
-
* ```jsx
|
|
3490
|
-
* addEndListener={(node, done) => {
|
|
3491
|
-
* // use the css transitionend event to mark the finish of a transition
|
|
3492
|
-
* node.addEventListener('transitionend', done, false);
|
|
3493
|
-
* }}
|
|
3494
|
-
* ```
|
|
3495
|
-
*/
|
|
3496
|
-
addEndListener: propTypes.exports.func,
|
|
3497
|
-
|
|
3498
|
-
/**
|
|
3499
|
-
* Callback fired before the "entering" status is applied. An extra parameter
|
|
3500
|
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
3501
|
-
*
|
|
3502
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3503
|
-
*
|
|
3504
|
-
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
3505
|
-
*/
|
|
3506
|
-
onEnter: propTypes.exports.func,
|
|
3507
|
-
|
|
3508
|
-
/**
|
|
3509
|
-
* Callback fired after the "entering" status is applied. An extra parameter
|
|
3510
|
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
3511
|
-
*
|
|
3512
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3513
|
-
*
|
|
3514
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
3515
|
-
*/
|
|
3516
|
-
onEntering: propTypes.exports.func,
|
|
3517
|
-
|
|
3518
|
-
/**
|
|
3519
|
-
* Callback fired after the "entered" status is applied. An extra parameter
|
|
3520
|
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
3521
|
-
*
|
|
3522
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3523
|
-
*
|
|
3524
|
-
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
3525
|
-
*/
|
|
3526
|
-
onEntered: propTypes.exports.func,
|
|
3527
|
-
|
|
3528
|
-
/**
|
|
3529
|
-
* Callback fired before the "exiting" status is applied.
|
|
3530
|
-
*
|
|
3531
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3532
|
-
*
|
|
3533
|
-
* @type Function(node: HtmlElement) -> void
|
|
3534
|
-
*/
|
|
3535
|
-
onExit: propTypes.exports.func,
|
|
3536
|
-
|
|
3537
|
-
/**
|
|
3538
|
-
* Callback fired after the "exiting" status is applied.
|
|
3539
|
-
*
|
|
3540
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3541
|
-
*
|
|
3542
|
-
* @type Function(node: HtmlElement) -> void
|
|
3543
|
-
*/
|
|
3544
|
-
onExiting: propTypes.exports.func,
|
|
3545
|
-
|
|
3546
|
-
/**
|
|
3547
|
-
* Callback fired after the "exited" status is applied.
|
|
3548
|
-
*
|
|
3549
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
3550
|
-
*
|
|
3551
|
-
* @type Function(node: HtmlElement) -> void
|
|
3552
|
-
*/
|
|
3553
|
-
onExited: propTypes.exports.func
|
|
3554
|
-
} : {}; // Name the function so it is clearer in the documentation
|
|
2044
|
+
Transition.propTypes = {}; // Name the function so it is clearer in the documentation
|
|
3555
2045
|
|
|
3556
2046
|
function noop() {}
|
|
3557
2047
|
|
|
@@ -3846,136 +2336,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
|
|
|
3846
2336
|
CSSTransition.defaultProps = {
|
|
3847
2337
|
classNames: ''
|
|
3848
2338
|
};
|
|
3849
|
-
CSSTransition.propTypes =
|
|
3850
|
-
/**
|
|
3851
|
-
* The animation classNames applied to the component as it appears, enters,
|
|
3852
|
-
* exits or has finished the transition. A single name can be provided, which
|
|
3853
|
-
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
3854
|
-
*
|
|
3855
|
-
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
3856
|
-
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
3857
|
-
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
3858
|
-
*
|
|
3859
|
-
* A few details to note about how these classes are applied:
|
|
3860
|
-
*
|
|
3861
|
-
* 1. They are _joined_ with the ones that are already defined on the child
|
|
3862
|
-
* component, so if you want to add some base styles, you can use
|
|
3863
|
-
* `className` without worrying that it will be overridden.
|
|
3864
|
-
*
|
|
3865
|
-
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
3866
|
-
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
3867
|
-
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
3868
|
-
*
|
|
3869
|
-
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
3870
|
-
* allows you to define different behavior for when appearing is done and
|
|
3871
|
-
* when regular entering is done, using selectors like
|
|
3872
|
-
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
3873
|
-
* an epic entrance animation when element first appears in the DOM using
|
|
3874
|
-
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
3875
|
-
* simply use `fade-enter-done` for defining both cases.
|
|
3876
|
-
*
|
|
3877
|
-
* Each individual classNames can also be specified independently like:
|
|
3878
|
-
*
|
|
3879
|
-
* ```js
|
|
3880
|
-
* classNames={{
|
|
3881
|
-
* appear: 'my-appear',
|
|
3882
|
-
* appearActive: 'my-active-appear',
|
|
3883
|
-
* appearDone: 'my-done-appear',
|
|
3884
|
-
* enter: 'my-enter',
|
|
3885
|
-
* enterActive: 'my-active-enter',
|
|
3886
|
-
* enterDone: 'my-done-enter',
|
|
3887
|
-
* exit: 'my-exit',
|
|
3888
|
-
* exitActive: 'my-active-exit',
|
|
3889
|
-
* exitDone: 'my-done-exit',
|
|
3890
|
-
* }}
|
|
3891
|
-
* ```
|
|
3892
|
-
*
|
|
3893
|
-
* If you want to set these classes using CSS Modules:
|
|
3894
|
-
*
|
|
3895
|
-
* ```js
|
|
3896
|
-
* import styles from './styles.css';
|
|
3897
|
-
* ```
|
|
3898
|
-
*
|
|
3899
|
-
* you might want to use camelCase in your CSS file, that way could simply
|
|
3900
|
-
* spread them instead of listing them one by one:
|
|
3901
|
-
*
|
|
3902
|
-
* ```js
|
|
3903
|
-
* classNames={{ ...styles }}
|
|
3904
|
-
* ```
|
|
3905
|
-
*
|
|
3906
|
-
* @type {string | {
|
|
3907
|
-
* appear?: string,
|
|
3908
|
-
* appearActive?: string,
|
|
3909
|
-
* appearDone?: string,
|
|
3910
|
-
* enter?: string,
|
|
3911
|
-
* enterActive?: string,
|
|
3912
|
-
* enterDone?: string,
|
|
3913
|
-
* exit?: string,
|
|
3914
|
-
* exitActive?: string,
|
|
3915
|
-
* exitDone?: string,
|
|
3916
|
-
* }}
|
|
3917
|
-
*/
|
|
3918
|
-
classNames: classNamesShape,
|
|
3919
|
-
|
|
3920
|
-
/**
|
|
3921
|
-
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
3922
|
-
* applied.
|
|
3923
|
-
*
|
|
3924
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3925
|
-
*
|
|
3926
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
3927
|
-
*/
|
|
3928
|
-
onEnter: propTypes.exports.func,
|
|
3929
|
-
|
|
3930
|
-
/**
|
|
3931
|
-
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
3932
|
-
* 'appear-active' class is applied.
|
|
3933
|
-
*
|
|
3934
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3935
|
-
*
|
|
3936
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
3937
|
-
*/
|
|
3938
|
-
onEntering: propTypes.exports.func,
|
|
3939
|
-
|
|
3940
|
-
/**
|
|
3941
|
-
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
3942
|
-
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
3943
|
-
*
|
|
3944
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
3945
|
-
*
|
|
3946
|
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
3947
|
-
*/
|
|
3948
|
-
onEntered: propTypes.exports.func,
|
|
3949
|
-
|
|
3950
|
-
/**
|
|
3951
|
-
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
3952
|
-
* applied.
|
|
3953
|
-
*
|
|
3954
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
3955
|
-
*
|
|
3956
|
-
* @type Function(node: HtmlElement)
|
|
3957
|
-
*/
|
|
3958
|
-
onExit: propTypes.exports.func,
|
|
3959
|
-
|
|
3960
|
-
/**
|
|
3961
|
-
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
3962
|
-
*
|
|
3963
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
3964
|
-
*
|
|
3965
|
-
* @type Function(node: HtmlElement)
|
|
3966
|
-
*/
|
|
3967
|
-
onExiting: propTypes.exports.func,
|
|
3968
|
-
|
|
3969
|
-
/**
|
|
3970
|
-
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
3971
|
-
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
3972
|
-
*
|
|
3973
|
-
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
3974
|
-
*
|
|
3975
|
-
* @type Function(node: HtmlElement)
|
|
3976
|
-
*/
|
|
3977
|
-
onExited: propTypes.exports.func
|
|
3978
|
-
}) : {};
|
|
2339
|
+
CSSTransition.propTypes = {};
|
|
3979
2340
|
var CSSTransition$1 = CSSTransition;
|
|
3980
2341
|
|
|
3981
2342
|
var Body = function Body(_ref) {
|
|
@@ -4038,7 +2399,7 @@ var Slider = function Slider(_ref) {
|
|
|
4038
2399
|
timeout: 300
|
|
4039
2400
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4040
2401
|
className: "neeto-filters-slider__pane"
|
|
4041
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", _extends
|
|
2402
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
4042
2403
|
className: classnames__default["default"]("neeto-filters-slider__wrapper", _defineProperty({
|
|
4043
2404
|
"neeto-filters-slider__wrapper--xsmall": size === SIZES.xsmall,
|
|
4044
2405
|
"neeto-filters-slider__wrapper--small": size === SIZES.small,
|
|
@@ -4077,7 +2438,7 @@ var useFilters = function useFilters(_ref) {
|
|
|
4077
2438
|
var handlePrecenseOfDefaultFilters = function handlePrecenseOfDefaultFilters(defaultFilters) {
|
|
4078
2439
|
var params = buildUrlFromFilters({
|
|
4079
2440
|
columns: columns,
|
|
4080
|
-
filters: isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(defaultFilters), [keywordFilter]) : defaultFilters
|
|
2441
|
+
filters: isKeywordFilterPresent(keywordFilter) && neetoCist.isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(defaultFilters), [keywordFilter]) : defaultFilters
|
|
4081
2442
|
});
|
|
4082
2443
|
history.replace({
|
|
4083
2444
|
search: params
|
|
@@ -4097,7 +2458,7 @@ var useFilters = function useFilters(_ref) {
|
|
|
4097
2458
|
return;
|
|
4098
2459
|
}
|
|
4099
2460
|
var newFilters = buildFiltersFromSearchParams(columns);
|
|
4100
|
-
var filtersPayload = isNotEmpty(getSearchTermFromUrl()) ? ramda.append(keywordFilter, newFilters) : newFilters;
|
|
2461
|
+
var filtersPayload = isKeywordFilterPresent(keywordFilter) && neetoCist.isNotEmpty(getSearchTermFromUrl()) ? ramda.append(keywordFilter, newFilters) : newFilters;
|
|
4101
2462
|
handleFiltersChange(filtersPayload);
|
|
4102
2463
|
onSelectorsChange(buildSelectorsFromURL(columns));
|
|
4103
2464
|
};
|
|
@@ -4122,7 +2483,7 @@ var useFilters = function useFilters(_ref) {
|
|
|
4122
2483
|
initialRender.current = false;
|
|
4123
2484
|
var keywordValue = getSearchTermFromUrl();
|
|
4124
2485
|
var defaultFilters = buildDefaultFilters(columns, filters);
|
|
4125
|
-
isNotEmpty(defaultFilters) && handlePrecenseOfDefaultFilters(defaultFilters);
|
|
2486
|
+
neetoCist.isNotEmpty(defaultFilters) && handlePrecenseOfDefaultFilters(defaultFilters);
|
|
4126
2487
|
prevFilters.current = ramda.append(ramda.mergeRight(keywordFilter, {
|
|
4127
2488
|
value: keywordValue
|
|
4128
2489
|
}), filters);
|
|
@@ -4146,14 +2507,14 @@ var buildDropdownValue = function buildDropdownValue(_ref) {
|
|
|
4146
2507
|
return filter.value.includes(value);
|
|
4147
2508
|
});
|
|
4148
2509
|
}
|
|
4149
|
-
return findBy({
|
|
2510
|
+
return neetoCist.findBy({
|
|
4150
2511
|
value: filter.value
|
|
4151
2512
|
}, options);
|
|
4152
2513
|
};
|
|
4153
2514
|
var buildSingleTimeValue = function buildSingleTimeValue(filter) {
|
|
4154
2515
|
var _findBy2;
|
|
4155
2516
|
if (!filter) return null;
|
|
4156
|
-
return (_findBy2 = findBy({
|
|
2517
|
+
return (_findBy2 = neetoCist.findBy({
|
|
4157
2518
|
value: filter.value
|
|
4158
2519
|
}, TIME_OPTIONS)) !== null && _findBy2 !== void 0 ? _findBy2 : ramda.last(TIME_OPTIONS);
|
|
4159
2520
|
};
|
|
@@ -4170,24 +2531,24 @@ var buildDropdownOptions = function buildDropdownOptions(_ref3) {
|
|
|
4170
2531
|
if (!filter) return options;
|
|
4171
2532
|
if (isMulti(defaultType)) {
|
|
4172
2533
|
var selectedOptions = filter.value.map(function (value) {
|
|
4173
|
-
return findBy({
|
|
2534
|
+
return neetoCist.findBy({
|
|
4174
2535
|
value: value
|
|
4175
|
-
}, options) || toLabelAndValue(value);
|
|
2536
|
+
}, options) || neetoCist.toLabelAndValue(value);
|
|
4176
2537
|
});
|
|
4177
2538
|
var nonSelectedOptions = options.filter(function (option) {
|
|
4178
2539
|
return !filter.value.includes(option.value);
|
|
4179
2540
|
});
|
|
4180
2541
|
return ramda.concat(selectedOptions, nonSelectedOptions);
|
|
4181
2542
|
}
|
|
4182
|
-
if (!findBy({
|
|
2543
|
+
if (!neetoCist.findBy({
|
|
4183
2544
|
value: filter.value
|
|
4184
2545
|
}, options)) {
|
|
4185
|
-
return ramda.append(toLabelAndValue(filter.value), options);
|
|
2546
|
+
return ramda.append(neetoCist.toLabelAndValue(filter.value), options);
|
|
4186
2547
|
}
|
|
4187
2548
|
return options;
|
|
4188
2549
|
};
|
|
4189
2550
|
var initializeDateRule = function initializeDateRule(filter) {
|
|
4190
|
-
return filter ? findBy({
|
|
2551
|
+
return filter ? neetoCist.findBy({
|
|
4191
2552
|
value: filter === null || filter === void 0 ? void 0 : filter.value
|
|
4192
2553
|
}, DATE_OPTIONS) || findDateOption(filter, DATE_OPTIONS) : {};
|
|
4193
2554
|
};
|
|
@@ -4198,20 +2559,20 @@ var getDateValue = function getDateValue(value, rule) {
|
|
|
4198
2559
|
if (rule.value === "custom-date-range") {
|
|
4199
2560
|
return value;
|
|
4200
2561
|
}
|
|
4201
|
-
return rule.value === "before" ?
|
|
2562
|
+
return rule.value === "before" ? dayjs(value[1]).add(1, "day") : dayjs(value[0]).subtract(1, "day");
|
|
4202
2563
|
};
|
|
4203
2564
|
var findDateOption = function findDateOption(filter, options) {
|
|
4204
2565
|
var value = filter.value;
|
|
4205
|
-
var isBeforeOrAfter =
|
|
2566
|
+
var isBeforeOrAfter = dayjs(value[1]).diff(dayjs(value[0]), "year") >= 90;
|
|
4206
2567
|
if (ramda.not(isBeforeOrAfter)) {
|
|
4207
2568
|
return ramda.last(options);
|
|
4208
2569
|
}
|
|
4209
|
-
var currentMoment =
|
|
4210
|
-
var diffWithStart = Math.abs(currentMoment.diff(
|
|
4211
|
-
var diffWithEnd = Math.abs(currentMoment.diff(
|
|
4212
|
-
var returnOption = diffWithStart < diffWithEnd ? findBy({
|
|
2570
|
+
var currentMoment = dayjs();
|
|
2571
|
+
var diffWithStart = Math.abs(currentMoment.diff(dayjs(value[0]), "year"));
|
|
2572
|
+
var diffWithEnd = Math.abs(currentMoment.diff(dayjs(value[1]), "year"));
|
|
2573
|
+
var returnOption = diffWithStart < diffWithEnd ? neetoCist.findBy({
|
|
4213
2574
|
value: "after"
|
|
4214
|
-
}, options) : findBy({
|
|
2575
|
+
}, options) : neetoCist.findBy({
|
|
4215
2576
|
value: "before"
|
|
4216
2577
|
}, options);
|
|
4217
2578
|
return returnOption;
|
|
@@ -4258,7 +2619,7 @@ var Boolean = function Boolean(_ref) {
|
|
|
4258
2619
|
});
|
|
4259
2620
|
handleApplyFilter(updatedFilter);
|
|
4260
2621
|
};
|
|
4261
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Select, _extends
|
|
2622
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Select, _extends({
|
|
4262
2623
|
autoFocus: autoFocus,
|
|
4263
2624
|
label: label,
|
|
4264
2625
|
options: options,
|
|
@@ -4343,7 +2704,7 @@ var Datetime = function Datetime(_ref) {
|
|
|
4343
2704
|
resource: label.toLocaleLowerCase()
|
|
4344
2705
|
}),
|
|
4345
2706
|
onChange: handleChange
|
|
4346
|
-
}), isDatePickerShown && /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends
|
|
2707
|
+
}), isDatePickerShown && /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends({
|
|
4347
2708
|
"data-cy": "neeto-filters-".concat(key, "-date-range"),
|
|
4348
2709
|
getPopupContainer: ramda.prop("parentNode"),
|
|
4349
2710
|
type: (selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.value) === "custom-date-range" ? "range" : "date",
|
|
@@ -4393,7 +2754,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
4393
2754
|
});
|
|
4394
2755
|
handleApplyFilter(updatedFilter);
|
|
4395
2756
|
};
|
|
4396
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Select, _extends
|
|
2757
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Select, _extends({
|
|
4397
2758
|
autoFocus: autoFocus,
|
|
4398
2759
|
label: label,
|
|
4399
2760
|
options: options,
|
|
@@ -4417,7 +2778,7 @@ var SingleDatetime = function SingleDatetime(_ref) {
|
|
|
4417
2778
|
handleApplyFilter = _ref.handleApplyFilter,
|
|
4418
2779
|
autoFocus = _ref.autoFocus;
|
|
4419
2780
|
var _useState = React.useState(function () {
|
|
4420
|
-
return findBy({
|
|
2781
|
+
return neetoCist.findBy({
|
|
4421
2782
|
value: filter === null || filter === void 0 ? void 0 : filter.rule
|
|
4422
2783
|
}, SINGLE_DATE_OPTIONS) || SINGLE_DATE_OPTIONS[0];
|
|
4423
2784
|
}),
|
|
@@ -4434,9 +2795,8 @@ var SingleDatetime = function SingleDatetime(_ref) {
|
|
|
4434
2795
|
|
|
4435
2796
|
// Reset states when "Clear filters" button is clicked.
|
|
4436
2797
|
React.useEffect(function () {
|
|
4437
|
-
if (ramda.isEmpty(filters))
|
|
4438
|
-
|
|
4439
|
-
}
|
|
2798
|
+
if (!ramda.isEmpty(filters)) return;
|
|
2799
|
+
setSelectedRule(SINGLE_DATE_OPTIONS[0]);
|
|
4440
2800
|
}, [filters]);
|
|
4441
2801
|
var handleRuleChange = function handleRuleChange(ruleOption) {
|
|
4442
2802
|
setSelectedRule(ruleOption);
|
|
@@ -4484,7 +2844,7 @@ var SingleDatetime = function SingleDatetime(_ref) {
|
|
|
4484
2844
|
strategy: "fixed",
|
|
4485
2845
|
value: selectedRule,
|
|
4486
2846
|
onChange: handleRuleChange
|
|
4487
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends
|
|
2847
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends({
|
|
4488
2848
|
autoFocus: autoFocus,
|
|
4489
2849
|
value: value,
|
|
4490
2850
|
"data-cy": "neeto-filters-".concat(key, "-filter"),
|
|
@@ -4501,7 +2861,7 @@ var SingleTime = function SingleTime(_ref) {
|
|
|
4501
2861
|
handleApplyFilter = _ref.handleApplyFilter,
|
|
4502
2862
|
autoFocus = _ref.autoFocus;
|
|
4503
2863
|
var _useState = React.useState(function () {
|
|
4504
|
-
return findBy({
|
|
2864
|
+
return neetoCist.findBy({
|
|
4505
2865
|
value: filter === null || filter === void 0 ? void 0 : filter.rule
|
|
4506
2866
|
}, SINGLE_TIME_OPTIONS) || SINGLE_TIME_OPTIONS[0];
|
|
4507
2867
|
}),
|
|
@@ -4516,9 +2876,8 @@ var SingleTime = function SingleTime(_ref) {
|
|
|
4516
2876
|
var timePickerType = selectedRule.value === "between" ? "range" : "time";
|
|
4517
2877
|
var value = filter === null || filter === void 0 ? void 0 : filter.value;
|
|
4518
2878
|
React.useEffect(function () {
|
|
4519
|
-
if (ramda.isEmpty(filters))
|
|
4520
|
-
|
|
4521
|
-
}
|
|
2879
|
+
if (!ramda.isEmpty(filters)) return;
|
|
2880
|
+
setSelectedRule(SINGLE_TIME_OPTIONS[0]);
|
|
4522
2881
|
}, [filters]);
|
|
4523
2882
|
var handleRuleChange = function handleRuleChange(ruleOption) {
|
|
4524
2883
|
setSelectedRule(ruleOption);
|
|
@@ -4559,10 +2918,10 @@ var SingleTime = function SingleTime(_ref) {
|
|
|
4559
2918
|
strategy: "fixed",
|
|
4560
2919
|
value: selectedRule,
|
|
4561
2920
|
onChange: handleRuleChange
|
|
4562
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.TimePicker, _extends
|
|
4563
|
-
use12Hours: true,
|
|
2921
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.TimePicker, _extends({
|
|
4564
2922
|
autoFocus: autoFocus,
|
|
4565
2923
|
value: value,
|
|
2924
|
+
use12Hours: true,
|
|
4566
2925
|
className: "w-full",
|
|
4567
2926
|
"data-cy": "neeto-filters-".concat(key, "-filter"),
|
|
4568
2927
|
format: "h:mm A",
|
|
@@ -4595,7 +2954,7 @@ var Text = function Text(_ref) {
|
|
|
4595
2954
|
inputValue = _useState2[0],
|
|
4596
2955
|
setInputValue = _useState2[1];
|
|
4597
2956
|
var _useState3 = React.useState(function () {
|
|
4598
|
-
return findBy({
|
|
2957
|
+
return neetoCist.findBy({
|
|
4599
2958
|
value: filter === null || filter === void 0 ? void 0 : filter.rule
|
|
4600
2959
|
}, ruleOptions) || ruleOptions[0];
|
|
4601
2960
|
}),
|
|
@@ -4619,10 +2978,9 @@ var Text = function Text(_ref) {
|
|
|
4619
2978
|
handleApplyFilter(updatedFilter);
|
|
4620
2979
|
};
|
|
4621
2980
|
var handleKeydown = function handleKeydown(e) {
|
|
4622
|
-
if (e.key === "Enter")
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
}
|
|
2981
|
+
if (!(e.key === "Enter")) return;
|
|
2982
|
+
handleUpdateAndApplyFilter(inputValue);
|
|
2983
|
+
onClose();
|
|
4626
2984
|
};
|
|
4627
2985
|
var handleRuleChange = function handleRuleChange(ruleOption) {
|
|
4628
2986
|
setSelectedRule(ruleOption);
|
|
@@ -4653,7 +3011,7 @@ var Text = function Text(_ref) {
|
|
|
4653
3011
|
strategy: "fixed",
|
|
4654
3012
|
value: selectedRule,
|
|
4655
3013
|
onChange: handleRuleChange
|
|
4656
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends
|
|
3014
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends({
|
|
4657
3015
|
autoFocus: autoFocus,
|
|
4658
3016
|
"data-cy": "neeto-filters-".concat(key, "-filter"),
|
|
4659
3017
|
label: !showRuleSelector && label,
|
|
@@ -4723,7 +3081,7 @@ var Time = function Time(_ref) {
|
|
|
4723
3081
|
resource: label.toLocaleLowerCase()
|
|
4724
3082
|
}),
|
|
4725
3083
|
onChange: handleChange
|
|
4726
|
-
}), isCustomTimeRangeShown && /*#__PURE__*/React__default["default"].createElement(neetoui.TimePicker, _extends
|
|
3084
|
+
}), isCustomTimeRangeShown && /*#__PURE__*/React__default["default"].createElement(neetoui.TimePicker, _extends({
|
|
4727
3085
|
use12Hours: true,
|
|
4728
3086
|
"data-cy": "neeto-filters-".concat(key, "-date-range"),
|
|
4729
3087
|
format: "h:mm A",
|
|
@@ -4745,14 +3103,14 @@ var Item = function Item(_ref) {
|
|
|
4745
3103
|
_column$defaultType = column.defaultType,
|
|
4746
3104
|
defaultType = _column$defaultType === void 0 ? column.type : _column$defaultType;
|
|
4747
3105
|
var filter = React.useMemo(function () {
|
|
4748
|
-
return findBy({
|
|
3106
|
+
return neetoCist.findBy({
|
|
4749
3107
|
key: key
|
|
4750
3108
|
}, filters);
|
|
4751
3109
|
}, [filters, key]);
|
|
4752
3110
|
var handleApplyFilter = function handleApplyFilter(updatedFilter) {
|
|
4753
|
-
if (updatedFilter._delete) onChange(removeBy({
|
|
3111
|
+
if (updatedFilter._delete) onChange(neetoCist.removeBy({
|
|
4754
3112
|
key: key
|
|
4755
|
-
}, filters));else if (!filter) onChange(ramda.append(updatedFilter, filters));else onChange(replaceBy({
|
|
3113
|
+
}, filters));else if (!filter) onChange(ramda.append(updatedFilter, filters));else onChange(neetoCist.replaceBy({
|
|
4756
3114
|
key: key
|
|
4757
3115
|
}, updatedFilter, filters));
|
|
4758
3116
|
};
|
|
@@ -4851,19 +3209,6 @@ var Pane = function Pane(_ref) {
|
|
|
4851
3209
|
groupedColumns = _buildFilteredColumns2 === void 0 ? [] : _buildFilteredColumns2,
|
|
4852
3210
|
_buildFilteredColumns3 = _buildFilteredColumns.ungroupedColumns,
|
|
4853
3211
|
ungroupedColumns = _buildFilteredColumns3 === void 0 ? [] : _buildFilteredColumns3;
|
|
4854
|
-
var handleChange = function handleChange(newFilters) {
|
|
4855
|
-
var isClearAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4856
|
-
var params = buildUrlFromFilters(_objectSpread$1({
|
|
4857
|
-
columns: columns,
|
|
4858
|
-
filters: isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(newFilters), [keywordFilter]) : newFilters
|
|
4859
|
-
}, isClearAll && {
|
|
4860
|
-
isClearAll: true,
|
|
4861
|
-
childrenKeys: childrenKeys
|
|
4862
|
-
}));
|
|
4863
|
-
history.push({
|
|
4864
|
-
search: params
|
|
4865
|
-
});
|
|
4866
|
-
};
|
|
4867
3212
|
var keywordFilter = _objectSpread$1(_objectSpread$1({
|
|
4868
3213
|
type: "text",
|
|
4869
3214
|
rule: "contains",
|
|
@@ -4878,8 +3223,21 @@ var Pane = function Pane(_ref) {
|
|
|
4878
3223
|
keywordFilter: keywordFilter,
|
|
4879
3224
|
onSelectorsChange: onSelectorsChange
|
|
4880
3225
|
});
|
|
3226
|
+
var handleChange = function handleChange(newFilters) {
|
|
3227
|
+
var isClearAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
3228
|
+
var params = buildUrlFromFilters(_objectSpread$1({
|
|
3229
|
+
columns: columns,
|
|
3230
|
+
filters: isKeywordFilterPresent(keywordFilter) && neetoCist.isNotEmpty(getSearchTermFromUrl()) ? [].concat(_toConsumableArray(newFilters), [keywordFilter]) : newFilters
|
|
3231
|
+
}, isClearAll && {
|
|
3232
|
+
isClearAll: true,
|
|
3233
|
+
childrenKeys: childrenKeys
|
|
3234
|
+
}));
|
|
3235
|
+
history.push({
|
|
3236
|
+
search: params
|
|
3237
|
+
});
|
|
3238
|
+
};
|
|
4881
3239
|
var handleClearAll = function handleClearAll() {
|
|
4882
|
-
var params = ramda.omit(["search_term"], utils.getQueryParams());
|
|
3240
|
+
var params = isKeywordFilterPresent(keywordFilter) ? ramda.omit(["search_term"], utils.getQueryParams()) : utils.getQueryParams();
|
|
4883
3241
|
var pathname = window.location.pathname;
|
|
4884
3242
|
history.push(utils.buildUrl(pathname, params));
|
|
4885
3243
|
handleChange([], true);
|
|
@@ -4887,7 +3245,7 @@ var Pane = function Pane(_ref) {
|
|
|
4887
3245
|
var handleClose = function handleClose() {
|
|
4888
3246
|
columns.forEach(function (_ref2) {
|
|
4889
3247
|
var key = _ref2.key;
|
|
4890
|
-
var filter = findBy({
|
|
3248
|
+
var filter = neetoCist.findBy({
|
|
4891
3249
|
key: key
|
|
4892
3250
|
}, filters);
|
|
4893
3251
|
if ((filter === null || filter === void 0 ? void 0 : filter.value) === "") delete searchParams[key];
|
|
@@ -4897,13 +3255,13 @@ var Pane = function Pane(_ref) {
|
|
|
4897
3255
|
var isClearFiltersDisabled = !filters.some(function (_ref3) {
|
|
4898
3256
|
var value = _ref3.value,
|
|
4899
3257
|
defaultValue = _ref3.defaultValue;
|
|
4900
|
-
return isPresent(value) && value !== defaultValue;
|
|
3258
|
+
return neetoCist.isPresent(value) && value !== defaultValue;
|
|
4901
3259
|
}) && !childrenKeys.some(function (key) {
|
|
4902
3260
|
return searchParams[key];
|
|
4903
3261
|
});
|
|
4904
3262
|
return /*#__PURE__*/React__default["default"].createElement(Portal, {
|
|
4905
3263
|
rootId: "neeto-filters-portal"
|
|
4906
|
-
}, /*#__PURE__*/React__default["default"].createElement(Slider, _extends
|
|
3264
|
+
}, /*#__PURE__*/React__default["default"].createElement(Slider, _extends({
|
|
4907
3265
|
isOpen: isOpen,
|
|
4908
3266
|
size: size,
|
|
4909
3267
|
onClose: handleClose
|
|
@@ -4935,10 +3293,10 @@ var Pane = function Pane(_ref) {
|
|
|
4935
3293
|
key: column.key,
|
|
4936
3294
|
onChange: handleChange
|
|
4937
3295
|
});
|
|
4938
|
-
}), isPresent(groupedColumns) && /*#__PURE__*/React__default["default"].createElement(neetoui.Accordion, {
|
|
3296
|
+
}), neetoCist.isPresent(groupedColumns) && /*#__PURE__*/React__default["default"].createElement(neetoui.Accordion, {
|
|
4939
3297
|
defaultActiveKey: groupedColumns.findIndex(function (_ref4) {
|
|
4940
3298
|
var columns = _ref4.columns;
|
|
4941
|
-
return existsBy({
|
|
3299
|
+
return neetoCist.existsBy({
|
|
4942
3300
|
key: isOpen
|
|
4943
3301
|
}, columns);
|
|
4944
3302
|
})
|
|
@@ -4979,7 +3337,7 @@ var Pane = function Pane(_ref) {
|
|
|
4979
3337
|
|
|
4980
3338
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
4981
3339
|
|
|
4982
|
-
var css = ".neeto-filters-bar{align-items:center;display:flex;flex-wrap:wrap}.neeto-filters-bar__block{border-radius:var(--neeto-ui-rounded);display:flex;gap:4px;margin:4px 0;max-width:384px;overflow:hidden;padding:4px 8px;position:relative;transition:var(--neeto-ui-transition);white-space:nowrap}.neeto-filters-bar__block p:first-child{color:rgb(var(--neeto-ui-gray-700))}.neeto-filters-bar__block-close{background-image:linear-gradient(90deg,rgba(var(--neeto-ui-gray-200),.5) 0,rgba(var(--neeto-ui-gray-200),1) 25%);color:rgb(var(--neeto-ui-gray-800));opacity:0;padding:8px;position:absolute;right:0;top:0;transition:var(--neeto-ui-transition)}.neeto-filters-bar__block:active,.neeto-filters-bar__block:hover{background-color:rgb(var(--neeto-ui-gray-200));cursor:pointer}.neeto-filters-bar__block:active .neeto-filters-bar__block-close,.neeto-filters-bar__block:hover .neeto-filters-bar__block-close{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-black));opacity:1}.neeto-filters-bar__block:focus{box-shadow:0 0 0 3px rgba(var(--neeto-ui-gray-800),15%);outline:none}.neeto-filters-bar--separator{align-self:stretch;border-left:1px solid rgb(var(--neeto-ui-gray-400));margin:12px 8px}.neeto-filters-slider__pane{border-radius:12px 0 0 12px;position:fixed;right:0;top:0;z-index:99998}.neeto-filters-slider__wrapper{background-color:rgb(var(--neeto-ui-white));box-shadow:var(--neeto-ui-shadow-m);height:100vh;max-width:100%;transform:translateX(100%);transition:all .3s}.neeto-filters-slider__wrapper--xsmall{width:360px}.neeto-filters-slider__wrapper--small{width:480px}.neeto-filters-slider__wrapper--large{width:50vw}@media screen and (max-width:767px){.neeto-filters-slider__wrapper{width:100vw}}.neeto-filters-slider__close{position:absolute!important;right:24px;top:24px}.neeto-filters-slider__header{padding:24px 60px 24px 24px;width:100%}.neeto-filters-slider__body{font-size:var(--neeto-ui-text-sm);height:calc(100vh - var(--neeto-ui-pane-header-height));overflow-y:auto;padding:0 24px;width:100%}.neeto-filters-slider__body.neeto-filters-slider__body--has-footer{height:calc(100vh - var(--neeto-ui-pane-header-height) - var(--neeto-ui-pane-footer-height))}.neeto-filters-slider__footer{background-color:rgb(var(--neeto-ui-white));min-height:var(--neeto-ui-pane-footer-height);padding:24px;width:100%}.neeto-filters-slider__footer.neeto-filters-slider__footer__absolute{bottom:0;left:0;position:absolute;width:100%}.neeto-filters-slider-enter .neeto-filters-slider__wrapper{transform:translateX(100%)}.neeto-filters-slider-enter-active .neeto-filters-slider__wrapper,.neeto-filters-slider-enter-done .neeto-filters-slider__wrapper{transform:translateX(0)}.neeto-filters-slider-exit .neeto-filters-slider__wrapper,.neeto-filters-slider-exit-active .neeto-filters-slider__wrapper{transform:translateX(100%)}.neeto-filters-pane-filter__body{align-items:stretch!important;gap:20px}.neeto-filters-pane-filter__body>*{flex-grow:0!important}.neeto-filters-pane-filter__body p{text-align:center}.neeto-filters-pane-filter__body .neeto-filters-pane-filter__item-wrapper{display:flex;flex-direction:column;gap:8px}.neeto-filters-pane-filter__body .accordion_item .neeto-filters-pane-filter__item-wrapper{margin-top:16px}.neeto-filters-pane-filter__body .accordion_item .neeto-filters-pane-filter__item-wrapper:first-of-type{margin-top:0}.neeto-filters-pane-filter__body .accordion_item .neeto-ui-input__wrapper{margin-top:16px}.neeto-filters-pane-filter__body .accordion_item .neeto-ui-input__wrapper:first-of-type{margin-top:0}.neeto-filters-pane-filter__body .accordion_item:first-of-type .neeto-ui-accordion__item{padding-top:0}.neeto-filters-pane-filter__body .neeto-ui-accordion__wrapper--last-item{border-bottom:thin solid rgb(var(--neeto-ui-gray-300))}.neeto-filters-pane-filter__footer{justify-content:space-between}.neeto-filters-pane-filter__footer div{display:flex;gap:8px}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL19iYXIuc2NzcyIsInNyYy9zdHlsZXNoZWV0cy9pbmRleC5zY3NzIiwic3JjL3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3NsaWRlci5zY3NzIiwic3JjL3N0eWxlc2hlZXRzL2Fic3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mb290ZXIge1xuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcblxuICAgIGRpdiB7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgZ2FwOiA4cHg7XG4gICAgfVxuICB9XG59XG4iXX0= */";
|
|
3340
|
+
var css = ".neeto-filters-bar{align-items:center;display:flex;flex-wrap:wrap}.neeto-filters-bar__block{border-radius:var(--neeto-ui-rounded);display:flex;gap:4px;margin:4px 0;max-width:384px;overflow:hidden;padding:4px 8px;position:relative;transition:var(--neeto-ui-transition);white-space:nowrap}.neeto-filters-bar__block p:first-child{color:rgb(var(--neeto-ui-gray-700))}.neeto-filters-bar__block-close{background-image:linear-gradient(90deg,rgba(var(--neeto-ui-gray-200),.5) 0,rgba(var(--neeto-ui-gray-200),1) 25%);color:rgb(var(--neeto-ui-gray-800));opacity:0;padding:8px;position:absolute;right:0;top:0;transition:var(--neeto-ui-transition)}.neeto-filters-bar__block:active,.neeto-filters-bar__block:hover{background-color:rgb(var(--neeto-ui-gray-200));cursor:pointer}.neeto-filters-bar__block:active .neeto-filters-bar__block-close,.neeto-filters-bar__block:hover .neeto-filters-bar__block-close{border-radius:var(--neeto-ui-rounded);color:rgb(var(--neeto-ui-black));opacity:1}.neeto-filters-bar__block:focus{box-shadow:0 0 0 3px rgba(var(--neeto-ui-gray-800),15%);outline:none}.neeto-filters-bar--separator{align-self:stretch;border-left:1px solid rgb(var(--neeto-ui-gray-400));margin:12px 8px}.neeto-filters-slider__pane{border-radius:12px 0 0 12px;position:fixed;right:0;top:0;z-index:99998}.neeto-filters-slider__wrapper{background-color:rgb(var(--neeto-ui-white));box-shadow:var(--neeto-ui-shadow-m);height:100vh;max-width:100%;transform:translateX(100%);transition:all .3s}.neeto-filters-slider__wrapper--xsmall{width:360px}.neeto-filters-slider__wrapper--small{width:480px}.neeto-filters-slider__wrapper--large{width:50vw}@media screen and (max-width:767px){.neeto-filters-slider__wrapper{width:100vw}}.neeto-filters-slider__close{position:absolute!important;right:24px;top:24px}.neeto-filters-slider__header{padding:24px 60px 24px 24px;width:100%}.neeto-filters-slider__body{font-size:var(--neeto-ui-text-sm);height:calc(100vh - var(--neeto-ui-pane-header-height));overflow-y:auto;padding:0 24px;width:100%}.neeto-filters-slider__body.neeto-filters-slider__body--has-footer{height:calc(100vh - var(--neeto-ui-pane-header-height) - var(--neeto-ui-pane-footer-height))}.neeto-filters-slider__footer{background-color:rgb(var(--neeto-ui-white));min-height:var(--neeto-ui-pane-footer-height);padding:24px;width:100%}.neeto-filters-slider__footer.neeto-filters-slider__footer__absolute{bottom:0;left:0;position:absolute;width:100%}.neeto-filters-slider-enter .neeto-filters-slider__wrapper{transform:translateX(100%)}.neeto-filters-slider-enter-active .neeto-filters-slider__wrapper,.neeto-filters-slider-enter-done .neeto-filters-slider__wrapper{transform:translateX(0)}.neeto-filters-slider-exit .neeto-filters-slider__wrapper,.neeto-filters-slider-exit-active .neeto-filters-slider__wrapper{transform:translateX(100%)}.neeto-filters-pane-filter__body{align-items:stretch!important;gap:20px}.neeto-filters-pane-filter__body>*{flex-grow:0!important}.neeto-filters-pane-filter__body p{text-align:center}.neeto-filters-pane-filter__body .neeto-filters-pane-filter__item-wrapper{display:flex;flex-direction:column;gap:8px}.neeto-filters-pane-filter__body .accordion_item .neeto-filters-pane-filter__item-wrapper{margin-top:16px}.neeto-filters-pane-filter__body .accordion_item .neeto-filters-pane-filter__item-wrapper:first-of-type{margin-top:0}.neeto-filters-pane-filter__body .accordion_item .neeto-ui-input__wrapper{margin-top:16px}.neeto-filters-pane-filter__body .accordion_item .neeto-ui-input__wrapper:first-of-type{margin-top:0}.neeto-filters-pane-filter__body .accordion_item:first-of-type .neeto-ui-accordion__item{padding-top:0}.neeto-filters-pane-filter__body .neeto-ui-accordion__wrapper--last-item{border-bottom:thin solid rgb(var(--neeto-ui-gray-300))}.neeto-filters-pane-filter__footer{justify-content:space-between}.neeto-filters-pane-filter__footer div{display:flex;gap:8px}\n/*# sourceMappingURL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ICAgICAgfVxuXG4gICAgICAmOmZpcnN0LW9mLXR5cGUge1xuICAgICAgICAubmVldG8tdWktYWNjb3JkaW9uX19pdGVtIHtcbiAgICAgICAgICBwYWRkaW5nLXRvcDogMDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICAubmVldG8tdWktYWNjb3JkaW9uX193cmFwcGVyLS1sYXN0LWl0ZW0ge1xuICAgICAgYm9yZGVyLWJvdHRvbTogdGhpbiBzb2xpZCByZ2IodmFyKC0tbmVldG8tdWktZ3JheS0zMDApKTtcbiAgICB9XG4gIH1cblxuICAmX19mb290ZXIge1xuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcblxuICAgIGRpdiB7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgZ2FwOiA4cHg7XG4gICAgfVxuICB9XG59XG4iXX0= */";
|
|
4983
3341
|
n(css,{});
|
|
4984
3342
|
|
|
4985
3343
|
function ownKeys(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; }
|
|
@@ -5003,25 +3361,25 @@ var Filters = reactUtils.withT(function (_ref) {
|
|
|
5003
3361
|
isSearchable = _ref$isSearchable === void 0 ? false : _ref$isSearchable,
|
|
5004
3362
|
className = _ref.className,
|
|
5005
3363
|
_ref$onSelectorsChang = _ref.onSelectorsChange,
|
|
5006
|
-
onSelectorsChange = _ref$onSelectorsChang === void 0 ? noop
|
|
3364
|
+
onSelectorsChange = _ref$onSelectorsChang === void 0 ? neetoCist.noop : _ref$onSelectorsChang,
|
|
5007
3365
|
_ref$keyword = _ref.keyword,
|
|
5008
3366
|
keyword = _ref$keyword === void 0 ? {
|
|
5009
3367
|
node: "",
|
|
5010
3368
|
value: "",
|
|
5011
|
-
setValue: noop
|
|
3369
|
+
setValue: neetoCist.noop
|
|
5012
3370
|
} : _ref$keyword,
|
|
5013
3371
|
childrenKeys = _ref.childrenKeys,
|
|
5014
3372
|
children = _ref.children;
|
|
5015
3373
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5016
3374
|
className: classnames__default["default"](_defineProperty({}, className, className))
|
|
5017
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends
|
|
3375
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
5018
3376
|
"data-cy": "neeto-filters-toggle-btn",
|
|
5019
3377
|
label: t("neetoFilters.common.filter"),
|
|
5020
3378
|
style: "secondary",
|
|
5021
3379
|
onClick: function onClick() {
|
|
5022
3380
|
return setIsOpen(true);
|
|
5023
3381
|
}
|
|
5024
|
-
}, buttonProps)), /*#__PURE__*/React__default["default"].createElement(Pane, _extends
|
|
3382
|
+
}, buttonProps)), /*#__PURE__*/React__default["default"].createElement(Pane, _extends({
|
|
5025
3383
|
onClose: function onClose() {
|
|
5026
3384
|
return setIsOpen(false);
|
|
5027
3385
|
}
|
|
@@ -5119,31 +3477,20 @@ var Card = function Card(_ref) {
|
|
|
5119
3477
|
validateOnChange: true,
|
|
5120
3478
|
validateOnBlur: true,
|
|
5121
3479
|
validationSchema: SEGMENT_VALIDATION_SCHEMA,
|
|
5122
|
-
onSubmit: handleRename
|
|
3480
|
+
onSubmit: handleRename,
|
|
3481
|
+
enableReinitialize: true
|
|
5123
3482
|
}
|
|
5124
3483
|
}, function (_ref2) {
|
|
5125
3484
|
var resetForm = _ref2.resetForm;
|
|
5126
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isEditing ? /*#__PURE__*/React__default["default"].createElement(
|
|
3485
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isEditing ? /*#__PURE__*/React__default["default"].createElement(InlineInput.FormikInlineInput, {
|
|
5127
3486
|
autoFocus: true,
|
|
5128
3487
|
nakedInput: true,
|
|
3488
|
+
handleCancel: function handleCancel() {
|
|
3489
|
+
return setIsEditing(false);
|
|
3490
|
+
},
|
|
5129
3491
|
name: "name",
|
|
5130
3492
|
placeholder: t("neetoFilters.segments.name")
|
|
5131
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
5132
|
-
cancelButtonProps: {
|
|
5133
|
-
icon: neetoIcons.Close,
|
|
5134
|
-
label: "",
|
|
5135
|
-
style: "text",
|
|
5136
|
-
disabled: !isEditing,
|
|
5137
|
-
onClick: function onClick() {
|
|
5138
|
-
return setIsEditing(false);
|
|
5139
|
-
}
|
|
5140
|
-
},
|
|
5141
|
-
submitButtonProps: {
|
|
5142
|
-
icon: neetoIcons.Check,
|
|
5143
|
-
label: "",
|
|
5144
|
-
style: "text"
|
|
5145
|
-
}
|
|
5146
|
-
})) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3493
|
+
}) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
5147
3494
|
style: "body2"
|
|
5148
3495
|
}, segment.name), /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
5149
3496
|
buttonStyle: "text",
|
|
@@ -5255,7 +3602,7 @@ var MenuBlocks = function MenuBlocks(_ref) {
|
|
|
5255
3602
|
columns: columns,
|
|
5256
3603
|
filters: [],
|
|
5257
3604
|
isClearAll: true,
|
|
5258
|
-
childrenKeys: ramda.pluck("key", filterBy({
|
|
3605
|
+
childrenKeys: ramda.pluck("key", neetoCist.filterBy({
|
|
5259
3606
|
node: "children"
|
|
5260
3607
|
}, (_filters$ = filters[0]) === null || _filters$ === void 0 ? void 0 : _filters$.conditions))
|
|
5261
3608
|
})
|
|
@@ -5304,7 +3651,7 @@ var Segments = function Segments(_ref) {
|
|
|
5304
3651
|
var entity = _ref.entity,
|
|
5305
3652
|
columns = _ref.columns,
|
|
5306
3653
|
_ref$setIsFilterPaneO = _ref.setIsFilterPaneOpen,
|
|
5307
|
-
setIsFilterPaneOpen = _ref$setIsFilterPaneO === void 0 ? noop
|
|
3654
|
+
setIsFilterPaneOpen = _ref$setIsFilterPaneO === void 0 ? neetoCist.noop : _ref$setIsFilterPaneO;
|
|
5308
3655
|
var _useState = React.useState(""),
|
|
5309
3656
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5310
3657
|
searchTerm = _useState2[0],
|