dce-reactkit 5.0.1 → 5.0.2
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 +305 -160
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/FakeProgressBar.d.ts +27 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.js +305 -161
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/FakeProgressBar.d.ts +27 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +74 -49
- package/package.json +1 -1
- package/src/components/FakeProgressBar.tsx +274 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fake progress bar that approaches completion but never fully finishes.
|
|
3
|
+
* Built on top of the existing ProgressBar component.
|
|
4
|
+
*
|
|
5
|
+
* Two phases:
|
|
6
|
+
* 1. Fast phase (0–90%): random jumps of 1–5% at randomized intervals,
|
|
7
|
+
* paced to reach ~90% in roughly estimatedTimeSec seconds.
|
|
8
|
+
* 2. Slow phase (90–99%): crawls 1% at a time with longer random delays,
|
|
9
|
+
* never reaching 100% on its own.
|
|
10
|
+
*
|
|
11
|
+
* When isFinished becomes true, the bar immediately jumps to 100%.
|
|
12
|
+
* @author Yuen Ler Chow
|
|
13
|
+
*/
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import Variant from '../types/Variant';
|
|
16
|
+
import ProgressBarSize from '../types/ProgressBarSize';
|
|
17
|
+
type Props = {
|
|
18
|
+
isFinished?: boolean;
|
|
19
|
+
estimatedTimeSec?: number;
|
|
20
|
+
striped?: boolean;
|
|
21
|
+
variant?: Variant;
|
|
22
|
+
bgVariant?: Variant;
|
|
23
|
+
showOutline?: boolean;
|
|
24
|
+
size?: ProgressBarSize;
|
|
25
|
+
};
|
|
26
|
+
declare const FakeProgressBar: React.FC<Props>;
|
|
27
|
+
export default FakeProgressBar;
|
|
@@ -25,6 +25,7 @@ import AutoscrollToBottomContainer from './components/AutoscrollToBottomContaine
|
|
|
25
25
|
import MultiSwitch from './components/MultiSwitch';
|
|
26
26
|
import Dropdown from './components/Dropdown';
|
|
27
27
|
import ProgressBar from './components/ProgressBar';
|
|
28
|
+
import FakeProgressBar from './components/FakeProgressBar';
|
|
28
29
|
import DynamicWord from './dynamicConstants/DynamicWord';
|
|
29
30
|
import initClient from './helpers/initClient';
|
|
30
31
|
import visitServerEndpoint from './helpers/visitServerEndpoint';
|
|
@@ -47,4 +48,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
|
|
|
47
48
|
import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
|
|
48
49
|
import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
|
|
49
50
|
import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
|
|
50
|
-
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, SimpleTimeChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, Dropdown, ProgressBar, alert, prompt, confirm, showFatalError, DynamicWord, stubServerEndpoint, canReviewLogs, isMobileOrTablet, makeLinksClickable, isSelectAdmin, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, ModalButtonType, ModalSize, ModalType, Variant, IntelliTableColumn, DropdownItemType, LogReviewerFilterState, ProgressBarSize, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, LOG_REVIEW_ROUTE_PATH_PREFIX, LOG_ROUTE_PATH, LOG_REVIEW_STATUS_ROUTE, LOG_REVIEW_GET_LOGS_ROUTE, SELECT_ADMIN_CHECK_ROUTE, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, getLocalTimeInfo, genCommaList, validateEmail, validatePhoneNumber, validateString, idify, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, getWordCount, cloneDeep, getTimestampFromTimeInfoInET, ParamType, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, LogTypeSpecificInfo, LogMainInfo, LogSourceSpecificInfo, LogLevel, CommonKitErrorCode, };
|
|
51
|
+
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, SimpleTimeChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, AutoscrollToBottomContainer, MultiSwitch, Dropdown, ProgressBar, FakeProgressBar, alert, prompt, confirm, showFatalError, DynamicWord, stubServerEndpoint, canReviewLogs, isMobileOrTablet, makeLinksClickable, isSelectAdmin, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, leaveToURL, combineClassNames, useForceRender, setClientEventMetadataPopulator, ModalButtonType, ModalSize, ModalType, Variant, IntelliTableColumn, DropdownItemType, LogReviewerFilterState, ProgressBarSize, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, LOG_REVIEW_ROUTE_PATH_PREFIX, LOG_ROUTE_PATH, LOG_REVIEW_STATUS_ROUTE, LOG_REVIEW_GET_LOGS_ROUTE, SELECT_ADMIN_CHECK_ROUTE, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, getLocalTimeInfo, genCommaList, validateEmail, validatePhoneNumber, validateString, idify, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, getWordCount, cloneDeep, getTimestampFromTimeInfoInET, ParamType, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, LogTypeSpecificInfo, LogMainInfo, LogSourceSpecificInfo, LogLevel, CommonKitErrorCode, };
|