funda-ui 4.5.512 → 4.5.575

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.
@@ -242,9 +242,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
242
242
  //
243
243
  const FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
244
244
 
245
- // root
246
- const rootRef = useRef<any>(null);
247
- const rootWidth = useRef<number>(0);
248
245
 
249
246
  //
250
247
  const now = useMemo(() => new Date(), []);
@@ -325,6 +322,15 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
325
322
  useImperativeHandle(
326
323
  contentRef,
327
324
  () => ({
325
+ today: () => {
326
+ handleTodayChange();
327
+ },
328
+ next: () => {
329
+ handleNextChange();
330
+ },
331
+ prev: () => {
332
+ handlePrevChange();
333
+ },
328
334
  gridInit: () => {
329
335
  tableGridInit();
330
336
  },
@@ -1170,6 +1176,18 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1170
1176
  // restore table grid init status
1171
1177
  restoreTableGridInitStatus();
1172
1178
 
1179
+ // The scrollbar position is horizontal
1180
+ setTimeout(() => {
1181
+ if (scrollBodyRef.current && tableGridRef.current) {
1182
+ const targetPos = tableGridRef.current.querySelector('.custom-event-tl-table__datagrid-header__content tbody .today.selected');
1183
+ if (targetPos !== null) {
1184
+ (scrollBodyRef.current as any).scrollLeft = targetPos.offsetLeft;
1185
+ }
1186
+ }
1187
+ }, 0);
1188
+
1189
+
1190
+
1173
1191
  }
1174
1192
 
1175
1193
  function handleAppearanceChange(e: React.MouseEvent) {
@@ -1259,7 +1277,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1259
1277
  {
1260
1278
  'empty': !isInteractive,
1261
1279
  'today': d === now.getDate(),
1262
- 'selected': d === day,
1280
+ 'selected': `${year}-${padZero(month + 1)}-${padZero(day)}` === `${year}-${padZero(month + 1)}-${padZero(d)}`,
1263
1281
  'last-cell': isLastCol
1264
1282
  }
1265
1283
  )}
@@ -1320,8 +1338,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1320
1338
  onCellMouseUp?.(e, selectedCells);
1321
1339
  }}
1322
1340
  >
1323
-
1324
-
1325
1341
  {/* forward fill & day & back fill */}
1326
1342
  <div
1327
1343
  className={combinedCls(
@@ -1332,6 +1348,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1332
1348
  )}
1333
1349
  style={{ width: (CELL_MIN_W - 1) + 'px' }}
1334
1350
  >
1351
+
1335
1352
  {d}
1336
1353
  {_weekDayStr}
1337
1354
  </div>
@@ -1822,31 +1839,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1822
1839
 
1823
1840
  }
1824
1841
 
