@smartbit4all/ng-client 7.3.27 → 7.3.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "7.3.27",
3
+ "version": "7.3.29",
4
4
  "description": "Angular client library for the smartbit4all platform — a server-driven UI framework that renders views, pages, forms, grids, trees and dialogs from backend (ViewApi/PageApi) definitions. Provides reactive view-context state management, dynamic component layouts and OpenAPI-generated BFF clients.",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -1,192 +1,188 @@
1
- @use 'sass:map';
2
-
3
- $default-colors: (
4
- primary: #4763ff,
5
- secondary: #a6aabd60,
6
- accent: #20b6a8,
7
- warn: #d51d1d,
8
- success: #16a34a,
9
- accent-grey: #6b7280,
10
- text: #132033,
11
- text-inverted: #ffffff,
12
- text-muted: #68778e,
13
- ) !default;
14
-
15
- // Text color on the raised variant. A color missing from this map gets white.
16
- $default-text-colors: (
17
- primary: var(--text-inverted-color),
18
- ) !default;
19
-
20
- $default-tokens: (
21
- // Backgrounds
22
- color-bg: #f6f8fb,
23
- color-surface: #ffffff,
24
- color-surface-alt: #f9fbff,
25
-
26
- // Borders
27
- color-border: #e4eaf2,
28
-
29
- // Tree
30
- tree-active-background: var(--accent-color),
31
-
32
- // Semantic
33
- color-danger: var(--warn-color),
34
- color-teal: #20b6a8,
35
-
36
- // UI chrome
37
- color-chip: #e8f4fd,
38
- color-input: #ffffff,
39
-
40
- // Shadows
41
- shadow-strong: 0 18px 50px rgba(1, 132, 228, 0.1),
42
- shadow-soft: 0 8px 22px rgba(1, 132, 228, 0.07),
43
-
44
- border-radius: 0.5rem,
45
- default-padding: 0.5rem,
46
- ) !default;
47
-
48
- @function -text-color($text-colors, $name) {
49
- $value: map.get($text-colors, $name);
50
- @if $value {
51
- @return $value;
52
- }
53
- @return var(--text-color);
54
- }
55
-
56
- // Emits CSS variables only, so the project chooses the selector.
57
- // Usage: body { @include sb.tokens($colors, $text-colors, $overrides); }
58
- @mixin tokens($colors: (), $text-colors: (), $overrides: ()) {
59
- $all-colors: map.merge($default-colors, $colors);
60
- $all-text-colors: map.merge($default-text-colors, $text-colors);
61
- $all-tokens: map.merge($default-tokens, $overrides);
62
-
63
- // One --<name>-color and one --<name>-text-color for every color
64
- @each $name, $color in $all-colors {
65
- --#{$name}-color: #{$color};
66
- --#{$name}-text-color: #{-text-color($all-text-colors, $name)};
67
- }
68
-
69
- @each $name, $value in $all-tokens {
70
- @if $name == font-family {
71
- font-family: #{$value} !important;
72
- } @else {
73
- --#{$name}: #{$value};
74
- }
75
- }
76
- }
77
-
78
- // @use '@smartbit4all/ng-client/styles' as sb;
79
- // @include sb.buttons;
80
- // @include sb.buttons((new-color: #ff5500), (new-color: white));
81
- @mixin buttons($colors: (), $text-colors: ()) {
82
- $all-colors: map.merge($default-colors, $colors);
83
- $all-text-colors: map.merge($default-text-colors, $text-colors);
84
-
85
- @each $name, $color in $all-colors {
86
- $text: -text-color($all-text-colors, $name);
87
- $color: var(--#{$name}-color, #{$color});
88
-
89
- .sb4-raised.sb4-#{$name} {
90
- background-color: #{$color} !important;
91
- color: #{$text} !important;
92
- stroke: #{$text} !important;
93
- border: none;
94
- }
95
-
96
- .sb4-raised.sb4-#{$name}:hover {
97
- background-color: rgb(from #{$color} r g b / 0.8);
98
- }
99
-
100
- .sb4-raised.sb4-#{$name} .mdc-button__label {
101
- color: #{$text};
102
- }
103
-
104
- .sb4-normal.sb4-#{$name} {
105
- background-color: transparent;
106
- border: 1px solid #{$color};
107
- color: #{$color} !important;
108
- stroke: #{$color};
109
- box-shadow: none;
110
- }
111
-
112
- .sb4-flat.sb4-#{$name} {
113
- background-color: transparent;
114
- border: 1px solid transparent;
115
- color: #{$color} !important;
116
- stroke: #{$color};
117
- box-shadow: none;
118
- }
119
-
120
- .sb4-flat.sb4-#{$name}.sb4-view-activated {
121
- --sb4-view-activated-bg: transparent !important;
122
- --sb4-view-activated-color: #{$color} !important;
123
- border-bottom: 1px solid #{$color} !important;
124
- border-bottom-right-radius: unset !important;
125
- border-bottom-left-radius: unset !important;
126
-
127
- .mat-icon {
128
- color: #{$color} !important;
129
- fill: #{$color} !important;
130
- stroke: #{$color} !important;
131
- }
132
- }
133
-
134
- .sb4-minifab.sb4-#{$name} {
135
- background-color: transparent;
136
- border: 1px solid #{$color};
137
- color: #{$color};
138
- box-shadow: none;
139
- }
140
-
141
- .sb4-icon.sb4-#{$name} {
142
- background-color: transparent;
143
- border: 1px solid transparent;
144
- color: #{$color};
145
- box-shadow: none;
146
- }
147
-
148
- .sb4-minifab.sb4-#{$name}:hover,
149
- .sb4-normal.sb4-#{$name}:hover {
150
- background-color: rgb(from #{$color} r g b / 0.1);
151
- border-color: #{$color};
152
- }
153
-
154
- .sb4-flat.sb4-#{$name}:hover {
155
- background-color: rgb(from #{$color} r g b / 0.1);
156
- }
157
-
158
- .sb4-minifab.sb4-#{$name}:focus,
159
- .sb4-minifab.sb4-#{$name}:hover {
160
- box-shadow: none;
161
- }
162
-
163
- .sb4-minifab.sb4-#{$name},
164
- .sb4-normal.sb4-#{$name},
165
- .sb4-flat.sb4-#{$name} {
166
- .mdc-button__label {
167
- color: #{$color};
168
- }
169
- }
170
-
171
- .sb4-raised.sb4-#{$name} mat-icon,
172
- .sb4-raised.sb4-#{$name} .mat-icon,
173
- .sb4-raised.sb4-#{$name} .pi {
174
- color: #{$text} !important;
175
- fill: #{$text} !important;
176
- stroke: #{$text} !important;
177
- }
178
-
179
- .sb4-icon.sb4-#{$name},
180
- .sb4-minifab.sb4-#{$name},
181
- .sb4-normal.sb4-#{$name},
182
- .sb4-flat.sb4-#{$name} {
183
- mat-icon,
184
- .mat-icon,
185
- .pi {
186
- color: #{$color} !important;
187
- fill: #{$color} !important;
188
- stroke: #{$color} !important;
189
- }
190
- }
191
- }
192
- }
1
+ @use 'sass:map';
2
+
3
+ $default-colors: (
4
+ primary: #4763ff,
5
+ secondary: #a6aabd60,
6
+ accent: #20b6a8,
7
+ warn: #d51d1d,
8
+ success: #16a34a,
9
+ accent-grey: #6b7280,
10
+ text: #132033,
11
+ text-inverted: #ffffff,
12
+ text-muted: #68778e,
13
+ ) !default;
14
+
15
+ // Text color on the raised variant. A color missing from this map gets white.
16
+ $default-text-colors: (
17
+ primary: var(--text-inverted-color),
18
+ ) !default;
19
+
20
+ $default-tokens: (
21
+ // Backgrounds
22
+ color-bg: #ffffff,
23
+ color-surface: #f6f8fb,
24
+ color-surface-alt: #f9fbff,
25
+
26
+ // Borders
27
+ color-border: #e4eaf2,
28
+
29
+ // Tree
30
+ tree-active-background: var(--accent-color),
31
+ // Semantic
32
+ color-danger: var(--warn-color),
33
+ // UI chrome
34
+ color-chip: #e8f4fd,
35
+ color-input: #ffffff,
36
+
37
+ // Shadows
38
+ shadow-strong: 0 18px 50px rgba(1, 132, 228, 0.1),
39
+ shadow-soft: 0 8px 22px rgba(1, 132, 228, 0.07),
40
+ border-radius: 0.5rem,
41
+ default-padding: 0.5rem
42
+ ) !default;
43
+
44
+ @function -text-color($text-colors, $name) {
45
+ $value: map.get($text-colors, $name);
46
+ @if $value {
47
+ @return $value;
48
+ }
49
+ @return var(--text-color);
50
+ }
51
+
52
+ // Emits CSS variables only, so the project chooses the selector.
53
+ // Usage: body { @include sb.tokens($colors, $text-colors, $overrides); }
54
+ @mixin tokens($colors: (), $text-colors: (), $overrides: ()) {
55
+ $all-colors: map.merge($default-colors, $colors);
56
+ $all-text-colors: map.merge($default-text-colors, $text-colors);
57
+ $all-tokens: map.merge($default-tokens, $overrides);
58
+
59
+ // One --<name>-color and one --<name>-text-color for every color
60
+ @each $name, $color in $all-colors {
61
+ --#{$name}-color: #{$color};
62
+ --#{$name}-text-color: #{-text-color($all-text-colors, $name)};
63
+ }
64
+
65
+ @each $name, $value in $all-tokens {
66
+ @if $name == font-family {
67
+ font-family: #{$value} !important;
68
+ } @else {
69
+ --#{$name}: #{$value};
70
+ }
71
+ }
72
+ }
73
+
74
+ // @use '@smartbit4all/ng-client/styles' as sb;
75
+ // @include sb.buttons;
76
+ // @include sb.buttons((new-color: #ff5500), (new-color: white));
77
+ @mixin buttons($colors: (), $text-colors: ()) {
78
+ $all-colors: map.merge($default-colors, $colors);
79
+ $all-text-colors: map.merge($default-text-colors, $text-colors);
80
+
81
+ @each $name, $color in $all-colors {
82
+ $text: -text-color($all-text-colors, $name);
83
+ $color: var(--#{$name}-color, #{$color});
84
+
85
+ .sb4-raised.sb4-#{$name} {
86
+ background-color: #{$color} !important;
87
+ color: #{$text} !important;
88
+ stroke: #{$text} !important;
89
+ border: none;
90
+ }
91
+
92
+ .sb4-raised.sb4-#{$name}:hover {
93
+ background-color: rgb(from #{$color} r g b / 0.8);
94
+ }
95
+
96
+ .sb4-raised.sb4-#{$name} .mdc-button__label {
97
+ color: #{$text};
98
+ }
99
+
100
+ .sb4-normal.sb4-#{$name} {
101
+ background-color: transparent;
102
+ border: 1px solid #{$color};
103
+ color: #{$color} !important;
104
+ stroke: #{$color};
105
+ box-shadow: none;
106
+ }
107
+
108
+ .sb4-flat.sb4-#{$name} {
109
+ background-color: transparent;
110
+ border: 1px solid transparent;
111
+ color: #{$color} !important;
112
+ stroke: #{$color};
113
+ box-shadow: none;
114
+ }
115
+
116
+ .sb4-flat.sb4-#{$name}.sb4-view-activated {
117
+ --sb4-view-activated-bg: transparent !important;
118
+ --sb4-view-activated-color: #{$color} !important;
119
+ border-bottom: 1px solid #{$color} !important;
120
+ border-bottom-right-radius: unset !important;
121
+ border-bottom-left-radius: unset !important;
122
+
123
+ .mat-icon {
124
+ color: #{$color} !important;
125
+ fill: #{$color} !important;
126
+ stroke: #{$color} !important;
127
+ }
128
+ }
129
+
130
+ .sb4-minifab.sb4-#{$name} {
131
+ background-color: transparent;
132
+ border: 1px solid #{$color};
133
+ color: #{$color};
134
+ box-shadow: none;
135
+ }
136
+
137
+ .sb4-icon.sb4-#{$name} {
138
+ background-color: transparent;
139
+ border: 1px solid transparent;
140
+ color: #{$color};
141
+ box-shadow: none;
142
+ }
143
+
144
+ .sb4-minifab.sb4-#{$name}:hover,
145
+ .sb4-normal.sb4-#{$name}:hover {
146
+ background-color: rgb(from #{$color} r g b / 0.1);
147
+ border-color: #{$color};
148
+ }
149
+
150
+ .sb4-flat.sb4-#{$name}:hover {
151
+ background-color: rgb(from #{$color} r g b / 0.1);
152
+ }
153
+
154
+ .sb4-minifab.sb4-#{$name}:focus,
155
+ .sb4-minifab.sb4-#{$name}:hover {
156
+ box-shadow: none;
157
+ }
158
+
159
+ .sb4-minifab.sb4-#{$name},
160
+ .sb4-normal.sb4-#{$name},
161
+ .sb4-flat.sb4-#{$name} {
162
+ .mdc-button__label {
163
+ color: #{$color};
164
+ }
165
+ }
166
+
167
+ .sb4-raised.sb4-#{$name} mat-icon,
168
+ .sb4-raised.sb4-#{$name} .mat-icon,
169
+ .sb4-raised.sb4-#{$name} .pi {
170
+ color: #{$text} !important;
171
+ fill: #{$text} !important;
172
+ stroke: #{$text} !important;
173
+ }
174
+
175
+ .sb4-icon.sb4-#{$name},
176
+ .sb4-minifab.sb4-#{$name},
177
+ .sb4-normal.sb4-#{$name},
178
+ .sb4-flat.sb4-#{$name} {
179
+ mat-icon,
180
+ .mat-icon,
181
+ .pi {
182
+ color: #{$color} !important;
183
+ fill: #{$color} !important;
184
+ stroke: #{$color} !important;
185
+ }
186
+ }
187
+ }
188
+ }
@@ -1517,6 +1517,10 @@ interface ViewData {
1517
1517
  containerUuid?: string;
1518
1518
  containerId?: string;
1519
1519
  module?: string;
1520
+ /**
1521
+ * Branch the view reads its value sets on; null on the main line.
1522
+ */
1523
+ branchUri?: string;
1520
1524
  windowDescriptor?: WindowDescriptor;
1521
1525
  }
