@bigbinary/neeto-commons-frontend 1.0.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -9
- package/initializers.js +85 -533
- package/package.json +7 -6
- package/pure.js +392 -0
- package/{react.js → react-utils.js} +88 -22
- package/utils.js +27 -334
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
"watch": "rollup -c rollup.config.js --watch"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"initializers
|
|
17
|
-
"react
|
|
18
|
-
"utils
|
|
16
|
+
"initializers.*",
|
|
17
|
+
"react-utils.*",
|
|
18
|
+
"utils.*",
|
|
19
|
+
"pure.*"
|
|
19
20
|
],
|
|
20
21
|
"lint-staged": {
|
|
21
22
|
"**/*.{js,jsx,json}": [
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"@babel/preset-env": "^7.17.10",
|
|
29
30
|
"@babel/preset-react": "^7.16.7",
|
|
30
31
|
"@bigbinary/neeto-icons": "^1.8.35",
|
|
31
|
-
"@bigbinary/neetoui": "^3.5.
|
|
32
|
+
"@bigbinary/neetoui": "^3.5.14",
|
|
32
33
|
"@honeybadger-io/react": "2.0.1",
|
|
33
34
|
"@rollup/plugin-alias": "^3.1.9",
|
|
34
35
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"dependencies": {},
|
|
77
78
|
"peerDependencies": {
|
|
78
79
|
"@bigbinary/neeto-icons": "^1.8.35",
|
|
79
|
-
"@bigbinary/neetoui": "^3.5.
|
|
80
|
+
"@bigbinary/neetoui": "^3.5.14",
|
|
80
81
|
"@honeybadger-io/react": "2.0.1",
|
|
81
82
|
"axios": "^0.27.2",
|
|
82
83
|
"dayjs": "1.11.1",
|
package/pure.js
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ramda = require('ramda');
|
|
6
|
+
|
|
7
|
+
function _arrayWithHoles(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) {
|
|
12
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13
|
+
|
|
14
|
+
if (_i == null) return;
|
|
15
|
+
var _arr = [];
|
|
16
|
+
var _n = true;
|
|
17
|
+
var _d = false;
|
|
18
|
+
|
|
19
|
+
var _s, _e;
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
23
|
+
_arr.push(_s.value);
|
|
24
|
+
|
|
25
|
+
if (i && _arr.length === i) break;
|
|
26
|
+
}
|
|
27
|
+
} catch (err) {
|
|
28
|
+
_d = true;
|
|
29
|
+
_e = err;
|
|
30
|
+
} finally {
|
|
31
|
+
try {
|
|
32
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
33
|
+
} finally {
|
|
34
|
+
if (_d) throw _e;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return _arr;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function _arrayLikeToArray(arr, len) {
|
|
42
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
43
|
+
|
|
44
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
45
|
+
arr2[i] = arr[i];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return arr2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
52
|
+
if (!o) return;
|
|
53
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
54
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
55
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
56
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
57
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _nonIterableRest() {
|
|
61
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _slicedToArray(arr, i) {
|
|
65
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function _typeof(obj) {
|
|
69
|
+
"@babel/helpers - typeof";
|
|
70
|
+
|
|
71
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
72
|
+
return typeof obj;
|
|
73
|
+
} : function (obj) {
|
|
74
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
75
|
+
}, _typeof(obj);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
var slugify = function slugify(string) {
|
|
79
|
+
return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
|
|
80
|
+
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
81
|
+
.replace(/[^\w-]+/g, "") // Remove all non-word characters
|
|
82
|
+
.replace(/--+/g, "-") // Replace multiple - with single -
|
|
83
|
+
.replace(/^-+/, "") // Trim - from start of text
|
|
84
|
+
.replace(/-+$/, "");
|
|
85
|
+
}; // Trim - from end of text
|
|
86
|
+
|
|
87
|
+
var humanize = function humanize(string) {
|
|
88
|
+
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();
|
|
89
|
+
string = string.charAt(0).toUpperCase() + string.slice(1);
|
|
90
|
+
return string;
|
|
91
|
+
};
|
|
92
|
+
var snakeToCamelCase = function snakeToCamelCase(string) {
|
|
93
|
+
return string.replace(/(_\w)/g, function (letter) {
|
|
94
|
+
return letter[1].toUpperCase();
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
var camelToSnakeCase = function camelToSnakeCase(string) {
|
|
98
|
+
return string.replace(/[A-Z]/g, function (letter) {
|
|
99
|
+
return "_".concat(letter.toLowerCase());
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
var capitalize = function capitalize(string) {
|
|
103
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
104
|
+
};
|
|
105
|
+
var truncate = function truncate(string, length) {
|
|
106
|
+
return string.length > length ? ramda.concat(ramda.slice(0, length, string), "...") : string;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
|
|
110
|
+
if (Array.isArray(object)) {
|
|
111
|
+
return object.map(function (obj) {
|
|
112
|
+
return transformObjectDeep(obj, keyValueTransformer);
|
|
113
|
+
});
|
|
114
|
+
} else if (object === null || _typeof(object) !== "object") {
|
|
115
|
+
return object;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return Object.fromEntries(Object.entries(object).map(function (_ref) {
|
|
119
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
120
|
+
key = _ref2[0],
|
|
121
|
+
value = _ref2[1];
|
|
122
|
+
|
|
123
|
+
return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer));
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
var keysToCamelCase = function keysToCamelCase(object) {
|
|
127
|
+
return transformObjectDeep(object, function (key, value) {
|
|
128
|
+
return [snakeToCamelCase(key), value];
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
var keysToSnakeCase = function keysToSnakeCase(object) {
|
|
132
|
+
return transformObjectDeep(object, function (key, value) {
|
|
133
|
+
return [camelToSnakeCase(key), value];
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
var deepFreezeObject = function deepFreezeObject(object) {
|
|
137
|
+
if (object && _typeof(object) === "object" && !Object.isFrozen(object)) {
|
|
138
|
+
Object.keys(object).forEach(function (property) {
|
|
139
|
+
return deepFreezeObject(object[property]);
|
|
140
|
+
});
|
|
141
|
+
Object.freeze(object);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return object;
|
|
145
|
+
};
|
|
146
|
+
var matches = ramda.curry(function (pattern, object) {
|
|
147
|
+
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
148
|
+
|
|
149
|
+
if (object === pattern) return true;
|
|
150
|
+
if (typeof pattern === "function" && pattern(object, __parent)) return true;
|
|
151
|
+
if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
|
|
152
|
+
if (_typeof(pattern) !== "object") return false;
|
|
153
|
+
return Object.entries(pattern).every(function (_ref3) {
|
|
154
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
155
|
+
key = _ref4[0],
|
|
156
|
+
value = _ref4[1];
|
|
157
|
+
|
|
158
|
+
return matches(value, object[key], __parent);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
var filterNonNull = function filterNonNull(object) {
|
|
162
|
+
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
163
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
164
|
+
v = _ref6[1];
|
|
165
|
+
|
|
166
|
+
return !ramda.isNil(v);
|
|
167
|
+
}).map(function (_ref7) {
|
|
168
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
169
|
+
k = _ref8[0],
|
|
170
|
+
v = _ref8[1];
|
|
171
|
+
|
|
172
|
+
return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
173
|
+
}));
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
function _defineProperty(obj, key, value) {
|
|
177
|
+
if (key in obj) {
|
|
178
|
+
Object.defineProperty(obj, key, {
|
|
179
|
+
value: value,
|
|
180
|
+
enumerable: true,
|
|
181
|
+
configurable: true,
|
|
182
|
+
writable: true
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
obj[key] = value;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return obj;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
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; }
|
|
192
|
+
|
|
193
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
194
|
+
var removeById = ramda.curry(function (id, array) {
|
|
195
|
+
return array.filter(function (item) {
|
|
196
|
+
return item.id !== id;
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
var findById = ramda.curry(function (id, array) {
|
|
200
|
+
return array.find(function (item) {
|
|
201
|
+
return item.id === id;
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
var replaceById = ramda.curry(function (id, newItem, array) {
|
|
205
|
+
return array.map(function (item) {
|
|
206
|
+
return item.id === id ? newItem : item;
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
var modifyById = ramda.curry(function (id, modifier, array) {
|
|
210
|
+
return array.map(function (item) {
|
|
211
|
+
return item.id === id ? modifier(item) : item;
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
var findBy = ramda.curry(function (pattern, array) {
|
|
215
|
+
return array.find(matches(pattern));
|
|
216
|
+
});
|
|
217
|
+
var removeBy = ramda.curry(function (pattern, array) {
|
|
218
|
+
return array.filter(ramda.complement(matches(pattern)));
|
|
219
|
+
});
|
|
220
|
+
var replaceBy = ramda.curry(function (pattern, newItem, array) {
|
|
221
|
+
return array.map(function (item) {
|
|
222
|
+
return matches(pattern, item) ? newItem : item;
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
var modifyBy = ramda.curry(function (pattern, modifier, array) {
|
|
226
|
+
return array.map(function (item) {
|
|
227
|
+
return matches(pattern, item) ? modifier(item) : item;
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
var existsById = ramda.curry(function (id, array) {
|
|
231
|
+
return array.some(function (item) {
|
|
232
|
+
return item.id === id;
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
var existsBy = ramda.curry(function (pattern, array) {
|
|
236
|
+
return array.some(matches(pattern));
|
|
237
|
+
});
|
|
238
|
+
var findLastBy = ramda.curry(function (pattern, array) {
|
|
239
|
+
return ramda.findLast(matches(pattern), array);
|
|
240
|
+
});
|
|
241
|
+
var findIndexById = ramda.curry(function (id, array) {
|
|
242
|
+
return array.findIndex(function (item) {
|
|
243
|
+
return item.id === id;
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
var findIndexBy = ramda.curry(function (pattern, array) {
|
|
247
|
+
return array.findIndex(matches(pattern));
|
|
248
|
+
});
|
|
249
|
+
var findLastIndexBy = ramda.curry(function (pattern, array) {
|
|
250
|
+
return ramda.findLastIndex(matches(pattern), array);
|
|
251
|
+
});
|
|
252
|
+
var filterBy = ramda.curry(function (pattern, array) {
|
|
253
|
+
return array.filter(matches(pattern));
|
|
254
|
+
});
|
|
255
|
+
var countBy = ramda.curry(function (pattern, array) {
|
|
256
|
+
return ramda.count(matches(pattern), array);
|
|
257
|
+
});
|
|
258
|
+
var copyKeys = ramda.curry(function (keyMap, objectArray) {
|
|
259
|
+
return objectArray.map(function (object) {
|
|
260
|
+
var shallowCopy = _objectSpread({}, object);
|
|
261
|
+
|
|
262
|
+
for (var source in keyMap) {
|
|
263
|
+
shallowCopy[keyMap[source]] = object[source];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return shallowCopy;
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
var renameKeys = ramda.curry(function (keyMap, objectArray) {
|
|
270
|
+
return objectArray.map(function (object) {
|
|
271
|
+
var shallowCopy = _objectSpread({}, object);
|
|
272
|
+
|
|
273
|
+
for (var source in keyMap) {
|
|
274
|
+
shallowCopy[keyMap[source]] = object[source];
|
|
275
|
+
delete shallowCopy[source];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
return shallowCopy;
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
var copyKeysDeep = ramda.curry(function (keyMap, objectArray) {
|
|
282
|
+
var copyKeysSingleObject = function copyKeysSingleObject(object, keyMap) {
|
|
283
|
+
var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
284
|
+
return _objectSpread(_objectSpread({}, object), ramda.fromPairs(ramda.toPairs(keyMap).map(function (_ref) {
|
|
285
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
286
|
+
destination = _ref2[0],
|
|
287
|
+
source = _ref2[1];
|
|
288
|
+
|
|
289
|
+
if (typeof source === "function") {
|
|
290
|
+
return [destination, source(object[destination], root)];
|
|
291
|
+
} else if (Array.isArray(source)) {
|
|
292
|
+
return [destination, ramda.path(source, root)];
|
|
293
|
+
} else if (_typeof(source) === "object") {
|
|
294
|
+
return [destination, copyKeysSingleObject(object[destination], source, root)];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return [destination, object[source]];
|
|
298
|
+
})));
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
return objectArray.map(function (object) {
|
|
302
|
+
return copyKeysSingleObject(object, keyMap);
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
var noop = function noop() {};
|
|
307
|
+
var toLabelAndValue = function toLabelAndValue(string) {
|
|
308
|
+
return {
|
|
309
|
+
label: string,
|
|
310
|
+
value: string
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
var getRandomInt = function getRandomInt() {
|
|
314
|
+
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
|
|
315
|
+
var b = arguments.length > 1 ? arguments[1] : undefined;
|
|
316
|
+
|
|
317
|
+
if (b) {
|
|
318
|
+
a = Math.ceil(a);
|
|
319
|
+
b = Math.floor(b);
|
|
320
|
+
} else {
|
|
321
|
+
b = a;
|
|
322
|
+
a = 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return Math.floor(Math.random() * (b - a) + a);
|
|
326
|
+
};
|
|
327
|
+
var randomPick = function randomPick() {
|
|
328
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
329
|
+
args[_key] = arguments[_key];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
var randomNumber = getRandomInt(0, args.length);
|
|
333
|
+
return args[randomNumber];
|
|
334
|
+
};
|
|
335
|
+
var dynamicArray = function dynamicArray(count, elementGenerator) {
|
|
336
|
+
return Array.from({
|
|
337
|
+
length: count
|
|
338
|
+
}, function (_, index) {
|
|
339
|
+
return elementGenerator(index);
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
var isNotNil = ramda.complement(ramda.isNil);
|
|
343
|
+
var isNotEmpty = ramda.complement(ramda.isEmpty);
|
|
344
|
+
var notEquals = ramda.curry(function (x, y) {
|
|
345
|
+
return x !== y;
|
|
346
|
+
});
|
|
347
|
+
var isNot = notEquals;
|
|
348
|
+
var notEqualsDeep = ramda.complement(ramda.equals);
|
|
349
|
+
var isNotEqualDeep = notEqualsDeep;
|
|
350
|
+
|
|
351
|
+
exports.camelToSnakeCase = camelToSnakeCase;
|
|
352
|
+
exports.capitalize = capitalize;
|
|
353
|
+
exports.copyKeys = copyKeys;
|
|
354
|
+
exports.copyKeysDeep = copyKeysDeep;
|
|
355
|
+
exports.countBy = countBy;
|
|
356
|
+
exports.deepFreezeObject = deepFreezeObject;
|
|
357
|
+
exports.dynamicArray = dynamicArray;
|
|
358
|
+
exports.existsBy = existsBy;
|
|
359
|
+
exports.existsById = existsById;
|
|
360
|
+
exports.filterBy = filterBy;
|
|
361
|
+
exports.filterNonNull = filterNonNull;
|
|
362
|
+
exports.findBy = findBy;
|
|
363
|
+
exports.findById = findById;
|
|
364
|
+
exports.findIndexBy = findIndexBy;
|
|
365
|
+
exports.findIndexById = findIndexById;
|
|
366
|
+
exports.findLastBy = findLastBy;
|
|
367
|
+
exports.findLastIndexBy = findLastIndexBy;
|
|
368
|
+
exports.getRandomInt = getRandomInt;
|
|
369
|
+
exports.humanize = humanize;
|
|
370
|
+
exports.isNot = isNot;
|
|
371
|
+
exports.isNotEmpty = isNotEmpty;
|
|
372
|
+
exports.isNotEqualDeep = isNotEqualDeep;
|
|
373
|
+
exports.isNotNil = isNotNil;
|
|
374
|
+
exports.keysToCamelCase = keysToCamelCase;
|
|
375
|
+
exports.keysToSnakeCase = keysToSnakeCase;
|
|
376
|
+
exports.matches = matches;
|
|
377
|
+
exports.modifyBy = modifyBy;
|
|
378
|
+
exports.modifyById = modifyById;
|
|
379
|
+
exports.noop = noop;
|
|
380
|
+
exports.notEquals = notEquals;
|
|
381
|
+
exports.notEqualsDeep = notEqualsDeep;
|
|
382
|
+
exports.randomPick = randomPick;
|
|
383
|
+
exports.removeBy = removeBy;
|
|
384
|
+
exports.removeById = removeById;
|
|
385
|
+
exports.renameKeys = renameKeys;
|
|
386
|
+
exports.replaceBy = replaceBy;
|
|
387
|
+
exports.replaceById = replaceById;
|
|
388
|
+
exports.slugify = slugify;
|
|
389
|
+
exports.snakeToCamelCase = snakeToCamelCase;
|
|
390
|
+
exports.toLabelAndValue = toLabelAndValue;
|
|
391
|
+
exports.transformObjectDeep = transformObjectDeep;
|
|
392
|
+
exports.truncate = truncate;
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var neetoui = require('@bigbinary/neetoui');
|
|
6
7
|
var react = require('@honeybadger-io/react');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
7
9
|
var reactRouterDom = require('react-router-dom');
|
|
8
10
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
9
11
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
10
12
|
var i18next = require('i18next');
|
|
11
13
|
var ramda = require('ramda');
|
|
12
14
|
var axios = require('axios');
|
|
13
|
-
var neetoui = require('@bigbinary/neetoui');
|
|
14
|
-
var reactI18next = require('react-i18next');
|
|
15
15
|
var Yup = require('yup');
|
|
16
16
|
var formik = require('@bigbinary/neetoui/formik');
|
|
17
17
|
var formik$1 = require('formik');
|
|
@@ -19,35 +19,68 @@ var formik$1 = require('formik');
|
|
|
19
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
20
|
|
|
21
21
|
function _interopNamespace(e) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
if (e && e.__esModule) return e;
|
|
23
|
+
var n = Object.create(null);
|
|
24
|
+
if (e) {
|
|
25
|
+
Object.keys(e).forEach(function (k) {
|
|
26
|
+
if (k !== 'default') {
|
|
27
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
28
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return e[k]; }
|
|
31
|
+
});
|
|
32
|
+
}
|
|
31
33
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
n["default"] = e;
|
|
36
|
-
return Object.freeze(n);
|
|
34
|
+
}
|
|
35
|
+
n["default"] = e;
|
|
36
|
+
return Object.freeze(n);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
39
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
40
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
41
41
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
42
42
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
43
43
|
var Yup__namespace = /*#__PURE__*/_interopNamespace(Yup);
|
|
44
44
|
|
|
45
|
+
var _path$2, _path2$1, _path3$1, _path4$1, _path5$1, _path6$1;
|
|
46
|
+
|
|
47
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
48
|
+
|
|
49
|
+
var SvgFallbackComponent = function SvgFallbackComponent(props) {
|
|
50
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
51
|
+
width: 230,
|
|
52
|
+
height: 230,
|
|
53
|
+
viewBox: "0 0 317 320",
|
|
54
|
+
fill: "none",
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
56
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
57
|
+
d: "M271.071 28.008c-8.563-12.544-25.317-10.81-38.577-10.717-30.899.206-159.103.047-168.105.497-13.866.713-27.79 6.33-30.041 20.132-1.216 7.456-.14 15.427.139 22.94 1.118 30.417 1.953 68.044 5.7 95.148 1.016 7.372 2.35 14.761 6.936 20.853 7.238 9.618 21.581 12.998 33.616 13.2.141.236 110.261 2.828 150.068-.154 11.579-.87 25.682-1.74 33.488-11.652 3.913-4.971 4.246-12.136 5.028-18.171 2.816-21.653 4.695-58.296 7.156-97.59.703-11.222 1.25-24.736-5.408-34.486Zm3.044 27.34c-.082 4.493-3.429 57.629-3.648 60.853-.746 10.901-3.144 45.195-6.244 55.905-3.064 10.571-16.833 13.173-26.189 14.167-7.926.857-15.906 1.35-23.877 1.608-40.911 1.322-129.772 1.044-133.332.949-14.415-.663-30.588-4.888-36.021-19.843a81.026 81.026 0 0 1-3.298-20.918c-2.712-32.616-2.294-42.461-4.372-92.667-.293-7.188-1.76-15.638 1.536-22.356C45.898 18.356 67.727 20.417 81.1 20.27c15.73-.172 149.231-.271 157.495-.338 7.347-.06 15.278-.433 22.12 2.756 12.343 5.744 13.613 20.671 13.399 32.649v.01Z",
|
|
58
|
+
fill: "#2F3941"
|
|
59
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
60
|
+
d: "M220.642 50.4a1.586 1.586 0 0 0-.415-1.21 1.607 1.607 0 0 0-1.177-.52c-35.537-.183-99.035-.669-135.303-.466a1.056 1.056 0 0 0-.76.238 1.044 1.044 0 0 0-.373.699c-.43 34.284-.24 68.58-.24 102.862 0 1.636.685 2.122 1.643 2.162 45.113 2.049 92.2.763 137.476.91a2.342 2.342 0 0 0 1.518-.675c.405-.403.648-.94.68-1.509-.443-33.909-1.227-68.635-3.049-102.49Zm-2.277.78c1.187 24.763 1.712 49.901 2.264 74.806-45.853 1.664-90.202.658-135.787.522 0-24.642-.313-50.868 0-76.093 43.482.375 89.992.537 133.523.764ZM91.463 151.855l16.27-22.423 18.964.294c-3.709 5.108-12.138 17.321-14.959 22.512-6.749-.114-20.275-.383-20.275-.383Zm42.769.671 15.24-22.699c6.347 0 12.699-.04 19.055-.12-3.627 6.705-10.492 16.8-14.739 22.976-6.51-.007-13.028-.059-19.556-.157Zm42.469.228c5.503-8.232 10.238-15.419 16.186-23.434 6.993-.163 13.993-.365 20.998-.605-4.761 6.22-12.597 17.04-15.361 23.986-7.274.037-14.548.054-21.823.053Z",
|
|
61
|
+
fill: "#2F3941"
|
|
62
|
+
})), _path3$1 || (_path3$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
63
|
+
d: "M153.904 69.903c-3.722-.185-22.748 30.824-20.049 34.788 2.493 3.664 37.821 2.965 39.914 0 2.39-3.436-16.031-34.596-19.865-34.788Zm.745 10.224c.19 2.645.576 11.328.205 13.546-.27 1.633-1.778.747-1.796-.113-.065-4.437-.177-8.883-.27-13.32a.957.957 0 0 1 .224-.699.925.925 0 0 1 1.551.221.973.973 0 0 1 .086.365Zm.707 18.984c-.727 2.011-2.791 1.389-2.791-.259-.057-3.119 3.572-1.901 2.791.26v-.001ZM155.392 199.891c1.926 4.35 9.139 2.15 6.621-3.658a3.653 3.653 0 0 0-2.338-2.083 3.669 3.669 0 0 0-3.092.487c-1.534 1.051-2.876 3.875-1.144 5.376a.499.499 0 0 0 .85-.353c.107-1.148-.119-2.371.838-3.231a2.288 2.288 0 0 1 3.549.378 2.661 2.661 0 0 1-.467 3.601 3.032 3.032 0 0 1-4.019-.994c-.313-.517-1.037-.06-.798.477ZM145.571 226.664c3.876.66 7.809.928 11.739.798 4.292.127 8.604.273 12.894.248a1.103 1.103 0 0 0 0-2.204c-4.29-.174-8.602-.186-12.894-.206a57.817 57.817 0 0 0-11.739.39.508.508 0 0 0 0 .974Z",
|
|
64
|
+
fill: "#2F3941"
|
|
65
|
+
})), _path4$1 || (_path4$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
66
|
+
d: "M290.099 17.651a26.343 26.343 0 0 0-14.443-13.727c-8.184-3.209-17.301-2.702-25.923-2.622-36.725.338-187.491.226-197.868.656a46.93 46.93 0 0 0-23.035 6.39c-15.658 9.89-12.084 26.386-11.458 44.885 1.203 35.566 2.12 79.713 6.107 111.322 1.049 8.324 2.204 16.755 6.676 24.05 7.983 13.016 24.148 17.93 39.357 17.867.586 0 34.396.811 73.168 1.099.06 2.045.465 4.305.694 6.462-.845-.102-23.612.467-30.303 1.419a.956.956 0 0 0-.771.893.982.982 0 0 0 .07.415c-3.429 2.898-6.462 6.492-9.588 9.661-3.848 3.879-7.906 7.645-11.5 11.758a.822.822 0 0 0 1.163 1.163c4.026-3.696 7.685-7.846 11.473-11.786 3.151-3.283 6.762-6.462 9.603-10.051a284.168 284.168 0 0 1 30.012-1.086c.02 1.633-.067 3.567 1.553 4.394.249.132.684.04.731-.3.119-2.158.03-4.322-.266-6.463a20.308 20.308 0 0 0-1.205-6.462c9.037.065 18.32.097 27.494.082a22.04 22.04 0 0 0-.498 11.488.589.589 0 0 0 .558.411.583.583 0 0 0 .558-.411c.323-1.081.516-2.196.575-3.323 5.085.679 9.298.204 22.997 1.059 2.081.132 5.048.161 6.8.151a49.891 49.891 0 0 0 9.03 9.507 126.265 126.265 0 0 0 10.551 9.276c.89.671 1.988-.798 1.188-1.541-3.547-3.244-7.275-6.278-10.814-9.542a93.19 93.19 0 0 0-8.62-8.122.687.687 0 0 0-.296-.8 16.466 16.466 0 0 0-6.571-1.034 303.46 303.46 0 0 0-8.896-.433 119.194 119.194 0 0 0-15.245-.532c.139-2.202.522-4.237.539-6.156 26.179-.057 51.28-.512 67.03-1.762 13.367-1.064 29.723-1.842 38.877-13.173 4.737-5.858 5.182-13.963 6.112-21.166 3.929-30.407 5.575-77.387 8.06-112.188.997-13.655 2.17-28.933-3.676-41.728Zm1.613 31.317c-.146 4.2-3.837 64.939-4.225 70.999-.84 12.757-3.594 52.564-7.069 65.039-3.355 12.052-18.191 15.578-28.953 16.886-9.22 1.123-18.553 1.715-27.836 2.028-47.201 1.6-152.146 1.016-154.02.947-17.12-.746-35.33-6.288-41.204-24.174-2.597-7.906-2.91-16.548-3.567-24.799-2.594-32.741-2.42-43.205-4.722-107.053-.313-8.463-1.814-17.863.596-26.12C26.38 3.355 51.897 4.623 67.642 4.416c18.621-.248 177.824-.437 187.33-.497 8.565-.045 17.791.174 25.046 5.349 12.02 8.565 12.159 26.432 11.694 39.692v.008ZM2.113 306.233c1.504-2.13 36.665-41.756 38.413-43.727a10.606 10.606 0 0 1 9.066-3.728c23.95-.139 47.907-.29 71.857.095 44.688.73 142.992-1.775 146.288-1.74 3.231.032 7.399-.711 9.864 1.66 2.352 2.264 26.674 35.343 35.177 44.204 1.322 1.374 3.407-.716 2.093-2.093-8.324-8.682-29.105-36.658-32.5-40.888a17.18 17.18 0 0 0-4.722-5.016c-4.243-2.115-53.46.465-74.499.942-24.904.57-18.499.127-150.918.092-5.858 0-10.004.249-13.864 5.043-4.439 5.52-35.989 42.114-37.403 44.477-.44.751.663 1.365 1.148.679ZM310.594 315.641c2.172-3.694 6.668-9.738 4.511-10.439-3.336-1.064-312.387 1.784-312.387 1.784s-5.946.154-.249 5.456c5.697 5.301 5.965 6.656 16.25 6.258 10.284-.397 262.609-1.203 269.642-1.091 7.034.112 20.856.37 22.233-1.968Z",
|
|
67
|
+
fill: "#2F3941"
|
|
68
|
+
})), _path5$1 || (_path5$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
69
|
+
d: "M34.938 281.227c-2.187 2.709-11.898 12.69-12.29 15.161a1.074 1.074 0 0 0 .471 1.163c1.328.85 41.622 0 50.602-.032 18.968-.08 153.463.745 156.865.79 2.603.032 4.444-.519 3.169-3.435-4.347-9.942-8.664-19.883-13.081-29.795-1.123-2.513-2.02-2.851-4.722-2.839 0 0-161.347 0-166.45-.059a.918.918 0 0 0-.874.921.92.92 0 0 0 .874.92c31.896.311 159.016-.087 167.966.445.724.045-.248-1.638 13.958 30.395.199.445.147 1.242-2.207 1.3-1.633.034-157.686-.624-193.429-.358-1.899 0-9.956.338-9.897-.14.2-1.6 12.619-14.798 23.217-31.038.365-.559-.497-1.016-.875-.512-.02-.007-8.443 11.098-13.297 17.113ZM238.084 290.689a39.103 39.103 0 0 0 3.124 6.895c.746 1.022 1.243 1.009 2.486 1.049 6.929.216 26.206-.664 45.483-.286 1.275.027 6.532.83 6.463-1.243-.102-3.042-9.343-13.789-22.084-33.67-1.454-2.272-2.08-2.411-4.956-2.284-4.702.199-32.4 1.195-41.541 1.491-1.216.04-1.223 1.934 0 1.894 47.176-1.491 43.545-1.605 43.833-1.422.93.592 1.862 2.879 2.458 3.793 1.33 2.021 17.513 26.115 18.981 28.222.878 1.256.02 1.183-1.739 1.149-1.989-.045-45.168.233-46.573.221-1.739-.022-2.589-3.415-3.3-4.931-9.112-19.476-10.563-22.476-13.054-26.54-.392-.638-1.409-.445-1.131.207 4.36 10.205 7.591 16.5 11.55 25.455ZM285.242 112.053v.445c0 .04.067.04.067 0 0-.147 0-.298.02-.445-.002-.047-.087-.052-.087 0ZM91.163 240.165s131.381-1.695 132.656-1.416c1.275.278-.313 8.776-4.226 8.751-3.912-.025-121.276.922-123.175.171-1.9-.75-7.28-7.478-5.255-7.506Z",
|
|
70
|
+
fill: "#2F3941"
|
|
71
|
+
})), _path6$1 || (_path6$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
72
|
+
d: "M45.82 293.676a.023.023 0 0 0 .014-.01.025.025 0 0 0 .005-.016.027.027 0 0 0-.019-.026.027.027 0 0 0-.014.042.023.023 0 0 0 .014.01ZM220.834 284.323c-2.237-.034-6-.062-10.973-.082-1.198-2.995.522 1.459-4.325-10.759 4.354 0 7.692 0 9.735.025a.767.767 0 0 0 .545-.226.767.767 0 0 0 0-1.09.77.77 0 0 0-.545-.225c-2.09-.03-5.666-.057-10.376-.077-1.134-2.734-1.506-3.154-2.411-3.637a.552.552 0 0 0-.798.319c-.291.832-.328 1.339.355 3.308-8.714-.03-20.504-.047-33.677-.05a23.38 23.38 0 0 0-2.021-4.446.51.51 0 0 0-.566-.224.509.509 0 0 0-.383.472c.033 1.409.199 2.811.497 4.188-11.212 0-23.326 0-35.336.027a706.988 706.988 0 0 0-.186-3.171.582.582 0 0 0-1.161 0 442.255 442.255 0 0 0-.313 3.174c-12.514.017-24.854.045-35.902.079a6.379 6.379 0 0 0-.378-2.835c-.107-.266-.457-.443-.676-.187a6.309 6.309 0 0 0-1.322 3.03c-12.572.042-23.276.094-30.335.154a18.732 18.732 0 0 0 1.8-3.577c.372-1.061-1.22-2.03-1.954-1.128-1.223 1.511-2.374 3.112-3.495 4.742-2.634.03-4.386.062-5.067.095a.503.503 0 0 0-.357.861.503.503 0 0 0 .357.148c1.155.087 2.55.164 4.158.236-5.903 8.771-5.418 7.829-7.526 11.008-3.607.032-5.985.067-6.83.104a.503.503 0 0 0-.505.505.505.505 0 0 0 .505.504c1.39.1 3.4.184 5.94.249a48.466 48.466 0 0 0-3.343 6.094.431.431 0 0 0 .746.433c1.491-2.168 3.149-4.337 4.859-6.462 8.45.191 21.417.268 36.556.28a22.934 22.934 0 0 0-1.295 5.891c-.048.723.89.823 1.242.338a22.61 22.61 0 0 0 2.963-6.214c12.082 0 25.401-.03 38.835-.079a13.904 13.904 0 0 0 .698 6.238.857.857 0 0 0 .746.429.857.857 0 0 0 .746-.429 13.875 13.875 0 0 0 .952-6.251c13.227-.052 26.474-.116 38.666-.171a25.556 25.556 0 0 0 2.281 5.572.781.781 0 0 0 1.442-.392 24.472 24.472 0 0 0-.816-5.193c13.586-.062 25.705-.111 34.797-.114a27.226 27.226 0 0 0 3.362 6.462c.353.47 1.362.41 1.283-.345a25.886 25.886 0 0 0-1.554-6.119c4.439 0 7.974.022 10.37.059a.761.761 0 0 0 .543-.229.766.766 0 0 0 .222-.546.77.77 0 0 0-.775-.766Zm-170.101.139c3.142-3.859 6.303-7.563 8.562-10.853 7.58.248 18.36.358 30.772.4a97.23 97.23 0 0 1-3.278 10.287c-15.024.045-27.84.102-36.056.166Zm38.892-.173c2.341-7.884 2.585-7.954 3.072-10.273 11.167.028 23.527 0 35.999-.057-.562 6.246-.38 6.529-.691 10.247-13.287.02-26.457.048-38.38.083Zm41.303-.087c-.144-3.319.03-4.226-.263-10.253 12.178-.057 24.392-.142 35.668-.221.621 2.423-.107-.639 2.838 10.439-12.059.01-25.167.017-38.243.035Zm41.164-.023c-.072-.248-3.022-10.14-3.122-10.471 13.235-.094 25.019-.181 33.668-.216 1.941 5.087 1.325 3.139 4.136 10.737-9.003-.032-21.099-.047-34.682-.05ZM281.202 286.259c-1.339-.479-2.53-.671-8.326-.591a140.94 140.94 0 0 0-7.491-12.89 25.902 25.902 0 0 0 7.379-.656.778.778 0 0 0 .398-1.209.778.778 0 0 0-.398-.282c-2.98-.66-6.05-.813-9.081-.452a201.697 201.697 0 0 0-2.486-3.634.674.674 0 0 0-1.163.679l1.695 3.022c-4.143.151-10.849.437-15.243.636a24.566 24.566 0 0 0-3.679-4.576.437.437 0 0 0-.251-.114.444.444 0 0 0-.479.539 25.034 25.034 0 0 0 1.613 4.28 45.342 45.342 0 0 0-8.833.763.515.515 0 0 0-.365.489.511.511 0 0 0 .365.488c3.286.677 6.655.86 9.996.542 1.327 2.443 2.833 4.824 4.079 7.126 1.006 1.854 1.953 3.842 2.965 5.798a40.865 40.865 0 0 0-9.527.716.499.499 0 0 0-.405.488.496.496 0 0 0 .405.489c3.549.665 7.169.868 10.769.604a28.675 28.675 0 0 0 3.542 5.078c.37.412.962-.035.868-.498a23.462 23.462 0 0 0-1.452-4.583 1830.64 1830.64 0 0 0 15.658-.134 30.665 30.665 0 0 0 2.662 4.012c.378.497 1.283.248 1.076-.45a29.948 29.948 0 0 0-1.337-3.587 23.018 23.018 0 0 0 7.071-.599.775.775 0 0 0 .542-.756.78.78 0 0 0-.567-.738Zm-26.223-.126c-1.213-2.414-2.63-4.75-3.865-6.989-1.029-1.859-2.068-3.91-3.211-5.911 3.728-.082 8.656-.218 15.263-.4 3.599 6.462 5.696 10.337 7.091 12.882-3.291.047-6.51.157-15.278.408v.01Z",
|
|
73
|
+
fill: "#2F3941"
|
|
74
|
+
})));
|
|
75
|
+
};
|
|
76
|
+
|
|
45
77
|
react.Honeybadger.beforeNotify(function (notice) {
|
|
46
78
|
return !/ResizeObserver/.test(notice.message);
|
|
47
79
|
});
|
|
48
80
|
var honeybadger = react.Honeybadger.configure({
|
|
49
81
|
apiKey: globalProps.honeybadgerApiKey,
|
|
50
82
|
environment: globalProps.nodeEnv,
|
|
83
|
+
revision: globalProps.honeybadgerRevision,
|
|
51
84
|
developmentEnvironments: ["development", "test"],
|
|
52
85
|
enableUncaught: true,
|
|
53
86
|
async: true,
|
|
@@ -55,9 +88,42 @@ var honeybadger = react.Honeybadger.configure({
|
|
|
55
88
|
projectRoot: "webpack:///./"
|
|
56
89
|
});
|
|
57
90
|
|
|
91
|
+
var FallbackComponent = function FallbackComponent() {
|
|
92
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
93
|
+
t = _useTranslation.t;
|
|
94
|
+
|
|
95
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
96
|
+
className: "flex h-screen w-full flex-row items-start justify-start"
|
|
97
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
98
|
+
className: "m-auto text-center"
|
|
99
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
100
|
+
className: "m-auto mb-8 flex items-center justify-center"
|
|
101
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgFallbackComponent, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
102
|
+
component: "h2",
|
|
103
|
+
style: "h2",
|
|
104
|
+
weight: "semibold",
|
|
105
|
+
className: "mb-4"
|
|
106
|
+
}, t("neetoCommons.fallbackComponent.somethingWentWrong")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
107
|
+
component: "p",
|
|
108
|
+
style: "body1",
|
|
109
|
+
weight: "normal",
|
|
110
|
+
className: "mb-8 text-gray-600"
|
|
111
|
+
}, t("neetoCommons.fallbackComponent.tryReloading")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
112
|
+
className: "flex flex-row items-center justify-center"
|
|
113
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
114
|
+
style: "primary",
|
|
115
|
+
size: "large",
|
|
116
|
+
onClick: function onClick() {
|
|
117
|
+
return window.location.reload(false);
|
|
118
|
+
},
|
|
119
|
+
label: t("neetoCommons.fallbackComponent.reload")
|
|
120
|
+
}))));
|
|
121
|
+
};
|
|
122
|
+
|
|
58
123
|
var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
59
124
|
var children = _ref.children,
|
|
60
|
-
ErrorComponent = _ref.ErrorComponent
|
|
125
|
+
_ref$ErrorComponent = _ref.ErrorComponent,
|
|
126
|
+
ErrorComponent = _ref$ErrorComponent === void 0 ? FallbackComponent : _ref$ErrorComponent;
|
|
61
127
|
return /*#__PURE__*/React__default["default"].createElement(react.HoneybadgerErrorBoundary, {
|
|
62
128
|
honeybadger: honeybadger,
|
|
63
129
|
ErrorComponent: ErrorComponent
|
|
@@ -196,6 +262,10 @@ function _slicedToArray(arr, i) {
|
|
|
196
262
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
197
263
|
}
|
|
198
264
|
|
|
265
|
+
var capitalize = function capitalize(string) {
|
|
266
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
267
|
+
};
|
|
268
|
+
|
|
199
269
|
var HEADERS_KEYS = {
|
|
200
270
|
xAuthEmail: "X-Auth-Email",
|
|
201
271
|
xAuthToken: "X-Auth-Token",
|
|
@@ -208,10 +278,6 @@ var resetAuthTokens = function resetAuthTokens() {
|
|
|
208
278
|
});
|
|
209
279
|
};
|
|
210
280
|
|
|
211
|
-
var capitalize = function capitalize(string) {
|
|
212
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
213
|
-
};
|
|
214
|
-
|
|
215
281
|
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
216
282
|
var ORGANIZATION_SETTINGS_URL = "/auth/organization/edit";
|
|
217
283
|
var PERMITTED_DOMAINS = ["@bigbinary.com", "@example.com"];
|