@vcd/sdk 0.13.0 → 15.0.0-alpha.0

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 (92) hide show
  1. package/client/client/api.result.service.d.ts +20 -0
  2. package/client/client/constants.d.ts +10 -0
  3. package/client/client/index.d.ts +7 -0
  4. package/client/client/logging.interceptor.d.ts +14 -0
  5. package/client/client/request.headers.interceptor.d.ts +20 -0
  6. package/client/client/response.normalization.interceptor.d.ts +39 -0
  7. package/client/client/vcd.api.client.d.ts +351 -0
  8. package/client/client/vcd.http.client.d.ts +32 -0
  9. package/client/client/vcd.transfer.client.d.ts +121 -0
  10. package/client/container-hooks/index.d.ts +58 -0
  11. package/client/index.d.ts +2 -0
  12. package/client/openapi.d.ts +76 -0
  13. package/client/query/filter.builder.d.ts +162 -0
  14. package/client/query/index.d.ts +2 -0
  15. package/client/query/query.builder.d.ts +30 -0
  16. package/common/container-hooks.d.ts +2 -2
  17. package/core/plugin.module.d.ts +10 -5
  18. package/esm2020/client/client/api.result.service.mjs +43 -0
  19. package/esm2020/client/client/constants.mjs +13 -0
  20. package/esm2020/client/client/index.mjs +8 -0
  21. package/esm2020/client/client/logging.interceptor.mjs +44 -0
  22. package/esm2020/client/client/request.headers.interceptor.mjs +91 -0
  23. package/esm2020/client/client/response.normalization.interceptor.mjs +59 -0
  24. package/esm2020/client/client/vcd.api.client.mjs +602 -0
  25. package/esm2020/client/client/vcd.http.client.mjs +52 -0
  26. package/esm2020/client/client/vcd.transfer.client.mjs +166 -0
  27. package/esm2020/client/container-hooks/index.mjs +57 -0
  28. package/esm2020/client/index.mjs +3 -0
  29. package/esm2020/client/openapi.mjs +16 -0
  30. package/esm2020/client/query/filter.builder.mjs +195 -0
  31. package/esm2020/client/query/index.mjs +3 -0
  32. package/esm2020/client/query/query.builder.mjs +79 -0
  33. package/esm2020/common/container-hooks.mjs +74 -0
  34. package/esm2020/common/index.mjs +2 -0
  35. package/esm2020/core/index.mjs +2 -0
  36. package/esm2020/core/plugin.module.mjs +18 -0
  37. package/esm2020/main.mjs +45 -0
  38. package/esm2020/public-api.mjs +8 -0
  39. package/esm2020/vcd-sdk.mjs +5 -0
  40. package/fesm2015/vcd-sdk.mjs +1513 -0
  41. package/fesm2015/vcd-sdk.mjs.map +1 -0
  42. package/fesm2020/vcd-sdk.mjs +1508 -0
  43. package/fesm2020/vcd-sdk.mjs.map +1 -0
  44. package/index.d.ts +5 -0
  45. package/main.d.ts +11 -5
  46. package/package.json +30 -39
  47. package/public-api.d.ts +1 -1
  48. package/vcd-sdk-15.0.0-alpha.0.tgz +0 -0
  49. package/LICENSE.txt +0 -12
  50. package/README.md +0 -119
  51. package/bundles/vcd-sdk.umd.js +0 -810
  52. package/bundles/vcd-sdk.umd.js.map +0 -1
  53. package/bundles/vcd-sdk.umd.min.js +0 -16
  54. package/bundles/vcd-sdk.umd.min.js.map +0 -1
  55. package/esm2015/common/container-hooks.js +0 -219
  56. package/esm2015/common/index.js +0 -6
  57. package/esm2015/core/index.js +0 -6
  58. package/esm2015/core/plugin.module.js +0 -53
  59. package/esm2015/i18n/index.js +0 -8
  60. package/esm2015/i18n/translate.pipe.js +0 -92
  61. package/esm2015/i18n/translate.service.js +0 -229
  62. package/esm2015/i18n/translation.loader.js +0 -63
  63. package/esm2015/main.js +0 -37
  64. package/esm2015/public-api.js +0 -12
  65. package/esm2015/vcd-sdk.js +0 -10
  66. package/esm5/common/container-hooks.js +0 -266
  67. package/esm5/common/index.js +0 -6
  68. package/esm5/core/index.js +0 -6
  69. package/esm5/core/plugin.module.js +0 -64
  70. package/esm5/i18n/index.js +0 -8
  71. package/esm5/i18n/translate.pipe.js +0 -108
  72. package/esm5/i18n/translate.service.js +0 -280
  73. package/esm5/i18n/translation.loader.js +0 -68
  74. package/esm5/main.js +0 -41
  75. package/esm5/public-api.js +0 -12
  76. package/esm5/vcd-sdk.js +0 -10
  77. package/fesm2015/vcd-sdk.js +0 -511
  78. package/fesm2015/vcd-sdk.js.map +0 -1
  79. package/fesm5/vcd-sdk.js +0 -620
  80. package/fesm5/vcd-sdk.js.map +0 -1
  81. package/i18n/index.d.ts +0 -3
  82. package/i18n/translate.pipe.d.ts +0 -12
  83. package/i18n/translate.service.d.ts +0 -21
  84. package/i18n/translation.loader.d.ts +0 -11
  85. package/schematics/collection.json +0 -10
  86. package/schematics/ng-add/index.d.ts +0 -3
  87. package/schematics/ng-add/index.js +0 -101
  88. package/schematics/ng-add/index.ts +0 -134
  89. package/schematics/ng-add/schema.d.ts +0 -8
  90. package/schematics/ng-add/schema.json +0 -19
  91. package/vcd-sdk.d.ts +0 -5
  92. package/vcd-sdk.metadata.json +0 -1
