@qrvey/utils 1.13.0-11 → 1.13.0-13
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/cache-managers/cache-metric-manager.d.ts +1 -1
- package/dist/cache-managers/cache-metric-manager.js +2 -6
- package/dist/cache-managers/cache-model-manager.d.ts +1 -1
- package/dist/cache-managers/cache-model-manager.js +2 -6
- package/dist/cache-managers/cache-permissions-manager.d.ts +1 -1
- package/dist/cache-managers/cache-permissions-manager.js +2 -6
- package/dist/cache-managers/cache-theme-manager.d.ts +1 -1
- package/dist/cache-managers/cache-theme-manager.js +2 -6
- package/dist/cjs/cache-managers/cache-metric-manager.d.ts +1 -1
- package/dist/cjs/cache-managers/cache-metric-manager.js +2 -6
- package/dist/cjs/cache-managers/cache-model-manager.d.ts +1 -1
- package/dist/cjs/cache-managers/cache-model-manager.js +2 -6
- package/dist/cjs/cache-managers/cache-permissions-manager.d.ts +1 -1
- package/dist/cjs/cache-managers/cache-permissions-manager.js +2 -6
- package/dist/cjs/cache-managers/cache-theme-manager.d.ts +1 -1
- package/dist/cjs/cache-managers/cache-theme-manager.js +2 -6
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare class MetricCacheManager extends QrveyCacheManager<IMetricStoreSt
|
|
|
25
25
|
protected getConfigPropertyName(): keyof IGetMetricConfig;
|
|
26
26
|
protected getStorePropertyName(): keyof IMetricStoreState;
|
|
27
27
|
protected buildStoreId({ metric_id }: IGetMetricConfig): string;
|
|
28
|
-
protected createStore(): {
|
|
28
|
+
protected createStore(_initialState?: Partial<IMetricStoreState>): {
|
|
29
29
|
state: IMetricStoreState;
|
|
30
30
|
onChange: OnChangeType;
|
|
31
31
|
set: (property: keyof IMetricStoreState, value: unknown) => void;
|
|
@@ -17,12 +17,8 @@ export class MetricCacheManager extends QrveyCacheManager {
|
|
|
17
17
|
buildStoreId({ metric_id }) {
|
|
18
18
|
return `${metric_id}`;
|
|
19
19
|
}
|
|
20
|
-
createStore() {
|
|
21
|
-
return createStore({
|
|
22
|
-
metric: null,
|
|
23
|
-
loading: true,
|
|
24
|
-
error: null,
|
|
25
|
-
});
|
|
20
|
+
createStore(_initialState) {
|
|
21
|
+
return createStore(Object.assign({ metric: null, loading: true, error: null }, _initialState));
|
|
26
22
|
}
|
|
27
23
|
fetchDataAndUpdateStore(state, config) {
|
|
28
24
|
const api = new MetricPanelApi();
|
|
@@ -20,7 +20,7 @@ export declare class ModelCacheManager extends QrveyCacheManager<IModelStoreStat
|
|
|
20
20
|
protected getConfigPropertyName(): keyof IGetModelConfig;
|
|
21
21
|
protected getStorePropertyName(): keyof IModelStoreState;
|
|
22
22
|
protected buildStoreId({ qrvey_id }: IGetModelConfig): string;
|
|
23
|
-
protected createStore(): {
|
|
23
|
+
protected createStore(_initialState?: Partial<IModelStoreState>): {
|
|
24
24
|
state: IModelStoreState;
|
|
25
25
|
onChange: OnChangeType;
|
|
26
26
|
set: (property: keyof IModelStoreState, value: unknown) => void;
|
|
@@ -17,12 +17,8 @@ export class ModelCacheManager extends QrveyCacheManager {
|
|
|
17
17
|
buildStoreId({ qrvey_id }) {
|
|
18
18
|
return `${qrvey_id}`;
|
|
19
19
|
}
|
|
20
|
-
createStore() {
|
|
21
|
-
return createStore({
|
|
22
|
-
model: null,
|
|
23
|
-
loading: true,
|
|
24
|
-
error: null,
|
|
25
|
-
});
|
|
20
|
+
createStore(_initialState) {
|
|
21
|
+
return createStore(Object.assign({ model: null, loading: true, error: null }, _initialState));
|
|
26
22
|
}
|
|
27
23
|
fetchDataAndUpdateStore(state, config) {
|
|
28
24
|
const includeInfo = ["bucketsInfo", "formulaInfo", "colorByValueInfo"];
|
|
@@ -17,7 +17,7 @@ export declare class PermissionsCacheManager extends QrveyCacheManager<IPermissi
|
|
|
17
17
|
protected getConfigPropertyName(): keyof IGetPermissionsConfig;
|
|
18
18
|
protected getStorePropertyName(): keyof IPermissionsStoreState;
|
|
19
19
|
protected buildStoreId({ user_id }: IGetPermissionsConfig): string;
|
|
20
|
-
protected createStore(): {
|
|
20
|
+
protected createStore(_initialState?: Partial<IPermissionsStoreState>): {
|
|
21
21
|
state: IPermissionsStoreState;
|
|
22
22
|
onChange: OnChangeType;
|
|
23
23
|
set: (property: keyof IPermissionsStoreState, value: unknown) => void;
|
|
@@ -17,12 +17,8 @@ export class PermissionsCacheManager extends QrveyCacheManager {
|
|
|
17
17
|
buildStoreId({ user_id }) {
|
|
18
18
|
return `${user_id}`;
|
|
19
19
|
}
|
|
20
|
-
createStore() {
|
|
21
|
-
return createStore({
|
|
22
|
-
permissions: null,
|
|
23
|
-
loading: true,
|
|
24
|
-
error: null,
|
|
25
|
-
});
|
|
20
|
+
createStore(_initialState) {
|
|
21
|
+
return createStore(Object.assign({ permissions: null, loading: true, error: null }, _initialState));
|
|
26
22
|
}
|
|
27
23
|
fetchDataAndUpdateStore(state, config) {
|
|
28
24
|
getAdminPermissions(config)
|
|
@@ -18,7 +18,7 @@ export declare class ThemeCacheManager extends QrveyCacheManager<IThemeStoreStat
|
|
|
18
18
|
protected getConfigPropertyName(): keyof IGetThemeConfig;
|
|
19
19
|
protected getStorePropertyName(): keyof IThemeStoreState;
|
|
20
20
|
protected buildStoreId({ theme_id, app_id }: IGetThemeConfig): string;
|
|
21
|
-
protected createStore(): {
|
|
21
|
+
protected createStore(_initialState?: Partial<IThemeStoreState>): {
|
|
22
22
|
state: IThemeStoreState;
|
|
23
23
|
onChange: OnChangeType;
|
|
24
24
|
set: (property: keyof IThemeStoreState, value: unknown) => void;
|
|
@@ -17,12 +17,8 @@ export class ThemeCacheManager extends QrveyCacheManager {
|
|
|
17
17
|
buildStoreId({ theme_id, app_id }) {
|
|
18
18
|
return `${app_id}-${theme_id !== null && theme_id !== void 0 ? theme_id : "current"}`;
|
|
19
19
|
}
|
|
20
|
-
createStore() {
|
|
21
|
-
return createStore({
|
|
22
|
-
theme: null,
|
|
23
|
-
loading: true,
|
|
24
|
-
error: null,
|
|
25
|
-
});
|
|
20
|
+
createStore(_initialState) {
|
|
21
|
+
return createStore(Object.assign({ theme: null, loading: true, error: null }, _initialState));
|
|
26
22
|
}
|
|
27
23
|
fetchDataAndUpdateStore(state, config) {
|
|
28
24
|
(config.theme_id ? getThemeById(config) : getCurrentTheme(config))
|
|
@@ -25,7 +25,7 @@ export declare class MetricCacheManager extends QrveyCacheManager<IMetricStoreSt
|
|
|
25
25
|
protected getConfigPropertyName(): keyof IGetMetricConfig;
|
|
26
26
|
protected getStorePropertyName(): keyof IMetricStoreState;
|
|
27
27
|
protected buildStoreId({ metric_id }: IGetMetricConfig): string;
|
|
28
|
-
protected createStore(): {
|
|
28
|
+
protected createStore(_initialState?: Partial<IMetricStoreState>): {
|
|
29
29
|
state: IMetricStoreState;
|
|
30
30
|
onChange: OnChangeType;
|
|
31
31
|
set: (property: keyof IMetricStoreState, value: unknown) => void;
|
|
@@ -23,12 +23,8 @@ class MetricCacheManager extends cache_manager_1.QrveyCacheManager {
|
|
|
23
23
|
buildStoreId({ metric_id }) {
|
|
24
24
|
return `${metric_id}`;
|
|
25
25
|
}
|
|
26
|
-
createStore() {
|
|
27
|
-
return (0, store_1.createStore)({
|
|
28
|
-
metric: null,
|
|
29
|
-
loading: true,
|
|
30
|
-
error: null,
|
|
31
|
-
});
|
|
26
|
+
createStore(_initialState) {
|
|
27
|
+
return (0, store_1.createStore)(Object.assign({ metric: null, loading: true, error: null }, _initialState));
|
|
32
28
|
}
|
|
33
29
|
fetchDataAndUpdateStore(state, config) {
|
|
34
30
|
const api = new metrics_api_1.default();
|
|
@@ -20,7 +20,7 @@ export declare class ModelCacheManager extends QrveyCacheManager<IModelStoreStat
|
|
|
20
20
|
protected getConfigPropertyName(): keyof IGetModelConfig;
|
|
21
21
|
protected getStorePropertyName(): keyof IModelStoreState;
|
|
22
22
|
protected buildStoreId({ qrvey_id }: IGetModelConfig): string;
|
|
23
|
-
protected createStore(): {
|
|
23
|
+
protected createStore(_initialState?: Partial<IModelStoreState>): {
|
|
24
24
|
state: IModelStoreState;
|
|
25
25
|
onChange: OnChangeType;
|
|
26
26
|
set: (property: keyof IModelStoreState, value: unknown) => void;
|
|
@@ -20,12 +20,8 @@ class ModelCacheManager extends cache_manager_1.QrveyCacheManager {
|
|
|
20
20
|
buildStoreId({ qrvey_id }) {
|
|
21
21
|
return `${qrvey_id}`;
|
|
22
22
|
}
|
|
23
|
-
createStore() {
|
|
24
|
-
return (0, store_1.createStore)({
|
|
25
|
-
model: null,
|
|
26
|
-
loading: true,
|
|
27
|
-
error: null,
|
|
28
|
-
});
|
|
23
|
+
createStore(_initialState) {
|
|
24
|
+
return (0, store_1.createStore)(Object.assign({ model: null, loading: true, error: null }, _initialState));
|
|
29
25
|
}
|
|
30
26
|
fetchDataAndUpdateStore(state, config) {
|
|
31
27
|
const includeInfo = ["bucketsInfo", "formulaInfo", "colorByValueInfo"];
|
|
@@ -17,7 +17,7 @@ export declare class PermissionsCacheManager extends QrveyCacheManager<IPermissi
|
|
|
17
17
|
protected getConfigPropertyName(): keyof IGetPermissionsConfig;
|
|
18
18
|
protected getStorePropertyName(): keyof IPermissionsStoreState;
|
|
19
19
|
protected buildStoreId({ user_id }: IGetPermissionsConfig): string;
|
|
20
|
-
protected createStore(): {
|
|
20
|
+
protected createStore(_initialState?: Partial<IPermissionsStoreState>): {
|
|
21
21
|
state: IPermissionsStoreState;
|
|
22
22
|
onChange: OnChangeType;
|
|
23
23
|
set: (property: keyof IPermissionsStoreState, value: unknown) => void;
|
|
@@ -20,12 +20,8 @@ class PermissionsCacheManager extends cache_manager_1.QrveyCacheManager {
|
|
|
20
20
|
buildStoreId({ user_id }) {
|
|
21
21
|
return `${user_id}`;
|
|
22
22
|
}
|
|
23
|
-
createStore() {
|
|
24
|
-
return (0, store_1.createStore)({
|
|
25
|
-
permissions: null,
|
|
26
|
-
loading: true,
|
|
27
|
-
error: null,
|
|
28
|
-
});
|
|
23
|
+
createStore(_initialState) {
|
|
24
|
+
return (0, store_1.createStore)(Object.assign({ permissions: null, loading: true, error: null }, _initialState));
|
|
29
25
|
}
|
|
30
26
|
fetchDataAndUpdateStore(state, config) {
|
|
31
27
|
(0, adminPermissions_api_1.getAdminPermissions)(config)
|
|
@@ -18,7 +18,7 @@ export declare class ThemeCacheManager extends QrveyCacheManager<IThemeStoreStat
|
|
|
18
18
|
protected getConfigPropertyName(): keyof IGetThemeConfig;
|
|
19
19
|
protected getStorePropertyName(): keyof IThemeStoreState;
|
|
20
20
|
protected buildStoreId({ theme_id, app_id }: IGetThemeConfig): string;
|
|
21
|
-
protected createStore(): {
|
|
21
|
+
protected createStore(_initialState?: Partial<IThemeStoreState>): {
|
|
22
22
|
state: IThemeStoreState;
|
|
23
23
|
onChange: OnChangeType;
|
|
24
24
|
set: (property: keyof IThemeStoreState, value: unknown) => void;
|
|
@@ -20,12 +20,8 @@ class ThemeCacheManager extends cache_manager_1.QrveyCacheManager {
|
|
|
20
20
|
buildStoreId({ theme_id, app_id }) {
|
|
21
21
|
return `${app_id}-${theme_id !== null && theme_id !== void 0 ? theme_id : "current"}`;
|
|
22
22
|
}
|
|
23
|
-
createStore() {
|
|
24
|
-
return (0, store_1.createStore)({
|
|
25
|
-
theme: null,
|
|
26
|
-
loading: true,
|
|
27
|
-
error: null,
|
|
28
|
-
});
|
|
23
|
+
createStore(_initialState) {
|
|
24
|
+
return (0, store_1.createStore)(Object.assign({ theme: null, loading: true, error: null }, _initialState));
|
|
29
25
|
}
|
|
30
26
|
fetchDataAndUpdateStore(state, config) {
|
|
31
27
|
(config.theme_id ? (0, Themes_api_1.getThemeById)(config) : (0, Themes_api_1.getCurrentTheme)(config))
|