@smartbit4all/ng-client 1.1.31 → 1.1.33

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,10 +1,10 @@
1
1
  import { Injector } from '@angular/core';
2
+ import { SmartForm, SmartformComponent } from '@smartbit4all/form';
2
3
  import { GridOptions, SmartGrid, SmartGridComponent } from '@smartbit4all/grid';
3
4
  import { SmarttreeGenericService } from '@smartbit4all/tree';
4
5
  import { Subject } from 'rxjs';
5
6
  import { ComponentModel, SmartViewContextService, UiAction, UiActionAdditionalParams, UiActionDescriptorService, UiActionModel, UiActionRequest, UiActionService, UiActionSpecificDemandResponse, UseUiAction } from '../view-context/projects';
6
7
  import { SmartAuthenticationServiceInterface } from './smart-authentication.service';
7
- import { SmartForm, SmartformComponent } from '@smartbit4all/form';
8
8
  export declare abstract class SmartComponentApiClient<T> implements UseUiAction {
9
9
  protected inject: Injector;
10
10
  protected auth: SmartAuthenticationServiceInterface;
@@ -50,6 +50,7 @@ export declare abstract class SmartComponentApiClient<T> implements UseUiAction
50
50
  addForm(smartFormId: string, smartForm: SmartForm, componentReference?: SmartformComponent): SmartForm;
51
51
  setUpDefaultTree(treeId: string): void;
52
52
  createTreeService(treeId: string): SmarttreeGenericService;
53
+ addFileUploader(uiActionCode: string, fileFormats?: string[], maxSizeMb?: number, isMultiple?: boolean): SmartFileUploader;
53
54
  private handleValueChanges;
54
55
  private handleChanges;
55
56
  private handleChangeWidgets;
@@ -69,3 +70,10 @@ export declare class WidgetMap<T> {
69
70
  clearWidgets(): void;
70
71
  get(key: string): T | undefined;
71
72
  }
73
+ export interface SmartFileUploader {
74
+ uiActionCode: string;
75
+ maxSizeMb?: number;
76
+ fileFormats?: string[];
77
+ isMultiple?: boolean;
78
+ smartComponent: SmartComponentApiClient<any>;
79
+ }
@@ -0,0 +1,18 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SmartFileUploaderI18n } from '@smartbit4all/form';
3
+ import { UiActionDescriptorService, UiActionService } from '../../view-context/projects';
4
+ import { SmartFileUploader } from '../smart-component-api-client';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SmartFileUploaderComponent implements OnChanges {
7
+ private uiActionService;
8
+ private uiActionDescriptorService;
9
+ config?: SmartFileUploader;
10
+ i18n?: SmartFileUploaderI18n;
11
+ private uiActionModel?;
12
+ constructor(uiActionService: UiActionService, uiActionDescriptorService: UiActionDescriptorService);
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ setUp(): Promise<void>;
15
+ executeUpload(files: any[]): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFileUploaderComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartFileUploaderComponent, "smart-file-uploader4sc", never, { "config": "config"; }, {}, never, never>;
18
+ }
@@ -1,8 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./session/smart-session.module";
3
- import * as i2 from "./view-context/smart-view-context.module";
2
+ import * as i1 from "./smart-client/smart-file-uploader/smart-file-uploader.component";
3
+ import * as i2 from "@angular/platform-browser";
4
+ import * as i3 from "@angular/material/core";
5
+ import * as i4 from "./session/smart-session.module";
6
+ import * as i5 from "./view-context/smart-view-context.module";
7
+ import * as i6 from "@smartbit4all/form";
4
8
  export declare class SmartNgClientModule {
5
9
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartNgClientModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, never, [typeof i1.SmartSessionModule, typeof i2.SmartViewContextModule], [typeof i1.SmartSessionModule, typeof i2.SmartViewContextModule]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartNgClientModule, [typeof i1.SmartFileUploaderComponent], [typeof i2.BrowserModule, typeof i3.MatCommonModule, typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i6.SmartformModule], [typeof i4.SmartSessionModule, typeof i5.SmartViewContextModule, typeof i1.SmartFileUploaderComponent]>;
7
11
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartNgClientModule>;
8
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^13.2.0",
package/projects.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export * from "./lib/smart-ng-client.service";
2
- export * from "./lib/smart-ng-client.module";
3
- export * from "./lib/view-context/projects";
4
- export * from "./lib/session/projects";
5
- export * from "./lib/smart-client/projects";
1
+ export * from './lib/smart-ng-client.service';
2
+ export * from './lib/smart-ng-client.module';
3
+ export * from './lib/smart-client/smart-file-uploader/smart-file-uploader.component';
4
+ export * from './lib/view-context/projects';
5
+ export * from './lib/session/projects';
6
+ export * from './lib/smart-client/projects';
Binary file