@@ -1,511 +0,0 @@
1
- import { HttpClient, HttpClientModule } from '@angular/common/http';
2
- import { InjectionToken, Injectable, Inject, Pipe, ChangeDetectorRef, NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { RequestHeadersInterceptor, LoggingInterceptor, ResponseNormalizationInterceptor, VcdHttpClient, VcdApiClient } from '@vcd/angular-client';
5
- export { ApiResult, ApiResultService, Filter, HATEOAS_HEADER, LinkRelType, LoggingInterceptor, MAX_CHUNK_RETRY_COUNT, MAX_CHUNK_SIZE, Query, RequestHeadersInterceptor, ResponseNormalizationInterceptor, TRANSFER_LINK_REL, TransferError, VcdApiClient, VcdHttpClient, VcdTransferClient, client, parseHeaderHateoasLinks, query } from '@vcd/angular-client';
6
- import { of, Observable } from 'rxjs';
7
- import { share, take } from 'rxjs/operators';
8
-
9
- /**
10
- * @fileoverview added by tsickle
11
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12
- */
13
- // Bind straight into the hooks provided by the container.
14
- if (!((/** @type {?} */ (window))).System || !((/** @type {?} */ (window))).System.registry || !((/** @type {?} */ (window))).System.registry.get) {
15
- throw new Error('SystemJS registry not found');
16
- }
17
- /** @type {?} */
18
- let containerHooks = ((/** @type {?} */ (window))).System.registry.get('@vcd/common');
19
- if (!containerHooks) {
20
- containerHooks = ((/** @type {?} */ (window))).System.registry.get('@vcd-ui/common');
21
- }
22
- if (!containerHooks) {
23
- throw new Error('VCD UI container hooks not present in SystemJS registry');
24
- }
25
- /**
26
- * Wire in as a string. Gives the root URL for API access (for example, the load balancer URL
27
- * or the single-cell URL).
28
- * @type {?}
29
- */
30
- const API_ROOT_URL = containerHooks.API_ROOT_URL;
31
- /**
32
- * Wire in as a string. Gives the root URL for the legacy Flex application.
33
- * @type {?}
34
- */
35
- const FLEX_APP_URL = containerHooks.API_ROOT_URL;
36
- /**
37
- * Wire in as a string. Gives the current scope of the VCD-UI. As of current, this will be
38
- * either 'tenant' for the tenant portal, or 'service-provider' for the service-provider portal.
39
- * @type {?}
40
- */
41
- const SESSION_SCOPE = containerHooks.SESSION_SCOPE;
42
- /**
43
- * Wire in as a string. Gives the unique name (not the display name) of the current tenant
44
- * organization that the VCD-UI is being used for.
45
- * @type {?}
46
- */
47
- const SESSION_ORGANIZATION = containerHooks.SESSION_ORGANIZATION;
48
- /**
49
- * Wire in as a string. Gives the UUID identifier of the current tenant
50
- * organization that the VCD-UI is being used for.
51
- * @type {?}
52
- */
53
- const SESSION_ORG_ID = containerHooks.SESSION_ORG_ID ? containerHooks.SESSION_ORG_ID : '';
54
- /**
55
- * Wire in as a string. Gives the full root path for module assets (e.g. images, scripts, text files)
56
- *
57
- * ATTENTION!
58
- * Add || new InjectionToken to workaround the Angular security mechanics which prevent use of injection tokens
59
- * which potentially are not defiend. The same fix can be applied for the rest tokens if needed.
60
- * @type {?}
61
- */
62
- const EXTENSION_ASSET_URL = containerHooks.EXTENSION_ASSET_URL || new InjectionToken('EXTENSION_ASSET_URL');
63
- /**
64
- * Wire in as a string. Gives the Angular 2 route that the module is registered under.
65
- * @type {?}
66
- */
67
- const EXTENSION_ROUTE = containerHooks.EXTENSION_ROUTE;
68
- /**
69
- * Wire in as a boolean. True if running under the SDK, false if running in production.
70
- * @type {?}
71
- */
72
- const SDK_MODE = containerHooks.SDK_MODE;
73
- // WARNING: interface has both a type and a value, skipping emit
74
- /** @type {?} */
75
- const ExtensionNavRegistrationAction = containerHooks.ExtensionNavRegistrationAction;
76
- // WARNING: interface has both a type and a value, skipping emit
77
- /** @type {?} */
78
- const AuthTokenHolderService = containerHooks.AuthTokenHolderService;
79
- /**
80
- * Every component referenced by an entity action extension point must inherit from this.
81
- * @abstract
82
- */
83
- // tslint:disable-next-line:class-name
84
- class _EntityActionExtensionComponent {
85
- }
86
- /** @type {?} */
87
- const EntityActionExtensionComponent = containerHooks.EntityActionExtensionComponent;
88
- // tslint:disable-next-line:class-name
89
- /**
90
- * @abstract
91
- * @template P, R, E
92
- */
93
- class _WizardExtensionComponent {
94
- }
95
- /** @type {?} */
96
- const WizardExtensionComponent = containerHooks.WizardExtensionComponent;
97
- // tslint:disable-next-line:class-name
98
- /**
99
- * @abstract
100
- * @template P, R, E
101
- */
102
- class _WizardExtensionWithValidationComponent extends _WizardExtensionComponent {
103
- }
104
- // tslint:disable-next-line:max-line-length
105
- /** @type {?} */
106
- const WizardExtensionWithValidationComponent = containerHooks.WizardExtensionWithValidationComponent;
107
-
108
- /**
109
- * @fileoverview added by tsickle
110
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
111
- */
112
-
113
- var index = /*#__PURE__*/Object.freeze({
114
- __proto__: null,
115
- API_ROOT_URL: API_ROOT_URL,
116
- FLEX_APP_URL: FLEX_APP_URL,
117
- SESSION_SCOPE: SESSION_SCOPE,
118
- SESSION_ORGANIZATION: SESSION_ORGANIZATION,
119
- SESSION_ORG_ID: SESSION_ORG_ID,
120
- EXTENSION_ASSET_URL: EXTENSION_ASSET_URL,
121
- EXTENSION_ROUTE: EXTENSION_ROUTE,
122
- SDK_MODE: SDK_MODE,
123
- ExtensionNavRegistrationAction: ExtensionNavRegistrationAction,
124
- AuthTokenHolderService: AuthTokenHolderService,
125
- _EntityActionExtensionComponent: _EntityActionExtensionComponent,
126
- EntityActionExtensionComponent: EntityActionExtensionComponent,
127
- _WizardExtensionComponent: _WizardExtensionComponent,
128
- WizardExtensionComponent: WizardExtensionComponent,
129
- _WizardExtensionWithValidationComponent: _WizardExtensionWithValidationComponent,
130
- WizardExtensionWithValidationComponent: WizardExtensionWithValidationComponent
131
- });
132
-
133
- /**
134
- * @fileoverview added by tsickle
135
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
136
- */
137
- class PluginModule {
138
- /**
139
- * @param {?} appStore
140
- * @param {?=} translate
141
- */
142
- constructor(appStore, translate) {
143
- this.appStore = appStore;
144
- if (translate) {
145
- this.translate = translate;
146
- this.translate.prepareTranslations(this.getSupportedLanguages(), this.getDefaultLanguage());
147
- }
148
- }
149
- /**
150
- * @protected
151
- * @param {?} extension
152
- * @return {?}
153
- */
154
- registerExtension(extension) {
155
- this.appStore.dispatch(new ExtensionNavRegistrationAction(extension));
156
- }
157
- /**
158
- * @protected
159
- * @return {?}
160
- */
161
- getDefaultLanguage() {
162
- return 'en';
163
- }
164
- /**
165
- * @protected
166
- * @return {?}
167
- */
168
- getSupportedLanguages() {
169
- return ['en'];
170
- }
171
- }
172
-
173
- /**
174
- * @fileoverview added by tsickle
175
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
176
- */
177
-
178
- var index$1 = /*#__PURE__*/Object.freeze({
179
- __proto__: null,
180
- PluginModule: PluginModule
181
- });
182
-
183
- /**
184
- * @fileoverview added by tsickle
185
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
186
- */
187
- class TranslationLoader {
188
- /**
189
- * @param {?} http
190
- * @param {?} assetUrl
191
- */
192
- constructor(http, assetUrl) {
193
- this.http = http;
194
- this.assetUrl = assetUrl;
195
- }
196
- /**
197
- * @param {?} language
198
- * @return {?}
199
- */
200
- getTranslation(language) {
201
- return this.http.get(`${this.assetUrl}${TranslationLoader.PREFIX}${language}${TranslationLoader.SUFFIX}`);
202
- }
203
- /**
204
- * @return {?}
205
- */
206
- getCombinedTranslation() {
207
- return this.http.get(`${this.assetUrl}/../i18n${TranslationLoader.SUFFIX}`);
208
- }
209
- }
210
- TranslationLoader.PREFIX = '/i18n/';
211
- TranslationLoader.SUFFIX = '.json';
212
- TranslationLoader.decorators = [
213
- { type: Injectable }
214
- ];
215
- /** @nocollapse */
216
- TranslationLoader.ctorParameters = () => [
217
- { type: HttpClient },
218
- { type: String, decorators: [{ type: Inject, args: [EXTENSION_ASSET_URL,] }] }
219
- ];
220
-
221
- /**
222
- * @fileoverview added by tsickle
223
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
224
- */
225
- class TranslateService {
226
- /**
227
- * @param {?} loader
228
- */
229
- constructor(loader) {
230
- this.loader = loader;
231
- this.pending = false;
232
- this.translations = {};
233
- this._combinedTranslations = true;
234
- this._supportedLanguages = [];
235
- this._defaultLanguage = '';
236
- }
237
- /**
238
- * @return {?}
239
- */
240
- get combinedTranslations() {
241
- return this._combinedTranslations;
242
- }
243
- /**
244
- * @param {?} _combinedTranslations
245
- * @return {?}
246
- */
247
- set combinedTranslations(_combinedTranslations) {
248
- this._combinedTranslations = _combinedTranslations;
249
- }
250
- /**
251
- * @return {?}
252
- */
253
- get supportedLanguages() {
254
- return this._supportedLanguages;
255
- }
256
- /**
257
- * @param {?} _supportedLanguages
258
- * @return {?}
259
- */
260
- set supportedLanguages(_supportedLanguages) {
261
- this._supportedLanguages = _supportedLanguages;
262
- }
263
- /**
264
- * @return {?}
265
- */
266
- get defaultLanguage() {
267
- return this._defaultLanguage;
268
- }
269
- /**
270
- * @param {?} _defaultLanguage
271
- * @return {?}
272
- */
273
- set defaultLanguage(_defaultLanguage) {
274
- this._defaultLanguage = _defaultLanguage;
275
- }
276
- /**
277
- * @param {?} supportedLanguages
278
- * @param {?} defaultLanguage
279
- * @return {?}
280
- */
281
- prepareTranslations(supportedLanguages, defaultLanguage) {
282
- this._supportedLanguages = supportedLanguages;
283
- this._defaultLanguage = defaultLanguage;
284
- this._selectedLanguage = this.getBestMatchSupportedLanguage(navigator.language);
285
- this.getTranslation(this._selectedLanguage);
286
- }
287
- /**
288
- * @private
289
- * @param {?} requestedLanguage
290
- * @return {?}
291
- */
292
- getBestMatchSupportedLanguage(requestedLanguage) {
293
- if (this._supportedLanguages.indexOf(requestedLanguage) > -1) {
294
- return requestedLanguage;
295
- }
296
- /** @type {?} */
297
- const altLanguage = requestedLanguage.split('-')[0];
298
- if (altLanguage === requestedLanguage) {
299
- return this._defaultLanguage;
300
- }
301
- return (this._supportedLanguages.indexOf(altLanguage) > -1) ? altLanguage : this._defaultLanguage;
302
- }
303
- /**
304
- * @param {?} language
305
- * @return {?}
306
- */
307
- getTranslation(language) {
308
- this.pending = true;
309
- this.translation$ = this._combinedTranslations ?
310
- this.loader.getCombinedTranslation() : this.loader.getTranslation(language).pipe(share());
311
- this.translation$.pipe(take(1)).subscribe((/**
312
- * @param {?} result
313
- * @return {?}
314
- */
315
- result => {
316
- this.translations = result;
317
- this.pending = false;
318
- }), (/**
319
- * @param {?} error
320
- * @return {?}
321
- */
322
- error => {
323
- this.pending = false;
324
- }));
325
- return this.translation$;
326
- }
327
- /**
328
- * @private
329
- * @param {?} key
330
- * @param {...?} args
331
- * @return {?}
332
- */
333
- getParsedResult(key, ...args) {
334
- /** @type {?} */
335
- let result = (this._combinedTranslations && this.translations[this._selectedLanguage]) ?
336
- this.translations[this._selectedLanguage][key] : this.translations[key];
337
- if (Array.isArray(result)) {
338
- result = result.join('');
339
- }
340
- return !result ? `#${key}#` : result.replace(/{([0-9]+)}/g, (/**
341
- * @param {?} _
342
- * @param {...?} n
343
- * @return {?}
344
- */
345
- (_, ...n) => {
346
- // tslint:disable-next-line: radix
347
- /** @type {?} */
348
- const idx = parseInt(n[0]);
349
- if (args && typeof args[idx] !== 'undefined') {
350
- return args[idx];
351
- }
352
- return '';
353
- }));
354
- }
355
- /**
356
- * @param {?} key
357
- * @param {...?} args
358
- * @return {?}
359
- */
360
- get(key, ...args) {
361
- if (!this.pending) {
362
- return of(this.getParsedResult(key, ...args));
363
- }
364
- // tslint:disable-next-line: deprecation
365
- return Observable.create((/**
366
- * @param {?} observer
367
- * @return {?}
368
- */
369
- (observer) => {
370
- /** @type {?} */
371
- const onComplete = (/**
372
- * @param {?} result
373
- * @return {?}
374
- */
375
- (result) => {
376
- observer.next(result);
377
- observer.complete();
378
- });
379
- /** @type {?} */
380
- const onError = (/**
381
- * @param {?} error
382
- * @return {?}
383
- */
384
- (error) => {
385
- observer.error(error);
386
- });
387
- this.translation$.subscribe((/**
388
- * @param {?} result
389
- * @return {?}
390
- */
391
- result => {
392
- result = this.getParsedResult(key, ...args);
393
- onComplete(result);
394
- }), onError);
395
- }));
396
- }
397
- }
398
- TranslateService.decorators = [
399
- { type: Injectable }
400
- ];
401
- /** @nocollapse */
402
- TranslateService.ctorParameters = () => [
403
- { type: TranslationLoader }
404
- ];
405
-
406
- /**
407
- * @fileoverview added by tsickle
408
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
409
- */
410
- class TranslatePipe {
411
- /**
412
- * @param {?} translate
413
- * @param {?} changeDetector
414
- */
415
- constructor(translate, changeDetector) {
416
- this.translate = translate;
417
- this.changeDetector = changeDetector;
418
- this.value = '';
419
- this.lastKey = '';
420
- this.lastArgs = [];
421
- }
422
- /**
423
- * @param {?} key
424
- * @param {...?} args
425
- * @return {?}
426
- */
427
- transform(key, ...args) {
428
- if (!key || key.length === 0) {
429
- return key;
430
- }
431
- if (key === this.lastKey && args === this.lastArgs) {
432
- return this.value;
433
- }
434
- this.lastKey = key;
435
- this.lastArgs = args;
436
- this.updateValue(key, args);
437
- return this.value;
438
- }
439
- /**
440
- * @private
441
- * @param {?} key
442
- * @param {?} args
443
- * @return {?}
444
- */
445
- updateValue(key, args) {
446
- this.translate.get(key, ...args).subscribe((/**
447
- * @param {?} result
448
- * @return {?}
449
- */
450
- result => {
451
- this.value = result;
452
- this.changeDetector.markForCheck();
453
- }));
454
- }
455
- }
456
- TranslatePipe.decorators = [
457
- { type: Injectable },
458
- { type: Pipe, args: [{
459
- name: 'translate',
460
- pure: false
461
- },] }
462
- ];
463
- /** @nocollapse */
464
- TranslatePipe.ctorParameters = () => [
465
- { type: TranslateService },
466
- { type: ChangeDetectorRef }
467
- ];
468
-
469
- /**
470
- * @fileoverview added by tsickle
471
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
472
- */
473
-
474
- var index$2 = /*#__PURE__*/Object.freeze({
475
- __proto__: null,
476
- TranslatePipe: TranslatePipe,
477
- TranslateService: TranslateService,
478
- TranslationLoader: TranslationLoader
479
- });
480
-
481
- /**
482
- * @fileoverview added by tsickle
483
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
484
- */
485
- /**
486
- * Extensions should import this module. They can then wire in SDK components as desired.
487
- */
488
- class VcdSdkModule {
489
- }
490
- VcdSdkModule.decorators = [
491
- { type: NgModule, args: [{
492
- imports: [
493
- HttpClientModule,
494
- CommonModule,
495
- ],
496
- declarations: [TranslatePipe],
497
- exports: [TranslatePipe],
498
- providers: [
499
- TranslateService,
500
- TranslationLoader,
501
- RequestHeadersInterceptor,
502
- LoggingInterceptor,
503
- ResponseNormalizationInterceptor,
504
- VcdHttpClient,
505
- VcdApiClient,
506
- ]
507
- },] }
508
- ];
509
-
510
- export { API_ROOT_URL, AuthTokenHolderService, EXTENSION_ASSET_URL, EXTENSION_ROUTE, EntityActionExtensionComponent, ExtensionNavRegistrationAction, FLEX_APP_URL, PluginModule, SDK_MODE, SESSION_ORGANIZATION, SESSION_ORG_ID, SESSION_SCOPE, VcdSdkModule, WizardExtensionComponent, WizardExtensionWithValidationComponent, _EntityActionExtensionComponent, _WizardExtensionComponent, _WizardExtensionWithValidationComponent, index as common, index$1 as core, index$2 as i18n, TranslatePipe as ɵa, TranslateService as ɵb, TranslationLoader as ɵc };
511
- //# sourceMappingURL=vcd-sdk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vcd-sdk.js","sources":["ng://@vcd/sdk/common/container-hooks.ts","ng://@vcd/sdk/core/plugin.module.ts","ng://@vcd/sdk/i18n/translation.loader.ts","ng://@vcd/sdk/i18n/translate.service.ts","ng://@vcd/sdk/i18n/translate.pipe.ts","ng://@vcd/sdk/main.ts"],"sourcesContent":["/**\n * This is the currently supported - albeit very minimal - public SDK.\n */\nimport {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n// Bind straight into the hooks provided by the container.\nif (!(window as any).System || !(window as any).System.registry || !(window as any).System.registry.get) {\n throw new Error('SystemJS registry not found');\n}\n\nlet containerHooks: any = (window as any).System.registry.get('@vcd/common');\nif (!containerHooks) {\n containerHooks = (window as any).System.registry.get('@vcd-ui/common');\n}\n\nif (!containerHooks) {\n throw new Error('VCD UI container hooks not present in SystemJS registry');\n}\n\n/**\n * Wire in as a string. Gives the root URL for API access (for example, the load balancer URL\n * or the single-cell URL).\n */\nexport const API_ROOT_URL: InjectionToken<string> = containerHooks.API_ROOT_URL;\n\n/**\n * Wire in as a string. Gives the root URL for the legacy Flex application.\n */\nexport const FLEX_APP_URL: InjectionToken<string> = containerHooks.API_ROOT_URL;\n\n/**\n * Wire in as a string. Gives the current scope of the VCD-UI. As of current, this will be\n * either 'tenant' for the tenant portal, or 'service-provider' for the service-provider portal.\n */\nexport const SESSION_SCOPE: InjectionToken<string> = containerHooks.SESSION_SCOPE;\n\n/**\n * Wire in as a string. Gives the unique name (not the display name) of the current tenant\n * organization that the VCD-UI is being used for.\n */\nexport const SESSION_ORGANIZATION: InjectionToken<string> = containerHooks.SESSION_ORGANIZATION;\n\n/**\n * Wire in as a string. Gives the UUID identifier of the current tenant\n * organization that the VCD-UI is being used for.\n */\nexport const SESSION_ORG_ID: InjectionToken<string> = containerHooks.SESSION_ORG_ID ? containerHooks.SESSION_ORG_ID : '';\n\n/**\n * Wire in as a string. Gives the full root path for module assets (e.g. images, scripts, text files)\n *\n * ATTENTION!\n * Add || new InjectionToken to workaround the Angular security mechanics which prevent use of injection tokens\n * which potentially are not defiend. The same fix can be applied for the rest tokens if needed.\n */\nexport const EXTENSION_ASSET_URL: InjectionToken<string> = containerHooks.EXTENSION_ASSET_URL || new InjectionToken('EXTENSION_ASSET_URL');\n\n/**\n * Wire in as a string. Gives the Angular 2 route that the module is registered under.\n */\nexport const EXTENSION_ROUTE: InjectionToken<string> = containerHooks.EXTENSION_ROUTE;\n\n/**\n * Wire in as a boolean. True if running under the SDK, false if running in production.\n */\nexport const SDK_MODE: InjectionToken<boolean> = containerHooks.SDK_MODE;\n\n/**\n * Payload for registering a navigation menu entry.\n */\nexport interface ExtensionNavRegistration {\n /**\n * The router path to navigate to when selected.\n */\n path: string;\n\n /**\n * i18 key for name of extension, to be used as text for links\n */\n nameCode: string;\n\n /**\n * i18n key for description of extension, to be used on hover for links\n */\n descriptionCode: string;\n}\n\n/**\n * Dispatch this to the redux store to register a navigation menu.\n */\nexport interface ExtensionNavRegistrationAction {\n payload: ExtensionNavRegistration;\n readonly type: string;\n}\n\nexport type ExtensionNavRegistrationActionCtor = new(payload: ExtensionNavRegistration) => ExtensionNavRegistrationAction;\n\nexport const ExtensionNavRegistrationAction: ExtensionNavRegistrationActionCtor = containerHooks.ExtensionNavRegistrationAction;\n\n/**\n * Inject this to access the authentication token.\n */\nexport interface AuthTokenHolderService {\n /**\n * The authentication token.\n */\n token: string;\n}\n\nexport const AuthTokenHolderService: {token: string} = containerHooks.AuthTokenHolderService;\n\n/**\n * This represents a menu item that can be clicked to perform an action on an entity (e.g. VM).\n */\nexport interface EntityActionExtensionMenuItem {\n /**\n * This is a unique URN identifying the action. This is so the component can be notified which action was requested.\n */\n urn: string;\n\n /**\n * This is the label for the menu item. It is not automatically translated.\n */\n text: string;\n\n /**\n * This is the enabled state for the menu item.\n */\n enabled: boolean;\n\n /**\n * This is the busy state for the menu item.\n */\n busy: boolean;\n}\n\n/**\n * This represents a sub-menu that contains other sub-menus or menu actions.\n */\nexport interface EntityActionExtensionSubmenu {\n /**\n * This is the label for the sub-menu. It is not automatically translated.\n */\n text: string;\n\n /**\n * This is an arbitrary, ordered list of EntityActionMenuItem.\n */\n children: EntityActionExtensionMenuItem[];\n}\n\n/**\n * This represents menu information for an entity action.\n */\nexport type EntityActionExtensionMenuEntry = EntityActionExtensionMenuItem | EntityActionExtensionSubmenu;\n\n/**\n * Every component referenced by an entity action extension point must inherit from this.\n */\n// tslint:disable-next-line:class-name\nexport abstract class _EntityActionExtensionComponent {\n /**\n * This returns is an Observable that defines the menu entry for this component. This is actively bound -\n * the component is able to change it in order to have the menu change (for example, to change busy\n * or enabled states).\n */\n abstract getMenuEntry(entityUrn: string): Observable<EntityActionExtensionMenuEntry>;\n\n /**\n * This field is a method that is called if a menu item is clicked while enabled. It will be called with the menu\n * item's URN and the URN of the entity that the action is being called for (e.g. the URN of the VM being edited).\n * It must return a single-shot (e.g. of, fromPromise or .first) Observable on completion. This Observable returns\n * a single value, refreshRequested. If this is true, the entity being edited will be immediately refreshed.\n * @param menuItemUrn the URN of the clicked menu item\n * @param entityUrnThe URN of the entity that the action is being called for\n */\n abstract performAction(menuItemUrn: string, entityUrn: string): Observable<{ refreshRequested: boolean }>;\n}\nexport const EntityActionExtensionComponent: typeof _EntityActionExtensionComponent = containerHooks.EntityActionExtensionComponent;\n\n// tslint:disable-next-line:class-name\nexport abstract class _WizardExtensionComponent<P, R, E> {\n /**\n * Define method which will be executed by the Extension Point Orchestrator,\n * when certain event is triggered.\n * @param payload - the payload of the request triggered by the Core UI.\n * @param response - the response from the request triggered by the Core UI.\n * @param error - the Core UI will reprot any error that may appear during execution.\n */\n abstract performAction(payload: P, response: R, error: E): void;\n}\n\nexport const WizardExtensionComponent: typeof _WizardExtensionComponent = containerHooks.WizardExtensionComponent;\n\nexport interface WizardExtensionState {\n isValid: boolean;\n}\n\n// tslint:disable-next-line:class-name\nexport abstract class _WizardExtensionWithValidationComponent<P, R, E> extends _WizardExtensionComponent<P, R, E> {\n /**\n * Get extension point state.\n */\n abstract getState(): Observable<WizardExtensionState>;\n}\n\n// tslint:disable-next-line:max-line-length\nexport const WizardExtensionWithValidationComponent: typeof _WizardExtensionWithValidationComponent = containerHooks.WizardExtensionWithValidationComponent;\n","import { Store } from '@ngrx/store';\nimport { ExtensionNavRegistration, ExtensionNavRegistrationAction } from '../common';\nimport { TranslateService } from '../i18n';\n\nexport class PluginModule {\n private translate: TranslateService;\n\n constructor(private appStore: Store<any>, translate?: TranslateService) {\n if (translate) {\n this.translate = translate;\n this.translate.prepareTranslations(this.getSupportedLanguages(), this.getDefaultLanguage());\n }\n }\n\n protected registerExtension(extension: ExtensionNavRegistration): void {\n this.appStore.dispatch(new ExtensionNavRegistrationAction(extension));\n }\n\n protected getDefaultLanguage(): string {\n return 'en';\n }\n\n protected getSupportedLanguages(): string[] {\n return ['en'];\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\nimport { EXTENSION_ASSET_URL } from '../common/container-hooks';\nimport { catchError } from 'rxjs/operators';\n\n@Injectable()\nexport class TranslationLoader {\n private static PREFIX = '/i18n/';\n private static SUFFIX = '.json';\n\n constructor(private http: HttpClient, @Inject(EXTENSION_ASSET_URL) private assetUrl: string) { }\n\n public getTranslation(language: string): Observable<any> {\n return this.http.get(`${this.assetUrl}${TranslationLoader.PREFIX}${language}${TranslationLoader.SUFFIX}`);\n }\n\n public getCombinedTranslation(): Observable<any> {\n return this.http.get(`${this.assetUrl}/../i18n${TranslationLoader.SUFFIX}`);\n }\n}\n","// tslint:disable: variable-name\nimport { TranslationLoader } from './translation.loader';\nimport { Observable, Observer, of } from 'rxjs';\nimport { share, take } from 'rxjs/operators';\nimport { Inject, LOCALE_ID, Injectable } from '@angular/core';\n\n@Injectable()\nexport class TranslateService {\n private translation$: Observable<any>;\n private pending = false;\n public translations: any = {};\n\n private _combinedTranslations = true;\n public get combinedTranslations(): boolean {\n return this._combinedTranslations;\n }\n public set combinedTranslations(_combinedTranslations: boolean) {\n this._combinedTranslations = _combinedTranslations;\n }\n\n private _selectedLanguage: string;\n\n private _supportedLanguages: string[] = [];\n public get supportedLanguages(): string[] {\n return this._supportedLanguages;\n }\n public set supportedLanguages(_supportedLanguages: string[]) {\n this._supportedLanguages = _supportedLanguages;\n }\n\n private _defaultLanguage = '';\n public get defaultLanguage(): string {\n return this._defaultLanguage;\n }\n public set defaultLanguage(_defaultLanguage: string) {\n this._defaultLanguage = _defaultLanguage;\n }\n\n constructor(private loader: TranslationLoader) {}\n\n public prepareTranslations(supportedLanguages: string[], defaultLanguage: string): void {\n this._supportedLanguages = supportedLanguages;\n this._defaultLanguage = defaultLanguage;\n\n this._selectedLanguage = this.getBestMatchSupportedLanguage(navigator.language);\n this.getTranslation(this._selectedLanguage);\n }\n\n private getBestMatchSupportedLanguage(requestedLanguage: string): string {\n if (this._supportedLanguages.indexOf(requestedLanguage) > -1) {\n return requestedLanguage;\n }\n\n const altLanguage: string = requestedLanguage.split('-')[0];\n if (altLanguage === requestedLanguage) {\n return this._defaultLanguage;\n }\n\n return (this._supportedLanguages.indexOf(altLanguage) > -1) ? altLanguage : this._defaultLanguage;\n }\n\n public getTranslation(language: string): Observable<any> {\n this.pending = true;\n this.translation$ = this._combinedTranslations ?\n this.loader.getCombinedTranslation() : this.loader.getTranslation(language).pipe(share());\n\n this.translation$.pipe(take(1)).subscribe(result => {\n this.translations = result;\n this.pending = false;\n }, error => {\n this.pending = false;\n });\n\n return this.translation$;\n }\n\n private getParsedResult(key: string, ...args: any[]): string {\n let result = (this._combinedTranslations && this.translations[this._selectedLanguage]) ?\n this.translations[this._selectedLanguage][key] : this.translations[key];\n if (Array.isArray(result)) {\n result = result.join('');\n }\n\n return !result ? `#${key}#` : result.replace(/{([0-9]+)}/g, (_, ...n) => {\n // tslint:disable-next-line: radix\n const idx = parseInt(n[0]);\n if (args && typeof args[idx] !== 'undefined') {\n return args[idx];\n }\n\n return '';\n });\n }\n\n public get(key: string, ...args: any[]): Observable<string | any> {\n if (!this.pending) {\n return of(this.getParsedResult(key, ...args));\n }\n\n // tslint:disable-next-line: deprecation\n return Observable.create((observer: Observer<string>) => {\n const onComplete = (result: string) => {\n observer.next(result);\n observer.complete();\n };\n const onError = (error: any) => {\n observer.error(error);\n };\n this.translation$.subscribe(result => {\n result = this.getParsedResult(key, ...args);\n onComplete(result);\n }, onError);\n });\n }\n}\n","import { Injectable, PipeTransform, Pipe, ChangeDetectorRef } from '@angular/core';\nimport { TranslateService } from './translate.service';\n\n@Injectable()\n@Pipe({\n name: 'translate',\n pure: false\n})\nexport class TranslatePipe implements PipeTransform {\n private value = '';\n private lastKey = '';\n private lastArgs: any[] = [];\n\n constructor(private translate: TranslateService, private changeDetector: ChangeDetectorRef) { }\n\n transform(key: string, ...args: any[]): any {\n if (!key || key.length === 0) {\n return key;\n }\n\n if (key === this.lastKey && args === this.lastArgs) {\n return this.value;\n }\n\n this.lastKey = key;\n this.lastArgs = args;\n this.updateValue(key, args);\n\n return this.value;\n }\n\n private updateValue(key: string, args: any[]): void {\n this.translate.get(key, ...args).subscribe(result => {\n this.value = result;\n this.changeDetector.markForCheck();\n });\n }\n}\n","import {HttpClientModule} from '@angular/common/http';\nimport {NgModule } from '@angular/core';\nimport {CommonModule } from '@angular/common';\n\nimport * as client from '@vcd/angular-client';\nimport * as common from './common';\nimport * as core from './core';\nimport * as i18n from './i18n';\n\nexport {\n common,\n core,\n i18n,\n};\n\n/**\n * Extensions should import this module. They can then wire in SDK components as desired.\n */\n@NgModule({\n imports: [\n HttpClientModule,\n CommonModule,\n ],\n declarations: [i18n.TranslatePipe],\n exports: [i18n.TranslatePipe],\n providers: [\n i18n.TranslateService,\n i18n.TranslationLoader,\n client.RequestHeadersInterceptor,\n client.LoggingInterceptor,\n client.ResponseNormalizationInterceptor,\n client.VcdHttpClient,\n client.VcdApiClient,\n ]\n})\nexport class VcdSdkModule {\n}\n"],"names":["i18n.TranslatePipe","i18n.TranslateService","i18n.TranslationLoader","client.RequestHeadersInterceptor","client.LoggingInterceptor","client.ResponseNormalizationInterceptor","client.VcdHttpClient","client.VcdApiClient"],"mappings":";;;;;;;;;;;;;AAOA,IAAI,CAAC,oBAAC,MAAM,IAAS,MAAM,IAAI,CAAC,oBAAC,MAAM,IAAS,MAAM,CAAC,QAAQ,IAAI,CAAC,oBAAC,MAAM,IAAS,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE;IACrG,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;CAClD;;IAEG,cAAc,GAAQ,oBAAC,MAAM,IAAS,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;AAC5E,IAAI,CAAC,cAAc,EAAE;IACjB,cAAc,GAAG,oBAAC,MAAM,IAAS,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC1E;AAED,IAAI,CAAC,cAAc,EAAE;IACjB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;CAC9E;;;;;;MAMY,YAAY,GAA2B,cAAc,CAAC;;;;;MAKtD,YAAY,GAA2B,cAAc,CAAC;;;;;;MAMtD,aAAa,GAA2B,cAAc,CAAC;;;;;;MAMvD,oBAAoB,GAA2B,cAAc,CAAC;;;;;;MAM9D,cAAc,GAA2B,cAAc,CAAC,cAAc,GAAG,cAAc,CAAC,cAAc,GAAG;;;;;;;;;MASzG,mBAAmB,GAA2B,cAAc,CAAC,mBAAmB,IAAI,IAAI,cAAc,CAAC,qBAAqB;;;;;MAK5H,eAAe,GAA2B,cAAc,CAAC;;;;;MAKzD,QAAQ,GAA4B,cAAc,CAAC;;;M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