@axinom/mosaic-fe-samples-host 0.1.0-rc.1 → 0.1.0-rc.3
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/Profiles/ProfileURLs.d.ts +10 -0
- package/dist/Profiles/ProfileURLs.d.ts.map +1 -0
- package/dist/Profiles/ProfileVariables.d.ts +12 -0
- package/dist/Profiles/ProfileVariables.d.ts.map +1 -0
- package/dist/Profiles/Profiles.d.ts +11 -0
- package/dist/Profiles/Profiles.d.ts.map +1 -0
- package/dist/ScenarioHost/ScenarioHost.d.ts +21 -0
- package/dist/ScenarioHost/ScenarioHost.d.ts.map +1 -0
- package/dist/ScenarioHost/ScenarioHostLogger.d.ts +14 -0
- package/dist/ScenarioHost/ScenarioHostLogger.d.ts.map +1 -0
- package/dist/ScenarioHostApp/ScenarioHostApp.d.ts +7 -0
- package/dist/ScenarioHostApp/ScenarioHostApp.d.ts.map +1 -0
- package/dist/VariableSearch/VariableSearch.d.ts +19 -0
- package/dist/VariableSearch/VariableSearch.d.ts.map +1 -0
- package/dist/common/types/logger.d.ts +14 -0
- package/dist/common/types/logger.d.ts.map +1 -0
- package/dist/common/types/profile-config.d.ts +24 -0
- package/dist/common/types/profile-config.d.ts.map +1 -0
- package/dist/common/types/scenario-registration.d.ts +34 -0
- package/dist/common/types/scenario-registration.d.ts.map +1 -0
- package/dist/common/types/user-settings.d.ts +4 -0
- package/dist/common/types/user-settings.d.ts.map +1 -0
- package/dist/common/utils/storage-utils.d.ts +31 -0
- package/dist/common/utils/storage-utils.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +719 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +729 -0
- package/dist/index.js.map +1 -0
- package/package.json +14 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputOnChangeData } from 'semantic-ui-react';
|
|
3
|
+
import { ProfileConfig } from '../common/types/profile-config';
|
|
4
|
+
interface ProfileURLProps {
|
|
5
|
+
selectedProfile: ProfileConfig;
|
|
6
|
+
handleInputChange: (event: React.ChangeEvent<HTMLInputElement>, data: InputOnChangeData) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ProfileURLs: React.FC<ProfileURLProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ProfileURLs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileURLs.d.ts","sourceRoot":"","sources":["../../src/Profiles/ProfileURLs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,iBAAiB,EAAO,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,eAAe;IACvB,eAAe,EAAE,aAAa,CAAC;IAC/B,iBAAiB,EAAE,CACjB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAC1C,IAAI,EAAE,iBAAiB,KACpB,IAAI,CAAC;CACX;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2GjD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputOnChangeData } from 'semantic-ui-react';
|
|
3
|
+
import { ProfileConfig } from '../common/types/profile-config';
|
|
4
|
+
interface ProfileVariableProps {
|
|
5
|
+
selectedProfile: ProfileConfig;
|
|
6
|
+
handleVariableInputChange: (variableIndex: number) => (event: React.ChangeEvent<HTMLInputElement>, data: InputOnChangeData) => void;
|
|
7
|
+
insertNewVariable: () => void;
|
|
8
|
+
deleteVariable: (variableIndex: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ProfileVariables: React.FC<ProfileVariableProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ProfileVariables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileVariables.d.ts","sourceRoot":"","sources":["../../src/Profiles/ProfileVariables.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,iBAAiB,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,oBAAoB;IAC5B,eAAe,EAAE,aAAa,CAAC;IAC/B,yBAAyB,EAAE,CACzB,aAAa,EAAE,MAAM,KAClB,CACH,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAC1C,IAAI,EAAE,iBAAiB,KACpB,IAAI,CAAC;IACV,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmE3D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RouteComponentProps } from 'react-router-dom';
|
|
3
|
+
interface MatchParams {
|
|
4
|
+
profileId?: string;
|
|
5
|
+
tabId?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ProfileProps extends RouteComponentProps<MatchParams> {
|
|
8
|
+
}
|
|
9
|
+
export declare const Profiles: React.FC<ProfileProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profiles.d.ts","sourceRoot":"","sources":["../../src/Profiles/Profiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAGL,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAqB1B,UAAU,WAAW;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,YAAa,SAAQ,mBAAmB,CAAC,WAAW,CAAC;CAAG;AAElE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA0T3C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Logger } from '../common/types/logger';
|
|
3
|
+
import { ProfileConfig, ProfileVariable } from '../common/types/profile-config';
|
|
4
|
+
import { ScenarioRegistration } from '../common/types/scenario-registration';
|
|
5
|
+
export declare type ScenarioHostProps = {
|
|
6
|
+
scenarios: readonly ScenarioRegistration[];
|
|
7
|
+
};
|
|
8
|
+
export declare const ScenarioHost: React.FC<ScenarioHostProps>;
|
|
9
|
+
export interface ScenarioHostClient {
|
|
10
|
+
scenarios: readonly ScenarioRegistration[];
|
|
11
|
+
activeProfile: ProfileConfig;
|
|
12
|
+
getVariable: <T>(key: string) => T;
|
|
13
|
+
getVariables: () => ProfileVariable[];
|
|
14
|
+
setVariable: (key: string, value: unknown, comment: string) => void;
|
|
15
|
+
logger: Logger;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves the `ScenarioHostClient` which exposes an interface to interact with the `ScenarioHost`
|
|
19
|
+
*/
|
|
20
|
+
export declare const useScenarioHost: () => ScenarioHostClient;
|
|
21
|
+
//# sourceMappingURL=ScenarioHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScenarioHost.d.ts","sourceRoot":"","sources":["../../src/ScenarioHost/ScenarioHost.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,OAAO,EAAa,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAW7E,oBAAY,iBAAiB,GAAG;IAC9B,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6NpD,CAAC;AAMF,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,eAAe,EAAE,CAAC;IACtC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,kBAUlC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JSONValue, LogLevel } from '../common/types/logger';
|
|
3
|
+
export interface LoggerHandle {
|
|
4
|
+
logMessage: (messages: JSONValue[], logLevel: LogLevel) => void;
|
|
5
|
+
}
|
|
6
|
+
interface LoggerProps {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* This logger component is used by `ScenarioHost` to facilitate logging to scenarios.
|
|
10
|
+
* It is kept here in a separate file for clarity and readability of the code. It should not be reused as a standalone component.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ScenarioHostLogger: React.ForwardRefExoticComponent<LoggerProps & React.RefAttributes<LoggerHandle>>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ScenarioHostLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScenarioHostLogger.d.ts","sourceRoot":"","sources":["../../src/ScenarioHost/ScenarioHostLogger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,SAAS,EAAY,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;CACjE;AAED,UAAU,WAAW;CAAG;AAExB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,kFAiE9B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ScenarioRegistration } from '../common/types/scenario-registration';
|
|
3
|
+
export declare type ScenarioHostAppProps = {
|
|
4
|
+
scenarios: readonly ScenarioRegistration[];
|
|
5
|
+
};
|
|
6
|
+
export declare const ScenarioHostApp: React.FC<ScenarioHostAppProps>;
|
|
7
|
+
//# sourceMappingURL=ScenarioHostApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScenarioHostApp.d.ts","sourceRoot":"","sources":["../../src/ScenarioHostApp/ScenarioHostApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAQ7E,oBAAY,oBAAoB,GAAG;IACjC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyB1D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchProps } from 'semantic-ui-react';
|
|
3
|
+
export interface VariableSearchProps extends SearchProps {
|
|
4
|
+
/**
|
|
5
|
+
* The label to be displayed
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* The React state setter used to update the value when typing into the search field or selecting a search result
|
|
10
|
+
*/
|
|
11
|
+
setStateValue?: React.Dispatch<React.SetStateAction<string>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This component has built-in support to display all `variables` defined in the active profile when the
|
|
15
|
+
* control is focused. The user may click on an item from this list to select a variable, then its corresponding value will be
|
|
16
|
+
* fetched and assigned into the input field.
|
|
17
|
+
*/
|
|
18
|
+
export declare const VariableSearch: React.FC<VariableSearchProps>;
|
|
19
|
+
//# sourceMappingURL=VariableSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableSearch.d.ts","sourceRoot":"","sources":["../../src/VariableSearch/VariableSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAU,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC9D;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0DxD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare type LogLevel = 'LOG' | 'WARN' | 'ERROR';
|
|
2
|
+
export declare type LogEntry = {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
scenarioId: string;
|
|
5
|
+
messages: JSONValue[];
|
|
6
|
+
logLevel: LogLevel;
|
|
7
|
+
};
|
|
8
|
+
export declare type JSONValue = string | number | boolean | object;
|
|
9
|
+
export interface Logger {
|
|
10
|
+
log: (...messages: JSONValue[]) => void;
|
|
11
|
+
warn: (...messages: JSONValue[]) => void;
|
|
12
|
+
error: (...messages: JSONValue[]) => void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/types/logger.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD,oBAAY,QAAQ,GAAG;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,CAAC,GAAG,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACxC,IAAI,EAAE,CAAC,GAAG,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,CAAC,GAAG,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;CAC3C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ProfileConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
userAuthBaseURL: string;
|
|
5
|
+
userServiceBaseURL: string;
|
|
6
|
+
imageServiceBaseURL: string;
|
|
7
|
+
billingServiceBaseURL: string;
|
|
8
|
+
subscriptionMonetizationServiceBaseURL: string;
|
|
9
|
+
monetizationGrantsServiceBaseURL: string;
|
|
10
|
+
mediaServiceBaseURL: string;
|
|
11
|
+
catalogServiceBaseURL: string;
|
|
12
|
+
entitlementServiceBaseURL: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
environmentId: string;
|
|
15
|
+
applicationId: string;
|
|
16
|
+
applicationKey: string;
|
|
17
|
+
variables: ProfileVariable[];
|
|
18
|
+
}
|
|
19
|
+
export interface ProfileVariable {
|
|
20
|
+
key: string;
|
|
21
|
+
value: unknown;
|
|
22
|
+
comment: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=profile-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-config.d.ts","sourceRoot":"","sources":["../../../src/common/types/profile-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sCAAsC,EAAE,MAAM,CAAC;IAC/C,gCAAgC,EAAE,MAAM,CAAC;IACzC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yBAAyB,EAAE,MAAM,CAAC;IAElC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IAEvB,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface ScenarioRegistration {
|
|
3
|
+
/**
|
|
4
|
+
* A human readable unique identifier for the scenario.
|
|
5
|
+
* This value will also be visible in the Browser address bar.
|
|
6
|
+
*
|
|
7
|
+
* The naming convention shall be `lower-kebab-case`
|
|
8
|
+
*
|
|
9
|
+
* The route for the scenario will be generated as `/${shortId}`.
|
|
10
|
+
*/
|
|
11
|
+
readonly shortId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The group the scenario belongs to. This value will be displayed in the `Scenario Explorer` list
|
|
14
|
+
* and each scenario will be grouped under the same group name.
|
|
15
|
+
*/
|
|
16
|
+
readonly groupName: string;
|
|
17
|
+
/**
|
|
18
|
+
* A label that will be displayed to identify the scenario in the `Scenario Explorer` list.
|
|
19
|
+
*/
|
|
20
|
+
readonly displayName: string;
|
|
21
|
+
/**
|
|
22
|
+
* The order the scenario will be displayed in the `Scenario Explorer` list. The `displayOrder` will be
|
|
23
|
+
* used to sort scenarios with each `groupName`.
|
|
24
|
+
*/
|
|
25
|
+
readonly displayOrder: number;
|
|
26
|
+
/**
|
|
27
|
+
* The root React component to be rendered for the scenario.
|
|
28
|
+
*/
|
|
29
|
+
readonly rootComponent: FC;
|
|
30
|
+
}
|
|
31
|
+
export interface GroupedScenarios {
|
|
32
|
+
[groupName: string]: ScenarioRegistration[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=scenario-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-registration.d.ts","sourceRoot":"","sources":["../../../src/common/types/scenario-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-settings.d.ts","sourceRoot":"","sources":["../../../src/common/types/user-settings.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ProfileConfig, ProfileVariable } from '../types/profile-config';
|
|
2
|
+
import { UserSettings } from '../types/user-settings';
|
|
3
|
+
/**
|
|
4
|
+
* The structure of the `ProfileConfig` type maintained in code can undergo several structural changes overtime.
|
|
5
|
+
* However, there may exist objects that were created using prior versions of the type persisted on client local-storages.
|
|
6
|
+
*
|
|
7
|
+
* This function will migrate the current saved state found in the local-storage into a state that is compatible with the
|
|
8
|
+
* latest `ProfileConfig` type in code by substituting reasonable defaults where necessary and eliminating obsolete properties.
|
|
9
|
+
*/
|
|
10
|
+
export declare const migrateProfileStructuralChanges: () => void;
|
|
11
|
+
export declare const getAllProfiles: () => ProfileConfig[];
|
|
12
|
+
export declare const saveAllProfiles: (profiles: ProfileConfig[]) => void;
|
|
13
|
+
export declare const saveProfile: (profileToSave: ProfileConfig) => void;
|
|
14
|
+
export declare const getProfileVariable: <T>(profile: ProfileConfig, key: string) => T;
|
|
15
|
+
export declare const getProfileVariables: (profile: ProfileConfig) => ProfileVariable[];
|
|
16
|
+
export declare const setProfileVariable: (profile: ProfileConfig, key: string, value: unknown, comment: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* The structure of the `UserSettings` type maintained in code can undergo several structural changes overtime.
|
|
19
|
+
* However, there may exist objects that were created using prior versions of the type persisted on client local-storages.
|
|
20
|
+
*
|
|
21
|
+
* This function will migrate the current saved state found in the local-storage into a state that is compatible with the
|
|
22
|
+
* latest `UserSettings` type in code by substituting reasonable defaults where necessary and eliminating obsolete properties.
|
|
23
|
+
*/
|
|
24
|
+
export declare const migrateUserSettingsStructuralChanges: () => void;
|
|
25
|
+
export declare const getUserSettings: () => UserSettings;
|
|
26
|
+
export declare const setUserSettings: (value: UserSettings) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Generate a Short ID with the given length. The ID will be in hexadecimal.
|
|
29
|
+
*/
|
|
30
|
+
export declare const generateShortUniqueId: (length?: number) => string;
|
|
31
|
+
//# sourceMappingURL=storage-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/storage-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKtD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,YAkD3C,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,aAAa,EAE9C,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,aAAa,EAAE,KAAG,IAO3D,CAAC;AAEF,eAAO,MAAM,WAAW,kBAAmB,aAAa,KAAG,IAe1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,eACpB,aAAa,OACjB,MAAM,MAGZ,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,aAAa,KACrB,eAAe,EAEjB,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,aAAa,OACjB,MAAM,SACJ,OAAO,WACL,MAAM,KACd,IAYF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC,YAQhD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,YAMlC,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,YAAY,KAAG,IAErD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,YAAY,MAAM,WAKnD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { JSONValue } from './common/types/logger';
|
|
2
|
+
export { ProfileConfig, ProfileVariable } from './common/types/profile-config';
|
|
3
|
+
export { ScenarioRegistration } from './common/types/scenario-registration';
|
|
4
|
+
export { ScenarioHostClient, useScenarioHost, } from './ScenarioHost/ScenarioHost';
|
|
5
|
+
export { ScenarioHostApp, ScenarioHostAppProps, } from './ScenarioHostApp/ScenarioHostApp';
|
|
6
|
+
export { VariableSearch, VariableSearchProps, } from './VariableSearch/VariableSearch';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,eAAe,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,eAAe,EACf,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,iCAAiC,CAAC"}
|