@gen3/frontend 0.10.73 → 0.10.75
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 +229 -173
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.d.ts +1 -0
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.d.ts.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js +3 -3
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js.map +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js.map +1 -1
- package/dist/dts/components/Content/TextContent.d.ts +1 -2
- package/dist/dts/components/Content/TextContent.d.ts.map +1 -1
- package/dist/dts/components/Content/TextContent.js +5 -8
- package/dist/dts/components/Content/TextContent.js.map +1 -1
- package/dist/dts/components/CountButton/CountButton.d.ts +19 -0
- package/dist/dts/components/CountButton/CountButton.d.ts.map +1 -0
- package/dist/dts/components/CountButton/CountButton.js +18 -0
- package/dist/dts/components/CountButton/CountButton.js.map +1 -0
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts +8 -12
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +17 -11
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +18 -4
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js.map +1 -1
- package/dist/dts/components/ErrorMessage.d.ts +6 -0
- package/dist/dts/components/ErrorMessage.d.ts.map +1 -0
- package/dist/dts/components/ErrorMessage.js +8 -0
- package/dist/dts/components/ErrorMessage.js.map +1 -0
- package/dist/dts/components/Login/LoginProvidersPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.js +5 -8
- package/dist/dts/components/Login/LoginProvidersPanel.js.map +1 -1
- package/dist/dts/components/MessageCards/ErrorCard.js +1 -1
- package/dist/dts/components/MessageCards/ErrorCard.js.map +1 -1
- package/dist/dts/components/MessageCards/WarningCard.js +1 -1
- package/dist/dts/components/MessageCards/WarningCard.js.map +1 -1
- package/dist/dts/components/MessagePanel.d.ts.map +1 -1
- package/dist/dts/components/MessagePanel.js +1 -1
- package/dist/dts/components/MessagePanel.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +3 -2
- package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.js +8 -4
- package/dist/dts/components/Providers/Gen3Provider.js.map +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.d.ts +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.d.ts.map +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.js +48 -131
- package/dist/dts/components/Providers/ResourceMonitor.js.map +1 -1
- package/dist/dts/components/charts/echarts/BarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/BarChart.js +28 -4
- package/dist/dts/components/charts/echarts/BarChart.js.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js +0 -1
- package/dist/dts/components/facets/FacetControlsHeader.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +13 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +10 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +53 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts +7 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js +38 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js.map +1 -0
- package/dist/dts/features/CohortBuilder/{CohortSelector.d.ts → CohortManager/CohortSelector.d.ts} +4 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +56 -0
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.js +22 -0
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +320 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.js +2 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveModal.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +29 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +85 -0
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +3 -2
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts +6 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js +55 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts +13 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js +41 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpressionSection.d.ts → QueryExpression/QueryExpressionSection.d.ts} +1 -4
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpressionSection.js → QueryExpression/QueryExpressionSection.js} +36 -28
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionsExpandedContext.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionsExpandedContext.js.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryRepresentation.d.ts → QueryExpression/QueryRepresentation.d.ts} +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryRepresentation.js → QueryExpression/QueryRepresentation.js} +23 -30
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.js.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentationLabel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentationLabel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/cohortUtils.d.ts +4 -0
- package/dist/dts/features/CohortBuilder/cohortUtils.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/cohortUtils.js +23 -0
- package/dist/dts/features/CohortBuilder/cohortUtils.js.map +1 -0
- package/dist/dts/features/CohortBuilder/hooks.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/hooks.js +52 -1
- package/dist/dts/features/CohortBuilder/hooks.js.map +1 -1
- package/dist/dts/features/CohortBuilder/style.d.ts +6 -0
- package/dist/dts/features/CohortBuilder/style.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/style.js +11 -0
- package/dist/dts/features/CohortBuilder/style.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js +6 -4
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManager.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortManager.js +57 -0
- package/dist/dts/features/CohortDiscovery/CohortManager.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +23 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js +35 -0
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +91 -0
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +1 -0
- package/dist/dts/features/CohortDiscovery/CohortSlice.js +93 -0
- package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +1 -0
- package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.js +5 -3
- package/dist/dts/features/CohortDiscovery/IndexPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.d.ts +2 -0
- package/dist/dts/features/CohortDiscovery/appApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.js +2 -0
- package/dist/dts/features/CohortDiscovery/appApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.d.ts +10 -0
- package/dist/dts/features/CohortDiscovery/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.js +38 -1
- package/dist/dts/features/CohortDiscovery/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiversity/diversityApi.d.ts +12 -12
- package/dist/dts/features/DataLibrary/QueryDetails.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/QueryDetails.js +2 -2
- package/dist/dts/features/DataLibrary/QueryDetails.js.map +1 -1
- package/dist/dts/features/Dictionary/Dictionary.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/Dictionary.js +0 -1
- package/dist/dts/features/Dictionary/Dictionary.js.map +1 -1
- package/dist/dts/features/Dictionary/index.d.ts +1 -3
- package/dist/dts/features/Dictionary/index.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/index.js +1 -3
- package/dist/dts/features/Dictionary/index.js.map +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.d.ts.map +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.js +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.js.map +1 -1
- package/dist/dts/features/Workspace/NotebookCard.d.ts.map +1 -1
- package/dist/dts/features/Workspace/NotebookCard.js +8 -30
- package/dist/dts/features/Workspace/NotebookCard.js.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.d.ts.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js +3 -3
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.js +2 -2
- package/dist/dts/features/Workspace/StatusAndControls.js.map +1 -1
- package/dist/dts/features/Workspace/Workspace.d.ts.map +1 -1
- package/dist/dts/features/Workspace/Workspace.js +1 -0
- package/dist/dts/features/Workspace/Workspace.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js +1 -3
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspacePanel.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspacePanel.js +9 -10
- package/dist/dts/features/Workspace/WorkspacePanel.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceProvider.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceProvider.js +0 -1
- package/dist/dts/features/Workspace/WorkspaceProvider.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.d.ts +1 -2
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.js +27 -56
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.js.map +1 -1
- package/dist/dts/features/Workspace/types.d.ts +0 -10
- package/dist/dts/features/Workspace/types.d.ts.map +1 -1
- package/dist/dts/features/Workspace/types.js +1 -10
- package/dist/dts/features/Workspace/types.js.map +1 -1
- package/dist/dts/index.d.ts +2 -3
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +2 -3
- package/dist/dts/index.js.map +1 -1
- package/dist/dts/lib/session/session.d.ts.map +1 -1
- package/dist/dts/lib/session/session.js +7 -7
- package/dist/dts/lib/session/session.js.map +1 -1
- package/dist/dts/pages/Theme/index.d.ts.map +1 -1
- package/dist/dts/utils/date.d.ts +6 -0
- package/dist/dts/utils/date.d.ts.map +1 -1
- package/dist/dts/utils/date.js +12 -0
- package/dist/dts/utils/date.js.map +1 -1
- package/dist/dts/utils/icons.d.ts +18 -0
- package/dist/dts/utils/icons.d.ts.map +1 -0
- package/dist/dts/utils/icons.js +18 -0
- package/dist/dts/utils/icons.js.map +1 -0
- package/dist/dts/utils/index.d.ts +0 -1
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/index.js +0 -1
- package/dist/dts/utils/index.js.map +1 -1
- package/dist/dts/utils/time.d.ts +0 -15
- package/dist/dts/utils/time.d.ts.map +1 -1
- package/dist/dts/utils/time.js +0 -105
- package/dist/dts/utils/time.js.map +1 -1
- package/dist/esm/index.js +231 -175
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +15 -45
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/dts/features/CohortBuilder/CohortManager.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager.js +0 -17
- package/dist/dts/features/CohortBuilder/CohortManager.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortSelector.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortSelector.js +0 -20
- package/dist/dts/features/CohortBuilder/CohortSelector.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionsExpandedContext.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionsExpandedContext.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryRepresentation.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryRepresentation.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryRepresentationLabel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryRepresentationLabel.js.map +0 -1
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.d.ts +0 -7
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.d.ts.map +0 -1
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.js +0 -39
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.js.map +0 -1
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.d.ts +0 -9
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.d.ts.map +0 -1
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.js +0 -113
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.js.map +0 -1
- package/dist/dts/features/Dictionary/metadata/registerApp.d.ts +0 -3
- package/dist/dts/features/Dictionary/metadata/registerApp.d.ts.map +0 -1
- package/dist/dts/features/Dictionary/metadata/registerApp.js +0 -13
- package/dist/dts/features/Dictionary/metadata/registerApp.js.map +0 -1
- package/dist/dts/features/Dictionary/metadata/types.d.ts +0 -17
- package/dist/dts/features/Dictionary/metadata/types.d.ts.map +0 -1
- package/dist/dts/features/Dictionary/metadata/types.js +0 -2
- package/dist/dts/features/Dictionary/metadata/types.js.map +0 -1
- /package/dist/dts/features/CohortBuilder/{QueryExpressionsExpandedContext.d.ts → QueryExpression/QueryExpressionsExpandedContext.d.ts} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryExpressionsExpandedContext.js → QueryExpression/QueryExpressionsExpandedContext.js} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryRepresentationLabel.d.ts → QueryExpression/QueryRepresentationLabel.d.ts} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryRepresentationLabel.js → QueryExpression/QueryRepresentationLabel.js} +0 -0
- /package/dist/dts/features/{CohortBuilder → CohortDiscovery}/CohortManager.d.ts +0 -0
package/dist/dts/utils/time.js
CHANGED
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
1
|
/**
|
|
38
2
|
* @returns {number} time in seconds since Unix epoch.
|
|
39
3
|
*/
|
|
@@ -48,73 +12,4 @@ export function getCurrentUnixTimestamp() {
|
|
|
48
12
|
export function unixTimeToString(unixTime) {
|
|
49
13
|
return new Date(unixTime * 1000).toLocaleString();
|
|
50
14
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Converts a given duration in minutes to its equivalent in milliseconds.
|
|
53
|
-
*
|
|
54
|
-
* @param {number} minutes - The time duration in minutes to be converted.
|
|
55
|
-
* @returns {number} The equivalent duration in milliseconds.
|
|
56
|
-
*/
|
|
57
|
-
export var convertMinutesToMilliseconds = function (minutes) {
|
|
58
|
-
return minutes * 60 * 1000;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Converts a given time in seconds to milliseconds.
|
|
62
|
-
*
|
|
63
|
-
* @param {number} seconds - The time in seconds to be converted.
|
|
64
|
-
* @returns {number} The equivalent time in milliseconds.
|
|
65
|
-
*/
|
|
66
|
-
export var convertSecondsToMilliseconds = function (seconds) { return seconds * 1000; };
|
|
67
|
-
// Using the built-in Date object
|
|
68
|
-
var getCurrentTimestamp = function () {
|
|
69
|
-
return Date.now(); // Returns milliseconds since Unix epoch
|
|
70
|
-
};
|
|
71
|
-
// Get a readable timestamp for logging/display
|
|
72
|
-
var getFormattedTimestamp = function () {
|
|
73
|
-
return new Date().toISOString();
|
|
74
|
-
};
|
|
75
|
-
// Compare two timestamps and get difference in milliseconds
|
|
76
|
-
var getTimeDifferenceMs = function (startTime, endTime) {
|
|
77
|
-
if (endTime === void 0) { endTime = Date.now(); }
|
|
78
|
-
return endTime - startTime;
|
|
79
|
-
};
|
|
80
|
-
// Check if time difference is greater than specified minutes
|
|
81
|
-
var isTimeGreaterThan = function (startTime, minutes) {
|
|
82
|
-
var diffMs = getTimeDifferenceMs(startTime);
|
|
83
|
-
var diffMinutes = diffMs / (1000 * 60);
|
|
84
|
-
return diffMinutes > minutes;
|
|
85
|
-
};
|
|
86
|
-
// Get human-readable duration
|
|
87
|
-
var getReadableDuration = function (milliseconds) {
|
|
88
|
-
var seconds = Math.floor(milliseconds / 1000);
|
|
89
|
-
var minutes = Math.floor(seconds / 60);
|
|
90
|
-
var hours = Math.floor(minutes / 60);
|
|
91
|
-
if (hours > 0) {
|
|
92
|
-
return "".concat(hours, "h ").concat(minutes % 60, "m ").concat(seconds % 60, "s");
|
|
93
|
-
}
|
|
94
|
-
if (minutes > 0) {
|
|
95
|
-
return "".concat(minutes, "m ").concat(seconds % 60, "s");
|
|
96
|
-
}
|
|
97
|
-
return "".concat(seconds, "s");
|
|
98
|
-
};
|
|
99
|
-
// Example usage:
|
|
100
|
-
var measureExecutionTime = function (func) { return __awaiter(void 0, void 0, void 0, function () {
|
|
101
|
-
var startTime, duration;
|
|
102
|
-
return __generator(this, function (_a) {
|
|
103
|
-
switch (_a.label) {
|
|
104
|
-
case 0:
|
|
105
|
-
startTime = getCurrentTimestamp();
|
|
106
|
-
return [4 /*yield*/, func()];
|
|
107
|
-
case 1:
|
|
108
|
-
_a.sent();
|
|
109
|
-
duration = getTimeDifferenceMs(startTime);
|
|
110
|
-
return [2 /*return*/, getReadableDuration(duration)];
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}); };
|
|
114
|
-
// Performance monitoring with high-resolution timestamps
|
|
115
|
-
var getHighResolutionTimestamp = function () {
|
|
116
|
-
return performance.now(); // More precise than Date.now() for performance measurements
|
|
117
|
-
};
|
|
118
|
-
var SecondsToMilliseconds = function (seconds) { return seconds * 1000; };
|
|
119
|
-
export var MinutesToMilliseconds = function (minutes) { return minutes * 60 * 1000; };
|
|
120
15
|
//# sourceMappingURL=time.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../../src/utils/time.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../../src/utils/time.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,OAAO,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;AACpD,CAAC"}
|