dce-reactkit 4.2.4-beta.heat-seek.1 → 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
@@ -16385,58 +16608,6 @@ const getWordCount = (text) => {
16385
16608
  };
16386
16609
 
16387
16610
  // Import shared types
16388
- /*----------------------------------------*/
16389
- /* --------------- Helpers -------------- */
16390
- /*----------------------------------------*/
16391
- /**
16392
- * Check if a timestamp is valid
16393
- * @param opts object containing all arguments
16394
- * @param opts.timestamp Timestamp in milliseconds since epoch
16395
- * @param opts.expectedYear Expected year
16396
- * @param opts.expectedMonth Expected month
16397
- * @param opts.expectedDay Expected day
16398
- * @param opts.expectedHour Expected hour
16399
- * @param opts.expectedMinute Expected minute
16400
- * @returns 1 if the timestamp needs to be increased, -1 if it needs to be decreased, 0 if it is valid
16401
- */
16402
- const checkTimestamp = (opts) => {
16403
- const { timestamp, expectedYear, expectedMonth, expectedDay, expectedHour, expectedMinute, } = opts;
16404
- const timeInfoInET = getTimeInfoInET(timestamp);
16405
- if (timeInfoInET.year < expectedYear) {
16406
- return 1;
16407
- }
16408
- if (timeInfoInET.year > expectedYear) {
16409
- return -1;
16410
- }
16411
- if (timeInfoInET.month < expectedMonth) {
16412
- return 1;
16413
- }
16414
- if (timeInfoInET.month > expectedMonth) {
16415
- return -1;
16416
- }
16417
- if (timeInfoInET.day < expectedDay) {
16418
- return 1;
16419
- }
16420
- if (timeInfoInET.day > expectedDay) {
16421
- return -1;
16422
- }
16423
- if (timeInfoInET.hour < expectedHour) {
16424
- return 1;
16425
- }
16426
- if (timeInfoInET.hour > expectedHour) {
16427
- return -1;
16428
- }
16429
- if (timeInfoInET.minute < expectedMinute) {
16430
- return 1;
16431
- }
16432
- if (timeInfoInET.minute > expectedMinute) {
16433
- return -1;
16434
- }
16435
- return 0;
16436
- };
16437
- /*----------------------------------------*/
16438
- /* ---------------- Main ---------------- */
16439
- /*----------------------------------------*/
16440
16611
  /**
16441
16612
  * Get a timestamp (ms since epoch) from time info (year, month, day, hour, minute, etc.) in Eastern Time (ET)
16442
16613
  * @author Gardenia Liu
@@ -16446,7 +16617,7 @@ const checkTimestamp = (opts) => {
16446
16617
  * @param opts.month Month (1-12)
16447
16618
  * @param opts.day Day of the month (1-31)
16448
16619
  * @param opts.hour Hour (0-23)
16449
- * @param opts.minute Minute (0-59)
16620
+ * @param opts.minute Minute (0-59))
16450
16621
  * @returns Timestamp in milliseconds since epoch
16451
16622
  */
16452
16623
  const getTimestampFromTimeInfoInET = (opts) => {
@@ -16464,46 +16635,18 @@ const getTimestampFromTimeInfoInET = (opts) => {
16464
16635
  const min = padZerosLeft(minute, 2);
16465
16636
  // Build ET ISO string and convert to UTC timestamp
16466
16637
  const etISOString = `${year}-${mm}-${dd}T${hh}:${min}:00${etOffset}`;
16467
- let timestamp = (new Date(etISOString)).getTime();
16468
- // Heat seek to get the right timestamp
16469
- const maxOffset = 24 * 60; // 24 hours in minutes
16470
- let currentOffset = 0; // minutes
16471
- const offsetIncrement = 15; // minutes
16472
- const offsetDirection = checkTimestamp({
16473
- timestamp,
16474
- expectedYear: year,
16475
- expectedMonth: month,
16476
- expectedDay: day,
16477
- expectedHour: hour,
16478
- expectedMinute: minute,
16479
- });
16480
- if (offsetDirection === 0) {
16481
- // Valid! Return the timestamp
16482
- return timestamp;
16483
- }
16484
- // Heat seek
16485
- while (Math.abs(currentOffset) < maxOffset) {
16486
- // Update offset
16487
- currentOffset += (offsetDirection * offsetIncrement);
16488
- // Update timestamp
16489
- const offsetMs = currentOffset * 60 * 1000;
16490
- timestamp += offsetMs;
16491
- // Check timestamp again
16492
- const newDirection = checkTimestamp({
16493
- timestamp,
16494
- expectedYear: year,
16495
- expectedMonth: month,
16496
- expectedDay: day,
16497
- expectedHour: hour,
16498
- expectedMinute: minute,
16499
- });
16500
- if (newDirection === 0) {
16501
- // Valid! Return the timestamp
16502
- return timestamp;
16503
- }
16504
- // Invalid. Keep looping.
16505
- }
16506
- throw new ErrorWithCode(`Timestamp mismatch: expected ${year}-${mm}-${dd} ${hh}:${min}, seeked to offset ${currentOffset} minutes but could not find a valid timestamp.`, ReactKitErrorCode$1.ETTimestampInvalid);
16638
+ const timestamp = (new Date(etISOString)).getTime();
16639
+ // Verify that the timestamp is correct
16640
+ const timeInfoInET = getTimeInfoInET(timestamp);
16641
+ if (timeInfoInET.year !== year
16642
+ || timeInfoInET.month !== month
16643
+ || timeInfoInET.day !== day
16644
+ || timeInfoInET.hour !== hour
16645
+ || timeInfoInET.minute !== minute) {
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);
16647
+ }
16648
+ // Valid! Return the timestamp
16649
+ return timestamp;
16507
16650
  };
16508
16651
 
16509
16652
  /*------------------------------------------------------------------------*/
@@ -16598,6 +16741,7 @@ exports.ParamType = ParamType$1;
16598
16741
  exports.PopFailureMark = PopFailureMark;
16599
16742
  exports.PopPendingMark = PopPendingMark;
16600
16743
  exports.PopSuccessMark = PopSuccessMark;
16744
+ exports.ProgressBar = ProgressBar;
16601
16745
  exports.RadioButton = RadioButton;
16602
16746
  exports.ReactKitErrorCode = ReactKitErrorCode$1;
16603
16747
  exports.SELECT_ADMIN_CHECK_ROUTE = SELECT_ADMIN_CHECK_ROUTE;