dce-reactkit 4.2.4-beta-timestamp.2 → 4.2.6

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/cjs/index.js CHANGED
@@ -909,7 +909,7 @@ var ReactDOM = /*@__PURE__*/getDefaultExportFromCjs(reactDom.exports);
909
909
  /*------------------------------------------------------------------------*/
910
910
  /* -------------------------------- Style ------------------------------- */
911
911
  /*------------------------------------------------------------------------*/
912
- const style$a = `
912
+ const style$b = `
913
913
  /* Container fades in */
914
914
  .LoadingSpinner-container {
915
915
  animation-name: LoadingSpinner-container-fade-in;
@@ -987,7 +987,7 @@ const LoadingSpinner = () => {
987
987
  /*------------------------------------------------------------------------*/
988
988
  // Add all four blips to a container
989
989
  return (React__default["default"].createElement("div", { className: "text-center LoadingSpinner LoadingSpinner-container" },
990
- React__default["default"].createElement("style", null, style$a),
990
+ React__default["default"].createElement("style", null, style$b),
991
991
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCircle, className: "LoadingSpinner-blip-1 me-1" }),
992
992
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCircle, className: "LoadingSpinner-blip-2 me-1" }),
993
993
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCircle, className: "LoadingSpinner-blip-3 me-1" }),
@@ -1251,7 +1251,7 @@ const getNextUniqueId = () => {
1251
1251
  /*------------------------------------------------------------------------*/
1252
1252
  /* -------------------------------- Style ------------------------------- */
1253
1253
  /*------------------------------------------------------------------------*/
1254
- const style$9 = `
1254
+ const style$a = `
1255
1255
  .Modal-backdrop {
1256
1256
  position: fixed;
1257
1257
  top: 0;
@@ -1450,7 +1450,7 @@ const Modal = (props) => {
1450
1450
  left: 0,
1451
1451
  right: 0,
1452
1452
  } },
1453
- React__default["default"].createElement("style", null, style$9),
1453
+ React__default["default"].createElement("style", null, style$a),
1454
1454
  React__default["default"].createElement("div", { className: `Modal-backdrop ${backdropAnimationClass}`, style: {
1455
1455
  zIndex: baseZIndex + 1,
1456
1456
  }, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -2101,7 +2101,7 @@ const showSessionExpiredMessage = () => __awaiter(void 0, void 0, void 0, functi
2101
2101
  /*------------------------------------------------------------------------*/
2102
2102
  /* -------------------------------- Style ------------------------------- */
2103
2103
  /*------------------------------------------------------------------------*/
2104
- const style$8 = `
2104
+ const style$9 = `
2105
2105
  .AppWrapper-leave-to-url-notice {
2106
2106
  opacity: 0;
2107
2107
 
@@ -2315,7 +2315,7 @@ const AppWrapper = (props) => {
2315
2315
  /* --------------- Main UI -------------- */
2316
2316
  /*----------------------------------------*/
2317
2317
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
2318
- React__default["default"].createElement("style", null, style$8),
2318
+ React__default["default"].createElement("style", null, style$9),
2319
2319
  React__default["default"].createElement("style", null, tooltipStyle),
2320
2320
  modal,
2321
2321
  customModalPortals,
@@ -2329,7 +2329,7 @@ const AppWrapper = (props) => {
2329
2329
  /*------------------------------------------------------------------------*/
2330
2330
  /* -------------------------------- Style ------------------------------- */
2331
2331
  /*------------------------------------------------------------------------*/
2332
- const style$7 = `
2332
+ const style$8 = `
2333
2333
  /* Tab Box */
2334
2334
  .TabBox-box {
2335
2335
  /* Light Border */
@@ -2419,7 +2419,7 @@ const TabBox = (props) => {
2419
2419
  /* ------------------------------- Render ------------------------------- */
2420
2420
  /*------------------------------------------------------------------------*/
2421
2421
  return (React__default["default"].createElement("div", { className: `TabBox-container ${noBottomMargin ? '' : 'mb-2'}` },
2422
- React__default["default"].createElement("style", null, style$7),
2422
+ React__default["default"].createElement("style", null, style$8),
2423
2423
  React__default["default"].createElement("div", { className: "TabBox-title-container" },
2424
2424
  React__default["default"].createElement("div", { className: "TabBox-title", style: { minWidth: minTitleWidth } }, title),
2425
2425
  topRightChildren && (React__default["default"].createElement("div", { className: "TabBox-title-right-container" },
@@ -3052,7 +3052,7 @@ const SimpleTimeChooser = (props) => {
3052
3052
  /*------------------------------------------------------------------------*/
3053
3053
  /* -------------------------------- Style ------------------------------- */
3054
3054
  /*------------------------------------------------------------------------*/
3055
- const style$6 = `
3055
+ const style$7 = `
3056
3056
  .Drawer-container {
3057
3057
  margin-left: 1rem;
3058
3058
  margin-right: 1rem;
@@ -3088,7 +3088,7 @@ const Drawer = (props) => {
3088
3088
  ? '#E2E3E5'
3089
3089
  : (customBackgroundColor !== null && customBackgroundColor !== void 0 ? customBackgroundColor : undefined)),
3090
3090
  } },
3091
- React__default["default"].createElement("style", null, style$6),
3091
+ React__default["default"].createElement("style", null, style$7),
3092
3092
  children));
3093
3093
  };
3094
3094
 
@@ -3099,7 +3099,7 @@ const Drawer = (props) => {
3099
3099
  /*------------------------------------------------------------------------*/
3100
3100
  /* -------------------------------- Style ------------------------------- */
3101
3101
  /*------------------------------------------------------------------------*/
3102
- const style$5 = `
3102
+ const style$6 = `
3103
3103
  .PopSuccessMark-outer-container {
3104
3104
  position: relative;
3105
3105
  display: inline-block;
@@ -3204,7 +3204,7 @@ const PopSuccessMark = (props) => {
3204
3204
  width: `${sizeRem}rem`,
3205
3205
  height: `${sizeRem}rem`,
3206
3206
  }, "aria-label": "checkmark indicating success" },
3207
- React__default["default"].createElement("style", null, style$5),
3207
+ React__default["default"].createElement("style", null, style$6),
3208
3208
  React__default["default"].createElement("div", { className: `PopSuccessMark-check-stroke-1 bg-${checkVariant}`, style: {
3209
3209
  borderRadius: `${sizeRem / 5}rem`,
3210
3210
  } }),
@@ -3220,7 +3220,7 @@ const PopSuccessMark = (props) => {
3220
3220
  /*------------------------------------------------------------------------*/
3221
3221
  /* -------------------------------- Style ------------------------------- */
3222
3222
  /*------------------------------------------------------------------------*/
3223
- const style$4 = `
3223
+ const style$5 = `
3224
3224
  .PopFailureMark-outer-container {
3225
3225
  position: relative;
3226
3226
  display: inline-block;
@@ -3324,7 +3324,7 @@ const PopFailureMark = (props) => {
3324
3324
  width: `${sizeRem}rem`,
3325
3325
  height: `${sizeRem}rem`,
3326
3326
  }, "aria-label": "mark indicating failure" },
3327
- React__default["default"].createElement("style", null, style$4),
3327
+ React__default["default"].createElement("style", null, style$5),
3328
3328
  React__default["default"].createElement("div", { className: `PopFailureMark-x-stroke-1 bg-${xVariant}`, style: {
3329
3329
  borderRadius: `${sizeRem / 5}rem`,
3330
3330
  } }),
@@ -3340,7 +3340,7 @@ const PopFailureMark = (props) => {
3340
3340
  /*------------------------------------------------------------------------*/
3341
3341
  /* -------------------------------- Style ------------------------------- */
3342
3342
  /*------------------------------------------------------------------------*/
3343
- const style$3 = `
3343
+ const style$4 = `
3344
3344
  .PopPendingMark-outer-container {
3345
3345
  position: relative;
3346
3346
  display: inline-block;
@@ -3413,7 +3413,7 @@ const PopPendingMark = (props) => {
3413
3413
  width: `${sizeRem}rem`,
3414
3414
  height: `${sizeRem}rem`,
3415
3415
  }, "aria-label": "mark indicating that the item is pending" },
3416
- React__default["default"].createElement("style", null, style$3),
3416
+ React__default["default"].createElement("style", null, style$4),
3417
3417
  React__default["default"].createElement("div", null,
3418
3418
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faHourglass, className: `PopPendingMark-hourglass text-${hourglassVariant}`, style: {
3419
3419
  fontSize: `${sizeRem * 0.6}rem`,
@@ -4501,7 +4501,7 @@ var FilterDrawer;
4501
4501
  /*------------------------------------------------------------------------*/
4502
4502
  /* -------------------------------- Style ------------------------------- */
4503
4503
  /*------------------------------------------------------------------------*/
4504
- const style$2 = `
4504
+ const style$3 = `
4505
4505
  .LogReviewer-outer-container {
4506
4506
  /* Full Screen */
4507
4507
  display: inline-block;
@@ -5664,7 +5664,7 @@ const LogReviewer = (props) => {
5664
5664
  !loading && logs.length > 0 && paginationControls));
5665
5665
  /* ---------- Wrap in Modal --------- */
5666
5666
  return (React__default["default"].createElement("div", { className: "LogReviewer-outer-container" },
5667
- React__default["default"].createElement("style", null, style$2),
5667
+ React__default["default"].createElement("style", null, style$3),
5668
5668
  React__default["default"].createElement("div", { className: "LogReviewer-inner-container" },
5669
5669
  React__default["default"].createElement("div", { className: "LogReviewer-header" },
5670
5670
  React__default["default"].createElement("div", { className: "LogReviewer-header-title" },
@@ -13933,7 +13933,7 @@ const CreatableMultiselect = (props) => {
13933
13933
  /*------------------------------------------------------------------------*/
13934
13934
  /* -------------------------------- Style ------------------------------- */
13935
13935
  /*------------------------------------------------------------------------*/
13936
- const style$1 = `
13936
+ const style$2 = `
13937
13937
  .AddOrEditDBEntry-input-label {
13938
13938
  min-width: 7rem;
13939
13939
  }
@@ -14311,7 +14311,7 @@ const AddOrEditDBEntry = (props) => {
14311
14311
  /* --------------- Main UI -------------- */
14312
14312
  /*----------------------------------------*/
14313
14313
  return (React__default["default"].createElement("div", { className: "alert alert-light text-black" },
14314
- React__default["default"].createElement("style", null, style$1),
14314
+ React__default["default"].createElement("style", null, style$2),
14315
14315
  body));
14316
14316
  };
14317
14317
 
@@ -14687,7 +14687,7 @@ const idify = (str) => {
14687
14687
  /*------------------------------------------------------------------------*/
14688
14688
  /* -------------------------------- Style ------------------------------- */
14689
14689
  /*------------------------------------------------------------------------*/
14690
- const style = `
14690
+ const style$1 = `
14691
14691
  .AutoscrollToBottomContainer-outer-container {
14692
14692
  /* Take up all space */
14693
14693
  height: 100%;
@@ -14923,7 +14923,7 @@ const AutoscrollToBottomContainer = (props) => {
14923
14923
  }
14924
14924
  // Main UI
14925
14925
  return (React__default["default"].createElement("div", { className: "AutoscrollToBottomContainer-outer-container" },
14926
- React__default["default"].createElement("style", null, style),
14926
+ React__default["default"].createElement("style", null, style$1),
14927
14927
  jumpToBottomButton,
14928
14928
  React__default["default"].createElement("div", { className: "AutoscrollToBottomContainer-scrollable-container", onScroll: handleScroll, ref: container },
14929
14929
  messageBeforeItems,
@@ -15326,6 +15326,229 @@ const Dropdown = (props) => {
15326
15326
  }))));
15327
15327
  };
15328
15328
 
15329
+ /**
15330
+ * Progress bar sizes
15331
+ * @author Allison Zhang
15332
+ */
15333
+ var ProgressBarSize;
15334
+ (function (ProgressBarSize) {
15335
+ ProgressBarSize["Small"] = "Small";
15336
+ ProgressBarSize["Medium"] = "Medium";
15337
+ ProgressBarSize["Large"] = "Large";
15338
+ })(ProgressBarSize || (ProgressBarSize = {}));
15339
+ var ProgressBarSize$1 = ProgressBarSize;
15340
+
15341
+ /**
15342
+ * Customizable Progress Bar component using Bootstrap styles
15343
+ * @author Allison Zhang
15344
+ */
15345
+ /*------------------------------------------------------------------------*/
15346
+ /* ------------------------------ Constants ----------------------------- */
15347
+ /*------------------------------------------------------------------------*/
15348
+ // Multiplier for calculating width of number of items
15349
+ const ITEM_WIDTH_MULTIPLIER = 1.3;
15350
+ // Constant for percent width
15351
+ const PERCENT_WIDTH = 3;
15352
+ // Constant for item width
15353
+ const ITEM_WIDTH = 2;
15354
+ /*------------------------------------------------------------------------*/
15355
+ /* -------------------------------- Style ------------------------------- */
15356
+ /*------------------------------------------------------------------------*/
15357
+ // Base styles
15358
+ let style = `
15359
+ .ProgressBar-number-of,
15360
+ .ProgressBar-percent {
15361
+ flex: 0 0 auto;
15362
+ white-space: nowrap;
15363
+ padding-right: 0.5em;
15364
+ padding-left: 0.25em;
15365
+ text-align: right;
15366
+ transition: width .25s ease;
15367
+ }
15368
+
15369
+ .ProgressBar-background {
15370
+ overflow: hidden;
15371
+ }
15372
+
15373
+ .ProgressBar-bar {
15374
+ transition: width 1s ease;
15375
+ overflow: hidden;
15376
+ }
15377
+ `;
15378
+ /*------------------------------------------------------------------------*/
15379
+ /* ------------------------------ Component ----------------------------- */
15380
+ /*------------------------------------------------------------------------*/
15381
+ const ProgressBar = (props) => {
15382
+ /*------------------------------------------------------------------------*/
15383
+ /* -------------------------------- Setup ------------------------------- */
15384
+ /*------------------------------------------------------------------------*/
15385
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
15386
+ /* -------------- Props ------------- */
15387
+ // Destructure props
15388
+ const { striped, variant = Variant$1.Warning, bgVariant = Variant$1.Secondary, showOutline, size = ProgressBarSize$1.Medium, } = props;
15389
+ /* -------------- Status ------------- */
15390
+ // Determine progress status
15391
+ let status;
15392
+ // Check whether to use percent or items
15393
+ if ('percentProgress' in props) {
15394
+ // Percent
15395
+ const { percentProgress, numDecimalPlaces, } = props;
15396
+ status = {
15397
+ usePercent: true,
15398
+ percentProgress,
15399
+ numDecimalPlaces,
15400
+ };
15401
+ }
15402
+ else {
15403
+ // Items
15404
+ const { numComplete, total, } = props;
15405
+ status = {
15406
+ usePercent: false,
15407
+ numComplete,
15408
+ total,
15409
+ };
15410
+ }
15411
+ /*------------------------------------------------------------------------*/
15412
+ /* ------------------------------- Render ------------------------------- */
15413
+ /*------------------------------------------------------------------------*/
15414
+ /*----------------------------------------*/
15415
+ /* ---------------- Sizes --------------- */
15416
+ /*----------------------------------------*/
15417
+ // Size styles
15418
+ switch (size) {
15419
+ case ProgressBarSize$1.Small:
15420
+ // Small size
15421
+ style += `
15422
+ .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15423
+ font-size: 1em;
15424
+ }
15425
+ .ProgressBar-container .ProgressBar-background {
15426
+ height: 1.5em;
15427
+ border-radius: 0.5em;
15428
+ }
15429
+ .ProgressBar-container .ProgressBar-bar {
15430
+ height: 1.5em;
15431
+ border-radius: 0.5em;
15432
+ }
15433
+ .ProgressBar-percent {
15434
+ min-width: ${((status.usePercent ? (_a = status.numDecimalPlaces) !== null && _a !== void 0 ? _a : 0 : 0) * 1) + PERCENT_WIDTH}em;
15435
+ max-width: ${((status.usePercent ? (_b = status.numDecimalPlaces) !== null && _b !== void 0 ? _b : 0 : 0) * 1) + PERCENT_WIDTH}em;
15436
+ }
15437
+ .ProgressBar-number-of {
15438
+ min-width: ${((!status.usePercent ? ((_c = status.total) === null || _c === void 0 ? void 0 : _c.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15439
+ max-width: ${((!status.usePercent ? ((_d = status.total) === null || _d === void 0 ? void 0 : _d.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15440
+ }
15441
+ `;
15442
+ break;
15443
+ case ProgressBarSize$1.Medium:
15444
+ // Medium size
15445
+ style += `
15446
+ .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15447
+ font-size: 1.5em;
15448
+ }
15449
+ .ProgressBar-container .ProgressBar-background {
15450
+ height: 2em;
15451
+ border-radius: 0.7em;
15452
+ }
15453
+ .ProgressBar-container .ProgressBar-bar {
15454
+ height: 2em;
15455
+ border-radius: 0.7em;
15456
+ }
15457
+ .ProgressBar-percent {
15458
+ min-width: ${((status.usePercent ? (_e = status.numDecimalPlaces) !== null && _e !== void 0 ? _e : 0 : 0) * 1) + PERCENT_WIDTH}em;
15459
+ max-width: ${((status.usePercent ? (_f = status.numDecimalPlaces) !== null && _f !== void 0 ? _f : 0 : 0) * 1) + PERCENT_WIDTH}em;
15460
+ }
15461
+ .ProgressBar-number-of {
15462
+ min-width: ${((!status.usePercent ? ((_g = status.total) === null || _g === void 0 ? void 0 : _g.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15463
+ max-width: ${((!status.usePercent ? ((_h = status.total) === null || _h === void 0 ? void 0 : _h.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15464
+ }
15465
+ `;
15466
+ break;
15467
+ case ProgressBarSize$1.Large:
15468
+ // Large size
15469
+ style += `
15470
+ .ProgressBar-container .ProgressBar-number-of, .ProgressBar-container .ProgressBar-percent {
15471
+ font-size: 2em;
15472
+ }
15473
+ .ProgressBar-container .ProgressBar-background {
15474
+ height: 3em;
15475
+ border-radius: 1em;
15476
+ }
15477
+ .ProgressBar-container .ProgressBar-bar {
15478
+ height: 3em;
15479
+ border-radius: 1em;
15480
+ }
15481
+ .ProgressBar-percent {
15482
+ min-width: ${((status.usePercent ? (_j = status.numDecimalPlaces) !== null && _j !== void 0 ? _j : 0 : 0) * 1) + PERCENT_WIDTH}em;
15483
+ max-width: ${((status.usePercent ? (_k = status.numDecimalPlaces) !== null && _k !== void 0 ? _k : 0 : 0) * 1) + PERCENT_WIDTH}em;
15484
+ }
15485
+ .ProgressBar-number-of {
15486
+ min-width: ${((!status.usePercent ? ((_l = status.total) === null || _l === void 0 ? void 0 : _l.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15487
+ max-width: ${((!status.usePercent ? ((_m = status.total) === null || _m === void 0 ? void 0 : _m.toString().length) || 1 : 0) * ITEM_WIDTH_MULTIPLIER) + ITEM_WIDTH}em;
15488
+ }
15489
+ `;
15490
+ break;
15491
+ }
15492
+ // Get the width of the outline based on size
15493
+ const outlineWidth = (() => {
15494
+ switch (size) {
15495
+ case ProgressBarSize$1.Small: return '0.05em';
15496
+ case ProgressBarSize$1.Medium: return '0.08em';
15497
+ case ProgressBarSize$1.Large: return '0.1em';
15498
+ default: return '0.05em';
15499
+ }
15500
+ })();
15501
+ /*----------------------------------------*/
15502
+ /* --------------- Stripes -------------- */
15503
+ /*----------------------------------------*/
15504
+ // Stripes style
15505
+ const stripesStyle = `
15506
+ .ProgressBar-stripes {
15507
+ background-image: linear-gradient(315deg, #ffffff 25%, #000000 25%, #000000 50%, #ffffff 50%, #ffffff 75%, #000000 75%, #000000 100%);
15508
+ background-size: 6em 6em;
15509
+ animation: ProgressBar-stripe-animation 2.5s linear infinite;
15510
+ opacity: 0.09;
15511
+ }
15512
+ @keyframes ProgressBar-stripe-animation {
15513
+ 0% {
15514
+ background-position: -6em 0;
15515
+ }
15516
+ 100% {
15517
+ background-position: 0 0;
15518
+ }
15519
+ }
15520
+ `;
15521
+ // Stripes for striped effect
15522
+ const stripes = (React__default["default"].createElement("div", null,
15523
+ React__default["default"].createElement("style", null, stripesStyle),
15524
+ React__default["default"].createElement("div", { className: "ProgressBar-stripes position-absolute ", style: {
15525
+ width: '200%',
15526
+ height: '100%',
15527
+ } }, "\u00A0")));
15528
+ /*----------------------------------------*/
15529
+ /* --------------- Main UI -------------- */
15530
+ /*----------------------------------------*/
15531
+ // Render the progress bar
15532
+ return (React__default["default"].createElement("div", { className: "ProgressBar-container d-flex align-items-center" },
15533
+ React__default["default"].createElement("style", null, style),
15534
+ !status.usePercent && status.numComplete && (React__default["default"].createElement("span", { className: "ProgressBar-number-of pe-2 align-self-center" },
15535
+ status.numComplete,
15536
+ "\u00A0of\u00A0",
15537
+ status.total)),
15538
+ status.usePercent && status.percentProgress && (React__default["default"].createElement("span", { className: "ProgressBar-percent pe-2 align-self-center" },
15539
+ status.percentProgress.toFixed((_o = status === null || status === void 0 ? void 0 : status.numDecimalPlaces) !== null && _o !== void 0 ? _o : 0),
15540
+ "%")),
15541
+ React__default["default"].createElement("div", { className: `ProgressBar-background bg-${bgVariant} w-100`, style: {
15542
+ boxShadow: `0 0 0 ${outlineWidth} ${showOutline ? '#000' : '#DEE2E6'}`,
15543
+ }, "aria-valuenow": status.usePercent ? status.percentProgress : status.numComplete, "aria-valuemin": 0, "aria-valuemax": status.usePercent ? 100 : status.total },
15544
+ React__default["default"].createElement("div", { className: `ProgressBar-bar bg-${variant} text-start position-relative`, style: {
15545
+ width: `${(status.usePercent ? status.percentProgress : (status.numComplete / status.total) * 100)}%`,
15546
+ overflow: 'hidden',
15547
+ } },
15548
+ striped && stripes,
15549
+ "\u00A0"))));
15550
+ };
15551
+
15329
15552
  /**
15330
15553
  * One minute in ms
15331
15554
  * @author Gabe Abrams
@@ -16398,62 +16621,21 @@ const getWordCount = (text) => {
16398
16621
  * @returns Timestamp in milliseconds since epoch
16399
16622
  */
16400
16623
  const getTimestampFromTimeInfoInET = (opts) => {
16401
- var _a, _b, _c, _d, _e, _f, _g;
16402
16624
  // Destructure opts
16403
16625
  const { year, month, day, hour, minute, } = opts;
16626
+ // Determine if the date is in DST in Eastern Time
16627
+ const tempDate = new Date(year, month - 1, day);
16628
+ const janOffset = new Date(year, 0, 1).getTimezoneOffset();
16629
+ const isDST = tempDate.getTimezoneOffset() < janOffset;
16630
+ const etOffset = isDST ? '-04:00' : '-05:00';
16404
16631
  // Format with leading zeroes
16405
16632
  const mm = padZerosLeft(month, 2);
16406
16633
  const dd = padZerosLeft(day, 2);
16407
16634
  const hh = padZerosLeft(hour, 2);
16408
16635
  const min = padZerosLeft(minute, 2);
16409
- // Use Intl.DateTimeFormat to get the ET offset and ET components
16410
- const dateForET = new Date(Date.UTC(year, month - 1, day, hour, minute, 0));
16411
- const options = {
16412
- timeZone: 'America/New_York',
16413
- year: 'numeric',
16414
- month: '2-digit',
16415
- day: '2-digit',
16416
- hour: '2-digit',
16417
- minute: '2-digit',
16418
- second: '2-digit',
16419
- hour12: false,
16420
- timeZoneName: 'shortOffset',
16421
- };
16422
- const parts = new Intl.DateTimeFormat('en-US', options).formatToParts(dateForET);
16423
- const etYear = (_a = parts.find((p) => {
16424
- return p.type === 'year';
16425
- })) === null || _a === void 0 ? void 0 : _a.value;
16426
- const etMonth = (_b = parts.find((p) => {
16427
- return p.type === 'month';
16428
- })) === null || _b === void 0 ? void 0 : _b.value;
16429
- const etDay = (_c = parts.find((p) => {
16430
- return p.type === 'day';
16431
- })) === null || _c === void 0 ? void 0 : _c.value;
16432
- const etHour = (_d = parts.find((p) => {
16433
- return p.type === 'hour';
16434
- })) === null || _d === void 0 ? void 0 : _d.value;
16435
- const etMinute = (_e = parts.find((p) => {
16436
- return p.type === 'minute';
16437
- })) === null || _e === void 0 ? void 0 : _e.value;
16438
- const etSecond = (_f = parts.find((p) => {
16439
- return p.type === 'second';
16440
- })) === null || _f === void 0 ? void 0 : _f.value;
16441
- const tzName = (_g = parts.find((p) => {
16442
- return p.type === 'timeZoneName';
16443
- })) === null || _g === void 0 ? void 0 : _g.value;
16444
- // Validate we got everything we need
16445
- if (!etYear || !etMonth || !etDay || !etHour || !etMinute || !etSecond || !tzName) {
16446
- throw new ErrorWithCode('Failed to parse date parts from Intl.DateTimeFormat', ReactKitErrorCode$1.ETTimestampInvalid);
16447
- }
16448
- // Extract numeric offset from "GMT-4" or "UTC-5"
16449
- const offsetNum = Number(tzName.replace(/^(GMT|UTC)/, ''));
16450
- const sign = offsetNum >= 0 ? '+' : '-';
16451
- const offset = `${sign}${padZerosLeft(Math.abs(offsetNum), 2)}:00`;
16452
- // Build ISO string with offset
16453
- const etDateString = `${etYear}-${etMonth}-${etDay}T${etHour}:${etMinute}:${etSecond}${offset}`;
16454
- // Parse into ET timestamp
16455
- const etDate = new Date(etDateString);
16456
- const timestamp = etDate.getTime();
16636
+ // Build ET ISO string and convert to UTC timestamp
16637
+ const etISOString = `${year}-${mm}-${dd}T${hh}:${min}:00${etOffset}`;
16638
+ const timestamp = (new Date(etISOString)).getTime();
16457
16639
  // Verify that the timestamp is correct
16458
16640
  const timeInfoInET = getTimeInfoInET(timestamp);
16459
16641
  if (timeInfoInET.year !== year
@@ -16461,9 +16643,7 @@ const getTimestampFromTimeInfoInET = (opts) => {
16461
16643
  || timeInfoInET.day !== day
16462
16644
  || timeInfoInET.hour !== hour
16463
16645
  || timeInfoInET.minute !== minute) {
16464
- throw new ErrorWithCode(`Timestamp mismatch: expected ${year}-${mm}-${dd} ${hh}:${min}, `
16465
- + `got ${timeInfoInET.year}-${padZerosLeft(timeInfoInET.month, 2)}-${padZerosLeft(timeInfoInET.day, 2)} `
16466
- + `${padZerosLeft(timeInfoInET.hour, 2)}:${padZerosLeft(timeInfoInET.minute, 2)}`, ReactKitErrorCode$1.ETTimestampInvalid);
16646
+ throw new ErrorWithCode(`Timestamp mismatch: expected ${year}-${mm}-${dd} ${hh}:${min}, got ${timeInfoInET.year}-${padZerosLeft(timeInfoInET.month, 2)}-${padZerosLeft(timeInfoInET.day, 2)} ${padZerosLeft(timeInfoInET.hour, 2)}:${padZerosLeft(timeInfoInET.minute, 2)}`, ReactKitErrorCode$1.ETTimestampInvalid);
16467
16647
  }
16468
16648
  // Valid! Return the timestamp
16469
16649
  return timestamp;
@@ -16561,6 +16741,7 @@ exports.ParamType = ParamType$1;
16561
16741
  exports.PopFailureMark = PopFailureMark;
16562
16742
  exports.PopPendingMark = PopPendingMark;
16563
16743
  exports.PopSuccessMark = PopSuccessMark;
16744
+ exports.ProgressBar = ProgressBar;
16564
16745
  exports.RadioButton = RadioButton;
16565
16746
  exports.ReactKitErrorCode = ReactKitErrorCode$1;
16566
16747
  exports.SELECT_ADMIN_CHECK_ROUTE = SELECT_ADMIN_CHECK_ROUTE;