@eclipse-scout/core 22.0.0-beta.5 → 22.0.0

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.
@@ -1,5 +1,5 @@
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
@@ -10,11 +10,12 @@
10
10
  */
11
11
  .filter-field {
12
12
  position: absolute;
13
+ --filter-field-height: @filter-field-height;
13
14
  --filter-field-bottom: @filter-field-bottom;
14
- --filter-field-max-bottom: calc(~'50% - ' @filter-field-height / 2);
15
+ --filter-field-max-bottom: calc(~'50% - ' var(--filter-field-height) / 2);
15
16
  bottom: min(var(--filter-field-bottom), var(--filter-field-max-bottom));
16
17
  right: @filter-field-right;
17
- height: @filter-field-height;
18
+ height: var(--filter-field-height);
18
19
  width: @filter-field-width;
19
20
  min-width: @filter-field-min-width;
20
21
  max-width: @filter-field-max-width;
@@ -25,6 +26,13 @@
25
26
  #scout.drop-shadow();
26
27
  background-color: var(--filter-field-background-color);
27
28
  opacity: 1;
29
+ visibility: visible;
30
+
31
+ // delay the "fade in" transition
32
+ --filter-field-opacity-transition-delay: 100ms;
33
+ // the visibility transition is not a smooth transition but allows to set the value visibility delayed
34
+ // set visibility to visible right before the "fade in" transition starts
35
+ --filter-field-visibility-transition-delay: var(--filter-field-opacity-transition-delay);
28
36
 
29
37
  transition: bottom @filter-field-transition-duration ease-in-out,
30
38
  right @filter-field-transition-duration ease-in-out,
@@ -33,10 +41,17 @@
33
41
  min-width @filter-field-transition-duration ease-in-out,
34
42
  max-width @filter-field-transition-duration ease-in-out,
35
43
  box-shadow @filter-field-transition-duration ease-in-out,
36
- opacity @filter-field-transition-duration ease-in-out;
44
+ opacity @filter-field-transition-duration ease-in-out var(--filter-field-opacity-transition-delay),
45
+ visibility 0s var(--filter-field-visibility-transition-delay);
37
46
 
38
47
  :not(:hover) > &:not(.focused):not(.focus-inside-widget).empty {
39
48
  opacity: 0;
49
+ visibility: hidden;
50
+
51
+ // start the "fade out" transition right away
52
+ --filter-field-opacity-transition-delay: 0s;
53
+ // set visibility to hidden right after the "fade out" transition ends
54
+ --filter-field-visibility-transition-delay: calc(@filter-field-transition-duration + var(--filter-field-opacity-transition-delay));
40
55
  }
41
56
 
42
57
  &::before {
@@ -46,7 +61,7 @@
46
61
  justify-content: center;
47
62
  align-items: center;
48
63
  position: absolute;
49
- bottom: (@filter-field-height - @filter-field-icon-size) / 2;
64
+ bottom: calc((var(--filter-field-height) - @filter-field-icon-size) / 2);
50
65
  right: @text-field-icon-margin-x + 1px;
51
66
  height: @filter-field-icon-size;
52
67
  width: @filter-field-icon-size;
@@ -93,7 +108,7 @@
93
108
  }
94
109
 
95
110
  &:not(.focused).empty {
96
- --filter-field-bottom: @filter-field-bottom + ((@filter-field-height - @filter-field-icon-size) / 2);
111
+ --filter-field-bottom: @filter-field-bottom + ((var(--filter-field-height) - @filter-field-icon-size) / 2);
97
112
  --filter-field-max-bottom: calc(~'50% - ' @filter-field-icon-size / 2);
98
113
  right: @filter-field-right + @text-field-icon-margin-x + 1px;
99
114
  height: @filter-field-icon-size;
@@ -101,7 +116,7 @@
101
116
  min-width: @filter-field-icon-size;
102
117
  max-width: @filter-field-icon-size;
103
118
  box-shadow: none;
104
- #scout.backdrop-filter(@background-color: var(--filter-field-transparent-background-color), @backdrop-filter: blur(2px), @fallback-background-color: var(--filter-field-background-color));
119
+ #scout.backdrop-filter(@background-color: var(--filter-field-transparent-50-background-color), @backdrop-filter: blur(2px), @fallback-background-color: var(--filter-field-transparent-80-background-color));
105
120
 
106
121
  &::before {
107
122
  bottom: 0;
@@ -130,8 +145,9 @@
130
145
 
131
146
  .filter-field-container {
132
147
  position: sticky;
148
+ --filter-field-height: @filter-field-height;
133
149
  --filter-field-container-top: calc(~'100% - ' @filter-field-bottom);
134
- --filter-field-container-min-top: calc(~'50% + ' @filter-field-height / 2);
150
+ --filter-field-container-min-top: calc(~'50% + ' var(--filter-field-height) / 2);
135
151
  top: max(var(--filter-field-container-top), var(--filter-field-container-min-top));
136
152
  left: calc(~'100% - ' @filter-field-right);
137
153
  width: 0;
@@ -143,6 +159,10 @@
143
159
 
144
160
  &:not(:hover) > .filter-field:not(.focused):not(.focus-inside-widget).empty {
145
161
  opacity: 1;
162
+ visibility: visible;
163
+
164
+ --filter-field-opacity-transition-delay: 100ms;
165
+ --filter-field-visibility-transition-delay: var(--filter-field-opacity-transition-delay);
146
166
  }
147
167
 
148
168
  & > .filter-field {
@@ -152,10 +172,14 @@
152
172
 
153
173
  :not(:hover) > &:not(.focused):not(.focus-inside-widget).empty {
154
174
  opacity: 0;
175
+ visibility: hidden;
176
+
177
+ --filter-field-opacity-transition-delay: 0s;
178
+ --filter-field-visibility-transition-delay: calc(@filter-field-transition-duration + var(--filter-field-opacity-transition-delay));
155
179
  }
156
180
 
157
181
  &:not(.focused).empty {
158
- bottom: ((@filter-field-height - @filter-field-icon-size) / 2);
182
+ bottom: calc((var(--filter-field-height) - @filter-field-icon-size) / 2);
159
183
  right: @text-field-icon-margin-x + 1px;
160
184
  }
161
185
  }
@@ -166,4 +190,9 @@
166
190
  .filter-field {
167
191
  .hidden();
168
192
  }
193
+ }
194
+
195
+ .dense .filter-field,
196
+ .dense .filter-field-container {
197
+ --filter-field-height: @filter-field-height-dense;
169
198
  }
@@ -39,7 +39,7 @@ export default class Widget {
39
39
  this.cloneOf = null;
40
40
 
41
41
  /**
42
- * The 'rendering' flag is set the true while the _inital_ rendering is performed.
42
+ * The 'rendering' flag is set the true while the _initial_ rendering is performed.
43
43
  * It is used to to something different in a _render* method when the method is
44
44
  * called for the first time.
45
45
  */
@@ -124,6 +124,12 @@ export default class Widget {
124
124
  READ_ONLY: 1
125
125
  };
126
126
 
127
+ /**
128
+ * Initializes the widget instance. All properties of the model parameter (object) are set as properties on the widget instance.
129
+ * Calls {@link Widget#_init} and triggers an <em>init</em> event when initialization has been completed.
130
+ *
131
+ * @param {object} model
132
+ */
127
133
  init(model) {
128
134
  let staticModel = this._jsonModel();
129
135
  if (staticModel) {
@@ -148,9 +154,12 @@ export default class Widget {
148
154
  }
149
155
 
150
156
  /**
151
- * @param {object} options
152
- * - parent (required): The parent widget
153
- * - session (optional): If not specified the session of the parent is used
157
+ * Initializes the widget instance. All properties of the model parameter (object) are set as properties on the widget instance.
158
+ * Override this function to initialize widget specific properties in sub-classes.
159
+ *
160
+ * @param {object} model Properties:<ul>
161
+ * <li>parent (required): parent widget</li>
162
+ * <li>session (optional): If not specified, session of parent widget is used</li></ul>
154
163
  */
155
164
  _init(model) {
156
165
  if (!model.parent) {