@panneau/core 3.0.119 → 3.0.130
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/es/contexts.js +12 -2
- package/es/hooks.js +127 -12
- package/es/index.js +53 -41
- package/es/utils.js +19 -1
- package/lib/contexts.js +592 -273
- package/lib/hooks.js +182 -99
- package/lib/index.js +293 -235
- package/lib/utils.js +148 -66
- package/package.json +6 -6
package/lib/utils.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _regeneratorRuntime = require('@babel/runtime/helpers/regeneratorRuntime');
|
|
6
4
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
7
5
|
var EventEmitter = require('wolfy87-eventemitter');
|
|
8
6
|
var isNumber = require('lodash/isNumber');
|
|
9
|
-
var
|
|
7
|
+
var tslib = require('tslib');
|
|
10
8
|
var isObject = require('lodash/isObject');
|
|
11
9
|
var react = require('react');
|
|
12
|
-
var changeCase = require('change-case');
|
|
13
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
14
11
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
15
12
|
var ReactIs = require('react-is');
|
|
@@ -21,27 +18,75 @@ var get = require('lodash/get');
|
|
|
21
18
|
var capitalize = require('lodash/capitalize');
|
|
22
19
|
var slugify = require('slugify');
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Lower case as a function.
|
|
26
|
+
*/
|
|
27
|
+
function lowerCase(str) {
|
|
28
|
+
return str.toLowerCase();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
|
|
32
|
+
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
33
|
+
// Remove all non-word characters.
|
|
34
|
+
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
35
|
+
/**
|
|
36
|
+
* Normalize the string into something other libraries can manipulate easier.
|
|
37
|
+
*/
|
|
38
|
+
function noCase(input, options) {
|
|
39
|
+
if (options === void 0) {
|
|
40
|
+
options = {};
|
|
41
|
+
}
|
|
42
|
+
var _a = options.splitRegexp,
|
|
43
|
+
splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a,
|
|
44
|
+
_b = options.stripRegexp,
|
|
45
|
+
stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b,
|
|
46
|
+
_c = options.transform,
|
|
47
|
+
transform = _c === void 0 ? lowerCase : _c,
|
|
48
|
+
_d = options.delimiter,
|
|
49
|
+
delimiter = _d === void 0 ? " " : _d;
|
|
50
|
+
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
51
|
+
var start = 0;
|
|
52
|
+
var end = result.length;
|
|
53
|
+
// Trim the delimiter from around the output string.
|
|
54
|
+
while (result.charAt(start) === "\0") start++;
|
|
55
|
+
while (result.charAt(end - 1) === "\0") end--;
|
|
56
|
+
// Transform each token independently.
|
|
57
|
+
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Replace `re` in the input string with the replacement value.
|
|
61
|
+
*/
|
|
62
|
+
function replace(input, re, value) {
|
|
63
|
+
if (re instanceof RegExp) return input.replace(re, value);
|
|
64
|
+
return re.reduce(function (input, re) {
|
|
65
|
+
return input.replace(re, value);
|
|
66
|
+
}, input);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function dotCase(input, options) {
|
|
70
|
+
if (options === void 0) {
|
|
71
|
+
options = {};
|
|
72
|
+
}
|
|
73
|
+
return noCase(input, tslib.__assign({
|
|
74
|
+
delimiter: "."
|
|
75
|
+
}, options));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function snakeCase(input, options) {
|
|
79
|
+
if (options === void 0) {
|
|
80
|
+
options = {};
|
|
81
|
+
}
|
|
82
|
+
return dotCase(input, tslib.__assign({
|
|
83
|
+
delimiter: "_"
|
|
84
|
+
}, options));
|
|
85
|
+
}
|
|
41
86
|
|
|
42
87
|
var convertStyleToString = function convertStyleToString(style) {
|
|
43
88
|
return style !== null ? Object.keys(style).map(function (key) {
|
|
44
|
-
return "".concat(snakeCase
|
|
89
|
+
return "".concat(snakeCase(key), ":").concat(isNumber(style[key]) ? "".concat(style[key], "px") : style[key], ";");
|
|
45
90
|
}).join('\n') : '';
|
|
46
91
|
};
|
|
47
92
|
var convertStyleToString$1 = convertStyleToString;
|
|
@@ -50,7 +95,7 @@ var createNullableOnChange = function createNullableOnChange() {
|
|
|
50
95
|
var onChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
51
96
|
return function (newValue) {
|
|
52
97
|
var nullableValue = newValue;
|
|
53
|
-
if (
|
|
98
|
+
if (isObject(newValue)) {
|
|
54
99
|
var allNull = Object.keys(newValue).reduce(function (acc, key) {
|
|
55
100
|
return acc && newValue[key] === null;
|
|
56
101
|
}, true);
|
|
@@ -94,8 +139,8 @@ function copyClipboardApi(_x) {
|
|
|
94
139
|
return _copyClipboardApi.apply(this, arguments);
|
|
95
140
|
}
|
|
96
141
|
function _copyClipboardApi() {
|
|
97
|
-
_copyClipboardApi =
|
|
98
|
-
return
|
|
142
|
+
_copyClipboardApi = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
|
|
143
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
99
144
|
while (1) switch (_context.prev = _context.next) {
|
|
100
145
|
case 0:
|
|
101
146
|
if (navigator.clipboard) {
|
|
@@ -117,9 +162,9 @@ function copyExecCommand(_x2) {
|
|
|
117
162
|
return _copyExecCommand.apply(this, arguments);
|
|
118
163
|
}
|
|
119
164
|
function _copyExecCommand() {
|
|
120
|
-
_copyExecCommand =
|
|
165
|
+
_copyExecCommand = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(text) {
|
|
121
166
|
var span, selection, range, success;
|
|
122
|
-
return
|
|
167
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
123
168
|
while (1) switch (_context2.prev = _context2.next) {
|
|
124
169
|
case 0:
|
|
125
170
|
// Put the text to copy into a <span>
|
|
@@ -167,8 +212,8 @@ function copyToClipboard(_x3) {
|
|
|
167
212
|
return _copyToClipboard.apply(this, arguments);
|
|
168
213
|
}
|
|
169
214
|
function _copyToClipboard() {
|
|
170
|
-
_copyToClipboard =
|
|
171
|
-
return
|
|
215
|
+
_copyToClipboard = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(text) {
|
|
216
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
172
217
|
while (1) switch (_context3.prev = _context3.next) {
|
|
173
218
|
case 0:
|
|
174
219
|
_context3.prev = 0;
|
|
@@ -199,24 +244,69 @@ function _copyToClipboard() {
|
|
|
199
244
|
return _copyToClipboard.apply(this, arguments);
|
|
200
245
|
}
|
|
201
246
|
|
|
247
|
+
function pascalCaseTransform(input, index) {
|
|
248
|
+
var firstChar = input.charAt(0);
|
|
249
|
+
var lowerChars = input.substr(1).toLowerCase();
|
|
250
|
+
if (index > 0 && firstChar >= "0" && firstChar <= "9") {
|
|
251
|
+
return "_" + firstChar + lowerChars;
|
|
252
|
+
}
|
|
253
|
+
return "" + firstChar.toUpperCase() + lowerChars;
|
|
254
|
+
}
|
|
255
|
+
function pascalCase(input, options) {
|
|
256
|
+
if (options === void 0) {
|
|
257
|
+
options = {};
|
|
258
|
+
}
|
|
259
|
+
return noCase(input, tslib.__assign({
|
|
260
|
+
delimiter: "",
|
|
261
|
+
transform: pascalCaseTransform
|
|
262
|
+
}, options));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function paramCase(input, options) {
|
|
266
|
+
if (options === void 0) {
|
|
267
|
+
options = {};
|
|
268
|
+
}
|
|
269
|
+
return dotCase(input, tslib.__assign({
|
|
270
|
+
delimiter: "-"
|
|
271
|
+
}, options));
|
|
272
|
+
}
|
|
273
|
+
|
|
202
274
|
var flattenComponents = function flattenComponents(components) {
|
|
203
275
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
204
276
|
if (components === null) {
|
|
205
277
|
return null;
|
|
206
278
|
}
|
|
207
279
|
return Object.keys(components).reduce(function (newMap, key) {
|
|
208
|
-
return
|
|
280
|
+
return ReactIs.isValidElementType(components[key]) ? _objectSpread(_objectSpread({}, newMap), {}, _defineProperty({}, prefix !== null ? "".concat(prefix, ".").concat(key) : key, components[key])) : _objectSpread(_objectSpread({}, newMap), flattenComponents(components[key], key));
|
|
209
281
|
}, {});
|
|
210
282
|
};
|
|
211
283
|
var flattenComponents$1 = flattenComponents;
|
|
212
284
|
|
|
285
|
+
var formatDuration = function formatDuration(timeInSeconds) {
|
|
286
|
+
var numberOfSeconds = parseInt(timeInSeconds, 10); // don't forget the second param
|
|
287
|
+
var hours = Math.floor(numberOfSeconds / 3600);
|
|
288
|
+
var minutes = Math.floor((numberOfSeconds - hours * 3600) / 60);
|
|
289
|
+
var seconds = numberOfSeconds - hours * 3600 - minutes * 60;
|
|
290
|
+
if (hours < 10) {
|
|
291
|
+
hours = "0".concat(hours);
|
|
292
|
+
}
|
|
293
|
+
if (minutes < 10) {
|
|
294
|
+
minutes = "0".concat(minutes);
|
|
295
|
+
}
|
|
296
|
+
if (seconds < 10) {
|
|
297
|
+
seconds = "0".concat(seconds);
|
|
298
|
+
}
|
|
299
|
+
return "".concat(hours, ":").concat(minutes, ":").concat(seconds);
|
|
300
|
+
};
|
|
301
|
+
var formatDuration$1 = formatDuration;
|
|
302
|
+
|
|
213
303
|
var _excluded$1 = ["component"];
|
|
214
304
|
var getComponent = function getComponent(component) {
|
|
215
|
-
var _ref =
|
|
305
|
+
var _ref = isObject(component) ? component : {
|
|
216
306
|
component: component
|
|
217
307
|
};
|
|
218
308
|
_ref.component;
|
|
219
|
-
var props =
|
|
309
|
+
var props = _objectWithoutProperties(_ref, _excluded$1);
|
|
220
310
|
return {
|
|
221
311
|
name: component,
|
|
222
312
|
props: props
|
|
@@ -241,7 +331,7 @@ var getColumnFromField = function getColumnFromField(field) {
|
|
|
241
331
|
componentName = _getComponent$name === void 0 ? null : _getComponent$name,
|
|
242
332
|
_getComponent$props = _getComponent.props,
|
|
243
333
|
componentProps = _getComponent$props === void 0 ? null : _getComponent$props;
|
|
244
|
-
return
|
|
334
|
+
return _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
245
335
|
id: name,
|
|
246
336
|
label: label,
|
|
247
337
|
valueKey: name,
|
|
@@ -252,16 +342,16 @@ var getColumnFromField = function getColumnFromField(field) {
|
|
|
252
342
|
var getColumnsWithFields = function getColumnsWithFields(resource, columns) {
|
|
253
343
|
var fields = resource.fields;
|
|
254
344
|
var newColumns = columns !== null ? columns.map(function (column) {
|
|
255
|
-
var _ref =
|
|
345
|
+
var _ref = isString(column) ? {
|
|
256
346
|
field: column
|
|
257
347
|
} : column,
|
|
258
348
|
_ref$id = _ref.id,
|
|
259
349
|
colId = _ref$id === void 0 ? null : _ref$id,
|
|
260
350
|
_ref$field = _ref.field,
|
|
261
351
|
colField = _ref$field === void 0 ? null : _ref$field,
|
|
262
|
-
otherProps =
|
|
352
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
263
353
|
var fieldName = colField || colId;
|
|
264
|
-
return
|
|
354
|
+
return _objectSpread(_objectSpread(_objectSpread({}, fieldName !== null ? getColumnFromField(fields.find(function (it) {
|
|
265
355
|
return it.name === fieldName;
|
|
266
356
|
}) || null) : null), otherProps), {}, {
|
|
267
357
|
id: colId
|
|
@@ -280,7 +370,7 @@ var getComponentFromName = function getComponentFromName() {
|
|
|
280
370
|
if (components === null || name === null) {
|
|
281
371
|
return defaultComponent;
|
|
282
372
|
}
|
|
283
|
-
var pascalName =
|
|
373
|
+
var pascalName = pascalCase(name);
|
|
284
374
|
// console.log(name, pascalName, components);
|
|
285
375
|
var component = components[pascalName] || components[name] || defaultComponent;
|
|
286
376
|
if (!component) {
|
|
@@ -294,10 +384,10 @@ var getDefinitionFromId = function getDefinitionFromId() {
|
|
|
294
384
|
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
295
385
|
var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
296
386
|
var defaultObject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
297
|
-
if (items === null || id === null ||
|
|
387
|
+
if (items === null || id === null || isArray(items) && items.length === 0) {
|
|
298
388
|
return defaultObject;
|
|
299
389
|
}
|
|
300
|
-
var pascalId =
|
|
390
|
+
var pascalId = pascalCase(id);
|
|
301
391
|
return items.find(function (i) {
|
|
302
392
|
return i.id === pascalId;
|
|
303
393
|
}) || items.find(function (i) {
|
|
@@ -333,7 +423,7 @@ var getFieldByName = function getFieldByName(fields, name) {
|
|
|
333
423
|
var getFieldByName$1 = getFieldByName;
|
|
334
424
|
|
|
335
425
|
var getFieldFromPath = function getFieldFromPath(path, fields, fieldManager) {
|
|
336
|
-
return (
|
|
426
|
+
return (isArray(path) ? path : [path]).reduce(function (foundField, key) {
|
|
337
427
|
if (foundField === null) {
|
|
338
428
|
return null;
|
|
339
429
|
}
|
|
@@ -352,12 +442,12 @@ var getFieldFromPath = function getFieldFromPath(path, fields, fieldManager) {
|
|
|
352
442
|
_ref$itemsField = _ref.itemsField,
|
|
353
443
|
itemsField = _ref$itemsField === void 0 ? null : _ref$itemsField;
|
|
354
444
|
if (itemsField !== null && key.match(/^[0-9]+$/)) {
|
|
355
|
-
return
|
|
445
|
+
return _objectSpread(_objectSpread({}, itemsField), {}, {
|
|
356
446
|
name: path.join('/'),
|
|
357
447
|
listItems: true
|
|
358
448
|
});
|
|
359
449
|
}
|
|
360
|
-
return getFieldByName$1([].concat(
|
|
450
|
+
return getFieldByName$1([].concat(_toConsumableArray(fieldFields || []), _toConsumableArray(subFields || []), _toConsumableArray(settings || [])), key);
|
|
361
451
|
}, {
|
|
362
452
|
fields: fields
|
|
363
453
|
});
|
|
@@ -374,8 +464,8 @@ var getFileName = function getFileName() {
|
|
|
374
464
|
var getFileName$1 = getFileName;
|
|
375
465
|
|
|
376
466
|
var getPathValue = function getPathValue(it, path) {
|
|
377
|
-
var value =
|
|
378
|
-
return value !== null &&
|
|
467
|
+
var value = get(it, path, null);
|
|
468
|
+
return value !== null && isObject(value) ? Object.values(value).reduce(function (foundValue, value) {
|
|
379
469
|
return foundValue !== null ? foundValue : value;
|
|
380
470
|
}, null) : value;
|
|
381
471
|
};
|
|
@@ -383,14 +473,14 @@ var getPathValue$1 = getPathValue;
|
|
|
383
473
|
|
|
384
474
|
var getSelectOptions = function getSelectOptions(options) {
|
|
385
475
|
return options.map(function (it) {
|
|
386
|
-
if (
|
|
476
|
+
if (isObject(it)) {
|
|
387
477
|
var _it$label = it.label,
|
|
388
478
|
label = _it$label === void 0 ? null : _it$label,
|
|
389
479
|
value = it.value;
|
|
390
480
|
if (label === null) {
|
|
391
481
|
return {
|
|
392
482
|
value: value,
|
|
393
|
-
label:
|
|
483
|
+
label: capitalize("".concat(value))
|
|
394
484
|
};
|
|
395
485
|
}
|
|
396
486
|
return {
|
|
@@ -400,14 +490,14 @@ var getSelectOptions = function getSelectOptions(options) {
|
|
|
400
490
|
}
|
|
401
491
|
return {
|
|
402
492
|
value: it,
|
|
403
|
-
label:
|
|
493
|
+
label: capitalize("".concat(it))
|
|
404
494
|
};
|
|
405
495
|
});
|
|
406
496
|
};
|
|
407
497
|
var getSelectOptions$1 = getSelectOptions;
|
|
408
498
|
|
|
409
499
|
var isMessage = function isMessage(message) {
|
|
410
|
-
return
|
|
500
|
+
return isObject(message) && typeof message.defaultMessage !== 'undefined';
|
|
411
501
|
};
|
|
412
502
|
var isMessage$1 = isMessage;
|
|
413
503
|
|
|
@@ -415,7 +505,7 @@ var isMessage$1 = isMessage;
|
|
|
415
505
|
* Locale loader
|
|
416
506
|
*/
|
|
417
507
|
var loaders = {};
|
|
418
|
-
var events = new
|
|
508
|
+
var events = new EventEmitter();
|
|
419
509
|
function loadPackage(name, loader) {
|
|
420
510
|
if (typeof loaders[name] === 'undefined') {
|
|
421
511
|
loaders[name] = {
|
|
@@ -451,10 +541,10 @@ var setValue = function setValue(value, keyParts, fieldValue) {
|
|
|
451
541
|
if (value !== null || fieldValue !== null) {
|
|
452
542
|
if (isArray) {
|
|
453
543
|
var index = parseInt(key, 10);
|
|
454
|
-
var newArrayValue = fieldValue !== null ? [].concat(
|
|
544
|
+
var newArrayValue = fieldValue !== null ? [].concat(_toConsumableArray(value.slice(0, index)), [keyParts.length > 0 ? setValue(value !== null ? value[index] || null : null, keyParts, fieldValue) : fieldValue], _toConsumableArray(value.slice(index + 1))) : [].concat(_toConsumableArray(value.slice(0, index)), _toConsumableArray(value.slice(index + 1)));
|
|
455
545
|
return newArrayValue.length > 0 ? newArrayValue : null;
|
|
456
546
|
}
|
|
457
|
-
return
|
|
547
|
+
return _objectSpread(_objectSpread({}, value), {}, _defineProperty({}, key, keyParts.length > 0 ? setValue(value !== null ? value[key] || null : null, keyParts, fieldValue) : fieldValue));
|
|
458
548
|
}
|
|
459
549
|
return null;
|
|
460
550
|
};
|
|
@@ -464,11 +554,11 @@ var slug = function slug(str) {
|
|
|
464
554
|
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
465
555
|
var toSlug;
|
|
466
556
|
if (separator === '-') {
|
|
467
|
-
toSlug =
|
|
557
|
+
toSlug = paramCase(str);
|
|
468
558
|
} else {
|
|
469
|
-
toSlug =
|
|
559
|
+
toSlug = snakeCase(str);
|
|
470
560
|
}
|
|
471
|
-
return
|
|
561
|
+
return slugify(toSlug, {
|
|
472
562
|
lower: true
|
|
473
563
|
});
|
|
474
564
|
};
|
|
@@ -488,23 +578,13 @@ var validateFields = function validateFields(fields, value) {
|
|
|
488
578
|
};
|
|
489
579
|
var validateFields$1 = validateFields;
|
|
490
580
|
|
|
491
|
-
Object.defineProperty(exports, 'dashCase', {
|
|
492
|
-
enumerable: true,
|
|
493
|
-
get: function () { return changeCase.paramCase; }
|
|
494
|
-
});
|
|
495
|
-
Object.defineProperty(exports, 'pascalCase', {
|
|
496
|
-
enumerable: true,
|
|
497
|
-
get: function () { return changeCase.pascalCase; }
|
|
498
|
-
});
|
|
499
|
-
Object.defineProperty(exports, 'snakeCase', {
|
|
500
|
-
enumerable: true,
|
|
501
|
-
get: function () { return changeCase.snakeCase; }
|
|
502
|
-
});
|
|
503
581
|
exports.convertStyleToString = convertStyleToString$1;
|
|
504
582
|
exports.copyToClipboard = copyToClipboard;
|
|
505
583
|
exports.createNullableOnChange = createNullableOnChange$1;
|
|
506
584
|
exports.createUseEvent = createUseEvent$1;
|
|
585
|
+
exports.dashCase = paramCase;
|
|
507
586
|
exports.flattenComponents = flattenComponents$1;
|
|
587
|
+
exports.formatDuration = formatDuration$1;
|
|
508
588
|
exports.getColumnsWithFields = getColumnsWithFields$1;
|
|
509
589
|
exports.getComponent = getComponent$1;
|
|
510
590
|
exports.getComponentFromName = getComponentFromName$1;
|
|
@@ -517,6 +597,8 @@ exports.getPathValue = getPathValue$1;
|
|
|
517
597
|
exports.getSelectOptions = getSelectOptions$1;
|
|
518
598
|
exports.isMessage = isMessage$1;
|
|
519
599
|
exports.loadPackage = loadPackage;
|
|
600
|
+
exports.pascalCase = pascalCase;
|
|
520
601
|
exports.setFieldValue = setValue$1;
|
|
521
602
|
exports.slug = slug$1;
|
|
603
|
+
exports.snakeCase = snakeCase;
|
|
522
604
|
exports.validateFields = validateFields$1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.130",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"utils.js"
|
|
68
68
|
],
|
|
69
69
|
"scripts": {
|
|
70
|
-
"
|
|
70
|
+
"prepublishOnly": "npm run build",
|
|
71
|
+
"build": "../../scripts/prepare-package.sh --scss"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
},
|
|
80
81
|
"dependencies": {
|
|
81
82
|
"@babel/runtime": "^7.12.5",
|
|
82
|
-
"@folklore/fetch": "^0.1.
|
|
83
|
+
"@folklore/fetch": "^0.1.17",
|
|
83
84
|
"@folklore/forms": "^0.0.22",
|
|
84
85
|
"@folklore/routes": "^0.2.26",
|
|
85
86
|
"@folklore/services": "^0.1.24",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
89
90
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
90
91
|
"bootstrap": "^5.3.1",
|
|
91
|
-
"change-case": "^4.
|
|
92
|
+
"change-case": "^4.0.0",
|
|
92
93
|
"classnames": "^2.2.6",
|
|
93
94
|
"css-mediaquery": "^0.1.2",
|
|
94
95
|
"dayjs": "^1.10.4",
|
|
@@ -100,7 +101,6 @@
|
|
|
100
101
|
"react-helmet": "^6.1.0",
|
|
101
102
|
"react-intl": "^5.15.8||^6.0.0",
|
|
102
103
|
"react-is": "^17.0.2",
|
|
103
|
-
"react-use-gesture": "^9.0.0",
|
|
104
104
|
"slugify": "^1.5.0",
|
|
105
105
|
"snake-case": "^3.0.4",
|
|
106
106
|
"tinycolor2": "^1.4.2",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"publishConfig": {
|
|
112
112
|
"access": "public"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "e6070daacb45351ccbef67ae8006f1a293ca8e2b"
|
|
115
115
|
}
|