1825
-
1826
- function outerWrapperInit() {
1827
- if (rootRef.current === null) return;
1828
-
1829
- const hasInlineHeightOrMaxHeight = (element: HTMLElement) => {
1830
- if (!element) return false;
1831
- return element.style.height !== '' || element.style.maxHeight !== '';
1832
- };
1833
-
1834
- // calculate wrapper width & height
1835
- const wrapperWidth = rootRef.current.parentElement?.offsetWidth || 0;
1836
- if (rootRef.current && wrapperWidth > 0 && rootWidth.current === 0) {
1837
- rootWidth.current = wrapperWidth;
1838
- rootRef.current.style.width = wrapperWidth + 'px';
1839
-
1840
- // height
1841
- const wrapperHeight = rootRef.current.parentElement?.offsetHeight || 0;
1842
- if (hasInlineHeightOrMaxHeight(rootRef.current.parentElement) && wrapperHeight > 0) {
1843
- rootRef.current.style.height = wrapperHeight + 'px';
1844
- }
1845
-
1846
- }
1847
- }
1848
-
1849
-
1850
1842
  function tableGridInit() {
1851
1843
 
1852
1844
  //
@@ -2177,11 +2169,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2177
2169
 
2178
2170
  useEffect(() => {
2179
2171
 
2180
-
2181
- // calculate wrapper width (!!!FIRST!!!)
2182
- //--------------
2183
- outerWrapperInit();
2184
-
2185
2172
  // !!!Please do not use dependencies
2186
2173
  //--------------
2187
2174
  return () => {
@@ -2198,364 +2185,357 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2198
2185
  return (
2199
2186
  <>
2200
2187
 
2201
- <div
2202
- ref={rootRef}
2203
- className="custom-event-tl__outerwrapper"
2204
- >
2205
-
2206
- {/*/////////////////////////////////////////////////// */}
2207
- {/*//////////////////// Calendar //////////////////// */}
2208
- {/*////////////////////////////////////////////////// */}
2209
-
2210
- <div className={combinedCls(
2211
- `custom-event-tl__wrapper custom-event-tl__wrapper--${appearanceMode}`,
2212
- calendarWrapperClassName
2213
- )}>
2214
-
2215
- {/*++++++++++++++++ MAIN ++++++++++++++++*/}
2216
- <div className="custom-event-tl__header bg-body-tertiary">
2217
- <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--prev" onClick={handlePrevChange}>
2218
- <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
2219
- <path d="M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z" fill="#000" />
2220
- </svg>
2221
- </button>
2188
+ {/*/////////////////////////////////////////////////// */}
2189
+ {/*//////////////////// Calendar //////////////////// */}
2190
+ {/*////////////////////////////////////////////////// */}
2191
+
2192
+ <div className={combinedCls(
2193
+ `custom-event-tl__wrapper custom-event-tl__wrapper--${appearanceMode}`,
2194
+ calendarWrapperClassName
2195
+ )}>
2196
+
2197
+ {/*++++++++++++++++ MAIN ++++++++++++++++*/}
2198
+ <div className="custom-event-tl__header bg-body-tertiary">
2199
+ <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--prev" onClick={handlePrevChange}>
2200
+ <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
2201
+ <path d="M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z" fill="#000" />
2202
+ </svg>
2203
+ </button>
2204
+
2205
+ {/* //########## MODE: WEEK ############# */}
2206
+ {appearanceMode === 'week' ? <>
2207
+ <div className="custom-event-tl__header__info">
2208
+ {typeof appearanceWeekTmpl === 'function' ? <>{appearanceWeekTmpl(displayWeekForHeader[0], displayWeekForHeader[1])}</> : <>{displayWeekForHeader[0]} - {displayWeekForHeader[1]}</>}
2209
+ </div>
2210
+ </> : null}
2211
+ {/* //########## /MODE: WEEK ############# */}
2222
2212
 
2223
- {/* //########## MODE: WEEK ############# */}
2224
- {appearanceMode === 'week' ? <>
2225
- <div className="custom-event-tl__header__info">
2226
- {typeof appearanceWeekTmpl === 'function' ? <>{appearanceWeekTmpl(displayWeekForHeader[0], displayWeekForHeader[1])}</> : <>{displayWeekForHeader[0]} - {displayWeekForHeader[1]}</>}
2227
- </div>
2228
- </> : null}
2229
- {/* //########## /MODE: WEEK ############# */}
2230
-
2231
-
2232
- {/* //########## MODE: MONTH ############# */}
2233
- {appearanceMode === 'month' ? <>
2234
- <div className="custom-event-tl__header__btns">
2235
- <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winMonth ? 'active' : ''}`} onClick={handleShowWinMonth}>
2236
- {MONTHS[month]}
2237
- <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
2238
- </button>
2239
- <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winYear ? 'active' : ''}`} onClick={handleShowWinYear}>
2240
- {year}
2241
- <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
2242
- </button>
2243
- </div>
2244
- </> : null}
2245
- {/* //########## /MODE: MONTH ############# */}
2246
2213
 
2214
+ {/* //########## MODE: MONTH ############# */}
2215
+ {appearanceMode === 'month' ? <>
2216
+ <div className="custom-event-tl__header__btns">
2217
+ <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winMonth ? 'active' : ''}`} onClick={handleShowWinMonth}>
2218
+ {MONTHS[month]}
2219
+ <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
2220
+ </button>
2221
+ <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winYear ? 'active' : ''}`} onClick={handleShowWinYear}>
2222
+ {year}
2223
+ <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
2224
+ </button>
2225
+ </div>
2226
+ </> : null}
2227
+ {/* //########## /MODE: MONTH ############# */}
2247
2228
 
2248
2229
 
2249
- <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--next" onClick={handleNextChange}>
2250
- <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
2251
- <path d="M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z" fill="#000" />
2252
- </svg>
2253
- </button>
2254
- </div>
2255
2230
 
2231
+ <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--next" onClick={handleNextChange}>
2232
+ <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
2233
+ <path d="M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z" fill="#000" />
2234
+ </svg>
2235
+ </button>
2236
+ </div>
2256
2237
 
2257
2238
 
2258
- <div className="custom-event-tl__body">
2259
2239
 
2240
+ <div className="custom-event-tl__body">
2260
2241
 
2261
- <div className="custom-event-tl__row">
2262
- {/* day */}
2263
2242
 
2264
- {/* /day */}
2265
- </div>
2243
+ <div className="custom-event-tl__row">
2244
+ {/* day */}
2266
2245
 
2246
+ {/* /day */}
2267
2247
  </div>
2268
- {/*++++++++++++++++ /MAIN ++++++++++++++++*/}
2269
-
2270
-
2271
- {/*++++++++++++++++ MONTH SELECTION TAB ++++++++++++++++*/}
2272
- <div className={`custom-event-tl__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winMonth ? 'active' : ''}`}>
2273
- <div className="custom-event-tl__month-container">
2274
- {MONTHS_FULL.map((month, index) => {
2275
- return <div
2276
- data-month={padZero(index + 1)}
2277
- className={`custom-event-tl__month ${selectedMonth === index ? ' selected' : ''}`}
2278
- key={month + index}
2279
- onClick={() => { handleMonthChange(index) }}
2280
- >{month}</div>
2281
- })}
2282
- </div>
2248
+
2249
+ </div>
2250
+ {/*++++++++++++++++ /MAIN ++++++++++++++++*/}
2251
+
2252
+
2253
+ {/*++++++++++++++++ MONTH SELECTION TAB ++++++++++++++++*/}
2254
+ <div className={`custom-event-tl__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winMonth ? 'active' : ''}`}>
2255
+ <div className="custom-event-tl__month-container">
2256
+ {MONTHS_FULL.map((month, index) => {
2257
+ return <div
2258
+ data-month={padZero(index + 1)}
2259
+ className={`custom-event-tl__month ${selectedMonth === index ? ' selected' : ''}`}
2260
+ key={month + index}
2261
+ onClick={() => { handleMonthChange(index) }}
2262
+ >{month}</div>
2263
+ })}
2283
2264
  </div>
2284
- {/*++++++++++++++++ /MONTH SELECTION TAB ++++++++++++++++*/}
2285
-
2286
- {/*++++++++++++++++ YEAR SELECTION TAB ++++++++++++++++*/}
2287
- <div className={`custom-event-tl__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winYear ? 'active' : ''}`}>
2288
- <div className="custom-event-tl__year-container bg-body-tertiary">
2289
- {yearsArray.map((year, index) => {
2290
- return <div
2291
- data-year={year}
2292
- className={`custom-event-tl__year ${selectedYear === year ? ' selected' : ''}`}
2293
- key={year + index}
2294
- onClick={() => { handleYearChange(year) }}
2295
- >{year}</div>
2296
- })}
2297
- </div>
2265
+ </div>
2266
+ {/*++++++++++++++++ /MONTH SELECTION TAB ++++++++++++++++*/}
2298
2267
 
2268
+ {/*++++++++++++++++ YEAR SELECTION TAB ++++++++++++++++*/}
2269
+ <div className={`custom-event-tl__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winYear ? 'active' : ''}`}>
2270
+ <div className="custom-event-tl__year-container bg-body-tertiary">
2271
+ {yearsArray.map((year, index) => {
2272
+ return <div
2273
+ data-year={year}
2274
+ className={`custom-event-tl__year ${selectedYear === year ? ' selected' : ''}`}
2275
+ key={year + index}
2276
+ onClick={() => { handleYearChange(year) }}
2277
+ >{year}</div>
2278
+ })}
2299
2279
  </div>
2300
- {/*++++++++++++++++ /YEAR SELECTION TAB ++++++++++++++++*/}
2280
+
2281
+ </div>
2282
+ {/*++++++++++++++++ /YEAR SELECTION TAB ++++++++++++++++*/}
2301
2283
 
2302
2284
 
2303
2285
 
2304
- {/*++++++++++++++++ TODAY SELECTION TAB ++++++++++++++++*/}
2305
- <div className="custom-event-tl__today-wrapper p-2">
2286
+ {/*++++++++++++++++ TODAY SELECTION TAB ++++++++++++++++*/}
2287
+ <div className="custom-event-tl__today-wrapper p-2">
2288
+ <button
2289
+ tabIndex={-1}
2290
+ type="button"
2291
+ className="custom-event-tl__btn custom-event-tl__btn--today"
2292
+ onClick={handleTodayChange}
2293
+ >
2294
+ {langToday || 'Today'}
2295
+ </button>
2296
+
2297
+ {appearanceToggle ? <>
2306
2298
  <button
2307
2299
  tabIndex={-1}
2308
2300
  type="button"
2309
- className="custom-event-tl__btn custom-event-tl__btn--today"
2310
- onClick={handleTodayChange}
2301
+ className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'month' ? 'active' : ''}`}
2302
+ data-mode="month"
2303
+ onClick={handleAppearanceChange}
2311
2304
  >
2312
- {langToday || 'Today'}
2305
+ {langAppearanceLabelMonth || 'Month'}
2313
2306
  </button>
2307
+ <button
2308
+ tabIndex={-1}
2309
+ type="button"
2310
+ className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'week' ? 'active' : ''}`}
2311
+ data-mode="week"
2312
+ onClick={handleAppearanceChange}
2313
+ >
2314
+ {langAppearanceLabelWeek || 'Week'}
2315
+ </button>
2316
+ </> : null}
2314
2317
 
