funda-ui 4.7.735 → 4.7.740
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/EventCalendarTimeline/index.css +3 -0
- package/EventCalendarTimeline/index.js +48 -3
- package/lib/cjs/EventCalendarTimeline/index.js +48 -3
- package/lib/css/EventCalendarTimeline/index.css +3 -0
- package/lib/esm/EventCalendarTimeline/index.scss +3 -0
- package/lib/esm/EventCalendarTimeline/index.tsx +55 -4
- package/lib/esm/ModalDialog/index.tsx +1 -0
- package/package.json +1 -1
|
@@ -5794,10 +5794,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5794
5794
|
//****************
|
|
5795
5795
|
// display wrapper
|
|
5796
5796
|
//--------------
|
|
5797
|
-
|
|
5797
|
+
setGridReady(true);
|
|
5798
5798
|
|
|
5799
5799
|
//****************
|
|
5800
|
-
// STEP
|
|
5800
|
+
// STEP 7-1:
|
|
5801
5801
|
//****************
|
|
5802
5802
|
// calculate min width (MODE: WEEK)
|
|
5803
5803
|
//--------------
|
|
@@ -5852,6 +5852,49 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5852
5852
|
}
|
|
5853
5853
|
}
|
|
5854
5854
|
|
|
5855
|
+
// Dual RAF survival test
|
|
5856
|
+
/*
|
|
5857
|
+
A single RAF only guarantees "moving to the next frame."
|
|
5858
|
+
Only dual RAFs can guarantee "DOM is mounted + layout is stable."
|
|
5859
|
+
*/
|
|
5860
|
+
var _useState51 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
5861
|
+
_useState52 = _slicedToArray(_useState51, 2),
|
|
5862
|
+
gridReady = _useState52[0],
|
|
5863
|
+
setGridReady = _useState52[1];
|
|
5864
|
+
var rafRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});
|
|
5865
|
+
function safeShowGrid() {
|
|
5866
|
+
//
|
|
5867
|
+
setGridReady(false);
|
|
5868
|
+
rafRef.current.r1 = requestAnimationFrame(function () {
|
|
5869
|
+
rafRef.current.r2 = requestAnimationFrame(function () {
|
|
5870
|
+
var el = tableGridRef.current;
|
|
5871
|
+
if (!el) return;
|
|
5872
|
+
|
|
5873
|
+
//
|
|
5874
|
+
tableGridInit();
|
|
5875
|
+
|
|
5876
|
+
// Do only one thing: notify React that it’s ready to be displayed.
|
|
5877
|
+
setGridReady(true);
|
|
5878
|
+
});
|
|
5879
|
+
});
|
|
5880
|
+
}
|
|
5881
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5882
|
+
safeShowGrid();
|
|
5883
|
+
return function () {
|
|
5884
|
+
if (rafRef.current.r1) {
|
|
5885
|
+
cancelAnimationFrame(rafRef.current.r1);
|
|
5886
|
+
}
|
|
5887
|
+
if (rafRef.current.r2) {
|
|
5888
|
+
cancelAnimationFrame(rafRef.current.r2);
|
|
5889
|
+
}
|
|
5890
|
+
};
|
|
5891
|
+
}, [appearanceMode]);
|
|
5892
|
+
|
|
5893
|
+
// Make sure the left side is highly synchronized with the right side.
|
|
5894
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5895
|
+
tableGridInitHeadertitle();
|
|
5896
|
+
}, [orginalData, appearanceMode]);
|
|
5897
|
+
|
|
5855
5898
|
// if user change the selectedYear, then udate the years array that is displayed on year tab view
|
|
5856
5899
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5857
5900
|
var years = [];
|
|
@@ -6104,7 +6147,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
6104
6147
|
onClick: handleAppearanceChange
|
|
6105
6148
|
}, langAppearanceLabelWeek || 'Week')) : null)), orginalData.length === 0 ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
6106
6149
|
ref: tableGridRef,
|
|
6107
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--".concat(appearanceMode
|
|
6150
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--".concat(appearanceMode), tableWrapperClassName, {
|
|
6151
|
+
'invisible': !gridReady
|
|
6152
|
+
}),
|
|
6108
6153
|
onKeyDown: function onKeyDown(e) {
|
|
6109
6154
|
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e, selectedCells);
|
|
6110
6155
|
|
|
@@ -5794,10 +5794,10 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5794
5794
|
//****************
|
|
5795
5795
|
// display wrapper
|
|
5796
5796
|
//--------------
|
|
5797
|
-
|
|
5797
|
+
setGridReady(true);
|
|
5798
5798
|
|
|
5799
5799
|
//****************
|
|
5800
|
-
// STEP
|
|
5800
|
+
// STEP 7-1:
|
|
5801
5801
|
//****************
|
|
5802
5802
|
// calculate min width (MODE: WEEK)
|
|
5803
5803
|
//--------------
|
|
@@ -5852,6 +5852,49 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5852
5852
|
}
|
|
5853
5853
|
}
|
|
5854
5854
|
|
|
5855
|
+
// Dual RAF survival test
|
|
5856
|
+
/*
|
|
5857
|
+
A single RAF only guarantees "moving to the next frame."
|
|
5858
|
+
Only dual RAFs can guarantee "DOM is mounted + layout is stable."
|
|
5859
|
+
*/
|
|
5860
|
+
var _useState51 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
5861
|
+
_useState52 = _slicedToArray(_useState51, 2),
|
|
5862
|
+
gridReady = _useState52[0],
|
|
5863
|
+
setGridReady = _useState52[1];
|
|
5864
|
+
var rafRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});
|
|
5865
|
+
function safeShowGrid() {
|
|
5866
|
+
//
|
|
5867
|
+
setGridReady(false);
|
|
5868
|
+
rafRef.current.r1 = requestAnimationFrame(function () {
|
|
5869
|
+
rafRef.current.r2 = requestAnimationFrame(function () {
|
|
5870
|
+
var el = tableGridRef.current;
|
|
5871
|
+
if (!el) return;
|
|
5872
|
+
|
|
5873
|
+
//
|
|
5874
|
+
tableGridInit();
|
|
5875
|
+
|
|
5876
|
+
// Do only one thing: notify React that it’s ready to be displayed.
|
|
5877
|
+
setGridReady(true);
|
|
5878
|
+
});
|
|
5879
|
+
});
|
|
5880
|
+
}
|
|
5881
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5882
|
+
safeShowGrid();
|
|
5883
|
+
return function () {
|
|
5884
|
+
if (rafRef.current.r1) {
|
|
5885
|
+
cancelAnimationFrame(rafRef.current.r1);
|
|
5886
|
+
}
|
|
5887
|
+
if (rafRef.current.r2) {
|
|
5888
|
+
cancelAnimationFrame(rafRef.current.r2);
|
|
5889
|
+
}
|
|
5890
|
+
};
|
|
5891
|
+
}, [appearanceMode]);
|
|
5892
|
+
|
|
5893
|
+
// Make sure the left side is highly synchronized with the right side.
|
|
5894
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5895
|
+
tableGridInitHeadertitle();
|
|
5896
|
+
}, [orginalData, appearanceMode]);
|
|
5897
|
+
|
|
5855
5898
|
// if user change the selectedYear, then udate the years array that is displayed on year tab view
|
|
5856
5899
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5857
5900
|
var years = [];
|
|
@@ -6104,7 +6147,9 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
6104
6147
|
onClick: handleAppearanceChange
|
|
6105
6148
|
}, langAppearanceLabelWeek || 'Week')) : null)), orginalData.length === 0 ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
6106
6149
|
ref: tableGridRef,
|
|
6107
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--".concat(appearanceMode
|
|
6150
|
+
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--".concat(appearanceMode), tableWrapperClassName, {
|
|
6151
|
+
'invisible': !gridReady
|
|
6152
|
+
}),
|
|
6108
6153
|
onKeyDown: function onKeyDown(e) {
|
|
6109
6154
|
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e, selectedCells);
|
|
6110
6155
|
|
|
@@ -252,6 +252,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
252
252
|
const [month, setMonth] = useState<number>(date.getMonth());
|
|
253
253
|
const [year, setYear] = useState<number>(date.getFullYear());
|
|
254
254
|
const [startDay, setStartDay] = useState<number>(getStartDayOfMonth(date));
|
|
255
|
+
|
|
255
256
|
|
|
256
257
|
|
|
257
258
|
// selection tab
|
|
@@ -1922,6 +1923,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
1922
1923
|
|
|
1923
1924
|
|
|
1924
1925
|
function tableGridInitHeadertitle() {
|
|
1926
|
+
|
|
1925
1927
|
//
|
|
1926
1928
|
if (tableGridRef.current === null) return;
|
|
1927
1929
|
|
|
@@ -2171,10 +2173,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
2171
2173
|
//****************
|
|
2172
2174
|
// display wrapper
|
|
2173
2175
|
//--------------
|
|
2174
|
-
|
|
2176
|
+
setGridReady(true);
|
|
2175
2177
|
|
|
2176
2178
|
//****************
|
|
2177
|
-
// STEP
|
|
2179
|
+
// STEP 7-1:
|
|
2178
2180
|
//****************
|
|
2179
2181
|
// calculate min width (MODE: WEEK)
|
|
2180
2182
|
//--------------
|
|
@@ -2240,6 +2242,52 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
2240
2242
|
|
|
2241
2243
|
}
|
|
2242
2244
|
|
|
2245
|
+
// Dual RAF survival test
|
|
2246
|
+
/*
|
|
2247
|
+
A single RAF only guarantees "moving to the next frame."
|
|
2248
|
+
Only dual RAFs can guarantee "DOM is mounted + layout is stable."
|
|
2249
|
+
*/
|
|
2250
|
+
const [gridReady, setGridReady] = useState<boolean>(false);
|
|
2251
|
+
const rafRef = useRef<{ r1?: number; r2?: number }>({});
|
|
2252
|
+
|
|
2253
|
+
function safeShowGrid() {
|
|
2254
|
+
//
|
|
2255
|
+
setGridReady(false);
|
|
2256
|
+
|
|
2257
|
+
rafRef.current.r1 = requestAnimationFrame(() => {
|
|
2258
|
+
rafRef.current.r2 = requestAnimationFrame(() => {
|
|
2259
|
+
const el = tableGridRef.current;
|
|
2260
|
+
if (!el) return;
|
|
2261
|
+
|
|
2262
|
+
//
|
|
2263
|
+
tableGridInit();
|
|
2264
|
+
|
|
2265
|
+
// Do only one thing: notify React that it’s ready to be displayed.
|
|
2266
|
+
setGridReady(true);
|
|
2267
|
+
});
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
useEffect(() => {
|
|
2272
|
+
safeShowGrid();
|
|
2273
|
+
|
|
2274
|
+
return () => {
|
|
2275
|
+
if (rafRef.current.r1) {
|
|
2276
|
+
cancelAnimationFrame(rafRef.current.r1);
|
|
2277
|
+
}
|
|
2278
|
+
if (rafRef.current.r2) {
|
|
2279
|
+
cancelAnimationFrame(rafRef.current.r2);
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
}, [appearanceMode]);
|
|
2283
|
+
|
|
2284
|
+
|
|
2285
|
+
// Make sure the left side is highly synchronized with the right side.
|
|
2286
|
+
useEffect(() => {
|
|
2287
|
+
tableGridInitHeadertitle();
|
|
2288
|
+
}, [orginalData, appearanceMode]);
|
|
2289
|
+
|
|
2290
|
+
|
|
2243
2291
|
// if user change the selectedYear, then udate the years array that is displayed on year tab view
|
|
2244
2292
|
useEffect(() => {
|
|
2245
2293
|
const years: number[] = [];
|
|
@@ -2567,8 +2615,11 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
|
|
|
2567
2615
|
<div
|
|
2568
2616
|
ref={tableGridRef}
|
|
2569
2617
|
className={combinedCls(
|
|
2570
|
-
`custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--${appearanceMode}
|
|
2571
|
-
tableWrapperClassName
|
|
2618
|
+
`custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--${appearanceMode}`,
|
|
2619
|
+
tableWrapperClassName,
|
|
2620
|
+
{
|
|
2621
|
+
'invisible': !gridReady
|
|
2622
|
+
}
|
|
2572
2623
|
)}
|
|
2573
2624
|
onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {
|
|
2574
2625
|
onKeyPressed?.(e, selectedCells);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"UIUX Lab","email":"uiuxlab@gmail.com","name":"funda-ui","version":"4.7.
|
|
1
|
+
{"author":"UIUX Lab","email":"uiuxlab@gmail.com","name":"funda-ui","version":"4.7.740","description":"React components using pure Bootstrap 5+ which does not contain any external style and script libraries.","repository":{"type":"git","url":"git+https://github.com/xizon/funda-ui.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["bootstrap","react-bootstrap","react-components","components","components-react","react-bootstrap-components","react","funda-ui","fundaui","uikit","ui-kit","ui-components"],"bugs":{"url":"https://github.com/xizon/funda-ui/issues"},"homepage":"https://github.com/xizon/funda-ui#readme","main":"all.js","license":"MIT","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"types":"all.d.ts","publishConfig":{"directory":"lib"},"directories":{"lib":"lib"}}
|