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