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.
- package/bundles/nuxeo-development-framework.umd.js +30 -23
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-select-users/dynamic-form-select-users.component.js +13 -9
- package/esm2015/lib/components/ndf-config-editor/containers/ndf-config-editor/ndf-config-editor.component.js +6 -1
- package/esm2015/lib/components/ndf-config-editor/public/editor-navigate-button.js +11 -10
- package/esm2015/lib/components/tables/table/dynamic-column/dynamic-column.component.js +6 -3
- package/esm2015/lib/shared/components/nuxeo-dialog/models/dialog-option.model.js +1 -1
- package/esm2015/lib/shared/components/nuxeo-dialog/services/nuxeo-dialog.service.js +3 -2
- package/fesm2015/nuxeo-development-framework.js +34 -20
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/dynamic-form/components/dynamic-form-select-users/dynamic-form-select-users.component.d.ts +1 -0
- package/lib/components/ndf-config-editor/public/editor-navigate-button.d.ts +6 -5
- package/lib/shared/components/nuxeo-dialog/models/dialog-option.model.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2395,7 +2395,8 @@ class NuxeoDialogService {
|
|
|
2395
2395
|
return this.dialog.open(options.component, {
|
|
2396
2396
|
width: (options === null || options === void 0 ? void 0 : options.width) || 'auto',
|
|
2397
2397
|
height: (options === null || options === void 0 ? void 0 : options.height) || 'auto',
|
|
2398
|
-
minWidth: '35%',
|
|
2398
|
+
minWidth: (options === null || options === void 0 ? void 0 : options.height) || '35%',
|
|
2399
|
+
maxWidth: (options === null || options === void 0 ? void 0 : options.maxWidth) || '80vw',
|
|
2399
2400
|
panelClass: ['ndf-dialog', ...__classPrivateFieldGet(this, _NuxeoDialogService_instances, "m", _NuxeoDialogService_getPanelClass).call(this, options === null || options === void 0 ? void 0 : options.panelClass)],
|
|
2400
2401
|
disableClose: true,
|
|
2401
2402
|
data: Object.assign({ dialogConfig: {
|
|
@@ -11195,17 +11196,21 @@ class DynamicFormSelectUsersComponent {
|
|
|
11195
11196
|
ConstructedData = this.filterUsers(data, filterValue);
|
|
11196
11197
|
// Due to not using bindValue, we need to hold the selected value as the full user object, not just the username
|
|
11197
11198
|
if (this.writedValue) {
|
|
11198
|
-
|
|
11199
|
-
if (this.multiple) {
|
|
11200
|
-
selected = ConstructedData.filter(user => this.writedValue.includes(user.properties.username));
|
|
11201
|
-
}
|
|
11202
|
-
else {
|
|
11203
|
-
selected = ConstructedData.filter(user => user.properties.username === this.writedValue)[0];
|
|
11204
|
-
}
|
|
11205
|
-
this.selection = selected !== null && selected !== void 0 ? selected : this.selection;
|
|
11199
|
+
this.handleWrittedValue(ConstructedData);
|
|
11206
11200
|
}
|
|
11207
11201
|
return ConstructedData;
|
|
11208
11202
|
}
|
|
11203
|
+
handleWrittedValue(users) {
|
|
11204
|
+
const userId = (value) => {
|
|
11205
|
+
return (typeof (value) === 'string') ? value : value.id;
|
|
11206
|
+
};
|
|
11207
|
+
this.selection = (this.multiple) ? users.filter(user => this.writedValue.some(value => user.properties.username === userId(value)))
|
|
11208
|
+
: users.filter(user => user.properties.username === userId(this.writedValue))[0];
|
|
11209
|
+
if (this.selection) {
|
|
11210
|
+
this.writedValue = null;
|
|
11211
|
+
this.emitSelection(this.selection);
|
|
11212
|
+
}
|
|
11213
|
+
}
|
|
11209
11214
|
insertFUllName(data) {
|
|
11210
11215
|
return data.map((user) => {
|
|
11211
11216
|
var _a, _b;
|
|
@@ -13723,7 +13728,7 @@ class DynamicColumnComponent {
|
|
|
13723
13728
|
}
|
|
13724
13729
|
}
|
|
13725
13730
|
DynamicColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DynamicColumnComponent, deps: [{ token: ExtensionService }, { token: ColumnRendererRegistryService }, { token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
13726
|
-
DynamicColumnComponent.ɵcmp = i0.ɵɵ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: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, 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.ViewEncapsulation.None });
|
|
13731
|
+
DynamicColumnComponent.ɵcmp = i0.ɵɵ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: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, 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.ViewEncapsulation.None });
|
|
13727
13732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DynamicColumnComponent, decorators: [{
|
|
13728
13733
|
type: Component,
|
|
13729
13734
|
args: [{
|
|
@@ -13735,7 +13740,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
13735
13740
|
`
|
|
13736
13741
|
.cts-dynamic-column {
|
|
13737
13742
|
display: flex;
|
|
13738
|
-
align-items: center;
|
|
13743
|
+
align-items: var(--dynamic-column-align, center);
|
|
13744
|
+
justify-content: var(--dynamic-column-justity, flex-start);
|
|
13745
|
+
width: var(--dynamic-column-width, 100%);
|
|
13746
|
+
padding :var(--dynamic-column-padding, unset);
|
|
13739
13747
|
}
|
|
13740
13748
|
`
|
|
13741
13749
|
]
|
|
@@ -20624,14 +20632,15 @@ class EditorButtonComponent {
|
|
|
20624
20632
|
this.baseAppUrl = baseAppUrl;
|
|
20625
20633
|
this.configService = configService;
|
|
20626
20634
|
this.isFeatureEnabled = false;
|
|
20635
|
+
this.isEnabled = false;
|
|
20627
20636
|
this.editorConfig = (_a = this.configService.myConfiguration) === null || _a === void 0 ? void 0 : _a.configEditor;
|
|
20628
20637
|
this.isFeatureEnabled = environment.configEditor === 'YES';
|
|
20629
20638
|
}
|
|
20630
|
-
|
|
20639
|
+
ngOnChanges(changes) {
|
|
20631
20640
|
var _a, _b, _c, _d;
|
|
20632
|
-
|
|
20641
|
+
this.typeConfig = (_b = (_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b[this.type];
|
|
20642
|
+
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);
|
|
20633
20643
|
}
|
|
20634
|
-
ngOnInit() { }
|
|
20635
20644
|
navigate() {
|
|
20636
20645
|
var _a;
|
|
20637
20646
|
const config = (_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.types[this.type];
|
|
@@ -20646,19 +20655,19 @@ class EditorButtonComponent {
|
|
|
20646
20655
|
this.router.navigate([url], {
|
|
20647
20656
|
queryParams: {
|
|
20648
20657
|
[PARAMS_KEYS.TYPE]: this.type,
|
|
20649
|
-
[PARAMS_KEYS.KEY]: this.key
|
|
20658
|
+
[PARAMS_KEYS.KEY]: this.key
|
|
20650
20659
|
}
|
|
20651
20660
|
});
|
|
20652
20661
|
}
|
|
20653
20662
|
}
|
|
20654
20663
|
EditorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EditorButtonComponent, deps: [{ token: 'environment' }, { token: i1$5.Router }, { token: PROJECT_BASE_HREF }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
20655
|
-
EditorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, ngImport: i0, template: `
|
|
20656
|
-
<ng-container *ngIf="
|
|
20664
|
+
EditorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, usesOnChanges: true, ngImport: i0, template: `
|
|
20665
|
+
<ng-container *ngIf="isEnabled">
|
|
20657
20666
|
<button
|
|
20658
20667
|
mat-stroked-button
|
|
20659
20668
|
[matTooltip]="'JSON_EDITOR.navigateToEditor' | translate"
|
|
20660
20669
|
(click)="navigate()"
|
|
20661
|
-
*permission="{ name:
|
|
20670
|
+
*permission="{ name: typeConfig?.permission }"
|
|
20662
20671
|
>
|
|
20663
20672
|
<mat-icon>edit</mat-icon>
|
|
20664
20673
|
</button>
|
|
@@ -20669,12 +20678,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
20669
20678
|
args: [{
|
|
20670
20679
|
selector: 'app-editor-button',
|
|
20671
20680
|
template: `
|
|
20672
|
-
<ng-container *ngIf="
|
|
20681
|
+
<ng-container *ngIf="isEnabled">
|
|
20673
20682
|
<button
|
|
20674
20683
|
mat-stroked-button
|
|
20675
20684
|
[matTooltip]="'JSON_EDITOR.navigateToEditor' | translate"
|
|
20676
20685
|
(click)="navigate()"
|
|
20677
|
-
*permission="{ name:
|
|
20686
|
+
*permission="{ name: typeConfig?.permission }"
|
|
20678
20687
|
>
|
|
20679
20688
|
<mat-icon>edit</mat-icon>
|
|
20680
20689
|
</button>
|
|
@@ -45245,10 +45254,15 @@ class NdfConfigEditorComponent extends DestroySubject {
|
|
|
45245
45254
|
const themeValue = (_a = changes.theme) === null || _a === void 0 ? void 0 : _a.currentValue;
|
|
45246
45255
|
const optionsValue = (_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue;
|
|
45247
45256
|
const isThemeFirstChange = (_c = changes === null || changes === void 0 ? void 0 : changes.theme) === null || _c === void 0 ? void 0 : _c.firstChange;
|
|
45257
|
+
const activeTheme = this._optionsSubject.getValue().theme;
|
|
45248
45258
|
let mergedOptions = ___default.merge(this._defaultEditorOptions, optionsValue || {}, { language: 'json' });
|
|
45249
45259
|
if (themeValue && isThemeFirstChange) {
|
|
45250
45260
|
mergedOptions.theme = themeValue;
|
|
45251
45261
|
}
|
|
45262
|
+
if (!optionsValue && activeTheme && themeValue && activeTheme !== themeValue) {
|
|
45263
|
+
const activeOptions = this._optionsSubject.getValue();
|
|
45264
|
+
this._optionsSubject.next(___default.merge(activeOptions, { theme: themeValue }));
|
|
45265
|
+
}
|
|
45252
45266
|
if (optionsValue || (themeValue && isThemeFirstChange)) {
|
|
45253
45267
|
this._optionsSubject.next(___default.cloneDeep(mergedOptions));
|
|
45254
45268
|
}
|