1522
1526
 
@@ -1627,7 +1631,7 @@ interface ViewContextChange {
1627
1631
  */
1628
1632
  result?: object;
1629
1633
  /**
1630
- * Current version of every value set the open views reference; null when the value set delivery switch is off.
1634
+ * Current version of every value set the open views reference; null when the Value Set Store Switch is off.
1631
1635
  */
1632
1636
  valueSetVersions?: Array<ValueSetVersion>;
1633
1637
  }
@@ -3120,7 +3124,7 @@ interface InvocationRequest {
3120
3124
  interface ValueSet {
3121
3125
  valueSetName?: string;
3122
3126
  /**
3123
- * Values for a client without a store, or when the delivery switch is off; null otherwise.
3127
+ * Values for a client without a store, or when the Value Set Store Switch is off; null otherwise.
3124
3128
  */
3125
3129
  valueSetData?: ValueSetData;
3126
3130
  /**
@@ -6932,11 +6936,12 @@ declare class SmartViewContextService implements OnDestroy {
6932
6936
  * report of the client reached the server after the close. So a view to be closed in the view
6933
6937
  * context not applied is closed all the same.
6934
6938
  *
6935
- * The Value Set Version Map of the change goes to the value set store, whose fetches are held
6936
- * until the change is applied, so one request carries the implicit sets the changed models name.
6937
- * The fetch is not awaited: the widgets follow the store.
6939
+ * The Value Set Version Map of the change goes to the value set store under the module of
6940
+ * `viewUuid`, the view the request was sent for, as the server built it. The store's fetches are
6941
+ * held until the change is applied, so one request carries the implicit sets the changed models
6942
+ * name. The fetch is not awaited: the widgets follow the store.
6938
6943
  */
6939
- handlePerformActionResponse(viewContextChange: ViewContextChange | undefined, viewUuid?: string): Promise<any>;
6944
+ handlePerformActionResponse(viewContextChange: ViewContextChange | undefined, viewUuid: string): Promise<any>;
6940
6945
  private applyPerformActionResponse;
6941
6946
  private handleChanges;
6942
6947
  load(uuid: string): Promise<ComponentModel | undefined>;
@@ -9077,23 +9082,24 @@ declare class SmartEmbeddedSlotDirective implements OnInit, OnChanges, OnDestroy
9077
9082
  type ValueSetSelection = Pick<SelectionDefinition, "valueSetNamespace" | "valueSetName" | "keyProperty" | "displayProperty">;
9078
9083
  /**
9079
9084
  * The Global Value Set Store: the value sets of the browser tab shared by every open view,
9080
- * explicit sets by backend module, namespace and name, implicit sets by view uuid and key. It
9081
- * fetches the versions a view context change names and it lacks, keeps what the open views read
9085
+ * explicit sets by backend module, namespace, name and branch, implicit sets by view uuid and key.
9086
+ * It fetches the versions a view context change names and it lacks, keeps what the open views read
9082
9087
  * and empties at a change of the session locale.
9083
9088
  */
9084
9089
  declare abstract class SmartValueSetStore {
9085
9090
  /** @internal The name of every set the store writes, explicit or implicit; readers follow it. */
9086
9091
  abstract readonly changes: Observable<string>;
9087
9092
  /**
9088
- * The values of an explicit set, emitted at once and again at every new version; `undefined`
9089
- * while the store has none.
9093
+ * The values of an explicit set on the branch, or on the main line without one, emitted at once
9094
+ * and again at every new version; `undefined` while the store has none.
9090
9095
  */
9091
- abstract get(module: string | undefined, namespace: string | undefined, name: string): Observable<ValueSetData | undefined>;
9096
+ abstract get(module: string | undefined, namespace: string | undefined, name: string, branchUri?: string): Observable<ValueSetData | undefined>;
9092
9097
  /** @internal The values of an implicit set of a view, like {@link get}. */
9093
9098
  abstract getImplicit(viewUuid: string, key: string): Observable<ValueSetData | undefined>;
9094
9099
  /**
9095
9100
  * The values a widget of the view lists for its selection, like {@link get}: the view's implicit
9096
- * set of the name, else the explicit set in the view's module, merged with the view's extras.
9101
+ * set of the name, else the explicit set in the view's module on the line the view reads it on,
9102
+ * merged with the view's extras.
9097
9103
  */
9098
9104
  abstract getForSelection(viewUuid: string, selection: ValueSetSelection): Observable<ValueSetData | undefined>;
9099
9105
  /**
@@ -9126,11 +9132,12 @@ declare abstract class SmartValueSetStore {
9126
9132
  abstract holdFetches(): () => void;
9127
9133
  /**
9128
9134
  * Fetches the sets of the change's Value Set Version Map the store lacks in that version from the
9129
- * backend module of `viewUuid`, the view the request was sent for (else the first changed view).
9130
- * A branch item fetches again the implicit sets of its name instead, and a set an open view holds
9131
- * only implicitly is not fetched.
9135
+ * backend module of `viewUuid`, the view the request was sent for. A branch item is fetched on
9136
+ * its branch, which a view on that branch then reads the set on; a set an open view holds only
9137
+ * implicitly is not fetched. An empty map clears the module's branch keys, an absent one changes
9138
+ * nothing.
9132
9139
  */
9133
- abstract applyVersions(viewContextChange: ViewContextChange | undefined, viewUuid?: string): Promise<void>;
9140
+ abstract applyVersions(viewContextChange: ViewContextChange | undefined, viewUuid: string): Promise<void>;
9134
9141
  /** Fetches the explicit items through a view of the module with the next Value Set Fetch. */
9135
9142
  abstract fetch(module: string | undefined, viewUuid: string, items: ValueSetFetchItem[]): Promise<void>;
9136
9143
  /**
Binary file