@gooddata/sdk-backend-base 8.13.0-alpha.9 → 9.0.0-alpha.2

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