arengibook 2.4.25 → 2.4.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +117 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,14 +53,14 @@ function _slicedToArray$d(r, e) {
|
|
|
53
53
|
return _arrayWithHoles$d(r) || _iterableToArrayLimit$d(r, e) || _unsupportedIterableToArray$2$1(r, e) || _nonIterableRest$d();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
function _typeof$
|
|
56
|
+
function _typeof$g(o) {
|
|
57
57
|
"@babel/helpers - typeof";
|
|
58
58
|
|
|
59
|
-
return _typeof$
|
|
59
|
+
return _typeof$g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
60
60
|
return typeof o;
|
|
61
61
|
} : function (o) {
|
|
62
62
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
63
|
-
}, _typeof$
|
|
63
|
+
}, _typeof$g(o);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function classNames() {
|
|
@@ -74,7 +74,7 @@ function classNames() {
|
|
|
74
74
|
if (!className) {
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
|
-
var type = _typeof$
|
|
77
|
+
var type = _typeof$g(className);
|
|
78
78
|
if (type === 'string' || type === 'number') {
|
|
79
79
|
classes.push(className);
|
|
80
80
|
} else if (type === 'object') {
|
|
@@ -115,11 +115,11 @@ function _classCallCheck$3(a, n) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function toPrimitive$f(t, r) {
|
|
118
|
-
if ("object" != _typeof$
|
|
118
|
+
if ("object" != _typeof$g(t) || !t) return t;
|
|
119
119
|
var e = t[Symbol.toPrimitive];
|
|
120
120
|
if (void 0 !== e) {
|
|
121
121
|
var i = e.call(t, r);
|
|
122
|
-
if ("object" != _typeof$
|
|
122
|
+
if ("object" != _typeof$g(i)) return i;
|
|
123
123
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
124
124
|
}
|
|
125
125
|
return ("string" === r ? String : Number)(t);
|
|
@@ -127,7 +127,7 @@ function toPrimitive$f(t, r) {
|
|
|
127
127
|
|
|
128
128
|
function toPropertyKey$f(t) {
|
|
129
129
|
var i = toPrimitive$f(t, "string");
|
|
130
|
-
return "symbol" == _typeof$
|
|
130
|
+
return "symbol" == _typeof$g(i) ? i : i + "";
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
function _defineProperties(e, r) {
|
|
@@ -399,7 +399,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
399
399
|
var styles = element !== null && element !== void 0 && (_element$$attrs = element.$attrs) !== null && _element$$attrs !== void 0 && _element$$attrs[rule] ? [element === null || element === void 0 || (_element$$attrs2 = element.$attrs) === null || _element$$attrs2 === void 0 ? void 0 : _element$$attrs2[rule]] : [];
|
|
400
400
|
return [value].flat().reduce(function (cv, v) {
|
|
401
401
|
if (v !== null && v !== undefined) {
|
|
402
|
-
var type = _typeof$
|
|
402
|
+
var type = _typeof$g(v);
|
|
403
403
|
if (type === 'string' || type === 'number') {
|
|
404
404
|
cv.push(v);
|
|
405
405
|
} else if (type === 'object') {
|
|
@@ -956,12 +956,12 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
956
956
|
}, {
|
|
957
957
|
key: "isElement",
|
|
958
958
|
value: function isElement(obj) {
|
|
959
|
-
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof$
|
|
959
|
+
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof$g(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && _typeof$g(obj) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';
|
|
960
960
|
}
|
|
961
961
|
}, {
|
|
962
962
|
key: "isDocument",
|
|
963
963
|
value: function isDocument(obj) {
|
|
964
|
-
return (typeof Document === "undefined" ? "undefined" : _typeof$
|
|
964
|
+
return (typeof Document === "undefined" ? "undefined" : _typeof$g(Document)) === 'object' ? obj instanceof Document : obj && _typeof$g(obj) === 'object' && obj !== null && obj.nodeType === 9;
|
|
965
965
|
}
|
|
966
966
|
}, {
|
|
967
967
|
key: "scrollInView",
|
|
@@ -1293,7 +1293,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1293
1293
|
return document;
|
|
1294
1294
|
} else if (target === 'window') {
|
|
1295
1295
|
return window;
|
|
1296
|
-
} else if (_typeof$
|
|
1296
|
+
} else if (_typeof$g(target) === 'object' && target.hasOwnProperty('current')) {
|
|
1297
1297
|
return this.isExist(target.current) ? target.current : null;
|
|
1298
1298
|
}
|
|
1299
1299
|
var isFunction = function isFunction(obj) {
|
|
@@ -1469,7 +1469,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1469
1469
|
return _createClass$3(ObjectUtils, null, [{
|
|
1470
1470
|
key: "equals",
|
|
1471
1471
|
value: function equals(obj1, obj2, field) {
|
|
1472
|
-
if (field && obj1 && _typeof$
|
|
1472
|
+
if (field && obj1 && _typeof$g(obj1) === 'object' && obj2 && _typeof$g(obj2) === 'object') {
|
|
1473
1473
|
return this.deepEquals(this.resolveFieldData(obj1, field), this.resolveFieldData(obj2, field));
|
|
1474
1474
|
}
|
|
1475
1475
|
return this.deepEquals(obj1, obj2);
|
|
@@ -1487,7 +1487,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1487
1487
|
if (a === b) {
|
|
1488
1488
|
return true;
|
|
1489
1489
|
}
|
|
1490
|
-
if (a && b && _typeof$
|
|
1490
|
+
if (a && b && _typeof$g(a) === 'object' && _typeof$g(b) === 'object') {
|
|
1491
1491
|
var arrA = Array.isArray(a);
|
|
1492
1492
|
var arrB = Array.isArray(b);
|
|
1493
1493
|
var i;
|
|
@@ -1770,7 +1770,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1770
1770
|
key: "getRefElement",
|
|
1771
1771
|
value: function getRefElement(ref) {
|
|
1772
1772
|
if (ref) {
|
|
1773
|
-
return _typeof$
|
|
1773
|
+
return _typeof$g(ref) === 'object' && ref.hasOwnProperty('current') ? ref.current : ref;
|
|
1774
1774
|
}
|
|
1775
1775
|
return null;
|
|
1776
1776
|
}
|
|
@@ -1813,7 +1813,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1813
1813
|
}, {
|
|
1814
1814
|
key: "isEmpty",
|
|
1815
1815
|
value: function isEmpty(value) {
|
|
1816
|
-
return value === null || value === undefined || value === '' || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && _typeof$
|
|
1816
|
+
return value === null || value === undefined || value === '' || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && _typeof$g(value) === 'object' && Object.keys(value).length === 0;
|
|
1817
1817
|
}
|
|
1818
1818
|
}, {
|
|
1819
1819
|
key: "isNotEmpty",
|
|
@@ -1995,7 +1995,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1995
1995
|
}, {
|
|
1996
1996
|
key: "mutateFieldData",
|
|
1997
1997
|
value: function mutateFieldData(data, field, value) {
|
|
1998
|
-
if (_typeof$
|
|
1998
|
+
if (_typeof$g(data) !== 'object' || typeof field !== 'string') {
|
|
1999
1999
|
// short circuit if there is nothing to resolve
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
@@ -2064,7 +2064,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
2064
2064
|
var currentDepth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
2065
2065
|
if (!objA || !objB) return true;
|
|
2066
2066
|
if (currentDepth > maxDepth) return true;
|
|
2067
|
-
if (_typeof$
|
|
2067
|
+
if (_typeof$g(objA) !== _typeof$g(objB)) return false;
|
|
2068
2068
|
var aKeys = Object.keys(objA);
|
|
2069
2069
|
var bKeys = Object.keys(objB);
|
|
2070
2070
|
if (aKeys.length !== bKeys.length) return false;
|
|
@@ -2107,7 +2107,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
2107
2107
|
key: "selectiveCompare",
|
|
2108
2108
|
value: function selectiveCompare(a, b, keysToCompare) {
|
|
2109
2109
|
if (a === b) return true;
|
|
2110
|
-
if (!a || !b || _typeof$
|
|
2110
|
+
if (!a || !b || _typeof$g(a) !== 'object' || _typeof$g(b) !== 'object') return false;
|
|
2111
2111
|
if (!keysToCompare) return this.absoluteCompare(a, b, 1); // If no keys are provided, the comparison is limited to one depth level.
|
|
2112
2112
|
var _iterator2 = _createForOfIteratorHelper$4(keysToCompare),
|
|
2113
2113
|
_step2;
|
|
@@ -2116,7 +2116,7 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
2116
2116
|
var key = _step2.value;
|
|
2117
2117
|
var aValue = this.getNestedValue(a, key);
|
|
2118
2118
|
var bValue = this.getNestedValue(b, key);
|
|
2119
|
-
var isObject = _typeof$
|
|
2119
|
+
var isObject = _typeof$g(aValue) === 'object' && aValue !== null && _typeof$g(bValue) === 'object' && bValue !== null;
|
|
2120
2120
|
|
|
2121
2121
|
// If the current key is an object, they are compared in one further level only.
|
|
2122
2122
|
if (isObject && !this.absoluteCompare(aValue, bValue, 1)) return false;
|
|
@@ -2152,7 +2152,7 @@ var IconUtils = /*#__PURE__*/function () {
|
|
|
2152
2152
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2153
2153
|
var content = null;
|
|
2154
2154
|
if (icon !== null) {
|
|
2155
|
-
var iconType = _typeof$
|
|
2155
|
+
var iconType = _typeof$g(icon);
|
|
2156
2156
|
var className = classNames(iconProps.className, iconType === 'string' && icon);
|
|
2157
2157
|
content = /*#__PURE__*/React.createElement("span", _extends$E({}, iconProps, {
|
|
2158
2158
|
className: className,
|
|
@@ -2994,22 +2994,22 @@ var FilterService = {
|
|
|
2994
2994
|
}
|
|
2995
2995
|
};
|
|
2996
2996
|
|
|
2997
|
-
function _typeof$
|
|
2997
|
+
function _typeof$f(o) {
|
|
2998
2998
|
"@babel/helpers - typeof";
|
|
2999
2999
|
|
|
3000
|
-
return _typeof$
|
|
3000
|
+
return _typeof$f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3001
3001
|
return typeof o;
|
|
3002
3002
|
} : function (o) {
|
|
3003
3003
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3004
|
-
}, _typeof$
|
|
3004
|
+
}, _typeof$f(o);
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
3007
|
function toPrimitive$e(t, r) {
|
|
3008
|
-
if ("object" != _typeof$
|
|
3008
|
+
if ("object" != _typeof$f(t) || !t) return t;
|
|
3009
3009
|
var e = t[Symbol.toPrimitive];
|
|
3010
3010
|
if (void 0 !== e) {
|
|
3011
3011
|
var i = e.call(t, r);
|
|
3012
|
-
if ("object" != _typeof$
|
|
3012
|
+
if ("object" != _typeof$f(i)) return i;
|
|
3013
3013
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3014
3014
|
}
|
|
3015
3015
|
return ("string" === r ? String : Number)(t);
|
|
@@ -3017,7 +3017,7 @@ function toPrimitive$e(t, r) {
|
|
|
3017
3017
|
|
|
3018
3018
|
function toPropertyKey$e(t) {
|
|
3019
3019
|
var i = toPrimitive$e(t, "string");
|
|
3020
|
-
return "symbol" == _typeof$
|
|
3020
|
+
return "symbol" == _typeof$f(i) ? i : i + "";
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
3023
|
function _defineProperty$e(e, r, t) {
|
|
@@ -3952,22 +3952,22 @@ function _toConsumableArray$7(r) {
|
|
|
3952
3952
|
return _arrayWithoutHoles$7(r) || _iterableToArray$7(r) || _unsupportedIterableToArray$e(r) || _nonIterableSpread$7();
|
|
3953
3953
|
}
|
|
3954
3954
|
|
|
3955
|
-
function _typeof$
|
|
3955
|
+
function _typeof$e(o) {
|
|
3956
3956
|
"@babel/helpers - typeof";
|
|
3957
3957
|
|
|
3958
|
-
return _typeof$
|
|
3958
|
+
return _typeof$e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3959
3959
|
return typeof o;
|
|
3960
3960
|
} : function (o) {
|
|
3961
3961
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3962
|
-
}, _typeof$
|
|
3962
|
+
}, _typeof$e(o);
|
|
3963
3963
|
}
|
|
3964
3964
|
|
|
3965
3965
|
function toPrimitive$d(t, r) {
|
|
3966
|
-
if ("object" != _typeof$
|
|
3966
|
+
if ("object" != _typeof$e(t) || !t) return t;
|
|
3967
3967
|
var e = t[Symbol.toPrimitive];
|
|
3968
3968
|
if (void 0 !== e) {
|
|
3969
3969
|
var i = e.call(t, r);
|
|
3970
|
-
if ("object" != _typeof$
|
|
3970
|
+
if ("object" != _typeof$e(i)) return i;
|
|
3971
3971
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3972
3972
|
}
|
|
3973
3973
|
return ("string" === r ? String : Number)(t);
|
|
@@ -3975,7 +3975,7 @@ function toPrimitive$d(t, r) {
|
|
|
3975
3975
|
|
|
3976
3976
|
function toPropertyKey$d(t) {
|
|
3977
3977
|
var i = toPrimitive$d(t, "string");
|
|
3978
|
-
return "symbol" == _typeof$
|
|
3978
|
+
return "symbol" == _typeof$e(i) ? i : i + "";
|
|
3979
3979
|
}
|
|
3980
3980
|
|
|
3981
3981
|
function _defineProperty$d(e, r, t) {
|
|
@@ -4337,22 +4337,22 @@ function _extends$C() {
|
|
|
4337
4337
|
}, _extends$C.apply(null, arguments);
|
|
4338
4338
|
}
|
|
4339
4339
|
|
|
4340
|
-
function _typeof$
|
|
4340
|
+
function _typeof$d(o) {
|
|
4341
4341
|
"@babel/helpers - typeof";
|
|
4342
4342
|
|
|
4343
|
-
return _typeof$
|
|
4343
|
+
return _typeof$d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
4344
4344
|
return typeof o;
|
|
4345
4345
|
} : function (o) {
|
|
4346
4346
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
4347
|
-
}, _typeof$
|
|
4347
|
+
}, _typeof$d(o);
|
|
4348
4348
|
}
|
|
4349
4349
|
|
|
4350
4350
|
function toPrimitive$c(t, r) {
|
|
4351
|
-
if ("object" != _typeof$
|
|
4351
|
+
if ("object" != _typeof$d(t) || !t) return t;
|
|
4352
4352
|
var e = t[Symbol.toPrimitive];
|
|
4353
4353
|
if (void 0 !== e) {
|
|
4354
4354
|
var i = e.call(t, r);
|
|
4355
|
-
if ("object" != _typeof$
|
|
4355
|
+
if ("object" != _typeof$d(i)) return i;
|
|
4356
4356
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4357
4357
|
}
|
|
4358
4358
|
return ("string" === r ? String : Number)(t);
|
|
@@ -4360,7 +4360,7 @@ function toPrimitive$c(t, r) {
|
|
|
4360
4360
|
|
|
4361
4361
|
function toPropertyKey$c(t) {
|
|
4362
4362
|
var i = toPrimitive$c(t, "string");
|
|
4363
|
-
return "symbol" == _typeof$
|
|
4363
|
+
return "symbol" == _typeof$d(i) ? i : i + "";
|
|
4364
4364
|
}
|
|
4365
4365
|
|
|
4366
4366
|
function _defineProperty$c(e, r, t) {
|
|
@@ -4670,22 +4670,22 @@ function _extends$B() {
|
|
|
4670
4670
|
}, _extends$B.apply(null, arguments);
|
|
4671
4671
|
}
|
|
4672
4672
|
|
|
4673
|
-
function _typeof$
|
|
4673
|
+
function _typeof$c(o) {
|
|
4674
4674
|
"@babel/helpers - typeof";
|
|
4675
4675
|
|
|
4676
|
-
return _typeof$
|
|
4676
|
+
return _typeof$c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
4677
4677
|
return typeof o;
|
|
4678
4678
|
} : function (o) {
|
|
4679
4679
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
4680
|
-
}, _typeof$
|
|
4680
|
+
}, _typeof$c(o);
|
|
4681
4681
|
}
|
|
4682
4682
|
|
|
4683
4683
|
function toPrimitive$b(t, r) {
|
|
4684
|
-
if ("object" != _typeof$
|
|
4684
|
+
if ("object" != _typeof$c(t) || !t) return t;
|
|
4685
4685
|
var e = t[Symbol.toPrimitive];
|
|
4686
4686
|
if (void 0 !== e) {
|
|
4687
4687
|
var i = e.call(t, r);
|
|
4688
|
-
if ("object" != _typeof$
|
|
4688
|
+
if ("object" != _typeof$c(i)) return i;
|
|
4689
4689
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4690
4690
|
}
|
|
4691
4691
|
return ("string" === r ? String : Number)(t);
|
|
@@ -4693,7 +4693,7 @@ function toPrimitive$b(t, r) {
|
|
|
4693
4693
|
|
|
4694
4694
|
function toPropertyKey$b(t) {
|
|
4695
4695
|
var i = toPrimitive$b(t, "string");
|
|
4696
|
-
return "symbol" == _typeof$
|
|
4696
|
+
return "symbol" == _typeof$c(i) ? i : i + "";
|
|
4697
4697
|
}
|
|
4698
4698
|
|
|
4699
4699
|
function _defineProperty$b(e, r, t) {
|
|
@@ -5373,22 +5373,22 @@ function _extends$A() {
|
|
|
5373
5373
|
}, _extends$A.apply(null, arguments);
|
|
5374
5374
|
}
|
|
5375
5375
|
|
|
5376
|
-
function _typeof$
|
|
5376
|
+
function _typeof$b(o) {
|
|
5377
5377
|
"@babel/helpers - typeof";
|
|
5378
5378
|
|
|
5379
|
-
return _typeof$
|
|
5379
|
+
return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
5380
5380
|
return typeof o;
|
|
5381
5381
|
} : function (o) {
|
|
5382
5382
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
5383
|
-
}, _typeof$
|
|
5383
|
+
}, _typeof$b(o);
|
|
5384
5384
|
}
|
|
5385
5385
|
|
|
5386
5386
|
function toPrimitive$a(t, r) {
|
|
5387
|
-
if ("object" != _typeof$
|
|
5387
|
+
if ("object" != _typeof$b(t) || !t) return t;
|
|
5388
5388
|
var e = t[Symbol.toPrimitive];
|
|
5389
5389
|
if (void 0 !== e) {
|
|
5390
5390
|
var i = e.call(t, r);
|
|
5391
|
-
if ("object" != _typeof$
|
|
5391
|
+
if ("object" != _typeof$b(i)) return i;
|
|
5392
5392
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5393
5393
|
}
|
|
5394
5394
|
return ("string" === r ? String : Number)(t);
|
|
@@ -5396,7 +5396,7 @@ function toPrimitive$a(t, r) {
|
|
|
5396
5396
|
|
|
5397
5397
|
function toPropertyKey$a(t) {
|
|
5398
5398
|
var i = toPrimitive$a(t, "string");
|
|
5399
|
-
return "symbol" == _typeof$
|
|
5399
|
+
return "symbol" == _typeof$b(i) ? i : i + "";
|
|
5400
5400
|
}
|
|
5401
5401
|
|
|
5402
5402
|
function _defineProperty$a(e, r, t) {
|
|
@@ -5762,9 +5762,38 @@ function _iterableToArrayLimit$8(r, l) {
|
|
|
5762
5762
|
function _nonIterableRest$8() {
|
|
5763
5763
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5764
5764
|
}
|
|
5765
|
+
function _objectWithoutProperties$1(e, t) {
|
|
5766
|
+
if (null == e) return {};
|
|
5767
|
+
var o,
|
|
5768
|
+
r,
|
|
5769
|
+
i = _objectWithoutPropertiesLoose$2(e, t);
|
|
5770
|
+
if (Object.getOwnPropertySymbols) {
|
|
5771
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
5772
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
5773
|
+
}
|
|
5774
|
+
return i;
|
|
5775
|
+
}
|
|
5776
|
+
function _objectWithoutPropertiesLoose$2(r, e) {
|
|
5777
|
+
if (null == r) return {};
|
|
5778
|
+
var t = {};
|
|
5779
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
5780
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
5781
|
+
t[n] = r[n];
|
|
5782
|
+
}
|
|
5783
|
+
return t;
|
|
5784
|
+
}
|
|
5765
5785
|
function _slicedToArray$8(r, e) {
|
|
5766
5786
|
return _arrayWithHoles$8(r) || _iterableToArrayLimit$8(r, e) || _unsupportedIterableToArray$a(r, e) || _nonIterableRest$8();
|
|
5767
5787
|
}
|
|
5788
|
+
function _typeof$a(o) {
|
|
5789
|
+
"@babel/helpers - typeof";
|
|
5790
|
+
|
|
5791
|
+
return _typeof$a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
5792
|
+
return typeof o;
|
|
5793
|
+
} : function (o) {
|
|
5794
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
5795
|
+
}, _typeof$a(o);
|
|
5796
|
+
}
|
|
5768
5797
|
function _unsupportedIterableToArray$a(r, a) {
|
|
5769
5798
|
if (r) {
|
|
5770
5799
|
if ("string" == typeof r) return _arrayLikeToArray$a(r, a);
|
|
@@ -12738,9 +12767,10 @@ function styleInject(css, ref) {
|
|
|
12738
12767
|
}
|
|
12739
12768
|
}
|
|
12740
12769
|
|
|
12741
|
-
var css_248z = ".
|
|
12770
|
+
var css_248z = ".datepicker-fullwidth {\n width: 100%;\n}\n\n.datepicker-fullwidth > .p-calendar {\n width: 100%;\n}\n";
|
|
12742
12771
|
styleInject(css_248z);
|
|
12743
12772
|
|
|
12773
|
+
var _excluded$3 = ["value", "onChange", "placeholder", "dateFormat", "view", "invalid", "errorMessage", "disabled", "locale", "showTime", "showIcon", "icon", "iconBgButton", "iconPos", "name", "id", "fullWidth", "inputProps"];
|
|
12744
12774
|
var normalizeDate = function normalizeDate(v) {
|
|
12745
12775
|
if (!v) return null;
|
|
12746
12776
|
return v instanceof Date ? v : new Date(v);
|
|
@@ -12772,7 +12802,12 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
12772
12802
|
iconBgButton = _ref$iconBgButton === void 0 ? '#000000' : _ref$iconBgButton,
|
|
12773
12803
|
iconPos = _ref.iconPos,
|
|
12774
12804
|
name = _ref.name,
|
|
12775
|
-
id = _ref.id
|
|
12805
|
+
id = _ref.id,
|
|
12806
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
12807
|
+
fullWidth = _ref$fullWidth === void 0 ? true : _ref$fullWidth,
|
|
12808
|
+
_ref$inputProps = _ref.inputProps,
|
|
12809
|
+
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps;
|
|
12810
|
+
_objectWithoutProperties$1(_ref, _excluded$3);
|
|
12776
12811
|
var _useState = useState(function () {
|
|
12777
12812
|
return normalizeDate(value);
|
|
12778
12813
|
}),
|
|
@@ -12788,6 +12823,22 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
12788
12823
|
useEffect(function () {
|
|
12789
12824
|
setValeur(normalizeDate(value));
|
|
12790
12825
|
}, [value]);
|
|
12826
|
+
|
|
12827
|
+
// ✅ Injecte les data-* et attributs natifs dans l'input HTML
|
|
12828
|
+
useEffect(function () {
|
|
12829
|
+
if (!id) return;
|
|
12830
|
+
var input = document.querySelector("#".concat(id));
|
|
12831
|
+
if (input && inputProps && _typeof$a(inputProps) === 'object') {
|
|
12832
|
+
Object.entries(inputProps).forEach(function (_ref2) {
|
|
12833
|
+
var _ref3 = _slicedToArray$8(_ref2, 2),
|
|
12834
|
+
attr = _ref3[0],
|
|
12835
|
+
val = _ref3[1];
|
|
12836
|
+
if (val !== undefined && val !== null) {
|
|
12837
|
+
input.setAttribute(attr, val);
|
|
12838
|
+
}
|
|
12839
|
+
});
|
|
12840
|
+
}
|
|
12841
|
+
}, [id, inputProps]);
|
|
12791
12842
|
var inputStyle = {
|
|
12792
12843
|
border: invalid ? '1px solid red' : '1px solid #ccc',
|
|
12793
12844
|
padding: '0.5rem',
|
|
@@ -12805,7 +12856,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
12805
12856
|
};
|
|
12806
12857
|
addLocale(localLanguage, LOCALES[localLanguage]);
|
|
12807
12858
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12808
|
-
className: "
|
|
12859
|
+
className: fullWidth ? "datepicker-fullwidth flex flex-col gap-1" : "flex flex-col gap-1"
|
|
12809
12860
|
}, /*#__PURE__*/React__default.createElement(Calendar, {
|
|
12810
12861
|
value: valeur,
|
|
12811
12862
|
onChange: handleChange,
|
|
@@ -12819,11 +12870,9 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
12819
12870
|
showIcon: showIcon,
|
|
12820
12871
|
icon: icon,
|
|
12821
12872
|
iconPos: iconPos,
|
|
12822
|
-
inputId: id
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
required: true
|
|
12826
|
-
}
|
|
12873
|
+
inputId: id // il est obligatoire pour identifier l’input !
|
|
12874
|
+
,
|
|
12875
|
+
name: name
|
|
12827
12876
|
}), invalid && /*#__PURE__*/React__default.createElement("small", {
|
|
12828
12877
|
style: {
|
|
12829
12878
|
color: 'red',
|
|
@@ -12865,6 +12914,16 @@ var DatePickerPresets = {
|
|
|
12865
12914
|
Language: {
|
|
12866
12915
|
placeholder: 'Sélectionnez une date',
|
|
12867
12916
|
locale: 'fr'
|
|
12917
|
+
},
|
|
12918
|
+
WithInputProps: {
|
|
12919
|
+
id: 'datepicker_test_input',
|
|
12920
|
+
inputProps: {
|
|
12921
|
+
'data-nom': 'date-test',
|
|
12922
|
+
'data-msg': 'Date sélectionnée !',
|
|
12923
|
+
required: 'required'
|
|
12924
|
+
},
|
|
12925
|
+
placeholder: 'Date avec attributs',
|
|
12926
|
+
value: '2025-06-01'
|
|
12868
12927
|
}
|
|
12869
12928
|
};
|
|
12870
12929
|
|