2315
- {appearanceToggle ? <>
2316
- <button
2317
- tabIndex={-1}
2318
- type="button"
2319
- className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'month' ? 'active' : ''}`}
2320
- data-mode="month"
2321
- onClick={handleAppearanceChange}
2322
- >
2323
- {langAppearanceLabelMonth || 'Month'}
2324
- </button>
2325
- <button
2326
- tabIndex={-1}
2327
- type="button"
2328
- className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'week' ? 'active' : ''}`}
2329
- data-mode="week"
2330
- onClick={handleAppearanceChange}
2331
- >
2332
- {langAppearanceLabelWeek || 'Week'}
2333
- </button>
2334
- </> : null}
2335
-
2336
- </div>
2337
- {/*++++++++++++++++ /TODAY SELECTION TAB ++++++++++++++++*/}
2318
+ </div>
2319
+ {/*++++++++++++++++ /TODAY SELECTION TAB ++++++++++++++++*/}
2338
2320
 
2339
2321
 
2340
- </div>{/* /.custom-event-tl__wrapper */}
2322
+ </div>{/* /.custom-event-tl__wrapper */}
2341
2323
 
2342
2324
 
2343
2325
 
2344
- {/*/////////////////////////////////////////////////// */}
2345
- {/*//////////////////// Table Grid //////////////////// */}
2346
- {/*////////////////////////////////////////////////// */}
2347
- {orginalData.length === 0 ? null : <>
2348
- <div
2349
- ref={tableGridRef}
2350
- className={combinedCls(
2351
- `custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--${appearanceMode} invisible`,
2352
- tableWrapperClassName
2326
+ {/*/////////////////////////////////////////////////// */}
2327
+ {/*//////////////////// Table Grid //////////////////// */}
2328
+ {/*////////////////////////////////////////////////// */}
2329
+ {orginalData.length === 0 ? null : <>
2330
+ <div
2331
+ ref={tableGridRef}
2332
+ className={combinedCls(
2333
+ `custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--${appearanceMode} invisible`,
2334
+ tableWrapperClassName
2335
+ )}
2336
+ onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {
2337
+ onKeyPressed?.(e, selectedCells);
2338
+
2339
+ // Copy & Paste
2340
+ handleWrapperKeyDown(e);
2341
+ }}
2342
+ tabIndex={-1} // require "tabIndex" attribute
2343
+ >
2344
+ <table role="grid" className={combinedCls(
2345
+ "custom-event-tl-table__timeline-table",
2346
+ tableClassName
2347
+ )}>
2348
+ <colgroup>
2349
+ <col className="custom-event-tl-table__datagrid-header" />
2350
+ <col />
2351
+ <col />
2352
+ </colgroup>
2353
+
2354
+ <thead className={combinedCls(
2355
+ tableHeadClassName
2353
2356
  )}
2354
- onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {
2355
- onKeyPressed?.(e, selectedCells);
2357
+ ref={tableGridHeaderRef}
2358
+ role="rowgroup"
2359
+ >
2360
+ <tr role="presentation">
2361
+ <th role="presentation">
2362
+ {/*<!--///// HEADER LEFT //////-->*/}
2363
+ <div className="custom-event-tl-table__timeline-header custom-event-tl-table__timeline-headertitle">
2364
+
2365
+ <table role="presentation" className="custom-event-tl-table__datagrid-header__title">
2366
+ <colgroup>
2367
+ <col />
2368
+ </colgroup>
2369
+ <thead role="presentation">
2370
+ <tr role="row">
2371
+ <th role="columnheader">
2372
+ <div className="custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headertitle">
2373
+ {tableListSectionTitle || ''}
2374
+ </div>
2375
+ </th>
2376
+ </tr>
2377
+ </thead>
2378
+ </table>
2356
2379
 
2357
- // Copy & Paste
2358
- handleWrapperKeyDown(e);
2359
- }}
2360
- tabIndex={-1} // require "tabIndex" attribute
2361
- >
2362
- <table role="grid" className={combinedCls(
2363
- "custom-event-tl-table__timeline-table",
2364
- tableClassName
2365
- )}>
2366
- <colgroup>
2367
- <col className="custom-event-tl-table__datagrid-header" />
2368
- <col />
2369
- <col />
2370
- </colgroup>
2371
-
2372
- <thead className={combinedCls(
2373
- tableHeadClassName
2374
- )}
2375
- ref={tableGridHeaderRef}
2376
- role="rowgroup"
2377
- >
2378
- <tr role="presentation">
2379
- <th role="presentation">
2380
- {/*<!--///// HEADER LEFT //////-->*/}
2381
- <div className="custom-event-tl-table__timeline-header custom-event-tl-table__timeline-headertitle">
2380
+ </div>
2381
+ {/*<!--///// /HEADER LEFT //////-->*/}
2382
2382
 
2383
- <table role="presentation" className="custom-event-tl-table__datagrid-header__title">
2384
- <colgroup>
2385
- <col />
2386
- </colgroup>
2387
- <thead role="presentation">
2388
- <tr role="row">
2389
- <th role="columnheader">
2390
- <div className="custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headertitle">
2391
- {tableListSectionTitle || ''}
2392
- </div>
2393
- </th>
2394
- </tr>
2395
- </thead>
2396
- </table>
2397
2383
 
2398
- </div>
2399
- {/*<!--///// /HEADER LEFT //////-->*/}
2400
2384
 
2385
+ </th>
2386
+ <th role="presentation" className="custom-event-tl-table__timeline-divider"><div></div></th>
2387
+ <th role="presentation">
2388
+ <div
2389
+ ref={scrollHeaderRef}
2390
+ className="custom-event-tl-table__scroller-harness custom-event-tl-table__scroller-harness--hide"
2391
+ data-scroll="header"
2392
+ onScroll={syncTableScrollHeader}
2393
+ >
2394
+ <div className="custom-event-tl-table__scroller">
2401
2395
 
2396
+ {/*<!--///// HEADER RIGHT //////-->*/}
2397
+ <div className="custom-event-tl-table__timeline-header">
2402
2398
 
2403
- </th>
2404
- <th role="presentation" className="custom-event-tl-table__timeline-divider"><div></div></th>
2405
- <th role="presentation">
2406
- <div
2407
- ref={scrollHeaderRef}
2408
- className="custom-event-tl-table__scroller-harness custom-event-tl-table__scroller-harness--hide"
2409
- data-scroll="header"
2410
- onScroll={syncTableScrollHeader}
2411
- >
2412
- <div className="custom-event-tl-table__scroller">
2413
-
2414
- {/*<!--///// HEADER RIGHT //////-->*/}
2415
- <div className="custom-event-tl-table__timeline-header">
2416
-
2417
- <table className="custom-event-tl-table__datagrid-header__content custom-event-tl-table__scrollgrid-sync-table" >
2418
- <tbody>
2419
- <tr>
2420
- {generateDaysUi()}
2421
- </tr>
2422
- </tbody>
2423
- </table>
2424
- </div>
2425
- {/*<!--///// /HEADER RIGHT //////-->*/}
2399
+ <table className="custom-event-tl-table__datagrid-header__content custom-event-tl-table__scrollgrid-sync-table" >
2400
+ <tbody>
2401
+ <tr>
2402
+ {generateDaysUi()}
2403
+ </tr>
2404
+ </tbody>
2405
+ </table>
2426
2406
  </div>
2407
+ {/*<!--///// /HEADER RIGHT //////-->*/}
2427
2408
  </div>
2428
- </th>
2429
- </tr>
2430
- </thead>
2409
+ </div>
2410
+ </th>
2411
+ </tr>
2412
+ </thead>
2431
2413
 
2432
2414
 
2433
2415
 
2434
- <tbody className={combinedCls(
2435
- tableBodyClassName
2436
- )}
2437
- role="rowgroup"
2438
- >
2439
- <tr role="presentation" className="custom-event-tl-table__list-section">
2440
- <td
2441
- role="presentation"
2416
+ <tbody className={combinedCls(
2417
+ tableBodyClassName
2418
+ )}
2419
+ role="rowgroup"
2420
+ >
2421
+ <tr role="presentation" className="custom-event-tl-table__list-section">
2422
+ <td
2423
+ role="presentation"
2424
+ className={combinedCls(
2425
+ tableListStartClassName
2426
+ )}
2427
+
2428
+ >
2429
+
2430
+ <div
2431
+ ref={scrollListRef}
2442
2432
  className={combinedCls(
2443
- tableListStartClassName
2433
+ 'custom-event-tl-table__scroller-harness',
2434
+ {
2435
+ 'autoscroll': AUTO_SCROLL
2436
+ }
2444
2437
  )}
2445
-
2438
+ data-scroll="list"
2439
+ onScroll={syncTableScrollList}
2446
2440
  >
2441
+ <div className="custom-event-tl-table__scroller">
2447
2442
 
2448
- <div
2449
- ref={scrollListRef}
2450
- className={combinedCls(
2451
- 'custom-event-tl-table__scroller-harness',
2452
- {
2453
- 'autoscroll': AUTO_SCROLL
2454
- }
2455
- )}
2456
- data-scroll="list"
2457
- onScroll={syncTableScrollList}
2458
- >
2459
- <div className="custom-event-tl-table__scroller">
2460
-
2461
- {/*<!--///// RESOURCE LEFT //////-->*/}
2462
- <table role="presentation" className="custom-event-tl-table__datagrid-body__title custom-event-tl-table__scrollgrid-sync-table">
2463
- <colgroup>
2464
- <col />
2465
- </colgroup>
2466
- <tbody role="presentation">
2443
+ {/*<!--///// RESOURCE LEFT //////-->*/}
2444
+ <table role="presentation" className="custom-event-tl-table__datagrid-body__title custom-event-tl-table__scrollgrid-sync-table">
2445
+ <colgroup>
2446
+ <col />
2447
+ </colgroup>
2448
+ <tbody role="presentation">
2467
2449
 
2468
- {/*<!-- per row -->*/}
2469
- {generateListSectionUi()}
2470
- {/*<!-- /per row -->*/}
2450
+ {/*<!-- per row -->*/}
2451
+ {generateListSectionUi()}
2452
+ {/*<!-- /per row -->*/}
2471
2453
 
2472
- </tbody>
2473
- </table>
2474
- {/*<!--///// /RESOURCE LEFT //////-->*/}
2475
- </div>
2454
+ </tbody>
2455
+ </table>
2456
+ {/*<!--///// /RESOURCE LEFT //////-->*/}
2476
2457
  </div>
2458
+ </div>
2477
2459
 
2478
2460
 
2479
- </td>
2480
- <td
2481
- role="presentation"
2482
- className={combinedCls(
2483
- 'custom-event-tl-table__timeline-divider',
2484
- tableListDividerClassName
2485
- )}
2486
- >
2487
- <div></div>
2488
- </td>
2489
- <td
2490
- role="presentation"
2461
+ </td>
2462
+ <td
2463
+ role="presentation"
2464
+ className={combinedCls(
2465
+ 'custom-event-tl-table__timeline-divider',
2466
+ tableListDividerClassName
2467
+ )}
2468
+ >
2469
+ <div></div>
2470
+ </td>
2471
+ <td
2472
+ role="presentation"
2473
+ className={combinedCls(
2474
+ tableListEndClassName
2475
+ )}
2476
+ >
2477
+
2478
+
2479
+ <div
2480
+ ref={scrollBodyRef}
2491
2481
  className={combinedCls(
2492
- tableListEndClassName
2482
+ 'custom-event-tl-table__scroller-harness',
2483
+ {
2484
+ 'autoscroll': AUTO_SCROLL
2485
+ }
2493
2486
  )}
2487
+ data-scroll="body"
2488
+ onScroll={syncTableScrollBody}
2489
+ onMouseMove={BODY_DRAG ? handleTableMove : () => { }}
2490
+ onMouseDown={BODY_DRAG ? handleTableDragStart : () => { }}
2491
+ onMouseUp={BODY_DRAG ? handleTableDragEnd : () => { }}
2492
+ onMouseLeave={BODY_DRAG ? handleTableDragEnd : () => { }}
2494
2493
  >
2494
+ <div className="custom-event-tl-table__scroller">
2495
+ {/*<!--///// RESOURCE RIGHT //////-->*/}
2496
+ <div className="custom-event-tl-table__timeline-body">
2497
+ <table
2498
+ className="custom-event-tl-table__datagrid-body__content custom-event-tl-table__scrollgrid-sync-table"
2499
+ /* Drag to activate the selection area */
2500
+ onMouseLeave={multipleCells ? handleTableMainMouseUp : undefined}
2501
+ onMouseUp={multipleCells ? handleTableMainMouseUp : undefined}
2502
+
2503
+ >
2504
+ <colgroup>
2505
+ {generateColUi()}
2506
+ </colgroup>
2507
+ <tbody>
2508
+ {/*<!-- per row -->*/}
2509
+ {orginalData.map((item: any, i: number) => {
2495
2510
 
2511
+ return (
2512
+ <tr key={i}>
2513
+ {generateDaysUi(item.eventSources, item.listSection, i, true)}
2514
+ </tr>
2515
+ )
2496
2516
 
2497
- <div
2498
- ref={scrollBodyRef}
2499
- className={combinedCls(
2500
- 'custom-event-tl-table__scroller-harness',
2501
- {
2502
- 'autoscroll': AUTO_SCROLL
2503
- }
2504
- )}
2505
- data-scroll="body"
2506
- onScroll={syncTableScrollBody}
2507
- onMouseMove={BODY_DRAG ? handleTableMove : () => { }}
2508
- onMouseDown={BODY_DRAG ? handleTableDragStart : () => { }}
2509
- onMouseUp={BODY_DRAG ? handleTableDragEnd : () => { }}
2510
- onMouseLeave={BODY_DRAG ? handleTableDragEnd : () => { }}
2511
- >
2512
- <div className="custom-event-tl-table__scroller">
2513
- {/*<!--///// RESOURCE RIGHT //////-->*/}
2514
- <div className="custom-event-tl-table__timeline-body">
2515
- <table
2516
- className="custom-event-tl-table__datagrid-body__content custom-event-tl-table__scrollgrid-sync-table"
2517
- /* Drag to activate the selection area */
2518
- onMouseLeave={multipleCells ? handleTableMainMouseUp : undefined}
2519
- onMouseUp={multipleCells ? handleTableMainMouseUp : undefined}
2520
-
2521
- >
2522
- <colgroup>
2523
- {generateColUi()}
2524
- </colgroup>
2525
- <tbody>
2526
- {/*<!-- per row -->*/}
2527
- {orginalData.map((item: any, i: number) => {
2528
-
2529
- return (
2530
- <tr key={i}>
2531
- {generateDaysUi(item.eventSources, item.listSection, i, true)}
2532
- </tr>
2533
- )
2534
-
2535
- })}
2536
-
2537
- </tbody>
2538
- </table>
2539
-
2540
- </div>
2541
- {/*<!--///// /RESOURCE RIGHT //////-->*/}
2517
+ })}
2542
2518
 
2519
+ </tbody>
2520
+ </table>
2543
2521
 
2544
2522
  </div>
2545
- </div>
2523
+ {/*<!--///// /RESOURCE RIGHT //////-->*/}
2546
2524
 
2547
2525
 
2548
- </td>
2549
- </tr>
2550
- </tbody>
2551
- </table>
2526
+ </div>
2527
+ </div>
2528
+
2552
2529
 
2553
- </div>{/* /.custom-event-tl-table__timeline-table__wrapper */}
2530
+ </td>
2531
+ </tr>
2532
+ </tbody>
2533
+ </table>
2554
2534
 
2535
+ </div>{/* /.custom-event-tl-table__timeline-table__wrapper */}
2555
2536
 
2556
- </>}
2557
- </div>
2558
2537
 
2538
+ </>}
2559
2539
 
2560
2540
 
2561
2541
  {/*/////////////////////////////////////////////////// */}