nuxeo-development-framework 5.6.7 → 5.6.8
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 +20 -10
- 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/spell-checker-field/spell-checker-field.module.js +1 -1
- 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 +19 -9
- 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/shared/components/nuxeo-dialog/models/dialog-option.model.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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;
|
|
@@ -48273,10 +48278,15 @@
|
|
|
48273
48278
|
var themeValue = (_a = changes.theme) === null || _a === void 0 ? void 0 : _a.currentValue;
|
|
48274
48279
|
var optionsValue = (_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue;
|
|
48275
48280
|
var isThemeFirstChange = (_c = changes === null || changes === void 0 ? void 0 : changes.theme) === null || _c === void 0 ? void 0 : _c.firstChange;
|
|
48281
|
+
var activeTheme = this._optionsSubject.getValue().theme;
|
|
48276
48282
|
var mergedOptions = ___default["default"].merge(this._defaultEditorOptions, optionsValue || {}, { language: 'json' });
|
|
48277
48283
|
if (themeValue && isThemeFirstChange) {
|
|
48278
48284
|
mergedOptions.theme = themeValue;
|
|
48279
48285
|
}
|
|
48286
|
+
if (!optionsValue && activeTheme && themeValue && activeTheme !== themeValue) {
|
|
48287
|
+
var activeOptions = this._optionsSubject.getValue();
|
|
48288
|
+
this._optionsSubject.next(___default["default"].merge(activeOptions, { theme: themeValue }));
|
|
48289
|
+
}
|
|
48280
48290
|
if (optionsValue || (themeValue && isThemeFirstChange)) {
|
|
48281
48291
|
this._optionsSubject.next(___default["default"].cloneDeep(mergedOptions));
|
|
48282
48292
|
}
|