@smartbit4all/ng-client 2.1.3 → 2.2.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.
@@ -3,19 +3,14 @@ import { SmartForm, SmartformComponent } from '@smartbit4all/form';
3
3
  import { GridOptions, SmartGrid, SmartGridComponent } from '@smartbit4all/grid';
4
4
  import { SmarttreeGenericService } from '../smart-tree/projects';
5
5
  import { Subject } from 'rxjs';
6
- import { ComponentModel, SmartTranslateService, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
6
+ import { ComponentModel, SmartTranslateService, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction2 } from '../view-context/projects';
7
7
  import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
8
- export declare abstract class SmartComponentApiClient<T> implements UseUiAction {
8
+ export declare abstract class SmartComponentApiClient<T> implements UseUiAction2 {
9
9
  protected inject: Injector;
10
10
  protected auth: SmartAuthenticationServiceInterface;
11
11
  protected pageName: string;
12
12
  protected _destroy$: Subject<void>;
13
13
  protected sendDataChanges: boolean;
14
- private _useAutoSubmit;
15
- private _useAutoSubmitTurnedOff;
16
- protected get useAutoSubmit(): boolean;
17
- protected set useAutoSubmit(useAutoSubmit: boolean);
18
- private subscribeToAutoSubmit;
19
14
  private detectChange;
20
15
  private _uuid?;
21
16
  private uuidOfPageHasBeenChangedSubscription?;
@@ -29,8 +24,6 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction
29
24
  set data(model: T | undefined);
30
25
  uiActionModels: UiActionModel[];
31
26
  dataChanged: Subject<void>;
32
- submit: Subject<void>;
33
- reSubscribeToChange: Subject<void>;
34
27
  smartGrid?: SmartGrid;
35
28
  protected viewContext: SmartViewContextService;
36
29
  protected uiActionService: UiActionService;
@@ -51,12 +44,13 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction
51
44
  load(): Promise<void>;
52
45
  getAdditionalParams(uiAction: UiAction): UiActionAdditionalParams;
53
46
  getModel(): T | undefined;
47
+ submitForm(validate: boolean): void;
54
48
  performUiActionRequest(uiActionRequest: UiActionRequest, widgetId?: string, nodeId?: string): Promise<any>;
55
49
  handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
56
50
  /**
57
51
  * Submits all the registered forms in the SmartComponent
58
52
  */
59
- submitForms(): void;
53
+ submitForms(validate: boolean): void;
60
54
  addGrid(smartGrid: SmartGrid, options: GridOptions, useAsDefaultGrid?: boolean, componentReference?: SmartGridComponent): SmartGrid;
61
55
  addForm(smartFormId: string, smartForm: SmartForm, componentReference?: SmartformComponent): SmartForm;
62
56
  setUpDefaultTree(treeId: string): void;
@@ -16,7 +16,14 @@ export interface UiAction {
16
16
  identifier?: string;
17
17
  inputType?: UiActionInputType;
18
18
  input2Type?: UiActionInputType;
19
+ /**
20
+ * If true, UiAction will submit the form (causing validation) and sends model in UiActionRequest.
21
+ */
19
22
  submit?: boolean;
23
+ /**
24
+ * If true, UiAction will NOT submit the form and sends model WITHOUT VALIDATION in UiActionRequest.
25
+ */
26
+ model?: boolean;
20
27
  confirm?: boolean;
21
28
  /**
22
29
  * Additional parameters for executing the UI action.
@@ -2,7 +2,7 @@ import { Subject } from 'rxjs';
2
2
  import { UiAction, UiActionDescriptor, UiActionRequest } from '../api';
3
3
  export interface UiActionModel {
4
4
  uiAction: UiAction;
5
- serviceToUse: UseUiAction;
5
+ serviceToUse: UseUiAction | UseUiAction2;
6
6
  exception?: boolean;
7
7
  descriptor?: UiActionDescriptor;
8
8
  cssClass?: string;
@@ -17,6 +17,13 @@ export interface UseUiAction {
17
17
  performUiActionRequest(uiActionRequest: UiActionRequest, widgetId?: string, nodeId?: string): Promise<any>;
18
18
  handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
19
19
  }
20
+ export interface UseUiAction2 {
21
+ submitForm(validate: boolean): void;
22
+ getAdditionalParams(uiAction: UiAction): UiActionAdditionalParams;
23
+ getModel(): any;
24
+ performUiActionRequest(uiActionRequest: UiActionRequest, widgetId?: string, nodeId?: string): Promise<any>;
25
+ handleSpecificDemandsAsynchronously(uiAction: UiAction, uiActionRequest: UiActionRequest): Promise<UiActionSpecificDemandResponse>;
26
+ }
20
27
  export interface UiActionSpecificDemandResponse {
21
28
  shouldPerformAction: boolean;
22
29
  uiActionRequest?: UiActionRequest;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.2.0",
6
6
  "@angular/core": "^13.2.0",
7
7
  "@openapitools/openapi-generator-cli": "^2.5.1",
8
8
  "@smartbit4all/dialog": "^1.0.5",
9
- "@smartbit4all/form": "^1.7.9",
9
+ "@smartbit4all/form": "^1.8.0",
10
10
  "@smartbit4all/icon": "^1.0.1",
11
11
  "rxjs": "^7.5.7",
12
12
  "copyfiles": "^2.4.1"
Binary file
Binary file