@gooddata/sdk-backend-base 8.13.0-alpha.7 → 8.13.0-alpha.70
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/cachingBackend/index.d.ts +2 -2
- package/dist/cachingBackend/index.d.ts.map +1 -1
- package/dist/cachingBackend/index.js +310 -386
- package/dist/cachingBackend/index.js.map +1 -1
- package/dist/convertors/fromBackend/afm/result.d.ts +1 -1
- package/dist/convertors/fromBackend/afm/result.d.ts.map +1 -1
- package/dist/convertors/fromBackend/afm/result.js +3 -3
- package/dist/convertors/fromBackend/afm/result.js.map +1 -1
- package/dist/customBackend/config.d.ts +9 -9
- package/dist/customBackend/config.d.ts.map +1 -1
- package/dist/customBackend/execution.js +77 -92
- package/dist/customBackend/execution.js.map +1 -1
- package/dist/customBackend/index.d.ts +1 -1
- package/dist/customBackend/index.d.ts.map +1 -1
- package/dist/customBackend/index.js +78 -114
- package/dist/customBackend/index.js.map +1 -1
- package/dist/customBackend/workspace.js +39 -40
- package/dist/customBackend/workspace.js.map +1 -1
- package/dist/decoratedBackend/attributes.js +21 -22
- package/dist/decoratedBackend/attributes.js.map +1 -1
- package/dist/decoratedBackend/catalog.d.ts +1 -1
- package/dist/decoratedBackend/catalog.d.ts.map +1 -1
- package/dist/decoratedBackend/catalog.js +38 -50
- package/dist/decoratedBackend/catalog.js.map +1 -1
- package/dist/decoratedBackend/dashboards.js +61 -62
- package/dist/decoratedBackend/dashboards.js.map +1 -1
- package/dist/decoratedBackend/elements.js +47 -70
- package/dist/decoratedBackend/elements.js.map +1 -1
- package/dist/decoratedBackend/execution.d.ts +1 -1
- package/dist/decoratedBackend/execution.d.ts.map +1 -1
- package/dist/decoratedBackend/execution.js +62 -79
- package/dist/decoratedBackend/execution.js.map +1 -1
- package/dist/decoratedBackend/index.d.ts +7 -7
- package/dist/decoratedBackend/index.d.ts.map +1 -1
- package/dist/decoratedBackend/index.js +91 -105
- package/dist/decoratedBackend/index.js.map +1 -1
- package/dist/decoratedBackend/securitySettings.js +7 -8
- package/dist/decoratedBackend/securitySettings.js.map +1 -1
- package/dist/decoratedBackend/workspaceSettings.js +12 -26
- package/dist/decoratedBackend/workspaceSettings.js.map +1 -1
- package/dist/dummyBackend/index.d.ts +1 -1
- package/dist/dummyBackend/index.d.ts.map +1 -1
- package/dist/dummyBackend/index.js +365 -397
- package/dist/dummyBackend/index.js.map +1 -1
- package/dist/eventingBackend/index.d.ts +1 -1
- package/dist/eventingBackend/index.d.ts.map +1 -1
- package/dist/eventingBackend/index.js +44 -51
- package/dist/eventingBackend/index.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/ldmFactories/builder.d.ts +4 -4
- package/dist/ldmFactories/builder.d.ts.map +1 -1
- package/dist/ldmFactories/builder.js +15 -16
- package/dist/ldmFactories/builder.js.map +1 -1
- package/dist/ldmFactories/catalog/attributeFactory.js +27 -36
- package/dist/ldmFactories/catalog/attributeFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/dateDatasetFactory.js +33 -47
- package/dist/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/factFactory.js +14 -21
- package/dist/ldmFactories/catalog/factFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/groupFactory.js +15 -27
- package/dist/ldmFactories/catalog/groupFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/measureFactory.js +18 -27
- package/dist/ldmFactories/catalog/measureFactory.js.map +1 -1
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js +22 -28
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.js +26 -35
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
- package/dist/ldmFactories/dashboard/widgetFactory.js +20 -39
- package/dist/ldmFactories/dashboard/widgetFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/attributeFactory.js +14 -21
- package/dist/ldmFactories/metadata/attributeFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/dashboardFactory.js +8 -15
- package/dist/ldmFactories/metadata/dashboardFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/dataSetFactory.js +8 -15
- package/dist/ldmFactories/metadata/dataSetFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/displayFormFactory.js +14 -21
- package/dist/ldmFactories/metadata/displayFormFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/factFactory.js +8 -15
- package/dist/ldmFactories/metadata/factFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/factory.js +17 -23
- package/dist/ldmFactories/metadata/factory.js.map +1 -1
- package/dist/ldmFactories/metadata/measureFactory.js +14 -21
- package/dist/ldmFactories/metadata/measureFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/variableFactory.js +8 -15
- package/dist/ldmFactories/metadata/variableFactory.js.map +1 -1
- package/dist/normalizingBackend/index.d.ts +2 -2
- package/dist/normalizingBackend/index.d.ts.map +1 -1
- package/dist/normalizingBackend/index.js +78 -103
- package/dist/normalizingBackend/index.js.map +1 -1
- package/dist/normalizingBackend/normalizer.d.ts +2 -2
- package/dist/normalizingBackend/normalizer.d.ts.map +1 -1
- package/dist/normalizingBackend/normalizer.js +153 -160
- package/dist/normalizingBackend/normalizer.js.map +1 -1
- package/dist/toolkit/auth.d.ts +2 -2
- package/dist/toolkit/auth.d.ts.map +1 -1
- package/dist/toolkit/auth.js +47 -60
- package/dist/toolkit/auth.js.map +1 -1
- package/dist/toolkit/backend.d.ts +1 -1
- package/dist/toolkit/backend.d.ts.map +1 -1
- package/dist/toolkit/execution.js +41 -53
- package/dist/toolkit/execution.js.map +1 -1
- package/dist/toolkit/paging.d.ts +1 -1
- package/dist/toolkit/paging.d.ts.map +1 -1
- package/dist/toolkit/paging.js +77 -146
- package/dist/toolkit/paging.js.map +1 -1
- package/dist/toolkit/pluginUrlValidation.js +9 -9
- package/dist/toolkit/pluginUrlValidation.js.map +1 -1
- package/dist/workspaceSettingsBackend/index.d.ts +3 -3
- package/dist/workspaceSettingsBackend/index.d.ts.map +1 -1
- package/dist/workspaceSettingsBackend/index.js +23 -46
- package/dist/workspaceSettingsBackend/index.js.map +1 -1
- package/esm/cachingBackend/index.d.ts +2 -2
- package/esm/cachingBackend/index.d.ts.map +1 -1
- package/esm/cachingBackend/index.js +281 -358
- package/esm/cachingBackend/index.js.map +1 -1
- package/esm/convertors/fromBackend/afm/result.d.ts +1 -1
- package/esm/convertors/fromBackend/afm/result.d.ts.map +1 -1
- package/esm/convertors/fromBackend/afm/result.js +3 -3
- package/esm/convertors/fromBackend/afm/result.js.map +1 -1
- package/esm/customBackend/config.d.ts +9 -9
- package/esm/customBackend/config.d.ts.map +1 -1
- package/esm/customBackend/execution.js +72 -89
- package/esm/customBackend/execution.js.map +1 -1
- package/esm/customBackend/index.d.ts +1 -1
- package/esm/customBackend/index.d.ts.map +1 -1
- package/esm/customBackend/index.js +75 -112
- package/esm/customBackend/index.js.map +1 -1
- package/esm/customBackend/workspace.js +37 -39
- package/esm/customBackend/workspace.js.map +1 -1
- package/esm/decoratedBackend/attributes.js +21 -23
- package/esm/decoratedBackend/attributes.js.map +1 -1
- package/esm/decoratedBackend/catalog.d.ts +1 -1
- package/esm/decoratedBackend/catalog.d.ts.map +1 -1
- package/esm/decoratedBackend/catalog.js +36 -51
- package/esm/decoratedBackend/catalog.js.map +1 -1
- package/esm/decoratedBackend/dashboards.js +61 -63
- package/esm/decoratedBackend/dashboards.js.map +1 -1
- package/esm/decoratedBackend/elements.js +47 -73
- package/esm/decoratedBackend/elements.js.map +1 -1
- package/esm/decoratedBackend/execution.d.ts +1 -1
- package/esm/decoratedBackend/execution.d.ts.map +1 -1
- package/esm/decoratedBackend/execution.js +60 -81
- package/esm/decoratedBackend/execution.js.map +1 -1
- package/esm/decoratedBackend/index.d.ts +7 -7
- package/esm/decoratedBackend/index.d.ts.map +1 -1
- package/esm/decoratedBackend/index.js +88 -103
- package/esm/decoratedBackend/index.js.map +1 -1
- package/esm/decoratedBackend/securitySettings.js +7 -9
- package/esm/decoratedBackend/securitySettings.js.map +1 -1
- package/esm/decoratedBackend/workspaceSettings.js +12 -27
- package/esm/decoratedBackend/workspaceSettings.js.map +1 -1
- package/esm/dummyBackend/index.d.ts +1 -1
- package/esm/dummyBackend/index.d.ts.map +1 -1
- package/esm/dummyBackend/index.js +354 -387
- package/esm/dummyBackend/index.js.map +1 -1
- package/esm/eventingBackend/index.d.ts +1 -1
- package/esm/eventingBackend/index.d.ts.map +1 -1
- package/esm/eventingBackend/index.js +37 -45
- package/esm/eventingBackend/index.js.map +1 -1
- package/esm/ldmFactories/builder.d.ts +4 -4
- package/esm/ldmFactories/builder.d.ts.map +1 -1
- package/esm/ldmFactories/builder.js +14 -17
- package/esm/ldmFactories/builder.js.map +1 -1
- package/esm/ldmFactories/catalog/attributeFactory.js +15 -27
- package/esm/ldmFactories/catalog/attributeFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/dateDatasetFactory.js +18 -37
- package/esm/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/factFactory.js +5 -15
- package/esm/ldmFactories/catalog/factFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/groupFactory.js +11 -27
- package/esm/ldmFactories/catalog/groupFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/measureFactory.js +9 -21
- package/esm/ldmFactories/catalog/measureFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/insightWidgetFactory.js +16 -25
- package/esm/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.js +19 -31
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/widgetFactory.js +19 -39
- package/esm/ldmFactories/dashboard/widgetFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/attributeFactory.js +9 -19
- package/esm/ldmFactories/metadata/attributeFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/dashboardFactory.js +3 -13
- package/esm/ldmFactories/metadata/dashboardFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/dataSetFactory.js +3 -13
- package/esm/ldmFactories/metadata/dataSetFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/displayFormFactory.js +9 -19
- package/esm/ldmFactories/metadata/displayFormFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/factFactory.js +3 -13
- package/esm/ldmFactories/metadata/factFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/factory.js +16 -23
- package/esm/ldmFactories/metadata/factory.js.map +1 -1
- package/esm/ldmFactories/metadata/measureFactory.js +9 -19
- package/esm/ldmFactories/metadata/measureFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/variableFactory.js +3 -13
- package/esm/ldmFactories/metadata/variableFactory.js.map +1 -1
- package/esm/normalizingBackend/index.d.ts +2 -2
- package/esm/normalizingBackend/index.d.ts.map +1 -1
- package/esm/normalizingBackend/index.js +64 -90
- package/esm/normalizingBackend/index.js.map +1 -1
- package/esm/normalizingBackend/normalizer.d.ts +2 -2
- package/esm/normalizingBackend/normalizer.d.ts.map +1 -1
- package/esm/normalizingBackend/normalizer.js +128 -138
- package/esm/normalizingBackend/normalizer.js.map +1 -1
- package/esm/toolkit/auth.d.ts +2 -2
- package/esm/toolkit/auth.d.ts.map +1 -1
- package/esm/toolkit/auth.js +47 -63
- package/esm/toolkit/auth.js.map +1 -1
- package/esm/toolkit/backend.d.ts +1 -1
- package/esm/toolkit/backend.d.ts.map +1 -1
- package/esm/toolkit/execution.js +38 -53
- package/esm/toolkit/execution.js.map +1 -1
- package/esm/toolkit/paging.d.ts +1 -1
- package/esm/toolkit/paging.d.ts.map +1 -1
- package/esm/toolkit/paging.js +72 -144
- package/esm/toolkit/paging.js.map +1 -1
- package/esm/toolkit/pluginUrlValidation.js +8 -8
- package/esm/toolkit/pluginUrlValidation.js.map +1 -1
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/workspaceSettingsBackend/index.d.ts +3 -3
- package/esm/workspaceSettingsBackend/index.d.ts.map +1 -1
- package/esm/workspaceSettingsBackend/index.js +19 -43
- package/esm/workspaceSettingsBackend/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dummyDataView = exports.dummyBackendEmptyData = exports.dummyBackend = exports.defaultDummyBackendConfig = void 0;
|
|
4
|
-
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
5
|
// (C) 2019-2023 GoodData Corporation
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
|
|
7
|
+
const sdk_model_1 = require("@gooddata/sdk-model");
|
|
8
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
9
|
+
const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
|
|
10
|
+
const execution_1 = require("../toolkit/execution");
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
@@ -27,54 +27,53 @@ exports.defaultDummyBackendConfig = {
|
|
|
27
27
|
* @param config - Provide configuration of the backend (host/user)
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
|
-
function dummyBackend(config) {
|
|
31
|
-
|
|
32
|
-
var noopBackend = {
|
|
30
|
+
function dummyBackend(config = exports.defaultDummyBackendConfig) {
|
|
31
|
+
const noopBackend = {
|
|
33
32
|
capabilities: {
|
|
34
33
|
canCalculateTotals: true,
|
|
35
34
|
canCalculateSubTotals: true,
|
|
36
35
|
canCalculateNativeTotals: true,
|
|
37
36
|
canCalculateGrandTotals: true,
|
|
38
37
|
},
|
|
39
|
-
config
|
|
40
|
-
onHostname
|
|
41
|
-
return dummyBackend(
|
|
38
|
+
config,
|
|
39
|
+
onHostname(hostname) {
|
|
40
|
+
return dummyBackend(Object.assign(Object.assign({}, config), { hostname }));
|
|
42
41
|
},
|
|
43
|
-
withTelemetry
|
|
42
|
+
withTelemetry(_component, _props) {
|
|
44
43
|
return noopBackend;
|
|
45
44
|
},
|
|
46
|
-
withAuthentication
|
|
45
|
+
withAuthentication(_) {
|
|
47
46
|
return this;
|
|
48
47
|
},
|
|
49
|
-
organization
|
|
48
|
+
organization(organizationId) {
|
|
50
49
|
return new DummyOrganization(organizationId);
|
|
51
50
|
},
|
|
52
|
-
organizations
|
|
51
|
+
organizations() {
|
|
53
52
|
return {
|
|
54
|
-
getCurrentOrganization
|
|
53
|
+
getCurrentOrganization() {
|
|
55
54
|
return Promise.resolve(new DummyOrganization("dummy-organization-id"));
|
|
56
55
|
},
|
|
57
56
|
};
|
|
58
57
|
},
|
|
59
|
-
currentUser
|
|
58
|
+
currentUser() {
|
|
60
59
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
61
60
|
},
|
|
62
|
-
workspace
|
|
61
|
+
workspace(id) {
|
|
63
62
|
return dummyWorkspace(id, config);
|
|
64
63
|
},
|
|
65
|
-
entitlements
|
|
64
|
+
entitlements() {
|
|
66
65
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
67
66
|
},
|
|
68
|
-
workspaces
|
|
67
|
+
workspaces() {
|
|
69
68
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
70
69
|
},
|
|
71
|
-
authenticate
|
|
70
|
+
authenticate() {
|
|
72
71
|
return Promise.resolve({ userId: "dummyUser" });
|
|
73
72
|
},
|
|
74
|
-
deauthenticate
|
|
73
|
+
deauthenticate() {
|
|
75
74
|
return Promise.resolve();
|
|
76
75
|
},
|
|
77
|
-
isAuthenticated
|
|
76
|
+
isAuthenticated() {
|
|
78
77
|
return Promise.resolve({ userId: "dummyUser" });
|
|
79
78
|
},
|
|
80
79
|
};
|
|
@@ -108,23 +107,22 @@ exports.dummyBackendEmptyData = dummyBackendEmptyData;
|
|
|
108
107
|
* @returns new instance of data view
|
|
109
108
|
* @internal
|
|
110
109
|
*/
|
|
111
|
-
function dummyDataView(definition, result, config) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var fp = sdk_model_1.defFingerprint(definition) + "/emptyView";
|
|
110
|
+
function dummyDataView(definition, result, config = exports.defaultDummyBackendConfig) {
|
|
111
|
+
const factory = new DummyExecutionFactory(config, definition.workspace);
|
|
112
|
+
const execResult = result ? result : dummyExecutionResult(definition, factory, config);
|
|
113
|
+
const fp = (0, sdk_model_1.defFingerprint)(definition) + "/emptyView";
|
|
116
114
|
return {
|
|
117
|
-
definition
|
|
115
|
+
definition,
|
|
118
116
|
result: execResult,
|
|
119
117
|
headerItems: [],
|
|
120
118
|
data: [],
|
|
121
119
|
offset: [0, 0],
|
|
122
120
|
count: [0, 0],
|
|
123
121
|
totalCount: [0, 0],
|
|
124
|
-
fingerprint
|
|
122
|
+
fingerprint() {
|
|
125
123
|
return fp;
|
|
126
124
|
},
|
|
127
|
-
equals
|
|
125
|
+
equals(other) {
|
|
128
126
|
return fp === other.fingerprint();
|
|
129
127
|
},
|
|
130
128
|
};
|
|
@@ -135,60 +133,56 @@ exports.dummyDataView = dummyDataView;
|
|
|
135
133
|
//
|
|
136
134
|
function dummyWorkspace(workspace, config) {
|
|
137
135
|
return {
|
|
138
|
-
workspace
|
|
139
|
-
getDescriptor
|
|
140
|
-
return
|
|
141
|
-
return tslib_1.__generator(this, function (_a) {
|
|
142
|
-
return [2 /*return*/, dummyDescriptor(this.workspace)];
|
|
143
|
-
});
|
|
144
|
-
});
|
|
136
|
+
workspace,
|
|
137
|
+
async getDescriptor() {
|
|
138
|
+
return dummyDescriptor(this.workspace);
|
|
145
139
|
},
|
|
146
|
-
getParentWorkspace
|
|
140
|
+
getParentWorkspace() {
|
|
147
141
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
148
142
|
},
|
|
149
|
-
execution
|
|
143
|
+
execution() {
|
|
150
144
|
return new DummyExecutionFactory(config, workspace);
|
|
151
145
|
},
|
|
152
|
-
catalog
|
|
146
|
+
catalog() {
|
|
153
147
|
return new DummyWorkspaceCatalogFactory(workspace);
|
|
154
148
|
},
|
|
155
|
-
attributes
|
|
149
|
+
attributes() {
|
|
156
150
|
return new DummyWorkspaceAttributesService(workspace);
|
|
157
151
|
},
|
|
158
|
-
measures
|
|
152
|
+
measures() {
|
|
159
153
|
return new DummyWorkspaceMeasuresService(workspace);
|
|
160
154
|
},
|
|
161
|
-
facts
|
|
155
|
+
facts() {
|
|
162
156
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
163
157
|
},
|
|
164
|
-
settings
|
|
158
|
+
settings() {
|
|
165
159
|
return new DummyWorkspaceSettingsService(workspace);
|
|
166
160
|
},
|
|
167
|
-
insights
|
|
161
|
+
insights() {
|
|
168
162
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
169
163
|
},
|
|
170
|
-
dashboards
|
|
164
|
+
dashboards() {
|
|
171
165
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
172
166
|
},
|
|
173
|
-
styling
|
|
167
|
+
styling() {
|
|
174
168
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
175
169
|
},
|
|
176
|
-
datasets
|
|
170
|
+
datasets() {
|
|
177
171
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
178
172
|
},
|
|
179
|
-
permissions
|
|
173
|
+
permissions() {
|
|
180
174
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
181
175
|
},
|
|
182
|
-
users
|
|
176
|
+
users() {
|
|
183
177
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
184
178
|
},
|
|
185
|
-
userGroups
|
|
179
|
+
userGroups() {
|
|
186
180
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
187
181
|
},
|
|
188
|
-
dateFilterConfigs
|
|
182
|
+
dateFilterConfigs() {
|
|
189
183
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
190
184
|
},
|
|
191
|
-
accessControl
|
|
185
|
+
accessControl() {
|
|
192
186
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
193
187
|
},
|
|
194
188
|
};
|
|
@@ -201,20 +195,17 @@ function dummyDescriptor(workspaceId) {
|
|
|
201
195
|
isDemo: false,
|
|
202
196
|
};
|
|
203
197
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
DummyExecutionFactory.prototype.forDefinition = function (def) {
|
|
198
|
+
class DummyExecutionFactory extends execution_1.AbstractExecutionFactory {
|
|
199
|
+
constructor(config, workspace) {
|
|
200
|
+
super(workspace);
|
|
201
|
+
this.config = config;
|
|
202
|
+
}
|
|
203
|
+
forDefinition(def) {
|
|
212
204
|
return dummyPreparedExecution(def, this, this.config);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
}(execution_1.AbstractExecutionFactory));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
216
207
|
function dummyExecutionResult(definition, executionFactory, config) {
|
|
217
|
-
|
|
208
|
+
const fp = (0, sdk_model_1.defFingerprint)(definition) + "/emptyResult";
|
|
218
209
|
function dummyRead() {
|
|
219
210
|
if (config.raiseNoDataExceptions) {
|
|
220
211
|
return Promise.reject(new sdk_backend_spi_1.NoDataError("Empty data view from dummy backend", config.raiseNoDataExceptions === "with-data-view"
|
|
@@ -223,275 +214,261 @@ function dummyExecutionResult(definition, executionFactory, config) {
|
|
|
223
214
|
}
|
|
224
215
|
return Promise.resolve(dummyDataView(definition, result, config));
|
|
225
216
|
}
|
|
226
|
-
|
|
227
|
-
definition
|
|
217
|
+
const result = {
|
|
218
|
+
definition,
|
|
228
219
|
dimensions: [],
|
|
229
|
-
readAll
|
|
220
|
+
readAll() {
|
|
230
221
|
return dummyRead();
|
|
231
222
|
},
|
|
232
|
-
readWindow
|
|
223
|
+
readWindow(_1, _2) {
|
|
233
224
|
return dummyRead();
|
|
234
225
|
},
|
|
235
|
-
fingerprint
|
|
226
|
+
fingerprint() {
|
|
236
227
|
return fp;
|
|
237
228
|
},
|
|
238
|
-
equals
|
|
229
|
+
equals(other) {
|
|
239
230
|
return fp === other.fingerprint();
|
|
240
231
|
},
|
|
241
|
-
export
|
|
232
|
+
export(_) {
|
|
242
233
|
throw new sdk_backend_spi_1.NotSupported("...");
|
|
243
234
|
},
|
|
244
|
-
exportToBlob
|
|
235
|
+
exportToBlob(_) {
|
|
245
236
|
throw new sdk_backend_spi_1.NotSupported("...");
|
|
246
237
|
},
|
|
247
|
-
transform
|
|
238
|
+
transform() {
|
|
248
239
|
return executionFactory.forDefinition(definition);
|
|
249
240
|
},
|
|
250
241
|
};
|
|
251
242
|
return result;
|
|
252
243
|
}
|
|
253
244
|
function dummyPreparedExecution(definition, executionFactory, config) {
|
|
254
|
-
|
|
245
|
+
const fp = (0, sdk_model_1.defFingerprint)(definition);
|
|
255
246
|
return {
|
|
256
|
-
definition
|
|
257
|
-
withDimensions
|
|
258
|
-
|
|
259
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
260
|
-
dim[_i] = arguments[_i];
|
|
261
|
-
}
|
|
262
|
-
return executionFactory.forDefinition(sdk_model_1.defWithDimensions.apply(void 0, tslib_1.__spreadArrays([definition], dim)));
|
|
247
|
+
definition,
|
|
248
|
+
withDimensions(...dim) {
|
|
249
|
+
return executionFactory.forDefinition((0, sdk_model_1.defWithDimensions)(definition, ...dim));
|
|
263
250
|
},
|
|
264
|
-
withSorting
|
|
265
|
-
|
|
266
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
267
|
-
items[_i] = arguments[_i];
|
|
268
|
-
}
|
|
269
|
-
return executionFactory.forDefinition(sdk_model_1.defWithSorting(definition, items));
|
|
251
|
+
withSorting(...items) {
|
|
252
|
+
return executionFactory.forDefinition((0, sdk_model_1.defWithSorting)(definition, items));
|
|
270
253
|
},
|
|
271
|
-
withDateFormat
|
|
272
|
-
return executionFactory.forDefinition(sdk_model_1.defWithDateFormat(definition, dateFormat));
|
|
254
|
+
withDateFormat(dateFormat) {
|
|
255
|
+
return executionFactory.forDefinition((0, sdk_model_1.defWithDateFormat)(definition, dateFormat));
|
|
273
256
|
},
|
|
274
|
-
execute
|
|
257
|
+
execute() {
|
|
275
258
|
return Promise.resolve(dummyExecutionResult(definition, executionFactory, config));
|
|
276
259
|
},
|
|
277
|
-
explain
|
|
260
|
+
explain() {
|
|
278
261
|
console.warn("Backend does not support explain mode");
|
|
279
262
|
return {
|
|
280
|
-
data:
|
|
281
|
-
download:
|
|
263
|
+
data: () => Promise.reject(new Error(`Backend does not support explain mode data call.`)),
|
|
264
|
+
download: () => Promise.resolve(),
|
|
282
265
|
};
|
|
283
266
|
},
|
|
284
|
-
fingerprint
|
|
267
|
+
fingerprint() {
|
|
285
268
|
return fp;
|
|
286
269
|
},
|
|
287
|
-
equals
|
|
288
|
-
return isEqual_1.default(this.definition, other.definition);
|
|
270
|
+
equals(other) {
|
|
271
|
+
return (0, isEqual_1.default)(this.definition, other.definition);
|
|
289
272
|
},
|
|
290
|
-
withExecConfig
|
|
291
|
-
if (!isEmpty_1.default(config === null || config === void 0 ? void 0 : config.dataSamplingPercentage)) {
|
|
273
|
+
withExecConfig(config) {
|
|
274
|
+
if (!(0, isEmpty_1.default)(config === null || config === void 0 ? void 0 : config.dataSamplingPercentage)) {
|
|
292
275
|
console.warn("Backend does not support data sampling, result will be not affected");
|
|
293
276
|
}
|
|
294
277
|
return executionFactory.forDefinition(definition);
|
|
295
278
|
},
|
|
296
279
|
};
|
|
297
280
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}; }
|
|
281
|
+
class DummyWorkspaceCatalogFactory {
|
|
282
|
+
constructor(workspace, options = {
|
|
283
|
+
types: ["attribute", "measure", "fact", "dateDataset"],
|
|
284
|
+
excludeTags: [],
|
|
285
|
+
includeTags: [],
|
|
286
|
+
loadGroups: true,
|
|
287
|
+
}) {
|
|
306
288
|
this.workspace = workspace;
|
|
307
289
|
this.options = options;
|
|
308
290
|
}
|
|
309
|
-
|
|
310
|
-
|
|
291
|
+
withOptions(options) {
|
|
292
|
+
const newOptions = Object.assign(Object.assign({}, this.options), options);
|
|
311
293
|
return new DummyWorkspaceCatalogFactory(this.workspace, newOptions);
|
|
312
|
-
}
|
|
313
|
-
|
|
294
|
+
}
|
|
295
|
+
forDataset(dataset) {
|
|
314
296
|
return this.withOptions({
|
|
315
|
-
dataset
|
|
297
|
+
dataset,
|
|
316
298
|
});
|
|
317
|
-
}
|
|
318
|
-
|
|
299
|
+
}
|
|
300
|
+
forTypes(types) {
|
|
319
301
|
return this.withOptions({
|
|
320
|
-
types
|
|
302
|
+
types,
|
|
321
303
|
});
|
|
322
|
-
}
|
|
323
|
-
|
|
304
|
+
}
|
|
305
|
+
includeTags(tags) {
|
|
324
306
|
return this.withOptions({
|
|
325
307
|
includeTags: tags,
|
|
326
308
|
});
|
|
327
|
-
}
|
|
328
|
-
|
|
309
|
+
}
|
|
310
|
+
excludeTags(tags) {
|
|
329
311
|
return this.withOptions({
|
|
330
312
|
excludeTags: tags,
|
|
331
313
|
});
|
|
332
|
-
}
|
|
333
|
-
|
|
314
|
+
}
|
|
315
|
+
withGroups(loadGroups) {
|
|
334
316
|
return this.withOptions({
|
|
335
|
-
loadGroups
|
|
317
|
+
loadGroups,
|
|
336
318
|
});
|
|
337
|
-
}
|
|
338
|
-
|
|
319
|
+
}
|
|
320
|
+
load() {
|
|
339
321
|
return Promise.resolve(new DummyWorkspaceCatalog(this.workspace));
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
function DummyWorkspaceCatalog(workspace) {
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
class DummyWorkspaceCatalog {
|
|
325
|
+
constructor(workspace) {
|
|
345
326
|
this.workspace = workspace;
|
|
346
327
|
}
|
|
347
|
-
|
|
328
|
+
allItems() {
|
|
348
329
|
return [];
|
|
349
|
-
}
|
|
350
|
-
|
|
330
|
+
}
|
|
331
|
+
attributes() {
|
|
351
332
|
return [];
|
|
352
|
-
}
|
|
353
|
-
|
|
333
|
+
}
|
|
334
|
+
availableItems() {
|
|
354
335
|
return new DummyWorkspaceCatalogAvailableItemsFactory(this.workspace);
|
|
355
|
-
}
|
|
356
|
-
|
|
336
|
+
}
|
|
337
|
+
dateDatasets() {
|
|
357
338
|
return [];
|
|
358
|
-
}
|
|
359
|
-
|
|
339
|
+
}
|
|
340
|
+
facts() {
|
|
360
341
|
return [];
|
|
361
|
-
}
|
|
362
|
-
|
|
342
|
+
}
|
|
343
|
+
groups() {
|
|
363
344
|
return [];
|
|
364
|
-
}
|
|
365
|
-
|
|
345
|
+
}
|
|
346
|
+
measures() {
|
|
366
347
|
return [];
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
types: [],
|
|
382
|
-
}; }
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
class DummyWorkspaceCatalogAvailableItemsFactory {
|
|
351
|
+
constructor(workspace, options = {
|
|
352
|
+
items: [],
|
|
353
|
+
excludeTags: [],
|
|
354
|
+
insight: undefined,
|
|
355
|
+
dataset: undefined,
|
|
356
|
+
production: false,
|
|
357
|
+
includeDateGranularities: [],
|
|
358
|
+
includeTags: [],
|
|
359
|
+
loadGroups: false,
|
|
360
|
+
types: [],
|
|
361
|
+
}) {
|
|
383
362
|
this.workspace = workspace;
|
|
384
363
|
this.options = options;
|
|
385
364
|
}
|
|
386
|
-
|
|
365
|
+
excludeTags(excludeTags) {
|
|
387
366
|
return this.withOptions({
|
|
388
|
-
excludeTags
|
|
367
|
+
excludeTags,
|
|
389
368
|
});
|
|
390
|
-
}
|
|
369
|
+
}
|
|
391
370
|
//eslint-disable-next-line sonarjs/no-identical-functions
|
|
392
|
-
|
|
371
|
+
forDataset(dataset) {
|
|
393
372
|
return this.withOptions({
|
|
394
|
-
dataset
|
|
373
|
+
dataset,
|
|
395
374
|
});
|
|
396
|
-
}
|
|
397
|
-
|
|
375
|
+
}
|
|
376
|
+
forInsight(insight) {
|
|
398
377
|
return this.withOptions({
|
|
399
|
-
insight
|
|
378
|
+
insight,
|
|
400
379
|
});
|
|
401
|
-
}
|
|
402
|
-
|
|
380
|
+
}
|
|
381
|
+
forItems(items) {
|
|
403
382
|
return this.withOptions({
|
|
404
|
-
items
|
|
383
|
+
items,
|
|
405
384
|
});
|
|
406
|
-
}
|
|
385
|
+
}
|
|
407
386
|
//eslint-disable-next-line sonarjs/no-identical-functions
|
|
408
|
-
|
|
387
|
+
forTypes(types) {
|
|
409
388
|
return this.withOptions({
|
|
410
|
-
types
|
|
389
|
+
types,
|
|
411
390
|
});
|
|
412
|
-
}
|
|
413
|
-
|
|
391
|
+
}
|
|
392
|
+
includeTags(includeTags) {
|
|
414
393
|
return this.withOptions({
|
|
415
|
-
includeTags
|
|
394
|
+
includeTags,
|
|
416
395
|
});
|
|
417
|
-
}
|
|
418
|
-
|
|
396
|
+
}
|
|
397
|
+
load() {
|
|
419
398
|
return Promise.resolve(new DummyWorkspaceCatalogWithAvailableItems(this.workspace));
|
|
420
|
-
}
|
|
399
|
+
}
|
|
421
400
|
//eslint-disable-next-line sonarjs/no-identical-functions
|
|
422
|
-
|
|
401
|
+
withGroups(loadGroups) {
|
|
423
402
|
return this.withOptions({
|
|
424
|
-
loadGroups
|
|
403
|
+
loadGroups,
|
|
425
404
|
});
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
405
|
+
}
|
|
406
|
+
withOptions(options) {
|
|
407
|
+
const newOptions = Object.assign(Object.assign({}, this.options), options);
|
|
429
408
|
return new DummyWorkspaceCatalogAvailableItemsFactory(this.workspace, newOptions);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
function DummyWorkspaceCatalogWithAvailableItems(workspace) {
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
class DummyWorkspaceCatalogWithAvailableItems {
|
|
412
|
+
constructor(workspace) {
|
|
435
413
|
this.workspace = workspace;
|
|
436
414
|
}
|
|
437
|
-
|
|
415
|
+
allAvailableItems() {
|
|
438
416
|
return [];
|
|
439
|
-
}
|
|
440
|
-
|
|
417
|
+
}
|
|
418
|
+
allItems() {
|
|
441
419
|
return [];
|
|
442
|
-
}
|
|
443
|
-
|
|
420
|
+
}
|
|
421
|
+
attributes() {
|
|
444
422
|
return [];
|
|
445
|
-
}
|
|
446
|
-
|
|
423
|
+
}
|
|
424
|
+
availableAttributes() {
|
|
447
425
|
return [];
|
|
448
|
-
}
|
|
449
|
-
|
|
426
|
+
}
|
|
427
|
+
availableDateDatasets() {
|
|
450
428
|
return [];
|
|
451
|
-
}
|
|
452
|
-
|
|
429
|
+
}
|
|
430
|
+
availableFacts() {
|
|
453
431
|
return [];
|
|
454
|
-
}
|
|
455
|
-
|
|
432
|
+
}
|
|
433
|
+
availableMeasures() {
|
|
456
434
|
return [];
|
|
457
|
-
}
|
|
458
|
-
|
|
435
|
+
}
|
|
436
|
+
dateDatasets() {
|
|
459
437
|
return [];
|
|
460
|
-
}
|
|
461
|
-
|
|
438
|
+
}
|
|
439
|
+
facts() {
|
|
462
440
|
return [];
|
|
463
|
-
}
|
|
464
|
-
|
|
441
|
+
}
|
|
442
|
+
groups() {
|
|
465
443
|
return [];
|
|
466
|
-
}
|
|
467
|
-
|
|
444
|
+
}
|
|
445
|
+
measures() {
|
|
468
446
|
return [];
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
function DummyOrganization(organizationId) {
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
class DummyOrganization {
|
|
450
|
+
constructor(organizationId) {
|
|
474
451
|
this.organizationId = organizationId;
|
|
475
452
|
}
|
|
476
|
-
|
|
453
|
+
getDescriptor() {
|
|
477
454
|
return Promise.resolve({
|
|
478
455
|
id: this.organizationId,
|
|
479
456
|
title: "dummy organization",
|
|
480
457
|
});
|
|
481
|
-
}
|
|
482
|
-
|
|
458
|
+
}
|
|
459
|
+
securitySettings() {
|
|
483
460
|
return {
|
|
484
|
-
scope:
|
|
485
|
-
isUrlValid
|
|
461
|
+
scope: `/gdc/domains/${this.organizationId}`,
|
|
462
|
+
isUrlValid(_url, _context) {
|
|
486
463
|
return Promise.resolve(true);
|
|
487
464
|
},
|
|
488
|
-
isDashboardPluginUrlValid
|
|
465
|
+
isDashboardPluginUrlValid(_url, _workspace) {
|
|
489
466
|
return Promise.resolve(true);
|
|
490
467
|
},
|
|
491
468
|
};
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
469
|
+
}
|
|
470
|
+
styling() {
|
|
471
|
+
const resolveTheme = (theme) => {
|
|
495
472
|
return Promise.resolve({
|
|
496
473
|
type: "theme",
|
|
497
474
|
id: "theme_id",
|
|
@@ -500,62 +477,65 @@ var DummyOrganization = /** @class */ (function () {
|
|
|
500
477
|
production: true,
|
|
501
478
|
deprecated: false,
|
|
502
479
|
unlisted: false,
|
|
503
|
-
ref: sdk_model_1.idRef("theme_id"),
|
|
480
|
+
ref: (0, sdk_model_1.idRef)("theme_id"),
|
|
504
481
|
uri: "theme_uri",
|
|
505
482
|
theme: theme.theme,
|
|
506
483
|
});
|
|
507
484
|
};
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
});
|
|
521
|
-
};
|
|
485
|
+
const resolveColorPalette = (colorPalette) => Promise.resolve({
|
|
486
|
+
type: "colorPalette",
|
|
487
|
+
id: "color_palette_id",
|
|
488
|
+
title: "Color Palette 1",
|
|
489
|
+
description: "",
|
|
490
|
+
production: true,
|
|
491
|
+
deprecated: false,
|
|
492
|
+
unlisted: false,
|
|
493
|
+
ref: (0, sdk_model_1.idRef)("color_palette_id"),
|
|
494
|
+
uri: "color_palette_uri",
|
|
495
|
+
colorPalette: colorPalette.colorPalette,
|
|
496
|
+
});
|
|
522
497
|
return {
|
|
523
|
-
getThemes:
|
|
524
|
-
getActiveTheme:
|
|
525
|
-
setActiveTheme:
|
|
526
|
-
clearActiveTheme:
|
|
498
|
+
getThemes: () => Promise.resolve([]),
|
|
499
|
+
getActiveTheme: () => Promise.resolve(undefined),
|
|
500
|
+
setActiveTheme: () => Promise.resolve(),
|
|
501
|
+
clearActiveTheme: () => Promise.resolve(),
|
|
527
502
|
createTheme: resolveTheme,
|
|
528
503
|
updateTheme: resolveTheme,
|
|
529
|
-
deleteTheme:
|
|
530
|
-
getColorPalettes:
|
|
531
|
-
getActiveColorPalette:
|
|
532
|
-
setActiveColorPalette:
|
|
533
|
-
clearActiveColorPalette:
|
|
504
|
+
deleteTheme: () => Promise.resolve(),
|
|
505
|
+
getColorPalettes: () => Promise.resolve([]),
|
|
506
|
+
getActiveColorPalette: () => Promise.resolve(undefined),
|
|
507
|
+
setActiveColorPalette: () => Promise.resolve(),
|
|
508
|
+
clearActiveColorPalette: () => Promise.resolve(),
|
|
534
509
|
createColorPalette: resolveColorPalette,
|
|
535
510
|
updateColorPalette: resolveColorPalette,
|
|
536
|
-
deleteColorPalette:
|
|
511
|
+
deleteColorPalette: () => Promise.resolve(),
|
|
537
512
|
};
|
|
538
|
-
}
|
|
539
|
-
|
|
513
|
+
}
|
|
514
|
+
settings() {
|
|
540
515
|
return {
|
|
541
|
-
setWhiteLabeling:
|
|
542
|
-
setLocale:
|
|
543
|
-
|
|
516
|
+
setWhiteLabeling: () => Promise.resolve(),
|
|
517
|
+
setLocale: () => Promise.resolve(),
|
|
518
|
+
setTimezone: () => Promise.resolve(),
|
|
519
|
+
setDateFormat: () => Promise.resolve(),
|
|
520
|
+
setTheme: () => Promise.resolve(),
|
|
521
|
+
setColorPalette: () => Promise.resolve(),
|
|
522
|
+
deleteTheme: () => Promise.resolve(),
|
|
523
|
+
deleteColorPalette: () => Promise.resolve(),
|
|
524
|
+
getSettings: () => Promise.resolve({}),
|
|
544
525
|
};
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
function DummyWorkspaceSettingsService(workspace) {
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
class DummyWorkspaceSettingsService {
|
|
529
|
+
constructor(workspace) {
|
|
550
530
|
this.workspace = workspace;
|
|
551
531
|
}
|
|
552
|
-
|
|
532
|
+
getSettings() {
|
|
553
533
|
return Promise.resolve({
|
|
554
534
|
workspace: this.workspace,
|
|
555
535
|
testSetting: "test_value",
|
|
556
536
|
});
|
|
557
|
-
}
|
|
558
|
-
|
|
537
|
+
}
|
|
538
|
+
getSettingsForCurrentUser() {
|
|
559
539
|
return Promise.resolve({
|
|
560
540
|
workspace: this.workspace,
|
|
561
541
|
testSetting: "test_value",
|
|
@@ -566,169 +546,158 @@ var DummyWorkspaceSettingsService = /** @class */ (function () {
|
|
|
566
546
|
decimal: ".",
|
|
567
547
|
},
|
|
568
548
|
});
|
|
569
|
-
}
|
|
570
|
-
|
|
549
|
+
}
|
|
550
|
+
setLocale(_locale) {
|
|
571
551
|
return Promise.resolve();
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
552
|
+
}
|
|
553
|
+
setTimezone(_timezone) {
|
|
554
|
+
return Promise.resolve();
|
|
555
|
+
}
|
|
556
|
+
setDateFormat(_dateFormat) {
|
|
557
|
+
return Promise.resolve();
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
class DummyElementsQueryResult {
|
|
561
|
+
constructor(items, limit, offset, totalCount) {
|
|
577
562
|
this.items = items;
|
|
578
563
|
this.limit = limit;
|
|
579
564
|
this.offset = offset;
|
|
580
565
|
this.totalCount = totalCount;
|
|
581
566
|
}
|
|
582
|
-
|
|
567
|
+
next() {
|
|
583
568
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
584
|
-
}
|
|
585
|
-
|
|
569
|
+
}
|
|
570
|
+
goTo(_pageIndex) {
|
|
586
571
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
587
|
-
}
|
|
588
|
-
|
|
572
|
+
}
|
|
573
|
+
all() {
|
|
589
574
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
590
|
-
}
|
|
591
|
-
|
|
575
|
+
}
|
|
576
|
+
allSorted(_compareFn) {
|
|
592
577
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
function DummyElementsQuery(workspace, ref) {
|
|
598
|
-
var _this = this;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
class DummyElementsQuery {
|
|
581
|
+
constructor(workspace, ref) {
|
|
599
582
|
this.workspace = workspace;
|
|
600
583
|
this.ref = ref;
|
|
601
584
|
this.offset = 0;
|
|
602
585
|
this.limit = 50;
|
|
603
|
-
this.query =
|
|
604
|
-
return
|
|
605
|
-
|
|
606
|
-
});
|
|
607
|
-
}); };
|
|
586
|
+
this.query = async () => {
|
|
587
|
+
return new DummyElementsQueryResult([], this.limit, this.offset, 0);
|
|
588
|
+
};
|
|
608
589
|
}
|
|
609
|
-
|
|
590
|
+
withLimit(limit) {
|
|
610
591
|
this.limit = limit;
|
|
611
592
|
return this;
|
|
612
|
-
}
|
|
613
|
-
|
|
593
|
+
}
|
|
594
|
+
withOffset(offset) {
|
|
614
595
|
this.offset = offset;
|
|
615
596
|
return this;
|
|
616
|
-
}
|
|
617
|
-
|
|
597
|
+
}
|
|
598
|
+
withAttributeFilters(_filters) {
|
|
618
599
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
619
|
-
}
|
|
620
|
-
|
|
600
|
+
}
|
|
601
|
+
withMeasures(_measures) {
|
|
621
602
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
622
|
-
}
|
|
623
|
-
|
|
603
|
+
}
|
|
604
|
+
withOptions(_options) {
|
|
624
605
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
625
|
-
}
|
|
626
|
-
|
|
606
|
+
}
|
|
607
|
+
withDateFilters(_filters) {
|
|
627
608
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
628
|
-
}
|
|
629
|
-
|
|
609
|
+
}
|
|
610
|
+
withSignal(_) {
|
|
630
611
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
function DummyElementsQueryFactory(workspace) {
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
class DummyElementsQueryFactory {
|
|
615
|
+
constructor(workspace) {
|
|
636
616
|
this.workspace = workspace;
|
|
637
617
|
}
|
|
638
|
-
|
|
618
|
+
forDisplayForm(ref) {
|
|
639
619
|
return new DummyElementsQuery(this.workspace, ref);
|
|
640
|
-
}
|
|
641
|
-
|
|
620
|
+
}
|
|
621
|
+
forFilter(_filter, _dateFilterDisplayForm) {
|
|
642
622
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
function DummyWorkspaceAttributesService(workspace) {
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
class DummyWorkspaceAttributesService {
|
|
626
|
+
constructor(workspace) {
|
|
648
627
|
this.workspace = workspace;
|
|
649
628
|
}
|
|
650
|
-
|
|
629
|
+
elements() {
|
|
651
630
|
return new DummyElementsQueryFactory(this.workspace);
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
return
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
DummyWorkspaceAttributesService.prototype.getAttributeDisplayForms = function (refs) {
|
|
672
|
-
var _this = this;
|
|
673
|
-
return Promise.all(refs.map(function (ref) { return _this.getAttributeDisplayForm(ref); }));
|
|
674
|
-
};
|
|
675
|
-
DummyWorkspaceAttributesService.prototype.getAttribute = function (_ref) {
|
|
631
|
+
}
|
|
632
|
+
async getAttributeDisplayForm(ref) {
|
|
633
|
+
return {
|
|
634
|
+
attribute: (0, sdk_model_1.idRef)("dummyAttribute"),
|
|
635
|
+
deprecated: false,
|
|
636
|
+
description: "Dummy attribute",
|
|
637
|
+
id: (0, sdk_model_1.isIdentifierRef)(ref) ? ref.identifier : "dummyDisplayForm",
|
|
638
|
+
production: true,
|
|
639
|
+
ref,
|
|
640
|
+
title: "Dummy display form",
|
|
641
|
+
type: "displayForm",
|
|
642
|
+
unlisted: false,
|
|
643
|
+
uri: (0, sdk_model_1.isUriRef)(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
getAttributeDisplayForms(refs) {
|
|
647
|
+
return Promise.all(refs.map((ref) => this.getAttributeDisplayForm(ref)));
|
|
648
|
+
}
|
|
649
|
+
getAttribute(_ref) {
|
|
676
650
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
return
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
});
|
|
707
|
-
});
|
|
708
|
-
};
|
|
709
|
-
DummyWorkspaceAttributesService.prototype.getAttributes = function (_refs) {
|
|
651
|
+
}
|
|
652
|
+
async getAttributeByDisplayForm(ref) {
|
|
653
|
+
return {
|
|
654
|
+
deprecated: false,
|
|
655
|
+
description: "Dummy attribute",
|
|
656
|
+
displayForms: [
|
|
657
|
+
{
|
|
658
|
+
attribute: (0, sdk_model_1.idRef)("dummyAttribute"),
|
|
659
|
+
deprecated: false,
|
|
660
|
+
description: "Dummy attribute",
|
|
661
|
+
id: (0, sdk_model_1.isIdentifierRef)(ref) ? ref.identifier : "dummyDisplayForm",
|
|
662
|
+
production: true,
|
|
663
|
+
ref,
|
|
664
|
+
title: "Dummy display form",
|
|
665
|
+
type: "displayForm",
|
|
666
|
+
unlisted: false,
|
|
667
|
+
uri: (0, sdk_model_1.isUriRef)(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
|
|
668
|
+
},
|
|
669
|
+
],
|
|
670
|
+
id: "dummyAttribute",
|
|
671
|
+
production: true,
|
|
672
|
+
ref: (0, sdk_model_1.idRef)("dummyAttribute"),
|
|
673
|
+
title: "Dummy attribute",
|
|
674
|
+
type: "attribute",
|
|
675
|
+
unlisted: false,
|
|
676
|
+
uri: "/gdc/md/dummyAttribute",
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
getAttributes(_refs) {
|
|
710
680
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
711
|
-
}
|
|
712
|
-
|
|
681
|
+
}
|
|
682
|
+
getCommonAttributes(_attributeRefs) {
|
|
713
683
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
714
|
-
}
|
|
715
|
-
|
|
684
|
+
}
|
|
685
|
+
getCommonAttributesBatch(_attributesRefsBatch) {
|
|
716
686
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
717
|
-
}
|
|
718
|
-
|
|
687
|
+
}
|
|
688
|
+
getAttributeDatasetMeta(_ref) {
|
|
719
689
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
function DummyWorkspaceMeasuresService(workspace) {
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
class DummyWorkspaceMeasuresService {
|
|
693
|
+
constructor(workspace) {
|
|
725
694
|
this.workspace = workspace;
|
|
726
695
|
}
|
|
727
|
-
|
|
696
|
+
createMeasure(measure) {
|
|
728
697
|
return Promise.resolve({
|
|
729
698
|
id: "test_metric_id",
|
|
730
699
|
uri: "test_metric_id",
|
|
731
|
-
ref: sdk_model_1.idRef("test_metric_id", "measure"),
|
|
700
|
+
ref: (0, sdk_model_1.idRef)("test_metric_id", "measure"),
|
|
732
701
|
type: "measure",
|
|
733
702
|
title: measure.title || "",
|
|
734
703
|
description: measure.description || "",
|
|
@@ -739,19 +708,18 @@ var DummyWorkspaceMeasuresService = /** @class */ (function () {
|
|
|
739
708
|
isLocked: measure.isLocked || false,
|
|
740
709
|
unlisted: measure.unlisted || false,
|
|
741
710
|
});
|
|
742
|
-
}
|
|
743
|
-
|
|
711
|
+
}
|
|
712
|
+
deleteMeasure(_measureRef) {
|
|
744
713
|
return Promise.resolve(undefined);
|
|
745
|
-
}
|
|
746
|
-
|
|
714
|
+
}
|
|
715
|
+
getMeasureExpressionTokens(_ref) {
|
|
747
716
|
return Promise.resolve([]);
|
|
748
|
-
}
|
|
749
|
-
|
|
717
|
+
}
|
|
718
|
+
getMeasureReferencingObjects(_measureRef) {
|
|
750
719
|
return Promise.resolve({});
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
return Promise.resolve(
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
}());
|
|
720
|
+
}
|
|
721
|
+
updateMeasure(measure) {
|
|
722
|
+
return Promise.resolve(Object.assign({}, measure));
|
|
723
|
+
}
|
|
724
|
+
}
|
|
757
725
|
//# sourceMappingURL=index.js.map
|