nuxeo-development-framework 5.6.7 → 5.6.9

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.
@@ -3172,7 +3172,8 @@
3172
3172
  return this.dialog.open(options.component, {
3173
3173
  width: (options === null || options === void 0 ? void 0 : options.width) || 'auto',
3174
3174
  height: (options === null || options === void 0 ? void 0 : options.height) || 'auto',
3175
- minWidth: '35%',
3175
+ minWidth: (options === null || options === void 0 ? void 0 : options.height) || '35%',
3176
+ maxWidth: (options === null || options === void 0 ? void 0 : options.maxWidth) || '80vw',
3176
3177
  panelClass: __spreadArray(['ndf-dialog'], __read(__classPrivateFieldGet(this, _NuxeoDialogService_instances, "m", _NuxeoDialogService_getPanelClass).call(this, options === null || options === void 0 ? void 0 : options.panelClass))),
3177
3178
  disableClose: true,
3178
3179
  data: Object.assign({ dialogConfig: {
@@ -12502,7 +12503,6 @@
12502
12503
  return this.userApiService.getUsersSuggestions(term);
12503
12504
  };
12504
12505
  DynamicFormSelectUsersComponent.prototype.constructUserArray = function (data, filterValue) {
12505
- var _this = this;
12506
12506
  var ConstructedData;
12507
12507
  // if not using arabic name then construct full name here
12508
12508
  if (!this.useArabicName) {
@@ -12511,17 +12511,22 @@
12511
12511
  ConstructedData = this.filterUsers(data, filterValue);
12512
12512
  // Due to not using bindValue, we need to hold the selected value as the full user object, not just the username
12513
12513
  if (this.writedValue) {
12514
- var selected = void 0;
12515
- if (this.multiple) {
12516
- selected = ConstructedData.filter(function (user) { return _this.writedValue.includes(user.properties.username); });
12517
- }
12518
- else {
12519
- selected = ConstructedData.filter(function (user) { return user.properties.username === _this.writedValue; })[0];
12520
- }
12521
- this.selection = selected !== null && selected !== void 0 ? selected : this.selection;
12514
+ this.handleWrittedValue(ConstructedData);
12522
12515
  }
12523
12516
  return ConstructedData;
12524
12517
  };
12518
+ DynamicFormSelectUsersComponent.prototype.handleWrittedValue = function (users) {
12519
+ var _this = this;
12520
+ var userId = function (value) {
12521
+ return (typeof (value) === 'string') ? value : value.id;
12522
+ };
12523
+ this.selection = (this.multiple) ? users.filter(function (user) { return _this.writedValue.some(function (value) { return user.properties.username === userId(value); }); })
12524
+ : users.filter(function (user) { return user.properties.username === userId(_this.writedValue); })[0];
12525
+ if (this.selection) {
12526
+ this.writedValue = null;
12527
+ this.emitSelection(this.selection);
12528
+ }
12529
+ };
12525
12530
  DynamicFormSelectUsersComponent.prototype.insertFUllName = function (data) {
12526
12531
  return data.map(function (user) {
12527
12532
  var _a, _b;
@@ -15143,7 +15148,7 @@
15143
15148
  return DynamicColumnComponent;
15144
15149
  }());
15145
15150
  DynamicColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicColumnComponent, deps: [{ token: ExtensionService }, { token: ColumnRendererRegistryService }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
15146
- DynamicColumnComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicColumnComponent, selector: "cts-dynamic-column", inputs: { id: "id", context: "context", column: "column" }, host: { classAttribute: "cts-dynamic-column" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: " <ng-container #content></ng-container> ", isInline: true, styles: ["\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\t\t"], encapsulation: i0__namespace.ViewEncapsulation.None });
15151
+ DynamicColumnComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicColumnComponent, selector: "cts-dynamic-column", inputs: { id: "id", context: "context", column: "column" }, host: { classAttribute: "cts-dynamic-column" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: " <ng-container #content></ng-container> ", isInline: true, styles: ["\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: var(--dynamic-column-align, center);\n\t\t\t\tjustify-content: var(--dynamic-column-justity, flex-start);\n\t\t\t\twidth: var(--dynamic-column-width, 100%);\n\t\t\t\tpadding :var(--dynamic-column-padding, unset);\n\t\t\t}\n\t\t"], encapsulation: i0__namespace.ViewEncapsulation.None });
15147
15152
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicColumnComponent, decorators: [{
15148
15153
  type: i0.Component,
15149
15154
  args: [{
@@ -15152,7 +15157,7 @@
15152
15157
  encapsulation: i0.ViewEncapsulation.None,
15153
15158
  host: { class: 'cts-dynamic-column' },
15154
15159
  styles: [
15155
- "\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\t\t"
15160
+ "\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: var(--dynamic-column-align, center);\n\t\t\t\tjustify-content: var(--dynamic-column-justity, flex-start);\n\t\t\t\twidth: var(--dynamic-column-width, 100%);\n\t\t\t\tpadding :var(--dynamic-column-padding, unset);\n\t\t\t}\n\t\t"
15156
15161
  ]
15157
15162
  }]
15158
15163
  }], ctorParameters: function () { return [{ type: ExtensionService }, { type: ColumnRendererRegistryService }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { content: [{
@@ -22532,18 +22537,15 @@
22532
22537
  this.baseAppUrl = baseAppUrl;
22533
22538
  this.configService = configService;
22534
22539
  this.isFeatureEnabled = false;
22540
+ this.isEnabled = false;
22535
22541
  this.editorConfig = (_a = this.configService.myConfiguration) === null || _a === void 0 ? void 0 : _a.configEditor;
22536
22542
  this.isFeatureEnabled = environment.configEditor === 'YES';
22537
22543
  }
22538
- Object.defineProperty(EditorButtonComponent.prototype, "isEnabled", {
22539
- get: function () {
22540
- var _a, _b, _c, _d;
22541
- return ((_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.enabled) && ((_d = (_c = (_b = this.editorConfig) === null || _b === void 0 ? void 0 : _b.types) === null || _c === void 0 ? void 0 : _c[this.type]) === null || _d === void 0 ? void 0 : _d.enabled);
22542
- },
22543
- enumerable: false,
22544
- configurable: true
22545
- });
22546
- EditorButtonComponent.prototype.ngOnInit = function () { };
22544
+ EditorButtonComponent.prototype.ngOnChanges = function (changes) {
22545
+ var _a, _b, _c, _d;
22546
+ this.typeConfig = (_b = (_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b[this.type];
22547
+ this.isEnabled = this.isFeatureEnabled && ((_c = this.editorConfig) === null || _c === void 0 ? void 0 : _c.enabled) && ((_d = this.typeConfig) === null || _d === void 0 ? void 0 : _d.enabled);
22548
+ };
22547
22549
  EditorButtonComponent.prototype.navigate = function () {
22548
22550
  var _e;
22549
22551
  var _a;
@@ -22566,12 +22568,12 @@
22566
22568
  return EditorButtonComponent;
22567
22569
  }());
22568
22570
  EditorButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorButtonComponent, deps: [{ token: 'environment' }, { token: i1__namespace$5.Router }, { token: PROJECT_BASE_HREF }, { token: AppConfigService }], target: i0__namespace.ɵɵFactoryTarget.Component });
22569
- EditorButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, ngImport: i0__namespace, template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t", isInline: true, components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
22571
+ EditorButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, usesOnChanges: true, ngImport: i0__namespace, template: "\n\t\t<ng-container *ngIf=\"isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: typeConfig?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t", isInline: true, components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
22570
22572
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorButtonComponent, decorators: [{
22571
22573
  type: i0.Component,
22572
22574
  args: [{
22573
22575
  selector: 'app-editor-button',
22574
- template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t"
22576
+ template: "\n\t\t<ng-container *ngIf=\"isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: typeConfig?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t"
22575
22577
  }]
22576
22578
  }], ctorParameters: function () {
22577
22579
  return [{ type: undefined, decorators: [{
@@ -48273,10 +48275,15 @@
48273
48275
  var themeValue = (_a = changes.theme) === null || _a === void 0 ? void 0 : _a.currentValue;
48274
48276
  var optionsValue = (_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue;
48275
48277
  var isThemeFirstChange = (_c = changes === null || changes === void 0 ? void 0 : changes.theme) === null || _c === void 0 ? void 0 : _c.firstChange;
48278
+ var activeTheme = this._optionsSubject.getValue().theme;
48276
48279
  var mergedOptions = ___default["default"].merge(this._defaultEditorOptions, optionsValue || {}, { language: 'json' });
48277
48280
  if (themeValue && isThemeFirstChange) {
48278
48281
  mergedOptions.theme = themeValue;
48279
48282
  }
48283
+ if (!optionsValue && activeTheme && themeValue && activeTheme !== themeValue) {
48284
+ var activeOptions = this._optionsSubject.getValue();
48285
+ this._optionsSubject.next(___default["default"].merge(activeOptions, { theme: themeValue }));
48286
+ }
48280
48287
  if (optionsValue || (themeValue && isThemeFirstChange)) {
48281
48288
  this._optionsSubject.next(___default["default"].cloneDeep(mergedOptions));
48282
48289
  }