@cerebruminc/cerebellum 16.0.0-beta.dangerous.b3c9c8c → 16.0.0-beta.dangerous.c8b4799
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/lib/cjs/DatePicker.cjs +1 -1
- package/lib/cjs/Form.cjs +2 -2
- package/lib/cjs/{FormikContainer-Gc8nGlEW.js → FormikContainer-CY2nLsAs.js} +2 -2
- package/lib/cjs/{FormikContainer-Gc8nGlEW.js.map → FormikContainer-CY2nLsAs.js.map} +1 -1
- package/lib/cjs/{InlineDatePicker-CQ9t1bfe.js → InlineDatePicker-DFv_uHo9.js} +82 -162
- package/lib/cjs/InlineDatePicker-DFv_uHo9.js.map +1 -0
- package/lib/cjs/InlineDatePicker.cjs +1 -1
- package/lib/cjs/index.cjs +4 -3
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/DatePicker.js +1 -1
- package/lib/esm/Form.js +2 -2
- package/lib/esm/{FormikContainer-C75cvTmz.js → FormikContainer-SJPYfIkF.js} +2 -2
- package/lib/esm/{FormikContainer-C75cvTmz.js.map → FormikContainer-SJPYfIkF.js.map} +1 -1
- package/lib/esm/{InlineDatePicker-BeRq7pJP.js → InlineDatePicker-ClVBWEzW.js} +82 -162
- package/lib/esm/InlineDatePicker-ClVBWEzW.js.map +1 -0
- package/lib/esm/InlineDatePicker.js +1 -1
- package/lib/esm/index.js +4 -3
- package/lib/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/InlineDatePicker-CQ9t1bfe.js.map +0 -1
- package/lib/esm/InlineDatePicker-BeRq7pJP.js.map +0 -1
package/lib/cjs/DatePicker.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _tslib = require('./_tslib-ByDtMVOd.js');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var InlineDatePicker = require('./InlineDatePicker-
|
|
6
|
+
var InlineDatePicker = require('./InlineDatePicker-DFv_uHo9.js');
|
|
7
7
|
var useMeasure = require('./useMeasure-CDq3dPfD.js');
|
|
8
8
|
var showLabel = require('./showLabel-BkZISyqw.js');
|
|
9
9
|
var Inputs = require('./Inputs-IaHMnBKw.js');
|
package/lib/cjs/Form.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var FormWrapper = require('./FormStyles-CxgYRZOl.js');
|
|
4
|
-
var FormikContainer = require('./FormikContainer-
|
|
4
|
+
var FormikContainer = require('./FormikContainer-CY2nLsAs.js');
|
|
5
5
|
var FormFieldTypeEnum = require('./FormFieldTypeEnum.cjs');
|
|
6
6
|
require('./_tslib-ByDtMVOd.js');
|
|
7
7
|
require('styled-components');
|
|
@@ -94,7 +94,7 @@ require('./cardValidationStateMachine.cjs');
|
|
|
94
94
|
require('./CurrencyInput-D_QGbxkC.js');
|
|
95
95
|
require('./InlineCurrencyInput-UjEz4U3A.js');
|
|
96
96
|
require('./DatePicker.cjs');
|
|
97
|
-
require('./InlineDatePicker-
|
|
97
|
+
require('./InlineDatePicker-DFv_uHo9.js');
|
|
98
98
|
require('./Calendar.cjs');
|
|
99
99
|
require('./ClickOutHandler-b5mI7kuA.js');
|
|
100
100
|
require('./CaretLeft.cjs');
|
|
@@ -39,7 +39,7 @@ var CurrencyInput = require('./CurrencyInput-D_QGbxkC.js');
|
|
|
39
39
|
var InlineCurrencyInput = require('./InlineCurrencyInput-UjEz4U3A.js');
|
|
40
40
|
var formatBytesToString = require('./formatBytesToString.cjs');
|
|
41
41
|
var DatePicker = require('./DatePicker.cjs');
|
|
42
|
-
var InlineDatePicker = require('./InlineDatePicker-
|
|
42
|
+
var InlineDatePicker = require('./InlineDatePicker-DFv_uHo9.js');
|
|
43
43
|
require('./CheckboxStyles-CAzemGXD.js');
|
|
44
44
|
require('./RadioStyles-2mVDOf96.js');
|
|
45
45
|
require('./ToggleStyles-DsqemdEf.js');
|
|
@@ -1580,4 +1580,4 @@ var FormikContainer = function (props) {
|
|
|
1580
1580
|
exports.FormikContainer = FormikContainer;
|
|
1581
1581
|
exports.NationalityDropdown = NationalityDropdown;
|
|
1582
1582
|
exports.nationalityList = nationalityList;
|
|
1583
|
-
//# sourceMappingURL=FormikContainer-
|
|
1583
|
+
//# sourceMappingURL=FormikContainer-CY2nLsAs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikContainer-
|
|
1
|
+
{"version":3,"file":"FormikContainer-CY2nLsAs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7521,40 +7521,34 @@ function isShadowRoot(value) {
|
|
|
7521
7521
|
}
|
|
7522
7522
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
7523
7523
|
}
|
|
7524
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
7525
7524
|
function isOverflowElement(element) {
|
|
7526
7525
|
const {
|
|
7527
7526
|
overflow,
|
|
7528
7527
|
overflowX,
|
|
7529
7528
|
overflowY,
|
|
7530
7529
|
display
|
|
7531
|
-
} = getComputedStyle
|
|
7532
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
7530
|
+
} = getComputedStyle(element);
|
|
7531
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
7533
7532
|
}
|
|
7534
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
7535
7533
|
function isTableElement(element) {
|
|
7536
|
-
return
|
|
7534
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
7537
7535
|
}
|
|
7538
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
7539
7536
|
function isTopLayer(element) {
|
|
7540
|
-
return
|
|
7537
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
7541
7538
|
try {
|
|
7542
7539
|
return element.matches(selector);
|
|
7543
|
-
} catch (
|
|
7540
|
+
} catch (e) {
|
|
7544
7541
|
return false;
|
|
7545
7542
|
}
|
|
7546
7543
|
});
|
|
7547
7544
|
}
|
|
7548
|
-
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
7549
|
-
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
7550
|
-
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
7551
7545
|
function isContainingBlock(elementOrCss) {
|
|
7552
7546
|
const webkit = isWebKit();
|
|
7553
|
-
const css = isElement(elementOrCss) ? getComputedStyle
|
|
7547
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
7554
7548
|
|
|
7555
7549
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
7556
7550
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
7557
|
-
return
|
|
7551
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
7558
7552
|
}
|
|
7559
7553
|
function getContainingBlock(element) {
|
|
7560
7554
|
let currentNode = getParentNode(element);
|
|
@@ -7572,11 +7566,10 @@ function isWebKit() {
|
|
|
7572
7566
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
7573
7567
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
7574
7568
|
}
|
|
7575
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
7576
7569
|
function isLastTraversableNode(node) {
|
|
7577
|
-
return
|
|
7570
|
+
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
7578
7571
|
}
|
|
7579
|
-
function getComputedStyle
|
|
7572
|
+
function getComputedStyle(element) {
|
|
7580
7573
|
return getWindow(element).getComputedStyle(element);
|
|
7581
7574
|
}
|
|
7582
7575
|
function getNodeScroll(element) {
|
|
@@ -7678,9 +7671,8 @@ function getOppositeAxis(axis) {
|
|
|
7678
7671
|
function getAxisLength(axis) {
|
|
7679
7672
|
return axis === 'y' ? 'height' : 'width';
|
|
7680
7673
|
}
|
|
7681
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
7682
7674
|
function getSideAxis(placement) {
|
|
7683
|
-
return
|
|
7675
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
7684
7676
|
}
|
|
7685
7677
|
function getAlignmentAxis(placement) {
|
|
7686
7678
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -7705,19 +7697,19 @@ function getExpandedPlacements(placement) {
|
|
|
7705
7697
|
function getOppositeAlignmentPlacement(placement) {
|
|
7706
7698
|
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
7707
7699
|
}
|
|
7708
|
-
const lrPlacement = ['left', 'right'];
|
|
7709
|
-
const rlPlacement = ['right', 'left'];
|
|
7710
|
-
const tbPlacement = ['top', 'bottom'];
|
|
7711
|
-
const btPlacement = ['bottom', 'top'];
|
|
7712
7700
|
function getSideList(side, isStart, rtl) {
|
|
7701
|
+
const lr = ['left', 'right'];
|
|
7702
|
+
const rl = ['right', 'left'];
|
|
7703
|
+
const tb = ['top', 'bottom'];
|
|
7704
|
+
const bt = ['bottom', 'top'];
|
|
7713
7705
|
switch (side) {
|
|
7714
7706
|
case 'top':
|
|
7715
7707
|
case 'bottom':
|
|
7716
|
-
if (rtl) return isStart ?
|
|
7717
|
-
return isStart ?
|
|
7708
|
+
if (rtl) return isStart ? rl : lr;
|
|
7709
|
+
return isStart ? lr : rl;
|
|
7718
7710
|
case 'left':
|
|
7719
7711
|
case 'right':
|
|
7720
|
-
return isStart ?
|
|
7712
|
+
return isStart ? tb : bt;
|
|
7721
7713
|
default:
|
|
7722
7714
|
return [];
|
|
7723
7715
|
}
|
|
@@ -8169,7 +8161,7 @@ const flip$2 = function (options) {
|
|
|
8169
8161
|
if (!ignoreCrossAxisOverflow ||
|
|
8170
8162
|
// We leave the current main axis only if every placement on that axis
|
|
8171
8163
|
// overflows the main axis.
|
|
8172
|
-
overflowsData.every(d =>
|
|
8164
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
8173
8165
|
// Try next placement and re-run the lifecycle.
|
|
8174
8166
|
return {
|
|
8175
8167
|
data: {
|
|
@@ -8226,8 +8218,6 @@ const flip$2 = function (options) {
|
|
|
8226
8218
|
};
|
|
8227
8219
|
};
|
|
8228
8220
|
|
|
8229
|
-
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
8230
|
-
|
|
8231
8221
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
8232
8222
|
// Derivable.
|
|
8233
8223
|
|
|
@@ -8241,7 +8231,7 @@ async function convertValueToCoords(state, options) {
|
|
|
8241
8231
|
const side = getSide(placement);
|
|
8242
8232
|
const alignment = getAlignment(placement);
|
|
8243
8233
|
const isVertical = getSideAxis(placement) === 'y';
|
|
8244
|
-
const mainAxisMulti =
|
|
8234
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
8245
8235
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
8246
8236
|
const rawValue = evaluate(options, state);
|
|
8247
8237
|
|
|
@@ -8313,7 +8303,7 @@ const offset$2 = function (options) {
|
|
|
8313
8303
|
};
|
|
8314
8304
|
|
|
8315
8305
|
function getCssDimensions(element) {
|
|
8316
|
-
const css = getComputedStyle
|
|
8306
|
+
const css = getComputedStyle(element);
|
|
8317
8307
|
// In testing environments, the `width` and `height` properties are empty
|
|
8318
8308
|
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
8319
8309
|
let width = parseFloat(css.width) || 0;
|
|
@@ -8418,7 +8408,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
8418
8408
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
8419
8409
|
const iframeScale = getScale(currentIFrame);
|
|
8420
8410
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
8421
|
-
const css = getComputedStyle
|
|
8411
|
+
const css = getComputedStyle(currentIFrame);
|
|
8422
8412
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
8423
8413
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
8424
8414
|
x *= iframeScale.x;
|
|
@@ -8449,9 +8439,14 @@ function getWindowScrollBarX(element, rect) {
|
|
|
8449
8439
|
return rect.left + leftScroll;
|
|
8450
8440
|
}
|
|
8451
8441
|
|
|
8452
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
8442
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
8443
|
+
if (ignoreScrollbarX === void 0) {
|
|
8444
|
+
ignoreScrollbarX = false;
|
|
8445
|
+
}
|
|
8453
8446
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
8454
|
-
const x = htmlRect.left + scroll.scrollLeft -
|
|
8447
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
8448
|
+
// RTL <body> scrollbar.
|
|
8449
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
8455
8450
|
const y = htmlRect.top + scroll.scrollTop;
|
|
8456
8451
|
return {
|
|
8457
8452
|
x,
|
|
@@ -8490,7 +8485,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
8490
8485
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
8491
8486
|
}
|
|
8492
8487
|
}
|
|
8493
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
8488
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
8494
8489
|
return {
|
|
8495
8490
|
width: rect.width * scale.x,
|
|
8496
8491
|
height: rect.height * scale.y,
|
|
@@ -8513,7 +8508,7 @@ function getDocumentRect(element) {
|
|
|
8513
8508
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
8514
8509
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
8515
8510
|
const y = -scroll.scrollTop;
|
|
8516
|
-
if (getComputedStyle
|
|
8511
|
+
if (getComputedStyle(body).direction === 'rtl') {
|
|
8517
8512
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
8518
8513
|
}
|
|
8519
8514
|
return {
|
|
@@ -8524,10 +8519,6 @@ function getDocumentRect(element) {
|
|
|
8524
8519
|
};
|
|
8525
8520
|
}
|
|
8526
8521
|
|
|
8527
|
-
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
8528
|
-
// calculation is affected by unusual styles.
|
|
8529
|
-
// Most scrollbars leave 15-18px of space.
|
|
8530
|
-
const SCROLLBAR_MAX = 25;
|
|
8531
8522
|
function getViewportRect(element, strategy) {
|
|
8532
8523
|
const win = getWindow(element);
|
|
8533
8524
|
const html = getDocumentElement(element);
|
|
@@ -8545,24 +8536,6 @@ function getViewportRect(element, strategy) {
|
|
|
8545
8536
|
y = visualViewport.offsetTop;
|
|
8546
8537
|
}
|
|
8547
8538
|
}
|
|
8548
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
8549
|
-
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
8550
|
-
// visual width of the <html> but this is not considered in the size
|
|
8551
|
-
// of `html.clientWidth`.
|
|
8552
|
-
if (windowScrollbarX <= 0) {
|
|
8553
|
-
const doc = html.ownerDocument;
|
|
8554
|
-
const body = doc.body;
|
|
8555
|
-
const bodyStyles = getComputedStyle(body);
|
|
8556
|
-
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
8557
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
8558
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
8559
|
-
width -= clippingStableScrollbarWidth;
|
|
8560
|
-
}
|
|
8561
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
8562
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
8563
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
8564
|
-
width += windowScrollbarX;
|
|
8565
|
-
}
|
|
8566
8539
|
return {
|
|
8567
8540
|
width,
|
|
8568
8541
|
height,
|
|
@@ -8571,7 +8544,6 @@ function getViewportRect(element, strategy) {
|
|
|
8571
8544
|
};
|
|
8572
8545
|
}
|
|
8573
8546
|
|
|
8574
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
8575
8547
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
8576
8548
|
function getInnerBoundingClientRect(element, strategy) {
|
|
8577
8549
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -8613,7 +8585,7 @@ function hasFixedPositionAncestor(element, stopNode) {
|
|
|
8613
8585
|
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
8614
8586
|
return false;
|
|
8615
8587
|
}
|
|
8616
|
-
return getComputedStyle
|
|
8588
|
+
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
8617
8589
|
}
|
|
8618
8590
|
|
|
8619
8591
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
@@ -8626,17 +8598,17 @@ function getClippingElementAncestors(element, cache) {
|
|
|
8626
8598
|
}
|
|
8627
8599
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
8628
8600
|
let currentContainingBlockComputedStyle = null;
|
|
8629
|
-
const elementIsFixed = getComputedStyle
|
|
8601
|
+
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
8630
8602
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
8631
8603
|
|
|
8632
8604
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
8633
8605
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
8634
|
-
const computedStyle = getComputedStyle
|
|
8606
|
+
const computedStyle = getComputedStyle(currentNode);
|
|
8635
8607
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
8636
8608
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
8637
8609
|
currentContainingBlockComputedStyle = null;
|
|
8638
8610
|
}
|
|
8639
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
8611
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
8640
8612
|
if (shouldDropCurrentNode) {
|
|
8641
8613
|
// Drop non-containing blocks.
|
|
8642
8614
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -8732,11 +8704,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
8732
8704
|
}
|
|
8733
8705
|
|
|
8734
8706
|
function isStaticPositioned(element) {
|
|
8735
|
-
return getComputedStyle
|
|
8707
|
+
return getComputedStyle(element).position === 'static';
|
|
8736
8708
|
}
|
|
8737
8709
|
|
|
8738
8710
|
function getTrueOffsetParent(element, polyfill) {
|
|
8739
|
-
if (!isHTMLElement(element) || getComputedStyle
|
|
8711
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
8740
8712
|
return null;
|
|
8741
8713
|
}
|
|
8742
8714
|
if (polyfill) {
|
|
@@ -8797,7 +8769,7 @@ const getElementRects = async function (data) {
|
|
|
8797
8769
|
};
|
|
8798
8770
|
|
|
8799
8771
|
function isRTL(element) {
|
|
8800
|
-
return getComputedStyle
|
|
8772
|
+
return getComputedStyle(element).direction === 'rtl';
|
|
8801
8773
|
}
|
|
8802
8774
|
|
|
8803
8775
|
const platform = {
|
|
@@ -9437,7 +9409,7 @@ const FloatingArrow = /*#__PURE__*/React__namespace.forwardRef(function Floating
|
|
|
9437
9409
|
// https://github.com/floating-ui/floating-ui/issues/2932
|
|
9438
9410
|
index$1(() => {
|
|
9439
9411
|
if (!floating) return;
|
|
9440
|
-
const isRTL = getComputedStyle
|
|
9412
|
+
const isRTL = getComputedStyle(floating).direction === 'rtl';
|
|
9441
9413
|
if (isRTL) {
|
|
9442
9414
|
setIsRTL(true);
|
|
9443
9415
|
}
|
|
@@ -9696,7 +9668,7 @@ function useFloating(options) {
|
|
|
9696
9668
|
}
|
|
9697
9669
|
|
|
9698
9670
|
/*!
|
|
9699
|
-
react-datepicker v8.
|
|
9671
|
+
react-datepicker v8.4.0
|
|
9700
9672
|
https://github.com/Hacker0x01/react-datepicker
|
|
9701
9673
|
Released under the MIT License.
|
|
9702
9674
|
*/
|
|
@@ -9931,13 +9903,12 @@ var DATE_RANGE_SEPARATOR = " - ";
|
|
|
9931
9903
|
* @returns - The formatted date range or an empty string.
|
|
9932
9904
|
*/
|
|
9933
9905
|
function safeDateRangeFormat(startDate, endDate, props) {
|
|
9934
|
-
if (!startDate
|
|
9906
|
+
if (!startDate) {
|
|
9935
9907
|
return "";
|
|
9936
9908
|
}
|
|
9937
|
-
var formattedStartDate =
|
|
9909
|
+
var formattedStartDate = safeDateFormat(startDate, props);
|
|
9938
9910
|
var formattedEndDate = endDate ? safeDateFormat(endDate, props) : "";
|
|
9939
|
-
|
|
9940
|
-
return "".concat(formattedStartDate).concat(dateRangeSeparator).concat(formattedEndDate);
|
|
9911
|
+
return "".concat(formattedStartDate).concat(DATE_RANGE_SEPARATOR).concat(formattedEndDate);
|
|
9941
9912
|
}
|
|
9942
9913
|
/**
|
|
9943
9914
|
* Safely formats multiple dates.
|
|
@@ -11458,10 +11429,7 @@ var Week = /** @class */ (function (_super) {
|
|
|
11458
11429
|
"react-datepicker__week--selected": isSameDay(this.startOfWeek(), this.props.selected),
|
|
11459
11430
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected(),
|
|
11460
11431
|
};
|
|
11461
|
-
|
|
11462
|
-
? this.props.weekClassName(this.startOfWeek())
|
|
11463
|
-
: undefined;
|
|
11464
|
-
return (React__namespace.default.createElement("div", { className: clsx(weekNumberClasses, customWeekClassName) }, this.renderDays()));
|
|
11432
|
+
return React__namespace.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
11465
11433
|
};
|
|
11466
11434
|
return Week;
|
|
11467
11435
|
}(React.Component));
|
|
@@ -12681,20 +12649,19 @@ var Year$1 = /** @class */ (function (_super) {
|
|
|
12681
12649
|
return isSameYear(_year, endDate !== null && endDate !== void 0 ? endDate : null);
|
|
12682
12650
|
};
|
|
12683
12651
|
_this.isKeyboardSelected = function (y) {
|
|
12684
|
-
if (_this.props.
|
|
12685
|
-
_this.props.
|
|
12652
|
+
if (_this.props.date === undefined ||
|
|
12653
|
+
_this.props.selected == null ||
|
|
12686
12654
|
_this.props.preSelection == null) {
|
|
12687
12655
|
return;
|
|
12688
12656
|
}
|
|
12689
|
-
var _a = _this.props, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate
|
|
12657
|
+
var _a = _this.props, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate;
|
|
12690
12658
|
var date = getStartOfYear(setYear(_this.props.date, y));
|
|
12691
12659
|
var isDisabled = (minDate || maxDate || excludeDates || includeDates || filterDate) &&
|
|
12692
12660
|
isYearDisabled(y, _this.props);
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
isKeyboardSelectedDay &&
|
|
12661
|
+
return (!_this.props.disabledKeyboardNavigation &&
|
|
12662
|
+
!_this.props.inline &&
|
|
12663
|
+
!isSameDay(date, getStartOfYear(_this.props.selected)) &&
|
|
12664
|
+
isSameDay(date, getStartOfYear(_this.props.preSelection)) &&
|
|
12698
12665
|
!isDisabled);
|
|
12699
12666
|
};
|
|
12700
12667
|
_this.isSelectedYear = function (year) {
|
|
@@ -13043,7 +13010,6 @@ var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
|
13043
13010
|
"react-datepicker__month-select",
|
|
13044
13011
|
"react-datepicker__month-year-select",
|
|
13045
13012
|
];
|
|
13046
|
-
var OUTSIDE_CLICK_IGNORE_CLASS = "react-datepicker-ignore-onclickoutside";
|
|
13047
13013
|
var isDropdownSelect = function (element) {
|
|
13048
13014
|
var classNames = (element.className || "").split(/\s+/);
|
|
13049
13015
|
return DROPDOWN_FOCUS_CLASSNAMES.some(function (testClassname) { return classNames.indexOf(testClassname) >= 0; });
|
|
@@ -13195,9 +13161,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13195
13161
|
var startOfWeek = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
13196
13162
|
var dayNames = [];
|
|
13197
13163
|
if (_this.props.showWeekNumbers) {
|
|
13198
|
-
dayNames.push(React__namespace.default.createElement("div", { key: "W", className: "react-datepicker__day-name",
|
|
13199
|
-
React__namespace.default.createElement("span", { className: "sr-only" }, "Week number"),
|
|
13200
|
-
React__namespace.default.createElement("span", { "aria-hidden": "true" }, _this.props.weekLabel || "#")));
|
|
13164
|
+
dayNames.push(React__namespace.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
13201
13165
|
}
|
|
13202
13166
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) {
|
|
13203
13167
|
var day = addDays(startOfWeek, offset);
|
|
@@ -13205,9 +13169,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13205
13169
|
var weekDayClassName = _this.props.weekDayClassName
|
|
13206
13170
|
? _this.props.weekDayClassName(day)
|
|
13207
13171
|
: undefined;
|
|
13208
|
-
return (React__namespace.default.createElement("div", { key: offset,
|
|
13209
|
-
React__namespace.default.createElement("span", { className: "sr-only" }, formatDate(day, "EEEE", _this.props.locale)),
|
|
13210
|
-
React__namespace.default.createElement("span", { "aria-hidden": "true" }, weekDayName)));
|
|
13172
|
+
return (React__namespace.default.createElement("div", { key: offset, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName));
|
|
13211
13173
|
}));
|
|
13212
13174
|
};
|
|
13213
13175
|
_this.formatWeekday = function (day, locale) {
|
|
@@ -13422,7 +13384,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13422
13384
|
_this.renderMonthDropdown(i !== 0),
|
|
13423
13385
|
_this.renderMonthYearDropdown(i !== 0),
|
|
13424
13386
|
_this.renderYearDropdown(i !== 0)),
|
|
13425
|
-
React__namespace.default.createElement("div", { className: "react-datepicker__day-names"
|
|
13387
|
+
React__namespace.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))));
|
|
13426
13388
|
};
|
|
13427
13389
|
_this.renderCustomHeader = function (headerArgs) {
|
|
13428
13390
|
var _a, _b;
|
|
@@ -13431,15 +13393,6 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13431
13393
|
_this.props.showTimeSelectOnly) {
|
|
13432
13394
|
return null;
|
|
13433
13395
|
}
|
|
13434
|
-
var _c = _this.props, showYearPicker = _c.showYearPicker, yearItemNumber = _c.yearItemNumber;
|
|
13435
|
-
var visibleYearsRange;
|
|
13436
|
-
if (showYearPicker) {
|
|
13437
|
-
var _d = getYearsPeriod(monthDate, yearItemNumber), startYear = _d.startPeriod, endYear = _d.endPeriod;
|
|
13438
|
-
visibleYearsRange = {
|
|
13439
|
-
startYear: startYear,
|
|
13440
|
-
endYear: endYear,
|
|
13441
|
-
};
|
|
13442
|
-
}
|
|
13443
13396
|
var prevMonthButtonDisabled = monthDisabledBefore(_this.state.date, _this.props);
|
|
13444
13397
|
var nextMonthButtonDisabled = monthDisabledAfter(_this.state.date, _this.props);
|
|
13445
13398
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
@@ -13448,7 +13401,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13448
13401
|
!_this.props.showQuarterYearPicker &&
|
|
13449
13402
|
!_this.props.showYearPicker;
|
|
13450
13403
|
return (React__namespace.default.createElement("div", { className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus }, (_b = (_a = _this.props).renderCustomHeader) === null || _b === void 0 ? void 0 :
|
|
13451
|
-
_b.call(_a, _assign(_assign(
|
|
13404
|
+
_b.call(_a, _assign(_assign({}, _this.state), { customHeaderCount: i, monthDate: monthDate, changeMonth: _this.changeMonth, changeYear: _this.changeYear, decreaseMonth: _this.decreaseMonth, increaseMonth: _this.increaseMonth, decreaseYear: _this.decreaseYear, increaseYear: _this.increaseYear, prevMonthButtonDisabled: prevMonthButtonDisabled, nextMonthButtonDisabled: nextMonthButtonDisabled, prevYearButtonDisabled: prevYearButtonDisabled, nextYearButtonDisabled: nextYearButtonDisabled })),
|
|
13452
13405
|
showDayNames && (React__namespace.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate)))));
|
|
13453
13406
|
};
|
|
13454
13407
|
_this.renderYearHeader = function (_a) {
|
|
@@ -13568,7 +13521,6 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
13568
13521
|
return {
|
|
13569
13522
|
monthsShown: 1,
|
|
13570
13523
|
forceShowMonthNavigation: false,
|
|
13571
|
-
outsideClickIgnoreClass: OUTSIDE_CLICK_IGNORE_CLASS,
|
|
13572
13524
|
timeCaption: "Time",
|
|
13573
13525
|
previousYearButtonLabel: "Previous Year",
|
|
13574
13526
|
nextYearButtonLabel: "Next Year",
|
|
@@ -13857,6 +13809,7 @@ var PopperComponent = /** @class */ (function (_super) {
|
|
|
13857
13809
|
}(React.Component));
|
|
13858
13810
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
13859
13811
|
|
|
13812
|
+
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
13860
13813
|
// Compares dates year+month combinations
|
|
13861
13814
|
function hasPreSelectionChanged(date1, date2) {
|
|
13862
13815
|
if (date1 && date2) {
|
|
@@ -13922,35 +13875,6 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
13922
13875
|
wasHidden: false,
|
|
13923
13876
|
};
|
|
13924
13877
|
};
|
|
13925
|
-
_this.getInputValue = function () {
|
|
13926
|
-
var _a;
|
|
13927
|
-
var _b = _this.props, locale = _b.locale, startDate = _b.startDate, endDate = _b.endDate, rangeSeparator = _b.rangeSeparator, selected = _b.selected, selectedDates = _b.selectedDates, selectsMultiple = _b.selectsMultiple, selectsRange = _b.selectsRange, value = _b.value;
|
|
13928
|
-
var dateFormat = (_a = _this.props.dateFormat) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormat;
|
|
13929
|
-
var inputValue = _this.state.inputValue;
|
|
13930
|
-
if (typeof value === "string") {
|
|
13931
|
-
return value;
|
|
13932
|
-
}
|
|
13933
|
-
else if (typeof inputValue === "string") {
|
|
13934
|
-
return inputValue;
|
|
13935
|
-
}
|
|
13936
|
-
else if (selectsRange) {
|
|
13937
|
-
return safeDateRangeFormat(startDate, endDate, {
|
|
13938
|
-
dateFormat: dateFormat,
|
|
13939
|
-
locale: locale,
|
|
13940
|
-
rangeSeparator: rangeSeparator,
|
|
13941
|
-
});
|
|
13942
|
-
}
|
|
13943
|
-
else if (selectsMultiple) {
|
|
13944
|
-
return safeMultipleDatesFormat(selectedDates !== null && selectedDates !== void 0 ? selectedDates : [], {
|
|
13945
|
-
dateFormat: dateFormat,
|
|
13946
|
-
locale: locale,
|
|
13947
|
-
});
|
|
13948
|
-
}
|
|
13949
|
-
return safeDateFormat(selected, {
|
|
13950
|
-
dateFormat: dateFormat,
|
|
13951
|
-
locale: locale,
|
|
13952
|
-
});
|
|
13953
|
-
};
|
|
13954
13878
|
_this.resetHiddenStatus = function () {
|
|
13955
13879
|
_this.setState(_assign(_assign({}, _this.state), { wasHidden: false }));
|
|
13956
13880
|
};
|
|
@@ -14050,15 +13974,11 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14050
13974
|
_this.handleDropdownFocus = function () {
|
|
14051
13975
|
_this.cancelFocusInput();
|
|
14052
13976
|
};
|
|
14053
|
-
_this.resetInputValue = function () {
|
|
14054
|
-
_this.setState(_assign(_assign({}, _this.state), { inputValue: null }));
|
|
14055
|
-
};
|
|
14056
13977
|
_this.handleBlur = function (event) {
|
|
14057
13978
|
var _a, _b;
|
|
14058
13979
|
if (!_this.state.open || _this.props.withPortal || _this.props.showTimeInput) {
|
|
14059
13980
|
(_b = (_a = _this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
14060
13981
|
}
|
|
14061
|
-
_this.resetInputValue();
|
|
14062
13982
|
if (_this.state.open && _this.props.open === false) {
|
|
14063
13983
|
_this.setOpen(false);
|
|
14064
13984
|
}
|
|
@@ -14099,17 +14019,11 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14099
14019
|
var strictParsing = (_b = _this.props.strictParsing) !== null && _b !== void 0 ? _b : DatePicker.defaultProps.strictParsing;
|
|
14100
14020
|
var value = (event === null || event === void 0 ? void 0 : event.target) instanceof HTMLInputElement ? event.target.value : "";
|
|
14101
14021
|
if (selectsRange) {
|
|
14102
|
-
var rangeSeparator = _this.props.rangeSeparator;
|
|
14103
|
-
var trimmedRangeSeparator = rangeSeparator.trim();
|
|
14104
14022
|
var _g = value
|
|
14105
|
-
.split(dateFormat.includes(
|
|
14106
|
-
? rangeSeparator
|
|
14107
|
-
: trimmedRangeSeparator, 2)
|
|
14023
|
+
.split(dateFormat.includes("-") ? DATE_RANGE_SEPARATOR : "-", 2)
|
|
14108
14024
|
.map(function (val) { return val.trim(); }), valueStart = _g[0], valueEnd = _g[1];
|
|
14109
14025
|
var startDateNew = parseDate(valueStart !== null && valueStart !== void 0 ? valueStart : "", dateFormat, _this.props.locale, strictParsing);
|
|
14110
|
-
var endDateNew =
|
|
14111
|
-
? parseDate(valueEnd !== null && valueEnd !== void 0 ? valueEnd : "", dateFormat, _this.props.locale, strictParsing)
|
|
14112
|
-
: null;
|
|
14026
|
+
var endDateNew = parseDate(valueEnd !== null && valueEnd !== void 0 ? valueEnd : "", dateFormat, _this.props.locale, strictParsing);
|
|
14113
14027
|
var startChanged = (startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) !== (startDateNew === null || startDateNew === void 0 ? void 0 : startDateNew.getTime());
|
|
14114
14028
|
var endChanged = (endDate === null || endDate === void 0 ? void 0 : endDate.getTime()) !== (endDateNew === null || endDateNew === void 0 ? void 0 : endDateNew.getTime());
|
|
14115
14029
|
if (!startChanged && !endChanged) {
|
|
@@ -14224,7 +14138,6 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14224
14138
|
if (selectsRange) {
|
|
14225
14139
|
var noRanges = !startDate && !endDate;
|
|
14226
14140
|
var hasStartRange = startDate && !endDate;
|
|
14227
|
-
var hasOnlyEndRange = !startDate && !!endDate;
|
|
14228
14141
|
var isRangeFilled = startDate && endDate;
|
|
14229
14142
|
if (noRanges) {
|
|
14230
14143
|
onChange === null || onChange === void 0 ? void 0 : onChange([changedDate, null], event);
|
|
@@ -14245,14 +14158,6 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14245
14158
|
onChange === null || onChange === void 0 ? void 0 : onChange([startDate, changedDate], event);
|
|
14246
14159
|
}
|
|
14247
14160
|
}
|
|
14248
|
-
else if (hasOnlyEndRange) {
|
|
14249
|
-
if (changedDate && isDateBefore(changedDate, endDate)) {
|
|
14250
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([changedDate, endDate], event);
|
|
14251
|
-
}
|
|
14252
|
-
else {
|
|
14253
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([changedDate, null], event);
|
|
14254
|
-
}
|
|
14255
|
-
}
|
|
14256
14161
|
if (isRangeFilled) {
|
|
14257
14162
|
onChange === null || onChange === void 0 ? void 0 : onChange([changedDate, null], event);
|
|
14258
14163
|
}
|
|
@@ -14626,12 +14531,10 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14626
14531
|
}
|
|
14627
14532
|
return (React__namespace.default.createElement(Calendar, _assign({ showMonthYearDropdown: undefined, ref: function (elem) {
|
|
14628
14533
|
_this.calendar = elem;
|
|
14629
|
-
} }, _this.props, _this.state, { setOpen: _this.setOpen, dateFormat: (_a = _this.props.dateFormatCalendar) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormatCalendar, onSelect: _this.handleSelect, onClickOutside: _this.handleCalendarClickOutside, holidays: getHolidaysMap(_this.modifyHolidays()), outsideClickIgnoreClass:
|
|
14534
|
+
} }, _this.props, _this.state, { setOpen: _this.setOpen, dateFormat: (_a = _this.props.dateFormatCalendar) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormatCalendar, onSelect: _this.handleSelect, onClickOutside: _this.handleCalendarClickOutside, holidays: getHolidaysMap(_this.modifyHolidays()), outsideClickIgnoreClass: outsideClickIgnoreClass, onDropdownFocus: _this.handleDropdownFocus, onTimeChange: _this.handleTimeChange, className: _this.props.calendarClassName, container: _this.props.calendarContainer, handleOnKeyDown: _this.props.onKeyDown, handleOnDayKeyDown: _this.onDayKeyDown, setPreSelection: _this.setPreSelection, dropdownMode: (_b = _this.props.dropdownMode) !== null && _b !== void 0 ? _b : DatePicker.defaultProps.dropdownMode }), _this.props.children));
|
|
14630
14535
|
};
|
|
14631
14536
|
_this.renderAriaLiveRegion = function () {
|
|
14632
|
-
var _a;
|
|
14633
|
-
var locale = _this.props.locale;
|
|
14634
|
-
var dateFormat = (_a = _this.props.dateFormat) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormat;
|
|
14537
|
+
var _a = _this.props, _b = _a.dateFormat, dateFormat = _b === void 0 ? DatePicker.defaultProps.dateFormat : _b, locale = _a.locale;
|
|
14635
14538
|
var isContainsTime = _this.props.showTimeInput || _this.props.showTimeSelect;
|
|
14636
14539
|
var longDateFormat = isContainsTime ? "PPPPp" : "PPPP";
|
|
14637
14540
|
var ariaLiveMessage;
|
|
@@ -14674,17 +14577,36 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14674
14577
|
};
|
|
14675
14578
|
_this.renderDateInput = function () {
|
|
14676
14579
|
var _a, _b;
|
|
14580
|
+
var _c;
|
|
14677
14581
|
var className = clsx(_this.props.className, (_a = {},
|
|
14678
|
-
_a[_this.
|
|
14679
|
-
DatePicker.defaultProps.outsideClickIgnoreClass] = _this.state.open,
|
|
14582
|
+
_a[outsideClickIgnoreClass] = _this.state.open,
|
|
14680
14583
|
_a));
|
|
14681
14584
|
var customInput = _this.props.customInput || React__namespace.default.createElement("input", { type: "text" });
|
|
14682
14585
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
14586
|
+
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
14587
|
+
var inputValue = typeof _this.props.value === "string"
|
|
14588
|
+
? _this.props.value
|
|
14589
|
+
: typeof _this.state.inputValue === "string"
|
|
14590
|
+
? _this.state.inputValue
|
|
14591
|
+
: _this.props.selectsRange
|
|
14592
|
+
? safeDateRangeFormat(_this.props.startDate, _this.props.endDate, {
|
|
14593
|
+
dateFormat: dateFormat,
|
|
14594
|
+
locale: locale,
|
|
14595
|
+
})
|
|
14596
|
+
: _this.props.selectsMultiple
|
|
14597
|
+
? safeMultipleDatesFormat((_c = _this.props.selectedDates) !== null && _c !== void 0 ? _c : [], {
|
|
14598
|
+
dateFormat: dateFormat,
|
|
14599
|
+
locale: locale,
|
|
14600
|
+
})
|
|
14601
|
+
: safeDateFormat(_this.props.selected, {
|
|
14602
|
+
dateFormat: dateFormat,
|
|
14603
|
+
locale: locale,
|
|
14604
|
+
});
|
|
14683
14605
|
return React.cloneElement(customInput, (_b = {},
|
|
14684
14606
|
_b[customInputRef] = function (input) {
|
|
14685
14607
|
_this.input = input;
|
|
14686
14608
|
},
|
|
14687
|
-
_b.value =
|
|
14609
|
+
_b.value = inputValue,
|
|
14688
14610
|
_b.onBlur = _this.handleBlur,
|
|
14689
14611
|
_b.onChange = _this.handleChange,
|
|
14690
14612
|
_b.onClick = _this.onInputClick,
|
|
@@ -14737,9 +14659,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
14737
14659
|
dropdownMode: "scroll",
|
|
14738
14660
|
preventOpenOnFocus: false,
|
|
14739
14661
|
monthsShown: 1,
|
|
14740
|
-
outsideClickIgnoreClass: OUTSIDE_CLICK_IGNORE_CLASS,
|
|
14741
14662
|
readOnly: false,
|
|
14742
|
-
rangeSeparator: DATE_RANGE_SEPARATOR,
|
|
14743
14663
|
withPortal: false,
|
|
14744
14664
|
selectsDisabledDaysInRange: false,
|
|
14745
14665
|
shouldCloseOnSelect: true,
|
|
@@ -15255,4 +15175,4 @@ exports.DatePickerGroup = DatePickerGroup;
|
|
|
15255
15175
|
exports.HelperText = HelperText;
|
|
15256
15176
|
exports.InlineDatePicker = InlineDatePicker;
|
|
15257
15177
|
exports.ValidationText = ValidationText;
|
|
15258
|
-
//# sourceMappingURL=InlineDatePicker-
|
|
15178
|
+
//# sourceMappingURL=InlineDatePicker-DFv_uHo9.js.map
|