@eclipse-scout/core 22.0.19 → 22.0.22

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/dist/file-list CHANGED
@@ -1,5 +1,5 @@
1
- eclipse-scout-core-d110a434bcc809661ce5.min.js
2
- eclipse-scout-core-d110a434bcc809661ce5.min.js.map
1
+ eclipse-scout-core-c4cad26b336b02535421.min.js
2
+ eclipse-scout-core-c4cad26b336b02535421.min.js.map
3
3
  eclipse-scout-core-theme-dark-fd0e080c10f65e67b68b.min.css
4
4
  eclipse-scout-core-theme-dark.css
5
5
  eclipse-scout-core-theme-dark.css.map
package/dist/texts.json CHANGED
@@ -188,19 +188,19 @@
188
188
  "ConfirmApplyChanges": "Voulez-vous appliquer les modifications?",
189
189
  "ErrorWhileLoadingData": "Erreur lors du chargement des données",
190
190
  "FormEmptyMandatoryFieldsMessage": "Les champs suivants doivent être remplis:",
191
- "FormInvalidFieldsMessage": "Les champs suivants ont une valeur non valide:",
192
- "FormSaveChangesQuestion": "Voulez-vous enregistrer les modifications?",
191
+ "FormInvalidFieldsMessage": "Les champs suivants ont une valeur invalide:",
192
+ "FormSaveChangesQuestion": "Est-ce que vous voulez enregistrer les modifications ?",
193
193
  "FormValidationFailedTitle": "Veuillez vérifier les données.",
194
- "FormsCannotBeSaved": "Les masques suivants ne peuvent pas être enregistrés, car ils se trouvent dans un statut non valide:",
194
+ "FormsCannotBeSaved": "Les formulaires suivants ne peuvent pas être enregistrés car ils se trouvent dans un statut non valide:",
195
195
  "GroupBy": "Grouper par",
196
- "InactiveState": "inactif",
196
+ "InactiveState": "Inactif",
197
197
  "InvalidNumberMessageX": "\"{0}\" est un chiffre non valide,",
198
198
  "InvalidValueMessageX": "\"{0}\" est une valeur non valide.",
199
199
  "NavigationBackward": "Retour",
200
200
  "No": "Non",
201
201
  "NoButton": "Non",
202
202
  "NoGrouping": "Aucun groupement",
203
- "NotAllCheckedFormsCanBeSaved": "Tous les formulaires sélectionnés ne peuvent pas être enregistrés",
203
+ "NotAllCheckedFormsCanBeSaved": "Tous les formulaires sélectionnés n'ont pas pu être enregistrés",
204
204
  "NumberTooLargeMessageX": "La valeur est trop grande; doit être inférieure ou égale à {0}.",
205
205
  "NumberTooLargeMessageXY": "La valeur est trop grande; doit être comprise entre {0} et {1}.",
206
206
  "NumberTooSmallMessageX": "La valeur est trop petite; doit être supérieure ou égale à {0}.",
@@ -246,7 +246,7 @@
246
246
  "ui.CloseAllTabs": "Fermer tous les onglets",
247
247
  "ui.CloseOtherTabs": "Fermer les autres onglets",
248
248
  "ui.CodeUndefined": "[Inconnu]",
249
- "ui.CollapseAll": "fermer tous",
249
+ "ui.CollapseAll": "tout fermer",
250
250
  "ui.Coloring": "Coloration",
251
251
  "ui.Column": "Colonne",
252
252
  "ui.ConnectionInterrupted": "Connexion interrompue",
@@ -261,7 +261,7 @@
261
261
  "ui.Done": "OK",
262
262
  "ui.EmptyCell": "-vide-",
263
263
  "ui.ErrorCodeX": "Code {0}",
264
- "ui.ExpandAll": "déplier tous",
264
+ "ui.ExpandAll": "tout déplier",
265
265
  "ui.FileChooserHint": "Veuillez faire glisser les fichiers souhaités dans cette zone ou les sélectionner avec Parcourir.",
266
266
  "ui.FileSizeLimit": "La taille maximale autorisée du fichier a été dépassée ({0} MB}.",
267
267
  "ui.FileSizeLimitTitle": "Limitation de la taille des fichier",
@@ -315,7 +315,7 @@
315
315
  "ui.ReloadData": "Recharger les données",
316
316
  "ui.RemoveFilter": "Supprimer le filtre",
317
317
  "ui.SearchFor_": "Rechercher par…",
