@veloceapps/sdk 2.0.10 → 2.0.11

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.
@@ -427,8 +427,14 @@
427
427
  if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
428
428
  variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
429
429
  }
430
+ var isAbsolute = !segments[0];
431
+ var nonEmptySegments = segments.filter(Boolean);
432
+ if (!isAbsolute && nonEmptySegments[0] === '.') {
433
+ nonEmptySegments.shift();
434
+ }
430
435
  return {
431
- segments: segments,
436
+ isAbsolute: isAbsolute,
437
+ segments: nonEmptySegments,
432
438
  module: module,
433
439
  variable: variable,
434
440
  };
@@ -457,16 +463,15 @@
457
463
  return;
458
464
  };
459
465
  var getAbsolutePath = function (elements, subject, path) {
460
- var _a, _b, _c, _d;
466
+ var _a, _b, _c;
461
467
  if (path.module) {
462
468
  return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
463
469
  }
464
470
  var subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
465
- var isRelativePath = ((_d = path.segments[0]) === null || _d === void 0 ? void 0 : _d[0]) === '.';
466
- if (!isRelativePath) {
467
- return path.segments.join('/');
468
- }
469
471
  var segments = __spreadArray([], __read(path.segments));
472
+ if (path.isAbsolute) {
473
+ return segments.join('/');
474
+ }
470
475
  while (segments.length) {
471
476
  var segment = segments.shift();
472
477
  if (segment === '..') {
@@ -545,12 +550,18 @@
545
550
  return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
546
551
  };
547
552
  IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
553
+ var _this = this;
548
554
  if (!this.inputs[path]) {
549
555
  this.inputs[path] = {};
550
556
  }
557
+ var subjectAlreadyExists = Boolean(this.inputs[path][name]);
551
558
  if (!this.inputs[path][name]) {
552
559
  this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new rxjs.BehaviorSubject(undefined);
553
560
  }
561
+ if (subject && subjectAlreadyExists) {
562
+ // push delayed value to workaround 'changed after it was checked' issue
563
+ setTimeout(function () { return _this.inputs[path][name].next(subject.value); });
564
+ }
554
565
  return this.inputs[path][name];
555
566
  };
556
567
  return IOProviderService;
@@ -1976,7 +1987,7 @@
1976
1987
  return PreviewComponent;
1977
1988
  }());
1978
1989
  PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i2__namespace.MessageService }, { token: ConfigurationRuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1979
- PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, providers: [IOProviderService, TemplatesService], ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i5__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1990
+ PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, providers: [IOProviderService, TemplatesService], ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i5__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1980
1991
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1981
1992
  type: i0.Component,
1982
1993
  args: [{