impact-ui 5.0.0-alpha.3 → 5.0.0-alpha.4
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/_virtual/index10.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/initialize.js +4 -0
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +24 -8
- package/dist/mcp-component-registry.json +8 -1
- package/dist/node_modules/call-bind/index.js +1 -1
- package/dist/node_modules/react-dates/initialize.js +29 -0
- package/dist/node_modules/react-dates/lib/components/CalendarDay.js +27 -3
- package/dist/node_modules/react-with-styles/node_modules/react-with-direction/dist/constants.js +1 -1
- package/dist/node_modules/react-with-styles-interface-css/dist/index.js +1 -1
- package/dist/node_modules/react-with-styles-interface-css/dist/utils/constants.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePickerDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerDropdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dateRangePickerDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerDropdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,wBAAgB,uBAAuB,CAAC,EACtC,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,OAAO,EACP,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACT,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,EACd,OAAO,EACP,OAAO,EACP,eAAe,EACf,GAAG,IAAI,EACR,EAAE,GAAG,4BA0XL"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useState, useEffect, useLayoutEffect } from "react";
|
|
3
3
|
import { DayPickerRangeController } from "react-dates";
|
|
4
|
-
import CalendarDay from "../../node_modules/react-dates/lib/components/CalendarDay.js";
|
|
5
4
|
import { DateRangePickerCustom } from "./dateRangePickerCustom.js";
|
|
6
5
|
import { DateRangePickerFooter } from "./dateRangePickerFooter.js";
|
|
7
6
|
import { ShowMonthYearSelect } from "./showMonthYearSelect.js";
|
|
@@ -46,6 +45,7 @@ function DateRangePickerDropdown({
|
|
|
46
45
|
...args
|
|
47
46
|
}) {
|
|
48
47
|
const [moment, setMoment] = useState(null);
|
|
48
|
+
const [CalendarDay, setCalendarDay] = useState(null);
|
|
49
49
|
const [position, setPosition] = useState({
|
|
50
50
|
x: 0,
|
|
51
51
|
y: 0,
|
|
@@ -67,6 +67,18 @@ function DateRangePickerDropdown({
|
|
|
67
67
|
cancelled = true;
|
|
68
68
|
};
|
|
69
69
|
}, []);
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!alignWeeksAcrossMonths) return;
|
|
72
|
+
let cancelled = false;
|
|
73
|
+
import("../../node_modules/react-dates/initialize.js").then((n) => n.i).then(() => import("../../node_modules/react-dates/lib/components/CalendarDay.js").then((n) => n.C)).then((mod) => {
|
|
74
|
+
if (!cancelled) {
|
|
75
|
+
setCalendarDay(() => mod.default);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return () => {
|
|
79
|
+
cancelled = true;
|
|
80
|
+
};
|
|
81
|
+
}, [alignWeeksAcrossMonths]);
|
|
70
82
|
const isValidDate = (date) => Boolean(date == null ? void 0 : date._isAMomentObject) && date.isValid() && (!minDate || !date.isBefore(minDate, "day")) && (!maxDate || !date.isAfter(maxDate, "day")) && !(isOutsideRange == null ? void 0 : isOutsideRange(date));
|
|
71
83
|
const hasValidRange = isValidDate(startDate) && isValidDate(endDate) && !endDate.isBefore(startDate, "day");
|
|
72
84
|
const isClearDisabled = startDate == null && endDate == null && !hasInputErrors;
|
|
@@ -99,12 +111,16 @@ function DateRangePickerDropdown({
|
|
|
99
111
|
});
|
|
100
112
|
}
|
|
101
113
|
}, [containerRef.current, dropDownContainerRef.current, withPortal, showRangeSelector]);
|
|
102
|
-
const renderCalendarDay = React__default.useCallback(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
const renderCalendarDay = React__default.useCallback(
|
|
115
|
+
(props) => {
|
|
116
|
+
if (props.day && shouldHideDayForWeekAlignedMonth(props.day, props.isOutsideDay)) {
|
|
117
|
+
return /* @__PURE__ */ jsx("td", { className: "CalendarDay__weekAlignedHidden", "aria-hidden": "true" });
|
|
118
|
+
}
|
|
119
|
+
if (!CalendarDay) return null;
|
|
120
|
+
return /* @__PURE__ */ jsx(CalendarDay, { ...props });
|
|
121
|
+
},
|
|
122
|
+
[CalendarDay]
|
|
123
|
+
);
|
|
108
124
|
const renderDayContents = React__default.useCallback((momentInstance, modifiers) => {
|
|
109
125
|
let currentWeek = null;
|
|
110
126
|
let currentWeekNumber = null;
|
|
@@ -170,7 +186,7 @@ function DateRangePickerDropdown({
|
|
|
170
186
|
if (endDate) return endDate;
|
|
171
187
|
return moment();
|
|
172
188
|
};
|
|
173
|
-
if (!moment) {
|
|
189
|
+
if (!moment || alignWeeksAcrossMonths && !CalendarDay) {
|
|
174
190
|
return null;
|
|
175
191
|
}
|
|
176
192
|
if (withPortal) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-12T14:07:19.180Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Menu": {
|
|
6
6
|
"title": "Components/Menu",
|
|
@@ -2535,6 +2535,13 @@
|
|
|
2535
2535
|
}
|
|
2536
2536
|
},
|
|
2537
2537
|
"storyArgs": {
|
|
2538
|
+
"AlignWeeksAcrossMonths": {
|
|
2539
|
+
"label": "Align Weeks Across Months",
|
|
2540
|
+
"alignWeeksAcrossMonths": true,
|
|
2541
|
+
"showWeekNumbers": true,
|
|
2542
|
+
"startDate": "null",
|
|
2543
|
+
"endDate": "null"
|
|
2544
|
+
},
|
|
2538
2545
|
"Default": {
|
|
2539
2546
|
"label": "Date Range Selector",
|
|
2540
2547
|
"isRequired": false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as callBind } from "../../_virtual/
|
|
1
|
+
import { __module as callBind } from "../../_virtual/index8.js";
|
|
2
2
|
import { __require as requireSetFunctionLength } from "../set-function-length/index.js";
|
|
3
3
|
import { __require as requireEsDefineProperty } from "../es-define-property/index.js";
|
|
4
4
|
import { __require as requireCallBindApplyHelpers } from "../call-bind-apply-helpers/index.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __exports as initialize$1 } from "../../_virtual/initialize.js";
|
|
2
|
+
import "./lib/initialize.js";
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
|
+
for (var i = 0; i < m.length; i++) {
|
|
5
|
+
const e = m[i];
|
|
6
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
7
|
+
for (const k in e) {
|
|
8
|
+
if (k !== "default" && !(k in n)) {
|
|
9
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
if (d) {
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
21
|
+
}
|
|
22
|
+
const initialize = /* @__PURE__ */ _mergeNamespaces({
|
|
23
|
+
__proto__: null,
|
|
24
|
+
default: initialize$1
|
|
25
|
+
}, [initialize$1]);
|
|
26
|
+
export {
|
|
27
|
+
initialize$1 as default,
|
|
28
|
+
initialize as i
|
|
29
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { __exports as CalendarDay$
|
|
2
|
+
import { __exports as CalendarDay$2 } from "../../../../_virtual/CalendarDay.js";
|
|
3
3
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
4
4
|
import { __require as requireBuild } from "../../../enzyme-shallow-equal/build/index.js";
|
|
5
5
|
import require$$2 from "@babel/runtime/helpers/extends";
|
|
@@ -18,6 +18,25 @@ import { __require as requireGetPhrasePropTypes } from "../utils/getPhrasePropTy
|
|
|
18
18
|
import { __require as requireGetCalendarDaySettings } from "../utils/getCalendarDaySettings.js";
|
|
19
19
|
import { __require as requireModifiersShape } from "../shapes/ModifiersShape.js";
|
|
20
20
|
import { __require as requireConstants } from "../constants.js";
|
|
21
|
+
function _mergeNamespaces(n, m) {
|
|
22
|
+
for (var i = 0; i < m.length; i++) {
|
|
23
|
+
const e = m[i];
|
|
24
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
25
|
+
for (const k in e) {
|
|
26
|
+
if (k !== "default" && !(k in n)) {
|
|
27
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
28
|
+
if (d) {
|
|
29
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: () => e[k]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
39
|
+
}
|
|
21
40
|
(function(exports) {
|
|
22
41
|
var _interopRequireDefault = require$$0;
|
|
23
42
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -348,8 +367,13 @@ import { __require as requireConstants } from "../constants.js";
|
|
|
348
367
|
pureComponent: typeof _react["default"].PureComponent !== "undefined"
|
|
349
368
|
})(CalendarDay2);
|
|
350
369
|
exports["default"] = _default;
|
|
351
|
-
})(CalendarDay$
|
|
352
|
-
const CalendarDay = /* @__PURE__ */ getDefaultExportFromCjs(CalendarDay$
|
|
370
|
+
})(CalendarDay$2);
|
|
371
|
+
const CalendarDay = /* @__PURE__ */ getDefaultExportFromCjs(CalendarDay$2);
|
|
372
|
+
const CalendarDay$1 = /* @__PURE__ */ _mergeNamespaces({
|
|
373
|
+
__proto__: null,
|
|
374
|
+
default: CalendarDay
|
|
375
|
+
}, [CalendarDay$2]);
|
|
353
376
|
export {
|
|
377
|
+
CalendarDay$1 as C,
|
|
354
378
|
CalendarDay as default
|
|
355
379
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as dist } from "../../../_virtual/
|
|
1
|
+
import { __exports as dist } from "../../../_virtual/index10.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
3
|
import { __require as requireArray_prototype_flat } from "../../array.prototype.flat/index.js";
|
|
4
4
|
import { __require as requireGlobalCache } from "../../global-cache/index.js";
|