318
- "ui.SelectAll": "Sélectionner tous",
318
+ "ui.SelectAll": "Tout sélectionner",
319
319
  "ui.SelectAllFilter": "Tous",
320
320
  "ui.SelectNone": "Sélectionner aucun",
321
321
  "ui.SelectNoneFilter": "Aucun",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-scout/core",
3
- "version": "22.0.19",
3
+ "version": "22.0.22",
4
4
  "description": "Eclipse Scout runtime",
5
5
  "author": "BSI Business Systems Integration AG",
6
6
  "homepage": "https://www.eclipse.org/scout",
@@ -26,7 +26,7 @@
26
26
  "src"
27
27
  ],
28
28
  "devDependencies": {
29
- "@eclipse-scout/cli": "22.0.19",
29
+ "@eclipse-scout/cli": "22.0.22",
30
30
  "@eclipse-scout/releng": "^22.0.0",
31
31
  "jasmine-core": "3.10.1",
32
32
  "jasmine-ajax": "4.0.0",
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
7
  *
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
@@ -198,6 +198,11 @@ export default class Page extends TreeNode {
198
198
  if (form instanceof Form) {
199
199
  form.setModal(false);
200
200
  form.setClosable(false);
201
+
202
+ form.setDisplayHint(Form.DisplayHint.VIEW);
203
+ form.setDisplayViewId('C');
204
+
205
+ form.setShowOnOpen(false);
201
206
  }
202
207
  if (form instanceof TileOverviewForm) {
203
208
  form.setPage(this);
package/src/form/Form.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*
2
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
7
  *
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
@@ -21,6 +21,7 @@ export default class Form extends Widget {
21
21
  this.askIfNeedSave = true;
22
22
  this.askIfNeedSaveText = null; // if not set, a default text is used (see Lifecycle.js)
23
23
  this.data = {};
24
+ this.displayViewId = null;
24
25
  this.displayHint = Form.DisplayHint.DIALOG;
25
26
  this.displayParent = null; // only relevant if form is opened, not relevant if form is just rendered into another widget (not managed by a form controller)
26
27
  this.maximized = false;
@@ -44,6 +45,7 @@ export default class Form extends Widget {
44
45
  this.messageBoxController = null;
45
46
  this.fileChooserController = null;
46
47
  this.closeKeyStroke = null;
48
+ this.showOnOpen = true;
47
49
  this._glassPaneRenderer = null;
48
50
  this._preMaximizedBounds = null;
49
51
  this._resizeHandler = this._onResize.bind(this);
@@ -239,7 +241,9 @@ export default class Form extends Widget {
239
241
  // If form has been closed right after it was opened don't try to show it
240
242
  return;
241
243
  }
242
- this.show();
244
+ if (this.showOnOpen) {
245
+ this.show();
246
+ }
243
247
  });
244
248
  }
245
249
 
@@ -754,6 +758,10 @@ export default class Form extends Widget {
754
758
  }
755
759
  }
756
760
 
761
+ setDisplayViewId(displayViewId) {
762
+ this.setProperty('displayViewId', displayViewId);
763
+ }
764
+
757
765
  setDisplayHint(displayHint) {
758
766
  this.setProperty('displayHint', displayHint);
759
767
  }
@@ -820,6 +828,10 @@ export default class Form extends Widget {
820
828
  return $prevIcon;
821
829
  }
822
830
 
831
+ setShowOnOpen(showOnOpen) {
832
+ this.setProperty('showOnOpen', showOnOpen);
833
+ }
834
+
823
835
  _updateTitleForWindow() {
824
836
  let formTitle = strings.join(' - ', this.title, this.subTitle),
825
837
  applicationTitle = this.session.desktop.title;
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
3
+ * All rights reserved. This program and the accompanying materials
4
+ * are made available under the terms of the Eclipse Public License v1.0
5
+ * which accompanies this distribution, and is available at
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
+ *
8
+ * Contributors:
9
+ * BSI Business Systems Integration AG - initial API and implementation
10
+ */
11
+ import {FormAdapter} from '../../index';
12
+
13
+ /**
14
+ * @typedef JsFormModel
15
+ * @property {object} parent
16
+ * @property {object} owner
17
+ * @property {object} displayParent
18
+ * @property {object} inputData
19
+ * @property {string} jsFormObjectType
20
+ * @property {object} jsFormModel
21
+ */
22
+
23
+ export default class JsFormAdapter extends FormAdapter {
24
+
25
+ constructor() {
26
+ super();
27
+ }
28
+
29
+ /**
30
+ * @param {JsFormModel} model
31
+ */
32
+ _initModel(model, parent) {
33
+ model = super._initModel(model, parent);
34
+
35
+ if (!model.jsFormObjectType || !model.jsFormObjectType.length) {
36
+ throw new Error('jsFormObjectType not set');
37
+ }
38
+
39
+ let jsFormModel = {
40
+ parent: model.parent,
41
+ owner: model.owner,
42
+ objectType: model.jsFormObjectType,
43
+ displayParent: model.displayParent,
44
+ data: model.inputData
45
+ };
46
+
47
+ if (model.jsFormModel) {
48
+ jsFormModel = $.extend(true, {}, model.jsFormModel, jsFormModel);
49
+ }
50
+
51
+ return jsFormModel;
52
+ }
53
+
54
+ _createWidget(model) {
55
+ let widget = super._createWidget(model);
56
+
57
+ widget.showOnOpen = false;
58
+ widget.open();
59
+
60
+ return widget;
61
+ }
62
+
63
+ _onWidgetEvent(event) {
64
+ if (event.type === 'save') {
65
+ this._onWidgetSave(event);
66
+ } else {
67
+ super._onWidgetEvent(event);
68
+ }
69
+ }
70
+
71
+ _onWidgetSave(event) {
72
+ this._send('save', {
73
+ outputData: this.widget.data
74
+ });
75
+ }
76
+
77
+ _onWidgetClose(event) {
78
+ // marks the end of the js lifecycle
79
+ // prevent remove/destroy of the widget as it will be done by the UI server
80
+ event.preventDefault();
81
+ // fromClosing will trigger a 'formHide' event on the desktop which then removes the widget
82
+ this._send('formClosing');
83
+ }
84
+
85
+ _onWidgetAbort(event) {
86
+ // completely handled by the js lifecycle -> no need to notify the UI server
87
+ }
88
+ }
package/src/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * All rights reserved. This program and the accompanying materials
4
4
  * are made available under the terms of the Eclipse Public License v1.0
5
5
  * which accompanies this distribution, and is available at
6
- * http://www.eclipse.org/legal/epl-v10.html
6
+ * https://www.eclipse.org/legal/epl-v10.html
7
7
  *
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
@@ -294,6 +294,7 @@ export {default as GroupBoxResponsiveHandler} from './form/GroupBoxResponsiveHan
294
294
  export {default as DesktopResponsiveHandler} from './form/DesktopResponsiveHandler';
295
295
  export {default as TileOverviewForm} from './form/TileOverviewForm';
296
296
  export {default as TileOverviewFormAdapter} from './form/TileOverviewFormAdapter';
297
+ export {default as JsFormAdapter} from './form/js/JsFormAdapter';
297
298
  export {default as Table} from './table/Table';
298
299
  export {default as TableAdapter} from './table/TableAdapter';
299
300
  export {default as TableCompactHandler} from './table/TableCompactHandler';
@@ -152,7 +152,7 @@ export function installScrollShadow($container, session, options) {
152
152
  $container.data('scroll-shadow', $shadow);
153
153
  $container.data('scroll-shadow-style', scrollShadowStyle);
154
154
  $container.data('scroll-shadow-customizer', options.scrollShadowCustomizer);
155
- let handler = () => updateScrollShadow($container);
155
+ let handler = () => updateScrollShadowWhileScrolling($container);
156
156
  $container.data('scroll-shadow-handler', handler);
157
157
  $container.on('scroll', handler);
158
158
  updateScrollShadow($container);
@@ -236,6 +236,17 @@ function _computeScrollShadowStyle(options) {
236
236
  return scrollShadow;
237
237
  }
238
238
 
239
+ export function updateScrollShadowWhileScrolling($container) {
240
+ let $animatingParent = $container.findUp($elem => $elem.hasAnimationClass());
241
+ if ($animatingParent.length > 0) {
242
+ // If the container is scrolled while being animated, the shadow will likely get the wrong size and/or position if the animation changes the bounds.
243
+ // The scroll event is mostly probably not triggered by the user directly but by the scrollable container itself, e.g. to reveal a focused / selected / checked element.
244
+ $animatingParent.oneAnimationEnd(() => updateScrollShadow($container));
245
+ return;
246
+ }
247
+ updateScrollShadow($container);
248
+ }
249
+
239
250
  export function updateScrollShadow($container) {
240
251
  let $shadow = $container.data('scroll-shadow');
241
252
  if (!$shadow) {