@smartbit4all/ng-client 4.0.89 → 4.0.91

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.
Files changed (47) hide show
  1. package/esm2022/lib/smart-client/smart-component-api-client.mjs +47 -8
  2. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +2 -1
  3. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
  4. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +2 -1
  5. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
  6. package/esm2022/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +46 -11
  7. package/esm2022/lib/smart-form/api/api/api.mjs +1 -1
  8. package/esm2022/lib/smart-form/api/api/default.service.mjs +1 -1
  9. package/esm2022/lib/smart-form/api/api.module.mjs +1 -1
  10. package/esm2022/lib/smart-form/api/configuration.mjs +1 -1
  11. package/esm2022/lib/smart-form/api/encoder.mjs +1 -1
  12. package/esm2022/lib/smart-form/api/index.mjs +1 -1
  13. package/esm2022/lib/smart-form/api/model/models.mjs +1 -1
  14. package/esm2022/lib/smart-form/api/model/propertyMapping.mjs +1 -1
  15. package/esm2022/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
  16. package/esm2022/lib/smart-form/api/model/smartFormInputMode.mjs +1 -1
  17. package/esm2022/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
  18. package/esm2022/lib/smart-form/api/model/smartFormWidgetType.mjs +2 -1
  19. package/esm2022/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
  20. package/esm2022/lib/smart-form/api/model/smartMatrixModel.mjs +1 -1
  21. package/esm2022/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
  22. package/esm2022/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
  23. package/esm2022/lib/smart-form/api/model/valueChangeMode.mjs +1 -1
  24. package/esm2022/lib/smart-form/api/param.mjs +1 -1
  25. package/esm2022/lib/smart-form/api/variables.mjs +1 -1
  26. package/esm2022/lib/smart-form/services/smartform.layout-definition.service.mjs +67 -3
  27. package/esm2022/lib/smart-form/smartform.form-model.mjs +1 -1
  28. package/esm2022/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +73 -24
  29. package/esm2022/lib/view-context/smart-ui-action/ui-action-toolbar.component.mjs +3 -3
  30. package/esm2022/lib/view-context/utility/smart-object-utility.mjs +15 -1
  31. package/fesm2022/smartbit4all-ng-client.mjs +245 -44
  32. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  33. package/lib/smart-client/smart-component-api-client.d.ts +3 -0
  34. package/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.d.ts +1 -0
  35. package/lib/smart-filter/api/filter/model/filterExpressionOperandData.d.ts +1 -0
  36. package/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.d.ts +1 -0
  37. package/lib/smart-filter-editor/api/model/filterExpressionOperandData.d.ts +1 -0
  38. package/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.d.ts +2 -0
  39. package/lib/smart-form/api/model/smartFormWidgetType.d.ts +1 -0
  40. package/lib/smart-form/api/model/smartWidgetDefinition.d.ts +12 -0
  41. package/lib/smart-form/services/smartform.layout-definition.service.d.ts +1 -0
  42. package/lib/smart-form/smartform.form-model.d.ts +82 -1
  43. package/lib/smart-form/widgets/smartformwidget/smartformwidget.component.d.ts +2 -0
  44. package/lib/view-context/utility/smart-object-utility.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/smartbit4all-ng-client-4.0.91.tgz +0 -0
  47. package/smartbit4all-ng-client-4.0.89.tgz +0 -0
@@ -43,12 +43,14 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2
43
43
  sendModelOnWidgetAction: boolean;
44
44
  dataChangeKeys: string[];
45
45
  protected dataChangeActionHandlers: Map<SmartformComponent, Subscription>;
46
+ protected filterModelChangeSubjects: Map<string, Subject<void>>;
46
47
  protected changeDetector?: ChangeDetectorRef;
47
48
  constructor(inject: Injector, auth: SmartAuthenticationServiceInterface, pageName?: string | undefined, _componentName?: string | undefined, element?: ElementRef<any> | undefined, renderer?: Renderer2 | undefined);
48
49
  _ngOnInit(): void;
49
50
  _ngOnDestroy(): void;
50
51
  _ngAfterViewInit(): void;
51
52
  private setupGridServices;
53
+ private setupFilterServices;
52
54
  protected handleQueryListSimple<T>(ql: QueryList<T>, handler: () => void): void;
53
55
  protected handleQueryList<T>(ql: QueryList<T>, handler: (el: T) => void): void;
