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