@gooddata/sdk-backend-base 8.13.0-alpha.2 → 8.13.0-alpha.21
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.js +304 -380
- package/dist/cachingBackend/index.js.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/execution.js +77 -92
- package/dist/customBackend/execution.js.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.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.js +62 -79
- package/dist/decoratedBackend/execution.js.map +1 -1
- package/dist/decoratedBackend/index.js +90 -104
- 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.js +347 -391
- package/dist/dummyBackend/index.js.map +1 -1
- package/dist/eventingBackend/index.js +42 -49
- package/dist/eventingBackend/index.js.map +1 -1
- package/dist/ldmFactories/builder.js +14 -16
- package/dist/ldmFactories/builder.js.map +1 -1
- package/dist/ldmFactories/catalog/attributeFactory.js +22 -32
- package/dist/ldmFactories/catalog/attributeFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/dateDatasetFactory.js +25 -41
- package/dist/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/factFactory.js +11 -19
- package/dist/ldmFactories/catalog/factFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/groupFactory.js +14 -27
- package/dist/ldmFactories/catalog/groupFactory.js.map +1 -1
- package/dist/ldmFactories/catalog/measureFactory.js +15 -25
- package/dist/ldmFactories/catalog/measureFactory.js.map +1 -1
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js +20 -27
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.js +24 -34
- 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 +13 -21
- package/dist/ldmFactories/metadata/attributeFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/dashboardFactory.js +7 -15
- package/dist/ldmFactories/metadata/dashboardFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/dataSetFactory.js +7 -15
- package/dist/ldmFactories/metadata/dataSetFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/displayFormFactory.js +13 -21
- package/dist/ldmFactories/metadata/displayFormFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/factFactory.js +7 -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 +13 -21
- package/dist/ldmFactories/metadata/measureFactory.js.map +1 -1
- package/dist/ldmFactories/metadata/variableFactory.js +7 -15
- package/dist/ldmFactories/metadata/variableFactory.js.map +1 -1
- package/dist/normalizingBackend/index.js +71 -96
- package/dist/normalizingBackend/index.js.map +1 -1
- package/dist/normalizingBackend/normalizer.d.ts.map +1 -1
- package/dist/normalizingBackend/normalizer.js +130 -138
- package/dist/normalizingBackend/normalizer.js.map +1 -1
- package/dist/toolkit/auth.js +47 -60
- package/dist/toolkit/auth.js.map +1 -1
- package/dist/toolkit/execution.js +40 -52
- package/dist/toolkit/execution.js.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.js +23 -46
- package/dist/workspaceSettingsBackend/index.js.map +1 -1
- package/esm/cachingBackend/index.js +281 -358
- package/esm/cachingBackend/index.js.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/execution.js +72 -89
- package/esm/customBackend/execution.js.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.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.js +60 -81
- package/esm/decoratedBackend/execution.js.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.js +342 -387
- package/esm/dummyBackend/index.js.map +1 -1
- package/esm/eventingBackend/index.js +37 -45
- package/esm/eventingBackend/index.js.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.js +64 -90
- package/esm/normalizingBackend/index.js.map +1 -1
- package/esm/normalizingBackend/normalizer.d.ts.map +1 -1
- package/esm/normalizingBackend/normalizer.js +125 -136
- package/esm/normalizingBackend/normalizer.js.map +1 -1
- package/esm/toolkit/auth.js +47 -63
- package/esm/toolkit/auth.js.map +1 -1
- package/esm/toolkit/execution.js +38 -53
- package/esm/toolkit/execution.js.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/workspaceSettingsBackend/index.js +19 -43
- package/esm/workspaceSettingsBackend/index.js.map +1 -1
- package/package.json +7 -6
|
@@ -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 = 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 = 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,71 +214,63 @@ 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 = 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(sdk_model_1.defWithDimensions(definition, ...dim));
|
|
263
250
|
},
|
|
264
|
-
withSorting
|
|
265
|
-
var items = [];
|
|
266
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
267
|
-
items[_i] = arguments[_i];
|
|
268
|
-
}
|
|
251
|
+
withSorting(...items) {
|
|
269
252
|
return executionFactory.forDefinition(sdk_model_1.defWithSorting(definition, items));
|
|
270
253
|
},
|
|
271
|
-
withDateFormat
|
|
254
|
+
withDateFormat(dateFormat) {
|
|
272
255
|
return executionFactory.forDefinition(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
|
|
270
|
+
equals(other) {
|
|
288
271
|
return isEqual_1.default(this.definition, other.definition);
|
|
289
272
|
},
|
|
290
|
-
withExecConfig
|
|
273
|
+
withExecConfig(config) {
|
|
291
274
|
if (!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
|
}
|
|
@@ -295,203 +278,197 @@ function dummyPreparedExecution(definition, executionFactory, config) {
|
|
|
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",
|
|
@@ -505,57 +482,54 @@ var DummyOrganization = /** @class */ (function () {
|
|
|
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: 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
|
-
getSettings:
|
|
516
|
+
setWhiteLabeling: () => Promise.resolve(),
|
|
517
|
+
setLocale: () => Promise.resolve(),
|
|
518
|
+
getSettings: () => Promise.resolve({}),
|
|
544
519
|
};
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
function DummyWorkspaceSettingsService(workspace) {
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
class DummyWorkspaceSettingsService {
|
|
523
|
+
constructor(workspace) {
|
|
550
524
|
this.workspace = workspace;
|
|
551
525
|
}
|
|
552
|
-
|
|
526
|
+
getSettings() {
|
|
553
527
|
return Promise.resolve({
|
|
554
528
|
workspace: this.workspace,
|
|
555
529
|
testSetting: "test_value",
|
|
556
530
|
});
|
|
557
|
-
}
|
|
558
|
-
|
|
531
|
+
}
|
|
532
|
+
getSettingsForCurrentUser() {
|
|
559
533
|
return Promise.resolve({
|
|
560
534
|
workspace: this.workspace,
|
|
561
535
|
testSetting: "test_value",
|
|
@@ -566,165 +540,148 @@ var DummyWorkspaceSettingsService = /** @class */ (function () {
|
|
|
566
540
|
decimal: ".",
|
|
567
541
|
},
|
|
568
542
|
});
|
|
569
|
-
}
|
|
570
|
-
|
|
543
|
+
}
|
|
544
|
+
setLocale(_locale) {
|
|
571
545
|
return Promise.resolve();
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
function DummyElementsQueryResult(items, limit, offset, totalCount) {
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
class DummyElementsQueryResult {
|
|
549
|
+
constructor(items, limit, offset, totalCount) {
|
|
577
550
|
this.items = items;
|
|
578
551
|
this.limit = limit;
|
|
579
552
|
this.offset = offset;
|
|
580
553
|
this.totalCount = totalCount;
|
|
581
554
|
}
|
|
582
|
-
|
|
555
|
+
next() {
|
|
583
556
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
584
|
-
}
|
|
585
|
-
|
|
557
|
+
}
|
|
558
|
+
goTo(_pageIndex) {
|
|
586
559
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
587
|
-
}
|
|
588
|
-
|
|
560
|
+
}
|
|
561
|
+
all() {
|
|
589
562
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
590
|
-
}
|
|
591
|
-
|
|
563
|
+
}
|
|
564
|
+
allSorted(_compareFn) {
|
|
592
565
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
function DummyElementsQuery(workspace, ref) {
|
|
598
|
-
var _this = this;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
class DummyElementsQuery {
|
|
569
|
+
constructor(workspace, ref) {
|
|
599
570
|
this.workspace = workspace;
|
|
600
571
|
this.ref = ref;
|
|
601
572
|
this.offset = 0;
|
|
602
573
|
this.limit = 50;
|
|
603
|
-
this.query =
|
|
604
|
-
return
|
|
605
|
-
|
|
606
|
-
});
|
|
607
|
-
}); };
|
|
574
|
+
this.query = async () => {
|
|
575
|
+
return new DummyElementsQueryResult([], this.limit, this.offset, 0);
|
|
576
|
+
};
|
|
608
577
|
}
|
|
609
|
-
|
|
578
|
+
withLimit(limit) {
|
|
610
579
|
this.limit = limit;
|
|
611
580
|
return this;
|
|
612
|
-
}
|
|
613
|
-
|
|
581
|
+
}
|
|
582
|
+
withOffset(offset) {
|
|
614
583
|
this.offset = offset;
|
|
615
584
|
return this;
|
|
616
|
-
}
|
|
617
|
-
|
|
585
|
+
}
|
|
586
|
+
withAttributeFilters(_filters) {
|
|
618
587
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
619
|
-
}
|
|
620
|
-
|
|
588
|
+
}
|
|
589
|
+
withMeasures(_measures) {
|
|
621
590
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
622
|
-
}
|
|
623
|
-
|
|
591
|
+
}
|
|
592
|
+
withOptions(_options) {
|
|
624
593
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
625
|
-
}
|
|
626
|
-
|
|
594
|
+
}
|
|
595
|
+
withDateFilters(_filters) {
|
|
627
596
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
628
|
-
}
|
|
629
|
-
|
|
597
|
+
}
|
|
598
|
+
withSignal(_) {
|
|
630
599
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
function DummyElementsQueryFactory(workspace) {
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
class DummyElementsQueryFactory {
|
|
603
|
+
constructor(workspace) {
|
|
636
604
|
this.workspace = workspace;
|
|
637
605
|
}
|
|
638
|
-
|
|
606
|
+
forDisplayForm(ref) {
|
|
639
607
|
return new DummyElementsQuery(this.workspace, ref);
|
|
640
|
-
}
|
|
641
|
-
|
|
608
|
+
}
|
|
609
|
+
forFilter(_filter, _dateFilterDisplayForm) {
|
|
642
610
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
function DummyWorkspaceAttributesService(workspace) {
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
class DummyWorkspaceAttributesService {
|
|
614
|
+
constructor(workspace) {
|
|
648
615
|
this.workspace = workspace;
|
|
649
616
|
}
|
|
650
|
-
|
|
617
|
+
elements() {
|
|
651
618
|
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) {
|
|
619
|
+
}
|
|
620
|
+
async getAttributeDisplayForm(ref) {
|
|
621
|
+
return {
|
|
622
|
+
attribute: sdk_model_1.idRef("dummyAttribute"),
|
|
623
|
+
deprecated: false,
|
|
624
|
+
description: "Dummy attribute",
|
|
625
|
+
id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
|
|
626
|
+
production: true,
|
|
627
|
+
ref,
|
|
628
|
+
title: "Dummy display form",
|
|
629
|
+
type: "displayForm",
|
|
630
|
+
unlisted: false,
|
|
631
|
+
uri: sdk_model_1.isUriRef(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
getAttributeDisplayForms(refs) {
|
|
635
|
+
return Promise.all(refs.map((ref) => this.getAttributeDisplayForm(ref)));
|
|
636
|
+
}
|
|
637
|
+
getAttribute(_ref) {
|
|
676
638
|
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) {
|
|
639
|
+
}
|
|
640
|
+
async getAttributeByDisplayForm(ref) {
|
|
641
|
+
return {
|
|
642
|
+
deprecated: false,
|
|
643
|
+
description: "Dummy attribute",
|
|
644
|
+
displayForms: [
|
|
645
|
+
{
|
|
646
|
+
attribute: sdk_model_1.idRef("dummyAttribute"),
|
|
647
|
+
deprecated: false,
|
|
648
|
+
description: "Dummy attribute",
|
|
649
|
+
id: sdk_model_1.isIdentifierRef(ref) ? ref.identifier : "dummyDisplayForm",
|
|
650
|
+
production: true,
|
|
651
|
+
ref,
|
|
652
|
+
title: "Dummy display form",
|
|
653
|
+
type: "displayForm",
|
|
654
|
+
unlisted: false,
|
|
655
|
+
uri: sdk_model_1.isUriRef(ref) ? ref.uri : `/gdc/md/${ref.identifier}`,
|
|
656
|
+
},
|
|
657
|
+
],
|
|
658
|
+
id: "dummyAttribute",
|
|
659
|
+
production: true,
|
|
660
|
+
ref: sdk_model_1.idRef("dummyAttribute"),
|
|
661
|
+
title: "Dummy attribute",
|
|
662
|
+
type: "attribute",
|
|
663
|
+
unlisted: false,
|
|
664
|
+
uri: "/gdc/md/dummyAttribute",
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
getAttributes(_refs) {
|
|
710
668
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
711
|
-
}
|
|
712
|
-
|
|
669
|
+
}
|
|
670
|
+
getCommonAttributes(_attributeRefs) {
|
|
713
671
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
714
|
-
}
|
|
715
|
-
|
|
672
|
+
}
|
|
673
|
+
getCommonAttributesBatch(_attributesRefsBatch) {
|
|
716
674
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
717
|
-
}
|
|
718
|
-
|
|
675
|
+
}
|
|
676
|
+
getAttributeDatasetMeta(_ref) {
|
|
719
677
|
throw new sdk_backend_spi_1.NotSupported("not supported");
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
function DummyWorkspaceMeasuresService(workspace) {
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
class DummyWorkspaceMeasuresService {
|
|
681
|
+
constructor(workspace) {
|
|
725
682
|
this.workspace = workspace;
|
|
726
683
|
}
|
|
727
|
-
|
|
684
|
+
createMeasure(measure) {
|
|
728
685
|
return Promise.resolve({
|
|
729
686
|
id: "test_metric_id",
|
|
730
687
|
uri: "test_metric_id",
|
|
@@ -739,19 +696,18 @@ var DummyWorkspaceMeasuresService = /** @class */ (function () {
|
|
|
739
696
|
isLocked: measure.isLocked || false,
|
|
740
697
|
unlisted: measure.unlisted || false,
|
|
741
698
|
});
|
|
742
|
-
}
|
|
743
|
-
|
|
699
|
+
}
|
|
700
|
+
deleteMeasure(_measureRef) {
|
|
744
701
|
return Promise.resolve(undefined);
|
|
745
|
-
}
|
|
746
|
-
|
|
702
|
+
}
|
|
703
|
+
getMeasureExpressionTokens(_ref) {
|
|
747
704
|
return Promise.resolve([]);
|
|
748
|
-
}
|
|
749
|
-
|
|
705
|
+
}
|
|
706
|
+
getMeasureReferencingObjects(_measureRef) {
|
|
750
707
|
return Promise.resolve({});
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
return Promise.resolve(
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
}());
|
|
708
|
+
}
|
|
709
|
+
updateMeasure(measure) {
|
|
710
|
+
return Promise.resolve(Object.assign({}, measure));
|
|
711
|
+
}
|
|
712
|
+
}
|
|
757
713
|
//# sourceMappingURL=index.js.map
|