54
56
  protected abstract getSmartFormsQL(): QueryList<SmartformComponent> | undefined;
@@ -64,6 +66,7 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2
64
66
  protected getAllSmartTreeComponents(): SmarttreeGenericService[];
65
67
  protected getAllSmartFilterEditorContentComponents(): SmartFilterEditorContentComponent[];
66
68
  protected getAllSmartUiActionToolbars(): UiActionToolbarComponent[];
69
+ protected getAllFilterUiActionToolbars(): UiActionToolbarComponent[];
67
70
  initData(): void;
68
71
  initActions(): void;
69
72
  setupAllToolbars(toolbars: UiActionToolbarComponent[], toolbarsWithoutId: UiActionToolbarComponent[], toolbarModels: Map<string, UiActionModel[]>): Promise<void>;
@@ -13,6 +13,7 @@ export declare enum FilterExpressionFieldWidgetType {
13
13
  TEXT_FIELD = "TEXT_FIELD",
14
14
  TEXT_FIELD_CHIPS = "TEXT_FIELD_CHIPS",
15
15
  TEXT_FIELD_NUMBER = "TEXT_FIELD_NUMBER",
16
+ TEXT_FIELD_LOOKUP = "TEXT_FIELD_LOOKUP",
16
17
  TEXT_BOX = "TEXT_BOX",
17
18
  SELECT = "SELECT",
18
19
  SELECT_MULTIPLE = "SELECT_MULTIPLE",
@@ -20,5 +20,6 @@ export interface FilterExpressionOperandData {
20
20
  isDataName?: boolean;
21
21
  valueAsString?: string;
22
22
  selectedValues: Array<string>;
23
+ selectedObjects?: Array<object>;
23
24
  type?: FilterExpressionDataType;
24
25
  }
@@ -13,6 +13,7 @@ export declare enum FilterExpressionFieldWidgetType {
13
13
  TEXT_FIELD = "TEXT_FIELD",
14
14
  TEXT_FIELD_CHIPS = "TEXT_FIELD_CHIPS",
15
15
  TEXT_FIELD_NUMBER = "TEXT_FIELD_NUMBER",
16
+ TEXT_FIELD_LOOKUP = "TEXT_FIELD_LOOKUP",
16
17
  TEXT_BOX = "TEXT_BOX",
17
18
  SELECT = "SELECT",
18
19
  SELECT_MULTIPLE = "SELECT_MULTIPLE",
@@ -20,5 +20,6 @@ export interface FilterExpressionOperandData {
20
20
  isDataName?: boolean;
21
21
  valueAsString?: string;
22
22
  selectedValues: Array<string>;
23
+ selectedObjects?: Array<object>;
23
24
  type?: FilterExpressionDataType;
24
25
  }
@@ -27,6 +27,8 @@ export declare class SmartFilterEditorContentComponent implements OnInit, AfterV
27
27
  ngAfterViewInit(): void;
28
28
  ngOnDestroy(): void;
29
29
  setupSimpleFilter(): void;
30
+ private compareWidgets;
31
+ private compareWidget;
30
32
  private extractFilterFieldFromFormModel;
31
33
  setUp(): void;
32
34
  constructUiActionModels(): void;
@@ -26,6 +26,7 @@ export declare enum SmartFormWidgetType {
26
26
  TEXT_FIELD = "TEXT_FIELD",
27
27
  TEXT_FIELD_CHIPS = "TEXT_FIELD_CHIPS",
28
28
  TEXT_FIELD_NUMBER = "TEXT_FIELD_NUMBER",
29
+ TEXT_FIELD_LOOKUP = "TEXT_FIELD_LOOKUP",
29
30
  TIME = "TIME",
30
31
  TOGGLE = "TOGGLE",
31
32
  IMAGE = "IMAGE",
@@ -103,4 +103,16 @@ export interface SmartWidgetDefinition {
103
103
  properties?: {
104
104
  [key: string]: object;
105
105
  };
106
+ /**
107
+ * The error message to show for the widget.
108
+ */
109
+ errorMessage?: string;
110
+ /**
111
+ * The error message to show for the widget.
112
+ */
113
+ errorIcon?: string;
114
+ /**
115
+ * The error message to show for the widget.
116
+ */
117
+ errorColor?: string;
106
118
  }
@@ -22,6 +22,7 @@ export declare class SmartformLayoutDefinitionService {
22
22
  private createContainer;
23
23
  private createTextField;
24
24
  private createTextFieldChips;
25
+ private createTextFieldLookup;
25
26
  private createTextFieldNumber;
26
27
  private createTextBox;
27
28
  private createRichText;
@@ -2,7 +2,7 @@ import { QuillModules } from 'ngx-quill';
2
2
  import { SelectionDefinition, SmartFormInputMode, SmartFormWidgetDirection, SmartFormWidgetType, SmartWidgetHint, ValueChangeMode } from './api';
3
3
  import { SmartFormTextFieldButton, SmartFormWidgetWidth, SmartIndicator, SmartValidator, ToggleLabelPosition } from './smartform.model';
4
4
  import { Style } from '../view-context/api';
5
- export declare type SmartFormWidget<T> = SmartTextField<T> | SmartTextFieldNumber<T> | SmartTextFieldChips<T> | SmartTextBox<T> | SmartSelect<T> | SmartSelectMultiple<T> | SmartCheckBox<T> | SmartCheckBox2<T> | SmartRadioButton<T> | SmartDatePicker<T> | SmartDateTimePicker<T> | SmartContainer<T> | SmartLabel | SmartTime<T> | SmartToggle<T> | SmartIndicatorItem | SmartFileUploader | SmartImage | SmartDivider | SmartButton | SmartFormInlineComponent | SmartRichText | SmartSortable<T> | SmartMatrix | SmartYoutubePlayer | SmartMonthPicker | SmartSvg;
5
+ export declare type SmartFormWidget<T> = SmartTextField<T> | SmartTextFieldNumber<T> | SmartTextFieldChips<T> | SmartTextFieldLookup<T> | SmartTextBox<T> | SmartSelect<T> | SmartSelectMultiple<T> | SmartCheckBox<T> | SmartCheckBox2<T> | SmartRadioButton<T> | SmartDatePicker<T> | SmartDateTimePicker<T> | SmartContainer<T> | SmartLabel | SmartTime<T> | SmartToggle<T> | SmartIndicatorItem | SmartFileUploader | SmartImage | SmartDivider | SmartButton | SmartFormInlineComponent | SmartRichText | SmartSortable<T> | SmartMatrix | SmartYoutubePlayer | SmartMonthPicker | SmartSvg;
6
6
  export interface SmartTextField<T> {
7
7
  type: SmartFormWidgetType.TEXT_FIELD;
8
8
  key: string;
@@ -35,6 +35,9 @@ export interface SmartTextField<T> {
35
35
  iconPosition?: 'PRE' | 'POST';
36
36
  errorIcon?: string;
37
37
  errorIconColor?: string;
38
+ serverErrorMessage?: string;
39
+ serverErrorIcon?: string;
40
+ serverErrorColor?: string;
38
41
  valueList?: SmartItem<T>[];
39
42
  selection?: SelectionDefinition;
40
43
  filterErrorMessage?: string;
@@ -73,6 +76,9 @@ export interface SmartTextFieldNumber<T> {
73
76
  iconColor?: string;
74
77
  errorIcon?: string;
75
78
  errorIconColor?: string;
79
+ serverErrorMessage?: string;
80
+ serverErrorIcon?: string;
81
+ serverErrorColor?: string;
76
82
  hint?: SmartWidgetHint;
77
83
  }
78
84
  export interface SmartTextFieldChips<T> {
@@ -97,11 +103,44 @@ export interface SmartTextFieldChips<T> {
97
103
  error?: string;
98
104
  errorIcon?: string;
99
105
  errorIconColor?: string;
106
+ serverErrorMessage?: string;
107
+ serverErrorIcon?: string;
108
+ serverErrorColor?: string;
100
109
  valueList: SmartItem<T>[];
101
110
  minValues?: number;
102
111
  maxValues?: number;
103
112
  hint?: SmartWidgetHint;
104
113
  }
114
+ export interface SmartTextFieldLookup<T> {
115
+ type: SmartFormWidgetType.TEXT_FIELD_LOOKUP;
116
+ key: string;
117
+ valueChangeMode?: ValueChangeMode;
118
+ label: string;
119
+ originalLabel?: string;
120
+ showLabel?: boolean;
121
+ value?: T;
122
+ placeholder?: string;
123
+ originalPlaceholder?: string;
124
+ minWidth?: SmartFormWidgetWidth | number | number;
125
+ isDisabled?: boolean;
126
+ isReadonly?: boolean;
127
+ validators?: SmartValidator[];
128
+ cssClass?: string;
129
+ cssLabelClass?: string;
130
+ style?: Style;
131
+ labelStyle?: Style;
132
+ isVisible?: boolean;
133
+ error?: string;
134
+ errorIcon?: string;
135
+ errorIconColor?: string;
136
+ serverErrorMessage?: string;
137
+ serverErrorIcon?: string;
138
+ serverErrorColor?: string;
139
+ minValues?: number;
140
+ maxValues?: number;
141
+ hint?: SmartWidgetHint;
142
+ toolbarId?: string;
143
+ }
105
144
  export interface SmartTextBox<T> {
106
145
  type: SmartFormWidgetType.TEXT_BOX;
107
146
  key: string;
@@ -124,6 +163,9 @@ export interface SmartTextBox<T> {
124
163
  error?: string;
125
164
  errorIcon?: string;
126
165
  errorIconColor?: string;
166
+ serverErrorMessage?: string;
167
+ serverErrorIcon?: string;
168
+ serverErrorColor?: string;
127
169
  hint?: SmartWidgetHint;
128
170
  maxLength?: number;
129
171
  showCharacterLimitSuffix?: boolean;
@@ -149,6 +191,9 @@ export interface SmartSelect<T> {
149
191
  error?: string;
150
192
  errorIcon?: string;
151
193
  errorIconColor?: string;
194
+ serverErrorMessage?: string;
195
+ serverErrorIcon?: string;
196
+ serverErrorColor?: string;
152
197
  valueList: SmartItems<T>[];
153
198
  selection?: SelectionDefinition;
154
199
  hint?: SmartWidgetHint;
@@ -175,6 +220,9 @@ export interface SmartSelectMultiple<T> {
175
220
  error?: string;
176
221
  errorIcon?: string;
177
222
  errorIconColor?: string;
223
+ serverErrorMessage?: string;
224
+ serverErrorIcon?: string;
225
+ serverErrorColor?: string;
178
226
  valueList: SmartItems<T>[];
179
227
  selection?: SelectionDefinition;
180
228
  hint?: SmartWidgetHint;
@@ -200,6 +248,9 @@ export interface SmartCheckBox<T> {
200
248
  error?: string;
201
249
  errorIcon?: string;
202
250
  errorIconColor?: string;
251
+ serverErrorMessage?: string;
252
+ serverErrorIcon?: string;
253
+ serverErrorColor?: string;
203
254
  valueList: SmartItem<T>[];
204
255
  selection?: SelectionDefinition;
205
256
  direction?: SmartFormWidgetDirection;
@@ -225,6 +276,9 @@ export interface SmartCheckBox2<T> {
225
276
  error?: string;
226
277
  errorIcon?: string;
227
278
  errorIconColor?: string;
279
+ serverErrorMessage?: string;
280
+ serverErrorIcon?: string;
281
+ serverErrorColor?: string;
228
282
  valueList: SmartItem<T>[];
229
283
  selection?: SelectionDefinition;
230
284
  direction?: SmartFormWidgetDirection;
@@ -250,6 +304,9 @@ export interface SmartRadioButton<T> {
250
304
  error?: string;
251
305
  errorIcon?: string;
252
306
  errorIconColor?: string;
307
+ serverErrorMessage?: string;
308
+ serverErrorIcon?: string;
309
+ serverErrorColor?: string;
253
310
  valueList: SmartItem<T>[];
254
311
  selection?: SelectionDefinition;
255
312
  direction?: SmartFormWidgetDirection;
@@ -276,6 +333,9 @@ export interface SmartDatePicker<T> {
276
333
  error?: string;
277
334
  errorIcon?: string;
278
335
  errorIconColor?: string;
336
+ serverErrorMessage?: string;
337
+ serverErrorIcon?: string;
338
+ serverErrorColor?: string;
279
339
  dateFormatHint?: string;
280
340
  minDate?: Date;
281
341
  maxDate?: Date;
@@ -303,6 +363,9 @@ export interface SmartDateTimePicker<T> {
303
363
  error?: string;
304
364
  errorIcon?: string;
305
365
  errorIconColor?: string;
366
+ serverErrorMessage?: string;
367
+ serverErrorIcon?: string;
368
+ serverErrorColor?: string;
306
369
  dateFormatHint?: string;
307
370
  filter?: (d: Date | null) => boolean;
308
371
  hint?: SmartWidgetHint;
@@ -352,6 +415,9 @@ export interface SmartTime<T> {
352
415
  error?: string;
353
416
  errorIcon?: string;
354
417
  errorIconColor?: string;
418
+ serverErrorMessage?: string;
419
+ serverErrorIcon?: string;
420
+ serverErrorColor?: string;
355
421
  hint?: SmartWidgetHint;
356
422
  }
357
423
  export interface SmartToggle<T> {
@@ -375,6 +441,9 @@ export interface SmartToggle<T> {
375
441
  error?: string;
376
442
  errorIcon?: string;
377
443
  errorIconColor?: string;
444
+ serverErrorMessage?: string;
445
+ serverErrorIcon?: string;
446
+ serverErrorColor?: string;
378
447
  hint?: SmartWidgetHint;
379
448
  }
380
449
  export interface SmartIndicatorItem {
@@ -519,6 +588,9 @@ export interface SmartRichText {
519
588
  error?: string;
520
589
  errorIcon?: string;
521
590
  errorIconColor?: string;
591
+ serverErrorMessage?: string;
592
+ serverErrorIcon?: string;
593
+ serverErrorColor?: string;
522
594
  hint?: SmartWidgetHint;
523
595
  maxLength?: number;
524
596
  showCharacterLimitSuffix?: boolean;
@@ -541,6 +613,9 @@ export interface SmartSortable<T> {
541
613
  error?: string;
542
614
  errorIcon?: string;
543
615
  errorIconColor?: string;
616
+ serverErrorMessage?: string;
617
+ serverErrorIcon?: string;
618
+ serverErrorColor?: string;
544
619
  validators?: SmartValidator[];
545
620
  valueList?: SmartItem<T>[];
546
621
  isMultiple?: boolean;
@@ -564,6 +639,9 @@ export interface SmartMatrix {
564
639
  error?: string;
565
640
  errorIcon?: string;
566
641
  errorIconColor?: string;
642
+ serverErrorMessage?: string;
643
+ serverErrorIcon?: string;
644
+ serverErrorColor?: string;
567
645
  validators?: SmartValidator[];
568
646
  isMultiple?: boolean;
569
647
  hint?: SmartWidgetHint;
@@ -605,6 +683,9 @@ export interface SmartMonthPicker {
605
683
  error?: string;
606
684
  errorIcon?: string;
607
685
  errorIconColor?: string;
686
+ serverErrorMessage?: string;
687
+ serverErrorIcon?: string;
688
+ serverErrorColor?: string;
608
689
  cssClass?: string;
609
690
  cssLabelClass?: string;
610
691
  style?: Style;
@@ -103,6 +103,7 @@ export declare class SmartformwidgetComponent implements OnInit, OnDestroy, Afte
103
103
  getRichTextEditorLengthLeeway(): number;
104
104
  addOnBlur: boolean;
105
105
  readonly separatorKeysCodes: readonly [13, 188];
106
+ readonly emptySeparatorKeysCodes: readonly [];
106
107
  add(event: MatChipInputEvent): void;
107
108
  remove(value: SmartFormWidget<any>): void;
108
109
  selected(event: MatAutocompleteSelectedEvent, widgetInstance: SmartFormWidget<any>): void;
@@ -130,6 +131,7 @@ export declare class SmartformwidgetComponent implements OnInit, OnDestroy, Afte
130
131
  truncateUri(uri: any): any;
131
132
  removeMatrixRow(question: any): void;
132
133
  isToolbarPresent(): boolean;
134
+ getChipsValue(value: any): any;
133
135
  getOptions(items: SmartItems<any>[]): any[];
134
136
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartformwidgetComponent, never>;
135
137
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartformwidgetComponent, "smartformwidget", never, { "form": { "alias": "form"; "required": false; }; "widgetInstance": { "alias": "widgetInstance"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onValueChange": { "alias": "onValueChange"; "required": false; }; "labelColor": { "alias": "labelColor"; "required": false; }; "sophisticatedValueChange": { "alias": "sophisticatedValueChange"; "required": false; }; }, {}, never, never, false, never>;
@@ -1,4 +1,5 @@
1
1
  export declare class SmartObjectUtility {
2
2
  static getValueByPath(model: any, key: string): any;
3
3
  private static traverse;
4
+ static compareByProps(o1: any, o2: any, props: string[]): boolean;
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "4.0.89",
3
+ "version": "4.0.91",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
6
6
  "@angular/common": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
Binary file